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_extract_version_number() {
let tag = "v0.13-4-g58738c0";
assert_eq!(13u32, extract_local_version_number(tag));
let tag = "v0.13";
assert_eq!(13u32, extract_local_version_number(tag));
} | rust_cleaned_test_functions.jsonl/60759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
9438,
5500,
368,
341,
286,
1077,
4772,
284,
330,
85,
15,
13,
16,
18,
12,
19,
2371,
20,
23,
22,
18,
23,
66,
15,
876,
286,
2060,
10714,
10297,
16,
18,
84,
18,
17,
11,
8649,
13564,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ser_de_empty() {
let vec = ArrayVec::<[u32; 0]>::new();
assert_tokens(&vec, &[
Token::Seq { len: Some(0) },
Token::SeqEnd,
]);
} | rust_cleaned_test_functions.jsonl/67020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
2259,
15124,
368,
341,
286,
1077,
7486,
284,
2910,
10050,
27638,
58,
84,
18,
17,
26,
220,
15,
60,
6831,
931,
1428,
286,
2060,
28838,
2099,
4083,
11,
609,
9640,
310,
9660,
486,
20183,
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 |
#[test]
fn test_unrecognized_file_type_with_theme() {
let options = get_command_line_options();
let input = ADDED_FILE_INPUT.replace("a.py", "a");
let output = get_line_of_code_from_delta(&input, &options);
assert_has_color_other_than_plus_color(&output, &option... | rust_cleaned_test_functions.jsonl/61840 | {
"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,
4907,
46067,
2458,
1819,
6615,
19864,
368,
341,
16885,
286,
1077,
2606,
284,
633,
10811,
6528,
8743,
543,
286,
1077,
1946,
284,
9630,
11490,
8087,
21022,
6980,
445,
64,
7197,
497,
330,
64,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_look_at() {
let eye = Point3::new(0.0f64, 0.0, -5.0);
let center = Point3::new(0.0f64, 0.0, 0.0);
let up = Vector3::new(1.0f64, 0.0, 0.0);
let t: Decomposed<Vector3<f64>, Quaternion<f64>> = Transform::look_at(eye, center, up);
let point = Point3::new(1.0f64, 0.0, 0.0);
le... | rust_cleaned_test_functions.jsonl/86461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24271,
3752,
368,
341,
262,
1077,
7912,
284,
5126,
18,
486,
931,
7,
15,
13,
15,
69,
21,
19,
11,
220,
15,
13,
15,
11,
481,
20,
13,
15,
317,
262,
1077,
4126,
284,
5126,
18,
486,
931,
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_find_st() {
use super::find_st2;
let string_to_find = "foobar.txt".to_string();
let v = find_st2(string_to_find);
assert_eq!(v, ["./temp/temp/temp/foobar.txt", "./temp/fooBAR.txt", "./foobar.txt"])
} | rust_cleaned_test_functions.jsonl/54496 | {
"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,
21814,
1261,
368,
341,
286,
990,
2256,
486,
3903,
1261,
17,
280,
286,
1077,
914,
2346,
21814,
284,
330,
50267,
3909,
3263,
983,
3904,
1428,
286,
1077,
348,
284,
1477,
1261,
17,
3609,
2346,
21814... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_handle_images_json_get() {
let mut tmp_path = std::env::temp_dir();
tmp_path.push("test-get-ckenvthslc");
let _ = std::fs::remove_dir_all(&tmp_path);
std::fs::create_dir_all(&tmp_path).unwrap();
let response = super::handle_images_json_get(&tmp_path.to_st... | rust_cleaned_test_functions.jsonl/132616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
13283,
9455,
3062,
368,
341,
286,
1077,
5206,
4174,
2638,
284,
1460,
486,
3160,
486,
3888,
4334,
543,
286,
4174,
2638,
2552,
445,
1944,
22491,
12,
377,
3160,
339,
3226,
66,
797,
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_pack_bits_by_word() {
let data = [true, true, false, true, false, false];
let ret = [0b00001011u8];
let buf = pack_bits_by_word(&data);
assert_eq!(buf.as_slice(), ret)
} | rust_cleaned_test_functions.jsonl/62510 | {
"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,
32995,
20034,
3710,
13533,
368,
341,
286,
1077,
821,
284,
508,
1866,
11,
830,
11,
895,
11,
830,
11,
895,
11,
895,
935,
286,
1077,
2112,
284,
508,
15,
65,
15,
15,
15,
15,
16,
15,
16,
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_num_equals() {
let mut cs = TestConstraintSystem::<Bls12>::new();
let a = AllocatedNum::alloc(cs.namespace(|| "a"), || Ok(Fr::from_str("10").unwrap())).unwrap();
let b = AllocatedNum::alloc(cs.namespace(|| "b"), || Ok(Fr::from_str("12").unwrap())).unwrap();
let c... | rust_cleaned_test_functions.jsonl/39692 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4273,
61664,
368,
341,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
27638,
33,
4730,
16,
17,
6831,
931,
1428,
286,
1077,
264,
284,
1674,
39463,
4651,
486,
4742,
41153,
50409,
79453,
330,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_powf() {
let nan: f32 = f32::NAN;
let inf: f32 = f32::INFINITY;
let neg_inf: f32 = f32::NEG_INFINITY;
assert_eq!(1.0f32.powf(1.0), 1.0);
assert_approx_eq!(3.4f32.powf(4.5), 246.408218);
assert_approx_eq!(2.7f32.powf(-3.2), 0.041652);
assert... | rust_cleaned_test_functions.jsonl/8117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56183,
69,
368,
341,
286,
1077,
20021,
25,
282,
18,
17,
284,
282,
18,
17,
486,
45,
1093,
280,
286,
1077,
4132,
25,
282,
18,
17,
284,
282,
18,
17,
486,
687,
55990,
280,
286,
1077,
4184,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extract_var_expr_stmt() {
cov_mark::check!(test_extract_var_expr_stmt);
check_assist(
extract_variable,
r#"
fn foo() {
$01 + 1$0;
}"#,
r#"
fn foo() {
let $0var_name = 1 + 1;
}"#,
);
check_assist(
extract_vari... | rust_cleaned_test_functions.jsonl/132830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
4612,
21915,
21824,
368,
341,
286,
21836,
18924,
486,
2028,
10297,
1944,
39123,
4612,
21915,
21824,
317,
286,
1779,
12083,
380,
1006,
310,
8649,
14635,
345,
310,
435,
2,
698,
8822,
15229,
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_parse_header_errors() -> Result<()> {
let headers = headers();
match parse_header::<i64>(&headers, "x-bad-num").unwrap_err() {
Error::Http(x) => match *x {
HttpError::RateLimitI64F64 => assert!(true),
_ => assert!(false),
}... | rust_cleaned_test_functions.jsonl/27073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8757,
20196,
368,
1464,
5714,
71698,
341,
286,
1077,
7102,
284,
7102,
1428,
286,
2432,
4715,
8757,
27638,
72,
21,
19,
44784,
7713,
11,
330,
87,
1455,
329,
31194,
1827,
15454,
9266,
368,
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... | 5 |
#[test]
fn test_several_widths() {
for width in 65000..65535 - 127 {
let _keyboard = KeyboardBuilder::new()
.set_most_left_right_white_keys(0, 127)
.unwrap()
.set_width(width)
.unwrap()
.build2d();
}
... | rust_cleaned_test_functions.jsonl/81981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
17539,
7927,
82,
368,
341,
286,
369,
2374,
304,
220,
21,
20,
15,
15,
15,
496,
21,
20,
20,
18,
20,
481,
220,
16,
17,
22,
341,
310,
1077,
716,
41713,
284,
25616,
3297,
486,
931,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_map_file_extension_media_type_with_extension() {
assert_eq!(
map_content_type(Path::new("foo/bar.ts"), Some("text/plain")),
msg::MediaType::TypeScript
);
assert_eq!(
map_content_type(Path::new("foo/bar.ts"), Some("foo/bar")),
msg::MediaType::Unknown
);
... | rust_cleaned_test_functions.jsonl/16769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 918
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
2458,
31035,
29173,
1819,
6615,
31035,
368,
341,
262,
2060,
10714,
33673,
414,
2415,
7495,
1819,
33030,
486,
931,
445,
7975,
49513,
21288,
3975,
4329,
445,
1318,
36971,
30154,
414,
3750,
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_storage_cache_entry() {
let mut cache = EntryCache::default();
let ents = vec![
new_entry(3, 3),
new_entry(4, 4),
new_entry(5, 4),
new_entry(6, 6),
];
cache.append("", &ents);
assert!(cache.entry(1).is_none()... | rust_cleaned_test_functions.jsonl/12748 | {
"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,
23310,
11529,
9078,
368,
341,
286,
1077,
5206,
6500,
284,
15788,
8233,
486,
2258,
543,
286,
1077,
36852,
284,
7486,
90515,
310,
501,
9078,
7,
18,
11,
220,
18,
1326,
310,
501,
9078,
7,
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... | 3 |
#[test]
fn test_update_ready_single_wave() {
let time = test_time();
let mut update = test_update();
update.waves.insert(0, time);
update
.waves
.insert(MAX_SEED, time + Duration::milliseconds(MAX_SEED as i64));
... | rust_cleaned_test_functions.jsonl/49366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 593
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
35456,
19487,
60063,
368,
341,
286,
1077,
882,
284,
1273,
3009,
543,
286,
1077,
5206,
2647,
284,
1273,
8882,
543,
16885,
16885,
286,
2647,
1418,
4693,
7030,
7,
15,
11,
882,
317,
286,
2647,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compress() {
new_ucmd!()
.args(&[
"ext_sort.txt",
"-n",
"--compress-program",
"gzip",
"-S",
"10",
])
.succeeds()
.stdout_only_fixture("ext_sort.expected");
} | rust_cleaned_test_functions.jsonl/20533 | {
"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,
87845,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
9640,
310,
330,
427,
18435,
3909,
756,
310,
6523,
77,
756,
310,
14482,
38360,
66020,
756,
310,
330,
70996,
756,
310,
6523,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chunked_pop_chunk() {
let mut chunks = ChunkedVec::<_, 2>::default();
assert!(chunks.pop().is_none());
assert_eq!(chunks.capacity(), 2);
chunks.extend_from_slice(&[1, 2, 3, 4, 5, 6, 7]);
assert_eq!(chunks.len(), 7);
assert_eq!(chunks.capacity(), 8... | rust_cleaned_test_functions.jsonl/80056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30539,
291,
17061,
30539,
368,
341,
286,
1077,
5206,
26757,
284,
45513,
291,
10050,
27638,
6878,
220,
17,
6831,
2258,
543,
286,
2060,
10297,
84263,
8288,
1005,
285,
31488,
1423,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ls_columns() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch(&at.plus_as_string("test-columns-1"));
at.touch(&at.plus_as_string("test-columns-2"));
at.touch(&at.plus_as_string("test-columns-3"));
at.touch(&at.plus_as_string("test-columns-... | rust_cleaned_test_functions.jsonl/71196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 612
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53174,
22590,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
280,
262,
518,
42129,
2099,
266,
60540,
11898,
3904,
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... | 3 |
#[test]
fn test_json_object_expression_with_string_literal_key() {
let n = ObjectExpr {
base: BaseNode::default(),
with: None,
properties: vec![Property {
base: BaseNode::default(),
key: PropertyKey::StringLit(StringLit {
base: BaseNode::defaul... | rust_cleaned_test_functions.jsonl/40436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
5314,
28068,
6615,
3904,
34100,
3097,
368,
341,
262,
1077,
308,
284,
3002,
16041,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
448,
25,
2240,
345,
286,
5888,
25,
7486,
20703,
3052... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dot() {
let vec1 = Vec3::new(0.0, 1.0, 2.0);
let vec2 = Vec3::new(2.0, 1.0, 0.0);
assert_eq!(vec1.dot(&vec2), 1.0);
assert_eq!(vec2.dot(&vec1), 1.0);
assert_eq!(vec2.dot(&vec2), 5.0);
} | rust_cleaned_test_functions.jsonl/39244 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30941,
368,
341,
286,
1077,
7486,
16,
284,
11312,
18,
486,
931,
7,
15,
13,
15,
11,
220,
16,
13,
15,
11,
220,
17,
13,
15,
317,
286,
1077,
7486,
17,
284,
11312,
18,
486,
931,
7,
17,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_limbs_equal_limb() {
for zero in ZEROES {
assert_eq!(limbs_equal_limb_constant_time(zero, 0), LimbMask::True);
}
for nonzero in NONZEROES {
assert_eq!(limbs_equal_limb_constant_time(nonzero, 0), LimbMask::False);
}
static EQUAL: &[(... | rust_cleaned_test_functions.jsonl/10663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 699
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58191,
1279,
11478,
907,
20828,
368,
341,
286,
369,
7168,
304,
54593,
1570,
341,
310,
2060,
10714,
10297,
4659,
1279,
11478,
907,
20828,
34967,
3009,
13174,
2328,
11,
220,
15,
701,
13589,
65,
1268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prune_table() {
use std::net::Ipv4Addr;
solana_logger::setup();
let mut table = ConnectionTable::default();
let num_entries = 5;
let max_connections_per_ip = 10;
let sockets: Vec<_> = (0..num_entries)
.into_iter()
.map(|i| S... | rust_cleaned_test_functions.jsonl/61952 | {
"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,
5294,
2886,
5237,
368,
341,
286,
990,
1460,
486,
4711,
486,
80656,
19,
13986,
280,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
5206,
1965,
284,
11032,
2556,
486,
2258,
543,
286,
1077,
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... | 5 |
#[test]
fn test_build_request_json_config_options() {
let commitment_config = CommitmentConfig {
commitment: CommitmentLevel::Max,
};
let addr = json!("deadbeefXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNHhx");
// Test request with CommitmentConfig and no params
let tes... | rust_cleaned_test_functions.jsonl/57072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
7893,
9455,
5332,
8743,
368,
341,
286,
1077,
15155,
5332,
284,
9205,
478,
2648,
341,
310,
15155,
25,
9205,
478,
4449,
486,
5974,
345,
286,
2605,
286,
1077,
10789,
284,
2951,
17223,
33754,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_send_power_state_frame_when_switching_channel_while_connected() {
let mut m = MockObjects::new();
let mut me = m.make_mlme();
me.make_client_station();
let mut client = me.get_bound_client().expect("client should be present");
// Pretend that client is as... | rust_cleaned_test_functions.jsonl/87192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 953
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
20421,
4387,
8929,
47636,
27652,
287,
14571,
86069,
43276,
368,
341,
286,
1077,
5206,
296,
284,
14563,
11543,
486,
931,
543,
286,
1077,
5206,
752,
284,
296,
10117,
76567,
2660,
543,
286,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cache_derived_key() {
let cdk = CacheDerivedKey::new("12345678", &[1, 1, 1, 1]);
let ret = cdk.get_derived_key("1234");
assert!(ret.is_err());
assert_eq!(format!("{}", ret.err().unwrap()), "password_incorrect");
let ret = cdk.get_derived_key("12345678").u... | rust_cleaned_test_functions.jsonl/106106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11529,
35345,
2221,
3097,
368,
341,
286,
1077,
272,
7584,
284,
19479,
67843,
1592,
486,
931,
445,
16,
17,
18,
19,
20,
21,
22,
23,
497,
44590,
16,
11,
220,
16,
11,
220,
16,
11,
220,
16,
255... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arena_new() {
let a = Arena::<usize>::new();
assert!(a.is_empty());
assert_eq!(0, a.len());
assert_eq!(0, a.capacity());
} | rust_cleaned_test_functions.jsonl/30750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
30527,
5921,
368,
341,
286,
1077,
264,
284,
27047,
27638,
51878,
6831,
931,
543,
286,
2060,
10297,
64,
2079,
15124,
1423,
286,
2060,
10714,
10297,
15,
11,
264,
19406,
1423,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_field_completion() {
assert_debug_snapshot!(
do_ref_completion(
r"
struct A { the_field: u32 }
fn foo(a: A) {
a.<|>
}
",
),
@r###"
⋮[
⋮ Comp... | rust_cleaned_test_functions.jsonl/117149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
5013,
60164,
368,
341,
286,
2060,
15446,
53265,
33673,
286,
653,
7793,
60164,
1006,
394,
435,
698,
394,
2036,
362,
314,
279,
5013,
25,
575,
18,
17,
456,
394,
5168,
15229,
2877,
25,
362,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_packed_to_unpacked() {
let mut test = TestUnpacked::new();
test.varints = vec![17i32, 1000];
test_deserialize("22 03 11 e8 07", &test);
let mut test = TestUnpacked::new();
test.sfixed32s = vec![17i32, 1000];
test_deserialize("2a 08 11 00 00 00 e8 03 00 00", &test);
} | rust_cleaned_test_functions.jsonl/47067 | {
"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,
6443,
620,
11191,
2346,
4907,
50321,
368,
341,
262,
1077,
5206,
1273,
284,
3393,
1806,
50321,
486,
931,
543,
262,
1273,
19526,
21042,
284,
7486,
20703,
16,
22,
72,
18,
17,
11,
220,
16,
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_derive_phase_key() {
let main = Key(hex::decode(
"588ba9eef353778b074413a0140205d90d7479e36e0dd4ee35bb729d26131ef1",
)
.unwrap());
let dk11 = derive_phase_key(
&EitherSide::from("side1"),
&main,
&Phase(String::from("... | rust_cleaned_test_functions.jsonl/89674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 841
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
37593,
3097,
368,
341,
286,
1077,
1887,
284,
5309,
44660,
486,
18196,
1006,
310,
330,
20,
23,
23,
4645,
24,
68,
823,
18,
20,
18,
22,
22,
23,
65,
15,
22,
19,
19,
16,
18,
64,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cdc_tso_failure() {
let mut suite = TestSuite::new(3);
let mut req = ChangeDataRequest::default();
req.region_id = 1;
req.set_region_epoch(suite.get_context(1).take_region_epoch());
let (event_feed_wrap, receive_event) = new_event_feed(&suite.cdc_cli, &req);
// Make sur... | rust_cleaned_test_functions.jsonl/3782 | {
"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,
666,
7628,
528,
704,
43618,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
18,
626,
262,
1077,
5206,
4232,
284,
10388,
1043,
1900,
486,
2258,
543,
262,
4232,
42976,
842,
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... | 4 |
#[test]
fn test_command_with_no_args() {
new_ucmd!()
.args(&["-n", "19", "echo"])
.run()
.stdout_is("\n");
} | rust_cleaned_test_functions.jsonl/15167 | {
"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,
10811,
6615,
6536,
8384,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
77,
497,
330,
16,
24,
497,
330,
3047,
14108,
286,
659,
6108,
741,
286,
659,
36358,
6892,
4921,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decoding() {
assert_eq!(Label::from_raw_bytes(b"abc").unwrap().to_string(), "abc");
assert_eq!(
Label::from_raw_bytes(b"xn--zs9h").unwrap().to_string(),
"🦀"
);
assert_eq!(
Label::from_raw_bytes(b"xn--rust--icon-9447i")
... | rust_cleaned_test_functions.jsonl/5049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13783,
3700,
368,
341,
286,
2060,
10714,
10297,
2476,
486,
1499,
16067,
12524,
1883,
1,
13683,
1827,
15454,
1005,
983,
3904,
1507,
330,
13683,
797,
286,
2060,
10714,
33673,
310,
9402,
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... | 1 |
#[test]
fn test_bad_module_specifiers() {
let (mut runtime, state_snapshot, _) = setup(
false,
json!({
"target": "esnext",
"module": "esnext",
"lib": ["deno.ns", "deno.window"],
"noEmit": true,
}),
&[(
"file:///a.ts",
r#"
import... | rust_cleaned_test_functions.jsonl/23623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 654
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
10750,
13594,
11836,
368,
341,
262,
1077,
320,
6984,
15592,
11,
1584,
53265,
11,
27439,
284,
6505,
1006,
414,
895,
345,
414,
2951,
0,
2262,
286,
330,
5657,
788,
330,
288,
3600,
756,
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... | 1 |
#[test]
fn test_from_hash4() -> Result<()> {
let addr = Address::from_hash("redridinghood", AddressType::P2SH, Hash160::new([0; 20]));
assert_eq!(
addr.cash_addr(),
"redridinghood:pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqxmg9w0gt"
);
Ok(())
} | rust_cleaned_test_functions.jsonl/16400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
8950,
19,
368,
1464,
5714,
71698,
341,
286,
1077,
10789,
284,
9177,
486,
1499,
8950,
445,
1151,
49680,
5694,
497,
9177,
929,
486,
47,
17,
8590,
11,
6531,
16,
21,
15,
486,
931,
2561,
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_unseen() {
match parse_response(b"* OK [UNSEEN 3] Message 3 is first unseen\r\n").unwrap() {
(
_,
Response::Data {
status: Status::Ok,
code: Some(ResponseCode::Unseen(3)),
information:... | rust_cleaned_test_functions.jsonl/8538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
28312,
368,
341,
286,
2432,
4715,
9655,
1883,
61593,
10402,
508,
1861,
925,
953,
220,
18,
60,
4856,
220,
18,
374,
1156,
63133,
12016,
1699,
1827,
15454,
368,
341,
310,
2399,
394,
716,
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... | 2 |
#[test]
fn test_sub_imm_mem() {
assert_emit!(0x83, 0x28, 1; emit_sub_imm_mem(MachineMode::Int32, RAX, 1));
assert_emit!(0x48, 0x83, 0x28, 1; emit_sub_imm_mem(MachineMode::Ptr, RAX, 1));
assert_emit!(0x49, 0x83, 0x29, 1; emit_sub_imm_mem(MachineMode::Ptr, R9, 1));
assert_emit!(0x4... | rust_cleaned_test_functions.jsonl/85477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
71370,
12976,
368,
341,
286,
2060,
69082,
10297,
15,
87,
23,
18,
11,
220,
15,
87,
17,
23,
11,
220,
16,
26,
16691,
5228,
71370,
12976,
3189,
3814,
3636,
486,
1072,
18,
17,
11,
431,
2954... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_iter_many_zero_length() {
let re = Regex::new(r"\d*").unwrap();
let ms = re.find_iter("a1bbb2").collect::<Vec<_>>();
assert_eq!(ms, vec![(0, 0), (1, 2), (3, 3), (4, 4), (5, 6)]);
} | rust_cleaned_test_functions.jsonl/123807 | {
"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,
21814,
11723,
22101,
19359,
5118,
368,
341,
286,
1077,
312,
284,
26146,
486,
931,
2601,
11934,
67,
9,
1827,
15454,
543,
286,
1077,
9829,
284,
312,
2658,
11723,
445,
64,
16,
53151,
17,
1827,
1738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_skipping_code_blocks() {
Command::cargo_bin("specdown")
.unwrap()
.arg("--no-colour")
.arg("run")
.arg("--running-dir")
.arg(".specdown")
.arg("docs/specs/skipping_code_blocks.md")
.assert()
.success();
} | rust_cleaned_test_functions.jsonl/104103 | {
"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,
33811,
5654,
4136,
25201,
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_display() {
let version = Version::parse("1.2.3-rc1").unwrap();
assert_eq!(format!("{:20}", version), "1.2.3-rc1 ");
assert_eq!(format!("{:*^20}", version), "*****1.2.3-rc1******");
assert_eq!(format!("{:.4}", version), "1.2.");
} | rust_cleaned_test_functions.jsonl/43103 | {
"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,
14825,
368,
341,
286,
1077,
2319,
284,
6079,
486,
6400,
445,
16,
13,
17,
13,
18,
12,
1287,
16,
1827,
15454,
543,
286,
2060,
10714,
10297,
2243,
88928,
25,
17,
15,
9545,
2319,
701,
330,
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_tile_motion_vectors_write() {
let (fi, mut fs, mut fb, frame_rate) = setup(160, 144);
{
let ti = TilingInfo::from_target_tiles(
fi.sb_size_log2(),
fi.width,
fi.height,
frame_rate,
2,
2,
false,
);
let iter =... | rust_cleaned_test_functions.jsonl/30660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29844,
65460,
49158,
9165,
368,
341,
262,
1077,
320,
9983,
11,
5206,
8619,
11,
5206,
25469,
11,
4034,
9246,
8,
284,
6505,
7,
16,
21,
15,
11,
220,
16,
19,
19,
626,
262,
341,
6926,
414,
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_withdraw_stake() {
let stake_pubkey = Pubkey::new_rand();
let stake_lamports = 42;
let stake_account = Account::new_ref_data_with_space(
stake_lamports,
&StakeState::Uninitialized,
std::mem::size_of::<StakeState>(),
&id(),
... | rust_cleaned_test_functions.jsonl/39442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2996
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
7633,
1261,
726,
368,
341,
286,
1077,
18279,
34014,
792,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
18279,
907,
309,
3394,
284,
220,
19,
17,
280,
286,
1077,
18279,
13500,
284,
8615,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_subscribe() {
let block_commitment_cache = Arc::new(RwLock::new(BlockCommitmentCache::new_for_tests()));
let validator_voting_keypairs: Vec<_> = (0..10)
.map(|_| ValidatorVoteKeypairs::new(Keypair::new(), Keypair::new(), Keypair::new()))
.collect();
... | rust_cleaned_test_functions.jsonl/16584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
88935,
368,
341,
286,
1077,
2504,
36346,
478,
11529,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
55243,
33441,
478,
8233,
486,
931,
5478,
32509,
25138,
286,
1077,
22935,
2273,
11519,
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_strong_pattern() {
let output = inline_parse(&String::from("**hoge**"));
assert_eq!(
output,
String::from(r#"<strong class="flav-md-strong">hoge</strong>"#)
);
} | rust_cleaned_test_functions.jsonl/22203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
644,
21260,
368,
341,
310,
1077,
2550,
284,
7381,
21039,
2099,
703,
486,
1499,
91389,
71,
40532,
334,
4010,
310,
2060,
10714,
33673,
394,
2550,
345,
394,
923,
486,
1499,
2601,
2,
22476,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cluster_spy_gossip() {
let thread_pool = ThreadPoolBuilder::new().build().unwrap();
//check that gossip doesn't try to push to invalid addresses
let node = Node::new_localhost();
let (spy, _, _) = ClusterInfo::spy_node(solana_sdk::pubkey::new_rand(), 0);
l... | rust_cleaned_test_functions.jsonl/26023 | {
"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,
28441,
643,
3288,
1889,
41473,
368,
341,
286,
1077,
4516,
15709,
284,
72716,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
442,
2028,
429,
57487,
3171,
944,
1430,
311,
4484,
311,
8318,
14230,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_label_resolution() {
assert_eq!(Encoding::for_label(b"utf-8"), Some(UTF_8));
assert_eq!(Encoding::for_label(b"UTF-8"), Some(UTF_8));
assert_eq!(
Encoding::for_label(b" \t \n \x0C \n utf-8 \r \n \t \x0C "),
Some(UTF_8)
);
assert_eq!(... | rust_cleaned_test_functions.jsonl/90243 | {
"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,
6106,
39849,
368,
341,
286,
2060,
10714,
10297,
14690,
486,
1958,
6106,
1883,
1,
4762,
12,
23,
3975,
4329,
7,
8561,
62,
23,
1106,
286,
2060,
10714,
10297,
14690,
486,
1958,
6106,
1883,
1,
8561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_commit_ok() {
test_commit_ok_imp(b"x", b"v", b"y", b"z");
let long_value = "v".repeat(SHORT_VALUE_MAX_LEN + 1).into_bytes();
test_commit_ok_imp(b"x", &long_value, b"y", b"z");
} | rust_cleaned_test_functions.jsonl/47472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
19817,
368,
341,
286,
1273,
36346,
19817,
36788,
1883,
65438,
497,
293,
1,
85,
497,
293,
1,
88,
497,
293,
1,
89,
3071,
286,
1077,
1293,
3142,
284,
330,
85,
3263,
30624,
3759,
70702,
747... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_matmul_normal() {
// blas is used
with(|g: &mut ag::Graph<f32>| {
let a: ag::Tensor<f32> = g.ones(&[2, 3, 4, 2]);
let b: ag::Tensor<f32> = g.ones(&[2, 3, 2, 3]);
let c = g.batch_matmul(a, b);
let shape = &[2, 3, 4, 3];
let size = shape.iter()... | rust_cleaned_test_functions.jsonl/22773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
16610,
24160,
13973,
368,
341,
262,
442,
48577,
374,
1483,
198,
262,
448,
22428,
70,
25,
609,
6984,
933,
486,
11212,
63895,
18,
17,
69844,
341,
286,
1077,
264,
25,
933,
486,
25336,
63895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_minimal_tree() {
let mut binary_tree = BinaryTree::<i32>::new();
let arr: Vec<i32> = (0..10).collect();
binary_tree.add_vector(&arr);
assert_eq!(binary_tree.height(), 4);
} | rust_cleaned_test_functions.jsonl/15600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
2861,
11663,
368,
341,
286,
1077,
5206,
7868,
11663,
284,
98070,
27638,
72,
18,
17,
6831,
931,
543,
286,
1077,
2890,
25,
11312,
21897,
18,
17,
29,
284,
320,
15,
496,
16,
15,
568,
17384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_chunk_request_messages() {
// Create a coordinator for a validator node
let mut validator_coordinator = test_utils::create_validator_coordinator();
// Constants for the chunk requests
let peer_network_id = PeerNetworkId::random();
let current_epoc... | rust_cleaned_test_functions.jsonl/84047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
30539,
7893,
23428,
368,
341,
286,
442,
4230,
264,
30284,
369,
264,
22935,
2436,
198,
286,
1077,
5206,
22935,
11393,
17442,
284,
1273,
17309,
486,
3182,
64959,
11393,
17442,
1428,
286,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tree_from_many() {
let mt = MerkleTree::new(TEST);
// This golden hash will need to be updated whenever the contents of `TEST` change in any
// changes
let bytes = hex::decode("b40c847546fdceea166f927fc46c5ca33c3638236a36275c1346d3dffb84e1bc")
... | rust_cleaned_test_functions.jsonl/112980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
5673,
22101,
368,
341,
286,
1077,
11965,
284,
8755,
23089,
6533,
486,
931,
50320,
317,
286,
442,
1096,
20748,
5175,
686,
1184,
311,
387,
6049,
15356,
279,
8794,
315,
1565,
10033,
63,
2297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_null_offset() {
let b = UInt8Array::from(vec![Some(1), None, Some(3)]);
let b = b.slice(1, 2).data();
let arrays = vec![b.as_ref()];
let mut a = MutableArrayData::new(arrays, false, 2);
a.extend(0, 0, 2);
let result = a.freeze();
... | rust_cleaned_test_functions.jsonl/102336 | {
"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,
15162,
6917,
368,
341,
286,
1077,
293,
284,
22275,
23,
1857,
486,
1499,
25592,
20703,
8373,
7,
16,
701,
2240,
11,
4329,
7,
18,
41958,
286,
1077,
293,
284,
293,
14530,
7,
16,
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_neg() {
let ctx = FieldCtx::new();
for _ in 0..100 {
let x = rand_elem();
let neg_x = ctx.neg(&x);
let zero = ctx.add(&x, &neg_x);
assert!(zero.is_zero());
}
} | rust_cleaned_test_functions.jsonl/99468 | {
"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,
28209,
368,
341,
286,
1077,
5635,
284,
8601,
23684,
486,
931,
543,
286,
369,
716,
304,
220,
15,
496,
16,
15,
15,
341,
310,
1077,
856,
284,
10382,
28179,
543,
310,
1077,
4184,
3212,
284,
5635,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_row_iter() {
let mat = m!(1, 2; 3, 4; 5, 6);
let mut iter = mat.row_iter();
let row1 = iter.next();
assert_eq!(row1, Some(m![1, 2]));
let row2 = iter.next();
assert_eq!(row2, Some(m![3, 4]));
let row3 = iter.next();
assert_eq!(row... | rust_cleaned_test_functions.jsonl/61504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
11723,
368,
341,
286,
1077,
5517,
284,
296,
10297,
16,
11,
220,
17,
26,
220,
18,
11,
220,
19,
26,
220,
20,
11,
220,
21,
626,
286,
1077,
5206,
5367,
284,
5517,
11547,
11723,
1428,
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... | 1 |
#[test]
fn test_resize_winapi() {
let (width, height) = size().unwrap();
set_size(30, 30).unwrap();
assert_eq!((30, 30), size().unwrap());
// reset to previous size
set_size(width, height).unwrap();
assert_eq!((width, height), size().unwrap());
} | rust_cleaned_test_functions.jsonl/47954 | {
"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,
53370,
25672,
2068,
368,
341,
286,
1077,
320,
3098,
11,
2608,
8,
284,
1379,
1005,
15454,
1428,
286,
738,
2368,
7,
18,
15,
11,
220,
18,
15,
568,
15454,
543,
286,
2060,
10714,
0,
1188,
18,
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_worst_case_encoded_tx_goldens() {
let ff_tx = vec![0xffu8; PACKET_DATA_SIZE];
let tx58 = bs58::encode(&ff_tx).into_string();
assert_eq!(tx58.len(), MAX_BASE58_SIZE);
let tx64 = base64::encode(&ff_tx);
assert_eq!(tx64.len(), MAX_BASE64_SIZE);
} | rust_cleaned_test_functions.jsonl/6340 | {
"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,
1670,
65296,
19096,
73069,
17805,
54696,
724,
368,
341,
286,
1077,
25539,
17805,
284,
7486,
20703,
15,
9020,
84,
23,
26,
73205,
7896,
4098,
935,
286,
1077,
9854,
20,
23,
284,
17065,
20,
23,
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_write_f64() {
assert_eq!(F64(3.0).to_string(), "3.0");
assert_eq!(F64(3.0).pretty().to_string(), "3.0");
assert_eq!(F64(3.1).to_string(), "3.1");
assert_eq!(F64(3.1).pretty().to_string(), "3.1");
assert_eq!(F64(-1.5).to_string(), "-1.5");
assert_... | rust_cleaned_test_functions.jsonl/22704 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
761,
21,
19,
368,
341,
286,
2060,
10714,
10297,
37,
21,
19,
7,
18,
13,
15,
568,
983,
3904,
1507,
330,
18,
13,
15,
797,
286,
2060,
10714,
10297,
37,
21,
19,
7,
18,
13,
15,
568,
3295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scope_resolution_on_second_level_block_scope() {
let module_scope = ModuleScope::new();
let contract_scope = ContractScope::new(module_scope);
let block_scope_1 =
BlockScope::from_contract_scope(Span::new(0, 0), Rc::clone(&contract_scope));
let block_s... | rust_cleaned_test_functions.jsonl/14885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23199,
39849,
4470,
29644,
8274,
7113,
23199,
368,
341,
286,
1077,
4688,
23199,
284,
13711,
10803,
486,
931,
543,
286,
1077,
5116,
23199,
284,
19185,
10803,
486,
931,
19123,
23199,
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_get_bank_snapshot_infos() {
solana_logger::setup();
let temp_snapshots_dir = tempfile::TempDir::new().unwrap();
let min_slot = 10;
let max_slot = 20;
common_create_bank_snapshot_files(temp_snapshots_dir.path(), min_slot, max_slot);
let bank_snapsh... | rust_cleaned_test_functions.jsonl/67604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
35733,
53265,
47779,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2730,
74175,
27634,
4334,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
1308,
27563,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_regaddr_addr() {
let compiled = compile("SET HL 50\nSET A 255\nWRITE64 A\nSET HL 100\nSET C 345\nWRITE64 C\nSET B 100\nAND (B) (50)");
let out_cpu = test_program(compiled);
assert_eq!(out_cpu.hl.value, 100);
assert_eq!(out_cpu.a.value, 255);
assert_eq!(out_cpu.b.value, 1... | rust_cleaned_test_functions.jsonl/63167 | {
"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,
8378,
4920,
6214,
7387,
368,
341,
262,
1077,
19697,
284,
19192,
445,
5884,
52487,
220,
20,
15,
1699,
5884,
362,
220,
17,
20,
20,
1699,
32781,
21,
19,
362,
1699,
5884,
52487,
220,
16,
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_secure_bn_ctx() {
let mut cxt = BigNumContext::new_secure().unwrap();
let a = BigNum::from_u32(8).unwrap();
let b = BigNum::from_u32(3).unwrap();
let mut remainder = BigNum::new().unwrap();
remainder.nnmod(&a, &b, &mut cxt).unwrap();
assert!(rema... | rust_cleaned_test_functions.jsonl/52801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73088,
58112,
15147,
368,
341,
286,
1077,
5206,
272,
2252,
284,
6164,
4651,
1972,
486,
931,
73088,
1005,
15454,
543,
286,
1077,
264,
284,
6164,
4651,
486,
1499,
7300,
18,
17,
7,
23,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mean() {
assert_eq!(Arcsine::new_unchecked(0.0, 1.0).mean(), 0.5);
assert_eq!(Arcsine::new_unchecked(-1.0, 1.0).mean(), -0.5);
assert_eq!(Arcsine::new_unchecked(-1.0, 2.0).mean(), 0.0);
} | rust_cleaned_test_functions.jsonl/107411 | {
"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,
16933,
368,
341,
286,
2060,
10714,
10297,
36809,
82,
482,
486,
931,
4907,
7549,
7,
15,
13,
15,
11,
220,
16,
13,
15,
568,
14287,
1507,
220,
15,
13,
20,
317,
286,
2060,
10714,
10297,
36809,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_sysvar_invalid_id_without_feature() {
let mut feature_set = FeatureSet::all_enabled();
feature_set
.active
.remove(&feature_set::rent_for_sysvars::id());
feature_set
.inactive
.insert(feature_set::rent_for_sysvars::id... | rust_cleaned_test_functions.jsonl/106196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
20344,
947,
31433,
842,
39904,
17069,
368,
341,
286,
1077,
5206,
4565,
2602,
284,
19998,
1649,
486,
541,
18220,
543,
286,
4565,
2602,
198,
310,
659,
3028,
198,
310,
659,
5399,
2099,
12753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rotate_polygon_holes() {
let ls1 = LineString::from(vec![
(5.0, 1.0),
(4.0, 2.0),
(4.0, 3.0),
(5.0, 4.0),
(6.0, 4.0),
(7.0, 3.0),
(7.0, 2.0),
(6.0, 1.0),
(5.0, 1.0),
]);
... | rust_cleaned_test_functions.jsonl/94518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 782
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
73542,
1523,
7151,
368,
341,
286,
1077,
19597,
16,
284,
7083,
703,
486,
1499,
25592,
90515,
310,
320,
20,
13,
15,
11,
220,
16,
13,
15,
1326,
310,
320,
19,
13,
15,
11,
220,
17,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fq_root_of_unity() {
use fff::SqrtField;
assert_eq!(Fq::S, 1);
assert_eq!(
Fq::multiplicative_generator(),
Fq::from_repr(FqRepr::from(2)).unwrap()
);
assert_eq!(
Fq::multiplicative_generator().pow([
0xdc... | rust_cleaned_test_functions.jsonl/2337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
12993,
3575,
62,
2439,
368,
341,
286,
990,
282,
542,
486,
50,
8140,
1877,
401,
286,
2060,
10714,
10297,
37,
80,
486,
50,
11,
220,
16,
317,
286,
2060,
10714,
33673,
310,
434,
80,
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_fr_mul_assign() {
let mut tmp = Fr([
0x6b7e9b8faeefc81a,
0xe30a8463f348ba42,
0xeff3cb67a8279c9c,
0x3d303651bd7c774d,
]);
tmp.mul_assign(&Fr([
0x13ae28e3bc35ebeb,
0xa10f4488075cae2c,
0x8160e95a853c3b5d,
0x5ae3f03b561a841d... | rust_cleaned_test_functions.jsonl/100648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 956
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
24944,
20688,
368,
341,
262,
1077,
5206,
4174,
284,
2869,
8956,
286,
220,
15,
87,
21,
65,
22,
68,
24,
65,
23,
3632,
68,
823,
66,
23,
16,
64,
345,
286,
220,
15,
8371,
18,
15,
64,
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... | 3 |
#[test]
fn test_result() {
let mut s = String::new();
let e = (html! {
: Ok::<&str, &str>("pass");
: Err::<&str, &str>("fail");
: Ok::<&str, &str>("hidden");
: Err::<&str, &str>("fail2");
})
.write_to_string(&mut s)
.err()
.unwrap();
assert_eq!(s, "pas... | rust_cleaned_test_functions.jsonl/89533 | {
"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,
5287,
368,
341,
262,
1077,
5206,
274,
284,
923,
486,
931,
543,
262,
1077,
384,
284,
320,
1551,
0,
341,
286,
549,
7622,
27638,
5,
495,
11,
609,
495,
13211,
6385,
797,
286,
549,
15495,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_byte_array_fields() {
let message_type = "
message test_schema {
REQUIRED BYTE_ARRAY binary;
REQUIRED FIXED_LEN_BYTE_ARRAY (20) fixed_binary;
}
";
let parquet_group_type = parse_message_type(message_type).unwrap();
let par... | rust_cleaned_test_functions.jsonl/130361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
3858,
12132,
368,
341,
286,
1077,
1943,
1819,
284,
6228,
286,
1943,
1273,
25371,
341,
310,
66577,
35377,
17724,
7868,
280,
310,
66577,
91549,
15536,
27349,
17724,
320,
17,
15,
8,
8356,
3176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file() {
let root_id = Uuid::new_v4();
let path = Path::new(root_id, &["Main.enso"]);
let data = Vec::from("hello".as_bytes());
test_request(
|client| client.write_file(&path, &data),
(),
ToServerPayloadOwned::WriteFile { ... | rust_cleaned_test_functions.jsonl/126693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
2458,
368,
341,
286,
1077,
3704,
842,
284,
547,
2423,
486,
931,
2273,
19,
543,
286,
1077,
1815,
284,
7933,
486,
931,
9206,
842,
11,
609,
1183,
6202,
7639,
704,
15049,
286,
1077,
821,
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_builtin() {
assert!(INT.is_built_in());
assert!(DOUBLE.is_built_in());
assert!(BOOL.is_built_in());
assert!(!Dart::Void.is_built_in());
} | rust_cleaned_test_functions.jsonl/33189 | {
"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,
73829,
368,
341,
286,
2060,
10297,
3221,
2079,
880,
11227,
1243,
1423,
286,
2060,
10297,
77647,
2079,
880,
11227,
1243,
1423,
286,
2060,
10297,
10395,
2079,
880,
11227,
1243,
1423,
286,
2060,
0,
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 |
#[test]
fn test_numeric_less_than_unknown_attribute() {
let schemaReplicant = SchemaReplicant::default();
let causetq = r#"[:find ?x :where [?x _ ?y] [(< ?y 10)]]"#;
let SQLCausetQ { allegrosql, args } = translate(&schemaReplicant, causetq);
assert_eq!(allegrosql, "SELECT DISTINCT `a... | rust_cleaned_test_functions.jsonl/90705 | {
"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,
29418,
50747,
51613,
57507,
16791,
368,
341,
262,
1077,
10802,
18327,
35237,
284,
12539,
18327,
35237,
486,
2258,
1428,
262,
1077,
2162,
18187,
80,
284,
435,
55543,
3447,
3903,
937,
87,
549,
2870,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iter() {
let boolean = BooleanArray::from_slice(&[false, false, true, true]).boxed();
let int = Int32Array::from_slice(&[42, 28, 19, 31]).boxed();
let fields = vec![
Field::new("b", DataType::Boolean, false),
Field::new("c", DataType::Int32, false),
];
... | rust_cleaned_test_functions.jsonl/17120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
11723,
368,
341,
262,
1077,
2710,
284,
6992,
1857,
486,
1499,
26488,
2099,
58,
3849,
11,
895,
11,
830,
11,
830,
10697,
79075,
543,
262,
1077,
526,
284,
1333,
18,
17,
1857,
486,
1499,
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... | 2 |
#[test]
fn test_relative() {
let prog = [
109, 1, 204, -1, 1001, 100, 1, 100, 1008, 100, 16, 101, 1006, 101, 0,
99,
];
test_run(Intcode::from(prog), &[], &prog);
} | rust_cleaned_test_functions.jsonl/76320 | {
"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,
29286,
368,
341,
262,
1077,
29271,
284,
2278,
286,
220,
16,
15,
24,
11,
220,
16,
11,
220,
17,
15,
19,
11,
481,
16,
11,
220,
16,
15,
15,
16,
11,
220,
16,
15,
15,
11,
220,
16,
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_value_into_cbytes() {
let value = Value::new_normal(1_u8);
assert_eq!(value.as_bytes(), vec![0, 0, 0, 1, 1]);
} | rust_cleaned_test_functions.jsonl/41645 | {
"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,
3142,
45514,
666,
9651,
368,
341,
286,
1077,
897,
284,
5162,
486,
931,
13973,
7,
16,
7300,
23,
317,
286,
2060,
10714,
10297,
957,
5357,
12524,
1507,
7486,
20703,
15,
11,
220,
15,
11,
220,
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 |
#[test]
fn test_is_unicast_in_subnet() {
// Valid unicast in subnet
let subnet =
Subnet::new(Ipv4Addr::new([1, 2, 0, 0]), 16).expect("1.2.0.0/16 is a valid subnet");
assert!(Ipv4Addr::new([1, 2, 3, 4]).is_unicast_in_subnet(&subnet));
assert!(!Ipv4Addr::new([2, 2, 3, 4... | rust_cleaned_test_functions.jsonl/31864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1616
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62,
3525,
559,
1243,
95681,
368,
341,
286,
442,
7818,
650,
35446,
304,
51457,
198,
286,
1077,
51457,
4035,
310,
3719,
4711,
486,
931,
8972,
30168,
19,
13986,
486,
931,
2561,
16,
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_vote_serialize() {
let mut buffer: Vec<u8> = vec![0; VoteState::size_of()];
let mut vote_state = VoteState::default();
vote_state
.votes
.resize(MAX_LOCKOUT_HISTORY, Lockout::default());
assert!(vote_state.serialize(&mut buffer[0..4]).is_er... | rust_cleaned_test_functions.jsonl/69960 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
88686,
368,
341,
286,
1077,
5206,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
26,
34034,
1397,
486,
2141,
3575,
33800,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_remove_failed_stores() {
let debugger = new_debugger();
debugger.set_store_id(100);
let engine = &debugger.engines.kv;
let get_region_stores = |engine: &Arc<DB>, region_id: u64| {
get_region_state(engine, region_id)
.get_region()
... | rust_cleaned_test_functions.jsonl/33467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
35060,
1261,
4589,
368,
341,
286,
1077,
44473,
284,
501,
15446,
1389,
543,
286,
44473,
980,
14809,
842,
7,
16,
15,
15,
317,
286,
1077,
4712,
284,
609,
8349,
1389,
90413,
1543,
5202,
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_map_ex_axis_keep_dim() {
let x = ndarray::array![[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]].into_ndarray();
let y = map_ex_axis_keep_dim(&x, Axis(1), |x| x.mean_axis(Axis(1)).unwrap());
assert_eq!(y, ndarray::array![[[2.5, 3.5, 4.5]]].into_dyn());
} | rust_cleaned_test_functions.jsonl/114646 | {
"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,
5376,
2702,
23567,
50293,
10791,
368,
341,
262,
1077,
856,
284,
66883,
486,
1653,
0,
15505,
58,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
1125,
508,
19,
13,
15,
11,
220,
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_expressions() {
test_synced(move || {
let expr1 = ConstantExpression::new(&23);
assert_eq!(expr1.value().get::<i32>().unwrap(), 23);
let expr2 = ConstantExpression::for_value(&"hello".to_value());
assert_eq!(expr2.value().get::<String>().un... | rust_cleaned_test_functions.jsonl/50743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
39873,
368,
341,
286,
1273,
23008,
291,
34081,
1369,
341,
310,
1077,
15169,
16,
284,
19305,
9595,
486,
931,
2099,
17,
18,
317,
310,
2060,
10714,
10297,
9413,
16,
2824,
1005,
455,
27638,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bpe_exact() {
// Given
let bpe_pairs = generate_bpe_pair_vocab();
let test_tuples = [
(
"hello",
(
vec!["h@@".to_owned(), "ell@@".to_owned(), "o".to_owned()],
vec![1, 3, 1],
... | rust_cleaned_test_functions.jsonl/13641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 858
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
375,
71084,
368,
341,
286,
442,
286,
16246,
198,
286,
1077,
293,
375,
36430,
284,
6923,
880,
375,
14445,
52823,
1428,
286,
1077,
1273,
89269,
284,
2278,
310,
2399,
394,
330,
14990,
756,
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_get_anonymization_config_from_file() {
let mut file = fs::File::create("/tmp/anon_config.yml").unwrap();
file.write(b"{}").unwrap();
assert_eq!(
get_anonymization_config_from_file("/tmp/anon_config.yml").unwrap(),
Anonymization {
re... | rust_cleaned_test_functions.jsonl/76495 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12008,
7831,
2022,
5332,
5673,
2458,
368,
341,
286,
1077,
5206,
1034,
284,
8619,
486,
1703,
486,
3182,
4283,
5173,
55492,
263,
5332,
33936,
1827,
15454,
543,
286,
1034,
3836,
1883,
1,
6257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_descending_buffer(){
unsafe {
let v = vec!(4i32, 3, 2, 1);
assert!(is_descending_buffer(v.as_ptr(), v.len()));
let v = vec!(1i32);
assert!(is_descending_buffer(v.as_ptr(), v.len()));
let v : Vec<i32> = vec!();
ass... | rust_cleaned_test_functions.jsonl/133545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
10986,
2459,
7776,
3032,
286,
19860,
341,
310,
1077,
348,
284,
7486,
10297,
19,
72,
18,
17,
11,
220,
18,
11,
220,
17,
11,
220,
16,
317,
310,
2060,
10297,
285,
10986,
2459,
7776,
3747,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsing_spec_constant_op() {
let mut v = ZERO_BOUND_HEADER.to_vec();
v.append(&mut vec![0x34, 0x00, 0x05, 0x00]); // OpTypeFloat
v.append(&mut vec![0x01, 0x00, 0x00, 0x00]); // result type: 1
v.append(&mut vec![0x02, 0x00, 0x00, 0x00]); // result id: 2
v.a... | rust_cleaned_test_functions.jsonl/85752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
13594,
34967,
10287,
368,
341,
286,
1077,
5206,
348,
284,
54593,
73644,
20330,
2389,
13251,
543,
286,
348,
2057,
2099,
6984,
7486,
20703,
15,
87,
18,
19,
11,
220,
15,
87,
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... | 1 |
#[test]
fn test_existing_user_email() {
use cargo_registry::schema::emails;
use chrono::NaiveDateTime;
use diesel::update;
let (app, _) = TestApp::init().empty();
// email directly into the database and we want to test the verification flow here.
let email = "potahto@example.com";... | rust_cleaned_test_functions.jsonl/34239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62630,
3317,
9172,
368,
341,
262,
990,
25652,
50650,
486,
17349,
486,
51376,
280,
262,
990,
80372,
486,
16193,
533,
7689,
280,
262,
990,
32780,
486,
2386,
401,
262,
1077,
320,
676,
11,
27439,
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_resizing_array_random_queue_sample() {
let mut queue: ResizingArrayRandomizedQueue<u32> = RandomizedQueue::new();
assert!(queue.is_empty());
for i in 0 .. 10 {
queue.enqueue(i);
}
let mut matches = 0i32;
for _ in 0 .. 10 {
if queue.sample() == queue.samp... | rust_cleaned_test_functions.jsonl/29073 | {
"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,
4918,
4849,
3858,
22644,
10841,
17491,
368,
341,
262,
1077,
5206,
7177,
25,
1800,
4849,
1857,
13999,
1506,
7554,
34837,
18,
17,
29,
284,
10612,
1506,
7554,
486,
931,
1428,
262,
2060,
10297,
4584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_completion_detail_from_macro_generated_struct_fn_doc_attr() {
check_detail_and_documentation(
r#"
macro_rules! bar {
() => {
struct Bar;
impl Bar {
#[doc = "Do the foo"]
fn foo(&self) {}
}
}
}
bar!();
fn foo() {
le... | rust_cleaned_test_functions.jsonl/128375 | {
"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,
60164,
14480,
5673,
58810,
67313,
15126,
15246,
18869,
10422,
368,
341,
286,
1779,
14480,
8378,
26231,
367,
1006,
310,
435,
2,
698,
32606,
21407,
0,
3619,
341,
262,
1719,
589,
341,
286,
2036,
4716... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vec_mul() {
let one = scalar_from_u64::<Bls12>(1);
let two = scalar_from_u64::<Bls12>(2);
let three = scalar_from_u64::<Bls12>(3);
let four = scalar_from_u64::<Bls12>(4);
let five = scalar_from_u64::<Bls12>(5);
let six = scalar_from_u64::<Bls12>(6)... | rust_cleaned_test_functions.jsonl/102228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
24944,
368,
341,
286,
1077,
825,
284,
17274,
5673,
7300,
21,
19,
27638,
33,
4730,
16,
17,
2235,
16,
317,
286,
1077,
1378,
284,
17274,
5673,
7300,
21,
19,
27638,
33,
4730,
16,
17,
2235,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_right_shift() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(engine.eval::<INT>("9 >> 1")?, 4);
Ok(())
} | rust_cleaned_test_functions.jsonl/112271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10539,
22230,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
4712,
284,
8200,
486,
931,
543,
262,
2060,
10714,
10297,
8512,
31710,
27638,
3221,
13211,
24,
3578,
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
] | 2 |
#[test]
fn test_multiple_predicate_1() {
let predicate: Vec<_> = (0..=1)
.map(|offset| {
move || {
RpnExpressionBuilder::new_for_test()
.push_column_ref_for_test(offset)
.push_fn_call_for_test(is_ev... | rust_cleaned_test_functions.jsonl/119698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
97474,
62,
16,
368,
341,
23459,
286,
1077,
24283,
25,
11312,
32399,
29,
284,
320,
15,
496,
28,
16,
340,
310,
659,
2186,
22428,
3176,
91,
341,
394,
3271,
1369,
341,
503,
431,
19958,
9595... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_header_with_quality() {
let a: Accept = header::Header::parse_header([b"text/plain; charset=utf-8; q=0.5".to_vec()].as_slice()).unwrap();
let b = Accept(vec![
shared::QualityItem{item: mime::Mime(mime::TopLevel::Text, mime::SubLevel::Plain, vec![(mime::Attr::Charset, mime::... | rust_cleaned_test_functions.jsonl/51465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8757,
6615,
55074,
368,
341,
262,
1077,
264,
25,
20829,
284,
4247,
486,
4047,
486,
6400,
8757,
2561,
65,
66251,
36971,
26,
11617,
22264,
12,
23,
26,
2804,
28,
15,
13,
20,
3263,
983,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_accounts_serialize() {
solana_logger::setup();
let (_accounts_dir, paths) = get_temp_accounts_paths(4).unwrap();
let accounts = Accounts::new(paths);
let mut pubkeys: Vec<Pubkey> = vec![];
create_test_accounts(&accounts, &mut pubkeys, 100, 0);
che... | rust_cleaned_test_functions.jsonl/50622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 597
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
88686,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
5453,
26206,
4334,
11,
12716,
8,
284,
633,
11771,
55665,
24152,
7,
19,
568,
15454,
543,
286,
1077,
9618,
284,
40655,
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_asin() {
let tests = vec![
(ScalarFuncSig::Asin, Datum::F64(0.0_f64), 0.0_f64),
(
ScalarFuncSig::Asin,
Datum::F64(1f64),
f64::consts::PI / 2.0_f64,
),
(
ScalarFuncSig::Asin,
... | rust_cleaned_test_functions.jsonl/125534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 975
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
258,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
20639,
9626,
47246,
486,
2121,
258,
11,
68459,
486,
37,
21,
19,
7,
15,
13,
15,
761,
21,
19,
701,
220,
15,
13,
15,
761,
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... | 3 |
#[test]
fn test_ccsds_parser_iterator() {
let slice = [0x00,0x3,0xFF,0xFF,0x00,0x01,0xFF,0xFF];
let mut parser = CcsdsParser::new();
let n = 100;
for _ in 0..n {
parser.recv_slice(&slice);
}
for _ in 0..n {
let packet = parser.next();
assert_ne!(pac... | rust_cleaned_test_functions.jsonl/105752 | {
"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,
28955,
82,
5356,
18517,
13491,
368,
972,
262,
1077,
15983,
284,
508,
15,
87,
15,
15,
11,
15,
87,
18,
11,
15,
9264,
11,
15,
9264,
11,
15,
87,
15,
15,
11,
15,
87,
15,
16,
11,
15,
9264,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_flutter_allow() {
let config = Config::default();
assert!(!flutter_allow(&config, "releases/releases_windows.json"));
assert!(!flutter_allow(&config, "releases/releases_linux.json"));
assert!(flutter_allow(
&config,
"releases/stable/linux/f... | rust_cleaned_test_functions.jsonl/30036 | {
"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,
68089,
55731,
368,
341,
286,
1077,
2193,
284,
5532,
486,
2258,
543,
286,
2060,
0,
3471,
14972,
55731,
2099,
1676,
11,
330,
265,
28299,
58187,
58220,
4323,
4010,
286,
2060,
0,
3471,
14972,
55731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_leaf_broken() {
let mut cache = Cache::new();
let leaf1 = Blueprint::new(BuilderLeaf::new());
let leaf2 = Blueprint::new(BuilderLeaf::new());
println!("BuilderLeaf: {:?}; {:?}", leaf1, leaf2);
println!("Ptr: {:?}; {:?}", leaf1.id(), leaf2.id());
// Ensure same builder results in same ar... | rust_cleaned_test_functions.jsonl/130973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38909,
880,
81709,
368,
341,
10217,
5206,
6500,
284,
19479,
486,
931,
1428,
10217,
15933,
16,
284,
30003,
486,
931,
7,
3297,
31461,
486,
931,
1423,
10217,
15933,
17,
284,
30003,
486,
931,
7,
329... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 x = RingBuf::new();
let mut y = RingBuf::new();
y.push_back(1);
y.push_back(2);
y.push_back(3);
assert!(x < y);
assert!(y > x);
assert!(x <= x);
assert!(x >= x);
} | rust_cleaned_test_functions.jsonl/125105 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67324,
368,
341,
286,
1077,
856,
284,
21525,
15064,
486,
931,
543,
286,
1077,
5206,
379,
284,
21525,
15064,
486,
931,
543,
286,
379,
2552,
3895,
7,
16,
317,
286,
379,
2552,
3895,
7,
17,
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,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_neq_scalar() {
cmp_i64_scalar!(
neq_scalar,
vec![6, 7, 8, 9, 10, 6, 7, 8, 9, 10],
8,
vec![true, true, false, true, true, true, true, false, true, true]
);
} | rust_cleaned_test_functions.jsonl/36017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
13925,
80,
41652,
368,
341,
286,
26089,
5318,
21,
19,
41652,
33673,
310,
834,
80,
41652,
345,
310,
7486,
20703,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
11,
220,
16,
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_addition() -> Result<(), Box<dyn Error>> {
TestSample {
source: StringLiteral("+++"),
expected_result: Some(BinaryLiteral(&[3][..])),
expected_output: None,
input_data: None,
}.run()
} | rust_cleaned_test_functions.jsonl/20219 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
680,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
3393,
17571,
341,
286,
2530,
25,
923,
17350,
445,
62730,
4461,
286,
3601,
5287,
25,
4329,
77833,
17350,
2099,
58,
18,
1457,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_setup_jailed_folder() {
let env = create_env();
// Error case: non UTF-8 paths.
let bad_string: &[u8] = &[0, 102, 111, 111, 0];
assert_eq!(
format!("{}", env.setup_jailed_folder(bad_string).err().unwrap()),
"Failed to decode string from b... | rust_cleaned_test_functions.jsonl/44157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 760
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
5374,
5687,
15268,
368,
341,
286,
1077,
6105,
284,
1855,
15879,
1428,
286,
442,
4600,
1142,
25,
2477,
20076,
12,
23,
12716,
624,
286,
1077,
3873,
3904,
25,
44590,
84,
23,
60,
284,
44590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_constant_condition_with_side_effect2() {
test("(b=true)?x=1:x=2;", "b=true,x=1");
test("(b=false)?x=1:x=2;", "b=false,x=2");
test("if (b=/ab/) x=1;", "b=/ab/;x=1");
test_same("var b;b=f();b?x=1:x=2;");
test_same("var b=f();b?x=1:x=2;");
} | rust_cleaned_test_functions.jsonl/374 | {
"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,
34967,
27656,
6615,
30862,
27125,
17,
368,
341,
262,
1273,
31732,
65,
11265,
11843,
87,
28,
16,
35254,
28,
17,
32503,
330,
65,
11265,
12803,
28,
16,
797,
262,
1273,
31732,
65,
12219,
11843,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_error_output() {
Command::cargo_bin("rrrocket")
.unwrap()
.args(&[
"-n",
"-c",
"--dry-run",
"non-exist/assets/fuzz-string-too-long.replay",
])
.assert()
.failure()
... | rust_cleaned_test_functions.jsonl/88727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
7645,
368,
341,
286,
7348,
486,
66715,
21816,
445,
634,
46790,
1138,
310,
659,
15454,
741,
310,
659,
2116,
2099,
9640,
394,
6523,
77,
756,
394,
6523,
66,
756,
394,
14482,
53210,
22973,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.