text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
#[test]
fn test_with_pad_char_to_full_length() {
let mut ctx = EvalContext::default();
let mut cfg = EvalConfig::default();
cfg.set_flag(Flag::PAD_CHAR_TO_FULL_LENGTH);
let mut pad_char_ctx = EvalContext::new(Arc::new(cfg));
let mut c = col_expr(0);
let mut field... | rust_cleaned_test_functions.jsonl/84476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
30290,
9232,
2346,
16372,
5118,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
5206,
13286,
284,
58239,
2648,
486,
2258,
543,
286,
13286,
980,
10933,
7,
12135,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_cast_short() {
let a = bits::<8>(0xFF);
let b: Bits<16> = bit_cast(a);
assert_eq!(b, bits::<16>(0xFF));
let c: Bits<4> = bit_cast(a);
assert_eq!(c, bits::<4>(0xF));
} | rust_cleaned_test_functions.jsonl/75134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
5303,
16673,
368,
341,
286,
1077,
264,
284,
9472,
27638,
23,
2235,
15,
9264,
317,
286,
1077,
293,
25,
49457,
27,
16,
21,
29,
284,
2699,
5303,
2877,
317,
286,
2060,
10714,
10297,
65,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_virtio_fs_hotplug_dax_off() {
test_virtio_fs(false, None, "none", &prepare_virtiofsd, true, None)
} | rust_cleaned_test_functions.jsonl/26137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
34470,
33433,
47474,
814,
706,
13651,
368,
341,
286,
1273,
2273,
2106,
815,
34470,
3576,
11,
2240,
11,
330,
6697,
497,
609,
13609,
2273,
2106,
815,
3848,
67,
11,
830,
11,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_get_app_verbosity_accepts_multiple_occurrences() {
let arg_matches = get_app().get_matches_from(vec!["zinoma", "-vvv"]);
assert_eq!(arg_matches.occurrences_of(arg::VERBOSITY), 3);
} | rust_cleaned_test_functions.jsonl/64654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8191,
62,
65210,
35728,
82,
45233,
57291,
33246,
368,
341,
286,
1077,
1392,
38344,
284,
633,
8191,
1005,
455,
38344,
5673,
25592,
0,
1183,
57097,
7786,
497,
6523,
33075,
85,
15049,
286,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_eh_frame_resolve_cie_offset_ok() {
let buf = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
let cie_offset = 2;
// + 4 for size of length field
assert_eq!(
resolve_cie_offset(&buf, buf.len() + 4 - cie_offset),
Ok(cie_offset)
);
} | rust_cleaned_test_functions.jsonl/9382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
77291,
666,
645,
6917,
19817,
368,
341,
286,
1077,
6607,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_segment_tree_map() {
let mut rng = Xorshift::time();
let mut arr = vec![0i64; N];
let mut seg = LazySegmentTreeMap::<RangeSumRangeAdd<_>>::new(N);
for i in 0..N {
seg.set(i, (0i64, 1i64));
}
for _ in 0..Q {
ran... | rust_cleaned_test_functions.jsonl/43173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1940
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
28061,
11663,
5376,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
13418,
486,
1678,
543,
1789,
286,
1077,
5206,
2890,
284,
7486,
20703,
15,
72,
21,
19,
26,
451,
935,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_read_i16() {
let mut ctxt = ReadScope::new(&[0x1c, 0xd8, 0xf0, 0x1c, 0x27, 0x10, 0xef, 0x27]).ctxt();
assert_eq!(
Op::read(&mut ctxt).unwrap(),
Op::Operand(Operand::Integer(-10000))
);
assert_eq!(
Op::read(&mut ctxt).un... | rust_cleaned_test_functions.jsonl/85326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5318,
16,
21,
368,
341,
1789,
286,
1077,
5206,
59162,
284,
4457,
10803,
486,
931,
2099,
58,
15,
87,
16,
66,
11,
220,
15,
9703,
23,
11,
220,
15,
5848,
15,
11,
220,
15,
87,
16,
66,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_utf_16_encode() {
// Empty
encode_utf_16be("", b"");
encode_utf_16le("", b"");
// Encodes as UTF-8
assert_eq!(UTF_16LE.new_encoder().encoding(), UTF_8);
assert_eq!(UTF_16BE.new_encoder().encoding(), UTF_8);
encode_utf_16le("\u{1F4A9}\u{260... | rust_cleaned_test_functions.jsonl/86893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39453,
62,
16,
21,
11224,
368,
341,
286,
442,
22228,
198,
286,
16164,
39453,
62,
16,
21,
1371,
19814,
293,
1,
797,
286,
16164,
39453,
62,
16,
21,
273,
19814,
293,
3014,
626,
286,
442,
10751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unknown_variant() {
assert_de_tokens_error::<Enum>(
&[
Token::UnitVariant { name: "Enum", variant: "Foo" },
],
"unknown variant `Foo`, expected one of `Unit`, `Simple`, `Seq`, `Map`, `SimpleWithSkipped`",
);
} | rust_cleaned_test_functions.jsonl/129518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
46112,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
10766,
17055,
262,
609,
9640,
286,
9660,
486,
4562,
20746,
314,
829,
25,
330,
10766,
497,
11424,
25,
330,
40923,
1,
1153,
262,
3211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_two_rectangles_no_shared_parts() {
#[rustfmt::skip]
let lines = &[
" +-+",
" | |",
"+-+-+",
"| | ",
"+-+ ",
];
assert_eq!(2, count(lines))
} | rust_cleaned_test_functions.jsonl/40142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
16979,
17248,
6536,
20405,
33217,
368,
341,
262,
11506,
35788,
12501,
486,
20599,
921,
262,
1077,
5128,
284,
609,
9640,
286,
330,
220,
77545,
10,
756,
286,
330,
220,
760,
760,
756,
286,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash() {
let mut sha256 = Sha256::new();
let value_1 =
BigInt::from_str_radix("43589072349864890574839", 10).unwrap();
let value_2 =
BigInt::from_str_radix("14735247304952934566", 10).unwrap();
let value_1_uint = value_1.to_biguint().unwrap... | rust_cleaned_test_functions.jsonl/131001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
1077,
5206,
15870,
17,
20,
21,
284,
27970,
17,
20,
21,
486,
931,
543,
286,
1077,
897,
62,
16,
4035,
310,
62608,
486,
1499,
2895,
39764,
941,
445,
19,
18,
20,
23,
24,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bvc() {
let mut r = Register::new();
r.set_status_overflow(false);
bvc(0x10, &mut r);
assert_eq!(r.get_PC(), 0x10);
r.set_status_overflow(true);
bvc(0x20, &mut r);
assert_ne!(r.get_PC(), 0x20);
} | rust_cleaned_test_functions.jsonl/14239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
7362,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
435,
980,
4773,
79073,
3576,
317,
262,
293,
7362,
7,
15,
87,
16,
15,
11,
609,
6984,
435,
317,
262,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_f64_params() {
test_type(
"DOUBLE PRECISION",
&[
(Some(f64::INFINITY), "'infinity'"),
(Some(f64::NEG_INFINITY), "'-infinity'"),
(Some(10000.55), "10000.55"),
(None, "NULL"),
],
);
} | rust_cleaned_test_functions.jsonl/120849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
21,
19,
6745,
368,
341,
262,
1273,
1819,
1006,
286,
330,
77647,
20952,
73968,
756,
286,
609,
9640,
310,
320,
8373,
955,
21,
19,
486,
687,
55990,
701,
7178,
80016,
6,
4461,
310,
320,
8373,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syntax_update() {
let cache = InMemoryCache::new();
cache.update(&RoleDelete {
guild_id: Id::new(1),
role_id: Id::new(1),
});
} | rust_cleaned_test_functions.jsonl/113555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78894,
8882,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
543,
286,
6500,
5317,
2099,
9030,
6435,
341,
310,
26411,
842,
25,
5223,
486,
931,
7,
16,
1326,
310,
3476,
842,
25,
5223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_primitive_array_compare_slice() {
let a = (0..100).map(Some).collect::<PrimitiveArray<i32>>();
let a = a.slice(50, 50);
let b = (100..200).map(Some).collect::<PrimitiveArray<i32>>();
let b = b.slice(50, 50);
let actual = lt(&a, &b).unwrap();
let ex... | rust_cleaned_test_functions.jsonl/38885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
32235,
26488,
368,
341,
286,
1077,
264,
284,
320,
15,
496,
16,
15,
15,
568,
2186,
65405,
568,
17384,
27638,
33313,
1857,
21897,
18,
17,
37038,
286,
1077,
264,
284,
264,
14530,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bn128_add_ethereum_json() {
let file = File::open("./src/bn256.json").expect("File should open read only");
let json: Value = serde_json::from_reader(file).expect("File should be proper JSON");
let adds = json["add"].as_array().expect("File should have priv key");
for (i,... | rust_cleaned_test_functions.jsonl/103160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58112,
16,
17,
23,
2891,
57757,
23923,
9455,
368,
341,
414,
1077,
1034,
284,
2887,
486,
2508,
13988,
3548,
3470,
77,
17,
20,
21,
4323,
1827,
17119,
445,
1703,
1265,
1787,
1349,
1172,
797,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_from_config_never() {
let mut c = Config::with_none();
c.icons = Some(Icons {
when: Some(IconOption::Never),
theme: None,
separator: None,
});
assert_eq!(Some(IconOption::Never), IconOption::from_config(&c));
} | rust_cleaned_test_functions.jsonl/17361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5332,
13925,
423,
368,
341,
286,
1077,
5206,
272,
284,
5532,
486,
4197,
31488,
543,
286,
272,
78874,
284,
4329,
35066,
341,
310,
979,
25,
4329,
7,
4395,
5341,
486,
26155,
1326,
310,
6912,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chi_square_pearson() {
let t1 :&'static [u8] = b"aaaaaaaabccddddeeeeeeeeeeeeffgghhhhhhiiiiiiijkllllmmnnnnnnooooooopqrrrrrsssssstttttttttuuvwwxyyz";
let t2 :&'static [u8] = b"aabccddddddeeeeeeeffgggghhhhhhiiiiiiijkkllllmmmnnnnnnooooooopqrrrrrsssssstttttuuuuvwwxyyzzzzz";
let st1 = chi... | rust_cleaned_test_functions.jsonl/105362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98826,
39794,
62,
8015,
930,
368,
341,
262,
1077,
259,
16,
549,
5,
6,
1978,
508,
84,
23,
60,
284,
293,
1,
28458,
32646,
370,
638,
40360,
450,
68616,
68616,
2127,
6445,
70,
866,
20367,
90064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_response_1() {
let s = "HTTP/1.1 200 OK\r\n\
Access-Control-Allow-Credentials: true\r\n\
Access-Control-Allow-Origin: *\r\n\
Content-Type: application/json\r\n\
Date: Thu, 21 Nov 2019 02:23:24 GMT\r\n\
Referrer-Policy: no-referrer-when-downgrade\r\n\
Server: nginx\r\n\
X-Co... | rust_cleaned_test_functions.jsonl/111728 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9655,
62,
16,
368,
341,
220,
1077,
274,
284,
330,
9230,
14,
16,
13,
16,
220,
17,
15,
15,
10402,
12016,
1699,
5661,
220,
9549,
25056,
33348,
7658,
15735,
25,
830,
12016,
1699,
5661,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_saturated_50_burst() {
let bucket = VectorTokenBucket::new(Duration::from_millis(1000), 100, *D00, 0.50, 1.0);
Instant::set_time(50_000);
assert!(bucket.get_tokens(50), "Half the tokens should be immediately available.");
assert_ne!(None, bucket.g... | rust_cleaned_test_functions.jsonl/42329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
34367,
62,
20,
15,
880,
32612,
368,
341,
310,
1077,
15621,
284,
4196,
3323,
36018,
486,
931,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
15,
701,
220,
16,
15,
15,
11,
353,
35,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peer_set_config_reject_first() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let (avdtp, remote) = setup_avdtp_peer();
let (profile_proxy, _requests) =
create_proxy_and_stream::<ProfileMarker>().expect("test proxy pair c... | rust_cleaned_test_functions.jsonl/91786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 947
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
2602,
5332,
1288,
583,
12978,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
1077,
320,
402,
67,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_needs_notification() {
let m = &GuestMemoryMmap::<()>::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap();
let qsize = 16;
let vq = MockSplitQueue::new(m, qsize);
let mut q = vq.create_queue(m);
let avail_addr = vq.avail_addr();
// It should alwa... | rust_cleaned_test_functions.jsonl/94697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 999
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
6767,
34296,
368,
341,
286,
1077,
296,
284,
609,
37804,
10642,
44,
2186,
27638,
368,
6831,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_basic() {
let path = reset("basic");
// Create a new store
let cfg = Config::new(path.clone());
let store = Store::new(cfg).unwrap();
let bucket = store.bucket::<&str, Raw>(None).unwrap();
assert!(path::Path::new(path.as_str()).exists());
bucket.set("testing", "abc1... | rust_cleaned_test_functions.jsonl/111959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
262,
1077,
1815,
284,
7585,
445,
22342,
3071,
262,
442,
4230,
264,
501,
3553,
198,
262,
1077,
13286,
284,
5532,
486,
931,
5581,
15997,
1423,
262,
1077,
3553,
284,
9129,
486,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int_async_result() {
match run_async_local(|tx, l| {
let cancellable = crate::Cancellable::new();
let task = unsafe {
crate::LocalTask::new(
None,
Some(&cancellable),
move |t: LocalTask<i3... | rust_cleaned_test_functions.jsonl/124323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
28346,
5287,
368,
341,
286,
2432,
1598,
28346,
13564,
22428,
3998,
11,
326,
91,
341,
310,
1077,
18467,
480,
284,
17717,
486,
34,
83603,
486,
931,
543,
310,
1077,
3383,
284,
19860,
341,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_heartbeat_done_and_inactive_participant() {
let mut protocol = Protocol::new(get_default_fl_settings());
let client_id = ClientId::new();
let resp = protocol.heartbeat(client_id, ClientState::DoneAndInactive);
assert_eq!(HeartBeatResponse::Reject, resp);
... | rust_cleaned_test_functions.jsonl/97774 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
72471,
24390,
8378,
90882,
10495,
21757,
368,
341,
286,
1077,
5206,
11507,
284,
24572,
486,
931,
5433,
9993,
5081,
10853,
1423,
286,
1077,
2943,
842,
284,
8423,
764,
486,
931,
1428,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rebase_descendants_update_branches_after_divergent_rewrite() {
let settings = testutils::user_settings();
let test_repo = testutils::init_repo(&settings, false);
let repo = &test_repo.repo;
// should become a conflict pointing to all of them.
// B4 m... | rust_cleaned_test_functions.jsonl/130812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 936
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
3152,
10986,
28310,
8882,
28031,
288,
19844,
16237,
2375,
306,
74052,
368,
341,
262,
1077,
5003,
284,
1273,
6031,
486,
872,
10853,
543,
262,
1077,
1273,
37784,
284,
1273,
6031,
486,
2327,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table()
{
Lua::new().context(|lua| {
let globals = lua.globals();
globals.set("table", lua.create_table().unwrap()).unwrap();
let table1 : Table = globals.get("table").unwrap();
let table2 : Table = globals.get("table").unwrap();
table1.set("foo", "b... | rust_cleaned_test_functions.jsonl/80280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
741,
515,
262,
37662,
486,
931,
1005,
2147,
22428,
27623,
91,
341,
286,
1077,
37785,
284,
20357,
1302,
16616,
1428,
286,
37785,
980,
445,
2005,
497,
20357,
2520,
5237,
1005,
15454,
6011,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cost_tracker_reach_data_block_limit() {
let (mint_keypair, start_hash) = test_setup();
// build two transactions with diff accounts
let second_account = Keypair::new();
let (_tx1, mut tx_cost1) = build_simple_transaction(&mint_keypair, &start_hash);
let (_... | rust_cleaned_test_functions.jsonl/23076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 496
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15890,
50264,
1288,
610,
1769,
7113,
14763,
368,
341,
286,
1077,
320,
67791,
3097,
12670,
11,
1191,
8950,
8,
284,
1273,
21363,
543,
286,
442,
1936,
1378,
14131,
448,
3638,
9618,
198,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_codec() {
let cases = vec![
("2010-10-10 10:11:11", 0),
("0001-01-01 00:00:00", 0),
("0001-01-01 00:00:00", UN_SPECIFIED_FSP),
("2000-01-01 00:00:00.000000", MAX_FSP),
("2000-01-01 00:00:00.123456", MAX_FSP),
("0001-... | rust_cleaned_test_functions.jsonl/58461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 776
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51084,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
15,
12,
16,
15,
12,
16,
15,
220,
16,
15,
25,
16,
16,
25,
16,
16,
497,
220,
15,
1326,
310,
3489,
15,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_mul_scalar() {
let s = SideOffsets2D::new(1.0, 2.0, 3.0, 4.0);
let result = s * 3.0;
assert_eq!(result, SideOffsets2D::new(3.0, 6.0, 9.0, 12.0));
} | rust_cleaned_test_functions.jsonl/96605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
41652,
368,
341,
286,
1077,
274,
284,
16659,
81095,
17,
35,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
626,
286,
1077,
1102,
284,
274,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_create() {
bad_create_case(0, 1.0);
bad_create_case(1, 0.0);
bad_create_case(1, f64::NAN);
bad_create_case(1, -1.0);
} | rust_cleaned_test_functions.jsonl/23128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
8657,
368,
341,
286,
3873,
8657,
19096,
7,
15,
11,
220,
16,
13,
15,
317,
286,
3873,
8657,
19096,
7,
16,
11,
220,
15,
13,
15,
317,
286,
3873,
8657,
19096,
7,
16,
11,
282,
21,
19,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_param_completion_last_param() {
check_magic_completion(
"param_completion_last_param",
r"
fn foo(file_id: FileId) {}
fn bar(file_id: FileId) {}
fn baz(file<|>) {}
",
);
} | rust_cleaned_test_functions.jsonl/23554 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4090,
60164,
12195,
4090,
368,
341,
286,
1779,
54612,
60164,
1006,
310,
330,
903,
60164,
12195,
4090,
756,
310,
435,
698,
310,
5168,
15229,
4866,
842,
25,
2887,
764,
8,
5613,
310,
5168,
3619,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_icmpv4_socket() {
use crate::socket::{IcmpSocket, IcmpEndpoint, IcmpSocketBuffer, IcmpPacketMetadata};
use crate::wire::Icmpv4Packet;
let (iface, mut socket_set) = create_loopback();
let rx_buffer = IcmpSocketBuffer::new(vec![IcmpPacketMetadata::EMPTY], vec![0; ... | rust_cleaned_test_functions.jsonl/100747 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32747,
1307,
85,
19,
19555,
368,
341,
286,
990,
17717,
486,
9556,
22964,
40,
7293,
10286,
11,
358,
7293,
27380,
11,
358,
7293,
10286,
4095,
11,
358,
7293,
16679,
14610,
2440,
286,
990,
17717,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_i32() {
fn test_int1(slice: &[u8], tag: u16, expected_res: i8) {
let mut reader = BinReader::new(slice);
assert_eq!(Wire::INT1, reader.get_tag(tag).unwrap());
assert_eq!(expected_res, reader.read_i8().unwrap());
}
fn test_int2(sli... | rust_cleaned_test_functions.jsonl/69739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5318,
18,
17,
368,
341,
286,
5168,
1273,
4042,
16,
75282,
25,
44590,
84,
23,
1125,
4772,
25,
575,
16,
21,
11,
3601,
4918,
25,
600,
23,
8,
341,
310,
1077,
5206,
6604,
284,
29344,
5062,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_with_ignore() {
setup();
let stdout = cmd!("echo 'hello world'").ignore_stdout().read().unwrap();
assert!(stdout.is_empty());
let stderr = cmd!("echo 'hello world'").ignore_stderr().read_stderr().unwrap();
assert!(stderr.is_empty());
let stdout = cmd!("echoboth 'h... | rust_cleaned_test_functions.jsonl/52771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
6615,
58493,
368,
341,
262,
6505,
1428,
262,
1077,
20075,
284,
5439,
17223,
3047,
364,
14990,
1879,
6,
1827,
13130,
67416,
1005,
878,
1005,
15454,
543,
262,
2060,
10297,
36358,
2079,
15124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overflow() {
#[allow(dead_code)]
#[repr(u32)]
#[derive(Clone, Copy)]
enum Bar {
V00, V01, V02, V03, V04, V05, V06, V07, V08, V09,
V10, V11, V12, V13, V14, V15, V16, V17, V18, V19,
V20, V21, V22, V23, V24, V25, V26, V27, V28, V29... | rust_cleaned_test_functions.jsonl/2760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79073,
368,
341,
286,
11506,
7183,
83207,
4136,
5563,
286,
11506,
30837,
8154,
18,
17,
5563,
286,
11506,
27098,
65297,
11,
14540,
5563,
286,
7618,
4716,
341,
310,
647,
15,
15,
11,
647,
15,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_import_trip_buffers() {
let mut dataset = dataset!(
trips:
trip_id, route_id, service_id, shape_id, direction_id;
1, tram_12, mon_fri, tram_12::oranienburger_tor_am_kupfergraben, 0;
2, tram... | rust_cleaned_test_functions.jsonl/113846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1027
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
63883,
54591,
368,
341,
286,
1077,
5206,
10337,
284,
10337,
33673,
310,
22466,
510,
394,
8411,
842,
11,
6021,
842,
11,
2473,
842,
11,
6083,
842,
11,
664,
5106,
842,
280,
394,
220,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hmac_encryption_failure() {
let key = generate_key();
let test_value = Uuid::new_v4().to_string();
let mut enc_hash = encrypt_and_hmac(&key, &test_value).unwrap();
enc_hash.hmac[10] = 0;
enc_hash.hmac[11] = 0;
enc_hash.hmac[12] = 0;
enc_has... | rust_cleaned_test_functions.jsonl/25004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
11948,
13781,
15597,
43618,
368,
341,
286,
1077,
1376,
284,
6923,
3097,
543,
286,
1077,
1273,
3142,
284,
547,
2423,
486,
931,
2273,
19,
1005,
983,
3904,
543,
286,
1077,
5206,
3209,
8950,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_io_handler() {
let mut io = IoHandler::new();
io.add_method("say_hello", |_| Ok(Value::String("hello".to_string())));
let request = r#"{"jsonrpc": "2.0", "method": "say_hello", "params": [42, 23], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","result":"hello","id":1}"#;
assert_eq!(... | rust_cleaned_test_functions.jsonl/95528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16939,
10183,
368,
341,
197,
10217,
5206,
6399,
284,
29655,
3050,
486,
931,
1428,
197,
53112,
1364,
9032,
445,
36790,
96724,
497,
66091,
7622,
25346,
486,
703,
445,
14990,
3263,
983,
3904,
10131,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crop_ok_to_one_pixel() {
let img = open_test_image(in_!("blackwhite_2x2.bmp"));
let cmp = open_test_image(in_!("blackwhite_2x2.bmp"));
let operation = ImgOp::Crop((0, 0, 1, 1));
let mut operator = ImageEngine::new(img);
let done = operator.ignite(&[Instr... | rust_cleaned_test_functions.jsonl/21138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51453,
19817,
2346,
11667,
29760,
368,
341,
286,
1077,
4964,
284,
1787,
4452,
4954,
5900,
62,
17223,
11453,
5782,
62,
17,
87,
17,
55476,
4010,
286,
1077,
26089,
284,
1787,
4452,
4954,
5900,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_update_validator_identity() {
let (vote_pubkey, _authorized_voter, authorized_withdrawer, vote_account) =
create_test_account_with_authorized();
let node_pubkey = solana_sdk::pubkey::new_rand();
let node_account = RefCell::new(Account::default());
... | rust_cleaned_test_functions.jsonl/43728 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1050
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
8882,
64959,
46244,
368,
341,
286,
1077,
320,
29358,
34014,
792,
11,
716,
19084,
2273,
25392,
11,
18630,
6615,
80127,
11,
6910,
13500,
8,
4035,
310,
1855,
4452,
13500,
6615,
62,
19084,
1428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accountsdb_root_one_fork() {
morgan_logger::setup();
let paths = get_tmp_accounts_path!();
let db = AccountsDB::new(&paths.paths);
let key = Pubkey::default();
let account0 = Account::new(1, 0, 0, &key);
db.store(0, &[(&key, &account0)]);... | rust_cleaned_test_functions.jsonl/49125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 704
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
12993,
11667,
761,
669,
368,
341,
286,
296,
8462,
27413,
486,
15188,
543,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
2927,
284,
40655,
3506,
486,
931,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_tracker() {
let responder = init_responder(MockedServerQuery::Regular);
let start_height = START_HEIGHT as u32;
// Add the necessary FKs in the database
let user_id = get_random_user_id();
let (uuid, appointment) = generate_dummy_appointment_with_user... | rust_cleaned_test_functions.jsonl/55475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
50264,
368,
341,
286,
1077,
64034,
284,
2930,
4918,
20328,
66436,
291,
5475,
2859,
486,
30404,
317,
286,
1077,
1191,
9561,
284,
20998,
17355,
438,
575,
18,
17,
401,
286,
442,
2691,
279,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve_method() {
let document: CoreDocument = document();
// Resolve methods by fragment.
assert_eq!(document.resolve_method("#key-1", None).unwrap().id().to_string(), "did:example:1234#key-1");
assert_eq!(document.resolve_method("#key-2", None).unwrap().id().to_string(), "did... | rust_cleaned_test_functions.jsonl/50541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
9032,
368,
341,
262,
1077,
2197,
25,
9518,
7524,
284,
2197,
1428,
262,
442,
47302,
5413,
553,
12289,
624,
262,
2060,
10714,
10297,
6062,
14691,
9032,
3584,
792,
12,
16,
497,
2240,
568,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_externally_a_roundtrip() {
let v = EnumStructExternally::VariantA {
foo: 1,
bar: 2,
different: 3,
};
test_roundtrip(v);
} | rust_cleaned_test_functions.jsonl/110483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4301,
745,
4306,
29896,
32981,
368,
341,
262,
1077,
348,
284,
14086,
9422,
84210,
745,
486,
20746,
32,
341,
286,
15229,
25,
220,
16,
345,
286,
3619,
25,
220,
17,
345,
286,
2155,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_get_host() {
let env_key = "KUBERNETES_SERVICE_HOST";
let server = "service1.contoso.com";
let saved_env = env::var(env_key);
env::remove_var(env_key);
assert!(get_host().is_err());
env::set_var(env_key, " ");
assert!(get_host().is_err()... | rust_cleaned_test_functions.jsonl/4238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12848,
368,
341,
286,
1077,
6105,
3097,
284,
330,
42,
4493,
13660,
1348,
1570,
21590,
17213,
876,
286,
1077,
3538,
284,
330,
7936,
16,
5345,
27147,
905,
3302,
286,
1077,
6781,
15879,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wrong_map() {
let mut map1 = TypedHandleMap::new();
let mut map2 = TypedHandleMap::new();
let handle1 = map1.insert(Foobar(1234));
let handle2 = map2.insert(Foobar(1234));
assert_eq!(map1.get(handle1).unwrap(), &Foobar(1234));
assert_eq!(map2.get... | rust_cleaned_test_functions.jsonl/15922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
5376,
368,
341,
286,
1077,
5206,
2415,
16,
284,
50554,
6999,
2227,
486,
931,
543,
286,
1077,
5206,
2415,
17,
284,
50554,
6999,
2227,
486,
931,
1428,
286,
1077,
3705,
16,
284,
2415,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_affine_translation_point() {
let distance = Vector2::new(3, 7);
let matrix = Matrix3x3::from_affine_translation(&distance);
let point = Vector3::new(0, 0, 1);
let expected = Vector3::new(3, 7, 1);
let result = matrix * point;
assert_eq!(resul... | rust_cleaned_test_functions.jsonl/129064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
48914,
482,
49273,
6085,
368,
341,
286,
1077,
6010,
284,
4196,
17,
486,
931,
7,
18,
11,
220,
22,
317,
286,
1077,
6172,
284,
11631,
18,
87,
18,
486,
1499,
48914,
482,
49273,
2099,
19348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bin() {
let cases = vec![
(Datum::I64(10), Datum::Bytes(b"1010".to_vec())),
(Datum::I64(0), Datum::Bytes(b"0".to_vec())),
(Datum::I64(1), Datum::Bytes(b"1".to_vec())),
(Datum::I64(365), Datum::Bytes(b"101101101".to_vec())),
(Dat... | rust_cleaned_test_functions.jsonl/9088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 957
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21816,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
68036,
486,
40,
21,
19,
7,
16,
15,
701,
68459,
486,
7078,
1883,
1,
16,
15,
16,
15,
3263,
983,
13251,
73727,
310,
320,
68036,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_part1() {
assert_eq!(part1("data/7_test.txt").unwrap(), 37);
assert_eq!(part1("data/7.txt").unwrap(), 340987);
} | rust_cleaned_test_functions.jsonl/81557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
2060,
10714,
10297,
4480,
16,
445,
691,
14,
22,
4452,
3909,
1827,
15454,
1507,
220,
18,
22,
317,
286,
2060,
10714,
10297,
4480,
16,
445,
691,
14,
22,
3909,
1827,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_no_criteria() {
assert_eq!(calculate_matches(40_000_000, (65, 8921), None), 588);
} | rust_cleaned_test_functions.jsonl/27443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 55
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
80990,
368,
341,
262,
2060,
10714,
10297,
35597,
38344,
7,
19,
15,
62,
15,
15,
15,
62,
15,
15,
15,
11,
320,
21,
20,
11,
220,
23,
24,
17,
16,
701,
2240,
701,
220,
20,
23,
23,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_eval_3_isog() {
let tpl_xp = xtpl_e(pbxz(), a24plus(), a24minus(), EB - 1);
let (_, _, cs) = get_3_isog(tpl_xp);
let phi_pa_proj = eval_3_isog(paxz(), cs);
let tpl_p = tpl_k((a(), b()), pbxy(), EB - 1);
let phi_pa = eval_3_iso(tpl_p, paxy());
assert_eq!(affine_x(phi_pa... | rust_cleaned_test_functions.jsonl/11570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
62,
18,
6892,
538,
368,
341,
262,
1077,
60979,
3212,
79,
284,
856,
12620,
2204,
1295,
21861,
89,
1507,
264,
17,
19,
7138,
1507,
264,
17,
19,
38365,
1507,
49142,
481,
220,
16,
626,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_media_type() {
let m = MediaType::new("text/html;charset=utf-8").unwrap();
assert_eq!(m.mimetype, "text/html");
assert_eq!(m.params, "charset=utf-8");
let (main, sub) = m.parts().unwrap();
assert_eq!(main, "text");
assert_eq!(sub, "html");
... | rust_cleaned_test_functions.jsonl/58200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29173,
1819,
368,
341,
286,
1077,
296,
284,
50423,
486,
931,
445,
1318,
13739,
45017,
22264,
12,
23,
1827,
15454,
543,
286,
2060,
10714,
10297,
76,
744,
72777,
11,
330,
1318,
13739,
797,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sample() {
let df = df![
"foo" => &[1, 2, 3, 4, 5]
]
.unwrap();
assert!(df.sample_n(3, false).is_ok());
assert!(df.sample_frac(0.4, false).is_ok());
assert!(df.sample_frac(2.0, false).is_err());
assert!(df.sample_n(3, ... | rust_cleaned_test_functions.jsonl/50527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
368,
341,
286,
1077,
6764,
284,
6764,
90515,
310,
330,
7975,
1,
589,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
921,
286,
5133,
286,
659,
15454,
1428,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_update_vote_state_root_on_different_fork() {
let slot_hashes = build_slot_hashes(vec![2, 4, 6, 8]);
let vote_state = build_vote_state(vec![2, 4, 6], &slot_hashes);
// Test with a `vote_state_update` where:
// 1) The root is not present in slot hashes histor... | rust_cleaned_test_functions.jsonl/6140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
8882,
54360,
4387,
12993,
4470,
82741,
761,
669,
368,
341,
286,
1077,
9446,
91616,
284,
1936,
27563,
91616,
25592,
20703,
17,
11,
220,
19,
11,
220,
21,
11,
220,
23,
2558,
286,
1077,
6910,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compute_1() {
initialize_test(
TestParameters::default().specific_failure(None, None, Some("V3D"), true),
|ctx| {
let input = &[1, 2, 3, 4];
pollster::block_on(assert_execute_gpu(
&ctx.device,
&ctx.queue,
... | rust_cleaned_test_functions.jsonl/5528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
62,
16,
368,
341,
262,
9468,
4452,
1006,
286,
3393,
9706,
486,
2258,
1005,
51240,
43618,
26717,
11,
2240,
11,
4329,
445,
53,
18,
35,
3975,
830,
1326,
286,
760,
3773,
91,
341,
310,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bits() {
assert_eq!(Address::from(1).bit_at(0), true);
assert_eq!(Address::from(1).bit_at(1), false);
assert_eq!(Address::from(1).bit_at(2), false);
assert_eq!(Address::from(1).bit_at(3), false);
assert_eq!(Address::from(2).bit_at(0), false);
asse... | rust_cleaned_test_functions.jsonl/126120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20034,
368,
341,
286,
2060,
10714,
10297,
4286,
486,
1499,
7,
16,
568,
4489,
3752,
7,
15,
701,
830,
317,
286,
2060,
10714,
10297,
4286,
486,
1499,
7,
16,
568,
4489,
3752,
7,
16,
701,
895,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_46() {
let key = "40b184271b73b710d40cb63435042c9b526d1e5c3a77bfc516a2bcb4cc27ecae";
let nonce = "b3451318590c84e311dd1e876f527d81";
let expected_output =
"cbbde3a3412504c1f684aa273ee691159edc9f44e306360278d63d4ee2f1faa4";
hcha... | rust_cleaned_test_functions.jsonl/44708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
19,
21,
368,
341,
310,
1077,
1376,
284,
330,
19,
15,
65,
16,
23,
19,
17,
22,
16,
65,
22,
18,
65,
22,
16,
15,
67,
19,
15,
7221,
21,
18,
19,
18,
20,
15,
19,
17,
66,
24,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_str() {
let x = "test".to_string();
let addr_x = x.as_ptr();
let opt = Some(x);
let y = opt.unwrap();
let addr_y = y.as_ptr();
assert_eq!(addr_x, addr_y);
} | rust_cleaned_test_functions.jsonl/20230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2895,
368,
341,
262,
1077,
856,
284,
330,
1944,
3263,
983,
3904,
543,
262,
1077,
10789,
3212,
284,
856,
5357,
4348,
543,
262,
1077,
3387,
284,
4329,
2075,
317,
262,
1077,
379,
284,
3387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_connect_twice() {
let mut s = socket();
assert_eq!(s.connect(REMOTE_END, (IpAddress::Unspecified, 80)),
Ok(()));
assert_eq!(s.connect(REMOTE_END, (IpAddress::Unspecified, 80)),
Err(Error::Illegal));
} | rust_cleaned_test_functions.jsonl/1713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
54178,
558,
368,
341,
286,
1077,
5206,
274,
284,
7575,
543,
286,
2060,
10714,
10297,
82,
10800,
43202,
37528,
10898,
11,
320,
98567,
486,
1806,
53434,
11,
220,
23,
15,
6965,
4293,
7622,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fr_double() {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
for _ in 0..1000 {
// Ensure doubling a is equivalent to adding a to itself.
let mut a = Fr::rand(&mut rng);
let mut b = a;
b.add_assign(&a);
a.d... | rust_cleaned_test_functions.jsonl/66329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
24598,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
20,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
18,
16,
18,
67,
22,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_flush_cache_clean() {
let caching_enabled = true;
let db = Arc::new(AccountsDb::new_with_config_for_tests(
Vec::new(),
&ClusterType::Development,
AccountSecondaryIndexes::default(),
caching_enabled,
AccountShrinkThreshol... | rust_cleaned_test_functions.jsonl/7027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39213,
11529,
19573,
368,
341,
286,
1077,
47430,
18220,
284,
830,
280,
286,
1077,
2927,
284,
19689,
486,
931,
65360,
82,
7994,
486,
931,
6615,
5332,
5478,
32509,
1006,
310,
11312,
486,
931,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_null_array() {
let null_arr = NullArray::new(32);
assert_eq!(null_arr.len(), 32);
assert_eq!(null_arr.null_count(), 32);
assert_eq!(null_arr.is_valid(0), false);
assert_eq!(0, null_arr.get_buffer_memory_size());
let internals_of_null_array = 64; ... | rust_cleaned_test_functions.jsonl/29644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
3858,
368,
341,
286,
1077,
845,
11210,
284,
18084,
1857,
486,
931,
7,
18,
17,
626,
286,
2060,
10714,
10297,
2921,
11210,
19406,
1507,
220,
18,
17,
317,
286,
2060,
10714,
10297,
2921,
1121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmc_mints_cycles_when_registry_has_exchange_rate() {
local_test_on_nns_subnet(|runtime| async move {
let account = AccountIdentifier::new(*TEST_USER1_PRINCIPAL, None);
let icpts = Tokens::new(100, 0).unwrap();
let rate = IcpXdrConversionRateRecord {
timest... | rust_cleaned_test_functions.jsonl/88851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
12887,
717,
21042,
68970,
47636,
50650,
21778,
59212,
9246,
368,
341,
262,
2205,
4452,
4470,
1089,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
2692,
284,
8615,
8714,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_closure() {
let t = ClosureTemplate { name: "world" }; // instantiate your struct
assert_eq!("true", t.call().unwrap()); // then call it.
} | rust_cleaned_test_functions.jsonl/92831 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 64
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72823,
368,
341,
262,
1077,
259,
284,
55567,
7275,
314,
829,
25,
330,
14615,
1,
20066,
442,
40902,
697,
2036,
198,
262,
2060,
10714,
17223,
1866,
497,
259,
8524,
1005,
15454,
13426,
442,
1221,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_round_trip() {
let schema1 = SchemaBuilder::new()
.influx_field("the_field", String)
.tag("the_tag")
.timestamp()
.measurement("the_measurement")
.build()
.unwrap();
// the metadata makes it through... | rust_cleaned_test_functions.jsonl/44065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
63883,
368,
341,
286,
1077,
10802,
16,
284,
12539,
3297,
486,
931,
741,
310,
659,
258,
36706,
5013,
445,
1782,
5013,
497,
923,
340,
310,
659,
4578,
445,
1782,
9372,
1138,
310,
659,
13035,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_newline_style_auto_detect() {
let lf = "One\nTwo\nThree";
let crlf = "One\r\nTwo\r\nThree";
let none = "One Two Three";
assert_eq!(NewlineStyle::Unix, NewlineStyle::auto_detect(lf));
assert_eq!(NewlineStyle::Windows, NewlineStyle::auto_detect(crlf));
assert_eq!(NewlineSt... | rust_cleaned_test_functions.jsonl/93284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
1056,
15117,
27740,
56457,
368,
341,
262,
1077,
58080,
284,
330,
3966,
1699,
11613,
1699,
19641,
876,
262,
1077,
1560,
11008,
284,
330,
3966,
12016,
1699,
11613,
12016,
1699,
19641,
876,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_ordering() {
fn assert_equality(a: Scalar, b: Scalar) {
assert_eq!(a, b);
assert!(a.cmp(&b) == core::cmp::Ordering::Equal);
}
fn assert_lt(a: Scalar, b: Scalar) {
assert!(a < b);
assert!(b > a);
}
as... | rust_cleaned_test_functions.jsonl/54662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
7869,
287,
368,
341,
286,
5168,
2060,
2204,
10473,
2877,
25,
35176,
11,
293,
25,
35176,
8,
341,
310,
2060,
10714,
10297,
64,
11,
293,
317,
310,
2060,
10297,
64,
520,
1307,
2099,
65,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arrow() {
assert_parses("x => x");
assert_parses("f = x => x;");
assert_parses("(x, y) => [y, x]");
assert_parses("f = (x, y) => {}");
assert_syntax_error("(x, y) => {x: x, y: y}");
} | rust_cleaned_test_functions.jsonl/7966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46566,
368,
341,
262,
2060,
77113,
288,
445,
87,
589,
856,
797,
262,
2060,
77113,
288,
445,
69,
284,
856,
589,
856,
34649,
262,
2060,
77113,
288,
31732,
87,
11,
379,
8,
589,
508,
88,
11,
856... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mat2_mul() {
let mat_a = Mat2::from_angle(deg(90.0));
let res_a = mat_a * Vec2::unit_y();
assert_approx_eq!(vec2(-1.0, 0.0), res_a);
let res_b = mat_a * Vec2::unit_x();
assert_approx_eq!(vec2(0.0, 1.0), res_b);
} | rust_cleaned_test_functions.jsonl/13466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16610,
17,
24944,
368,
341,
262,
1077,
5517,
4306,
284,
6867,
17,
486,
1499,
21727,
77127,
7,
24,
15,
13,
15,
1106,
262,
1077,
592,
4306,
284,
5517,
4306,
353,
11312,
17,
486,
3843,
4178,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_valuable_ref() {
let val = &123;
let val = Valuable::as_value(&val);
assert!(matches!(val, Value::I32(v) if v == 123));
} | rust_cleaned_test_functions.jsonl/89995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6189,
13128,
7793,
368,
341,
262,
1077,
1044,
284,
609,
16,
17,
18,
280,
262,
1077,
1044,
284,
4104,
13128,
486,
300,
3142,
2099,
831,
317,
262,
2060,
10297,
19914,
10297,
831,
11,
5162,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_extract_identifier() {
let soundcloud_src = "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/195425494/stream&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true";
match extract_identifier(soundcloud_src, so... | rust_cleaned_test_functions.jsonl/133197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 671
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
33176,
368,
341,
286,
1077,
5112,
12361,
16274,
284,
330,
2428,
1110,
86,
47698,
12361,
905,
59503,
17763,
1085,
51999,
4,
18,
32,
322,
2068,
47698,
12361,
905,
21485,
7821,
14,
16,
24,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_memory_bound_behavior() {
let expected_item_capacity = 100_000_u64;
let cache_size_bytes = ITEM_SIZE_BYTES * expected_item_capacity;
let cache = MemoryBoundedLruCache::new(cache_size_bytes);
// Initialize
(0..expected_item_capacity).for_each(|i| {
... | rust_cleaned_test_functions.jsonl/72589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 938
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
19447,
74540,
368,
341,
286,
1077,
3601,
5634,
35603,
284,
220,
16,
15,
15,
62,
15,
15,
15,
7300,
21,
19,
280,
286,
1077,
6500,
2368,
12524,
284,
35932,
4098,
40705,
353,
3601,
5634,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert() {
let a = AlphaNumCoord('A', 1);
let board_size = 9;
let actual = convert(a, board_size);
let expected = Coord { x: 0, y: 8 };
assert_eq!(actual, expected)
} | rust_cleaned_test_functions.jsonl/68223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
368,
341,
286,
1077,
264,
284,
24708,
4651,
19437,
492,
32,
516,
220,
16,
317,
286,
1077,
4479,
2368,
284,
220,
24,
280,
286,
1077,
5042,
284,
5508,
2877,
11,
4479,
2368,
317,
286,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_por_circuit_blake2s_base_2() {
test_por_circuit::<TestTree<Blake2sHasher, U2>>(3, 129_135);
} | rust_cleaned_test_functions.jsonl/88188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76628,
666,
37268,
13141,
726,
17,
82,
7651,
62,
17,
368,
341,
286,
1273,
76628,
666,
37268,
27638,
2271,
6533,
27,
91038,
17,
82,
6370,
261,
11,
547,
17,
25526,
18,
11,
220,
16,
17,
24,
62,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_integer() {
let arena = Arena::new();
assert_syntaxes(
&parse(&arena, "123", &lang()),
&[Syntax::new_atom(
&arena,
vec![SingleLineSpan {
line: 0.into(),
start_col: 0,
... | rust_cleaned_test_functions.jsonl/52643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31725,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
1428,
286,
2060,
78894,
288,
1006,
310,
609,
6400,
2099,
30527,
11,
330,
16,
17,
18,
497,
609,
5205,
14702,
310,
44590,
33890,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_octree() {
let mut pts = ::math::Points::new();
for x in 0u32 .. 100 {
for y in 0u32 .. 100 {
for z in 0u32 .. 100 {
pts.add(Vec3::new(x as f32, y as f32, z as f32));
}
}
}
let mut o = Octree::new();
for i in 1 .. pts.len() + 1 {
o.add(i as u32, &pts);
}
} | rust_cleaned_test_functions.jsonl/80198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70135,
765,
368,
341,
10217,
5206,
29993,
284,
3504,
10374,
486,
11411,
486,
931,
543,
2023,
856,
304,
220,
15,
84,
18,
17,
5241,
220,
16,
15,
15,
341,
197,
2023,
379,
304,
220,
15,
84,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_increment_0() {
let mut h = Histogram::new();
for op in 1..1000000 {
h.increment(1).unwrap();
assert_eq!(h.entries(), op);
}
} | rust_cleaned_test_functions.jsonl/82142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51482,
62,
15,
368,
341,
286,
1077,
5206,
305,
284,
82138,
486,
931,
1428,
286,
369,
1179,
304,
220,
16,
496,
16,
15,
15,
15,
15,
15,
15,
341,
310,
305,
56936,
7,
16,
568,
15454,
543,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_linkat_olddirfd_none() {
let _dr = crate::DirRestore::new();
let tempdir_oldfile = tempdir().unwrap();
let oldfilename = "foo.txt";
let oldfilepath = tempdir_oldfile.path().join(oldfilename);
let tempdir_newfile = tempdir().unwrap();
let newfilename = "bar.txt";
let... | rust_cleaned_test_functions.jsonl/104827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
266,
62,
337,
631,
404,
6902,
31488,
368,
341,
262,
1077,
716,
3612,
284,
17717,
486,
6184,
56284,
486,
931,
1428,
262,
1077,
2730,
3741,
21108,
1192,
284,
2730,
3741,
1005,
15454,
543,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_foreign_class_with_copy_derive() {
let _ = env_logger::try_init();
let mac: syn::Macro = parse_quote! {
foreigner_class!(#[derive(Copy)] class Foo {
self_type SomeType;
private constructor = empty;
method SomeType:... | rust_cleaned_test_functions.jsonl/57293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
78983,
4790,
6615,
16096,
35345,
533,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
543,
286,
1077,
8978,
25,
6782,
486,
60175,
284,
4715,
45236,
0,
341,
310,
7214,
261,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hostname_truncation() {
// assume some maximum exists
let maxlen = max_hostname_len().unwrap().unwrap();
let long_string = "helloworld"
.chars()
.cycle()
.take(maxlen * 2)
.collect::<String>();
// simple hostname
... | rust_cleaned_test_functions.jsonl/118067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 671
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63840,
3547,
1347,
367,
368,
341,
286,
442,
9658,
1045,
7192,
6724,
198,
286,
1077,
75448,
284,
1932,
63840,
6043,
1005,
15454,
1005,
15454,
543,
286,
1077,
1293,
3904,
284,
330,
71,
95292,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dedup() {
let mut v = vec![3, 1, 0, 1, 4, 4];
dedup(&mut v);
assert_eq!(v, vec![3, 1, 0, 4]);
} | rust_cleaned_test_functions.jsonl/6483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
291,
454,
368,
972,
286,
1077,
5206,
348,
284,
7486,
20703,
18,
11,
220,
16,
11,
220,
15,
11,
220,
16,
11,
220,
19,
11,
220,
19,
5960,
286,
7681,
454,
2099,
6984,
348,
736,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_cpuid_fail_num_entries_too_small() {
let kvm = Kvm::new().unwrap();
if kvm.check_extension(Cap::ExtCpuid) {
let vm = kvm.create_vm().unwrap();
let cpuid = kvm.get_supported_cpuid(KVM_MAX_CPUID_ENTRIES).unwrap();
let ncpuids = cpuid.as_slice... | rust_cleaned_test_functions.jsonl/92512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
39811,
2423,
22121,
4273,
26092,
2346,
78,
31966,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
421,
94748,
9093,
31035,
3025,
391,
486,
6756,
34,
79,
2423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_authorize_url_with_redirect_url() {
let client = new_client().set_redirect_url(RedirectUrl::new(
Url::parse("http://localhost/redirect").unwrap(),
));
let (url, _) = client.authorize_url(|| CsrfToken::new("csrf_token".to_string()));
assert_eq!(
Url::parse(
... | rust_cleaned_test_functions.jsonl/12765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22938,
551,
2903,
6615,
30043,
2903,
368,
341,
262,
1077,
2943,
284,
501,
8179,
1005,
746,
30043,
2903,
2785,
291,
1226,
2864,
486,
931,
1006,
286,
22840,
486,
6400,
445,
1254,
1110,
8301,
14,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_transaction_payload_with_a_write_set_canonical_serialization_example() {
let input = TransactionPayload::WriteSet(ChangeSet::new(get_common_write_set(), vec![]));
let expected_output = vec![
0x01, 0x02, 0xA7, 0x1D, 0x76, 0xFA, 0xA2, 0xD2, 0xD5, 0xC3, 0x22, 0x4E, 0xC3, 0xD4, 0x1D... | rust_cleaned_test_functions.jsonl/8059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 560
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
32813,
6615,
4306,
9165,
2602,
27421,
22391,
25602,
2022,
39304,
368,
341,
262,
1077,
1946,
284,
17869,
29683,
486,
7985,
1649,
7,
4072,
1649,
486,
931,
5433,
21107,
9165,
2602,
1507,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aes_128_ocb() {
let key = "000102030405060708090a0b0c0d0e0f";
let aad = "0001020304050607";
let tag = "16dc76a46d47e1ead537209e8a96d14e";
let iv = "000102030405060708090a0b";
let pt = "0001020304050607";
let ct = "92b657130a74b85a";
let mu... | rust_cleaned_test_functions.jsonl/110563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 635
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
62,
16,
17,
23,
49648,
65,
368,
341,
286,
1077,
1376,
284,
330,
15,
15,
15,
16,
15,
17,
15,
18,
15,
19,
15,
20,
15,
21,
15,
22,
15,
23,
15,
24,
15,
64,
15,
65,
15,
66,
15,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum() {
let out: Vec<String> = rune! {
use std::any::type_name_of_val;
enum E {
A{ f },
B(g),
C,
}
pub fn main() {
let ea = E::A { f: 1 };
let eb = E::B(2);
let ec = E::C;
... | rust_cleaned_test_functions.jsonl/60580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
262,
1077,
700,
25,
11312,
3464,
29,
284,
63499,
0,
341,
286,
990,
1460,
486,
3767,
486,
1313,
1269,
3575,
6189,
401,
286,
7618,
468,
341,
310,
362,
90,
282,
1153,
310,
425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pread_arrays (){
let bytes = [0, 1, 2, 3, 0, 0, 0xde, 0xed, 0xad, 0xde, 0xef, 0xbe];
let data: Data5 = bytes.pread_with(0, LE).unwrap();
println!("data: {:?}", &data);
assert_eq!(data.name, 50462976);
assert_eq!(data.arr1, [0xde, 0xed]);
assert_eq!(data.arr2, [0xdead, 0xb... | rust_cleaned_test_functions.jsonl/51398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
878,
68983,
40653,
262,
1077,
5820,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
15,
11,
220,
15,
11,
220,
15,
56185,
11,
220,
15,
51319,
11,
220,
15,
55254,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple() {
let mut buffer = buffer();
buffer.enqueue(6, ()).unwrap().copy_from_slice(b"abcdef");
assert_eq!(buffer.enqueue(16, ()), Err(Full));
assert_eq!(buffer.metadata_ring.len(), 1);
assert_eq!(buffer.dequeue().unwrap().1, &b"abcdef"[..]);
asse... | rust_cleaned_test_functions.jsonl/115419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
286,
1077,
5206,
4147,
284,
4147,
543,
286,
4147,
47468,
7,
21,
11,
1719,
568,
15454,
1005,
8560,
5673,
26488,
1883,
1,
41202,
797,
286,
2060,
10714,
10297,
7573,
47468,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum() {
let schema = r#"
{
"type":"record",
"name":"TestAllowedEnumNested",
"fields":[
{
"name":"a",
"type": {
"type":"enum",
"name":"TestA... | rust_cleaned_test_functions.jsonl/27819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
286,
1077,
10802,
284,
435,
2,
698,
286,
341,
310,
330,
1313,
3252,
8548,
756,
310,
330,
606,
3252,
2271,
35382,
10766,
71986,
756,
310,
330,
9007,
8899,
198,
394,
341,
503,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_many_submits() {
init();
const WORKERS: u32 = 42;
const TASKS: usize = 40;
let mut scheduler = WorkstealingScheduler::default();
connect_workers(&mut scheduler, WORKERS, 1);
let mut workers: Set<WorkerId> = Set::new();
for i in 0..TASKS {
... | rust_cleaned_test_functions.jsonl/27856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22101,
5228,
44703,
368,
341,
286,
2930,
543,
286,
733,
31804,
4321,
25,
575,
18,
17,
284,
220,
19,
17,
280,
286,
733,
42979,
50,
25,
22301,
284,
220,
19,
15,
280,
286,
1077,
5206,
28809,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_validate_invalid_arguments() {
let (config, keypair) = get_test_config();
let vm_validator = TestValidator::new(&config);
let address = account_config::association_address();
let (program_script, _, _) = encode_transfer_program(&address, 100).into_inner();
let program = Prog... | rust_cleaned_test_functions.jsonl/90970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
31433,
43433,
368,
341,
262,
1077,
320,
1676,
11,
1376,
12670,
8,
284,
633,
4452,
5332,
543,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
2099,
1676,
626,
262,
1077,
2621,
284,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_id() {
// assert artist
let spotify = Spotify::default().access_token("test-access").build();
let mut artist_id = String::from("spotify:artist:2WX2uTcsvV5OnS0inACecP");
let id = spotify.get_id(Type::Artist, &mut artist_id);
assert_eq!("2WX2uTcsvV5... | rust_cleaned_test_functions.jsonl/38888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 874
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
842,
368,
972,
286,
442,
2060,
10049,
319,
286,
1077,
87790,
284,
40537,
486,
2258,
1005,
5211,
6458,
445,
1944,
42156,
1827,
5834,
1647,
286,
1077,
5206,
10049,
842,
284,
923,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signal_and_timeout_stop_with_signal() {
unittestlogger();
let core = redirect::core::StoppableCore::new().unwrap();
let timeout = std::time::Duration::from_secs(10);
debug!("stopping the core");
core.stop();
debug!("stopped the core");
let result = core.run_ti... | rust_cleaned_test_functions.jsonl/109190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21137,
8378,
20537,
19039,
6615,
21137,
368,
341,
262,
19905,
9786,
17745,
1066,
262,
1077,
6200,
284,
6423,
486,
2153,
486,
623,
77539,
5386,
486,
931,
1005,
15454,
543,
262,
1077,
9632,
284,
146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dedup_flags() {
// These should all be preserved.
assert!(dedup_flags("") == "");
assert!(dedup_flags("-Zfoo") == " -Zfoo");
assert!(dedup_flags("-Z foo") == " -Zfoo");
assert!(dedup_flags("-Zfoo bar") == " -Zfoo bar");
let result = dedup_flags("-Z... | rust_cleaned_test_functions.jsonl/89624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 661
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
291,
454,
14130,
368,
341,
286,
442,
4220,
1265,
678,
387,
33583,
624,
286,
2060,
10297,
9789,
454,
14130,
39047,
621,
14498,
286,
2060,
10297,
9789,
454,
14130,
13645,
57,
7975,
899,
621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raft() {
let (_cluster, client, _) = must_new_cluster_and_kv_client();
// Raft commands
let (sink, _) = client.raft().unwrap();
sink.send((RaftMessage::new(), Default::default()))
.wait()
.unwrap();
let (sink, _) = client.snapshot().unwrap();
let mut chu... | rust_cleaned_test_functions.jsonl/8798 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2944,
368,
341,
262,
1077,
5453,
18855,
11,
2943,
11,
27439,
284,
1969,
5921,
28441,
8378,
97066,
8179,
1428,
262,
442,
18482,
723,
11293,
198,
262,
1077,
320,
66738,
11,
27439,
284,
2943,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_creating_test_files() {
Command::cargo_bin("specdown")
.unwrap()
.arg("--no-colour")
.arg("run")
.arg("--running-dir")
.arg(".specdown")
.arg("docs/specs/creating_test_files.md")
.assert()
.success();
} | rust_cleaned_test_functions.jsonl/104097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
666,
72810,
4452,
10931,
368,
341,
262,
7348,
486,
66715,
21816,
445,
9535,
2923,
1138,
286,
659,
15454,
741,
286,
659,
858,
21549,
2152,
19459,
413,
1138,
286,
659,
858,
445,
6108,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_service_port() {
let port = Port {
name: "test".into(),
container_port: 443,
protocol: PortProtocol::TCP,
};
assert_eq!(443, port.to_service_port().port);
assert_eq!(
IntOrString::Int(443),
port.to_service_port().target_port.expect("port... | rust_cleaned_test_functions.jsonl/98687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
12267,
8716,
368,
341,
262,
1077,
2635,
284,
5776,
341,
286,
829,
25,
330,
1944,
3263,
18122,
3148,
286,
5476,
8716,
25,
220,
19,
19,
18,
345,
286,
11507,
25,
5776,
20689,
486,
49896,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_split() {
let f = vec![0.1, 0.2, 0.3, 0.4];
let (l, r) = split_stereo_wave(f);
assert_eq!(l, vec![0.1, 0.3]);
assert_eq!(r, vec![0.2, 0.4]);
let lr = join_stereo_wave(l, r);
assert_eq!(lr, vec![0.1, 0.2, 0.3, 0.4]);
} | rust_cleaned_test_functions.jsonl/39988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
17052,
368,
341,
286,
1077,
282,
284,
7486,
20703,
15,
13,
16,
11,
220,
15,
13,
17,
11,
220,
15,
13,
18,
11,
220,
15,
13,
19,
935,
286,
1077,
320,
75,
11,
435,
8,
284,
6718,
1261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_valid_multinomial() {
use std::f64;
let invalid = [1.0, f64::NAN, 3.0];
assert!(!is_valid_multinomial(&invalid, true));
let invalid2 = [-2.0, 5.0, 1.0, 6.2];
assert!(!is_valid_multinomial(&invalid2, true));
let invalid3 = [0.0, 0.0, 0.0];
... | rust_cleaned_test_functions.jsonl/132169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8337,
26290,
258,
20855,
368,
341,
286,
990,
1460,
486,
69,
21,
19,
401,
286,
1077,
8318,
284,
508,
16,
13,
15,
11,
282,
21,
19,
486,
45,
1093,
11,
220,
18,
13,
15,
935,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.