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_statsd_client_as_gauged_u64() {
let client: Box<dyn Gauged<u64>> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.gauge("some.gauge", 32).unwrap();
} | rust_cleaned_test_functions.jsonl/10617 | {
"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,
15381,
67,
8179,
11898,
1889,
19179,
291,
7300,
21,
19,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
18373,
768,
291,
34837,
21,
19,
2452,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sieve_of_eratosthenes() {
let mut starter = setup();
assert_eq!(starter.sieve_of_eratosthenes(2),[2]);
} | rust_cleaned_test_functions.jsonl/121099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
19155,
3575,
80604,
266,
535,
12032,
288,
368,
341,
286,
1077,
5206,
26697,
284,
6505,
543,
286,
2060,
10714,
10297,
31374,
514,
19155,
3575,
80604,
266,
535,
12032,
288,
7,
17,
701,
58,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_no_generic_generate_real_fn_trait_impl() {
let gen = no_generic_fn();
let expected: TokenStream = quote! {
impl<
'arg_,
Arg1_: crate::rpn_expr::function::RpnFnArg<Type = &'arg_ Option<Real> > ,
Arg0_: crate::rpn_expr::fu... | rust_cleaned_test_functions.jsonl/25657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 955
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
41232,
48851,
15266,
15246,
78491,
21007,
368,
341,
286,
1077,
4081,
284,
902,
41232,
15246,
543,
286,
1077,
3601,
25,
9660,
3027,
284,
12641,
0,
341,
310,
11605,
30558,
394,
364,
858,
38386... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_assign_ops_early() {
fold_same("x=x+y");
fold_same("x=y+x");
fold_same("x=x*y");
fold_same("x=y*x");
fold_same("x.y=x.y+z");
fold_same("next().x = next().x + 1");
fold_same("x=x-y");
fold_same("x=y-x");
fold_same("x=x|y");
fold_same("x=y|x");
fold_sam... | rust_cleaned_test_functions.jsonl/122209 | {
"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,
20688,
21959,
62,
22140,
368,
341,
262,
11555,
33574,
445,
87,
25387,
43010,
797,
262,
11555,
33574,
445,
87,
29368,
37892,
797,
262,
11555,
33574,
445,
87,
25387,
33247,
797,
262,
11555,
33574,
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_remove_proposal_allowed() {
let mut context = VMContextBuilder::new();
testing_env!(context.predecessor_account_id(accounts(1)).build());
let mut policy = VersionedPolicy::Default(vec![accounts(1).into()]).upgrade();
policy.to_policy_mut().roles[1]
.pe... | rust_cleaned_test_functions.jsonl/16636 | {
"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,
18193,
21663,
32556,
42155,
368,
341,
286,
1077,
5206,
2266,
284,
17792,
1972,
3297,
486,
931,
543,
286,
7497,
15879,
10297,
2147,
6225,
26911,
269,
13500,
842,
91868,
7,
16,
4579,
5834,
1423,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proc_cpu_parse() {
assert_eq!(
(100_f64, 200_f64),
calculate_idle_values("100 0 100 100".to_string()),
"Failed to properly calculate idle/non-idle for /proc/stat CPU with 4 values"
);
assert_eq!(
(120_f64, 200_f64),
... | rust_cleaned_test_functions.jsonl/24965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 803
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24436,
21795,
21039,
368,
341,
286,
2060,
10714,
33673,
310,
320,
16,
15,
15,
761,
21,
19,
11,
220,
17,
15,
15,
761,
21,
19,
1326,
310,
11047,
47810,
9146,
445,
16,
15,
15,
220,
15,
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... | 1 |
#[test]
fn test_fp2_legendre() {
assert_eq!(Zero, Fp2::zero().legendre());
// i^2 = -1
let mut m1 = Fp2::one();
m1.negate();
assert_eq!(QuadraticResidue, m1.legendre());
m1.mul_by_nonresidue();
assert_eq!(QuadraticNonResidue, m1.legendre());
} | rust_cleaned_test_functions.jsonl/84766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34160,
17,
76612,
265,
368,
341,
286,
2060,
10714,
10297,
17999,
11,
434,
79,
17,
486,
14154,
1005,
14505,
265,
1423,
286,
442,
600,
61,
17,
284,
481,
16,
198,
286,
1077,
5206,
296,
16,
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_tuple_access_faulty_len() {
let spec = "input in: (Int8, Bool)\noutput out: Bool := in[0].2";
assert_eq!(1, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
12759,
70097,
88,
6043,
368,
341,
286,
1077,
1398,
284,
330,
1355,
304,
25,
320,
1072,
23,
11,
12608,
10699,
77,
3006,
700,
25,
12608,
1669,
304,
58,
15,
936,
17,
876,
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 |
#[test]
fn test_align_chunks() {
let a = Int32Chunked::new_from_slice("", &[1, 2, 3, 4]);
let mut b = Int32Chunked::new_from_slice("", &[1]);
let b2 = Int32Chunked::new_from_slice("", &[2, 3, 4]);
b.append(&b2);
let (a, b) = align_chunks_binary(&a, &b);
assert_eq... | rust_cleaned_test_functions.jsonl/86040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37015,
65470,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
28304,
291,
486,
931,
5673,
26488,
19814,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
286,
1077,
5206,
293,
284,
1333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_baking_right_to_json() -> Result<(), Error> {
let er = BakingRights::new(
296781,
SignaturePublicKeyHash::from_b58_hash("tz2BFE2MEHhphgcR7demCGQP2k1zG1iMj1oj")?,
123,
Some(1585207381),
);
let json = er.as_map();
... | rust_cleaned_test_functions.jsonl/30879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1765,
10539,
2346,
9455,
368,
1464,
5714,
68843,
4600,
29,
972,
286,
1077,
2714,
284,
425,
1765,
81875,
486,
931,
7805,
310,
220,
17,
24,
21,
22,
23,
16,
1871,
310,
32232,
61822,
6370,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_for_each_not_applicable() {
check_assist_not_applicable(
convert_iter_for_each_to_for,
r#"
//- minicore: iterators
fn main() {
().$0for_each(|x| println!("{}", x));
}"#,
)
} | rust_cleaned_test_functions.jsonl/101852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
32046,
7913,
8191,
46114,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
5508,
11723,
5478,
32046,
2346,
5478,
345,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
90865,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_and_reboot_success() {
let mut executor = fasync::TestExecutor::new_with_fake_time().unwrap();
// Create a mock reboot service.
let (sender, recv) = oneshot::channel();
let sender = Arc::new(Mutex::new(Some(sender)));
let mock = Arc::new(MockRebootSe... | rust_cleaned_test_functions.jsonl/114354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 961
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
8378,
1288,
4619,
18632,
368,
341,
286,
1077,
5206,
31558,
284,
282,
7692,
486,
2271,
25255,
486,
931,
6615,
56881,
3009,
1005,
15454,
1428,
286,
442,
4230,
264,
7860,
34592,
2473,
624,
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... | 6 |
#[test]
fn test_store_waits_for_stash() {
let mut exec = fasync::Executor::new().expect("failed to create executor");
let temp_dir = TempDir::new().expect("failed to create temporary directory");
let path = temp_dir.path().join(rand_string());
let tmp_path = temp_dir.path().join(... | rust_cleaned_test_functions.jsonl/122667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 607
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
1670,
56479,
5478,
1261,
988,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
31558,
797,
286,
1077,
2730,
4334,
284,
19944,
6184,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nice_hash_api() {
let ctx = TestContext::new();
let con = ctx.connection();
assert_eq!(con.hset_multiple("my_hash", [
("f1", 1i),
("f2", 2i),
("f3", 4i),
("f4", 8i),
][]), Ok(()));
let hm : HashMap<String, int> = con.hgetall("my_hash").unwrap... | rust_cleaned_test_functions.jsonl/31508 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 738
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
558,
8950,
11697,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
390,
284,
5635,
20310,
1428,
262,
2060,
10714,
10297,
443,
860,
746,
45233,
445,
2408,
8950,
497,
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_get_path_function() -> Result<()> {
let tests = vec![
ScalarFunctionTest {
name: "get_path",
columns: vec![
Series::from_data(vec![
VariantValue::from(json!({"a":[[1_i32],[2_i32]],"o":{"p":{"q":"r"}}})),
... | rust_cleaned_test_functions.jsonl/114578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 895
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2638,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
35176,
5152,
2271,
341,
310,
829,
25,
330,
455,
2638,
756,
310,
8147,
25,
7486,
90515,
394,
11131,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_count_of_required_peers_extreme() {
let m = usize::max_value();
let m2 = m / 2;
let vals = &[0, 1, m2 - 1, m2, m2 + 1, m - 1, m];
for curr in vals {
for low in vals {
for high in vals {
check_count_of_required_peers... | rust_cleaned_test_functions.jsonl/125918 | {
"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,
3180,
3575,
18743,
36367,
388,
9927,
9634,
368,
341,
286,
1077,
296,
284,
22301,
486,
2810,
3142,
543,
286,
1077,
296,
17,
284,
296,
608,
220,
17,
280,
286,
1077,
28356,
284,
44590,
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... | 4 |
#[test]
fn test_iter() {
let path = reset("iter");
let cfg = Config::new(path.clone());
let store = Store::new(cfg).unwrap();
let bucket = store.bucket::<Integer, String>(None).unwrap();
assert!(path::Path::new(path.as_str()).exists());
for i in 0..100 {
bucket.set(i, format!("... | rust_cleaned_test_functions.jsonl/111961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
368,
341,
262,
1077,
1815,
284,
7585,
445,
2015,
3071,
262,
1077,
13286,
284,
5532,
486,
931,
5581,
15997,
1423,
262,
1077,
3553,
284,
9129,
486,
931,
28272,
568,
15454,
543,
262,
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... | 2 |
#[test]
fn test_sign_transaction() {
let public_key = "037D37332B158AC75D7BA8E7EF1F3F4C7C0FA7B4BD8818B9C03545D3AED40BB3A9";
let secret_key = "165F2F406B5DCC37E666B7A0C9686CD4C92B67D5D362C618A96627E394F2FF45";
let public_key = hex::decode(public_key).unwrap();
let secret_key = he... | rust_cleaned_test_functions.jsonl/101431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 890
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
28884,
368,
341,
286,
1077,
584,
3097,
284,
330,
15,
18,
22,
35,
18,
22,
18,
18,
17,
33,
16,
20,
23,
1706,
22,
20,
35,
22,
7064,
23,
36,
22,
14884,
16,
37,
18,
37,
19,
34,
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_change_global_option() {
test_harness(|| unsafe {
library_init();
let session = get_session();
assert_eq!(
change_global_option(
session,
&vec![KeyVal {
key: "file-allocation".into(),
... | rust_cleaned_test_functions.jsonl/25967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
19296,
9672,
368,
341,
262,
1273,
1523,
23518,
79453,
19860,
341,
286,
6733,
6137,
543,
286,
1077,
3797,
284,
633,
12316,
1428,
286,
2060,
10714,
33673,
310,
2297,
19296,
9672,
1006,
394,
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... | 2 |
#[test]
fn test_capture_to_variable_from_outer_scope_if_existing() {
let template_source = r#"
{% assign var = '' %}
{% if true %}
{% capture var %}first-block-string{% endcapture %}
{% endif %}
{% if true %}
{% capture var %}test-string{% endcapture %}
{% endif %}
{{var}}
"#... | rust_cleaned_test_functions.jsonl/114239 | {
"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,
55148,
2346,
14635,
5673,
67258,
23199,
11119,
62630,
368,
341,
262,
1077,
3811,
10347,
284,
435,
2,
698,
262,
52261,
9793,
762,
284,
3355,
67914,
262,
52261,
421,
830,
67914,
262,
52261,
12322,
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_deserialize_unit_enum() {
let value = Value::String("A".into());
let deserialized = from_value::<UnitVariants>(&value).expect("deserialization failed");
assert_eq!(deserialized, UnitVariants::A);
let value = Value::String("B".into());
let deserialized = f... | rust_cleaned_test_functions.jsonl/3815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
14832,
31054,
368,
341,
286,
1077,
897,
284,
5162,
486,
703,
445,
32,
3263,
18122,
1423,
286,
1077,
939,
67577,
284,
504,
3142,
27638,
4562,
56135,
1783,
44784,
957,
568,
17119,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_combine_shares_err() {
let shares = vec![vec![]];
assert_eq!(combine_shares(&shares), Err(SSSError::BadShareLen((0, 0))));
} | rust_cleaned_test_functions.jsonl/70734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72374,
3712,
5403,
9266,
368,
341,
286,
1077,
13248,
284,
7486,
20703,
4083,
0,
1294,
935,
286,
2060,
10714,
10297,
63136,
3712,
5403,
2099,
75047,
701,
15495,
93544,
19224,
486,
17082,
12115,
11271... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iteration_ordering() {
let mut a = Iteration::new();
let mut b = Iteration::new();
for _ in 0..1000 {
assert!(a == b);
assert!(!(a > b));
assert!(!(a < b));
assert!(!(b > a));
assert!(!(b < a));
a = a.increment();
assert!(a != b... | rust_cleaned_test_functions.jsonl/101306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62772,
7869,
287,
368,
341,
262,
1077,
5206,
264,
284,
13704,
367,
486,
931,
543,
262,
1077,
5206,
293,
284,
13704,
367,
486,
931,
543,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_should_create_transactions() {
for vector in VECTOR_TRANSACTION_BUILDER.iter() {
let bytes_vector = hex::decode(vector).unwrap();
let build_object = AccountOperationRestrictionTransactionBuilder::from_binary(&*bytes_vector);
assert_eq!(build_object.serializer(), bytes... | rust_cleaned_test_functions.jsonl/8536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
8657,
68182,
368,
341,
262,
369,
4621,
304,
71459,
78509,
1668,
89692,
19471,
368,
341,
286,
1077,
5820,
12247,
284,
12371,
486,
18196,
19066,
568,
15454,
543,
286,
1077,
1936,
5314,
284,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_reg8pair_from_u16() {
let reg: Reg8Pair = Reg8Pair::from(0x8001u16);
assert_eq!(reg.h, 0x80u8);
assert_eq!(reg.l, 0x01u8);
} | rust_cleaned_test_functions.jsonl/35540 | {
"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,
4920,
23,
12670,
5673,
7300,
16,
21,
368,
341,
286,
1077,
1217,
25,
3184,
23,
12443,
284,
3184,
23,
12443,
486,
1499,
7,
15,
87,
23,
15,
15,
16,
84,
16,
21,
626,
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... | 1 |
#[test]
fn test_as_slice() {
let s0 = Atom::from_slice("");
assert!(s0.as_slice() == "");
let s1 = Atom::from_slice("class");
assert!(s1.as_slice() == "class");
let i0 = Atom::from_slice("blah");
assert!(i0.as_slice() == "blah");
let s0 = Atom::from_sli... | rust_cleaned_test_functions.jsonl/15249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
26488,
368,
341,
286,
1077,
274,
15,
284,
39516,
486,
1499,
26488,
13056,
286,
2060,
10297,
82,
15,
5357,
26488,
368,
621,
50970,
286,
1077,
274,
16,
284,
39516,
486,
1499,
26488,
445,
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_drop_shared_ref() {
let mock_handle = Box::into_raw(Box::new(MockGarbageCollector::default()));
let mock_node_count = Arc::new(AtomicUsize::new(1));
let value_count = Arc::new(AtomicUsize::new(1));
let value = RefCounter::new(value_count.clone());
let sha... | rust_cleaned_test_functions.jsonl/48708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 884
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
20405,
7793,
368,
341,
286,
1077,
7860,
10630,
284,
8261,
486,
18122,
16067,
67758,
486,
931,
66436,
43930,
20652,
53694,
486,
2258,
7392,
286,
1077,
7860,
5084,
3180,
284,
19689,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_run_vcpu() {
extern "C" fn handle_signal(_: c_int, _: *mut siginfo_t, _: *mut c_void) {}
let signum = 0;
// We install a signal handler for the specified signal; otherwise the whole process will
unsafe {
register_signal_handler(signu... | rust_cleaned_test_functions.jsonl/26654 | {
"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,
14007,
2273,
16475,
368,
341,
286,
15637,
330,
34,
1,
5168,
3705,
21137,
73834,
272,
4042,
11,
58536,
353,
6984,
8366,
2733,
528,
11,
58536,
353,
6984,
272,
37775,
8,
10086,
286,
1077,
1841,
372... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_or_insert_with() {
let mut m: HashMap<int,int> = HashMap::new();
assert_eq!(*m.find_or_insert_with(1, |_| 2), 2);
assert_eq!(*m.find_or_insert_with(1, |_| 3), 2);
} | rust_cleaned_test_functions.jsonl/45625 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
8734,
17678,
6615,
368,
341,
286,
1077,
5206,
296,
25,
10528,
4159,
9871,
29,
284,
10528,
486,
931,
543,
286,
2060,
10714,
0,
4071,
76,
2658,
8734,
17678,
6615,
7,
16,
11,
66091,
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... | 1 |
#[test]
fn test_parallel_requests() {
let client1 = TestClient::new();
let client2 = TestClient::new();
let client3 = client1.clone();
let start = std::time::Instant::now();
let timeout: u32 = 5000;
let long_wait = std::thread::spawn(move || {
client3.request_json("net.wait.for"... | rust_cleaned_test_functions.jsonl/69937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 527
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60625,
37216,
368,
341,
262,
1077,
2943,
16,
284,
3393,
2959,
486,
931,
543,
262,
1077,
2943,
17,
284,
3393,
2959,
486,
931,
543,
262,
1077,
2943,
18,
284,
2943,
16,
15997,
1428,
262,
1077,
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... | 2 |
#[test]
fn test_include_pk() {
let wrapper = IndexTestWrapper::include_pk_cols();
let mut scanner = IndexScanExecutor::index_scan(
wrapper.scan,
EvalContext::default(),
wrapper.ranges,
wrapper.store,
false,
false,
)... | rust_cleaned_test_functions.jsonl/103887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37878,
33321,
368,
341,
286,
1077,
13261,
284,
8008,
2271,
11542,
486,
997,
33321,
25347,
1428,
286,
1077,
5206,
20775,
284,
8008,
26570,
25255,
486,
1252,
28857,
1006,
310,
13261,
47949,
345,
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... | 4 |
#[test]
fn test_is_pruned() {
let mut pl = PruneList::new();
assert_eq!(pl.len(), 0);
assert_eq!(pl.is_pruned(1), false);
assert_eq!(pl.is_pruned(2), false);
assert_eq!(pl.is_pruned(3), false);
pl.add(2);
pl.flush().unwrap();
assert_eq!(pl.to_vec(), vec![2]);
assert_eq!(pl.is_pruned(1), false);
ass... | rust_cleaned_test_functions.jsonl/108483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
5294,
48883,
368,
341,
10217,
5206,
625,
284,
2340,
2886,
852,
486,
931,
1428,
6948,
10714,
10297,
500,
19406,
1507,
220,
15,
317,
6948,
10714,
10297,
500,
2079,
5294,
48883,
7,
16,
701,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all() {
assert_eq!(slice_to_be48(&[0xde, 0xad, 0xbe, 0xef, 0x1b, 0xad]), 0xdeadbeef1bad);
assert_eq!(slice_to_be64(&[0xde, 0xad, 0xbe, 0xef, 0x1b, 0xad, 0x1d, 0xea]), 0xdeadbeef1bad1dea);
assert_eq!(be16_to_array(0xdead), [0xde, 0xad]);
assert_eq!(be32_to_array(0xdeadbeef), [0xde, 0xad, ... | rust_cleaned_test_functions.jsonl/73798 | {
"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,
5705,
368,
341,
197,
6948,
10714,
10297,
24963,
2346,
21263,
19,
23,
2099,
58,
15,
56185,
11,
220,
15,
55254,
11,
220,
15,
42459,
11,
220,
15,
47510,
11,
220,
15,
87,
16,
65,
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_snippet() {
let terms = btreemap! {
String::from("rust") => 1.0,
String::from("language") => 0.9
};
let fragments = search_fragments(&From::from(SimpleTokenizer), TEST_TEXT, &terms, 100);
assert_eq!(fragments.len(), 7);
{
... | rust_cleaned_test_functions.jsonl/603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28022,
21581,
368,
341,
286,
1077,
3793,
284,
293,
10157,
42040,
0,
341,
310,
923,
486,
1499,
445,
35788,
899,
589,
220,
16,
13,
15,
345,
310,
923,
486,
1499,
445,
11528,
899,
589,
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_try_from_invalid_version() {
assert!("".parse::<Version>().is_err());
assert!("hello".parse::<Version>().is_err());
assert!("1.32.hi".parse::<Version>().is_err());
assert!("1.32..1".parse::<Version>().is_err());
assert!("1.32".parse::<Version>().is_err());... | rust_cleaned_test_functions.jsonl/36548 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
31433,
9438,
368,
341,
286,
2060,
17223,
3263,
6400,
27638,
5637,
10483,
285,
9266,
1423,
286,
2060,
17223,
14990,
3263,
6400,
27638,
5637,
10483,
285,
9266,
1423,
286,
2060,
17223,
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_service_request() {
let req = TestRequest::default().to_srv_request();
let (r, pl) = req.into_parts();
assert!(WebRequest::<DefaultError>::from_parts(r, pl).is_ok());
let req = TestRequest::default().to_srv_request();
let (r, pl) = req.into_parts();
... | rust_cleaned_test_functions.jsonl/24070 | {
"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,
12267,
7893,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
2258,
1005,
983,
63921,
7893,
543,
286,
1077,
320,
81,
11,
625,
8,
284,
4232,
39860,
33217,
543,
286,
2060,
10297,
46295,
27638,
367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trait_method_completion_deduplicated() {
check(
r"
struct A {}
trait Trait { fn the_method(&self); }
impl<T> Trait for T {}
fn foo(a: &A) { a.$0 }
",
expect![[r#"
me the_method() -> ()
"#]],
);
} | rust_cleaned_test_functions.jsonl/26253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78491,
9032,
60164,
814,
291,
98984,
368,
341,
286,
1779,
1006,
310,
435,
698,
1235,
362,
5613,
29432,
68301,
314,
5168,
279,
9032,
2099,
721,
1215,
456,
6383,
3125,
29,
68301,
369,
350,
5613,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_for_commit() {
let mut executor = fasync::Executor::new_with_fake_time().unwrap();
let (proxy, mut stream) =
fidl::endpoints::create_proxy_and_stream::<CommitStatusProviderMarker>().unwrap();
let (p, p_stream) = EventPair::create().unwrap();
fasy... | rust_cleaned_test_functions.jsonl/118483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1059
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
5478,
36346,
368,
341,
286,
1077,
5206,
31558,
284,
282,
7692,
486,
25255,
486,
931,
6615,
56881,
3009,
1005,
15454,
1428,
286,
1077,
320,
22803,
11,
5206,
4269,
8,
4035,
310,
32104,
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... | 6 |
#[test]
fn test_from_into_extensions() {
let cbor_extensions = cbor_map! {
"the_answer" => 42,
};
let extensions = Extensions::try_from(&cbor_extensions);
let mut expected_extensions = Extensions(BTreeMap::new());
expected_extensions
.0
... | rust_cleaned_test_functions.jsonl/51449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
45514,
60498,
368,
341,
286,
1077,
272,
9368,
60498,
284,
272,
9368,
5376,
0,
341,
310,
330,
1782,
28534,
1,
589,
220,
19,
17,
345,
286,
2605,
286,
1077,
19721,
284,
55795,
486,
1539,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permissions_rw_inside_project_dir() {
const PERMISSION_VARIANTS: [&str; 2] = ["read", "write"];
for permission in &PERMISSION_VARIANTS {
let status = util::deno_cmd()
.current_dir(&util::tests_path())
.arg("run")
.arg(format!(
"--allow-{0}={1}",
permissi... | rust_cleaned_test_functions.jsonl/5592 | {
"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,
44767,
49566,
72860,
16352,
4334,
368,
341,
220,
733,
96540,
2334,
16028,
37125,
25,
34336,
495,
26,
220,
17,
60,
284,
4383,
878,
497,
330,
4934,
6332,
220,
369,
7882,
304,
609,
9654,
25245,
233... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_move_iterator() {
let xs = vec![1, 2, 3, 4, 5];
assert_eq!(xs.into_iter().fold(0, |a: usize, b: usize| 10 * a + b),
12345);
} | rust_cleaned_test_functions.jsonl/12892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
13491,
368,
341,
262,
1077,
11943,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
2060,
10714,
10297,
18561,
39860,
11723,
1005,
19961,
7,
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_minimal_valid_time() -> Result<(), failure::Error> {
// init empty context for test
let (chain_id, genesis_block_header, ..) =
init_test_protocol_context(" test_minimal_valid_time_storage");
// apply block 1
let last_block = apply_blocks_1(&chain_id, genesis_block_header... | rust_cleaned_test_functions.jsonl/64684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
2861,
8337,
3009,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
262,
442,
2930,
4287,
2266,
369,
1273,
198,
262,
1077,
320,
8819,
842,
11,
59366,
7113,
8757,
11,
5241,
8,
4035,
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... | 5 |
#[test]
fn test_http1_keepalive_close() {
let srv = TestServer::new(|| {
HttpService::build().h1(|_| future::ok::<_, ()>(Response::Ok().finish()))
});
let mut stream = net::TcpStream::connect(srv.addr()).unwrap();
let _ =
stream.write_all(b"GET /test/tests/test HTTP/1.1\r\nconne... | rust_cleaned_test_functions.jsonl/102540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25888,
16,
50293,
50961,
12704,
368,
341,
262,
1077,
43578,
284,
3393,
5475,
486,
931,
79453,
341,
286,
4823,
1860,
486,
5834,
1005,
71,
16,
22428,
35395,
3853,
486,
562,
27638,
6878,
1719,
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... | 2 |
#[test]
fn test_vertical_order_binary_tree() {
assert_eq!(vertical_traversal(tree![3,9,20,null,null,15,7]), vec![vec![9], vec![3,15], vec![20], vec![7]]);
} | rust_cleaned_test_functions.jsonl/106963 | {
"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,
61203,
7869,
31761,
11663,
368,
341,
286,
2060,
10714,
10297,
15292,
3547,
45545,
21298,
20703,
18,
11,
24,
11,
17,
15,
23075,
23075,
11,
16,
20,
11,
22,
9719,
7486,
20703,
4083,
20703,
24,
1125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sk_encrypt_scalar() {
let fv = FV::<Scalar>::default_2048();
let sk = fv.generate_key();
let v = vec![0; fv.n];
let ct = fv.encrypt_sk(&v, &sk);
let pt_actual: Vec<u8> = fv.decrypt(&ct, &sk);
assert_eq!(v, pt_actual);
} | rust_cleaned_test_functions.jsonl/103688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33811,
66593,
41652,
368,
341,
286,
1077,
61654,
284,
434,
53,
27638,
20639,
6831,
2258,
62,
17,
15,
19,
23,
1428,
286,
1077,
1901,
284,
61654,
22019,
3097,
1428,
286,
1077,
348,
284,
7486,
2070... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lev_distance() {
assert_eq!(levenshtein_distance("", ""), 0);
assert_eq!(levenshtein_distance("one", "one"), 0);
assert_eq!(levenshtein_distance("one", ""), 3);
assert_eq!(levenshtein_distance("", "one"), 3);
assert_eq!(levenshtein_distance("kitten", "sitting"), 3);
assert_eq!(levens... | rust_cleaned_test_functions.jsonl/22819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3449,
19464,
368,
341,
220,
2060,
10714,
10297,
3449,
724,
55499,
258,
19464,
19814,
77130,
220,
15,
317,
220,
2060,
10714,
10297,
3449,
724,
55499,
258,
19464,
445,
603,
497,
330,
603,
3975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_for_supermajority() {
solana_logger::setup();
use solana_sdk::hash::hash;
let node_keypair = Arc::new(Keypair::new());
let cluster_info = ClusterInfo::new(
ContactInfo::new_localhost(&node_keypair.pubkey(), timestamp()),
node_keypair,
... | rust_cleaned_test_functions.jsonl/30366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 818
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
5478,
38886,
36505,
487,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
990,
2048,
3362,
61783,
486,
8296,
486,
8296,
280,
286,
1077,
2436,
3097,
12670,
284,
19689,
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_next_bar() {
let mut mfi = MoneyFlowIndex::new(3).unwrap();
let bar1 = Bar::new().high(3).low(1).close(2).volume(500.0);
assert_eq!(round(mfi.next(&bar1)), 50.0);
let bar2 = Bar::new().high(2.3).low(2.0).close(2.3).volume(1000.0);
assert_eq!(round(mfi.ne... | rust_cleaned_test_functions.jsonl/76462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
14388,
368,
341,
286,
1077,
5206,
296,
9983,
284,
17633,
18878,
1552,
486,
931,
7,
18,
568,
15454,
1428,
286,
1077,
3619,
16,
284,
4716,
486,
931,
1005,
11892,
7,
18,
568,
10303,
7,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hand_range_remove_duplicates() {
// add same range twice and remove
let mut c = HandRange::new();
c.add_combos(1, 1, true, true, 100);
c.add_combos(1, 1, true, true, 100);
assert_eq!(c.hands.len(), 12);
c.remove_duplicates();
assert_eq!(c.h... | rust_cleaned_test_functions.jsonl/68073 | {
"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,
23194,
9698,
18193,
75051,
368,
341,
286,
442,
912,
1852,
2088,
10917,
323,
4057,
198,
286,
1077,
5206,
272,
284,
8536,
6046,
486,
931,
543,
286,
272,
1364,
34454,
436,
7,
16,
11,
220,
16,
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_build_routes() {
crate::test_util::init();
assert!(builds_route_ok(&[(1, 2, 1, 10), (2, 1, 123, 5)], &[(2, 1)]));
assert!(builds_route_ok(
&[
(1, 2, 1, 10),
(2, 1, 123, 5),
(1, 3, 2, 10),
(3, 1, 1... | rust_cleaned_test_functions.jsonl/78052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
64314,
368,
341,
286,
17717,
486,
1944,
18974,
486,
2327,
543,
286,
2060,
10297,
5834,
82,
28109,
19817,
2099,
9697,
16,
11,
220,
17,
11,
220,
16,
11,
220,
16,
15,
701,
320,
17,
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_is_corner_fast12_12_contiguous_darker_pixels_large_threshold() {
let image = gray_image!(
10, 10, 00, 00, 00, 10, 10;
10, 00, 10, 10, 10, 00, 10;
00, 10, 10, 10, 10, 10, 10;
00, 10, 10, 10, 10, 10, 10;
00, 10, 10, 10, 10, 10, 10... | rust_cleaned_test_functions.jsonl/114612 | {
"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,
6892,
66884,
35743,
16,
17,
62,
16,
17,
10260,
27029,
814,
12856,
49745,
45228,
21858,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
16,
15,
11,
220,
16,
15,
11,
220,
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_create_datetime_zulu_from_int_fail() {
assert!(Value::datetime_zulu_from_int(2012, 1, 0, 3, 30, 30).is_err());
} | rust_cleaned_test_functions.jsonl/86222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
28943,
6415,
24411,
5673,
4042,
22121,
368,
341,
262,
2060,
10297,
1130,
486,
15450,
6415,
24411,
5673,
4042,
7,
17,
15,
16,
17,
11,
220,
16,
11,
220,
15,
11,
220,
18,
11,
220,
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 |
#[test]
fn test_metadata_full_empty() {
let mut buffer = buffer();
assert!(buffer.is_empty());
assert!(!buffer.is_full());
assert!(buffer.enqueue(1, ()).is_ok());
assert!(!buffer.is_empty());
assert!(buffer.enqueue(1, ()).is_ok());
assert!(buffer.enqueue(1... | rust_cleaned_test_functions.jsonl/101979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22220,
16372,
15124,
368,
341,
286,
1077,
5206,
4147,
284,
4147,
543,
286,
2060,
10297,
7573,
2079,
15124,
1423,
286,
2060,
0,
3471,
7573,
2079,
16372,
1423,
286,
2060,
10297,
7573,
47468,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mem_backend_authenticate() {
let pt = vec![1u8, 2, 3];
let key = Vec::from_hex("603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4")
.unwrap();
let backend = MemAesGcmBackend::new(key).unwrap();
let encrypted_content = backend.encrypt_co... | rust_cleaned_test_functions.jsonl/19323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12976,
40011,
14014,
22661,
368,
341,
286,
1077,
10817,
284,
7486,
20703,
16,
84,
23,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
1376,
284,
11312,
486,
1499,
32655,
445,
21,
15,
18,
37935,
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_exp() {
assert_eq!(
exp(
BigUint::from_str("4398572349857239485729348572983472345").unwrap(),
&BigUint::from_str("5489673498567349856734895").unwrap(),
&BigUint::from_str(
"52435875175126190479447740508185965837690552500527637822603... | rust_cleaned_test_functions.jsonl/19478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14214,
368,
341,
262,
2060,
10714,
33673,
286,
1343,
1006,
310,
6164,
21570,
486,
1499,
2895,
445,
19,
18,
24,
23,
20,
22,
17,
18,
19,
24,
23,
20,
22,
17,
18,
24,
19,
23,
20,
22,
17,
24,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_os_string_reserve_exact() {
let mut os_string = OsString::new();
assert_eq!(os_string.capacity(), 0);
os_string.reserve_exact(2);
assert!(os_string.capacity() >= 2);
for _ in 0..16 {
os_string.push("a");
}
assert!(os_string.c... | rust_cleaned_test_functions.jsonl/105022 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29387,
3904,
89591,
71084,
368,
341,
286,
1077,
5206,
2643,
3904,
284,
15433,
703,
486,
931,
543,
286,
2060,
10714,
10297,
436,
3904,
59168,
1507,
220,
15,
626,
286,
2643,
3904,
48520,
71084,
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... | 2 |
#[test]
fn test_valid_get_valid_int_prefix() {
let cases = vec![
(".1", "0"),
(".0", "0"),
("123", "123"),
("123e1", "1230"),
("123.1e2", "12310"),
("123.45e5", "12345000"),
("123.45678e5", "12345678"),
("123... | rust_cleaned_test_functions.jsonl/75523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
3062,
8337,
4042,
13974,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
3263,
16,
497,
330,
15,
4461,
310,
320,
3263,
15,
497,
330,
15,
4461,
310,
3489,
16,
17,
18,
497,
330,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nospace_conflict() {
let args = vec!["-vvLverbose".to_string(), "-v".to_string()];
let matches = &match Options::new()
.optmulti("L", "", "library directory", "LIB")
.optflagmulti("v", "verbose", "Verbose")
.parse(&args)
{
Ok(m) => m,
Err(e) =>... | rust_cleaned_test_functions.jsonl/52387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
80014,
16059,
21242,
368,
341,
262,
1077,
2827,
284,
7486,
0,
1183,
12,
33075,
43,
14883,
3263,
983,
3904,
1507,
6523,
85,
3263,
983,
3904,
33800,
262,
1077,
9071,
284,
609,
6347,
14566,
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... | 2 |
#[test]
fn test_introduce_var_path_simple() {
check_assist(
introduce_variable,
"
fn main() {
let o = <|>Some(true)<|>;
}
",
"
fn main() {
let <|>var_name = Some(true);
let o = var_name;
}
",
);
} | rust_cleaned_test_functions.jsonl/108760 | {
"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,
4042,
47845,
4612,
2638,
30015,
368,
341,
286,
1779,
12083,
380,
1006,
310,
19131,
14635,
345,
310,
6228,
8822,
1887,
368,
341,
262,
1077,
297,
284,
82639,
29,
8373,
3715,
26432,
91,
10133,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_word_read_write() {
const ADDR: u32 = 0x04;
let mut mem = Memory::new(1024);
for data in 0xFE000000..0xFE100000 {
mem.write_word(ADDR, data).unwrap();
assert_eq!(data, mem.read_word(ADDR).unwrap());
}
} | rust_cleaned_test_functions.jsonl/92784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13533,
6443,
9165,
368,
341,
286,
733,
80514,
25,
575,
18,
17,
284,
220,
15,
87,
15,
19,
280,
286,
1077,
5206,
1833,
284,
13850,
486,
931,
7,
16,
15,
17,
19,
317,
286,
369,
821,
304,
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... | 2 |
#[test]
fn test_calculate_nested_struct_levels() {
// tests a <struct[a]<struct[b]<int[c]>>
// array:
// - {a: {b: {c: 1}}}
// - {a: {b: {c: null}}}
// - {a: {b: {c: 3}}}
// - {a: {b: null}}
// - {a: null}}
// - {a: {b: {c: 6}}}
let a... | rust_cleaned_test_functions.jsonl/77707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1033
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
66279,
15126,
37819,
368,
341,
286,
442,
7032,
264,
366,
1235,
15481,
34139,
1235,
18483,
34139,
396,
12447,
25669,
397,
286,
442,
1334,
510,
286,
442,
220,
481,
314,
64,
25,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_domain_role() {
let mut rm = DefaultRoleManager::new(3);
rm.add_link("u1", "g1", Some("domain1"));
rm.add_link("u2", "g1", Some("domain1"));
rm.add_link("u3", "admin", Some("domain2"));
rm.add_link("u4", "admin", Some("domain2"));
rm.add_link("u4",... | rust_cleaned_test_functions.jsonl/38672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
19792,
368,
341,
286,
1077,
5206,
18998,
284,
7899,
9030,
2043,
486,
931,
7,
18,
317,
286,
18998,
1364,
7233,
445,
84,
16,
497,
330,
70,
16,
497,
4329,
445,
12204,
16,
4010,
286,
18998,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prove_secp256k1_sha256_tai() {
let mut vrf = ECVRF::from_suite(CipherSuite::SECP256K1_SHA256_TAI).unwrap();
let x = hex::decode("c9afa9d845ba75166b5c215767b1d6934e50c3db36e89b127b8a622b120f6721")
.unwrap();
// Data: ASCII "sample"
let alpha = ... | rust_cleaned_test_functions.jsonl/112468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
586,
3453,
4672,
17,
20,
21,
74,
16,
48836,
17,
20,
21,
528,
2143,
368,
341,
286,
1077,
5206,
348,
8052,
284,
468,
19589,
17612,
486,
1499,
57239,
3025,
10558,
28000,
486,
925,
7123,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_covgraph_goto_switchint() {
let mir_body = goto_switchint();
if false {
eprintln!("basic_blocks = {}", debug_basic_blocks(&mir_body));
}
let basic_coverage_blocks = graph::CoverageGraph::from_mir(&mir_body);
print_coverage_graphviz("covgraph_goto_switchint ", &mir_bod... | rust_cleaned_test_functions.jsonl/68931 | {
"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,
50028,
4439,
97732,
27652,
396,
368,
341,
262,
1077,
8652,
14114,
284,
7986,
27652,
396,
543,
262,
421,
895,
341,
286,
384,
33655,
17223,
22342,
25201,
284,
24689,
7390,
34729,
25201,
2099,
19936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_oct_int() {
let cases = vec![
(Some(-1), Some(b"1777777777777777777777".to_vec())),
(Some(0), Some(b"0".to_vec())),
(Some(1), Some(b"1".to_vec())),
(Some(8), Some(b"10".to_vec())),
(Some(12), Some(b"14".to_vec())),
(... | rust_cleaned_test_functions.jsonl/10152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70135,
4042,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
8373,
4080,
16,
701,
4329,
1883,
1,
16,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
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_simple_multiple_a() {
let doc = Document::from(
"<div class='container'>
<a class='link button' id='linkmain'>
<span>text hi there</span>
</a>
<span>text hi there <a href='blob'>two</a></span>
</div>",... | rust_cleaned_test_functions.jsonl/66018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
45233,
4306,
368,
341,
286,
1077,
4629,
284,
11789,
486,
1499,
1006,
310,
4055,
611,
536,
1131,
3586,
9531,
2290,
366,
64,
536,
1131,
2080,
3137,
6,
877,
1131,
2080,
3817,
9531,
338,
366,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_augmentation_parse_all() {
let bases = Default::default();
let address_size = 8;
let rest = [9, 8, 7, 6, 5, 4, 3, 2, 1];
let section = Section::with_endian(Endian::Little)
.uleb(1 + 9 + 1)
// L
.D8(constants::DW_EH_PE_uleb128.0... | rust_cleaned_test_functions.jsonl/9394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 678
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60411,
31099,
21039,
5705,
368,
341,
286,
1077,
23092,
284,
7899,
486,
2258,
543,
286,
1077,
2621,
2368,
284,
220,
23,
280,
286,
1077,
2732,
284,
508,
24,
11,
220,
23,
11,
220,
22,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_process_timestamp() {
let (slot, timestamp) = (15, 1_575_412_285);
let mut vote_state = VoteState {
last_timestamp: BlockTimestamp { slot, timestamp },
..VoteState::default()
};
assert_eq!(
vote_state.process_timestamp(slo... | rust_cleaned_test_functions.jsonl/6107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 884
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
11305,
23073,
368,
341,
286,
1077,
320,
21537,
11,
11441,
8,
284,
320,
16,
20,
11,
220,
16,
62,
20,
22,
20,
62,
19,
16,
17,
62,
17,
23,
20,
317,
286,
1077,
5206,
6910,
4387,
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_fill_rpool_k1_wrong_dh_secrets() {
let result = fill_rpool(
"[a\"aa75ca8a2fd3f8af94976bfaa7aa476dc31f5d78d9fef8fb86a97a775f611ae5\"]".to_string(),
"[\"031241ac15c9c9c070e1cba1dbdb3992018f9c66f0e50a8d9afbebc510aaf355e7\"]".to_string(),
Curve::Secp256k1,... | rust_cleaned_test_functions.jsonl/49754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 611
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
1710,
10285,
4698,
16,
75198,
814,
71,
3453,
52710,
368,
341,
286,
1077,
1102,
284,
5155,
1710,
10285,
1006,
310,
10545,
64,
2105,
5305,
22,
20,
924,
23,
64,
17,
6902,
18,
69,
23,
2577,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_operator() {
equal_tokens! {
<nodes>
">" -> b::token_list(vec![b::op(">")])
}
// assert_leaf! {
// parsers [ operator ]
// assert_leaf! {
// parsers [ operator ]
// asse... | rust_cleaned_test_functions.jsonl/7247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40594,
368,
341,
286,
6144,
28838,
0,
341,
310,
366,
20008,
397,
310,
90013,
1464,
293,
486,
5839,
2019,
25592,
20703,
65,
486,
453,
63853,
899,
2546,
286,
555,
286,
442,
2060,
38909,
0,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mat2_serde() {
let a = Mat2::from_cols(vec2(1.0, 2.0), vec2(3.0, 4.0));
let serialized = serde_json::to_string(&a).unwrap();
assert_eq!(serialized, "[1.0,2.0,3.0,4.0]");
let deserialized = serde_json::from_str(&serialized).unwrap();
assert_eq!(a, deserialized);
let deseri... | rust_cleaned_test_functions.jsonl/13473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16610,
17,
75861,
450,
368,
341,
262,
1077,
264,
284,
6867,
17,
486,
1499,
25347,
25592,
17,
7,
16,
13,
15,
11,
220,
17,
13,
15,
701,
7486,
17,
7,
18,
13,
15,
11,
220,
19,
13,
15,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decimal_format_128() {
assert_eq!(
"3.14159265358979323846",
Decimal::from(3_1415926535_8979323846_i128, 20).to_string()
);
} | rust_cleaned_test_functions.jsonl/6360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
8955,
62,
16,
17,
23,
368,
341,
286,
2060,
10714,
33673,
310,
330,
18,
13,
16,
19,
16,
20,
24,
17,
21,
20,
18,
20,
23,
24,
22,
24,
18,
17,
18,
23,
19,
21,
756,
310,
26728,
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_decode_rls_command() {
let buf = [
0b01010011,
0b00000101,
0b00011111,
0b00000000, // Data octet2: Bit1 = 0 -> No Status.
];
let expected = MuxCommand {
params: MuxCommandParams::RemoteLineStatus(RemoteLineSta... | rust_cleaned_test_functions.jsonl/107779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
1710,
4730,
10811,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
65,
15,
16,
15,
16,
15,
15,
16,
16,
11,
715,
310,
220,
15,
65,
15,
15,
15,
15,
15,
16,
15,
16,
11,
715,
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_edges_to_tree_jumbled() {
let edges: Vec<(&'static str, Option<&'static str>, ())> = vec![
("A", Some("B"), ()),
("C", Some("D"), ()),
("F", None, ()),
("G", Some("F"), ()),
("E", Some("D"), ()),
("D", Some("B"), ())... | rust_cleaned_test_functions.jsonl/2842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28026,
2346,
11663,
5374,
25817,
368,
341,
286,
1077,
12822,
25,
11312,
27,
2099,
6,
1978,
607,
11,
6959,
52244,
6,
1978,
607,
8066,
44481,
29,
284,
7486,
90515,
310,
3489,
32,
497,
4329,
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_conversions() {
assert!((u8_to_f32(0) - (-1.0)).abs() < 0.05);
assert!((u8_to_f32(128) - (0.0)).abs() < 0.05);
assert!((u8_to_f32(255) - (1.0)).abs() < 0.05);
assert!((f32_to_u8(0.0) as i32 - 128).abs() < 2);
assert!((f32_to_u8(1.0) as i32 - 255).abs() < 2);
assert!((f32_... | rust_cleaned_test_functions.jsonl/16586 | {
"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,
3382,
28290,
368,
341,
262,
2060,
0,
1188,
84,
23,
2346,
761,
18,
17,
7,
15,
8,
481,
10293,
16,
13,
15,
4579,
3435,
368,
366,
220,
15,
13,
15,
20,
317,
262,
2060,
0,
1188,
84,
23,
2346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signer_invalid_share() {
let mut rng = rand::thread_rng();
let data = "Hello world".as_bytes();
let signers = Signer::generate_signers(N, T);
let identifier = SignatureIdentifier { id: 0, index: 1 };
dbg!(signers.len());
let mut shares: BTreeMap... | rust_cleaned_test_functions.jsonl/104902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
261,
31433,
38272,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
1428,
286,
1077,
821,
284,
330,
9707,
1879,
3263,
300,
12524,
543,
286,
1077,
1841,
388,
284,
7075,
261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syscall_sol_panic() {
prepare_mockup!(
invoke_context,
transaction_context,
program_id,
bpf_loader::id(),
);
let mut syscall_panic = SyscallPanic {
invoke_context: Rc::new(RefCell::new(&mut invoke_context)),
... | rust_cleaned_test_functions.jsonl/69886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20344,
6659,
53668,
620,
31270,
368,
341,
286,
10549,
34134,
454,
33673,
310,
19873,
8467,
345,
310,
7745,
8467,
345,
310,
2025,
842,
345,
310,
293,
15897,
22139,
486,
307,
3148,
286,
1439,
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_function_literal_no_params() {
let (parameters, _) = match statement_expression("fn() { return 1; }") {
Expression::FunctionLiteral {
parameters, body, ..
} => (parameters, body),
_ => panic!("not a function literal"),
};
... | rust_cleaned_test_functions.jsonl/64086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
34100,
6536,
6745,
368,
341,
286,
1077,
320,
13786,
11,
27439,
284,
2432,
5114,
28068,
445,
8822,
368,
314,
470,
220,
16,
26,
335,
899,
341,
310,
16378,
486,
5152,
17350,
341,
394,
5029,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sax() {
let code = vec![0x87, 0xD1];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.X = 0x53;
nes.A = 0x62;
nes.next(&mut memory).unwrap();
assert_eq!(0x42, memory.get(0xD1));
} | rust_cleaned_test_functions.jsonl/38745 | {
"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,
643,
706,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
87,
23,
22,
11,
220,
15,
15764,
16,
935,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
286,
1077,
5206,
4938,
284,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_error_decode() {
use num_traits::FromPrimitive;
fn pretty_err<T>(err: InstructionError) -> String
where
T: 'static + std::error::Error + DecodeError<T> + FromPrimitive,
{
if let InstructionError::Custom(code) = err {
... | rust_cleaned_test_functions.jsonl/83691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
4096,
15227,
368,
341,
286,
990,
1629,
39693,
486,
3830,
33313,
280,
286,
5168,
5020,
9266,
3125,
2235,
615,
25,
29051,
1454,
8,
1464,
923,
198,
286,
1380,
198,
310,
350,
25,
364,
1978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_unordered() {
let bloom_b1 = Bloom::from_str("0000002000000000000000000000000000000000000000000200000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000... | rust_cleaned_test_functions.jsonl/39259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
4907,
10544,
368,
341,
197,
10217,
51454,
880,
16,
284,
24503,
486,
1499,
2895,
445,
15,
15,
15,
15,
15,
15,
17,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_no_max_age() {
let h: ::Result<StrictTransportSecurity> = Header::parse_header(&[b"includeSubDomains".to_vec()][..]);
assert!(h.is_err());
} | rust_cleaned_test_functions.jsonl/37334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6536,
6345,
32053,
368,
341,
286,
1077,
305,
25,
3504,
2077,
27,
41857,
27560,
15352,
29,
284,
12104,
486,
6400,
8757,
2099,
58,
65,
1,
997,
3136,
74713,
3263,
983,
13251,
75453,
496,
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 |
#[test]
fn test_hash_equal_scale() {
use std::hash::{Hash, Hasher};
use std::collections::hash_map::DefaultHasher;
fn hash<T>(obj: &T) -> u64
where T: Hash
{
let mut hasher = DefaultHasher::new();
obj.hash(&mut hasher);
hasher.fini... | rust_cleaned_test_functions.jsonl/75819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
11478,
16727,
368,
341,
286,
990,
1460,
486,
8296,
22964,
6370,
11,
6531,
261,
2440,
286,
990,
1460,
486,
51137,
486,
8296,
5376,
486,
3675,
6370,
261,
401,
286,
5168,
5175,
3125,
2235,
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_spj_0_with_ce() {
let task = generate_judge_task(SOURCE_CE, PROBLEM);
let judge = Judge::new();
for report in judge.judge(task) {
match report {
Report::CompileError => {}
res => panic!("Wrong judge result: {}", res),
}
}
} | rust_cleaned_test_functions.jsonl/52120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
73,
62,
15,
6615,
50727,
368,
341,
262,
1077,
3383,
284,
6923,
5374,
19561,
12184,
3759,
13077,
94805,
11,
5308,
69292,
317,
262,
1077,
11651,
284,
20207,
486,
931,
543,
262,
369,
1895,
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... | 3 |
#[test]
fn test_drop() {
let mut x = 10;
{
let mut g = Gn::<()>::new(|| {
x = 1;
yield_with(());
x = 5;
});
g.send(());
}
assert!(x == 1);
} | rust_cleaned_test_functions.jsonl/91418 | {
"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,
29584,
368,
341,
262,
1077,
5206,
856,
284,
220,
16,
15,
280,
262,
341,
286,
1077,
5206,
342,
284,
95151,
27638,
368,
6831,
931,
79453,
341,
310,
856,
284,
220,
16,
280,
310,
7540,
6615,
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... | 2 |
#[test]
fn test_exec_panic() {
let l = Log::<Operation>::default();
let o: [Operation; 1024] = unsafe {
let mut a: [Operation; 1024] = ::std::mem::MaybeUninit::zeroed().assume_init();
for i in &mut a[..] {
::std::ptr::write(i, Operation::Read);
... | rust_cleaned_test_functions.jsonl/101059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
620,
31270,
368,
341,
286,
1077,
326,
284,
2835,
27638,
8432,
6831,
2258,
543,
286,
1077,
297,
25,
508,
8432,
26,
220,
16,
15,
17,
19,
60,
284,
19860,
341,
310,
1077,
5206,
264,
25,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_compact() {
let assigns = o!({
"words": ["a", nil, "b", nil, "c"],
"hashes": [{ "a": "A" }, { "a": nil }, { "a": "C" }],
});
// Test strings
assert_template_result!("a b c", "{{words | compact | join}}", assigns);
// Test hashes
assert_template_result!(
... | rust_cleaned_test_functions.jsonl/85606 | {
"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,
18177,
531,
368,
341,
262,
1077,
49912,
284,
297,
0,
2262,
286,
330,
5761,
788,
4383,
64,
497,
2092,
11,
330,
65,
497,
2092,
11,
330,
66,
8097,
286,
330,
8296,
288,
788,
18466,
330,
64,
788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vector_vector_add() {
let v1 = Tuple::vector(3.0, 2.0, 5.0);
let v2 = Tuple::vector(-2.0, 3.0, 2.0);
let result = v1 + v2;
assert_eq!(result, Tuple::vector(1.0, 5.0, 7.0));
} | rust_cleaned_test_functions.jsonl/113505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
12247,
2891,
368,
341,
286,
1077,
348,
16,
284,
24622,
486,
3215,
7,
18,
13,
15,
11,
220,
17,
13,
15,
11,
220,
20,
13,
15,
317,
286,
1077,
348,
17,
284,
24622,
486,
3215,
4080,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vcx_disclosed_proof_release() {
let _setup = SetupMocks::init();
let handle = _vcx_disclosed_proof_create_with_request_c_closure(ARIES_PROOF_REQUEST_PRESENTATION).unwrap();
assert_eq!(vcx_disclosed_proof_release(handle + 1), error::INVALID_DISCLOSED_PROOF_HANDLE.code_num... | rust_cleaned_test_functions.jsonl/110430 | {
"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,
2273,
25844,
37745,
9259,
86757,
24577,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
3705,
284,
716,
7362,
87,
37745,
9259,
86757,
8657,
6615,
7893,
666,
72823,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool_ops() {
let mut c = Compiler::new("<unknown>", "");
c.start_sc_bool();
c.add(Instruction::Lookup("first"));
c.sc_bool(true);
c.add(Instruction::Lookup("second"));
c.sc_bool(false);
c.add(Instruction::Lookup("third"));
c.end_sc_bool();
insta::assert_debu... | rust_cleaned_test_functions.jsonl/34188 | {
"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,
22159,
21959,
368,
341,
262,
1077,
5206,
272,
284,
45631,
486,
931,
9639,
16088,
21156,
50970,
262,
272,
4962,
13171,
22159,
543,
262,
272,
1364,
7,
16664,
486,
34247,
445,
3896,
4010,
262,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vcx_credential_create_with_offer_fails() {
let _setup = SetupMocks::init();
let err = _vcx_credential_create_with_offer_c_closure(BAD_CREDENTIAL_OFFER).unwrap_err();
assert_eq!(err, error::INVALID_JSON.code_num);
} | rust_cleaned_test_functions.jsonl/115032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
666,
30320,
8657,
6615,
67814,
761,
6209,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
1848,
284,
716,
7362,
87,
666,
30320,
8657,
6615,
67814,
666,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_record_schema_with_currently_parsing_schema_aliases() {
let schema = Schema::parse_str(
r#"
{
"type": "record",
"name": "LongList",
"aliases": ["LinkedLongs"],
"fields" : [
{"name": "value", "... | rust_cleaned_test_functions.jsonl/108439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
25371,
6615,
11080,
398,
620,
28598,
25371,
90233,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
2,
698,
310,
341,
1060,
330,
1313,
788,
330,
8548,
756,
1060,
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_insert_fail_recovery() {
let dir = TempDir::new("segment_dir").unwrap();
let vec1 = vec![1.0, 0.0, 1.0, 1.0];
let mut segment = empty_segment(dir.path());
segment.upsert_point(1, 1, &vec1).unwrap();
segment.upsert_point(1, 2, &vec1).unwrap();
s... | rust_cleaned_test_functions.jsonl/105288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 896
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
22121,
91475,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
23169,
4334,
1827,
15454,
1428,
286,
1077,
7486,
16,
284,
7486,
20703,
16,
13,
15,
11,
220,
15,
13,
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_add() {
let a = "2".to_owned() + &"1".repeat(71);
let b: String = "8".repeat(81);
let c = "8888888890".to_owned() + &"9".repeat(71);
let cases = vec![
(
".00012345000098765",
"123.45",
Res::Ok("123.450123... | rust_cleaned_test_functions.jsonl/40316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
1077,
264,
284,
330,
17,
3263,
983,
51973,
368,
488,
609,
1,
16,
3263,
30624,
7,
22,
16,
317,
286,
1077,
293,
25,
923,
284,
330,
23,
3263,
30624,
7,
23,
16,
317,
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... | 2 |
#[test]
fn test_process_make_credential_hmac_secret() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
let extensions = Some(MakeCredentialExtensions {
hmac_secret: tr... | rust_cleaned_test_functions.jsonl/35312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
28230,
666,
30320,
1523,
11948,
21962,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
7,
1423,
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... | 2 |
#[test]
fn test_from_iter() {
let xs = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let set = BTreeSet::from_iter(xs.iter());
for x in &xs {
assert!(set.contains(x));
}
} | rust_cleaned_test_functions.jsonl/13751 | {
"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,
5673,
11723,
368,
341,
262,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
4821,
262,
1077,
738,
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... | 2 |
#[test]
fn test_forward_and_backward_slashes() {
let tmp = tempdir::TempDir::new("ex").unwrap();
let tmp = tmp.path();
// Create directories:
// a/
// + b/
// + c/
let a = PathDir::create(&tmp.join("a")).unwrap();
let b = PathDir::create(&a.concat("b").unwrap()).unwrap();
... | rust_cleaned_test_functions.jsonl/115177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32121,
8378,
70477,
11886,
14051,
368,
341,
262,
1077,
4174,
284,
2730,
3741,
486,
12151,
6184,
486,
931,
445,
327,
1827,
15454,
543,
262,
1077,
4174,
284,
4174,
3875,
1428,
262,
442,
4230,
28625,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_push() {
let list = ConcurrentList::new();
let r = list.push("Hello World".to_owned());
assert_eq!(r, "Hello World");
assert_eq!(list.head().unwrap() as *const String, r as *const String);
assert_eq!(
list.iter().map(|x| x as *const String).collect::<Vec<_>>(),
... | rust_cleaned_test_functions.jsonl/99283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
368,
341,
262,
1077,
1140,
284,
42704,
852,
486,
931,
1428,
262,
1077,
435,
284,
1140,
2552,
445,
9707,
4337,
3263,
983,
51973,
1423,
262,
2060,
10714,
10297,
81,
11,
330,
9707,
4337,
307... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_legal_moves_banmen_with_fu_nari_7_squares_and_contiguous_self_gote() {
test_legal_moves_banmen_with_kin_7_squares_and_contiguous_self_gote_impl(GFuN)
} | rust_cleaned_test_functions.jsonl/81265 | {
"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,
82324,
45390,
880,
276,
5676,
6615,
36467,
1089,
2780,
62,
22,
643,
40856,
8378,
10260,
27029,
25637,
1889,
1272,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_determine_format_w_datetimefield_and_leading_time() {
use DateTimeField::*;
use TimePartFormat::*;
assert_eq!(
determine_format_w_datetimefield(tokenize_time_str("4:5").unwrap(), None,).unwrap(),
Some(SqlStandard(Hour))
);
assert_e... | rust_cleaned_test_functions.jsonl/100323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
24308,
8955,
1670,
28943,
2566,
8378,
11751,
2228,
3009,
368,
341,
286,
990,
6520,
1877,
56162,
286,
990,
4120,
5800,
4061,
79304,
286,
2060,
10714,
33673,
310,
8253,
8955,
1670,
28943,
2566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.