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_is_mate_with_partial_state_and_old_banmen_and_opponent_move_sente() {
let mate_mvs:Vec<Move> = vec![
Move::Put(MochigomaKind::Kyou,KomaDstPutPosition(9-4,8+1)),
Move::Put(MochigomaKind::Fu,KomaDstPutPosition(9-4,1+1)),
Move::Put(MochigomaKind::Fu,KomaDstPutPosition(9-4,2+1)),
Move:... | rust_cleaned_test_functions.jsonl/72990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 840
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
717,
349,
6615,
52068,
4387,
8378,
21108,
880,
276,
5676,
8378,
10287,
1146,
17134,
643,
6817,
368,
972,
10217,
29176,
717,
11562,
25,
10050,
27,
9860,
29,
284,
7486,
20703,
319,
197,
9209,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_construct_subtree_at_bottom_found_leaf_node() {
// root root
// o o o o
// o existing_key => o subtree
// y placeholder
// ... | rust_cleaned_test_functions.jsonl/15416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1021
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
5228,
9344,
3752,
25473,
21480,
38909,
5084,
368,
341,
262,
442,
286,
3704,
5968,
3704,
7213,
262,
442,
414,
297,
414,
297,
5180,
297,
414,
297,
7213,
262,
442,
262,
297,
256,
6350,
3097,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero_sized_no_alloc() {
let arena = TypedArena::default();
for _ in 0..5000 {
arena.alloc(());
}
assert!(arena.chunks.borrow().is_empty());
} | rust_cleaned_test_functions.jsonl/12324 | {
"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,
19359,
643,
1506,
6536,
14802,
368,
341,
262,
1077,
24902,
284,
50554,
93937,
486,
2258,
543,
262,
369,
716,
304,
220,
15,
496,
20,
15,
15,
15,
341,
414,
24902,
78224,
7,
1423,
262,
456,
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
] | 2 |
#[test]
fn test_none_or_up_to_none_large() {
let occurence: Occurences<u32> = Occurences::NoneOrUpTo(None);
occurence.check_count(u32::MAX).unwrap();
} | rust_cleaned_test_functions.jsonl/4442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
8734,
8237,
2346,
31488,
45228,
368,
341,
286,
1077,
2983,
86937,
25,
19927,
552,
98162,
34837,
18,
17,
29,
284,
19927,
552,
98162,
486,
4064,
2195,
2324,
1249,
26717,
317,
286,
2983,
86937... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ex1() {
assert_eq!(
(25, 286),
Solver::run_on(
"
F10
N3
F7
R90
F11
"
)
);
} | rust_cleaned_test_functions.jsonl/110349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
16,
368,
341,
286,
2060,
10714,
33673,
310,
320,
17,
20,
11,
220,
17,
23,
21,
1326,
310,
68295,
486,
6108,
4470,
1006,
394,
6228,
286,
434,
16,
15,
198,
286,
451,
18,
198,
286,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_withdraw_ix_no_acc_data_fail() {
assert_eq!(
process_nonce_instruction(&system_instruction::withdraw_nonce_account(
&Pubkey::default(),
&Pubkey::default(),
&Pubkey::default(),
1,
)),
... | rust_cleaned_test_functions.jsonl/73064 | {
"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,
11305,
6615,
7633,
62686,
6536,
17737,
1769,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
1882,
48508,
54923,
2099,
8948,
54923,
486,
62446,
48508,
13500,
1006,
394,
609,
29162,
792,
486,
2258,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aff_proj_sidh() {
fn aux(a_sk: MyASc) {
let a_sk = a_sk.0;
let e = (a(), b());
let ab = (paxy(), qaxy());
let bb = (pbxy(), qbxy());
let pab = (xpa(), xqa(), xra());
let pbb = (xpb(), xqb(), xrb());
let a_steps = 4; // EA/2;
let ap_steps = 2; // EA;
let (aff_e, ((_, _), (_, _))) = ... | rust_cleaned_test_functions.jsonl/11578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48914,
49453,
53044,
71,
368,
341,
262,
5168,
10047,
2877,
33811,
25,
3017,
1911,
66,
8,
341,
10217,
264,
33811,
284,
264,
33811,
13,
15,
280,
10217,
384,
284,
320,
64,
1507,
293,
1423,
10217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lps() {
let pattern = b"ababaca";
let lps = lps(pattern);
assert_eq!(lps, [0, 0, 1, 2, 3, 0, 1]);
} | rust_cleaned_test_functions.jsonl/12993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
1690,
368,
341,
286,
1077,
5383,
284,
293,
1,
370,
370,
17106,
876,
286,
1077,
326,
1690,
284,
326,
1690,
30948,
317,
286,
2060,
10714,
10297,
75,
1690,
11,
508,
15,
11,
220,
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 |
#[test]
fn test_find() {
let category = CategoryBuilder::<(), (), (), &str>::new()
.object("A", vec![], ())
.object("B", vec![], ())
.object("AxB", vec![ObjectTag::Product("A", "B")], ())
.morphism("p1", "AxB", "A", vec![], ())
.morphism("p2", "AxB", "B", vec![], ())
... | rust_cleaned_test_functions.jsonl/0 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 657
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
368,
341,
262,
1077,
5582,
284,
10054,
3297,
27638,
1507,
38104,
38104,
609,
495,
6831,
931,
741,
286,
659,
1700,
445,
32,
497,
7486,
0,
12995,
58389,
286,
659,
1700,
445,
33,
497,
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... | 2 |
#[test]
fn test_code_blocks_in_comments_marked_as_rust() {
let comment = r#"```rust
fn main(){}
```
Some comment.
```
let a = 1;
```"#;
assert_eq!(
format_docs(comment),
"```rust\nfn main(){}\n```\nSome comment.\n```rust\nlet a = 1;\n```"
);
} | rust_cleaned_test_functions.jsonl/57092 | {
"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,
4136,
25201,
1243,
30359,
18924,
291,
11898,
1710,
590,
368,
341,
286,
1077,
3980,
284,
435,
55543,
73594,
35788,
198,
8822,
1887,
68379,
13874,
3989,
8373,
3980,
624,
13874,
3989,
1149,
264,
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_eval_list_pattern_matching() {
let source_code = "let a = 1 :: 2 :: 3 :: 4 :: 5 :: [] in let rec len x = match x with | [] -> 0 | head::tail -> 1 + len tail in len a;;";
let result = interpret(source_code, false, false);
assert_eq!(result, vec![ExprVal::I64(5)],);
} | rust_cleaned_test_functions.jsonl/41120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
2019,
21260,
70763,
368,
341,
286,
1077,
2530,
4136,
284,
330,
1149,
264,
284,
220,
16,
3504,
220,
17,
3504,
220,
18,
3504,
220,
19,
3504,
220,
20,
3504,
3056,
304,
1077,
1395,
2422,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_bans() {
let route = Route::GetBans { guild_id: GUILD_ID };
assert_eq!(
route.to_string(),
format!("guilds/{guild_id}/bans", guild_id = GUILD_ID)
);
} | rust_cleaned_test_functions.jsonl/119920 | {
"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,
3062,
880,
596,
368,
341,
286,
1077,
6021,
284,
9572,
486,
1949,
33,
596,
314,
26411,
842,
25,
479,
18023,
3450,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
310,
3561,
17223,
578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_update_config() {
let msg = InstantiateMsg {
owner: h(OWNER),
nebula_token: h(NEB_TOKEN),
};
let info = mock_info(OWNER, &[]);
let mut deps = mock_dependencies(&[]);
let _res = instantiate(deps.as_mut(), mock_env(), info, msg)
.expect("contract succes... | rust_cleaned_test_functions.jsonl/76315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
5332,
368,
341,
262,
1077,
3750,
284,
32288,
6611,
341,
286,
6372,
25,
305,
7,
99031,
1326,
286,
80867,
5607,
6458,
25,
305,
7,
3944,
33,
18681,
1326,
262,
3634,
262,
1077,
3546,
284,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verify_seal_fr32_validation() {
let convertible_to_fr_bytes = [0; 32];
let out = bytes_into_fr(&convertible_to_fr_bytes);
assert!(out.is_ok(), "tripwire");
let not_convertible_to_fr_bytes = [255; 32];
let out = bytes_into_fr(¬_convertible_to_fr_bytes);
assert!(out.is_... | rust_cleaned_test_functions.jsonl/58645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
3453,
278,
41537,
18,
17,
19416,
368,
341,
262,
1077,
67613,
2346,
41537,
12524,
284,
508,
15,
26,
220,
18,
17,
935,
262,
1077,
700,
284,
5820,
45514,
41537,
2099,
14166,
1238,
2346,
4153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_urlencoded() {
let req = TestRequest::with_header(
header::CONTENT_TYPE,
"application/x-www-form-urlencoded",
)
.header(header::CONTENT_LENGTH, "11")
.set_payload(Bytes::from_static(b"hello=world"))
.finish();
let result = ... | rust_cleaned_test_functions.jsonl/7654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
19329,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
4197,
8757,
1006,
310,
4247,
486,
67872,
4189,
345,
310,
330,
5132,
10776,
41242,
8460,
44557,
756,
286,
1727,
286,
659,
2708,
25534,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decoder_invalid_boundary() {
let mut d = GB18030Encoding.decoder();
assert_feed_ok!(d, [], [0xe3], "");
assert_feed_err!(d, [], [], [0x32, 0x9a, 0x36], "");
assert_finish_ok!(d, "");
let mut d = GB18030Encoding.decoder();
... | rust_cleaned_test_functions.jsonl/48116 | {
"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,
49843,
31433,
54004,
368,
341,
73363,
286,
1077,
5206,
294,
284,
18865,
16,
23,
15,
18,
15,
14690,
74047,
543,
286,
2060,
42390,
19817,
10297,
67,
11,
10071,
508,
15,
8371,
18,
1125,
14498,
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_gc_userdata() -> Result<()> {
struct MyUserdata {
id: u8,
}
impl UserData for MyUserdata {
fn add_methods<'lua, M: UserDataMethods<'lua, Self>>(methods: &mut M) {
methods.add_method("access", |_, this, ()| {
assert!(this.id == 123);
... | rust_cleaned_test_functions.jsonl/40495 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 516
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49423,
59315,
368,
1464,
5714,
71698,
341,
262,
2036,
3017,
1474,
691,
341,
286,
877,
25,
575,
23,
345,
262,
555,
262,
11605,
71294,
369,
3017,
1474,
691,
341,
286,
5168,
912,
36084,
18291,
2762... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vec3mask_from() {
assert_eq!(
Into::<[u32; 3]>::into(Vec3Mask::new(false, false, false)),
[0, 0, 0]
);
assert_eq!(
Into::<[u32; 3]>::into(Vec3Mask::new(true, false, false)),
[!0, 0, 0]
);
assert_eq!(
Into::<[u32; 3]>::into(Vec3Mask::new... | rust_cleaned_test_functions.jsonl/75043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
11258,
5673,
368,
341,
262,
2060,
10714,
33673,
286,
31645,
27638,
58,
84,
18,
17,
26,
220,
18,
60,
6831,
18122,
49923,
18,
12686,
486,
931,
3576,
11,
895,
11,
895,
6965,
286,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_keys() {
let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')];
let map: HashMap<_, _> = vec.into_iter().collect();
let keys: Vec<_> = map.into_keys().collect();
assert_eq!(keys.len(), 3);
assert!(keys.contains(&1));
assert!(keys.contains(&2));
... | rust_cleaned_test_functions.jsonl/26954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
12631,
368,
341,
286,
1077,
7486,
284,
7486,
0,
9697,
16,
11,
364,
64,
4567,
320,
17,
11,
364,
65,
4567,
320,
18,
11,
364,
66,
863,
935,
286,
1077,
2415,
25,
10528,
27,
6878,
716,
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_push_char() {
let mut data = String::from_str("ประเทศไทย中");
data.push_char('华');
data.push_char('b'); // 1 byte
data.push_char('¢'); // 2 byte
data.push_char('€'); // 3 byte
data.push_char('𤭢'); // 4 byte
assert_eq!slice(), "ประเทศไทย中华b¢... | rust_cleaned_test_functions.jsonl/113364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
9232,
368,
341,
286,
1077,
5206,
821,
284,
923,
486,
1499,
2895,
445,
130391,
15946,
797,
286,
821,
2552,
9232,
492,
85361,
1157,
286,
821,
2552,
9232,
492,
65,
4667,
442,
220,
16,
4922,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast_to_vmm_config() {
// No mmds config.
{
let kernel_file = TempFile::new().unwrap();
let rootfs_file = TempFile::new().unwrap();
let json = format!(
r#"{{
"balloon": {{
"amount_mib"... | rust_cleaned_test_functions.jsonl/61584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
2346,
2273,
3821,
5332,
368,
341,
286,
442,
2308,
296,
2277,
82,
2193,
624,
286,
341,
310,
1077,
10001,
2458,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
310,
1077,
3704,
3848,
2458,
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_initialize_vote_account() {
let vote_account_pubkey = solana_sdk::pubkey::new_rand();
let vote_account = Account::new_ref(100, VoteState::size_of(), &id());
let vote_account = KeyedAccount::new(&vote_account_pubkey, false, &vote_account);
let node_pubkey = solana... | rust_cleaned_test_functions.jsonl/43723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 990
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
54360,
13500,
368,
341,
286,
1077,
6910,
13500,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
6910,
13500,
284,
8615,
486,
931,
7793,
7,
16,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kernel_filter_with_empty_image() {
let image = gray_image!();
let k = vec![2u8];
let kernel = Kernel::new(&k, 1, 1);
let filtered = kernel.filter(&image, |c, a| *c = a);
let expected = gray_image!();
assert_pixels_eq!(filtered, expected);
} | rust_cleaned_test_functions.jsonl/35611 | {
"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,
26876,
8727,
6615,
15124,
4954,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
0,
1428,
286,
1077,
595,
284,
7486,
20703,
17,
84,
23,
935,
286,
1077,
10001,
284,
36603,
486,
931,
2099,
74,
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_request() {
use helix::*;
let req = GetChannelEditorsRequest::builder()
.broadcaster_id("44445592".to_string())
.build();
// From twitch docs
let data = br#"
{
"data": [
{
"user_id": "182891647",
"user_name": "mauerba... | rust_cleaned_test_functions.jsonl/73489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
341,
262,
990,
11338,
941,
56162,
262,
1077,
4232,
284,
2126,
9629,
21014,
1900,
486,
17850,
741,
286,
659,
65,
8546,
32020,
842,
445,
19,
19,
19,
19,
20,
20,
24,
17,
3263,
983,
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_render_context_promotion_and_demotion() {
use crate::value::to_json;
let mut render_context = RenderContext::new(None);
render_context.set_local_var("@index".to_string(), to_json(0));
render_context.promote_local_vars();
assert_eq!(
render_context
.get_... | rust_cleaned_test_functions.jsonl/14265 | {
"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,
22781,
8467,
47877,
5956,
8378,
69403,
5956,
368,
341,
262,
990,
17717,
486,
957,
486,
983,
9455,
280,
262,
1077,
5206,
3141,
8467,
284,
13848,
1972,
486,
931,
26717,
626,
262,
3141,
8467,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_comparison() {
let x = r#"
a {
b {
c {}
}
}
"#;
let y = r#"
a {
b {}
}
"#;
let against = load_css_paths(y.as_bytes());
let other = load_css_paths(x.as_bytes());
let mut ret = Vec::new();
get_differences(&against, &other, &mut ret);
assert!(ret.i... | rust_cleaned_test_functions.jsonl/106112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90797,
368,
341,
262,
1077,
856,
284,
435,
2,
698,
64,
341,
262,
293,
341,
286,
272,
5613,
262,
456,
532,
57676,
401,
262,
1077,
379,
284,
435,
2,
698,
64,
341,
262,
293,
5613,
532,
57676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_patch_vm() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
sender
.write_all(
b"PATCH /vm HTTP/1.1\r\n\
Content-Type: application/json\r\n\
... | rust_cleaned_test_functions.jsonl/43152 | {
"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,
53283,
5673,
39643,
39008,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
626,
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_occ() {
let text = b"abcbbc\0";
let mut occ_correct = vec![0; 256 * text.len()];
occ_correct[0 * 256 + 'a' as usize] = 1;
occ_correct[1 * 256 + 'a' as usize] = 1;
occ_correct[1 * 256 + 'b' as usize] = 1;
occ_correct[2 * 256 + 'a' as usize] = 1;
... | rust_cleaned_test_functions.jsonl/51325 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57291,
368,
341,
286,
1077,
1467,
284,
293,
1,
13683,
84185,
59,
15,
3302,
286,
1077,
5206,
2983,
31550,
284,
7486,
20703,
15,
26,
220,
17,
20,
21,
353,
1467,
19406,
33800,
286,
2983,
31550,
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... | 1 |
#[test]
fn test_version_fromstr() {
assert_eq!(
Version::from_str("infallible").unwrap(),
Version::Nonconformant("infallible".to_string())
);
} | rust_cleaned_test_functions.jsonl/116490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
5673,
495,
368,
341,
286,
2060,
10714,
33673,
310,
6079,
486,
1499,
2895,
445,
258,
13464,
1238,
1827,
15454,
3148,
310,
6079,
486,
8121,
443,
627,
517,
445,
258,
13464,
1238,
3263,
983,
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 |
#[test]
fn test_user_error_display() {
assert_eq!(
format!(
"{}",
UserError::new(
ErrorCode::CanisterOutOfCycles,
"Canister 42 ran out of cycles"
)
),
"IC0501: Canister 42 ran out ... | rust_cleaned_test_functions.jsonl/28539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
4096,
14825,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
33673,
394,
35503,
756,
394,
2657,
1454,
486,
931,
1006,
503,
60084,
486,
6713,
1571,
31731,
34,
15805,
345,
503,
330,
6713,
1571,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timespec() {
// Test valid conversions
assert_eq!(
parse_timespec("Thu, 1 Jan 1970 00:00:00 GMT").unwrap(),
Utc.ymd(1970, 1, 1).and_hms(0, 0, 0),
);
assert_eq!(
parse_timespec("Mon, 16 Apr 2018 04:33:50 GMT").unwrap(),
... | rust_cleaned_test_functions.jsonl/41481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
22353,
992,
368,
341,
286,
442,
3393,
2697,
48722,
198,
286,
2060,
10714,
33673,
310,
4715,
22353,
992,
445,
49922,
11,
220,
16,
4350,
220,
16,
24,
22,
15,
220,
15,
15,
25,
15,
15,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_vec_masking() {
let b = BitVec::from_elem(140, true);
let mut bs = BitSet::from_bit_vec(b);
assert!(bs.contains(&139));
assert!(!bs.contains(&140));
assert!(bs.insert(150));
assert!(!bs.contains(&140));
assert!(!bs.contains(&149));
... | rust_cleaned_test_functions.jsonl/76224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
13251,
9999,
287,
368,
341,
286,
1077,
293,
284,
6495,
10050,
486,
1499,
28179,
7,
16,
19,
15,
11,
830,
317,
286,
1077,
5206,
17065,
284,
57227,
486,
1499,
13996,
13251,
1883,
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... | 1 |
#[test]
fn test_returns_err_when_invalid_col() {
let tp = TokenParser::new("1 2 3\n4 5 6");
assert!(tp.token::<u8>(1, 4).is_err());
} | rust_cleaned_test_functions.jsonl/96295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58900,
9266,
47636,
31433,
10211,
368,
341,
286,
1077,
18101,
284,
9660,
6570,
486,
931,
445,
16,
220,
17,
220,
18,
1699,
19,
220,
20,
220,
21,
3071,
286,
2060,
10297,
790,
14416,
27638,
84,
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 |
#[test]
fn test_unreliable() {
let mut test = TachyonTest::default();
test.connect();
// unreliable messages need to be body length + 1;
// send length error
let send = test.client_send_unreliable(0);
assert_eq!(SEND_ERROR_LENGTH, send.error);
let res = ... | rust_cleaned_test_functions.jsonl/114148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
265,
50330,
368,
341,
286,
1077,
5206,
1273,
284,
350,
610,
24990,
2271,
486,
2258,
543,
286,
1273,
10800,
1428,
286,
442,
66029,
6605,
1184,
311,
387,
2487,
3084,
488,
220,
16,
280,
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_accountsdb_cumulative_find() {
let input = CumulativeOffsets {
cumulative_offsets: vec![CumulativeOffset {
index: vec![0],
start_offset: 0,
}],
total_count: 0,
};
assert_eq!(input.find(0), (0, &input.cumu... | rust_cleaned_test_functions.jsonl/94725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 606
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
91328,
22160,
21814,
368,
341,
286,
1077,
1946,
284,
31578,
22160,
81095,
341,
310,
39844,
56924,
25,
7486,
20703,
85805,
22160,
6446,
341,
394,
1922,
25,
7486,
20703,
15,
1259,
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_read_feed_info() {
let iter: GTFSIterator<_, FeedInfo> =
GTFSIterator::from_path("./examples/good_feed/feed_info.txt").unwrap();
for result in iter {
assert!(result.is_ok(), format!("{}", result.err().unwrap()));
}
} | rust_cleaned_test_functions.jsonl/7512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
42390,
3109,
368,
341,
262,
1077,
5367,
25,
11911,
8485,
11951,
27,
6878,
28870,
1731,
29,
4035,
286,
11911,
8485,
11951,
486,
1499,
2638,
13988,
51668,
4846,
1386,
42390,
93730,
3109,
3909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vector_2() {
let bobsk = Scalar([0x5d,0xab,0x08,0x7e,0x62,0x4a,0x8a,0x4b
,0x79,0xe1,0x7f,0x8b,0x83,0x80,0x0e,0xe6
,0x6f,0x3b,0xb1,0x29,0x26,0x18,0xb6,0xfd
,0x1c,0x2f,0x8b,0x27,0xff,0x88,0xe0,0xeb]);... | rust_cleaned_test_functions.jsonl/99767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 562
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
17,
368,
341,
1789,
286,
1077,
35192,
4886,
284,
35176,
2561,
15,
87,
20,
67,
11,
15,
52616,
11,
15,
87,
15,
23,
11,
15,
87,
22,
68,
11,
15,
87,
21,
17,
11,
15,
87,
19,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unsub_ack() {
let mut data: &[u8] = &[0b10110000, 2, 0, 10];
match decode_slice(&mut data) {
Ok(Some(Packet::Unsuback(p))) => {
assert_eq!(p.get(), 10);
}
other => panic!("Failed decode: {:?}", other),
}
} | rust_cleaned_test_functions.jsonl/77912 | {
"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,
4907,
1966,
48447,
368,
341,
262,
1077,
5206,
821,
25,
44590,
84,
23,
60,
284,
44590,
15,
65,
16,
15,
16,
16,
15,
15,
15,
15,
11,
220,
17,
11,
220,
15,
11,
220,
16,
15,
935,
262,
2432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_image_in_image() {
let mut target = ImageBuffer::new(32, 32);
let source = ImageBuffer::from_pixel(16, 16, Rgb([255u8, 0, 0]));
overlay(&mut target, &source, 0, 0);
assert!(*target.get_pixel(0, 0) == Rgb([255u8, 0, 0]));
assert!(*target.get_pixel(15, 0) ==... | rust_cleaned_test_functions.jsonl/121626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
1243,
4954,
368,
341,
286,
1077,
5206,
2169,
284,
4654,
4095,
486,
931,
7,
18,
17,
11,
220,
18,
17,
317,
286,
1077,
2530,
284,
4654,
4095,
486,
1499,
29760,
7,
16,
21,
11,
220,
16,
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_format_python_version_is_malformed() {
assert_eq!(
format_python_version("Python 3.7", "v${major}.${minor}.${patch}"),
Some("v3.7.".to_string())
);
} | rust_cleaned_test_functions.jsonl/99458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
55869,
9438,
6892,
717,
278,
10155,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
55869,
9438,
445,
30280,
220,
18,
13,
22,
497,
330,
85,
2365,
36505,
77197,
45670,
77197,
3400,
92,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_connect_sme_creation_fails() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
// Create an IfaceManager and drop its client
let test_values = test_setup(&mut exec);
let (mut iface_manager, _) = create_iface_manager_with_clie... | rust_cleaned_test_functions.jsonl/62690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
643,
2660,
46163,
761,
6209,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
442,
4230,
458,
1416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_char() {
let mut data = String::from_str("ประเทศไทย中华b¢€𤭢");
assert_eq!(data.pop_char().unwrap(), '𤭢'); // 4 bytes
assert_eq!(data.pop_char().unwrap(), '€'); // 3 bytes
assert_eq!(data.pop_char().unwrap(), '¢'); // 2 bytes
assert_eq!(data.pop_char().... | rust_cleaned_test_functions.jsonl/113365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
9232,
368,
341,
286,
1077,
5206,
821,
284,
923,
486,
1499,
2895,
445,
130391,
100849,
65,
56394,
15056,
101877,
255,
95,
797,
286,
2060,
10714,
10297,
691,
8288,
9232,
1005,
15454,
1507,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_list_to_vec_expr() -> Result<()> {
let item = Item::List(vec![
ListItem(vec![Item::Ident("a".to_owned())]),
ListItem(vec![Item::Ident("b".to_owned())]),
]);
let expr: Vec<Expr> = item.try_into()?;
assert_debug_snapshot!(expr, @r###... | rust_cleaned_test_functions.jsonl/64110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
2019,
2346,
13251,
21915,
368,
1464,
5714,
71698,
341,
286,
1077,
1509,
284,
5739,
486,
852,
25592,
90515,
310,
40924,
25592,
20703,
1234,
486,
28301,
445,
64,
3263,
983,
51973,
2140,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_peek_returns_head_element() {
let mut list: SimpleLinkedList<u32> = SimpleLinkedList::new();
assert_eq!(list.peek(), None, "No element should be contained in list");
list.push(2);
assert_eq!(list.peek(), Some(&2), "Element must be 2");
assert_eq!(list.peek(), Some(&2), "Eleme... | rust_cleaned_test_functions.jsonl/78173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29107,
58900,
13138,
7894,
368,
341,
262,
1077,
5206,
1140,
25,
8993,
33915,
34837,
18,
17,
29,
284,
8993,
33915,
486,
931,
543,
262,
2060,
10714,
10297,
1607,
41249,
1507,
2240,
11,
330,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default() {
let lua_string = String::default();
assert_eq!(lua_string.len(), 0);
assert_eq!(&lua_string.to_string_lossy(), "");
} | rust_cleaned_test_functions.jsonl/101289 | {
"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,
9993,
368,
341,
286,
1077,
20357,
3904,
284,
923,
486,
2258,
1428,
286,
2060,
10714,
10297,
27623,
3904,
19406,
1507,
220,
15,
317,
286,
2060,
10714,
0,
2099,
27623,
3904,
2389,
3904,
11193,
88,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_table_add_consistency() {
let s = MemStorage::default();
let new_file = s.create("test").expect("file create should work");
let opt = Arc::new(Options::<BytewiseComparator>::default());
let mut tb = TableBuilder::new(new_file, BytewiseComparator::default(), &opt);... | rust_cleaned_test_functions.jsonl/64694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
2891,
31971,
47094,
368,
341,
286,
1077,
274,
284,
13550,
5793,
486,
2258,
543,
286,
1077,
501,
2458,
284,
274,
2520,
445,
1944,
1827,
17119,
445,
1192,
1855,
1265,
975,
797,
286,
1077,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_move_iter_size_hint() {
let data = vec![5, 9];
let pq = BinaryHeap::from(data);
let mut it = pq.into_iter();
assert_eq!(it.size_hint(), (2, Some(2)));
assert_eq!(it.next(), Some(9));
assert_eq!(it.size_hint(), (1, Some(1)));
assert_eq!(it.next(), Some(5));
ass... | rust_cleaned_test_functions.jsonl/83201 | {
"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,
17134,
11723,
2368,
45825,
368,
341,
262,
1077,
821,
284,
7486,
20703,
20,
11,
220,
24,
935,
262,
1077,
39639,
284,
17718,
27909,
486,
1499,
2592,
626,
262,
1077,
5206,
432,
284,
39639,
39860,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_residential_process_make_credential() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
let make_credential_params = create_minimal_make_credential_parameters();
... | rust_cleaned_test_functions.jsonl/35307 | {
"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,
4918,
11234,
11305,
28230,
666,
30320,
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,
5206,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_config_from_spec() -> Result<()> {
let container_id = "sample";
let spec = Spec::default();
let config = YoukiConfig::from_spec(&spec, container_id)?;
assert_eq!(&config.hooks, spec.hooks());
dbg!(&config.cgroup_path);
assert_eq!(config.cgroup_path... | rust_cleaned_test_functions.jsonl/91274 | {
"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,
5332,
5673,
13594,
368,
1464,
5714,
71698,
341,
286,
1077,
5476,
842,
284,
330,
13611,
876,
286,
1077,
1398,
284,
10956,
486,
2258,
543,
286,
1077,
2193,
284,
1446,
6642,
2648,
486,
1499,
13594,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_spmm_csr_pattern() {
let a = DMatrix::from_row_slice(4, 5, &[1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1]);
let b = DMatrix::from_row_slice(5, 3, &[1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1]);
let c = DMatrix::from_row_slice(4, 3, &[2, 1, 3, 0, 0, 1, 0, 0, 0, 2, 1, 3... | rust_cleaned_test_functions.jsonl/33877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
3821,
666,
15094,
21260,
368,
341,
262,
1077,
264,
284,
422,
6689,
486,
1499,
8530,
26488,
7,
19,
11,
220,
20,
11,
44590,
16,
11,
220,
16,
11,
220,
15,
11,
220,
15,
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_anon_labels() {
let mut a = CodeAssembler::new(64).unwrap();
a.push(rcx).unwrap();
a.anonymous_label().unwrap();
a.xor(rcx, rdx).unwrap();
let anon = a.bwd().unwrap();
a.je(anon).unwrap();
let anon = a.fwd().unwrap();
a.js(anon).unwrap();
a.nop().unwrap();
a.anonymous_label().unwrap();... | rust_cleaned_test_functions.jsonl/71811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12008,
263,
14547,
368,
341,
10217,
5206,
264,
284,
6119,
77858,
486,
931,
7,
21,
19,
568,
15454,
543,
11323,
2552,
35429,
87,
568,
15454,
543,
11323,
10752,
9757,
6106,
1005,
15454,
543,
11323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contains() {
assert!("abcde".contains("bcd"));
assert!("abcde".contains("abcd"));
assert!("abcde".contains("bcde"));
assert!("abcde".contains(""));
assert!("".contains(""));
assert!(!"abcde".contains("def"));
assert!(!"".contains("a"));
... | rust_cleaned_test_functions.jsonl/2456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
368,
341,
286,
2060,
17223,
13683,
450,
3263,
13372,
445,
91490,
4010,
286,
2060,
17223,
13683,
450,
3263,
13372,
445,
68644,
4010,
286,
2060,
17223,
13683,
450,
3263,
13372,
445,
8904,
450,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_float_expr() {
let code = String::from("
(2.0 * 2.0) * 3.14;
");
let mut lexer = Token::lexer(code.as_str());
let parser = Parser::new(code.clone());
let expr_res = parser.parse_expr(&mut lexer, &[Token::Semicolon]);
assert!(expr_res.is_ok());
let expr ... | rust_cleaned_test_functions.jsonl/43205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
17586,
21915,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
70576,
286,
320,
17,
13,
15,
353,
220,
17,
13,
15,
8,
353,
220,
18,
13,
16,
19,
280,
262,
7318,
262,
1077,
5206,
53259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_download_sst() {
use grpcio::{Error, RpcStatus};
let (_cluster, ctx, tikv, import) = new_cluster_and_tikv_import_client();
let temp_dir = Builder::new()
.prefix("test_download_sst")
.tempdir()
.unwrap();
let sst_path = temp_dir.path().join("test.sst");
... | rust_cleaned_test_functions.jsonl/51202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 847
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35939,
643,
267,
368,
341,
262,
990,
47900,
815,
22964,
1454,
11,
79961,
2522,
2315,
262,
1077,
5453,
18855,
11,
5635,
11,
86172,
85,
11,
1159,
8,
284,
501,
28441,
8378,
528,
1579,
85,
18434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parent() {
let mut output = String::new();
let method = StringMethod {
method: "parent",
variable: "\"/home/redox/file.txt\"",
pattern: "",
selection: Select::All,
};
method.handle(&mut output, &VariableExpande... | rust_cleaned_test_functions.jsonl/85276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15960,
368,
341,
286,
1077,
5206,
2550,
284,
923,
486,
931,
543,
286,
1077,
1714,
284,
923,
3523,
341,
310,
1714,
25,
262,
330,
3765,
756,
310,
3890,
25,
220,
15898,
14,
5117,
77900,
5131,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_address_mask_generator() {
assert_eq!(
Some(vec![
0b10010,
0b10011,
0b10110,
0b10111,
]),
address_mask_generator("0000010X1X")
);
assert_eq!(
Some(vec![
... | rust_cleaned_test_functions.jsonl/89718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6744,
9999,
25813,
368,
341,
286,
2060,
10714,
33673,
310,
4329,
25592,
90515,
394,
220,
15,
65,
16,
15,
15,
16,
15,
345,
394,
220,
15,
65,
16,
15,
15,
16,
16,
345,
394,
220,
15,
65,
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_fee_overage_is_refunded() {
let mut deps = mock_dependencies(&[]);
test_instantiate(
deps.as_mut(),
InstArgs {
fee_amount: 150,
fee_collection_address: "fee_bucket",
..Default::default()
},
... | rust_cleaned_test_functions.jsonl/80119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34305,
15431,
424,
6892,
7793,
36053,
368,
341,
286,
1077,
5206,
48178,
284,
7860,
71841,
2099,
1294,
626,
286,
1273,
1243,
42251,
1006,
310,
48178,
5357,
29523,
3148,
310,
5984,
4117,
341,
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... | 3 |
#[test]
fn test_read_file2() {
let path = "./src/graph/graph2.txt";
let g = Graph::read_from_file(path);
let dfs = depth_first_paths::DepthFirstPaths::new(0, &g);
println!(
"Has Path :: {:?}, Path:: {:?}",
dfs.has_path(7),
dfs.path(7)
)... | rust_cleaned_test_functions.jsonl/112637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2458,
17,
368,
341,
286,
1077,
1815,
284,
5924,
3548,
72177,
72177,
17,
3909,
876,
286,
1077,
342,
284,
12165,
486,
878,
5673,
2458,
5581,
317,
286,
1077,
25792,
284,
7990,
12978,
24152,
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_eval_def_cfa_register() {
let cie = make_test_cie();
let mut ctx = UnwindContext::new();
ctx.set_cfa(CfaRule::RegisterAndOffset {
register: Register(3),
offset: 8,
});
let mut expected = ctx.clone();
expected.set_cfa(CfaRule... | rust_cleaned_test_functions.jsonl/9349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
7844,
666,
3632,
14000,
368,
341,
286,
1077,
272,
645,
284,
1281,
4452,
666,
645,
543,
286,
1077,
5206,
5635,
284,
1230,
19154,
1972,
486,
931,
543,
286,
5635,
980,
666,
3632,
3025,
3632,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_amount_to_ui_amount() {
let program_id = crate::id();
let owner_key = Pubkey::new_unique();
let mint_key = Pubkey::new_unique();
let mut mint_account =
SolanaAccount::new(mint_minimum_balance(), Mint::get_packed_len(), &program_id);
let mut ren... | rust_cleaned_test_functions.jsonl/64312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 891
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13471,
2346,
22412,
13471,
368,
341,
286,
1077,
2025,
842,
284,
17717,
486,
307,
543,
286,
1077,
6372,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
28337,
3097,
284,
22611,
792,
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_wait_in_flight_responses() {
let path_to_socket = "/tmp/test_socket_http_server6.sock";
fs::remove_file(path_to_socket).unwrap_or_default();
let mut server = HttpServer::new(path_to_socket.to_string()).unwrap();
server.start_server().unwrap();
// Test a ... | rust_cleaned_test_functions.jsonl/2925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
1243,
90370,
81292,
368,
341,
286,
1077,
1815,
2346,
19555,
284,
3521,
5173,
12697,
19555,
25888,
12015,
21,
68171,
876,
286,
8619,
486,
5399,
2458,
5581,
2346,
19555,
568,
15454,
8734,
9993,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_already_received() {
let mut packet = Packet::default();
let slot = 1;
let index = 5;
let version = 0x40;
let shred = Shred::new_from_data(slot, index, 0, None, true, true, 0, version, 0);
shred.copy_to_packet(&mut packet);
let shreds_recei... | rust_cleaned_test_functions.jsonl/2863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80772,
40783,
368,
341,
286,
1077,
5206,
10151,
284,
28889,
486,
2258,
543,
286,
1077,
9446,
284,
220,
16,
280,
286,
1077,
1922,
284,
220,
20,
280,
286,
1077,
2319,
284,
220,
15,
87,
19,
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_content_type() {
let resp = Response::build(StatusCode::OK)
.content_type("text/plain")
.body(Bytes::new());
assert_eq!(resp.headers().get(CONTENT_TYPE).unwrap(), "text/plain");
let resp = Response::build(StatusCode::OK)
.content_type(... | rust_cleaned_test_functions.jsonl/102523 | {
"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,
7495,
1819,
368,
341,
286,
1077,
9039,
284,
5949,
486,
5834,
7,
15872,
486,
3925,
340,
310,
659,
1796,
1819,
445,
1318,
36971,
1138,
310,
659,
2599,
76423,
486,
931,
1423,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_naked_raw_str() {
check_raw_str(
r#""abc""#,
UnvalidatedRawStr {
n_start_hashes: 0,
n_end_hashes: 0,
valid_start: true,
possible_terminator_offset: None,
},
Ok(ValidatedRawStr ... | rust_cleaned_test_functions.jsonl/105522 | {
"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,
1089,
7741,
16067,
2895,
368,
341,
286,
1779,
16067,
2895,
1006,
310,
435,
2,
3014,
13683,
3014,
2,
345,
310,
1230,
59590,
20015,
2580,
341,
394,
308,
4906,
91616,
25,
220,
15,
345,
394,
308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fg_bg_add_attr() {
let content_style = ContentStyle::new()
.foreground(Color::Blue)
.background(Color::Red)
.attribute(Attribute::Reset);
assert_eq!(content_style.foreground_color, Some(Color::Blue));
assert_eq!(content_style.backg... | rust_cleaned_test_functions.jsonl/80205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
69473,
23122,
2891,
10422,
368,
341,
286,
1077,
2213,
15117,
284,
8883,
2323,
486,
931,
741,
310,
659,
34919,
15028,
486,
10331,
340,
310,
659,
6742,
15028,
486,
6033,
340,
310,
659,
9116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_proposal_record_is_final() {
let mut transaction_context = MockTransactionContext::default();
let receiving_agent_key = "receiving_agent_key";
transaction_context.add_agent(PUBLIC_KEY);
transaction_context.add_agent(receiving_agent_key);
transaction... | rust_cleaned_test_functions.jsonl/32560 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
21663,
32556,
14192,
6892,
20676,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
14563,
8070,
1972,
486,
2258,
543,
286,
1077,
12308,
25730,
3097,
284,
330,
265,
46344,
25730,
3097,
876,
286,
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_verify_failure() {
let key = Vec::from_hex("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b").unwrap();
let data = "Hi There".as_bytes();
let expected = Vec::from_hex("9294727a3638bb1c13f48ef8158bfc9d").unwrap();
let hmac_md5 = HmacMd5 {};
let result = hmac_md5.verify(&k... | rust_cleaned_test_functions.jsonl/17345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
43618,
368,
341,
286,
1077,
1376,
284,
11312,
486,
1499,
32655,
445,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
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_classify_non_uniform_table() {
let classification = classify_table(
"tests/data/non_uniform_datatypes.csv",
char::from_str(",").unwrap(),
)
.unwrap();
let expected = HashMap::from([
(String::from("first"), ColumnType::String),
... | rust_cleaned_test_functions.jsonl/128565 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4790,
1437,
21637,
45066,
5237,
368,
341,
286,
1077,
23850,
284,
48129,
5237,
1006,
310,
330,
23841,
13167,
91130,
45066,
15353,
60913,
11219,
756,
310,
1161,
486,
1499,
2895,
47503,
568,
15454,
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_internally_tagged_newtype_variant_containing_unit_struct() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Info;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "topic")]
enum Message {
Info(Info),
}
assert_tokens(
&Mes... | rust_cleaned_test_functions.jsonl/56451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
932,
745,
9372,
3556,
5921,
1313,
46112,
10260,
2056,
14832,
15126,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
39900,
11,
48440,
5563,
262,
2036,
13074,
401,
262,
11506,
27098,
42618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_size() {
let slots = vec![1; 32];
let vote = Vote::new(slots, Hash::default());
let keypair = Arc::new(Keypair::new());
// Create the biggest possible vote transaction
let vote_ix = vote_instruction::vote_switch(
&keypair.pubkey(),
... | rust_cleaned_test_functions.jsonl/28082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
2368,
368,
341,
286,
1077,
15711,
284,
7486,
20703,
16,
26,
220,
18,
17,
935,
286,
1077,
6910,
284,
34034,
486,
931,
55691,
2412,
11,
6531,
486,
2258,
1423,
286,
1077,
1376,
12670,
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_long_format_cz() {
assert_eq!(
parse_format_flags(&vec!["od".to_string(), "--format=cz".to_string()]).unwrap(),
vec![ParsedFormatterItemInfo::new(FORMAT_ITEM_C, true)]
);
} | rust_cleaned_test_functions.jsonl/112173 | {
"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,
17799,
8955,
666,
89,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
8955,
14130,
2099,
4083,
0,
1183,
347,
3263,
983,
3904,
1507,
14482,
2243,
28,
13769,
3263,
983,
3904,
368,
10697,
15454,
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 |
#[test]
fn test_fr_pow() {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
for i in 0..1000 {
// Exponentiate by various small numbers and ensure it consists with repeated
// multiplication.
let a = Fr::rand(&mut rng);
let target =... | rust_cleaned_test_functions.jsonl/66331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
56183,
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... | 4 |
#[test]
fn test_convert_from_uint() {
macro_rules! check {
($ty:ident, $max:expr) => {
assert_eq!(BigInt::from($ty::zero()), BigInt::zero());
assert_eq!(BigInt::from($ty::one()), BigInt::one());
assert_eq!(BigInt::from($ty::MAX - $ty::one()), $... | rust_cleaned_test_functions.jsonl/90163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
5673,
15807,
368,
341,
286,
18072,
21407,
0,
1779,
341,
310,
1711,
1881,
25,
1713,
11,
400,
2810,
96011,
8,
589,
341,
394,
2060,
10714,
10297,
87474,
486,
1499,
699,
1881,
486,
14154,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_path_v2() {
let client = graph_serializer(GraphSON::V2);
drop_vertices(&client, "test_simple_path").unwrap();
drop_vertices(&client, "test_simple_path_child").unwrap();
let g = traversal().with_remote(client);
let v1 = g
.add_v("test_simple_path")
.p... | rust_cleaned_test_functions.jsonl/26302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
2638,
2273,
17,
368,
341,
262,
1077,
2943,
284,
4771,
67441,
63779,
2703,
486,
53,
17,
626,
262,
5943,
37720,
2099,
2972,
11,
330,
1944,
30015,
2638,
1827,
15454,
543,
262,
5943,
37720,
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_operand() {
assert_eq!(operand(&b"product"[..]),
IResult::Done(&b""[..],Operand::Value("product".to_string())));
assert_eq!(operand(&b"1234"[..]),
IResult::Done(&b""[..],Operand::Number(1234f64)));
assert_eq!(operand(&b"true"[..]),
IResult::Done(&b""[..... | rust_cleaned_test_functions.jsonl/114312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69259,
368,
341,
262,
2060,
10714,
10297,
40609,
2099,
65,
1,
3031,
36864,
496,
9719,
715,
286,
358,
2077,
486,
17453,
2099,
65,
3014,
95874,
1125,
29940,
486,
1130,
445,
3031,
3263,
983,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_iterator_bits() {
let filter_values = (0..64).map(|i| i == 1).collect::<Vec<bool>>();
let filter = BooleanArray::from(filter_values);
let iter = SlicesIterator::new(&filter);
let filter_count = iter.filter_count;
let chunks = iter.collect::<Vec<_>>(... | rust_cleaned_test_functions.jsonl/28236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
13491,
20034,
368,
341,
286,
1077,
4051,
9146,
284,
320,
15,
496,
21,
19,
568,
2186,
22428,
72,
91,
600,
621,
220,
16,
568,
17384,
27638,
10050,
17028,
37038,
286,
1077,
4051,
284,
6992,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_diff_identical_content() {
let s = "foo";
let res = diff_file_content(
"foo.el",
s.as_bytes(),
s.as_bytes(),
DEFAULT_NODE_LIMIT,
DEFAULT_BYTE_LIMIT,
);
assert_eq!(res.lhs_positions, vec![]);
asse... | rust_cleaned_test_functions.jsonl/17916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
38399,
938,
7495,
368,
341,
286,
1077,
274,
284,
330,
7975,
876,
286,
1077,
592,
284,
3638,
2458,
7495,
1006,
310,
330,
7975,
15851,
756,
310,
274,
5357,
12524,
3148,
310,
274,
5357,
1252... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_leving() {
with_externalities(&mut new_test_ext(), || {
let user = 0;
assert_err!(
Parking::leaving(Origin::signed(user)),
"User has not entered a parking lot"
);
})
} | rust_cleaned_test_functions.jsonl/105204 | {
"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,
62,
3449,
287,
368,
341,
286,
448,
47432,
1361,
2099,
6984,
501,
4452,
9927,
1507,
1369,
341,
310,
1077,
1196,
284,
220,
15,
280,
310,
2060,
9266,
33673,
394,
40182,
486,
273,
2317,
7,
13298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scan() {
let path = Builder::new().prefix("var").tempdir().unwrap();
let cf = "cf";
let engine = RocksEngine::from_db(Arc::new(
raw_util::new_engine(path.path().to_str().unwrap(), None, &[cf], None).unwrap(),
));
engine.put(b"a1", b"v1").unwra... | rust_cleaned_test_functions.jsonl/23217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
1005,
11849,
445,
947,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
24111,
284,
330,
9792,
876,
286,
1077,
4712,
284,
68031,
4571,
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_place() {
let mut buf = vec![];
{
let mut encoder = BinEncoder::new(&mut buf);
let place = encoder.place::<u16>();
assert_eq!(place.size_of(), 2);
assert_eq!(encoder.len_since_place(&place), 0);
encoder.emit(42_u8).expe... | rust_cleaned_test_functions.jsonl/62753 | {
"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,
34548,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
0,
15078,
286,
341,
310,
1077,
5206,
23668,
284,
29344,
19921,
486,
931,
2099,
6984,
6607,
317,
310,
1077,
1992,
284,
23668,
24457,
27638,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rmatch_indices() {
let haystack = "111 a 111b";
let needle = "1";
let mut m = haystack.rmatch_indices(needle);
assert_eq!(m.next(), Some((8, "1")));
assert_eq!(m.next(), Some((7, "1")));
assert_eq!(m.next(), Some((6, "1")));
assert_eq!(m.ne... | rust_cleaned_test_functions.jsonl/19420 | {
"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,
1710,
6347,
18333,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
876,
286,
1077,
30309,
284,
330,
16,
876,
286,
1077,
5206,
296,
284,
88447,
1746,
6347,
18333,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_constant_eval() {
let dec = "1.1".parse::<Decimal>().unwrap();
let s = "你好".as_bytes().to_owned();
let dur = Duration::parse(&mut EvalContext::default(), b"01:00:00", 0).unwrap();
let tests = vec![
datum_expr(Datum::Null),
datum_expr(Datum... | rust_cleaned_test_functions.jsonl/5040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34967,
21296,
368,
341,
286,
1077,
1622,
284,
330,
16,
13,
16,
3263,
6400,
27638,
11269,
10483,
15454,
543,
286,
1077,
274,
284,
330,
108386,
3263,
300,
12524,
1005,
983,
51973,
543,
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... | 4 |
#[test]
fn test_encode_fqdn() {
let name_bytes: &[u8] = b"issueexample.com.";
let header: [u8; 2] = [128, 5];
let encoded: Vec<u8> = header.iter().chain(name_bytes.iter()).map(|b| *b).collect();
test_encode(
CAA::new_issue(
true,
Some(... | rust_cleaned_test_functions.jsonl/24521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
761,
80,
17395,
368,
341,
286,
1077,
829,
12524,
25,
44590,
84,
23,
60,
284,
293,
1,
11159,
8687,
905,
15297,
286,
1077,
4247,
25,
508,
84,
23,
26,
220,
17,
60,
284,
508,
16,
17,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transcribes_adenine_uracil() {
assert_eq!(dna::RibonucleicAcid::new("U"), dna::DeoxyribonucleicAcid::new("A").to_rna());
} | rust_cleaned_test_functions.jsonl/36948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
55136,
10027,
268,
482,
64879,
580,
321,
368,
341,
262,
2060,
10714,
10297,
92877,
486,
98884,
263,
22147,
292,
11654,
307,
486,
931,
445,
52,
3975,
75334,
486,
1912,
60163,
1897,
263,
22147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let datatypes = vec![
DataType::Int32,
DataType::Float64,
DataType::Utf8,
DataType::Binary,
DataType::List(Box::new(Field::new("a", DataType::Binary, true))),
];
let a = datatypes
.into_iter... | rust_cleaned_test_functions.jsonl/97520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
368,
341,
286,
1077,
3258,
60913,
284,
7486,
90515,
310,
33172,
486,
1072,
18,
17,
345,
310,
33172,
486,
5442,
21,
19,
345,
310,
33172,
486,
38980,
23,
345,
310,
33172,
486,
21338,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_highlights_simple_main() -> Result<(), Error> {
let src = r#"package main
import "fmt"
func main() {
fmt.Println("Hello, world", 5)
}
"#;
let document = index_language("go", src)?;
insta::assert_snapshot!(dump_document(&document, src));
Ok(())
} | rust_cleaned_test_functions.jsonl/84246 | {
"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,
22680,
13826,
30015,
11027,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
2286,
284,
435,
55543,
1722,
1887,
198,
474,
330,
12501,
1837,
2830,
1887,
368,
341,
11009,
12419,
445,
9707,
11,
1879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_openpty() {
let _m = crate::PTSNAME_MTX.lock();
let pty = openpty(None, None).unwrap();
assert!(pty.master > 0);
assert!(pty.slave > 0);
// Writing to one should be readable on the other one
let string = "foofoofoo\n";
let mut buf = [0u8; 10];
write(pty.mas... | rust_cleaned_test_functions.jsonl/72582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
1595,
368,
341,
1066,
262,
1077,
716,
76,
284,
17717,
486,
73693,
7535,
1245,
22867,
21003,
1428,
262,
1077,
281,
1881,
284,
1787,
1595,
26717,
11,
2240,
568,
15454,
543,
262,
2060,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_eq1() {
let mut s = Stack::new();
s.push(Elt::Int(1)).unwrap();
s.push(Elt::Int(1)).unwrap();
assert!(s.eval(Op::Eq).is_ok());
assert_eq!(s.pop().unwrap(), Elt::Bool(true));
} | rust_cleaned_test_functions.jsonl/34520 | {
"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,
21296,
10714,
16,
368,
341,
286,
1077,
5206,
274,
284,
14284,
486,
931,
543,
286,
274,
2552,
10722,
4832,
486,
1072,
7,
16,
4579,
15454,
543,
286,
274,
2552,
10722,
4832,
486,
1072,
7,
16,
457... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skipping_containers() -> IonResult<()> {
let ion_data = r#"
0 [1, 2, 3] (4 5) 6
"#;
let reader = &mut RawTextReader::new(ion_data);
next_type(reader, IonType::Integer, false);
assert_eq!(reader.read_i64()?.unwrap(), 0);
next_type(reade... | rust_cleaned_test_functions.jsonl/6503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33811,
5654,
10260,
20568,
368,
1464,
44805,
2077,
71698,
341,
286,
1077,
27672,
1769,
284,
435,
2,
698,
310,
220,
15,
508,
16,
11,
220,
17,
11,
220,
18,
60,
320,
19,
220,
20,
8,
220,
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... | 6 |
#[test]
fn test_write_too_many_bytes() {
let mut b = BufferBuilder::<i32>::new(0);
let bytes = [8, 16, 32, 64].to_byte_slice();
b.write_bytes(bytes, 4).unwrap();
} | rust_cleaned_test_functions.jsonl/127622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
2346,
78,
22101,
12524,
368,
341,
286,
1077,
5206,
293,
284,
10312,
3297,
27638,
72,
18,
17,
6831,
931,
7,
15,
317,
286,
1077,
5820,
284,
508,
23,
11,
220,
16,
21,
11,
220,
18,
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... | 1 |
#[test]
fn test_authorize_url_with_one_scope() {
let (url, _) = new_client()
.authorize_url(|| CsrfToken::new("csrf_token".to_string()))
.add_scope(Scope::new("read".to_string()))
.url();
assert_eq!(
Url::parse(
"https://example.com/auth\
?respon... | rust_cleaned_test_functions.jsonl/18587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22938,
551,
2903,
6615,
11667,
23199,
368,
341,
262,
1077,
320,
1085,
11,
27439,
284,
501,
8179,
741,
286,
659,
52022,
2903,
79453,
67332,
8052,
3323,
486,
931,
445,
24102,
6458,
3263,
983,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_no_init() {
let dir = tempfile::tempdir().unwrap();
assert!(!dir.path().join(".protovend.yml").exists());
let status = command(&dir).arg("update").status().unwrap();
assert!(!status.success());
assert!(!dir.path().join(".protovend.yml").exists());
} | rust_cleaned_test_functions.jsonl/11210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
6536,
6137,
368,
341,
262,
1077,
5419,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
2060,
0,
3471,
3741,
3875,
1005,
5987,
5680,
4391,
859,
408,
33936,
1827,
16304,
5231,
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 |
#[test]
fn test_low_char_vec() {
let l = Line::from("FOOBAR");
for (i, c) in l.low_char_vec {
assert_eq!(
match i {
0 => 'f',
3 => 'b',
4 => 'a',
5 => 'r',
_ => 'o',
... | rust_cleaned_test_functions.jsonl/76067 | {
"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,
23767,
9232,
13251,
368,
341,
286,
1077,
326,
284,
7083,
486,
1499,
445,
3788,
20608,
934,
797,
286,
369,
320,
72,
11,
272,
8,
304,
326,
56553,
9232,
13251,
341,
310,
2060,
10714,
33673,
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... | 3 |
#[test]
fn test_error_info() {
let mut c = Compiler::new();
c.set_file("hello.html");
c.set_line(1);
c.add(Instruction::EmitRaw("<h1>Hello</h1>\n"));
c.set_line(2);
c.add(Instruction::Lookup("a_string"));
c.add(Instruction::Lookup("an_int"));
c.add(Instruction::Add);
let mut... | rust_cleaned_test_functions.jsonl/72125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
3109,
368,
341,
262,
1077,
5206,
272,
284,
45631,
486,
931,
543,
262,
272,
980,
2458,
445,
14990,
2564,
797,
262,
272,
980,
6528,
7,
16,
317,
262,
272,
1364,
7,
16664,
486,
36,
1763,
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_dont_need_username_password_if_pushurl_ssh() {
let (_td, repo) = repo_init().unwrap();
let root = repo.path().parent().unwrap();
let repo_path: &RepoPath =
&root.as_os_str().to_str().unwrap().into();
repo.remote(DEFAULT_REMOTE_NAME, "http://user@github.com")
.unwrap();
repo.remo... | rust_cleaned_test_functions.jsonl/101755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
544,
71506,
21588,
10122,
11119,
14218,
1085,
82805,
368,
341,
197,
10217,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
1005,
15454,
543,
197,
10217,
3704,
284,
15867,
3875,
1005,
3765,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_demo_1() {
let network = create_cave_network(vec![
"start-A",
"start-b",
"A-c",
"A-b",
"b-d",
"A-end",
"b-end"
]);
let start_cave = network["start"].clone();
let end_cave =... | rust_cleaned_test_functions.jsonl/70741 | {
"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,
8657,
47830,
62,
16,
368,
341,
286,
1077,
3922,
284,
1855,
666,
523,
20966,
25592,
90515,
310,
330,
2468,
6691,
756,
310,
330,
2468,
1455,
756,
310,
330,
32,
1786,
756,
310,
330,
32,
1455,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_band_add_entry() {
let mut band = banded::Band::new(10, 10);
band.add_entry((3u32, 3u32), 3usize);
assert_eq!(
band.ranges,
[
0..7,
0..7,
0..7,
0..7,
0..7,
... | rust_cleaned_test_functions.jsonl/126724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45344,
2891,
9078,
368,
341,
286,
1077,
5206,
7055,
284,
293,
6465,
486,
33744,
486,
931,
7,
16,
15,
11,
220,
16,
15,
317,
286,
7055,
1364,
9078,
1188,
18,
84,
18,
17,
11,
220,
18,
84,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_path() {
assert_eq!(map_path("/".into()), Utf8Path::new("/"));
assert_eq!(
map_path("./usr/etc/blah".into()),
Utf8Path::new("./etc/blah")
);
} | rust_cleaned_test_functions.jsonl/42840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
2638,
368,
341,
286,
2060,
10714,
10297,
2186,
2638,
4283,
3263,
18122,
11858,
43432,
23,
1820,
486,
931,
4283,
4010,
286,
2060,
10714,
33673,
310,
2415,
2638,
13988,
7063,
47047,
14,
70614,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_attribute_refaddr_version2() {
let buf = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x99, 0x99];
let mut unit = test_parse_attribute_unit(4, Format::Dwarf32, LittleEndian);
unit.encoding.version = 2;
let form = constants::DW_FORM_ref_addr;
let ... | rust_cleaned_test_functions.jsonl/102037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16791,
7793,
6214,
9438,
17,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
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_move_prefix() {
TestExternalities::new_empty().execute_with(|| {
OldStorageValue::put(3);
OldStorageMap::insert(1, 2);
OldStorageMap::insert(3, 4);
move_prefix(&Twox128::hash(b"my_old_pallet"), &Twox128::hash(b"my_new_pallet"));
assert_eq!(OldStorageValue::get(), None);
ass... | rust_cleaned_test_functions.jsonl/68267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
13974,
368,
341,
197,
73866,
25913,
1361,
486,
931,
15124,
1005,
10257,
6615,
79453,
341,
298,
197,
18284,
5793,
1130,
486,
628,
7,
18,
317,
298,
197,
18284,
5793,
2227,
486,
4208,
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... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.