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_rent_state_changes_sysvars() {
let GenesisConfigInfo {
mut genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(sol_to_lamports(100.), &Pubkey::new_unique(), 42);
genesis_config.rent = Rent::default();
... | rust_cleaned_test_functions.jsonl/29015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1088
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
4387,
47526,
20344,
15380,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
6615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_minimum_ledger_slot() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let RpcHandler { io, meta, .. } = start_rpc_handler_with_tx(&bob_pubkey);
let req = r#"{"jsonrpc":"2.0","id":1,"method":"minimumLedgerSlot"}"#;
let res = io.handle_request_sync(req, meta... | rust_cleaned_test_functions.jsonl/3022 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
84855,
38367,
1389,
27563,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
314,
6399,
11,
8823,
11,
5241,
335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_tw_session_write_bytes() {
let msg = get_request_tw_session();
let mut buf = BytesMut::with_capacity(msg.size());
let res = msg.write_bytes(&mut buf);
assert!(res.is_ok());
assert_eq!(buf.split(), BytesMut::from(REQUEST_TW_SESSION1));
} | rust_cleaned_test_functions.jsonl/63832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
54178,
12316,
9165,
12524,
368,
341,
286,
1077,
3750,
284,
633,
7893,
54178,
12316,
543,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
4197,
35603,
8119,
2486,
1423,
286,
1077,
592,
284,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_entropy() {
test_case(0.0, 0.0, |x| x.entropy());
test_case(f64::INFINITY, 0.0, |x| x.entropy());
} | rust_cleaned_test_functions.jsonl/66859 | {
"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,
50374,
368,
341,
286,
1273,
19096,
7,
15,
13,
15,
11,
220,
15,
13,
15,
11,
760,
87,
91,
856,
13,
49150,
1423,
286,
1273,
19096,
955,
21,
19,
486,
687,
55990,
11,
220,
15,
13,
15,
11,
760... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_index() {
let prog = (0..10).collect::<Vec<_>>();
let mut code = Intcode::from(&prog[..]);
for (i, &v) in prog.iter().enumerate() {
assert_eq!(code[i], v);
}
code[0] = 2;
assert_eq!(code[0], 2);
} | rust_cleaned_test_functions.jsonl/76316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
262,
1077,
29271,
284,
320,
15,
496,
16,
15,
568,
17384,
27638,
10050,
32399,
37038,
262,
1077,
5206,
2038,
284,
1333,
1851,
486,
1499,
2099,
32992,
95874,
2558,
262,
369,
320,
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_variance() {
test_almost(-1.0, 0.1, 0.001373811865368952608715, 1e-16, |x| x.variance());
test_case(-1.0, 1.5, 10.898468544015731954, |x| x.variance());
test_case(-1.0, 2.5, 36245.39726189994988081, |x| x.variance());
test_almost(-1.0, 5.5, 2.5481629178024539E+25,... | rust_cleaned_test_functions.jsonl/88259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1066
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77450,
368,
341,
286,
1273,
94418,
4080,
16,
13,
15,
11,
220,
15,
13,
16,
11,
220,
15,
13,
15,
15,
16,
18,
22,
18,
23,
16,
16,
23,
21,
20,
18,
21,
23,
24,
20,
17,
21,
15,
23,
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... | 1 |
#[test]
fn test_bare_array_qualified_property() {
let input = "A(1).Suit$";
let eol_reader = EolReader::from(input);
let mut parser = word_p();
let (_, result) = parser.parse(eol_reader).expect("Should parse");
a... | rust_cleaned_test_functions.jsonl/102688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
546,
3858,
62,
36335,
16638,
368,
341,
503,
1077,
1946,
284,
330,
32,
7,
16,
568,
62898,
3,
876,
503,
1077,
384,
337,
22306,
284,
468,
337,
5062,
486,
1499,
5384,
317,
503,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fr_repr_is_zero() {
assert!(FrRepr::from(0).is_zero());
assert!(!FrRepr::from(1).is_zero());
assert!(!FrRepr([0, 0, 1, 0]).is_zero());
} | rust_cleaned_test_functions.jsonl/66315 | {
"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,
41537,
68535,
6892,
19359,
368,
341,
262,
2060,
10297,
22560,
693,
649,
486,
1499,
7,
15,
568,
285,
19359,
1423,
262,
2060,
0,
3471,
22560,
693,
649,
486,
1499,
7,
16,
568,
285,
19359,
1423,
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_set_is_subset() {
let a = SgSet::from_iter([2, 4, 6]);
let b = SgSet::<_, DEFAULT_CAPACITY>::from_iter([1, 2, 3, 4, 5, 6, 7]);
let c = SgSet::<_, DEFAULT_CAPACITY>::from_iter([1, 2, 3, 4, 5]);
assert!(a.is_subset(&b));
assert!(!b.is_subset(&a));
assert!(!a.is_subset(&c));... | rust_cleaned_test_functions.jsonl/68249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
6892,
47532,
368,
341,
262,
1077,
264,
284,
328,
70,
1649,
486,
1499,
11723,
2561,
17,
11,
220,
19,
11,
220,
21,
2558,
262,
1077,
293,
284,
328,
70,
1649,
27638,
6878,
11955,
92153,
6831... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_python_version_truncated() {
assert_eq!(
format_python_version("Python 3.7.2", "v${major}.${minor}"),
Some("v3.7".to_string())
);
} | rust_cleaned_test_functions.jsonl/99457 | {
"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,
8955,
55869,
9438,
3547,
38007,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
55869,
9438,
445,
30280,
220,
18,
13,
22,
13,
17,
497,
330,
85,
2365,
36505,
77197,
45670,
92,
4461,
310,
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 |
#[test]
fn test_extern_trivial() {
let mut d = ffi2::c_return_trivial();
check!(ffi2::c_take_trivial_ref(&d));
check!(d.c_take_trivial_ref_method());
check!(d.c_take_trivial_mut_ref_method());
check!(ffi2::c_take_trivial(d));
let mut d = ffi2::c_return_trivial_ptr();
check!(d.c_take_... | rust_cleaned_test_functions.jsonl/50906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4301,
3547,
26658,
368,
341,
262,
1077,
5206,
294,
284,
76956,
17,
486,
66,
12511,
3547,
26658,
543,
262,
1779,
10297,
53799,
17,
486,
66,
73261,
3547,
26658,
7793,
2099,
67,
1106,
262,
1779... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bytes_into_boolean_vec() {
let mut cs = TestConstraintSystem::<Bls12>::new();
let rng = &mut XorShiftRng::from_seed(crate::TEST_SEED);
for i in 0..100 {
let data: Vec<u8> = (0..i + 10).map(|_| rng.gen()).collect();
let bools = {
le... | rust_cleaned_test_functions.jsonl/46585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
45514,
46642,
13251,
368,
341,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
27638,
33,
4730,
16,
17,
6831,
931,
543,
286,
1077,
28422,
284,
609,
6984,
1599,
269,
24841,
49,
968,
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... | 3 |
#[test]
fn test_bool_from_str() {
assert_eq!("true".parse(), Some(true));
assert_eq!("false".parse(), Some(false));
assert_eq!("not even a boolean".parse::<bool>(), None);
} | rust_cleaned_test_functions.jsonl/31400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
5673,
2895,
368,
341,
262,
2060,
10714,
17223,
1866,
3263,
6400,
1507,
4329,
3715,
1106,
262,
2060,
10714,
17223,
3849,
3263,
6400,
1507,
4329,
3576,
1106,
262,
2060,
10714,
17223,
1921,
1496... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_transact_nominate_work() {
TestNet::reset();
ParaA::execute_with(|| {
assert_ok!(LiquidStaking::stake(Origin::signed(ALICE), ksm(4000f64),));
assert_ok!(LiquidStaking::bond(
Origin::signed(ALICE),
ksm(10f64),
RewardDestination::Staked... | rust_cleaned_test_functions.jsonl/53665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
531,
53475,
3277,
11498,
368,
341,
262,
3393,
6954,
486,
9716,
1428,
262,
22989,
32,
486,
10257,
6615,
79453,
341,
286,
2060,
19817,
10297,
96640,
623,
1765,
486,
267,
726,
7,
13298,
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... | 3 |
#[test]
fn test_certification_pool_add_to_validated() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
let mut pool =
CertificationPoolImpl::new(pool_config, no_op_logger(), MetricsRegistry::new());
let share_msg = fake_share(7, 0);... | rust_cleaned_test_functions.jsonl/8474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 461
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37097,
2404,
15709,
2891,
2346,
8337,
657,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
1077,
5206,
7314,
4035,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_active_set_refresh_with_treasury() {
let time = timestamp() - 1024; //make sure there's at least a 1 second delay
let mut contact_info_table = ContactInfoTable::default();
let push = NodeTbleGspPush::default();
let mut stakes = HashMap::new();
for i in 1..... | rust_cleaned_test_functions.jsonl/120874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 464
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12930,
2602,
42076,
6615,
528,
265,
26102,
368,
341,
286,
1077,
882,
284,
11441,
368,
481,
220,
16,
15,
17,
19,
26,
442,
6927,
2704,
1052,
594,
518,
3245,
264,
220,
16,
2086,
7626,
198,
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_mul_assign_scalar() {
let mut s = SideOffsets2D::new(1.0, 2.0, 3.0, 4.0);
s *= 2.0;
assert_eq!(s, SideOffsets2D::new(2.0, 4.0, 6.0, 8.0));
} | rust_cleaned_test_functions.jsonl/96606 | {
"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,
24944,
20688,
41652,
368,
341,
286,
1077,
5206,
274,
284,
16659,
81095,
17,
35,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
626,
286,
274,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tunnel_proxy_unauthorized() {
let addr = mock_tunnel!(
b"\
HTTP/1.1 407 Proxy Authentication Required\r\n\
Proxy-Authenticate: Basic realm=\"nope\"\r\n\
\r\n\
"
);
let rt = runtime::Builder::new_current_thread().ena... | rust_cleaned_test_functions.jsonl/121116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95692,
29712,
4907,
19084,
368,
341,
286,
1077,
10789,
284,
7860,
95692,
33673,
310,
293,
83383,
310,
10130,
14,
16,
13,
16,
220,
19,
15,
22,
32778,
23537,
12659,
12016,
1699,
5661,
310,
32778,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_missing_option_argument() {
let err = OptParseError::missing_option_argument("--abc");
let thing = format!("{}", err);
let expect = "Missing option argument: --abc";
assert_eq!(thing, expect);
} | rust_cleaned_test_functions.jsonl/8275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
9672,
9025,
368,
341,
286,
1077,
1848,
284,
16554,
14463,
1454,
486,
30616,
9672,
9025,
21549,
13683,
797,
286,
1077,
3166,
284,
3561,
79878,
1848,
317,
286,
1077,
1720,
284,
330,
25080,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_resolve_url_from_location_relative_2() {
let url = "http://deno.land/x".parse::<Url>().unwrap();
let new_uri = resolve_url_from_location(&url, "/y");
assert_eq!(new_uri.host_str().unwrap(), "deno.land");
assert_eq!(new_uri.path(), "/y");
} | rust_cleaned_test_functions.jsonl/70601 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
2903,
5673,
13126,
29286,
62,
17,
368,
341,
262,
1077,
2515,
284,
330,
1254,
1110,
5183,
78,
87627,
10776,
3263,
6400,
27638,
2864,
10483,
15454,
543,
262,
1077,
501,
15572,
284,
8830,
2903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut map = LinkedHashMap::new();
map.insert(1, 10);
map.insert(2, 20);
map.insert(3, 30);
map.insert(4, 40);
map.insert(5, 50);
map.remove(&3);
map.remove(&4);
assert!(map.get(&3).is_none());
assert!(ma... | rust_cleaned_test_functions.jsonl/3975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
368,
341,
286,
1077,
5206,
2415,
284,
64333,
486,
931,
543,
286,
2415,
7030,
7,
16,
11,
220,
16,
15,
317,
286,
2415,
7030,
7,
17,
11,
220,
17,
15,
317,
286,
2415,
7030,
7,
18,
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_generalised_auditing() {
let now = time::now().tm_nsec;
let n_u_audited: NormalUserWithAudit = to_audited(NormalUser::build());
// We can even go from NormalUser to JumbledUser since they have compatible LabelledGeneric::Reprs
let j_u_audited: JumbledUserWithAudit = to_audi... | rust_cleaned_test_functions.jsonl/32224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39177,
4056,
4306,
661,
5853,
368,
341,
262,
1077,
1431,
284,
882,
486,
3328,
1005,
13730,
64988,
280,
1066,
262,
1077,
308,
7300,
4306,
661,
1608,
25,
18437,
1474,
2354,
74516,
284,
311,
4306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_errors_on_invalid_predicates() {
allocations::record(|| {
let language = get_language("javascript");
assert_eq!(
Query::new(language, "((identifier) @id (@id))").unwrap_err(),
QueryError {
kind: QueryErrorKind::Syntax,
... | rust_cleaned_test_functions.jsonl/25143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 793
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
20196,
4470,
31433,
12830,
24821,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
3071,
286,
2060,
10714,
33673,
310,
11361,
486,
931,
60740,
11,
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_parse() {
assert_eq!(
ScmpFilterAttr::from_str("SCMP_FLTATR_ACT_DEFAULT")
.unwrap()
.to_native(),
ScmpFilterAttr::ActDefault.to_native()
);
assert_eq!(
ScmpFilterAttr::from_str("SCMP_FLTATR_ACT_BADARCH")
... | rust_cleaned_test_functions.jsonl/66415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
286,
2060,
10714,
33673,
310,
2463,
1307,
5632,
13371,
486,
1499,
2895,
445,
3540,
5781,
22588,
51,
828,
49,
15923,
13811,
1138,
394,
659,
15454,
741,
394,
659,
983,
44494,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct_array_from_mismatched_types() {
StructArray::from(vec![
(
Field::new("b", DataType::Int16, false),
Arc::new(BooleanArray::from(vec![false, false, true, true]))
as Arc<Array>,
),
(
... | rust_cleaned_test_functions.jsonl/687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
3858,
5673,
717,
24976,
291,
9763,
368,
341,
286,
16139,
1857,
486,
1499,
25592,
90515,
310,
2399,
394,
8601,
486,
931,
445,
65,
497,
33172,
486,
1072,
16,
21,
11,
895,
1326,
394,
19689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_expectations_regex() {
assert_expectation(
indoc!(
"
mysql:
expectation:
- type: REGEX
regex: \"foo.*\"
"
),
Some(Expectation::Regex("foo.*".to_owned())),
);
} | rust_cleaned_test_functions.jsonl/74664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
68918,
804,
41832,
368,
341,
286,
2060,
68918,
367,
1006,
310,
1257,
509,
33673,
394,
6228,
12272,
510,
220,
30193,
510,
262,
481,
943,
25,
13676,
3257,
198,
414,
20180,
25,
7245,
7975,
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_arrow_parameters() {
assert_error_eq(
"({a:a, ...b, c:c}) => {}",
ParseError::ObjectPatternWithNonFinalRest,
);
assert_error_eq(
"(a, [...zero, one]) => {}",
ParseError::ArrayPatternWithNonFinalRest,
);
assert_error_eq(
"(a, {items: [..... | rust_cleaned_test_functions.jsonl/7976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46566,
18263,
368,
341,
262,
2060,
4096,
10714,
1006,
286,
330,
2306,
64,
43833,
11,
2503,
65,
11,
272,
48031,
5410,
589,
4687,
756,
286,
14775,
1454,
486,
1190,
15760,
2354,
8121,
19357,
12416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_agg() -> Result<()> {
let array = DFUInt16Array::new_from_iter(1u16..4u16);
let value = [
array.sum()?,
array.max()?,
array.min()?,
array.arg_min()?,
array.arg_max()?,
];
let expected = [
DataValue::UInt16(Some(6)),
D... | rust_cleaned_test_functions.jsonl/19221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
83534,
368,
1464,
5714,
71698,
341,
262,
1077,
1334,
284,
43376,
18777,
16,
21,
1857,
486,
931,
5673,
11723,
7,
16,
84,
16,
21,
496,
19,
84,
16,
21,
317,
262,
1077,
897,
284,
2278,
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... | 7 |
#[test]
fn test_dense_union_i32() {
let mut builder = UnionBuilder::new_dense(7);
builder.append::<Int32Type>("a", 1).unwrap();
builder.append::<Int32Type>("b", 2).unwrap();
builder.append::<Int32Type>("c", 3).unwrap();
builder.append::<Int32Type>("a", 4).unwrap();
... | rust_cleaned_test_functions.jsonl/79794 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72619,
51621,
5318,
18,
17,
368,
341,
286,
1077,
5206,
7363,
284,
9145,
3297,
486,
931,
72619,
7,
22,
317,
286,
7363,
2057,
27638,
1072,
18,
17,
929,
13211,
64,
497,
220,
16,
568,
15454,
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... | 4 |
#[test]
fn test_selected_time_less_than_time_in_storage() {
let time_service = TimeServiceFactory::default();
let artifact = time_service.artifact_id();
let mut testkit = TestKitBuilder::validator()
.with_validators(1)
.with_artifact(artifact.clone())
.with_instance(artifact.... | rust_cleaned_test_functions.jsonl/127515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 944
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23755,
3009,
50747,
51613,
3009,
1243,
23310,
368,
341,
262,
1077,
882,
12267,
284,
4120,
1860,
4153,
486,
2258,
543,
262,
1077,
36639,
284,
882,
12267,
46886,
20754,
842,
543,
262,
1077,
5206,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stacked_porep_extract_all_sha256_sub_8_8() {
test_extract_all::<DiskTree<Sha256Hasher, U8, U8, U0>>();
} | rust_cleaned_test_functions.jsonl/56514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
11191,
620,
460,
79,
39123,
5705,
48836,
17,
20,
21,
5228,
62,
23,
62,
23,
368,
341,
262,
1273,
39123,
5705,
27638,
47583,
6533,
27,
62316,
17,
20,
21,
6370,
261,
11,
547,
23,
11,
547,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_logical_expr() {
test_walk(
"true or false",
vec![
"File",
"ExprStmt",
"LogicalExpr",
"IdentifierExpr",
"IdentifierExpr",
],
... | rust_cleaned_test_functions.jsonl/3319 | {
"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,
86484,
21915,
368,
341,
310,
1273,
56131,
1006,
394,
330,
1866,
476,
895,
756,
394,
7486,
90515,
503,
330,
1703,
756,
503,
330,
16041,
31063,
756,
503,
330,
64312,
16041,
756,
503,
330,
8714,
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 |
#[test]
fn test_bool() {
assert_eq!(bool_val(br"true "), Ok((&br""[..], Record::Bool(true))));
assert_eq!(bool_val(br"false"), Ok((&br""[..], Record::Bool(false))));
assert_eq!(record(br"false "), Ok((&br""[..], Record::Bool(false))));
} | rust_cleaned_test_functions.jsonl/67443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
368,
341,
262,
2060,
10714,
10297,
2641,
6189,
41237,
1,
1866,
59312,
7622,
42902,
1323,
3014,
95874,
1125,
13583,
486,
11233,
3715,
38776,
262,
2060,
10714,
10297,
2641,
6189,
41237,
1,
3849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int96_from() {
assert_eq!(
Int96::from(vec![1, 12345, 1234567890]).data(),
&[1, 12345, 1234567890]
);
} | rust_cleaned_test_functions.jsonl/8692 | {
"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,
4042,
24,
21,
5673,
368,
341,
286,
2060,
10714,
33673,
310,
1333,
24,
21,
486,
1499,
25592,
20703,
16,
11,
220,
16,
17,
18,
19,
20,
11,
220,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
10697... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_effect_middleware() {
let initial_state = TestState { counter: 0 };
let store = StoreRef::new(TestReducer, initial_state);
store.add_middleware(TestEffectMiddleware);
assert_eq!(store.state().counter, 0);
store.dispatch(TestAction::Decrent2Then1);
... | rust_cleaned_test_functions.jsonl/69276 | {
"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,
27125,
717,
11603,
368,
341,
286,
1077,
2856,
4387,
284,
3393,
1397,
314,
5546,
25,
220,
15,
2605,
286,
1077,
3553,
284,
9129,
3945,
486,
931,
31159,
20874,
11,
2856,
4387,
317,
286,
3553,
1364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_section_kprobe() {
let mut obj = fake_obj();
assert_matches!(
obj.parse_section(fake_section("kprobe/foo", bytes_of(&fake_ins()))),
Ok(())
);
assert_matches!(
obj.programs.get("foo"),
Some(Program {
... | rust_cleaned_test_functions.jsonl/132929 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16221,
4698,
52329,
368,
341,
286,
1077,
5206,
2839,
284,
12418,
7328,
1428,
286,
2060,
38344,
33673,
310,
2839,
4632,
16221,
74138,
16221,
445,
74,
52329,
60555,
497,
5820,
3575,
2099,
30570... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_as_json() {
test_none_with_nothing(cast_bool_as_json);
let cs = vec![
(0, Json::from_bool(false).unwrap()),
(i64::MIN, Json::from_bool(true).unwrap()),
(i64::MAX, Json::from_bool(true).unwrap()),
];
for (input, expect) in ... | rust_cleaned_test_functions.jsonl/1999 | {
"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,
22159,
11898,
9455,
368,
341,
286,
1273,
31488,
6615,
6536,
1596,
1337,
559,
22159,
11898,
9455,
626,
286,
1077,
10532,
284,
7486,
90515,
310,
320,
15,
11,
8308,
486,
1499,
22159,
3576,
568,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_options_allow() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new();
engine.compile("let x = if y { z } else { w };")?;
engine.set_allow_if_expression(false);
assert!(engine.compile("let x = if y { z } else { w };").is_err());
engine.compile("let x = { let ... | rust_cleaned_test_functions.jsonl/45982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8743,
55731,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
5206,
4712,
284,
8200,
486,
931,
1428,
262,
4712,
18922,
445,
1149,
856,
284,
421,
379,
314,
1147,
335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_packet_deconstruction() {
let packet = Packet::new(&REPR_PACKET_BYTES[..]);
assert_eq!(packet.check_len(), Ok(()));
assert_eq!(packet.version(), 6);
assert_eq!(packet.traffic_class(), 0);
assert_eq!(packet.flow_label(), 0);
assert_eq!(packet.total_... | rust_cleaned_test_functions.jsonl/91033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21078,
2259,
47197,
368,
341,
286,
1077,
10151,
284,
28889,
486,
931,
2099,
787,
6480,
40328,
40705,
95874,
2558,
286,
2060,
10714,
10297,
24829,
9093,
6043,
1507,
7622,
5065,
1106,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_matches_with_leading_zero_or_more_repeated_leaf_nodes() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
"
(
(comment)* @doc
.
(fu... | rust_cleaned_test_functions.jsonl/25163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
11751,
2228,
19359,
8734,
36664,
1288,
41954,
38909,
14896,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
3071,
286,
1077,
3239,
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_load_config() -> anyhow::Result<()> {
let cfg = Config::try_parse_from(vec!["test", "-c", "foo.toml"]).unwrap();
assert_eq!("foo.toml", cfg.config_file.as_str());
let cfg = Config::try_parse_from(vec!["test", "--config-file", "bar.toml"]).unwrap();
assert_eq!("bar.toml", cfg.con... | rust_cleaned_test_functions.jsonl/22920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
5332,
368,
1464,
88964,
486,
2077,
71698,
341,
262,
1077,
13286,
284,
5532,
486,
1539,
21039,
5673,
25592,
0,
1183,
1944,
497,
6523,
66,
497,
330,
7975,
73494,
75,
45014,
15454,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_node_sexp() {
let mut parser = Parser::new();
parser.set_language(get_language("javascript")).unwrap();
let tree = parser.parse("if (a) b", None).unwrap();
let root_node = tree.root_node();
let if_node = root_node.descendant_for_byte_range(0, 0).unwrap();
let paren_node =... | rust_cleaned_test_functions.jsonl/99271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
3453,
35725,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
14073,
15197,
15454,
543,
262,
1077,
4916,
284,
6729,
4632,
445,
333,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub() {
for elm in SUM_TRIPLES.iter() {
let (a_vec, b_vec, c_vec) = *elm;
let a = BigUint::from_slice(a_vec);
let b = BigUint::from_slice(b_vec);
let c = BigUint::from_slice(c_vec);
assert_op!(c - a == b);
assert_op... | rust_cleaned_test_functions.jsonl/90128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
341,
286,
369,
42205,
304,
30735,
6410,
3298,
14017,
19471,
368,
341,
310,
1077,
320,
64,
13251,
11,
293,
13251,
11,
272,
13251,
8,
284,
353,
23162,
280,
310,
1077,
264,
284,
6164,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_truncate() {
let mut v = vec![box 6,box 5,box 4];
v.truncate(1);
let v = v.as_slice();
assert_eq!(v.len(), 1);
assert_eq!(*(v[0]), 6);
} | rust_cleaned_test_functions.jsonl/75603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
26900,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
2011,
220,
21,
11,
2011,
220,
20,
11,
2011,
220,
19,
935,
286,
348,
5427,
26900,
7,
16,
317,
286,
1077,
348,
284,
348,
5357,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partial_isa_unify() -> TestResult {
let p = Polar::new();
p.load_str("foo(u: User, x: Post) if x.user = u;")?;
let mut q = p.new_query_from_term(term!(call!("foo", [sym!("user"), sym!("post")])), false);
assert_partial_expressions!(
next_binding(&mut q... | rust_cleaned_test_functions.jsonl/63005 | {
"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,
52068,
6892,
64,
4907,
1437,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
445,
7975,
8154,
25,
2657,
11,
856,
25,
3877,
8,
421,
856,
3324,
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... | 3 |
#[test]
fn test_statuscache_append() {
let sig = Signature::default();
let mut status_cache0 = BankStatusCache::default();
let blockhash0 = hash(Hash::new(&vec![0; 32]).as_ref());
status_cache0.add_root(0);
status_cache0.insert(&blockhash0, &sig, 0, ());
let sig ... | rust_cleaned_test_functions.jsonl/82715 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
9360,
26041,
368,
341,
286,
1077,
8366,
284,
32232,
486,
2258,
543,
286,
1077,
5206,
2639,
11529,
15,
284,
8547,
2522,
8233,
486,
2258,
543,
286,
1077,
2504,
8296,
15,
284,
5175,
7,
6370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_search_subnode_from_root() {
let mut nodes_map: HashMap<i32, Node<Item3>> = HashMap::new();
let mut nodes = Nodes {
nodes_map,
size: 0,
root_id: 0,
content_size: 0,
next_id: 0,
m: 0,
};
let mut tree = MerkleBTree::new_empty(3,... | rust_cleaned_test_functions.jsonl/11986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 951
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
10716,
5228,
3509,
5673,
12993,
368,
341,
262,
1077,
5206,
7798,
5376,
25,
10528,
21897,
18,
17,
11,
6018,
31857,
18,
2452,
284,
10528,
486,
931,
543,
262,
1077,
5206,
7798,
284,
52501,
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_pop_ref() {
let mut x: &[int] = [1, 2, 3, 4, 5];
let h = x.pop_ref();
assert_eq!(*h.unwrap(), 5);
assert_eq!(x.len(), 4);
assert_eq!(x[0], 1);
assert_eq!(x[3], 4);
let mut y: &[int] = [];
assert!(y.pop_ref().is_none());
} | rust_cleaned_test_functions.jsonl/33163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
7793,
368,
341,
286,
1077,
5206,
856,
25,
44590,
396,
60,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
305,
284,
856,
8288,
7793,
543,
286,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fr_sqrt() {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
assert_eq!(Fr::zero().sqrt().unwrap(), Fr::zero());
for _ in 0..1000 {
let a = Fr::rand(&mut rng);
let mut nega = a;
nega.negate();
let mut b... | rust_cleaned_test_functions.jsonl/66332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
92199,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
20,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
18,
16,
18,
67,
22,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_scalar_negate() -> ThresholdEcdsaResult<()> {
let mut rng = rand::thread_rng();
for curve in EccCurveType::all() {
let zero = EccScalar::zero(curve);
for _trial in 0..100 {
let random = EccScalar::random(curve, &mut rng)?;
let n_random = random.n... | rust_cleaned_test_functions.jsonl/39320 | {
"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,
41652,
28209,
349,
368,
1464,
58079,
36,
4385,
9081,
2077,
71698,
341,
262,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
1428,
262,
369,
15655,
304,
80660,
31325,
929,
486,
541,
368,
341,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_push_pop_inherited() {
let mut db = InheritedInMemory::default();
let mut vec = List::create(&mut db, None).unwrap();
let mut roots = Vec::new();
for i in 0..100 {
assert_eq!(vec.len(), i);
vec.push(&mut db, i.into()).unwrap();
roots.push(vec.root());
}
assert_eq!(vec.len(... | rust_cleaned_test_functions.jsonl/111543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
17061,
1243,
48394,
368,
341,
197,
10217,
5206,
2927,
284,
758,
48394,
641,
10642,
486,
2258,
1428,
197,
10217,
5206,
7486,
284,
1759,
486,
3182,
2099,
6984,
2927,
11,
2240,
568,
15454,
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_term_taxonomy_CRUD() {
let (conn, filters, mut ran_num_gen, _) = get_db_resources_for_test();
let term_tax_cases =
crate::shared::test::data::term_taxonomy::cases_for_create(&filters, &mut ran_num_gen);
let term_cases = crate::shared::test::data::term::cases_for_create(&filter... | rust_cleaned_test_functions.jsonl/62767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17464,
75794,
24314,
4656,
368,
341,
262,
1077,
320,
5148,
11,
13406,
11,
5206,
10613,
4273,
16322,
11,
27439,
284,
633,
8685,
35569,
5478,
4452,
1428,
262,
1077,
4647,
24579,
41427,
4035,
414,
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... | 9 |
#[test]
fn test_that_rust_script_fun_code_compiles() {
test_rust(
&get_script_fun_abis(),
"examples/rust/script_fun_demo.rs",
EXPECTED_SCRIPT_FUN_OUTPUT,
);
} | rust_cleaned_test_functions.jsonl/15226 | {
"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,
70197,
1710,
590,
14660,
28315,
4136,
18177,
3658,
368,
341,
262,
1273,
1710,
590,
1006,
286,
609,
455,
14660,
28315,
62,
15367,
3148,
286,
330,
51668,
7382,
590,
55678,
28315,
47830,
25638,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_string_int_overflow() {
match DurationString::from_string(String::from("ms")) {
Ok(_) => assert!(false, "parsing \"ms\" should fail"),
Err(_) => assert!(true),
}
} | rust_cleaned_test_functions.jsonl/97541 | {
"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,
3904,
4042,
79073,
368,
341,
286,
2432,
21045,
703,
486,
1499,
3904,
2242,
486,
1499,
445,
1011,
2761,
341,
310,
7622,
48139,
589,
2060,
10297,
3849,
11,
330,
79,
28598,
7245,
1011,
2105,
1265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_maybe_parsed_len() {
let buff = [1_u8, 2, 3, 4];
let mp1 = MaybeParsed::new_with_min_len(&buff[..], 2);
let mp2 = MaybeParsed::new_with_min_len(&buff[..], 10);
assert_eq!(mp1.len(), 4);
assert_eq!(mp2.len(), 4);
} | rust_cleaned_test_functions.jsonl/59731 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
49791,
75788,
6043,
368,
341,
286,
1077,
11522,
284,
508,
16,
7300,
23,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
10490,
16,
284,
10696,
82959,
486,
931,
6615,
7260,
6043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_1() {
let data = "1";
let res = encode_numeric(data.as_bytes());
let goal: usize = 0b1;
assert_eq!(res[0], BitsWithLength(goal, 4));
} | rust_cleaned_test_functions.jsonl/114439 | {
"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,
29418,
62,
16,
368,
341,
286,
1077,
821,
284,
330,
16,
876,
286,
1077,
592,
284,
16164,
29418,
2592,
5357,
12524,
1423,
286,
1077,
5795,
25,
22301,
284,
220,
15,
65,
16,
280,
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 |
#[test]
fn test_multipart_type_to_content_type() {
let multipart = "multipart".to_string();
assert_eq!(MimeMultipartType::Mixed.to_content_type(), (multipart.clone(), "mixed".to_string()));
assert_eq!(MimeMultipartType::Alternative.to_content_type(), (multipart.clone(), "alternative... | rust_cleaned_test_functions.jsonl/112548 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
18204,
1819,
2346,
7495,
1819,
368,
341,
286,
1077,
68058,
284,
330,
29542,
3263,
983,
3904,
1428,
286,
2060,
10714,
10297,
44,
545,
44,
18204,
929,
486,
86433,
2389,
7495,
1819,
1507,
257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_directory() {
let scene = TestScenario::new(util_name!());
let temporary_directory = tempdir().unwrap();
let temporary_path = temporary_directory.path();
assert_ne!(env::current_dir().unwrap(), temporary_path);
let out = scene
.ucmd()
.arg("--chdir")
... | rust_cleaned_test_functions.jsonl/39472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
14846,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
13340,
14846,
284,
2730,
3741,
1005,
15454,
543,
262,
1077,
13340,
2638,
284,
13340,
14846,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_increasing() {
let values = vec![1, 2, 3, 4, 3];
let index = DateTimeIndex::new(values);
assert_eq!(index.len(), 5);
} | rust_cleaned_test_functions.jsonl/97286 | {
"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,
1243,
75462,
368,
341,
286,
1077,
2750,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
18,
935,
286,
1077,
1922,
284,
6520,
1552,
486,
931,
20103,
317,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_enumval() {
assert_eq!(
enumval().parse("Banana"),
Ok((
EnumVal {
id: "Banana".into(),
integer_constant: None,
},
""
))
);
assert_eq!(
e... | rust_cleaned_test_functions.jsonl/66391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
831,
368,
341,
286,
2060,
10714,
33673,
310,
7618,
831,
1005,
6400,
445,
50241,
3362,
4461,
310,
7622,
94702,
394,
14086,
2208,
341,
503,
877,
25,
330,
50241,
3362,
3263,
18122,
3148,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_category_iterate_bin() {
let ax = Category::new(vec!["A", "B"]);
let actual: Vec<_> = ax.bins().collect();
let expected: Vec<_> = vec![
SingleValueBinInterval::new("A"),
SingleValueBinInterval::new("B"),
SingleValueBinInterval::overflow(),
];
assert_eq... | rust_cleaned_test_functions.jsonl/27589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11847,
11723,
349,
21816,
368,
341,
262,
1077,
3859,
284,
10054,
486,
931,
25592,
0,
1183,
32,
497,
330,
33,
15049,
262,
1077,
5042,
25,
11312,
32399,
29,
284,
3859,
948,
1330,
1005,
17384,
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_large_needle() {
let haystack = "111 a 111b";
let needle = "111 a 111bZ";
search_test!(haystack, needle, None);
} | rust_cleaned_test_functions.jsonl/19388 | {
"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,
45228,
71506,
273,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
876,
286,
1077,
30309,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
57,
876,
286,
2711,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_solve_for_success() {
let mut data = collections::HashMap::new();
data.insert(0, Channel { iden: 1 });
data.insert(1, Channel { iden: 4 });
data.insert(2, Channel { iden: 3 });
data.insert(3, Channel { iden: 3 });
data.insert(4, Channel { iden: 4 }... | rust_cleaned_test_functions.jsonl/17847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86246,
5478,
18632,
368,
341,
286,
1077,
5206,
821,
284,
15302,
486,
18497,
486,
931,
543,
286,
821,
7030,
7,
15,
11,
13434,
314,
877,
268,
25,
220,
16,
1625,
286,
821,
7030,
7,
16,
11,
1343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_blocks() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(
engine.eval::<INT>(
r#"
let x = 999;
eval("let x = x + 123");
let y = if x > 0 {
eval("let x = 42");
... | rust_cleaned_test_functions.jsonl/129461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
25201,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
4712,
284,
8200,
486,
931,
1428,
262,
2060,
10714,
33673,
286,
4712,
31710,
27638,
3221,
17055,
310,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_default() {
// The default valuen should be the value that
assert_eq!(
PcrSelectSize::ThreeOctets,
PcrSelectSize::default(),
"PcrSelectSize did not have the expected default value",
);
} | rust_cleaned_test_functions.jsonl/37951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
368,
341,
262,
442,
576,
1638,
1044,
10316,
1265,
387,
279,
897,
429,
7213,
262,
2060,
10714,
33673,
286,
393,
5082,
3379,
1695,
486,
19641,
18053,
1415,
345,
286,
393,
5082,
3379,
1695,
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 |
#[test]
fn test_cdf() {
test_almost(-0.1, 0.1, 0.0, 1e-107, |x| x.cdf(0.1));
test_almost(-0.1, 0.1, 0.0000000015011556178148777579869633555518882664666520593658, 1e-19, |x| x.cdf(0.5));
test_almost(-0.1, 0.1, 0.10908001076375810900224507908874442583171381706127, 1e-11, |x| x.cdf(0.8));
... | rust_cleaned_test_functions.jsonl/88270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2940,
368,
341,
286,
1273,
94418,
4080,
15,
13,
16,
11,
220,
15,
13,
16,
11,
220,
15,
13,
15,
11,
220,
16,
68,
12,
16,
15,
22,
11,
760,
87,
91,
856,
520,
2940,
7,
15,
13,
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_generate() -> Result<(), Error> {
let (key, _mnemonic) = SecretKey::generate("");
let signature = key.sign(MESSAGE.as_bytes());
let verified = key.public().verify(MESSAGE.as_bytes(), &signature)?;
assert!(verified);
Ok(())
} | rust_cleaned_test_functions.jsonl/76 | {
"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,
48851,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
320,
792,
11,
716,
21775,
38801,
8,
284,
8599,
1592,
486,
19366,
13056,
286,
1077,
11957,
284,
1376,
15499,
3189,
11963,
5357,
12524,
1423,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_remove_alleles() {
let mut bcf = Reader::from_path(&"test/test_multi.bcf").unwrap();
for res in bcf.records() {
let mut record = res.unwrap();
if record.pos() == 10080 {
record.remove_alleles(&[false, false, true]).unwrap();
... | rust_cleaned_test_functions.jsonl/8772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
62,
5054,
642,
368,
341,
286,
1077,
5206,
293,
9792,
284,
25166,
486,
1499,
2638,
2099,
1,
1944,
12697,
25133,
948,
9792,
1827,
15454,
543,
286,
369,
592,
304,
293,
9792,
64516,
368,
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... | 3 |
#[test]
fn test_nonnull_array_is_null() {
let a: ArrayRef = Arc::new(Int32Array::from(vec![1, 2, 3, 4]));
let res = is_null(a.as_ref()).unwrap();
let expected = BooleanArray::from(vec![false, false, false, false]);
assert_eq!(expected, res);
assert_eq!(&None, res.data_... | rust_cleaned_test_functions.jsonl/45022 | {
"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,
21637,
2921,
3858,
6892,
15162,
368,
341,
286,
1077,
264,
25,
2910,
3945,
284,
19689,
486,
931,
24123,
18,
17,
1857,
486,
1499,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
58157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_from() {
fn assert_eq_contents_and_layout(
arr1: &CowArray<'_, i32, Ix2>,
arr2: &CowArray<'_, i32, Ix2>,
) {
assert_eq!(arr1, arr2);
assert_eq!(arr1.dim(), arr2.dim());
assert_eq!(arr1.strides(), arr2.strides());
... | rust_cleaned_test_functions.jsonl/92654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1046
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
5673,
368,
341,
286,
5168,
2060,
10714,
16682,
8378,
14466,
1006,
310,
2890,
16,
25,
609,
89915,
1857,
18291,
6878,
600,
18,
17,
11,
358,
87,
17,
12520,
310,
2890,
17,
25,
609,
89915,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_histogram_i64() -> crate::Result<()> {
let mut schema_builder = Schema::builder();
let val_field = schema_builder.add_i64_field("val_field", FAST);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let mut writer = index.writer... | rust_cleaned_test_functions.jsonl/125925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68564,
5318,
21,
19,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
1044,
5013,
284,
10802,
28532,
1364,
5318,
21,
19,
5013,
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... | 5 |
#[test]
fn test_inc_count_api() {
let (mut testkit, api) = init_testkit();
inc_count(&api, 5);
testkit.create_block();
// Check that the user indeed is persisted by the service
let counter: u64 = api.public(ApiKind::Service("counter"))
.get("count")
.unwrap();
assert_eq!... | rust_cleaned_test_functions.jsonl/86865 | {
"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,
31285,
3180,
11697,
368,
341,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
543,
262,
3625,
3180,
2099,
2068,
11,
220,
20,
317,
262,
1273,
8226,
2520,
7113,
1428,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_range_formatting() {
let input = "
while(
true
) {
function func() {
func( /* comment */
);
let array =
[ 1
, 2];
}
function func2()
{
const no_format = () => {};
}
}
";
// in the middle of the indentati... | rust_cleaned_test_functions.jsonl/785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
8955,
1280,
368,
341,
286,
1077,
1946,
284,
6228,
3472,
1006,
262,
830,
198,
8,
341,
262,
729,
2915,
368,
341,
262,
2915,
7,
257,
1391,
3980,
735,
262,
3475,
262,
1077,
1334,
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... | 1 |
#[test]
fn test_smoke() {
let key = Ed25519PrivKey::generate();
let from_bytes = |bytes: &[u8]| {
let mut sig = [0u8; ED25519_SIGNATURE_LEN];
let len = ::std::cmp::min(sig.len(), bytes.len());
(&mut sig[..len]).copy_from_slice(&bytes[..len]);
Ed255... | rust_cleaned_test_functions.jsonl/79612 | {
"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,
15874,
4740,
368,
341,
286,
1077,
1376,
284,
3199,
17,
20,
20,
16,
24,
32124,
1592,
486,
19366,
543,
286,
1077,
504,
12524,
284,
760,
9651,
25,
44590,
84,
23,
29685,
341,
310,
1077,
5206,
8366... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nonexistent() {
let mut map: TreeMap<int, int> = TreeMap::new();
map.insert(1, 2);
map.insert(2, 1);
map.insert(3, 4);
map[4];
} | rust_cleaned_test_functions.jsonl/88300 | {
"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,
3560,
21637,
64085,
368,
341,
286,
1077,
5206,
2415,
25,
76883,
4159,
11,
526,
29,
284,
76883,
486,
931,
1428,
286,
2415,
7030,
7,
16,
11,
220,
17,
317,
286,
2415,
7030,
7,
17,
11,
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 |
#[test]
fn test_start_year_month() {
let prefix = Prefix::new(Some("START_YEAR_MONTH"), valid_date());
assert_eq!(prefix.display("a"), "2000-01 a");
} | rust_cleaned_test_functions.jsonl/126596 | {
"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,
4906,
14645,
18933,
368,
341,
286,
1077,
9252,
284,
56483,
486,
931,
65405,
445,
22564,
57127,
48023,
3975,
2697,
4164,
1423,
286,
2060,
10714,
10297,
11849,
8181,
445,
64,
3975,
330,
17,
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 |
#[test]
fn test_fabs() {
assert_eq!(0.0, fabs(0.0));
assert_eq!(1.0, fabs(1.0));
assert_eq!(1.0, fabs(-1.0));
} | rust_cleaned_test_functions.jsonl/50096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
3435,
368,
341,
262,
2060,
10714,
10297,
15,
13,
15,
11,
40728,
7,
15,
13,
15,
1106,
262,
2060,
10714,
10297,
16,
13,
15,
11,
40728,
7,
16,
13,
15,
1106,
262,
2060,
10714,
10297,
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 |
#[test]
fn test_recip() {
assert_eq!(_1 * _1.recip(), _1);
assert_eq!(_2 * _2.recip(), _1);
assert_eq!(_1_2 * _1_2.recip(), _1);
assert_eq!(_3_2 * _3_2.recip(), _1);
assert_eq!(_neg1_2 * _neg1_2.recip(), _1);
} | rust_cleaned_test_functions.jsonl/47155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
573,
368,
341,
286,
2060,
10714,
0,
2490,
16,
353,
716,
16,
11199,
573,
1507,
716,
16,
317,
286,
2060,
10714,
0,
2490,
17,
353,
716,
17,
11199,
573,
1507,
716,
16,
317,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_32bitenc() {
let shared_builder = settings::builder();
let shared_flags = settings::Flags::new(shared_builder);
let isa = isa::lookup(triple!("riscv32"))
.unwrap()
.finish(shared_flags);
let mut func = Function::new();
let ebb = fu... | rust_cleaned_test_functions.jsonl/10515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
17,
4489,
954,
368,
341,
286,
1077,
6094,
28532,
284,
5003,
486,
17850,
543,
286,
1077,
6094,
14130,
284,
5003,
486,
9195,
486,
931,
65069,
28532,
317,
286,
1077,
51335,
284,
51335,
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_decimal_binary_comparison_coercion() -> Result<()> {
let input_decimal = DataType::Decimal(20, 3);
let input_types = [
DataType::Int8,
DataType::Int16,
DataType::Int32,
DataType::Int64,
DataType::Float32,
Dat... | rust_cleaned_test_functions.jsonl/94610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
31761,
90797,
11393,
2962,
290,
368,
1464,
5714,
71698,
341,
286,
1077,
1946,
74429,
284,
33172,
486,
11269,
7,
17,
15,
11,
220,
18,
317,
286,
1077,
1946,
9763,
284,
2278,
310,
33172,
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... | 4 |
#[test]
fn test_matrix_components_out_of_bounds1() {
let matrix = Matrix2x2::new(1_i32, 2_i32, 3_i32, 4_i32);
assert_eq!(matrix[2][0], matrix[2][0]);
} | rust_cleaned_test_functions.jsonl/128954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10193,
23258,
6068,
3575,
36878,
16,
368,
341,
286,
1077,
6172,
284,
11631,
17,
87,
17,
486,
931,
7,
16,
5318,
18,
17,
11,
220,
17,
5318,
18,
17,
11,
220,
18,
5318,
18,
17,
11,
220,
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_finitedomain_4() {
// drop_before interval
let fd = FiniteDomain::from(1..=8);
let before = fd.drop_before(|x| *x > 6).unwrap();
assert_eq!(before.min(), 7);
assert_eq!(before.max(), 8);
assert!(fd.drop_before(|x| *x > 10).is_none());
... | rust_cleaned_test_functions.jsonl/31710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39737,
1608,
3121,
62,
19,
368,
341,
286,
442,
5943,
23708,
9873,
198,
286,
1077,
12414,
284,
93619,
13636,
486,
1499,
7,
16,
496,
28,
23,
317,
286,
1077,
1573,
284,
12414,
19086,
23708,
22428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_top_level_ctx_enum_default() {
#[derive(PartialEq, Debug, DekuRead, DekuWrite)]
#[deku(type = "u8", ctx = "a: u8, b: u8", ctx_default = "1,2")]
enum TopLevelCtxEnumDefault {
#[deku(id = "1")]
VariantA(
#[deku(
reader = "(|rest|{u8::read(res... | rust_cleaned_test_functions.jsonl/81455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 605
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
8274,
15147,
31054,
9993,
368,
341,
262,
11506,
27098,
5304,
20894,
27312,
11,
11091,
11,
74463,
84,
4418,
11,
74463,
84,
7985,
5563,
262,
11506,
450,
12133,
5808,
284,
330,
84,
23,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_new_vote_state_zero_confirmations() {
let mut vote_state1 = VoteState::default();
let bad_votes: VecDeque<Lockout> = vec![
Lockout {
slot: 0,
confirmation_count: 0,
},
Lockout {
slot: 1,
... | rust_cleaned_test_functions.jsonl/6117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 812
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
5921,
54360,
4387,
19359,
23800,
804,
368,
341,
286,
1077,
5206,
6910,
4387,
16,
284,
34034,
1397,
486,
2258,
1428,
286,
1077,
3873,
65116,
25,
11312,
73891,
27,
11989,
411,
29,
284,
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_enum() {
assert::pass(
r#"
enum_type = enum("option1", "option2", True)
x = enum_type("option1")
assert_eq(x.value, "option1")
assert_eq(enum_type(True).value, True)
"#,
);
assert::fails(
r#"
enum_type = enum("option1", "option2", True)
enum_type(F... | rust_cleaned_test_functions.jsonl/2394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 748
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
286,
2060,
486,
6385,
1006,
310,
435,
2,
698,
9018,
1819,
284,
7618,
445,
2047,
16,
497,
330,
2047,
17,
497,
3007,
340,
87,
284,
7618,
1819,
445,
2047,
16,
1138,
2207,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_result_ok_roundtrip() -> Result<(), String> {
let original: Result<String, String> = Ok("ciao!".to_string());
let mut encoded = Vec::new();
original.encode(&mut encoded);
let decoded: Result<String, String> = Result::decode(&encoded)?;
assert_eq!(decoded,... | rust_cleaned_test_functions.jsonl/15915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5287,
19817,
29896,
32981,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
4024,
25,
5714,
3464,
11,
923,
29,
284,
7622,
445,
66,
22516,
92993,
983,
3904,
1423,
286,
1077,
5206,
20498,
284,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gen_fuzzy_crate_names() {
fn test_helper(input: &str, expect: &[&str]) {
let mut actual = gen_fuzzy_crate_names(input.to_string()).unwrap();
actual.sort();
let mut expect = expect.iter().map(|x| x.to_string()).collect::<Vec<_>>();
expect.sort();
asse... | rust_cleaned_test_functions.jsonl/35035 | {
"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,
16322,
761,
34758,
666,
7698,
9187,
368,
341,
262,
5168,
1273,
10418,
5384,
25,
609,
495,
11,
1720,
25,
44590,
5,
495,
2467,
341,
286,
1077,
5206,
5042,
284,
4081,
761,
34758,
666,
7698,
9187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ttyname_not_pty() {
let fd = File::open("/dev/zero").unwrap();
assert!(fd.as_raw_fd() > 0);
assert_eq!(ttyname(fd.as_raw_fd()), Err(Error::Sys(Errno::ENOTTY)));
} | rust_cleaned_test_functions.jsonl/104838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
1881,
606,
7913,
62,
1595,
368,
341,
262,
1077,
12414,
284,
2887,
486,
2508,
4283,
3583,
14,
14154,
1827,
15454,
543,
262,
2060,
10297,
6902,
5357,
16067,
17676,
368,
861,
220,
15,
317,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_raw_uncessary_percent_decode() {
// non-ASCII characters MAY be percent-encoded.
// do not mention such percent-encoding.
let a = HeaderValue::from_static(
"form-data; name=photo; fil... | rust_cleaned_test_functions.jsonl/129588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 658
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
16067,
4907,
1120,
658,
29883,
15227,
368,
341,
1789,
286,
442,
2477,
12,
56450,
5766,
39230,
387,
3266,
92262,
624,
1789,
286,
442,
653,
537,
6286,
1741,
3266,
12,
17159,
624,
16885,
16885,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_0_twice() {
let array = default_i32();
array.set(12);
assert_eq!(array.get(), &12);
array.set(-2);
} | rust_cleaned_test_functions.jsonl/13515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
62,
15,
54178,
558,
368,
341,
286,
1077,
1334,
284,
1638,
5318,
18,
17,
543,
286,
1334,
980,
7,
16,
17,
317,
286,
2060,
10714,
10297,
1653,
670,
1507,
609,
16,
17,
317,
286,
1334,
980,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_split_empty_arr() {
let to_test = Vec::new();
let expected = [[0, 0, 0, 0, 0, 0, 0, 0]];
assert_eq!(split(to_test), expected);
} | rust_cleaned_test_functions.jsonl/54015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
15124,
11210,
368,
341,
286,
1077,
311,
4452,
284,
11312,
486,
931,
543,
286,
1077,
3601,
284,
4318,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_detach() {
use crate::Timer;
let ex = LocalExecutor::new(None).expect("failed to create local executor");
ex.spawn(async {
loop {
Task::<()>::later().await;
}
})
.detach();
ex.run(async {
Timer::new(std::time::Duration::... | rust_cleaned_test_functions.jsonl/38353 | {
"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,
93067,
368,
341,
262,
990,
17717,
486,
10105,
401,
262,
1077,
505,
284,
8774,
25255,
486,
931,
26717,
568,
17119,
445,
16091,
311,
1855,
2205,
31558,
3071,
262,
505,
59296,
18285,
341,
286,
6337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_get() {
let mut table = Table {
map: HashMap::new(),
map_version: HashMap::new(),
insert: Vec::new(),
remove: Vec::new(),
};
table.insert(
"test_outer".to_owned(),
"test_inner".to_owned(),
... | rust_cleaned_test_functions.jsonl/90783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
8378,
3062,
368,
341,
286,
1077,
5206,
1965,
284,
6633,
341,
310,
2415,
25,
10528,
486,
931,
3148,
310,
2415,
9438,
25,
10528,
486,
931,
3148,
310,
5656,
25,
11312,
486,
931,
3148,
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_select_measure_aggregate_functions() {
let query_plan = convert_select_to_query_plan(
"SELECT MAX(maxPrice), MIN(minPrice), AVG(avgPrice) FROM KibanaSampleDataEcommerce"
.to_string(),
DatabaseProtocol::MySQL,
);
let logical_plan = ... | rust_cleaned_test_functions.jsonl/59241 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 727
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
48938,
20587,
14240,
31708,
368,
341,
286,
1077,
3239,
26564,
284,
5508,
13051,
2346,
5738,
26564,
1006,
310,
330,
4858,
8334,
8739,
6972,
701,
16701,
14146,
6972,
701,
70414,
78016,
6972,
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_extraction_with_valid_state_proof() {
let valid_json = r#"{ "op" : "REPLY", "result": {"reqId": 83955, "state_proof": {"proof_nodes": "29qFIGZlZXOT0pF7IjEiOjQsIjEwMDAxIjo4fQ==", "root_hash": "5BU5Rc3sRtTJB6tVprGiTSqiRaa9o6ei11MjH4Vu16ms", "multi_signature": {"participants": ["Gamma", "De... | rust_cleaned_test_functions.jsonl/35641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
94842,
6615,
8337,
4387,
86757,
368,
341,
286,
1077,
2697,
9455,
284,
435,
2,
14129,
330,
453,
1,
549,
330,
787,
24834,
497,
330,
1382,
788,
5212,
2958,
764,
788,
220,
23,
18,
24,
20,
20,
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_j_type() {
let i = Instr {
bits: 0b1010101010110011101110011_0000000,
format: Format::J(JType {}),
};
match i.format {
Format::J(f) => {
assert_eq!(0b1010101010110011101110011, f.offset(i.bits));
}
_ => panic!("Expecting JType forma... | rust_cleaned_test_functions.jsonl/60977 | {
"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,
5374,
1819,
368,
341,
262,
1077,
600,
284,
758,
495,
341,
286,
9472,
25,
220,
15,
65,
16,
15,
16,
15,
16,
15,
16,
15,
16,
15,
16,
16,
15,
15,
16,
16,
16,
15,
16,
16,
16,
15,
15,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_is_mux_startup_frame() {
let control_dlci = DLCI::try_from(0).unwrap();
let user_dlci = DLCI::try_from(5).unwrap();
let frame_type = FrameTypeMarker::SetAsynchronousBalancedMode;
assert!(frame_type.is_mux_startup_frame(&control_dlci));
assert!(!frame_type... | rust_cleaned_test_functions.jsonl/87857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
80363,
80858,
8929,
368,
341,
286,
1077,
2524,
50811,
5855,
284,
42919,
40,
486,
1539,
5673,
7,
15,
568,
15454,
543,
286,
1077,
1196,
50811,
5855,
284,
42919,
40,
486,
1539,
5673,
7,
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_write_and_load_memory_buffer() {
let context = Context::create();
let module = context.create_module("my_module");
let builder = context.create_builder();
let void_type = context.void_type();
let function_type = void_type.fn_type(&[], false);
let function = module.add_fun... | rust_cleaned_test_functions.jsonl/63535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
8378,
12411,
19195,
7776,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
2408,
10750,
797,
262,
1077,
7363,
284,
2266,
2520,
28532,
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_parse() {
let data = std::fs::read("tests/simple_circuit.r1cs").unwrap();
let file = R1csFile::<32>::read(data.as_slice()).unwrap();
assert_eq!(
file.header.prime,
FieldElement::from(hex!(
"010000f093f5e1439170b97948e83328... | rust_cleaned_test_functions.jsonl/69987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
286,
1077,
821,
284,
1460,
486,
3848,
486,
878,
445,
23841,
67195,
666,
37268,
1746,
16,
4837,
1827,
15454,
543,
286,
1077,
1034,
284,
431,
16,
4837,
1703,
27638,
18,
17,
6831,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cost_tracker_reach_data_limit() {
let (mint_keypair, start_hash) = test_setup();
// build two transactions with diff accounts
let (_tx1, _keys1, cost1) = build_simple_transaction(&mint_keypair, &start_hash);
let second_account = Keypair::new();
let (_tx2, ... | rust_cleaned_test_functions.jsonl/67932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15890,
50264,
1288,
610,
1769,
14763,
368,
341,
286,
1077,
320,
67791,
3097,
12670,
11,
1191,
8950,
8,
284,
1273,
21363,
543,
286,
442,
1936,
1378,
14131,
448,
3638,
9618,
198,
286,
1077,
5453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.