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_undefined_comparison4() {
fold("1 !== void 0", "true");
fold("1 === void 0", "false");
fold("null !== void 0", "true");
fold("null === void 0", "false");
fold("undefined !== void 0", "false");
fold("undefined === void 0", "true");
} | rust_cleaned_test_functions.jsonl/122151 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
9614,
90797,
19,
368,
341,
262,
11555,
445,
16,
4376,
737,
220,
15,
497,
330,
1866,
797,
262,
11555,
445,
16,
2049,
737,
220,
15,
497,
330,
3849,
3071,
262,
11555,
445,
2921,
4376,
737,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_block_probability() {
let bp = block_probabilities(1.0 - 0.15);
for i in 0..bp.len() - 1 {
assert!(bp[i] >= bp[i + 1]);
}
} | rust_cleaned_test_functions.jsonl/90377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
68589,
368,
341,
262,
1077,
26685,
284,
2504,
20794,
8456,
7,
16,
13,
15,
481,
220,
15,
13,
16,
20,
317,
262,
369,
600,
304,
220,
15,
496,
17808,
19406,
368,
481,
220,
16,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_absolute_pattern() {
// assume that the filesystem is not empty!
assert!(glob("/*").next().is_some());
assert!(glob("//").next().is_some());
// check windows absolute paths with host/device components
let root_with_device = os::getcwd().root_path().unwrap... | rust_cleaned_test_functions.jsonl/13351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50874,
21260,
368,
341,
286,
442,
9658,
429,
279,
38389,
374,
537,
4287,
4894,
286,
2060,
10297,
58926,
445,
1057,
1827,
3600,
1005,
285,
61855,
1423,
286,
2060,
10297,
58926,
29076,
1827,
3600,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_home_get_account_path() {
let dir = tempdir().unwrap();
let home = Home::new(dir.path()).unwrap();
let correct_dir = dir.path().join(".shuffle/accounts");
assert_eq!(correct_dir, home.get_account_path());
} | rust_cleaned_test_functions.jsonl/123541 | {
"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,
21653,
3062,
13500,
2638,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
2114,
284,
5379,
486,
931,
14161,
3875,
6011,
15454,
543,
286,
1077,
4396,
4334,
284,
5419,
3875,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_term_colors() {
let mut m = HashMap::new();
m.insert(
"normal",
Color {
gui: ColorCode::Normal("#123456"),
cterm: ColorCode::Normal(123),
},
);
m.insert(
"contrast",
Color {
gui: ColorCode::Contrast... | rust_cleaned_test_functions.jsonl/76928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 639
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
17464,
33670,
368,
341,
262,
1077,
5206,
296,
284,
10528,
486,
931,
543,
262,
296,
7030,
1006,
286,
330,
8252,
756,
286,
3478,
341,
310,
19229,
25,
3478,
2078,
486,
12206,
3584,
16,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dh_init_ok() {
let result = dh_init(1, Curve::Secp256k1);
let (success, _, _): (bool, Vec<String>, Vec<String>) =
serde_json::from_str(&result).unwrap();
assert!(success);
} | rust_cleaned_test_functions.jsonl/49751 | {
"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,
814,
71,
6137,
19817,
368,
341,
286,
1077,
1102,
284,
34096,
6137,
7,
16,
11,
53677,
486,
8430,
79,
17,
20,
21,
74,
16,
317,
286,
1077,
320,
5630,
11,
8358,
716,
1648,
320,
2641,
11,
11312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dequantize_and_idct_block_8x8() {
let coefficients: [i16; 8 * 8] = [
-14, -39, 58, -2, 3, 3, 0, 1,
11, 27, 4, -3, 3, 0, 1, 0,
-6, -13, -9, -1, -2, -1, 0, 0,
-4, 0, -1, -2, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0, 0, 0,
-3, -2, 0, 0, 0, 0, 0, 0,
0,... | rust_cleaned_test_functions.jsonl/38780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
30448,
551,
8378,
842,
302,
7113,
62,
23,
87,
23,
368,
341,
262,
1077,
36829,
25,
508,
72,
16,
21,
26,
220,
23,
353,
220,
23,
60,
284,
2278,
286,
481,
16,
19,
11,
481,
18,
24,
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_mkdir_no_parent() {
cleanup(TEST_DIR5);
let prog = Command::new(EXE).arg(TEST_DIR5).status();
let exit_success = prog.unwrap().success();
cleanup(TEST_DIR5);
assert_eq!(exit_success, false);
} | rust_cleaned_test_functions.jsonl/32986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
12438,
6536,
15960,
368,
341,
262,
21290,
50320,
8291,
20,
317,
262,
1077,
29271,
284,
7348,
486,
931,
25409,
36,
568,
858,
50320,
8291,
20,
568,
2829,
543,
262,
1077,
4869,
18632,
284,
292... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ease_point_out_expo() {
let start = Point { x: 0.0, y: 0.0 };
let end = Point { x: 1.0, y: 1.0 };
let expected = Point {
x: 0.9995117,
y: 0.9995117,
};
assert_eq!(ease_point(ease_out_expo, start, end, 1.0), end);
assert_eq!(... | rust_cleaned_test_functions.jsonl/40077 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
519,
6085,
6068,
2702,
5368,
368,
341,
286,
1077,
1191,
284,
5126,
314,
856,
25,
220,
15,
13,
15,
11,
379,
25,
220,
15,
13,
15,
2605,
286,
1077,
835,
284,
5126,
314,
856,
25,
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 |
#[test]
fn test_read_header_with_invalid_end_position_index() {
let data = [
0x00, 0x00, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00, // col_seq = 1
0x04, 0x00, 0x00, 0x00, // col_beg = 4
0xff, 0xff, 0xff, 0xff, // col_end = -1
0x23, 0x00, 0x00, 0x00, ... | rust_cleaned_test_functions.jsonl/83484 | {
"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,
6443,
8757,
6615,
31433,
6213,
9661,
3560,
368,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
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_file_expand() {
check(
r#"
#[rustc_builtin_macro]
macro_rules! file {() => {}}
fn main() { file!(); }
"#,
expect![[r##"
#[rustc_builtin_macro]
macro_rules! file {() => {}}
fn main() { ""; }
"##]],
);
} | rust_cleaned_test_functions.jsonl/59814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
67875,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
13353,
35788,
66,
73829,
58810,
921,
32606,
21407,
0,
1034,
314,
368,
589,
4687,
630,
8822,
1887,
368,
314,
1034,
0,
2129,
456,
57676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_batch_transfer(){
let mut t = Token::deployed();
let id=83.into();
let id1=34.into();
let id2=29.into();
let mut ids = vec![id, id1, id2];
let mut quantities=vec![200.into(),200.into(),200.into()];
t.batchmint(t.bob,Sender(t.ali),ids,quantities);
t.batch_transfer_... | rust_cleaned_test_functions.jsonl/32236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
35403,
3032,
262,
1077,
5206,
259,
284,
9660,
486,
35794,
291,
543,
262,
1077,
877,
28,
23,
18,
39860,
543,
262,
1077,
877,
16,
28,
18,
19,
39860,
543,
262,
1077,
877,
17,
28,
17,
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 |
#[test]
fn test_compile_shift_right_f() {
let compiled = bitwise::compile_shift_right("F".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b10111110);
} | rust_cleaned_test_functions.jsonl/100618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
22230,
10539,
761,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
22230,
10539,
445,
37,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_lots_of_unsigned_varint_32() {
let mut vector = Cursor::new(vec![0u8; 0]);
let mut index = 0;
while index < 123456 {
index += 1;
assert!(vector.write_unsigned_varint_32(index).is_ok());
}
vector.set_position(0);
... | rust_cleaned_test_functions.jsonl/117940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
9165,
907,
2412,
3575,
67830,
4612,
396,
62,
18,
17,
368,
1476,
286,
1077,
5206,
4621,
284,
28067,
486,
931,
25592,
20703,
15,
84,
23,
26,
220,
15,
10149,
286,
1077,
5206,
1922,
284,
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... | 3 |
#[test]
fn test_index_mut() {
let mut v1 = Vec3::zero();
let v2 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
v1[0] = 1.0f64;
v1[1] = 2.0f64;
v1[2] = 3.0f64;
assert_eq!(v1, v2);
} | rust_cleaned_test_functions.jsonl/120490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
29523,
368,
972,
286,
1077,
5206,
348,
16,
284,
11312,
18,
486,
14154,
1647,
286,
1077,
348,
17,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
69,
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,
1... | 1 |
#[test]
fn test_set_properties() {
let obj = Object::with_type(
SimpleObject::static_type(),
&[("construct-name", &"meh"), ("name", &"initial")],
)
.expect("Object::new failed");
assert_eq!(
obj.get_property("construct-name")
.... | rust_cleaned_test_functions.jsonl/27400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
25158,
368,
341,
286,
1077,
2839,
284,
3002,
486,
4197,
1819,
1006,
310,
8993,
1190,
486,
1978,
1819,
3148,
310,
44590,
445,
7596,
11494,
497,
609,
1,
76,
2636,
3975,
3489,
606,
497,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_value_one_off_template() {
let m = json!({
"greeting": "Good morning"
});
let result =
Tera::one_off("{{ greeting }} world", &Context::from_value(m).unwrap(), true).unwrap();
assert_eq!(result, "Good morning world");
} | rust_cleaned_test_functions.jsonl/87550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
11667,
13651,
8693,
368,
341,
286,
1077,
296,
284,
2951,
0,
2262,
310,
330,
70,
43632,
788,
330,
15216,
6556,
698,
286,
1625,
286,
1077,
1102,
4035,
310,
350,
2416,
486,
603,
13651,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stdin_stdout_skip_bytes() {
let input = build_ascii_block(521);
let mut output = String::from_utf8(input.clone()).unwrap();
let _ = output.drain(..256);
new_ucmd!()
.args(&["status=none", "skip=256", "ibs=128", "iflag=skip_bytes"])
.pipe_in(input)
.run()
... | rust_cleaned_test_functions.jsonl/59380 | {
"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,
15656,
258,
67416,
44830,
12524,
368,
341,
262,
1077,
1946,
284,
1936,
50238,
7113,
7,
20,
17,
16,
317,
262,
1077,
5206,
2550,
284,
923,
486,
1499,
39453,
23,
5384,
15997,
6011,
15454,
543,
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_parse_utf8() {
let st = "abcéŷ¤£€ù%323";
let ref mut bytes = st.bytes().map(|x| Ok(x));
let chars = st.chars();
for c in chars {
let b = bytes.next().unwrap().unwrap();
assert!(c == parse_utf8_char(b, bytes).unwrap());
}
} | rust_cleaned_test_functions.jsonl/3968 | {
"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,
21039,
39453,
23,
368,
341,
262,
1077,
357,
284,
330,
13683,
963,
147197,
81538,
21651,
15056,
14926,
4,
18,
17,
18,
876,
262,
1077,
2053,
5206,
5820,
284,
357,
42697,
1005,
2186,
22428,
87,
91,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_keys() {
run_test(|url, client| {
let login =
create_and_authorize_user(url, &client, "test_get_keys@gmail.com", "Admin2193!");
let expected_key = PostKey {
public_key: "<public_key>".to_string(),
encrypted_priv... | rust_cleaned_test_functions.jsonl/32293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 839
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12631,
368,
341,
286,
1598,
4452,
22428,
1085,
11,
2943,
91,
341,
310,
1077,
5858,
4035,
394,
1855,
8378,
22938,
551,
3317,
6522,
11,
609,
2972,
11,
330,
1944,
3062,
12631,
10375,
905,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timeout() {
const TIMEOUT_SECONDS: i64 = 6;
const EVENT_PAUSE_SECONDS: i64 = TIMEOUT_SECONDS + 1;
struct StopHook;
#[async_trait]
impl Hook for StopHook {
async fn on(self: Arc<Self>, _event: &Event) -> Result<(), ModelError> {
... | rust_cleaned_test_functions.jsonl/88231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1769
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20537,
368,
341,
286,
733,
90846,
75351,
25,
600,
21,
19,
284,
220,
21,
280,
286,
733,
12742,
79538,
75351,
25,
600,
21,
19,
284,
90846,
75351,
488,
220,
16,
280,
286,
2036,
14215,
31679,
280,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_oidos_plugin() {
let mut plugin = OidosPlugin::default();
plugin.set_sample_rate(500.0);
let nump = plugin.get_info().parameters;
let params = plugin.get_parameter_object();
let mut r = thread_rng();
for _it in 0..100 {
for _p in 0..r.gen_range(0, 2) {
params.set_parameter(r.gen_rang... | rust_cleaned_test_functions.jsonl/28546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59633,
436,
23110,
368,
341,
10217,
5206,
9006,
284,
506,
13349,
11546,
486,
2258,
543,
197,
9138,
980,
17491,
9246,
7,
20,
15,
15,
13,
15,
317,
10217,
308,
1510,
284,
9006,
670,
3109,
1005,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_serialize_fields() {
let mut field_ids = HashMap::new();
field_ids.insert("title".to_owned(), 1usize);
field_ids.insert("author".to_owned(), 2usize);
field_ids.insert("year".to_owned(), 3usize);
let s = field_ids_json(field_ids);
assert_tokens(
... | rust_cleaned_test_functions.jsonl/112247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
12132,
368,
341,
286,
1077,
5206,
2070,
8077,
284,
10528,
486,
931,
543,
286,
2070,
8077,
7030,
445,
2102,
3263,
983,
51973,
1507,
220,
16,
51878,
317,
286,
2070,
8077,
7030,
445,
3094,
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_hex_serialization() {
let value = Value::String("0x2a".to_string());
let addr: Annotated<Addr> = FromValue::from_value(Annotated::new(value));
assert_eq!(addr.payload_to_json().unwrap(), "\"0x2a\"");
let value = Value::U64(42);
let addr: Annotated<Addr> = FromValue::from_valu... | rust_cleaned_test_functions.jsonl/57486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
25602,
2022,
368,
341,
262,
1077,
897,
284,
5162,
486,
703,
445,
15,
87,
17,
64,
3263,
983,
3904,
1423,
262,
1077,
10789,
25,
1527,
87029,
27,
13986,
29,
284,
5542,
1130,
486,
1499,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_move_selection_right() {
// check left bounds
let selection = TextSelection::new(4, 4);
let len = 5;
let result = move_selection_right(selection, len);
assert_eq!(result.start(), 5);
assert_eq!(result.end(), 5);
// start == end
le... | rust_cleaned_test_functions.jsonl/61662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
23672,
10539,
368,
341,
286,
442,
220,
1779,
2115,
14262,
198,
286,
1077,
6589,
284,
2918,
11177,
486,
931,
7,
19,
11,
220,
19,
317,
286,
1077,
2422,
284,
220,
20,
280,
286,
1077,
1102,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ensure_supported_api() {
assert!(ensure_supported_api("test", 3, ScmpVersion::from((2, 4, 0))).is_ok());
assert!(ensure_supported_api("test", 100, ScmpVersion::from((2, 4, 0))).is_err());
} | rust_cleaned_test_functions.jsonl/126631 | {
"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,
62,
27289,
57885,
11697,
368,
341,
286,
2060,
10297,
27289,
57885,
11697,
445,
1944,
497,
220,
18,
11,
2463,
1307,
5637,
486,
1499,
1188,
17,
11,
220,
19,
11,
220,
15,
36334,
285,
19817,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signature_parse() {
use super::Signature;
let raw_signature =
"t=1492774577,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bd";
let signature = Signature::parse(raw_signature).unwrap();
assert_eq!(signature.t, 1492774577);
as... | rust_cleaned_test_functions.jsonl/75935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
21039,
368,
341,
286,
990,
2256,
486,
25088,
401,
286,
1077,
7112,
39859,
4035,
310,
330,
83,
28,
16,
19,
24,
17,
22,
22,
19,
20,
22,
22,
14270,
16,
28,
20,
17,
20,
22,
64,
23,
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... | 1 |
#[test]
fn test_star_network_large_push() {
solana_logger::setup();
let mut network = star_network_create(4002);
network_simulator(&mut network, 0.9);
} | rust_cleaned_test_functions.jsonl/1106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31681,
20966,
45228,
14218,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1077,
5206,
3922,
284,
6774,
20966,
8657,
7,
19,
15,
15,
17,
317,
262,
3922,
18314,
10511,
2099,
6984,
3922,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ngram_tokenizer() {
let json = r#"
{
"min_gram": 2,
"max_gram": 3,
"prefix_only": false
}
"#;
let factory = NgramTokenizerFactory::new();
let tokenizer = factory.create(json);
let mu... | rust_cleaned_test_functions.jsonl/103512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1019
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
1520,
6458,
3135,
368,
341,
286,
1077,
2951,
284,
435,
2,
698,
310,
341,
394,
330,
1065,
62,
1520,
788,
220,
17,
345,
394,
330,
2810,
62,
1520,
788,
220,
18,
345,
394,
330,
11849,
1841... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_route_match_single_int() {
let route = Route::new("/api/v1/foo/<int:foo_id>", Method::Get, utils::err_404);
let parsed = route.parse("/api/v1/foo/123");
assert_eq!("123", parsed.get("foo_id").unwrap());
} | rust_cleaned_test_functions.jsonl/47133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28109,
10708,
19487,
4042,
368,
341,
286,
1077,
6021,
284,
9572,
486,
931,
4283,
2068,
5457,
16,
60555,
23012,
396,
25,
7975,
842,
21156,
6730,
486,
1949,
11,
12439,
486,
615,
62,
19,
15,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_query_map() {
let db = checked_memory_handle();
let sql = "BEGIN;
CREATE TABLE foo(x INTEGER, y TEXT);
INSERT INTO foo VALUES(4, \"hello\");
INSERT INTO foo VALUES(3, \", \");
INSERT INTO foo VALUES(2, \"... | rust_cleaned_test_functions.jsonl/25510 | {
"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,
5738,
5376,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
1077,
5704,
284,
330,
37588,
280,
4293,
30776,
14363,
15229,
2075,
30381,
11,
379,
15762,
317,
4293,
39518,
12496,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rwlock_readers_and_readers() {
test_rwlock_handshake(Arc::new(RWLock::new()), Read, Read, false);
// they cannot end up reading at the same time.
test_rwlock_handshake(Arc::new(RWLock::new()), DowngradeRead, Read, false);
test_rwlock_handshake(Arc::new(RW... | rust_cleaned_test_functions.jsonl/20112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98850,
6443,
388,
8378,
6443,
388,
368,
341,
286,
1273,
98850,
23194,
29661,
4346,
1287,
486,
931,
2785,
54,
11989,
486,
931,
11858,
4457,
11,
4457,
11,
895,
317,
1789,
286,
442,
807,
4157,
835,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_max_octets() {
let mut bytes = Vec::with_capacity(512);
for _ in 0..256 {
bytes.extend_from_slice(&[1, b'a']);
}
bytes.push(0);
let mut d = BinDecoder::new(&bytes);
assert!(Name::read(&mut d).is_err());
} | rust_cleaned_test_functions.jsonl/38208 | {
"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,
21816,
6345,
70135,
1415,
368,
341,
286,
1077,
5206,
5820,
284,
11312,
486,
4197,
35603,
7,
20,
16,
17,
317,
286,
369,
716,
304,
220,
15,
496,
17,
20,
21,
341,
310,
5820,
15831,
5673,
26488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_size() {
let hw = RefCell::new(CpuHardware::new());
unsafe {
let buf = Buffer::raw(&hw, 123);
assert_eq!(buf.size(), 123);
}
} | rust_cleaned_test_functions.jsonl/78621 | {
"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,
2368,
368,
341,
286,
1077,
31256,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
286,
19860,
341,
310,
1077,
6607,
284,
10312,
486,
1041,
2099,
27827,
11,
220,
16,
17,
18,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_non_pv_subclass_overrides() {
let hdr = indoc! {"
#include <cstdint>
#include <string>
class TestObserver {
public:
TestObserver() {}
virtual void call(uint8_t) const {}
virtual void call(std::string) const {}
virtual ~TestObserver() {}
};... | rust_cleaned_test_functions.jsonl/9957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 823
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
91139,
5228,
1040,
15431,
18245,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
397,
262,
671,
997,
366,
917,
1339,
262,
536,
3393,
17151,
341,
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_simple_match() {
test_match("const a = 123", "const a=123");
test_non_match("const a = 123", "var a = 123");
} | rust_cleaned_test_functions.jsonl/49965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
10708,
368,
341,
286,
1273,
10708,
445,
1024,
264,
284,
220,
16,
17,
18,
497,
330,
1024,
264,
28,
16,
17,
18,
797,
286,
1273,
21637,
10708,
445,
1024,
264,
284,
220,
16,
17,
18,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_custom() {
let target1 = "http://example.domain/";
let target2 = "https://example.domain/";
let p = Proxy::custom(move |url| {
if url.host_str() == Some("hyper.rs") {
target1.parse().ok()
} else if url.scheme() == "http" {
... | rust_cleaned_test_functions.jsonl/126429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
368,
341,
286,
1077,
2169,
16,
284,
330,
1254,
1110,
8687,
11003,
37254,
286,
1077,
2169,
17,
284,
330,
2428,
1110,
8687,
11003,
37254,
286,
1077,
281,
284,
32778,
486,
9163,
34081,
760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hover_struct_has_impl_action() {
check_actions(
r"struct foo<|>() {}",
expect![[r#"
[
Implementaion(
FilePosition {
file_id: FileId(
0,
... | rust_cleaned_test_functions.jsonl/66157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
15126,
21778,
21007,
7931,
368,
341,
286,
1779,
25368,
1006,
310,
435,
80575,
15229,
27,
91,
13555,
4687,
756,
310,
1720,
0,
15505,
81,
2,
698,
394,
2278,
503,
31075,
64,
290,
1006,
664,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty() {
assert_eq!(
params::parse(&generate_tokens(
r#"
()
"#
)),
Ok((
&[] as Tokens,
vec![]
))
);
} | rust_cleaned_test_functions.jsonl/95226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
368,
341,
286,
2060,
10714,
33673,
310,
3628,
486,
6400,
2099,
19366,
28838,
1006,
394,
435,
2,
698,
741,
1843,
330,
4956,
310,
39290,
310,
7622,
94702,
394,
609,
1294,
438,
58166,
345,
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 |
#[test]
fn test_subtraction() {
let mut tmp = LARGEST;
tmp -= &LARGEST;
assert_eq!(tmp, Scalar::zero());
let mut tmp = Scalar::zero();
tmp -= &LARGEST;
let mut tmp2 = MODULUS;
tmp2 -= &LARGEST;
assert_eq!(tmp, tmp2);
} | rust_cleaned_test_functions.jsonl/5580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
26425,
368,
972,
262,
1077,
5206,
4174,
284,
444,
7581,
5177,
463,
262,
4174,
5982,
609,
43,
7581,
5177,
1926,
262,
2060,
10714,
10297,
5173,
11,
35176,
486,
14154,
28958,
262,
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... | 1 |
#[test]
fn test_insensitive_errors() -> Result<(), Box<dyn Error>> {
let facts_dir = Path::new(env!("CARGO_MANIFEST_DIR"))
.join("inputs")
.join("issue-47680")
.join("nll-facts")
.join("main");
println!("facts_dir = {:?}", facts_dir);
let tables = &mut intern::Interne... | rust_cleaned_test_functions.jsonl/119770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34386,
18723,
20196,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
1077,
13064,
4334,
284,
7933,
486,
931,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
5455,
286,
659,
5987,
445,
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... | 2 |
#[test]
fn test_with_var_unset() {
env::set_var("BAR", "foo");
let foo_is_set = env::var("BAR").unwrap();
assert_eq!(foo_is_set, "foo", "`BAR` must be set to \"foo\".");
crate::with_var_unset("BAR", || {
let foo_not_set = env::var("BAR");
assert!(foo_not_... | rust_cleaned_test_functions.jsonl/49882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
4612,
98109,
368,
341,
286,
6105,
486,
746,
4612,
445,
33065,
497,
330,
7975,
797,
286,
1077,
15229,
6892,
2602,
284,
6105,
486,
947,
445,
33065,
1827,
15454,
543,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_statsd_client_histogram_with_tags() {
let client = StatsdClient::from_sink("prefix", NopMetricSink);
let res = client
.histogram_with_tags("some.histo", 27)
.with_tag("host", "www03.example.com")
.with_tag_value("rc1")
.try_send();
... | rust_cleaned_test_functions.jsonl/10599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
68564,
6615,
16333,
368,
341,
286,
1077,
2943,
284,
29927,
67,
2959,
486,
1499,
51567,
445,
11849,
497,
451,
453,
54310,
45094,
317,
286,
1077,
592,
284,
2943,
198,
310,
659,
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... | 1 |
#[test]
fn test_without_ssh_git_and_without_extension_url_parts() {
let RemoteParts { domain, repository } =
get_remote_parts("git@github.com:yoannfleurydev/gitweb").unwrap();
assert_eq!(domain, "github.com");
assert_eq!(repository, "yoannfleurydev/gitweb");
} | rust_cleaned_test_functions.jsonl/87535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39904,
82805,
68801,
8378,
39904,
31035,
2903,
33217,
368,
341,
286,
1077,
20738,
28921,
314,
7947,
11,
12542,
335,
4035,
310,
633,
36425,
33217,
445,
12882,
31,
5204,
905,
25,
16032,
1020,
69,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_literals() {
assert_literal_expression!(r#""hello, world""#, "hello, world");
assert_literal_expression!(r#""hello 123 . AS""#, "hello 123 . AS");
assert_literal_expression!("42", 42);
assert_literal_expression!("4.2", 4.2_f32);
assert_literal_expres... | rust_cleaned_test_functions.jsonl/102629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
49643,
368,
341,
286,
2060,
34100,
28068,
10297,
81,
2,
3014,
14990,
11,
1879,
3014,
60778,
330,
14990,
11,
1879,
797,
286,
2060,
34100,
28068,
10297,
81,
2,
3014,
14990,
220,
16,
17,
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... | 1 |
#[test]
fn test_multicast()
{
let mut server1 = setup_listen_server(SockType::SockRdm);
let mut server2 = setup_listen_server(SockType::SockRdm);
server1.set_sock_non_block().unwrap();
server2.set_sock_non_block().unwrap();
let client = TipcConn::new(SockType::SockRdm).unwrap();
let by... | rust_cleaned_test_functions.jsonl/29799 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
35446,
741,
515,
262,
1077,
5206,
3538,
16,
284,
6505,
79286,
12015,
3759,
1176,
929,
486,
79812,
49,
13849,
317,
262,
1077,
5206,
3538,
17,
284,
6505,
79286,
12015,
3759,
1176,
929,
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_test_msgs_array() -> () {
let mut msg = test_msgs::msg::Arrays::default();
println!("msg: {:?}", msg.string_values);
msg.string_values = vec![
"hej".to_string(), "hopp".to_string(), "stropp".to_string()
];
let msg_native = WrappedNativeMsg::<t... | rust_cleaned_test_functions.jsonl/28025 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4452,
20777,
3858,
368,
1464,
1719,
341,
286,
1077,
5206,
3750,
284,
1273,
20777,
486,
3236,
486,
22182,
486,
2258,
543,
286,
13751,
17223,
3236,
25,
71964,
3750,
4804,
9146,
317,
286,
3750,
4804,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_default() {
let header = Header::default();
assert_eq!(header.version(), Version::default());
assert!(header.sort_order().is_none());
assert!(header.group_order().is_none());
assert!(header.subsort_order().is_none());
assert!(header.fields.is_empty... | rust_cleaned_test_functions.jsonl/14302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
368,
341,
286,
1077,
4247,
284,
12104,
486,
2258,
543,
286,
2060,
10714,
10297,
2708,
19484,
1507,
6079,
486,
2258,
1423,
286,
2060,
10297,
2708,
10614,
7869,
1005,
285,
31488,
1423,
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_match_header_missing_matching() {
let _m = mock("GET", "/")
.match_header("Authorization", Matcher::Missing)
.create();
let (status, _, _) = request("GET /", "");
assert_eq!("HTTP/1.1 200 OK\r\n", status);
} | rust_cleaned_test_functions.jsonl/82377 | {
"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,
10708,
8757,
40447,
70763,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
1138,
286,
659,
6347,
8757,
445,
18124,
497,
60632,
486,
25080,
340,
286,
659,
3182,
1428,
262,
1077,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_set_file_crafted_zero_lamport_account() {
let file = get_append_vec_path("test_append");
let path = &file.path;
let mut av = AppendVec::new(&path, true, 1024 * 1024);
let pubkey = Pubkey::new_rand();
let owner = Pubkey::default();
let data_len = 3... | rust_cleaned_test_functions.jsonl/113891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
2458,
666,
60769,
19359,
907,
309,
403,
13500,
368,
341,
286,
1077,
1034,
284,
633,
26041,
13251,
2638,
445,
1944,
26041,
797,
286,
1077,
1815,
284,
609,
1192,
3875,
280,
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... | 2 |
#[test]
fn test_key_manager_consensus_rotation() {
// Create and launch a local validator swarm of 2 nodes.
let mut env = TestEnvironment::new(2);
env.validator_swarm.launch();
// Create a node config for the key manager by extracting the first node config in the swarm.
let node_config... | rust_cleaned_test_functions.jsonl/62886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
12144,
31971,
13626,
44813,
368,
341,
262,
442,
4230,
323,
7050,
264,
2205,
22935,
60841,
315,
220,
17,
7798,
624,
262,
1077,
5206,
6105,
284,
3393,
12723,
486,
931,
7,
17,
317,
262,
6105,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_particle_system_inheritance() {
let parent = ParticleSystemBuilder::new(BaseBuilder::new())
.with_texture(create_test_texture())
.with_acceleration(Vector3::new(1.0, 0.0, 0.0))
.with_enabled(false)
.build_node();
let mut child = Pa... | rust_cleaned_test_functions.jsonl/107898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70203,
17687,
1243,
62443,
368,
341,
286,
1077,
2681,
284,
35854,
2320,
3297,
486,
931,
22225,
3297,
486,
931,
2398,
310,
659,
4197,
28165,
32602,
4452,
28165,
2398,
310,
659,
4197,
52638,
20927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unnamed_thread() {
thread::spawn(move || {
assert!(thread::current().name().is_none());
})
.join()
.ok()
.expect("thread panicked");
} | rust_cleaned_test_functions.jsonl/44035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
30245,
10814,
368,
341,
262,
4516,
486,
46087,
34081,
1369,
341,
286,
2060,
10297,
4528,
486,
3231,
1005,
606,
1005,
285,
31488,
1423,
262,
2751,
262,
659,
5987,
741,
262,
659,
562,
741,
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
] | 2 |
#[test]
fn test_contains() {
let gil = Python::acquire_gil();
let py = gil.python();
let mut v = HashMap::new();
v.insert(7, 32);
let ob = v.to_object(py);
let dict = <PyDict as PyTryFrom>::try_from(ob.as_ref(py)).unwrap();
assert_eq!(true, dict.contains(7... | rust_cleaned_test_functions.jsonl/87934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
5206,
348,
284,
10528,
486,
931,
543,
286,
348,
7030,
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_cd_html_color_flag_dark_false() {
let actual = nu!(
cwd: ".", pipeline(
r#"
cd --help | to html --html-color
"#
)
);
assert_eq!(
actual.out,
r"<html><style>body { background-color:white;color:black; }</style><bod... | rust_cleaned_test_functions.jsonl/71 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43074,
9564,
6714,
10933,
67937,
36015,
368,
341,
262,
1077,
5042,
284,
10908,
33673,
286,
46938,
25,
68514,
15301,
1006,
310,
435,
2,
698,
394,
15307,
1177,
8653,
760,
311,
5272,
1177,
1551,
7889... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_font_config_default() {
let sys_font_config = sys_font_config_default();
let font_config = FontConfig::default();
assert_eq!(font_config.size_pixels, sys_font_config.SizePixels);
assert_eq!(font_config.oversample_h, sys_font_config.OversampleH);
assert_eq!(font_config.oversam... | rust_cleaned_test_functions.jsonl/76984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 571
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17451,
5332,
9993,
368,
341,
262,
1077,
5708,
17451,
5332,
284,
5708,
17451,
5332,
9993,
543,
262,
1077,
3301,
5332,
284,
9562,
2648,
486,
2258,
543,
262,
2060,
10714,
10297,
4026,
5332,
2486,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deep_nesting_repeated() {
fn build_and_roundtrip(depth: usize) -> Result<(), prost::DecodeError> {
use crate::nesting::C;
let mut c = C::default();
for _ in 0..depth {
let mut next = C::default();
next.r.push(c);
... | rust_cleaned_test_functions.jsonl/8855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87044,
1089,
59855,
1288,
41954,
368,
341,
286,
5168,
1936,
8378,
29896,
32981,
53675,
25,
22301,
8,
1464,
5714,
68843,
35221,
486,
32564,
1454,
29,
341,
310,
990,
17717,
486,
21414,
287,
486,
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... | 2 |
#[test]
fn test_initial_angle() {
assert_eq!(LevyCCurve::new(0).initial_rad(), 0.0);
assert_eq!(LevyCCurve::new(1).initial_rad(), 0.0);
assert_eq!(LevyCCurve::new(2).initial_rad(), 0.0);
} | rust_cleaned_test_functions.jsonl/18951 | {
"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,
15809,
21727,
368,
341,
286,
2060,
10714,
10297,
2304,
13714,
3706,
73047,
486,
931,
7,
15,
568,
9426,
39764,
1507,
220,
15,
13,
15,
317,
286,
2060,
10714,
10297,
2304,
13714,
3706,
73047,
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_primitive_array_abs_f64() {
let a = Float64Array::from(vec![-5.2, -6.1, 7.3, -8.6, -0.0]);
let c: &PrimitiveArray<Float64Type> = &ScalarFunctions::abs(vec![&a]).unwrap()[0];
assert_eq!(5.2, c.value(0));
assert_eq!(6.1, c.value(1));
assert_eq!(7.3, c.value(... | rust_cleaned_test_functions.jsonl/96114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
31170,
761,
21,
19,
368,
341,
286,
1077,
264,
284,
13001,
21,
19,
1857,
486,
1499,
25592,
0,
7609,
20,
13,
17,
11,
481,
21,
13,
16,
11,
220,
22,
13,
18,
11,
481,
23,
13,
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... | 1 |
#[test]
fn test_counter_vec_with_labels() {
let vec = CounterVec::new(
Opts::new("test_couter_vec", "test counter vec help"),
&["l1", "l2"],
)
.unwrap();
let mut labels = HashMap::new();
labels.insert("l1", "v1");
labels.insert("l2", "v2")... | rust_cleaned_test_functions.jsonl/46519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15730,
13251,
6615,
14547,
368,
341,
286,
1077,
7486,
284,
19735,
10050,
486,
931,
1006,
310,
506,
12754,
486,
931,
445,
1944,
666,
2676,
13251,
497,
330,
1944,
5546,
7486,
1492,
4461,
310,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_authentication() {
let keypair: KeyPair = generate_testkey();
let document: IotaDocument = IotaDocument::from_keypair(&keypair).unwrap();
assert!(IotaDocument::check_authentication(document.authentication()).is_ok());
} | rust_cleaned_test_functions.jsonl/84336 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89465,
368,
341,
262,
1077,
1376,
12670,
25,
5309,
12443,
284,
6923,
4452,
792,
543,
262,
1077,
2197,
25,
358,
6089,
7524,
284,
358,
6089,
7524,
486,
1499,
3097,
12670,
2099,
792,
12670,
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 |
#[test]
fn test_noninterference() {
let input = ParseBlock::from(
&[
ParseStatement::AddToInto(
nat(42),
ParseIdent::Static(2),
ParseIdent::Dynamic(DynamicIdent::Named("A".into())),
),
... | rust_cleaned_test_functions.jsonl/119137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
2245,
2202,
368,
341,
286,
1077,
1946,
284,
14775,
4713,
486,
1499,
1006,
310,
609,
9640,
394,
14775,
8636,
486,
2212,
1249,
26591,
1006,
503,
17588,
7,
19,
17,
1326,
503,
14775,
28301,
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... | 1 |
#[test]
fn test_legal_moves_banmen_with_fu_nari_border_gote() {
let answer:Vec<((u32,u32),(u32,u32,bool),Option<ObtainKind>)> = vec![
((4,3),(4,2,true),Some(ObtainKind::Fu)),
((4,3),(4,2,false),Some(ObtainKind::Fu)),
];
let answer = answer.into_iter().map(|m| {
match m {
((sx,sy),(dx,dy,nar... | rust_cleaned_test_functions.jsonl/81086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
36467,
1089,
2780,
31940,
1889,
1272,
368,
972,
10217,
4226,
25,
10050,
27,
1188,
84,
18,
17,
36883,
18,
17,
23547,
84,
18,
17,
36883,
18,
17,
63634,
701,
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... | 3 |
#[test]
fn test_add_const() {
let conn = Connection::open_in_memory().unwrap();
create_table(&conn).unwrap();
insert(&conn, 123, ["Foo".to_string()].iter().cloned()).unwrap();
} | rust_cleaned_test_functions.jsonl/67542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
13610,
368,
341,
286,
1077,
4534,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
1855,
5237,
2099,
5148,
568,
15454,
543,
286,
5656,
2099,
5148,
11,
220,
16,
17,
18,
11,
4383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_client_terminates() {
crate::logger::init_log();
let mut handler = IoHandler::new();
handler.add_method("add", |params: Params| {
let (a, b) = params.parse::<(u64, u64)>()?;
let res = a + b;
Ok(jsonrpc_core::to_value(res).unwrap())
});
let (client, rpc_client) = local::connec... | rust_cleaned_test_functions.jsonl/108270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8179,
62,
22969,
973,
368,
341,
197,
1444,
7698,
486,
9786,
486,
2327,
5224,
543,
197,
10217,
5206,
7013,
284,
29655,
3050,
486,
931,
543,
197,
53326,
1364,
9032,
445,
718,
497,
760,
3519,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bit_neg() {
let cases = vec![
(Some(123), Some(-124)),
(Some(-123), Some(122)),
(Some(0), Some(-1)),
(None, None),
];
for (arg, expected) in cases {
let output = RpnFnScalarEvaluator::new()
.push_... | rust_cleaned_test_functions.jsonl/29756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
28209,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
8373,
7,
16,
17,
18,
701,
4329,
4080,
16,
17,
19,
6965,
310,
320,
8373,
4080,
16,
17,
18,
701,
4329,
7,
16,
17,
17,
696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_login() {
let conn = PgConnection::establish(&TEST_DATABASE_URL)
.expect(&format!("Error connecting to {}", TEST_DATABASE_URL));
let seed_result = seed::user_journey(&conn);
let l = request::Login {
eth_address: seed_result.eth_address.unwrap(),
... | rust_cleaned_test_functions.jsonl/123719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13681,
368,
341,
286,
1077,
4534,
284,
97265,
4526,
486,
33400,
2099,
10033,
45510,
8000,
340,
310,
659,
17119,
2099,
2243,
17223,
1454,
20913,
311,
24689,
13602,
45510,
8000,
3237,
286,
1077,
10320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iterate_into_string() {
let words = vec!["hello", " ", "world"];
let capitalized_words = words
.iter()
.map(|word| capitalize_first(word))
.collect::<String>();
... | rust_cleaned_test_functions.jsonl/39028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
45514,
3904,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
3670,
330,
14615,
6332,
286,
1077,
97321,
18981,
284,
4244,
2303,
1920,
659,
2015,
741,
1920,
659,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rerandomize_scalar() {
let fv = FV::<Scalar>::default_2048();
let (pk, sk) = fv.generate_keypair();
let v = vec![0; fv.n];
let mut ct = fv.encrypt(&v, &pk);
fv.rerandomize(&mut ct, &pk);
let pt_actual: Vec<u8> = fv.decrypt(&ct, &sk);
... | rust_cleaned_test_functions.jsonl/103690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
261,
2206,
551,
41652,
368,
341,
286,
1077,
61654,
284,
434,
53,
27638,
20639,
6831,
2258,
62,
17,
15,
19,
23,
1428,
286,
1077,
320,
20819,
11,
1901,
8,
284,
61654,
22019,
3097,
12670,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slice() {
let mut runtime = Runtime::new().unwrap();
let handshake = connect("user=postgres");
let (mut client, connection) = runtime.block_on(handshake).unwrap();
let connection = connection.map_err(|e| panic!("{}", e));
runtime.spawn(connection);
let batch = client
... | rust_cleaned_test_functions.jsonl/127922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
262,
1077,
5206,
15592,
284,
10954,
486,
931,
1005,
15454,
1428,
262,
1077,
57020,
284,
4564,
445,
872,
28,
43070,
797,
262,
1077,
320,
6984,
2943,
11,
3633,
8,
284,
15592,
1569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sub() {
test_op!(_05_05i - _05_05i, _0_0i);
test_op!(_0_1i - _1_0i, _neg1_1i);
test_op!(_0_1i - _neg1_1i, _1_0i);
for &c in all_consts.iter() {
test_op!(c - _0_0i, c);
test_op!(c - c, _0_0i);
}
} | rust_cleaned_test_functions.jsonl/105708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
341,
310,
1273,
10287,
0,
2490,
15,
20,
62,
15,
20,
72,
481,
716,
15,
20,
62,
15,
20,
72,
11,
716,
15,
62,
15,
72,
317,
310,
1273,
10287,
0,
2490,
15,
62,
16,
72,
481,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_varieties() {
fn assert_send<T: Send>() { }
fn assert_sync<T: Sync>() { }
fn assert_clone<T: Clone>() { }
fn assert_debug<T: ::std::fmt::Debug>() { }
assert_send::<Map<dyn Any + Send>>();
assert_send::<Map<dyn Any + Send + Sync>>();
assert_... | rust_cleaned_test_functions.jsonl/131795 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
31506,
368,
341,
286,
5168,
2060,
13565,
3125,
25,
11000,
13555,
314,
456,
286,
5168,
2060,
23008,
3125,
25,
28937,
13555,
314,
456,
286,
5168,
2060,
54742,
3125,
25,
27913,
13555,
314,
456,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_roundtrip_f32() {
// This number has 1 ULP error if parsed via f64 and converted to f32.
// https://github.com/serde-rs/json/pull/671#issuecomment-628534468
let float = 7.038531e-26;
let json = serde_json::to_string(&float).unwrap();
let output: f32 = serde_json::from_str(&js... | rust_cleaned_test_functions.jsonl/95980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
761,
18,
17,
368,
341,
262,
442,
1096,
1372,
702,
220,
16,
547,
12567,
1465,
421,
15676,
4566,
282,
21,
19,
323,
16099,
311,
282,
18,
17,
624,
262,
442,
3703,
1110,
5204,
905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extent_kind_info_to_kind() {
assert_eq!(
ExtentKindInfo::new(ExtentKind::Unmmapped).to_kind().unwrap(),
ExtentKind::Unmmapped
);
assert_eq!(ExtentKindInfo::new(ExtentKind::Unused).to_kind().unwrap(), ExtentKind::Unused);
assert_eq!(ExtentKi... | rust_cleaned_test_functions.jsonl/51123 | {
"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,
70102,
33162,
3109,
2346,
33162,
368,
341,
286,
2060,
10714,
33673,
310,
9447,
306,
10629,
1731,
486,
931,
7,
49818,
10629,
486,
1806,
3821,
5677,
568,
983,
33162,
1005,
15454,
3148,
310,
9447,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_function_with_args() {
test_walk(
"(a=1) => a",
vec![
"File",
"ExprStmt",
"FunctionExpr",
"Property",
"Identifier",
"IntegerLit",
"Identifier",
],
)
} | rust_cleaned_test_functions.jsonl/133848 | {
"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,
9174,
6615,
8384,
368,
341,
262,
1273,
56131,
1006,
286,
11993,
64,
28,
16,
8,
589,
264,
756,
286,
7486,
90515,
310,
330,
1703,
756,
310,
330,
16041,
31063,
756,
310,
330,
5152,
16041,
756,
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_fn_signature_with_docs() {
check(
r#"
/// Adds one to the number given.
///
/// # Examples
///
/// ```
/// let five = 5;
///
/// assert_eq!(6, my_crate::add_one(5));
/// ```
pub fn add_one(x: i32) -> i32 {
x + 1
}
pub fn do() {
add_one(<|>
}"#,
expect![[r... | rust_cleaned_test_functions.jsonl/21226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
6615,
49692,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2575,
24475,
825,
311,
279,
1372,
2661,
624,
15374,
2575,
671,
25311,
198,
15374,
2575,
41233,
2575,
1077,
4236,
284,
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_printf_paths() {
let file_info = get_dir_entry_for("test_data/simple", "abbbc");
let deps = FakeDependencies::new();
let matcher = Printf::new("%h %H %p %P").unwrap();
assert!(matcher.matches(&file_info, &mut deps.new_matcher_io()));
assert_eq!(
... | rust_cleaned_test_functions.jsonl/69247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21823,
24152,
368,
341,
286,
1077,
1034,
3109,
284,
633,
4334,
9078,
5478,
445,
1944,
1769,
67195,
497,
330,
370,
84185,
797,
286,
1077,
48178,
284,
36965,
48303,
486,
931,
1428,
286,
1077,
36052,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_query_user_groups() {
let query = SubspacesQuery::UserGroups {
subspace_id: Uint64::new(1),
pagination: Default::default(),
};
let response = mock_subspaces_query_response(&query);
let expected = to_binary(&QueryUserGroupsResponse {
... | rust_cleaned_test_functions.jsonl/109485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
3317,
21148,
368,
341,
286,
1077,
3239,
284,
3719,
44285,
2859,
486,
1474,
22173,
341,
310,
5147,
1306,
842,
25,
27883,
21,
19,
486,
931,
7,
16,
1326,
310,
28495,
25,
7899,
486,
2258,
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_bank_forks_snapshot_n() {
// create banks upto slot 4 and create 1 new account in each bank. test that bank 4 snapshots
// and restores correctly
run_bank_forks_snapshot_n(
4,
|bank, mint_keypair| {
let key1 = Keypair::new().pubkey(... | rust_cleaned_test_functions.jsonl/95239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
761,
73302,
53265,
1089,
368,
341,
286,
442,
1855,
13959,
80126,
9446,
220,
19,
323,
1855,
220,
16,
501,
2692,
304,
1817,
6073,
13,
1273,
429,
6073,
220,
19,
61823,
198,
286,
442,
323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hasher_256() {
let mut hasher = Sha3_256::default();
hasher.update(b"hello world");
let digest = hasher.finalize();
let hash = Code::Sha3_256.wrap(digest).unwrap();
let hash2 = Code::Sha3_256.digest(b"hello world");
assert_eq!(hash.code(), u64::fro... | rust_cleaned_test_functions.jsonl/109191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
261,
62,
17,
20,
21,
368,
341,
286,
1077,
5206,
90819,
284,
27970,
18,
62,
17,
20,
21,
486,
2258,
543,
286,
90819,
5317,
1883,
1,
14990,
1879,
797,
286,
1077,
20882,
284,
90819,
43880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_checksum() {
assert_eq!(checksum(&b"00"[..]), Done(&b""[..], 0));
assert_eq!(checksum(&b"a1"[..]), Done(&b""[..], 0xa1));
assert_eq!(checksum(&b"1d"[..]), Done(&b""[..], 0x1d));
assert_eq!(checksum(&b"ff"[..]), Done(&b""[..], 0xff));
} | rust_cleaned_test_functions.jsonl/40102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64038,
368,
341,
262,
2060,
10714,
10297,
70740,
2099,
65,
1,
15,
15,
36864,
496,
9719,
27357,
2099,
65,
3014,
95874,
1125,
220,
15,
1106,
262,
2060,
10714,
10297,
70740,
2099,
65,
56693,
16,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_debug_expression_jump_target() {
let m1 = JumpTargetMarker::new();
let m2 = JumpTargetMarker::new();
assert!(m1 != m2);
assert!(m1 == m1.clone());
assert!(m1.0 != m2.0);
} | rust_cleaned_test_functions.jsonl/7225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
28068,
65436,
11123,
368,
341,
286,
1077,
296,
16,
284,
28788,
6397,
20613,
486,
931,
543,
286,
1077,
296,
17,
284,
28788,
6397,
20613,
486,
931,
543,
286,
2060,
10297,
76,
16,
961,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ord() {
let small = Some(1.0f64);
let big = Some(5.0f64);
let nan = Some(0.0f64/0.0);
assert!(!(nan < big));
assert!(!(nan > big));
assert!(small < big);
assert!(None < big);
assert!(big > None);
} | rust_cleaned_test_functions.jsonl/20245 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67324,
368,
341,
262,
1077,
2613,
284,
4329,
7,
16,
13,
15,
69,
21,
19,
317,
262,
1077,
2409,
284,
4329,
7,
20,
13,
15,
69,
21,
19,
317,
262,
1077,
20021,
284,
4329,
7,
15,
13,
15,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gen_snapshot_meta() {
let mut cf_file = Vec::with_capacity(super::SNAPSHOT_CFS.len());
for (i, cf) in super::SNAPSHOT_CFS.iter().enumerate() {
let f = super::CfFile {
cf,
size: 100 * (i + 1) as u64,
checksum: 1000 * (i +... | rust_cleaned_test_functions.jsonl/9593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 899
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
53265,
13381,
368,
341,
286,
1077,
5206,
24111,
2458,
284,
11312,
486,
4197,
35603,
56040,
486,
18966,
66648,
920,
8485,
19406,
1423,
286,
369,
320,
72,
11,
24111,
8,
304,
2256,
486,
18966,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_resolve_with_import_map() {
let (sources, location) = setup();
let import_map_json = json!({
"imports": {
"mylib": "https://deno.land/x/myLib/index.js"
}
});
let import_map = ImportMap::from_json(
"https://deno.land/x/",
&import_map_json.to_string(... | rust_cleaned_test_functions.jsonl/14298 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
6615,
18434,
5376,
368,
341,
262,
1077,
320,
39651,
11,
3728,
8,
284,
6505,
543,
262,
1077,
1159,
5376,
9455,
284,
2951,
0,
2262,
414,
330,
62888,
788,
341,
286,
330,
2408,
2740,
788,
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_to_log_prob() {
let mut a = vec![("".to_string(), 1.0), ("".to_string(), 2.0)];
to_log_prob(&mut a);
let scores = a.iter().map(|(_, score)| *score).collect::<Vec<_>>();
assert_approx_eq!(scores[0], -1.098, 0.01);
assert_approx_eq!(scores[... | rust_cleaned_test_functions.jsonl/18989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
5224,
20794,
368,
341,
286,
1077,
5206,
264,
284,
7486,
20703,
445,
3263,
983,
3904,
1507,
220,
16,
13,
15,
701,
320,
69355,
983,
3904,
1507,
220,
17,
13,
15,
12587,
286,
311,
5224,
2079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_weighted_delay_until_trigger() {
let trigger = PeriodicTrigger::new(10);
// Find the max delay before we fire.
let mut max_delay = 0;
for _ in 0..200 {
let mut triggered = false;
for i in 1..=5 {
triggered = trigger.weighted_event(2);
if t... | rust_cleaned_test_functions.jsonl/63853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
22198,
44352,
32925,
368,
341,
262,
1077,
8183,
284,
25492,
292,
17939,
486,
931,
7,
16,
15,
626,
262,
442,
7379,
279,
1932,
7626,
1573,
582,
3940,
624,
262,
1077,
5206,
1932,
22198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_substring_3_args() {
let cases = vec![
(
Some("Quadratically".as_bytes().to_vec()),
Some(5),
Some(6),
Some("ratica".as_bytes().to_vec()),
),
(
Some("Sakila".as_bytes().to_v... | rust_cleaned_test_functions.jsonl/19772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
917,
62,
18,
8384,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
4329,
445,
2183,
14666,
7022,
3263,
300,
12524,
1005,
983,
13251,
14702,
394,
4329,
7,
20,
1326,
394,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_version_parse() {
check_terse_parse! {
"rustc 1.18.0" => "1.18.0", None,
"rustc 1.8.0" => "1.8.0", None,
"rustc 1.20.0-nightly" => "1.20.0-nightly", None,
"rustc 1.20" => "1.20", None,
"rustc 1.3" => "1.3", None,
"ru... | rust_cleaned_test_functions.jsonl/79904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
21039,
368,
341,
286,
1779,
72493,
325,
21039,
0,
341,
310,
330,
35788,
66,
220,
16,
13,
16,
23,
13,
15,
1,
589,
330,
16,
13,
16,
23,
13,
15,
497,
2240,
345,
310,
330,
35788,
66,
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_cycle_breaker() {
let mut context = OfflineAudioContext::new(
1,
RENDER_QUANTUM_SIZE * 3,
SampleRate(RENDER_QUANTUM_SIZE as _),
);
{
let delay = context.create_delay(1.);
delay.delay_time().set_value(1.);
delay.connect(&context.destina... | rust_cleaned_test_functions.jsonl/95489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39079,
39494,
261,
368,
341,
262,
1077,
5206,
2266,
284,
66370,
14755,
1972,
486,
931,
1006,
286,
220,
16,
345,
286,
91788,
16332,
2821,
2794,
4098,
353,
220,
18,
345,
286,
19143,
11564,
43202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_delimiter_to_si() {
new_ucmd!()
.args(&["-d=,", "--to=si"])
.pipe_in("1234,56")
.succeeds()
.stdout_only("1.3K,56\n");
} | rust_cleaned_test_functions.jsonl/46027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18029,
17700,
2346,
40983,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
67,
28,
57955,
14482,
983,
28,
6321,
14108,
286,
659,
13768,
1243,
445,
16,
17,
18,
19,
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_reset_current() {
let ledger_path = get_tmp_ledger_path!();
{
let blocktree =
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger");
let (mut poh_recorder, _entry_receiver) = PohRecorder::new(
0... | rust_cleaned_test_functions.jsonl/113798 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 596
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18983,
11080,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
9344,
4035,
394,
8362,
9344,
486,
2508,
2099,
50704,
2638,
568,
17119,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mask_str2bit_count() {
assert!(mask_str2bit_count("00000000,00000001").is_ok());
let res = mask_str2bit_count("00000000,00000000");
assert!(
res.is_err()
&& format!("{}", res.unwrap_err())
== "Invalid \"Shared Cpu Map\" cac... | rust_cleaned_test_functions.jsonl/125482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9999,
2895,
17,
4489,
3180,
368,
341,
286,
2060,
10297,
11258,
2895,
17,
4489,
3180,
445,
15,
15,
15,
15,
15,
15,
15,
15,
11,
15,
15,
15,
15,
15,
15,
15,
16,
1827,
285,
19817,
1423,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_latest_matching_installation() {
let versions = ["0.4.24", "0.5.1", "0.5.2"]
.iter()
.map(|version| Version::from_str(version).unwrap())
.collect::<Vec<_>>();
let required = VersionReq::from_str(">=0.4.24").unwrap();
let got = So... | rust_cleaned_test_functions.jsonl/50531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
64880,
70763,
34245,
367,
368,
341,
286,
1077,
10795,
284,
4383,
15,
13,
19,
13,
17,
19,
497,
330,
15,
13,
20,
13,
16,
497,
330,
15,
13,
20,
13,
17,
7026,
310,
659,
2015,
741,
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,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_api_error_display() {
assert_eq!(format!("{}", AppError::Api("An error".to_owned())), format!("{} An error", Red.bold().paint("[ApiError]")));
} | rust_cleaned_test_functions.jsonl/63282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11697,
4096,
14825,
368,
341,
286,
2060,
10714,
10297,
2243,
79878,
1845,
1454,
486,
6563,
445,
2082,
1465,
3263,
983,
51973,
96501,
3561,
17223,
6257,
1527,
1465,
497,
3731,
31675,
1005,
33617,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_request_neb() {
let msg = InstantiateMsg {
owner: h(OWNER),
nebula_token: h(NEB_TOKEN),
};
let info = mock_info(OWNER, &[]);
let mut deps = mock_dependencies(&[]);
let _res = instantiate(deps.as_mut(), mock_env(), info, msg)
.expect("contract successf... | rust_cleaned_test_functions.jsonl/76312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
13925,
65,
368,
341,
262,
1077,
3750,
284,
32288,
6611,
341,
286,
6372,
25,
305,
7,
99031,
1326,
286,
80867,
5607,
6458,
25,
305,
7,
3944,
33,
18681,
1326,
262,
3634,
262,
1077,
3546,
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... | 1 |
#[test]
fn test_type_ftv() {
let t = types!(Var, a);
let s = HashSet::singleton(String::from("a"));
assert_eq!(t.ftv(), s);
let t = Type::Int;
assert_eq!(t.ftv(), HashSet::new());
let t = types!(Fun, Type::Int, types!(Var, a));
let s = HashSet::singleton... | rust_cleaned_test_functions.jsonl/125808 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
41572,
85,
368,
341,
286,
1077,
259,
284,
4494,
10297,
3962,
11,
264,
317,
286,
1077,
274,
284,
18931,
486,
59915,
2242,
486,
1499,
445,
64,
4010,
286,
2060,
10714,
10297,
83,
53823,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_message_event_orderings() {
let message_event_a: OperatorEvent = OperatorEvent::new(
Timestamp::new(vec![1]),
false,
0,
HashSet::new(),
HashSet::new(),
|| (),
);
let message_event_b: OperatorEvent = O... | rust_cleaned_test_functions.jsonl/24874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 542
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
6748,
7869,
819,
368,
341,
286,
1077,
1943,
6748,
4306,
25,
28498,
1556,
284,
28498,
1556,
486,
931,
1006,
310,
32758,
486,
931,
25592,
20703,
16,
17036,
310,
895,
345,
310,
220,
15,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bitpacking_reader_empty() {
// Same as the normal bitpacking test
// but with some additional empty reads.
// This is expected to happen by the vorbis spec.
// decode at first position may be 0 bit long (if there
let test_arr = &[0b11111100, 0b01001000, 0b11001110, 0b00000110];
let ... | rust_cleaned_test_functions.jsonl/33433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
95124,
22306,
15124,
368,
341,
197,
322,
25739,
438,
279,
4622,
2699,
95124,
1273,
198,
197,
322,
714,
448,
1045,
5107,
4287,
15804,
624,
1572,
197,
322,
1096,
374,
3601,
311,
3537,
553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_double_map_err() {
parse(
SourceId::none(),
r#"
mod swig_foreign_types_map {}
mod swig_foreign_types_map {}
"#,
64,
FxHashMap::default(),
)
.unwrap_err();
} | rust_cleaned_test_functions.jsonl/18728 | {
"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,
24598,
5376,
9266,
368,
341,
286,
4715,
1006,
310,
8748,
764,
486,
6697,
3148,
310,
435,
2,
698,
2593,
2021,
343,
78983,
9763,
5376,
5613,
2593,
2021,
343,
78983,
9763,
5376,
5613,
57676,
345,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.