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_max_height() {
let max_height = 64.0;
let builder = RowBuilder::new();
let row = builder.max_height(max_height).build();
assert_eq!(row.max_height, max_height);
} | rust_cleaned_test_functions.jsonl/29963 | {
"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,
6345,
9561,
368,
341,
286,
1077,
1932,
9561,
284,
220,
21,
19,
13,
15,
401,
286,
1077,
7363,
284,
10801,
3297,
486,
931,
543,
286,
1077,
2802,
284,
7363,
6678,
9561,
8739,
9561,
568,
5834,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merge_stable() {
new_ucmd!()
.arg("-m")
.arg("--stable")
.arg("-n")
.arg("merge_stable_1.txt")
.arg("merge_stable_2.txt")
.succeeds()
.stdout_only_fixture("merge_stable.expected");
} | rust_cleaned_test_functions.jsonl/20523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
1261,
480,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
76,
1138,
286,
659,
858,
21549,
27992,
1138,
286,
659,
858,
13645,
77,
1138,
286,
659,
858,
445,
19052,
1261,
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_update_struct() {
let mutation = update_struct(
"Guild",
TestStruct {
struct_field: "abc".to_string(),
},
);
match mutation.operation.unwrap() {
v1::mutation::Operation::Update(w) => assert_struct(w),
... | rust_cleaned_test_functions.jsonl/132330 | {
"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,
8882,
15126,
368,
341,
286,
1077,
26374,
284,
2647,
15126,
1006,
310,
330,
72574,
756,
310,
3393,
9422,
341,
394,
2036,
5013,
25,
330,
13683,
3263,
983,
3904,
3148,
310,
1153,
286,
1439,
286,
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... | 2 |
#[test]
fn test_euclidean_vector_metric() {
let v = vector![3.0, 4.0];
assert_scalar_eq!(VectorMetric::metric(&Euclidean, &v, &v), 0.0, comp = float);
let v1 = vector![0.0, 0.0];
assert_scalar_eq!(VectorMetric::metric(&Euclidean, &v, &v1), 5.0, comp = float);
let v2 = v... | rust_cleaned_test_functions.jsonl/6895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
84,
50078,
12247,
41294,
368,
341,
286,
1077,
348,
284,
4621,
20703,
18,
13,
15,
11,
220,
19,
13,
15,
935,
286,
2060,
41652,
10714,
10297,
3781,
54310,
486,
15903,
2099,
54118,
50078,
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_fixed_suffix_seek() {
let path = TempDir::new("_rust_rocksdb_fixed_suffix_seek").expect("");
let mut bbto = BlockBasedOptions::new();
bbto.set_bloom_filter(10, false);
bbto.set_whole_key_filtering(false);
let mut opts = DBOptions::new();
let mut cf_opts = ColumnFamilyOpti... | rust_cleaned_test_functions.jsonl/18882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 568
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
37151,
74473,
368,
341,
262,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
35788,
26608,
14553,
1999,
37839,
37151,
74473,
1827,
17119,
13056,
262,
1077,
5206,
16520,
983,
284,
8362,
28715,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chacha20_cipher() {
let key = [
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
];
let nonce = ... | rust_cleaned_test_functions.jsonl/32185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1044
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
51576,
17,
15,
76692,
368,
341,
9401,
262,
1077,
1376,
284,
2278,
286,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_u8() {
let mut data : &[u8] = &[1, 2];
assert_eq!(Ok(1), data.read_u8());
assert_eq!(Ok(2), data.read_u8());
assert_eq!(Err(Error::Short), data.read_u8());
assert_eq!(0, data.len());
} | rust_cleaned_test_functions.jsonl/72917 | {
"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,
6443,
7300,
23,
368,
341,
286,
1077,
5206,
821,
549,
44590,
84,
23,
60,
284,
44590,
16,
11,
220,
17,
935,
286,
2060,
10714,
10297,
11578,
7,
16,
701,
821,
4125,
7300,
23,
1423,
286,
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,
1,
1,
1,
1... | 1 |
#[test]
fn test_sparse_mixed_with_nulls_and_offset() {
let mut builder = UnionBuilder::new_sparse(5);
builder.append::<Int32Type>("a", 1).unwrap();
builder.append_null().unwrap();
builder.append::<Float64Type>("c", 3.0).unwrap();
builder.append_null().unwrap();
bu... | rust_cleaned_test_functions.jsonl/25638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 844
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
717,
3286,
6615,
15162,
82,
8378,
6917,
368,
341,
286,
1077,
5206,
7363,
284,
9145,
3297,
486,
931,
71123,
7,
20,
317,
286,
7363,
2057,
27638,
1072,
18,
17,
929,
13211,
64,
497,
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... | 3 |
#[test]
fn test_mat_times_zero_equals_zero() {
let matrix = Matrix1x2::new(33_i32, 54_i32);
let zero_mat2x2 = Matrix2x2::zero();
let zero_mat1x2 = Matrix1x2::zero();
assert_eq!(matrix * zero_mat2x2, zero_mat1x2);
} | rust_cleaned_test_functions.jsonl/129148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16610,
22353,
19359,
61664,
19359,
368,
341,
286,
1077,
6172,
284,
11631,
16,
87,
17,
486,
931,
7,
18,
18,
5318,
18,
17,
11,
220,
20,
19,
5318,
18,
17,
317,
286,
1077,
7168,
16610,
17,
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_no_such_file() {
new_ucmd!()
.arg("bogusfile")
.fails()
.no_stdout()
.stderr_contains("cannot open 'bogusfile' for reading: No such file or directory");
} | rust_cleaned_test_functions.jsonl/39311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
643,
1387,
2458,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
445,
65,
538,
355,
1192,
1138,
286,
659,
59631,
741,
286,
659,
2152,
67416,
741,
286,
659,
36422,
63598,
445,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_heap_limits() {
let create_params = v8::Isolate::create_params().heap_limits(0, 20 * 1024);
let mut runtime = JsRuntime::new(RuntimeOptions {
create_params: Some(create_params),
..Default::default()
});
let cb_handle = runtime.v8_isolate().thread_safe_handle();
l... | rust_cleaned_test_functions.jsonl/4861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33059,
31820,
368,
341,
262,
1077,
1855,
6745,
284,
348,
23,
486,
3872,
33066,
486,
3182,
6745,
1005,
15961,
31820,
7,
15,
11,
220,
17,
15,
353,
220,
16,
15,
17,
19,
317,
262,
1077,
5206,
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_hash_coset_constant() {
fn test(c: FieldElement) {
let mut dag = AlgebraicGraph::new(&FieldElement::generator(), 1024, 2);
let factor = (&dag.seed / &dag.cofactor).pow(dag.coset_size);
let index = dag.op(Op::Coset(c.clone(), 1));
a... | rust_cleaned_test_functions.jsonl/127882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
61192,
295,
34967,
368,
341,
1789,
286,
5168,
1273,
1337,
25,
8601,
1691,
8,
341,
310,
1077,
5206,
28069,
284,
76443,
292,
11212,
486,
931,
2099,
1877,
1691,
486,
35851,
1507,
220,
16,
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_not() {
let val = get_uint256("3");
assert_eq!( bitwise_not(val) , get_uint256("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC") );
} | rust_cleaned_test_functions.jsonl/78457 | {
"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,
7913,
368,
341,
286,
1077,
1044,
284,
633,
15807,
17,
20,
21,
445,
18,
797,
286,
2060,
10714,
10297,
97970,
7913,
9098,
8,
1154,
633,
15807,
17,
20,
21,
445,
98843,
98843,
98843,
98843,
98843,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_config_round_trip() {
let mut input = InputConfig::default();
input.set_bucket("bucket".to_owned());
input.set_prefix("backup 02/prefix/".to_owned());
let c1 = Config::from_input(input.clone()).unwrap();
let c2 = Config::from_cloud_dynamic(&cloud_dynamic_f... | rust_cleaned_test_functions.jsonl/30687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
29896,
63883,
368,
341,
286,
1077,
5206,
1946,
284,
5571,
2648,
486,
2258,
543,
286,
1946,
980,
38749,
445,
30410,
3263,
983,
51973,
1423,
286,
1946,
980,
13974,
445,
31371,
220,
15,
17,
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_optopt_no_arg() {
let long_args = vec!("--test".to_string());
let opts = vec!(optopt("t", "test", "testing", "TEST"));
let rs = getopts(long_args.as_slice(), opts.as_slice());
match rs {
Err(ArgumentMissing(_)) => {},
_ => panic!()
}
... | rust_cleaned_test_functions.jsonl/11181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
2912,
6536,
6057,
368,
341,
286,
1077,
1293,
8384,
284,
7486,
17223,
313,
1944,
3263,
983,
3904,
1423,
286,
1077,
12185,
284,
7486,
10297,
2912,
2912,
445,
83,
497,
330,
1944,
497,
330,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_join_many() {
macro_rules! t(
(s: $path:expr, $join:expr, $exp:expr) => (
{
let path = Path::new($path);
let res = path.join_many($join);
assert_eq!(res.as_str(), Some($exp));
}
... | rust_cleaned_test_functions.jsonl/102775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 655
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
22101,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
5987,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933,
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_from_name_standard_networks() {
assert_eq!(Network::try_from_name(NETWORK_NAME_MAIN).unwrap(), Network::Mainnet);
assert_eq!(Network::try_from_name(NETWORK_NAME_DEV).unwrap(), Network::Devnet);
} | rust_cleaned_test_functions.jsonl/64588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
1269,
48688,
20966,
82,
368,
341,
262,
2060,
10714,
10297,
12320,
486,
1539,
5673,
1269,
8204,
1348,
18470,
4708,
32276,
568,
15454,
1507,
8141,
486,
6202,
4711,
317,
262,
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 |
#[test]
fn test_parse_number_followed_by_whitespace() {
check(
"1234 ",
expect![[r#"
Root@0..7
Exp_Literal@0..7
Lit_Integer@0..4 "1234"
Whitespace@4..7 " "
"#]],
);
} | rust_cleaned_test_functions.jsonl/40937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5500,
43490,
291,
3710,
86175,
368,
341,
286,
1779,
1006,
310,
330,
16,
17,
18,
19,
256,
21796,
310,
1720,
0,
15505,
81,
2,
698,
394,
18854,
31,
15,
496,
22,
198,
1698,
7787,
2351,
99... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rename_to_underscore() {
test_rename(
r#"
fn main() {
let i<|> = 1;
}"#,
"_",
r#"
fn main() {
let _ = 1;
}"#,
);
} | rust_cleaned_test_functions.jsonl/16205 | {
"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,
79399,
2346,
62,
53933,
368,
341,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
5168,
1887,
368,
341,
286,
1077,
600,
27,
91,
29,
284,
220,
16,
280,
262,
335,
57676,
345,
310,
9000,
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_smart_case_glob_searches() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(
&["--glob", "c.foo*"],
"one/two/C.Foo2
one/two/c.foo",
);
te.assert_output(&["--glob", "C.Foo*"], "one/two/C.Foo2");
} | rust_cleaned_test_functions.jsonl/10857 | {
"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,
88825,
19096,
95133,
10716,
288,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
1013,
3713,
7645,
1006,
286,
609,
1183,
313,
58926,
497,
330,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delimiter_from_si() {
new_ucmd!()
.args(&["-d=,", "--from=si"])
.pipe_in("1.2K,56")
.succeeds()
.stdout_only("1200,56\n");
} | rust_cleaned_test_functions.jsonl/46030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18029,
17700,
5673,
40983,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
67,
28,
57955,
14482,
1499,
28,
6321,
14108,
286,
659,
13768,
1243,
445,
16,
13,
17,
42,
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_req_parse() {
let buf = Buffer::new("GET /test HTTP/1.1\r\n\r\n");
let readbuf = BytesMut::new();
let settings = Rc::new(WorkerSettings::<HttpApplication>::new(
Vec::new(),
KeepAlive::Os,
));
let mut h1 = Http1::new(Rc::clone(&sett... | rust_cleaned_test_functions.jsonl/110377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17644,
21039,
368,
341,
286,
1077,
6607,
284,
10312,
486,
931,
445,
3806,
608,
1944,
10130,
14,
16,
13,
16,
12016,
1699,
12016,
1699,
797,
286,
1077,
1349,
5909,
284,
30024,
51440,
486,
931,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_more_than_two_days() {
let clock = Clock::new(1, 1).add_minutes(3500);
assert_eq!(clock.to_string(), "11:21");
} | rust_cleaned_test_functions.jsonl/5368 | {
"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,
2891,
36664,
51613,
23241,
28353,
368,
341,
262,
1077,
8866,
284,
26142,
486,
931,
7,
16,
11,
220,
16,
568,
718,
67655,
7,
18,
20,
15,
15,
317,
262,
2060,
10714,
10297,
20666,
2389,
3904,
1507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hover_macro2_invocation() {
check(
r#"
/// foo bar
///
/// foo bar baz
macro foo() {}
fn f() { fo$0o!(); }
"#,
expect![[r#"
*foo*
```rust
test
```
```rust
macro foo
... | rust_cleaned_test_functions.jsonl/66641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
58810,
17,
19996,
2276,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2575,
15229,
3619,
198,
15374,
2575,
15229,
3619,
50247,
198,
32606,
15229,
368,
10086,
8822,
282,
368,
314,
11756,
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_compress_iv_0() {
let cv = INITIALIZATION_VECTOR;
let to_test = vec![0; 8];
assert_eq!(compress(cv, to_test), 0x2C71C76D48A512E5);
} | rust_cleaned_test_functions.jsonl/54032 | {
"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,
87845,
51411,
62,
15,
368,
341,
286,
1077,
5544,
284,
29964,
32601,
3495,
47993,
280,
286,
1077,
311,
4452,
284,
7486,
20703,
15,
26,
220,
23,
935,
286,
2060,
10714,
10297,
38360,
38210,
11,
311... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_derivation_path_to_string_no_addr() {
let path = DerivationPath::new(ChildIndexHardened(0), vec![]);
let expected = "m/44'/429'/0'/0";
assert_eq!(expected, path.to_string())
} | rust_cleaned_test_functions.jsonl/68739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
39127,
2638,
2346,
3904,
6536,
7387,
368,
341,
286,
1077,
1815,
284,
12741,
39127,
1820,
486,
931,
7,
88419,
26907,
6758,
7,
15,
701,
7486,
0,
56703,
286,
1077,
3601,
284,
330,
76,
14,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_reuse() {
let mut ll = LinkedList::<u8>::with_capacity(8);
//first push one node
let mut node = ll.push_head(1);
for i in 0..7 {
node = ll.push_head(i);
}
//now pop the head
ll.pop_head();
//now push it again
... | rust_cleaned_test_functions.jsonl/59888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
1288,
810,
368,
341,
286,
1077,
5206,
9323,
284,
22917,
27638,
84,
23,
6831,
4197,
35603,
7,
23,
317,
286,
442,
3896,
4484,
825,
2436,
198,
286,
1077,
5206,
2436,
284,
9323,
2552,
13138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eq_ignore_ascii_case() {
assert!("url()URL()uRl()Ürl".eq_ignore_ascii_case("url()url()url()Ürl"));
assert!(!"Ürl".eq_ignore_ascii_case("ürl"));
// D assert!("HİKß".eq_ignore_ascii_case("hİKß"));
assert!(!"İ".eq_ignore_ascii_case("i"));
assert!(!"K".eq_... | rust_cleaned_test_functions.jsonl/13536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
58493,
50238,
19096,
368,
341,
286,
2060,
17223,
1085,
368,
3144,
368,
84,
49,
75,
368,
52491,
2381,
3263,
11006,
58493,
50238,
19096,
445,
1085,
368,
1085,
368,
1085,
368,
52491,
2381,
401... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prefix_column_handle() {
test_prefix_column_handle_impl(&[
VarcharColumn {
is_primary: true,
prefix_len: 0,
},
VarcharColumn {
is_primary: false,
prefix_len: 0,
},
]);
... | rust_cleaned_test_functions.jsonl/10383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
8744,
10630,
368,
341,
286,
1273,
13974,
8744,
10630,
21007,
2099,
9640,
310,
647,
1113,
277,
2933,
341,
394,
374,
45314,
25,
830,
345,
394,
9252,
6043,
25,
220,
15,
345,
310,
1153,
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_find_roots_cubic_depressed() {
assert_eq!(find_roots_cubic_depressed(0f32, 0f32), Roots::One([0f32]));
assert_eq!(find_roots_cubic_depressed(-1f64, 0f64), Roots::Three([-1f64, 0f64, 1f64]));
match find_roots_cubic_depressed(-2f64, 2f64) {
Roots::One(x) => {
... | rust_cleaned_test_functions.jsonl/18442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 643
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
26608,
2412,
666,
41181,
2259,
14318,
368,
341,
286,
2060,
10714,
10297,
3903,
26608,
2412,
666,
41181,
2259,
14318,
7,
15,
69,
18,
17,
11,
220,
15,
69,
18,
17,
701,
74587,
486,
3966,
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... | 4 |
#[test]
fn test_inner_macro_rules() {
check(
r#"
macro_rules! m {
($a:ident, $b:ident, $c:tt) => {
macro_rules! inner {
($bi:ident) => { fn $bi() -> u8 { $c } }
}
inner!($a);
fn $b() -> u8 { $c }
}
}
m!(x, y, 1);
"#,
expect![[r#"
macro_rul... | rust_cleaned_test_functions.jsonl/85253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34345,
58810,
21407,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
64,
25,
1713,
11,
400,
65,
25,
1713,
11,
400,
66,
25,
5566,
8,
589,
341,
286,
18072,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_used_in_for_expr() {
check_assist(
inline_local_variable,
"
fn foo() {
let a<|> = vec![10, 20];
for i in a {}
}",
"
fn foo() {
<|>for i in vec![10, 20] {}
}",
);
} | rust_cleaned_test_functions.jsonl/60330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27803,
1243,
5478,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
262,
1077,
264,
27,
91,
29,
284,
7486,
20703,
16,
15,
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_squeeze_cast_native() {
let mut rng = test_rng();
let sponge_param = poseidon_parameters_for_test();
let elem = Fr::rand(&mut rng);
let mut sponge1 = PoseidonSponge::<Fr>::new(&sponge_param);
sponge1.absorb(&elem);
let mut sponge2 = sponge1.clone();
// those two shou... | rust_cleaned_test_functions.jsonl/31510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
19340,
5303,
44494,
368,
341,
262,
1077,
5206,
28422,
284,
1273,
66849,
543,
262,
1077,
68348,
4090,
284,
17040,
90456,
18263,
5478,
4452,
543,
262,
1077,
11750,
284,
2869,
486,
11335,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatch_no_zero_copy_buf() {
let (mut runtime, dispatch_count) = setup(Mode::AsyncZeroCopy(0));
runtime
.execute(
"filename.js",
r#"
Deno.core.send(1);
"#,
)
.unwrap();
assert_eq!(dispatch_count.load(Ordering::Relaxed), 1);
} | rust_cleaned_test_functions.jsonl/4852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6536,
19359,
16096,
10363,
368,
341,
262,
1077,
320,
6984,
15592,
11,
6845,
3180,
8,
284,
6505,
3189,
534,
486,
6525,
17999,
12106,
7,
15,
1106,
262,
15592,
198,
414,
659,
10257,
1006,
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_index() {
run_test_fn(|client, conn| {
let user = create_random_user(&conn.0);
let username = user.username;
let password = user.password_hash;
// Issue a request to insert a new setlist
let encoded_credentials = base64::encode... | rust_cleaned_test_functions.jsonl/100452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
286,
1598,
4452,
15246,
22428,
2972,
11,
4534,
91,
341,
310,
1077,
1196,
284,
1855,
22644,
3317,
2099,
5148,
13,
15,
317,
310,
1077,
5934,
284,
1196,
12383,
280,
310,
1077,
3552,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_datetime_timestamp() {
let to_timestamp =
|y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s).timestamp();
assert_eq!(to_timestamp(1969, 12, 31, 23, 59, 59), -1);
assert_eq!(to_timestamp(1970, 1, 1, 0, 0, 0), 0);
assert_eq!(to_timestamp(19... | rust_cleaned_test_functions.jsonl/76824 | {
"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,
28943,
23073,
368,
341,
286,
1077,
311,
23073,
4035,
310,
760,
88,
11,
296,
11,
294,
11,
305,
11,
308,
11,
274,
91,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7021,
11,
296,
11,
294,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_magnitude() {
let cases = vec![
("[[1,2],[[3,4],5]]", 143),
("[[[[0,7],4],[[7,8],[6,0]]],[8,1]]", 1384),
("[[[[1,1],[2,2]],[3,3]],[4,4]]", 445),
("[[[[3,0],[5,3]],[4,4]],[5,5]]", 791),
("[[[[5,0],[7,4]],[5,5]],[6,6]]", 1137),
... | rust_cleaned_test_functions.jsonl/5208 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
34715,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
15505,
16,
11,
17,
14955,
58,
18,
11,
19,
1125,
20,
5053,
497,
220,
16,
19,
18,
1326,
310,
3489,
15505,
15505,
15,
11,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_concat_incompatible_datatypes() -> Result<()> {
let re = concat(&[
&PrimitiveArray::<Int64Type>::from(vec![Some(-1), Some(2), None]),
&StringArray::from(vec![Some("hello"), Some("bar"), Some("world")]),
]);
assert!(re.is_err());
Ok(())
... | rust_cleaned_test_functions.jsonl/25087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57478,
1243,
34842,
15353,
60913,
368,
1464,
5714,
71698,
341,
286,
1077,
312,
284,
33720,
2099,
9640,
310,
609,
33313,
1857,
27638,
1072,
21,
19,
929,
6831,
1499,
25592,
20703,
8373,
4080,
16,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_no_wait() {
let nav = DummyNavigation::new();
let _ = nav
.send_goal_pose(
Isometry2::new(Vector2::new(1.0, 2.0), 3.0),
"",
std::time::Duration::default(),
)
.unwrap();
let current_go... | rust_cleaned_test_functions.jsonl/107021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
6536,
18760,
368,
341,
286,
1077,
8075,
284,
50567,
16399,
486,
931,
543,
286,
1077,
716,
284,
8075,
198,
310,
659,
6681,
41264,
33201,
1006,
394,
2160,
6988,
17,
486,
931,
20258,
17,
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_op_gt() {
let val1 = Factorial(5);
assert_eq!(val1.repr().expect("failed to represent math context"), "5!");
let val2 = Factorial(3);
assert_eq!(val2.repr().expect("failed to represent math context"), "3!");
// divide the contextual equivalent of val1 by... | rust_cleaned_test_functions.jsonl/122674 | {
"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,
10287,
37479,
368,
341,
286,
1077,
1044,
16,
284,
37729,
530,
7,
20,
317,
286,
2060,
10714,
10297,
831,
16,
1327,
649,
1005,
17119,
445,
16091,
311,
4009,
6888,
2266,
3975,
330,
20,
57073,
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_saturating_add_uint() {
use uint::max_value;
assert_eq!(3u.saturating_add(5u), 8u);
assert_eq!(3u.saturating_add(max_value-1), max_value);
assert_eq!(max_value.saturating_add(max_value), max_value);
assert_eq!((max_value-2).saturating_add(1), max_value-1);... | rust_cleaned_test_functions.jsonl/12465 | {
"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,
643,
2628,
1095,
2891,
15807,
368,
341,
286,
990,
2622,
486,
2810,
3142,
280,
286,
2060,
10714,
10297,
18,
84,
514,
2628,
1095,
2891,
7,
20,
84,
701,
220,
23,
84,
317,
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... | 1 |
#[test]
fn test_property_expansion_2() {
let doc_text = br#"<div></div>"#;
let css_text = br#"
div {
margin: 1px 2px;
}
"#;
let (doc, stylesheet,stree,lbox, rbox) = standard_test_run(doc_text, css_text).unwrap();
let snode = stree.root.borrow();
println!("doc... | rust_cleaned_test_functions.jsonl/101344 | {
"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,
16638,
14214,
10501,
62,
17,
368,
341,
262,
1077,
4629,
4326,
284,
1411,
2,
22476,
611,
1472,
611,
9877,
2,
280,
262,
1077,
15877,
4326,
284,
1411,
2,
698,
286,
3429,
341,
310,
4745,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_one_cpu_newline() {
let mut file = new_file("10\n");
let set = parse_cpus_from_sysfile(&mut file).expect("Failed to file");
assert_eq!(set, [10,].iter().map(|x| *x).collect());
} | rust_cleaned_test_functions.jsonl/109209 | {
"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,
11667,
21795,
5921,
1056,
368,
341,
286,
1077,
5206,
1034,
284,
501,
2458,
445,
16,
15,
1699,
797,
286,
1077,
738,
284,
4715,
90673,
5673,
20344,
1192,
2099,
6984,
1034,
568,
17119,
445,
9408,
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_exchange_trade_to_token_account() {
solana_logger::setup();
let (bank, mint_keypair) = create_bank(10_000);
let (client, owner) = create_client(bank, mint_keypair);
let profit = create_token_account(&client, &owner);
let (to_trade, _) = trade(
... | rust_cleaned_test_functions.jsonl/112521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 959
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
52162,
2346,
6458,
13500,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
320,
17033,
11,
28337,
3097,
12670,
8,
284,
1855,
35733,
7,
16,
15,
62,
15,
15,
15,
317,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stop_activating_after_deactivation() {
analog_logger::setup();
let stake = Delegation {
stake: 1_000,
activation_epoch: 0,
deactivation_epoch: 3,
..Delegation::default()
};
let base_stake = 1_000;
let mut st... | rust_cleaned_test_functions.jsonl/15288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
71684,
1095,
19844,
2259,
23002,
368,
341,
286,
23400,
27413,
486,
15188,
543,
286,
1077,
18279,
284,
1581,
87566,
341,
310,
18279,
25,
220,
16,
62,
15,
15,
15,
345,
310,
15099,
20682,
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... | 6 |
#[test]
fn test_bracket_syntax_failure() {
let scenario = TestScenario::new("[");
let mut ucmd = scenario.ucmd();
ucmd.args(&["1", "-eq", "2", "]"]).run().status_code(1);
} | rust_cleaned_test_functions.jsonl/11038 | {
"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,
17682,
5709,
78894,
43618,
368,
341,
262,
1077,
15048,
284,
3393,
54031,
486,
931,
10937,
797,
262,
1077,
5206,
575,
8710,
284,
15048,
56334,
2277,
1428,
262,
575,
8710,
16365,
2099,
1183,
16,
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 |
#[test]
fn test_mmap_insert_region() {
let region_size = 0x1000;
let regions = vec![
(GuestAddress(0x0), region_size),
(GuestAddress(0x10_0000), region_size),
];
let gm = Arc::new(GuestMemoryMmap::from_ranges(®ions).unwrap());
let mem_orig = gm.... | rust_cleaned_test_functions.jsonl/63927 | {
"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,
717,
2186,
17678,
20627,
368,
341,
286,
1077,
5537,
2368,
284,
220,
15,
87,
16,
15,
15,
15,
280,
286,
1077,
13604,
284,
7486,
90515,
310,
320,
37804,
4286,
7,
15,
87,
15,
701,
5537,
2368,
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_pwhash_verify_tamper() {
use randombytes::randombytes;
for i in 0..16usize {
let mut pw = randombytes(i);
let pwh = pwhash(&pw, OpsLimit(16), MemLimit(8192)).unwrap();
for j in 0..pw.len() {
pw[j] ^= 0x20;
assert... | rust_cleaned_test_functions.jsonl/134460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
1312,
988,
35638,
528,
309,
712,
368,
341,
286,
990,
4194,
9651,
486,
11463,
9651,
280,
286,
369,
600,
304,
220,
15,
496,
16,
21,
51878,
341,
310,
1077,
5206,
26581,
284,
4194,
9651,
1956... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gc_eval() {
let mut circ = Circuit::parse("circuits/AES-non-expanded.txt").unwrap();
let (en, gc) = garble(&mut circ).unwrap();
let gb = en.encode_garbler_inputs(&vec![0u16; 128]);
let ev = en.encode_evaluator_inputs(&vec![0u16; 128]);
gc.eval(&mut circ, &... | rust_cleaned_test_functions.jsonl/101185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49423,
21296,
368,
341,
286,
1077,
5206,
4225,
284,
27218,
486,
6400,
445,
43298,
11797,
10360,
1570,
98700,
30036,
3909,
1827,
15454,
543,
286,
1077,
320,
268,
11,
22122,
8,
284,
7364,
891,
2099,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reject_proposal_during_leader_transfer() {
let mut cluster = new_node_cluster(0, 2);
let pd_client = cluster.pd_client.clone();
pd_client.disable_default_operator();
let r = cluster.run_conf_change();
pd_client.must_add_peer(r, new_peer(2, 2));
// Don't allow leader tran... | rust_cleaned_test_functions.jsonl/50881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
583,
21663,
32556,
814,
1677,
79991,
35403,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
17,
317,
262,
1077,
7744,
8179,
284,
10652,
556,
67,
8179,
15997,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_aligned_attr() {
let ir = ir_from_cc("struct SomeStruct {} __attribute__((aligned(64)));").unwrap();
assert_ir_matches! {ir, quote! {
Record {
... rs_name: "SomeStruct" ...
... override_alignment: true ...
}}
};
} | rust_cleaned_test_functions.jsonl/37228 | {
"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,
66385,
10422,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
445,
1235,
4329,
9422,
4687,
1304,
9116,
30409,
47142,
7,
21,
19,
47563,
1827,
15454,
1428,
262,
2060,
51433,
38344,
0,
314,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kw() {
let kw = "while";
assert!(Symbol::intern(kw).is_kw());
let not_kw = "Tiger";
assert!(!Symbol::intern(not_kw).is_kw());
} | rust_cleaned_test_functions.jsonl/93225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64496,
368,
341,
286,
1077,
29525,
284,
330,
3472,
876,
286,
2060,
10297,
15090,
486,
55444,
5969,
86,
568,
285,
64496,
5231,
286,
1077,
537,
64496,
284,
330,
51,
7272,
876,
286,
2060,
0,
3471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_two_channel() {
let commands = super::channels_to_commands(
&vec![
"spot/trade:BTC-USDT".to_string(),
"ticker/trade:BTC-USDT".to_string(),
],
true,
);
assert_eq!(1, commands.len());
assert_eq!(
... | rust_cleaned_test_functions.jsonl/9440 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
14571,
368,
341,
286,
1077,
11293,
284,
2256,
486,
32425,
2346,
44151,
1006,
310,
609,
4083,
90515,
394,
330,
18648,
21485,
1021,
25,
59118,
32340,
10599,
3263,
983,
3904,
3148,
394,
330,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_chain() {
let driver_mem = IdentityDriverMem::new();
let mut state = TestQueue::new(32, &driver_mem);
// Get memory for two descriptors so we can build our custom chain.
let desc1 = driver_mem.new_range(10).unwrap();
let desc2 = driver_mem.new_range(2... | rust_cleaned_test_functions.jsonl/22570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 501
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
30583,
368,
341,
286,
1077,
5579,
12976,
284,
26540,
11349,
18816,
486,
931,
543,
286,
1077,
5206,
1584,
284,
3393,
7554,
486,
931,
7,
18,
17,
11,
609,
12521,
12976,
626,
286,
442,
2126,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_missing_response() {
let res_body = vec![1, 2, 3];
let mut mock = MockHttpRequest::new(Response::new(res_body.clone().into()));
block_on(async {
let response = await!(mock.request(Request::default())).unwrap();
assert_eq!(res_body, await!(response_to_vec(response)));
... | rust_cleaned_test_functions.jsonl/80646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
9655,
368,
341,
262,
1077,
592,
14114,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
935,
262,
1077,
5206,
7860,
284,
14563,
26362,
486,
931,
47979,
486,
931,
4590,
14114,
15997,
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 |
#[test]
fn test_chmod_octal() {
let tests = vec!{
TestCase{args: vec!{"0700", TEST_FILE}, before: 0o000, after: 0o700},
TestCase{args: vec!{"0070", TEST_FILE}, before: 0o000, after: 0o070},
TestCase{args: vec!{"0007", TEST_FILE}, before: 0o000, after: 0o007},
// Known fail... | rust_cleaned_test_functions.jsonl/95243 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
2593,
70135,
278,
368,
341,
262,
1077,
7032,
284,
7486,
0,
515,
286,
30573,
90,
2116,
25,
7486,
0,
4913,
15,
22,
15,
15,
497,
220,
13602,
8087,
2137,
1573,
25,
220,
15,
78,
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_solid_onig_null_invert() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-sv","-Gog", "\\d+", "tr", "[:upper:]", "[:lower:]"])
.write_stdin("ABC123EFG\0\nHIJKLM456")
.assert()
.stdout("abc123efg\0\nh... | rust_cleaned_test_functions.jsonl/7908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
5192,
4470,
343,
15162,
1243,
1621,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_divide_nan() {
let x = Complex::new(3.0, 4.0);
let y_double: f64 = f64::NAN;
let y_complex = Complex::new_real(y_double);
assert!(x.divide(&y_complex) == x.divide_f64(y_double));
} | rust_cleaned_test_functions.jsonl/43848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
16237,
577,
73936,
368,
341,
286,
1077,
856,
284,
22096,
486,
931,
7,
18,
13,
15,
11,
220,
19,
13,
15,
317,
286,
1077,
379,
24598,
25,
282,
21,
19,
284,
282,
21,
19,
486,
45,
1093,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_frame_length() {
let header1 = [0x9c, 0xBD, 0x35, 0xA2];
const HEADER1_FRAMELEN: usize = 119;
let head = SbcHeader(Player::as_u32_le(&header1));
assert!(head.has_syncword());
assert_eq!(16, head.blocks());
assert_eq!(ChannelMode::JointSter... | rust_cleaned_test_functions.jsonl/5507 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8929,
5118,
368,
341,
1789,
286,
1077,
4247,
16,
284,
508,
15,
87,
24,
66,
11,
220,
15,
81803,
11,
220,
15,
87,
18,
20,
11,
220,
15,
14673,
17,
935,
286,
733,
39665,
16,
22260,
25317,
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... | 1 |
#[test]
fn test_invalid_option() {
let err = OptParseError::invalid_option("--abc");
let thing = format!("{}", err);
let expect = "Invalid option: --abc";
assert_eq!(thing, expect);
} | rust_cleaned_test_functions.jsonl/8270 | {
"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,
31433,
9672,
368,
341,
286,
1077,
1848,
284,
16554,
14463,
1454,
486,
11808,
9672,
21549,
13683,
797,
286,
1077,
3166,
284,
3561,
79878,
1848,
317,
286,
1077,
1720,
284,
330,
7928,
2999,
25,
1177,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trait() {
check_assist_not_applicable(
add_missing_impl_members,
r#"
trait Foo;
struct S;
impl Foo for S { <|> }"#,
)
} | rust_cleaned_test_functions.jsonl/110450 | {
"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,
15124,
78491,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
435,
2,
698,
29432,
33428,
280,
1235,
328,
280,
6383,
33428,
369,
328,
314,
82639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_system_version() {
println!("NCA test...");
let keyset = key::Keyset::from(File::open("prod.keys").unwrap()).unwrap();
for entry in read_dir("registered").unwrap() {
if let Ok(dir_entry) = entry {
println!("Reading system NCA: {:?}", dir... | rust_cleaned_test_functions.jsonl/80665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
17687,
9438,
368,
341,
286,
13751,
17223,
45,
5049,
1273,
93047,
286,
1077,
1376,
746,
284,
1376,
486,
1592,
746,
486,
1499,
19821,
486,
2508,
445,
19748,
9123,
1827,
15454,
6011,
15454,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bed_from_pos() {
let pos = Pos::new("chrXI".to_owned(), 334412, ReqStrand::Reverse);
let record = Record::from(pos);
assert_eq!(record.chrom(), String::from("chrXI"));
assert_eq!(record.start(), 334412);
assert_eq!(record.end(), 334412 + 1);
asse... | rust_cleaned_test_functions.jsonl/3950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89079,
5673,
6479,
368,
341,
286,
1077,
1133,
284,
18876,
486,
931,
445,
16789,
83114,
3263,
983,
51973,
1507,
220,
18,
18,
19,
19,
16,
17,
11,
82458,
2580,
437,
486,
45695,
626,
286,
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_message_unique_keys_one_readonly_signed() {
let program_id = Pubkey::default();
let id0 = Pubkey::default();
let keys = get_keys(
&[
Instruction::new_with_bincode(
program_id,
&0,
vec!... | rust_cleaned_test_functions.jsonl/55521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
21218,
12631,
11667,
6443,
3243,
55617,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
2258,
543,
286,
1077,
877,
15,
284,
22611,
792,
486,
2258,
543,
286,
1077,
6894,
284,
633,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_config_manager__config_dir_path() -> TestResult {
let cm = ConfigManager {};
let (_config_dir, tmp_dir) = set_config_dir()?;
let actual = cm.config_dir_path().unwrap();
let expected = tmp_dir
.path()
.join(".eureka")
.into_os_s... | rust_cleaned_test_functions.jsonl/81009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
12144,
563,
1676,
4334,
2638,
368,
1464,
3393,
2077,
341,
286,
1077,
9961,
284,
5532,
2043,
9321,
286,
1077,
5453,
1676,
4334,
11,
4174,
4334,
8,
284,
738,
5332,
4334,
368,
69493,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_credential_def_real() {
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE, "false");
let wallet_name = "test_create_credential_def_real";
::utils::devsetup::tests::setup_ledger_env(wallet_name);
let data = r#"["address1","address2","zip","city",... | rust_cleaned_test_functions.jsonl/67964 | {
"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,
8657,
666,
30320,
7844,
15266,
368,
341,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
11,
330,
3849,
797,
286,
1077,
15085,
1269,
284,
330,
1944,
8657,
666,
30320,
7844,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tx_unbounded_idle_select() {
use futures::{pin_mut, select, FutureExt};
let mut rt = tokio::runtime::Builder::new().threaded_scheduler().enable_all().core_threads(2).build().unwrap();
let (_tx, rx_f) = unbounded_future::<i32>();
async fn loop_fn() {
... | rust_cleaned_test_functions.jsonl/130183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 716
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
4907,
65686,
47810,
13051,
368,
1476,
286,
990,
36823,
22964,
13273,
29523,
11,
3293,
11,
12498,
6756,
2315,
286,
1077,
5206,
16677,
284,
9628,
815,
486,
22255,
486,
3297,
486,
931,
1005,
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_fallback_gzip() {
let client = Client::new(rocket()).expect("valid rocket instance");
let mut response = client
.get("/")
.header(Header::new("Accept-Encoding", "deflate, gzip"))
.dispatch();
assert_eq!(response.status(), Status::Ok);
... | rust_cleaned_test_functions.jsonl/107454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
3420,
1889,
9964,
368,
341,
286,
1077,
2943,
284,
8423,
486,
931,
7,
46790,
6011,
17119,
445,
1891,
24306,
2867,
797,
286,
1077,
5206,
2033,
284,
2943,
198,
310,
659,
455,
61710,
310,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_call_hierarchy_incoming_outgoing() {
check_hierarchy(
r#"
//- /lib.rs
fn caller1() {
call$0er2();
}
fn caller2() {
caller3();
}
fn caller3() {
}
"#,
"caller2 Function FileId(0) 33..64 36..43",
&["caller1 Function FileId(0) 0..31 3..10 : [19.... | rust_cleaned_test_functions.jsonl/739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
95043,
1243,
4959,
6068,
9546,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
8822,
19865,
16,
368,
341,
262,
1618,
3,
15,
261,
17,
543,
630,
8822,
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_off_curve_pubkey_verify_fails() {
// Golden point off the ed25519 curve
let off_curve_bytes = bs58::decode("9z5nJyQar1FUxVJxpBXzon6kHehbomeYiDaLi9WAMhCq")
.into_vec()
.unwrap();
// Confirm golden's off-curvedness
let mut off_curve_bits = [... | rust_cleaned_test_functions.jsonl/29193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13651,
43407,
34014,
792,
35638,
761,
6209,
368,
341,
286,
442,
17809,
1459,
1007,
279,
1578,
17,
20,
20,
16,
24,
15655,
198,
286,
1077,
1007,
43407,
12524,
284,
17065,
20,
23,
486,
18196,
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_command() {
let command = Command::parse("push argument 1 //foo").unwrap();
assert_eq!(command, Command::Push(Segment::Argument, 1));
let command = Command::parse("add //foo").unwrap();
assert_eq!(command, Command::Add);
} | rust_cleaned_test_functions.jsonl/132601 | {
"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,
10811,
368,
341,
286,
1077,
3210,
284,
7348,
486,
6400,
445,
9077,
5693,
220,
16,
442,
7975,
1827,
15454,
543,
286,
2060,
10714,
10297,
5631,
11,
7348,
486,
16644,
3759,
71080,
486,
9171,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_camel_case() {
let s = "a_lint";
let s2 = to_camel_case(s);
assert_eq!(s2, "ALint");
let name = "a_really_long_new_lint";
let name2 = to_camel_case(name);
assert_eq!(name2, "AReallyLongNewLint");
let name3 = "lint__name";
let name4 = to_camel_case(name3);
as... | rust_cleaned_test_functions.jsonl/28510 | {
"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,
666,
35562,
19096,
368,
341,
262,
1077,
274,
284,
330,
64,
907,
396,
876,
262,
1077,
274,
17,
284,
311,
666,
35562,
19096,
1141,
317,
262,
2060,
10714,
10297,
82,
17,
11,
330,
969,
396,
3071,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_exp() {
assert_eq!(1.0, 0.0f64.exp());
assert_approx_eq!(2.718282, 1.0f64.exp());
assert_approx_eq!(148.413159, 5.0f64.exp());
let inf: f64 = Float::infinity();
let neg_inf: f64 = Float::neg_infinity();
let nan: f64 = Float::nan();
assert_... | rust_cleaned_test_functions.jsonl/7447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14214,
368,
341,
286,
2060,
10714,
10297,
16,
13,
15,
11,
220,
15,
13,
15,
69,
21,
19,
13754,
1423,
286,
2060,
90425,
10714,
10297,
17,
13,
22,
16,
23,
17,
23,
17,
11,
220,
16,
13,
15,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_network_home_get_accounts_path() {
let dir = tempdir().unwrap();
let network_home = NetworkHome::new(dir.path().join("localhost").as_path());
let correct_dir = dir.path().join("localhost/accounts");
assert_eq!(correct_dir, network_home.get_accounts_path());
} | rust_cleaned_test_functions.jsonl/39529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
21653,
3062,
55665,
2638,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
3922,
21653,
284,
8141,
7623,
486,
931,
14161,
3875,
1005,
5987,
445,
8301,
1827,
300,
263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersection() {
let mut w = World::default();
let ds = get_default_spheres();
w.objects = vec![Box::new(ds[0].clone()), Box::new(ds[1].clone())];
let r = Ray {
origin: Tuple::point(0.0, 0.0, -5.0),
direction: Tuple::vector(0.0, 0.0, 1.0),... | rust_cleaned_test_functions.jsonl/45907 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82558,
368,
341,
286,
1077,
5206,
289,
284,
4337,
486,
2258,
543,
286,
1077,
11472,
284,
633,
9993,
643,
64633,
543,
286,
289,
8383,
284,
7486,
20703,
1611,
486,
931,
33783,
58,
15,
936,
19982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_angle_y() {
let angle = Degrees(72_f64);
let rotation = Rotation3::from_angle_y(angle);
let expected = Isometry3::from_rotation(&rotation);
let result = Isometry3::from_angle_y(angle);
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/77233 | {
"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,
5673,
21727,
4178,
368,
341,
286,
1077,
9210,
284,
92901,
7,
22,
17,
761,
21,
19,
317,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
4178,
29633,
317,
286,
1077,
3601,
284,
2160,
6988,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extend_chars() {
let example = "hello";
let mut arc = ArcString::from(example);
arc.extend(" world!".chars());
assert_eq!(arc.as_str(), "hello world!");
assert_eq!(arc.len(), 12);
} | rust_cleaned_test_functions.jsonl/79121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
37418,
368,
341,
286,
1077,
3110,
284,
330,
14990,
876,
286,
1077,
5206,
15580,
284,
19689,
703,
486,
1499,
66203,
626,
286,
15580,
15831,
445,
1879,
92993,
19255,
5231,
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 |
#[test]
fn test_parse_bool() {
assert_parses::<bool>(&[
(Ok(true), b"\x01\x01\xff"),
(Ok(false), b"\x01\x01\x00"),
(
Err(ParseError::new(ParseErrorKind::InvalidValue)),
b"\x01\x00",
),
(
Err(Parse... | rust_cleaned_test_functions.jsonl/40822 | {
"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,
21039,
22159,
368,
341,
286,
2060,
77113,
288,
27638,
2641,
44784,
9640,
310,
320,
11578,
3715,
701,
293,
11934,
87,
15,
16,
3462,
15,
16,
86977,
4461,
310,
320,
11578,
3576,
701,
293,
11934,
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_47() {
assert_eq!(
Solution::permute(vec![1,1,2]),
vec![
vec![2,1,1],
vec![1,2,1],
vec![1,1,2],
]
);
assert_eq!(
Solution::permute(vec![1,1,1]),
vec![
... | rust_cleaned_test_functions.jsonl/12397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
19,
22,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
19913,
1070,
25592,
20703,
16,
11,
16,
11,
17,
17036,
310,
7486,
90515,
394,
7486,
20703,
17,
11,
16,
11,
16,
1259,
394,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_set() {
//= type=test
//# protection keys for receiving packets: the current and the next.
let keyset = KeySet::new(TestKey::default(), Default::default());
assert_eq!(keyset.crypto[KeyPhase::Zero].key().derivations, 0);
assert_eq!(... | rust_cleaned_test_functions.jsonl/61045 | {
"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,
3097,
2602,
368,
341,
1789,
286,
95517,
943,
53538,
8945,
286,
49780,
9135,
6894,
369,
12308,
27035,
25,
279,
1482,
323,
279,
1790,
382,
286,
1077,
1376,
746,
284,
5309,
1649,
486,
931,
31159,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_process_store_with_additional_signers() {
solana_logger::setup();
let pubkey = solana_sdk::pubkey::new_rand();
let signer0_pubkey = solana_sdk::pubkey::new_rand();
let signer1_pubkey = solana_sdk::pubkey::new_rand();
let keys = vec![
(pubkey, f... | rust_cleaned_test_functions.jsonl/4688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 791
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
14809,
6615,
81742,
11172,
388,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
95116,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
70039,
15,
3401... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shift_down() {
let mut buffer = setup_buffer("Test\nA\nTest");
buffer.set_mark(Mark::Cursor(0), 2);
buffer.shift_mark(Mark::Cursor(0), Direction::Down, 2);
assert_eq!(buffer.get_mark_coords(Mark::Cursor(0)).unwrap(), (2, 2));
} | rust_cleaned_test_functions.jsonl/94756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22230,
13998,
368,
341,
286,
1077,
5206,
4147,
284,
6505,
7776,
445,
2271,
1699,
32,
1699,
2271,
797,
286,
4147,
980,
18924,
3189,
838,
486,
14543,
7,
15,
701,
220,
17,
317,
286,
4147,
29154,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fetch_prune_deleted_ref() {
let test_data = GitRepoData::create();
empty_git_commit(&test_data.git_repo, "refs/heads/main", &[]);
let mut tx = test_data.repo.start_transaction("test");
git::fetch(tx.mut_repo(), &test_data.git_repo, "origin").unwrap();
// Test the setup
a... | rust_cleaned_test_functions.jsonl/96067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
5294,
2886,
39418,
7793,
368,
341,
262,
1077,
1273,
1769,
284,
21120,
25243,
1043,
486,
3182,
543,
262,
4287,
68801,
36346,
2099,
1944,
1769,
32799,
37784,
11,
330,
16149,
14,
35810,
15351,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_user_facing_error_impl_for_database_creation_failed() {
assert_eq!(DatabaseCreationFailed::ERROR_CODE, "P3000");
let error = DatabaseCreationFailed {
database_error: "oops".to_string(),
};
assert_eq!(error.message(), "Failed to create database: oops"... | rust_cleaned_test_functions.jsonl/14529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
761,
4527,
4096,
21007,
5478,
27341,
46163,
35060,
368,
341,
286,
2060,
10714,
10297,
5988,
32701,
9408,
486,
3682,
10020,
11,
330,
47,
18,
15,
15,
15,
3071,
286,
1077,
1465,
284,
9994,
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_accountsdb_flatten_hash_intermediate2() {
solana_logger::setup();
// data is ordered:
// vec: just a level of hierarchy
// vec: 1 vec per PUBKEY_BINS_FOR_CALCULATING_HASHES
// vec: Intermediate data whose pubkey belongs in this division
let b... | rust_cleaned_test_functions.jsonl/17809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1640
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
5081,
14456,
8950,
15318,
14636,
17,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
442,
821,
374,
11457,
510,
286,
442,
7486,
25,
1101,
264,
2188,
315,
28922,
198,
286,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_upwards_path_argument() {
let tmp = tmptree! {
justfile: "default:\n\techo ok",
a: {
justfile: "default:\n\techo bad",
},
};
search_test(&tmp.path().join("a"), &["../"]);
search_test(&tmp.path().join("a"), &["../default"]);
} | rust_cleaned_test_functions.jsonl/13377 | {
"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,
8237,
4014,
2638,
9025,
368,
341,
262,
1077,
4174,
284,
17333,
417,
765,
0,
341,
414,
1101,
1192,
25,
330,
2258,
7190,
77,
59,
665,
958,
5394,
756,
414,
264,
25,
341,
286,
1101,
1192,
25,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_floats_and_ints2() {
for numeric_sort_param in ["-n", "--numeric-sort"] {
let input = "1.444\n8.013\n1\n-8\n1.04\n-1";
new_ucmd!()
.arg(numeric_sort_param)
.pipe_in(input)
.succeeds()
.stdout_only("-8\n-1\n1\n1.04\n1.444... | rust_cleaned_test_functions.jsonl/20491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29418,
17586,
82,
8378,
4042,
82,
17,
368,
341,
262,
369,
24064,
18435,
4090,
304,
4383,
12,
77,
497,
14482,
19600,
46540,
1341,
341,
286,
1077,
1946,
284,
330,
16,
13,
19,
19,
19,
1699,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_literal() {
assert_eq!(js_parser_rs::parse("true".chars()), Ok(vec![TokenType::Literal(LiteralType::Boolean(true))]));
assert_eq!(js_parser_rs::parse("false".chars()), Ok(vec![TokenType::Literal(LiteralType::Boolean(false))]));
assert_eq!(js_parser_rs::parse("null".chars()), Ok(vec![... | rust_cleaned_test_functions.jsonl/61521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34100,
368,
341,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
445,
1866,
3263,
19255,
11858,
7622,
25592,
20703,
75611,
486,
17350,
4957,
9953,
929,
486,
6890,
3715,
593,
14382,
262,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero() {
check_euler(Euler {
x: Rad(0f32),
y: Rad(0f32),
z: Rad(0f32),
});
} | rust_cleaned_test_functions.jsonl/38244 | {
"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,
19359,
368,
341,
286,
1779,
2204,
8479,
10722,
8479,
341,
310,
856,
25,
20605,
7,
15,
69,
18,
17,
1326,
310,
379,
25,
20605,
7,
15,
69,
18,
17,
1326,
310,
1147,
25,
20605,
7,
15,
69,
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 |
#[test]
fn test_complete_node_outputs() {
let src = (Node::new_node(&"a"), vec![], vec![], vec![]);
let dst = (
Node::new_node(&"b"),
vec![
InputMapping {
from: Port {
node: Node::In,
port... | rust_cleaned_test_functions.jsonl/23961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 759
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27675,
5084,
35189,
368,
341,
286,
1077,
2286,
284,
320,
1955,
486,
931,
5084,
2099,
1,
64,
3975,
7486,
0,
12995,
7486,
0,
12995,
7486,
0,
56703,
286,
1077,
10648,
284,
2399,
310,
6018,
486,
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_nil_renders_as_empty_string() {
assert_template_result!(r#""#, r#"{{ nil }}"#);
assert_template_result!(r#"cat"#, r#"{{ nil | append: 'cat' }}"#);
} | rust_cleaned_test_functions.jsonl/72883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36175,
1288,
303,
388,
11898,
15124,
3904,
368,
341,
262,
2060,
8693,
5287,
10297,
81,
2,
3014,
60778,
435,
55543,
2979,
2092,
14483,
2,
626,
262,
2060,
8693,
5287,
10297,
81,
55543,
4616,
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 |
#[test]
fn test_get_script_type() {
let p2pkh = hex_script("76a91437d8a6977e2b61459c594c8da713a2aeac7516b188ac");
assert_eq!(get_script_type(&p2pkh), "p2pkh".to_string());
let p2sh = hex_script("a9143545e6e33b832c47050f24d3eeb93c9c03948bc787");
assert_eq!(get_script_type(&p2sh),... | rust_cleaned_test_functions.jsonl/29238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
14660,
1819,
368,
341,
286,
1077,
281,
17,
20819,
71,
284,
12371,
14660,
445,
22,
21,
64,
24,
16,
19,
18,
22,
67,
23,
64,
21,
24,
22,
22,
68,
17,
65,
21,
16,
19,
20,
24,
66,
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_custom_nodes() {
let mut nodes: Vec<CustomNodeInfo> = Vec::new();
nodes.push(CustomNodeInfo {
host: "localhost",
port: 15324,
});
nodes.push(CustomNodeInfo {
host: "localhost",
port: 15325,
});
nodes... | rust_cleaned_test_functions.jsonl/59863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1013
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
14896,
368,
1476,
286,
1077,
5206,
7798,
25,
11312,
27,
10268,
1955,
1731,
29,
284,
11312,
486,
931,
543,
286,
7798,
2552,
3025,
1450,
1955,
1731,
341,
310,
3468,
25,
330,
8301,
756,
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_bad_break() {
assert::fails("break", &["break", "outside of", "loop"]);
assert::fails(
"def foo(x):\n if 1:\n break",
&["break", "outside of", "loop"],
);
assert::fails(
"def foo(x):\n if 1:\n continue",
&["continue", "outside of", "loop"],... | rust_cleaned_test_functions.jsonl/92425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
39494,
368,
341,
262,
2060,
486,
59631,
445,
8960,
497,
609,
1183,
8960,
497,
330,
66990,
315,
497,
330,
10498,
15049,
262,
2060,
486,
59631,
1006,
286,
330,
750,
15229,
2075,
89049,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_single_packet() {
let (mut encoder, mut decoder) =
new_optional_multi_packet_codec::<Vec<BinSafeStr>, RespVec>();
let mut buf = BytesMut::new();
let cmd = OptionalMulti::Single(vec![b"PING1".to_vec()]);
encoder
.encode(cmd, |data| buf.exten... | rust_cleaned_test_functions.jsonl/42452 | {
"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,
19487,
21078,
368,
341,
286,
1077,
320,
6984,
23668,
11,
5206,
24551,
8,
4035,
310,
501,
74644,
25133,
21078,
51084,
27638,
10050,
27,
28794,
25663,
2580,
8066,
79786,
10050,
3913,
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_import_deduplication() {
let mut dataset = dataset!(
routes:
route_id, agency_id, route_short_name, route_type;
1, 1, "S1", 109;
2, 1, "S1", 109
);
let impor... | rust_cleaned_test_functions.jsonl/33305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
814,
291,
454,
1693,
368,
341,
286,
1077,
5206,
10337,
284,
10337,
33673,
310,
11291,
510,
394,
6021,
842,
11,
9088,
842,
11,
6021,
16673,
1269,
11,
6021,
1819,
280,
394,
220,
16,
11,
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_instantiate_operation() {
let nix = nix();
let op = noop(Operation::Instantiate);
assert_eq!(op.to_string(), "nix-instantiate");
let ret: Result<File, File> =
nix.run(
nix.safe_command(op, build_path().as_path(), vec![String::from("--v... | rust_cleaned_test_functions.jsonl/60374 | {
"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,
1243,
42251,
32565,
368,
341,
286,
1077,
308,
941,
284,
308,
941,
543,
286,
1077,
1179,
284,
60829,
96604,
486,
80551,
317,
286,
2060,
10714,
10297,
453,
2389,
3904,
1507,
330,
77,
941,
3419,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_writeln() -> Result<()> {
gchemol_gut::logger::setup_logger_for_test();
let mut lines = String::new();
write!(&mut lines, "this is ")?;
writeln!(&mut lines, "line {}", 1)?;
writeln!(&mut lines, "this is line {}", 2)?;
assert_eq!(lines, "this is line 1\nthis is line 2\n")... | rust_cleaned_test_functions.jsonl/78855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
51097,
368,
1464,
5714,
71698,
341,
262,
342,
2407,
337,
1889,
332,
486,
9786,
486,
15188,
27413,
5478,
4452,
1428,
262,
1077,
5206,
5128,
284,
923,
486,
931,
543,
262,
3270,
0,
2099,
6984... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cmac_compute_verify_with_empty_input() {
let cipher = tink_mac::subtle::AesCmac::new(&get_random_bytes(16), 16).unwrap();
let tag = cipher.compute_mac(&[]).unwrap();
assert!(cipher.verify_mac(&tag, &[]).is_ok());
} | rust_cleaned_test_functions.jsonl/77132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
11948,
57028,
35638,
6615,
15124,
5898,
368,
341,
262,
1077,
31088,
284,
90584,
22802,
486,
1966,
11239,
486,
32,
288,
34,
11948,
486,
931,
2099,
455,
22644,
12524,
7,
16,
21,
701,
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_digits_success_2() {
let res = nom_value!(digits, "012ab".as_bytes());
assert_eq!(res, NumericLiteral::Integer(12));
} | rust_cleaned_test_functions.jsonl/62810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41432,
18632,
62,
17,
368,
972,
286,
1077,
592,
284,
9662,
3142,
10297,
60770,
11,
330,
15,
16,
17,
370,
3263,
300,
12524,
6201,
286,
2060,
10714,
10297,
416,
11,
50367,
17350,
486,
3486,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.