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_md5() {
assert_eq!(md5(b""), hex("d41d8cd98f00b204e9800998ecf8427e").unwrap());
assert_eq!(md5(b"a"), hex("0cc175b9c0f1b6a831c399e269772661").unwrap());
assert_eq!(
md5(b"abc"),
hex("900150983cd24fb0d6963f7d28e17f72").unwrap()
);
as... | rust_cleaned_test_functions.jsonl/126698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32994,
20,
368,
341,
286,
2060,
10714,
10297,
2277,
20,
1883,
3014,
701,
12371,
445,
67,
19,
16,
67,
23,
4385,
24,
23,
69,
15,
15,
65,
17,
15,
19,
68,
24,
23,
15,
15,
24,
24,
23,
757,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validation() {
let value = AllowedMentionsBuilder::new()
.users()
.user_ids(vec![UserId(100), UserId(200)])
.roles()
.role_ids(vec![RoleId(300)])
.build();
assert_eq!(
value,
AllowedMentions {
... | rust_cleaned_test_functions.jsonl/35179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19416,
368,
341,
286,
1077,
897,
284,
57622,
44,
63701,
3297,
486,
931,
741,
310,
659,
4218,
741,
310,
659,
872,
8077,
25592,
20703,
13504,
7,
16,
15,
15,
701,
40883,
7,
17,
15,
15,
27144,
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_type_03() {
let ast = check_parse("type t = bool;");
check_name(ast.get(0),"t");
assert!(matches!(ast.get(1),Node::BoolType));
} | rust_cleaned_test_functions.jsonl/96533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
62,
15,
18,
368,
341,
262,
1077,
11763,
284,
1779,
21039,
445,
1313,
259,
284,
1807,
34649,
262,
1779,
1269,
52574,
670,
7,
15,
35393,
83,
797,
262,
2060,
10297,
19914,
10297,
559,
670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pull_assignment_up_field_assignment() {
cov_mark::check!(test_pull_assignment_up_field_assignment);
check_assist(
pull_assignment_up,
r#"
struct A(usize);
fn foo() {
let mut a = A(1);
if true {
$0a.0 = 2;
} else {
a.0 = 3;
... | rust_cleaned_test_functions.jsonl/117258 | {
"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,
65693,
51891,
8237,
5013,
51891,
368,
341,
286,
21836,
18924,
486,
2028,
10297,
1944,
65693,
51891,
8237,
5013,
51891,
317,
286,
1779,
12083,
380,
1006,
310,
6815,
51891,
8237,
345,
310,
435,
2,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonzero_i8() {
let test = assert_de_tokens_error::<NonZeroI8>;
// from zero
test(
&[Token::I8(0)],
"invalid value: integer `0`, expected a nonzero i8",
);
test(
&[Token::I16(0)],
"invalid value: integer `0`, expected a nonzero i8",
);
... | rust_cleaned_test_functions.jsonl/129503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1025
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
14154,
5318,
23,
368,
341,
262,
1077,
1273,
284,
2060,
2259,
28838,
4096,
27638,
8121,
17999,
40,
23,
19421,
262,
442,
504,
7168,
198,
262,
1273,
1006,
286,
44590,
3323,
486,
40,
23,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_private_key_to_der() {
let key = Rsa::generate(2048).unwrap();
let bytes = private_key_to_der(
&key.n().to_vec(),
&key.e().to_vec(),
&key.d().to_vec(),
&key.p().unwrap().to_vec(),
&key.q().unwrap().to_vec(),
);
... | rust_cleaned_test_functions.jsonl/79788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 662
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26249,
3097,
2346,
35345,
368,
341,
286,
1077,
1376,
284,
431,
9081,
486,
19366,
7,
17,
15,
19,
23,
568,
15454,
1428,
286,
1077,
5820,
284,
869,
3097,
2346,
35345,
1006,
310,
609,
792,
1253,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retain() {
#[derive(Serialize, Deserialize, MartianStruct)]
pub struct SI {
inputs: Vec<BamFile>,
num_threads: i16,
mem_gb: i16,
}
#[derive(Serialize, Deserialize, MartianStruct)]
pub struct SO {
output: BamFile,
#[mro_retain]
... | rust_cleaned_test_functions.jsonl/104055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 715
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21695,
466,
368,
341,
262,
11506,
27098,
3759,
9050,
11,
48440,
11,
81028,
9422,
5563,
262,
6675,
2036,
30548,
341,
286,
11127,
25,
11312,
32519,
309,
1703,
12520,
286,
1629,
29725,
25,
600,
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_language_deserializer() {
let deserialized = serde_json::from_str::<Language>("\"ENGLISH\"").unwrap();
assert_eq!(deserialized, Language::English);
} | rust_cleaned_test_functions.jsonl/100796 | {
"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,
29021,
15768,
41939,
368,
341,
286,
1077,
939,
67577,
284,
61570,
9455,
486,
1499,
2895,
27638,
13806,
13211,
2105,
953,
64418,
2105,
1827,
15454,
543,
286,
2060,
10714,
10297,
5799,
67577,
11,
1143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_validate_depth_value() {
let matches = app::build()
.get_matches_from_safe(vec!["lsd", "--tree", "--depth", "xx"])
.unwrap();
let res = Flags::from_matches(&matches);
assert!(res.is_err());
assert_eq!(res.unwrap_err().kind, ErrorKind::Valu... | rust_cleaned_test_functions.jsonl/82719 | {
"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,
42681,
19061,
3142,
368,
341,
286,
1077,
9071,
284,
906,
486,
5834,
741,
310,
659,
455,
38344,
5673,
34067,
25592,
0,
1183,
4730,
67,
497,
14482,
9344,
497,
14482,
17561,
497,
330,
4146,
14108,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_link() {
let tempdir = TempDir::new("nix-test_link").unwrap();
let src = tempdir.path().join("foo");
let dst = tempdir.path().join("bar");
File::create(&src).unwrap();
link(&src, &dst).unwrap();
assert!(dst.exists());
} | rust_cleaned_test_functions.jsonl/8999 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
368,
341,
262,
1077,
2730,
3741,
284,
19944,
6184,
486,
931,
445,
77,
941,
16839,
7233,
1827,
15454,
543,
262,
1077,
2286,
284,
2730,
3741,
3875,
1005,
5987,
445,
7975,
797,
262,
1077,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pop() {
let mut heap = BinaryHeap::from_vec(vec!(5i, 5, 2, 1, 3));
assert_eq!(heap.len(), 5);
assert_eq!(heap.push_pop(6), 6);
assert_eq!(heap.len(), 5);
assert_eq!(heap.push_pop(0), 5);
assert_eq!(heap.len(), 5);
assert_eq!(heap.push_... | rust_cleaned_test_functions.jsonl/1582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
17061,
368,
341,
286,
1077,
5206,
17364,
284,
17718,
27909,
486,
1499,
13251,
25592,
10297,
20,
72,
11,
220,
20,
11,
220,
17,
11,
220,
16,
11,
220,
18,
1106,
286,
2060,
10714,
10297,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_threshold() {
// Initialize the command line options and controller.
let settings: Settings = default_test_settings();
let mut action_map: ActionMap = ActionController::new(&settings);
// Trigger swipe below threshold.
let action_event = action_map.... | rust_cleaned_test_functions.jsonl/134316 | {
"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,
21039,
21858,
368,
341,
286,
442,
9008,
279,
3210,
1555,
2606,
323,
6461,
624,
286,
1077,
5003,
25,
11296,
284,
1638,
4452,
10853,
543,
286,
1077,
5206,
1917,
5376,
25,
5586,
2227,
284,
73452,
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_check_account_subscribe() {
let GenesisBlockInfo {
genesis_block,
mint_keypair,
..
} = create_genesis_block(100);
let bank = Bank::new(&genesis_block);
let blockhash = bank.last_blockhash();
let bank_forks = Arc::new(RwL... | rust_cleaned_test_functions.jsonl/37726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1086
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
13500,
88935,
368,
341,
286,
1077,
40788,
4713,
1731,
341,
310,
59366,
7113,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
7113,
7,
16,
15,
15,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_multiple() {
struct Foo;
impl Debug for Foo {
fn fmt(&self, fmt: &mut Formatter) {
fmt.debug_set()
.entry(&true)
.entry(&format_args!("{}/{}", 10, 20))
.finish()
}
}
... | rust_cleaned_test_functions.jsonl/124742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
368,
341,
286,
2036,
33428,
401,
286,
11605,
11091,
369,
33428,
341,
310,
5168,
8879,
2099,
721,
11,
8879,
25,
609,
6984,
81387,
8,
341,
394,
8879,
7883,
2602,
741,
503,
659,
4085,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_plain_decode_double() {
let data = vec![3.14f64, 2.414f64, 12.51f64];
let data_bytes = DoubleType::to_byte_array(&data[..]);
let mut buffer = vec![0.0f64; 3];
test_plain_decode::<DoubleType>(
ByteBufferPtr::new(data_bytes),
3,
-... | rust_cleaned_test_functions.jsonl/38508 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41015,
15227,
24598,
368,
341,
286,
1077,
821,
284,
7486,
20703,
18,
13,
16,
19,
69,
21,
19,
11,
220,
17,
13,
19,
16,
19,
69,
21,
19,
11,
220,
16,
17,
13,
20,
16,
69,
21,
19,
935,
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_set_xamz_sha_256() {
let req = test_request("get-vanilla-query-order-key-case");
let req = SignableRequest::from(&req);
let settings = SigningSettings {
payload_checksum_kind: PayloadChecksumKind::XAmzSha256,
..Default::default()
};
... | rust_cleaned_test_functions.jsonl/83736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
3212,
309,
89,
48836,
62,
17,
20,
21,
368,
341,
286,
1077,
4232,
284,
1273,
7893,
445,
455,
8273,
276,
6241,
65489,
23810,
16173,
38485,
797,
286,
1077,
4232,
284,
7075,
480,
1900,
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_rlc() {
let mut state = State8080::empty_state();
state.memory = vec![0x07];
state.a = 0xf2;
emulate_8080_op(&mut state);
assert_eq!(state.a, 0xe5);
assert_eq!(state.cc.cy, 1);
} | rust_cleaned_test_functions.jsonl/7796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
17257,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
15,
22,
935,
286,
1584,
5849,
284,
220,
15,
5848,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_simple_list() {
let head: [u8; 4] = unsafe { mem::transmute(4u32.to_be()) };
let b: [u8; 11] = [
0x7d, 0x00, 0x02, head[0], head[1], head[2], head[3], 4, 5, 6, 7,
];
let mut de = TarsDecoder::from(&b[..]);
let list: Vec<i8> = de.read_lis... | rust_cleaned_test_functions.jsonl/128471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
30015,
2019,
368,
341,
286,
1077,
1968,
25,
508,
84,
23,
26,
220,
19,
60,
284,
19860,
314,
1833,
486,
1458,
52214,
7,
19,
84,
18,
17,
2389,
21263,
2140,
2605,
286,
1077,
293,
25,
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_line_spacing() {
let props = ParagraphProperty::new();
let bytes = props
.line_spacing(None, None, Some(100), Some(LineSpacingType::AtLeast))
.build();
assert_eq!(
str::from_utf8(&bytes).unwrap(),
r#"<w:pPr><w:rPr /><w:spaci... | rust_cleaned_test_functions.jsonl/67558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
63328,
368,
341,
286,
1077,
6914,
284,
49351,
3052,
486,
931,
543,
286,
1077,
5820,
284,
6914,
198,
310,
659,
1056,
63328,
26717,
11,
2240,
11,
4329,
7,
16,
15,
15,
701,
4329,
84462,
270... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_normalize_path_trailing_slashes() {
let app = App::new()
.resource("/resource1", |r| r.method(Method::GET).f(index))
.resource("/resource2/", |r| r.method(Method::GET).f(index))
.default_resource(|r| r.h(NormalizePath::default()))
.finish()... | rust_cleaned_test_functions.jsonl/38135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 865
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80807,
2638,
3547,
14277,
11886,
14051,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
9233,
4283,
9233,
16,
497,
760,
81,
91,
435,
12908,
35419,
486,
3806,
568,
69,
7195,
1171,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_foreign_closure() {
let interp = Interpreter::new();
let scope = interp.scope();
ketos_closure!{ scope, "hello",
|s: &str| -> String { Ok(format!("Hello, {}!", s)) } }
let value = 1;
ketos_closure!{ scope, "get-value",
|| -> i32 { Ok(value) } }
assert_e... | rust_cleaned_test_functions.jsonl/112663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78983,
72823,
368,
341,
262,
1077,
47271,
284,
82493,
486,
931,
543,
262,
1077,
6891,
284,
47271,
48371,
1428,
262,
31281,
436,
72823,
0,
90,
6891,
11,
330,
14990,
756,
286,
760,
82,
25,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sst_writer() {
test_sst_writer_with(1, &[CF_WRITE], &SecurityConfig::default());
test_sst_writer_with(1024, &[CF_DEFAULT, CF_WRITE], &SecurityConfig::default());
let temp_dir = TempDir::new("/tmp/encrypted_env_from_cipher_file").unwrap();
let security_cfg = creat... | rust_cleaned_test_functions.jsonl/19581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
267,
28908,
368,
341,
286,
1273,
643,
267,
28908,
6615,
7,
16,
11,
44590,
9650,
17475,
1125,
609,
15352,
2648,
486,
2258,
1423,
286,
1273,
643,
267,
28908,
6615,
7,
16,
15,
17,
19,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_static_custom_long_symbol() {
HeaderName::from_static(
"longer-than-63--thisheader{}{}{}{}islongerthansixtythreecharactersandthushandleddifferent"
);
} | rust_cleaned_test_functions.jsonl/3415 | {
"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,
5673,
25360,
15875,
17799,
21179,
368,
341,
286,
12104,
675,
486,
1499,
25360,
1006,
310,
330,
4825,
261,
47654,
12,
21,
18,
313,
574,
2708,
6257,
6257,
6257,
6257,
285,
4825,
261,
339,
596,
941... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_channelmanager() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let _chan = create_announced_chan_be... | rust_cleaned_test_functions.jsonl/22478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1032
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
14571,
13297,
368,
341,
197,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
197,
10217,
2436,
18343,
82,
284,
1855,
5084,
18343,
82,
7,
17,
11,
609,
5658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vring_backend_mut() {
let b = RwLock::new(MockBackend {});
assert_eq!(b.get_features().unwrap(), 0x1);
b.set_features(0x1).unwrap();
b.set_owner().unwrap();
b.reset_owner().unwrap();
b.set_mem_table(&[]).unwrap();
b.set_log_base(
... | rust_cleaned_test_functions.jsonl/98905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
12640,
40011,
29523,
368,
341,
286,
1077,
293,
284,
55294,
11989,
486,
931,
66436,
29699,
87894,
286,
2060,
10714,
10297,
65,
670,
14965,
1005,
15454,
1507,
220,
15,
87,
16,
317,
286,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_loops() {
let mut config = AirmashServerConfig::new_no_gamemode("0.0.0.0:3501").with_engine();
config.builder = crate::systems::register(&mut config.world, config.builder);
config.builder.build();
} | rust_cleaned_test_functions.jsonl/47855 | {
"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,
6536,
5560,
3721,
368,
341,
10217,
5206,
2193,
284,
362,
2853,
988,
5475,
2648,
486,
931,
6536,
1889,
309,
91546,
445,
15,
13,
15,
13,
15,
13,
15,
25,
18,
20,
15,
16,
1827,
4197,
24823,
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_config_validate() {
let mut cfg = Config::new();
cfg.validate().unwrap();
assert_eq!(
cfg.raft_min_election_timeout_ticks,
cfg.raft_election_timeout_ticks
);
assert_eq!(
cfg.raft_max_election_timeout_ticks,
c... | rust_cleaned_test_functions.jsonl/9437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
42681,
368,
341,
286,
1077,
5206,
13286,
284,
5532,
486,
931,
543,
286,
13286,
19520,
1005,
15454,
543,
286,
2060,
10714,
33673,
310,
13286,
13,
2944,
7260,
2204,
1170,
20537,
49961,
345,
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_parallel_chains_1() {
let src = [HASH_ELEMENT; 5];
let expect = hash_n_to_n_ret(&HASH_ELEMENT);
let mut dst = [Default::default(); 5];
hash_parallel_chains_all(&mut dst, &src, 1);
assert_eq!(dst, [expect; 5]);
} | rust_cleaned_test_functions.jsonl/127332 | {
"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,
60625,
4138,
1735,
62,
16,
368,
341,
286,
1077,
2286,
284,
508,
70707,
27156,
26,
220,
20,
935,
286,
1077,
1720,
284,
5175,
1089,
2346,
1089,
21695,
2099,
70707,
27156,
317,
286,
1077,
5206,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_check() {
let path = TempDir::new("test-raftstore").unwrap();
let path_str = path.path().to_str().unwrap();
let db_opts = DBOptions::new();
let mut cf_opts = ColumnFamilyOptions::new();
let f = Box::new(RangePropertiesCollectorFactory::default());
... | rust_cleaned_test_functions.jsonl/30070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
7200,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
445,
1944,
12,
2944,
4314,
1827,
15454,
543,
286,
1077,
1815,
2895,
284,
1815,
3875,
1005,
983,
2895,
1005,
15454,
543,
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... | 4 |
#[test]
fn test_match_body() {
let matches = App::new("test")
.arg(arg!(--body "Body to add").takes_value(true))
.get_matches_from(vec!["test", "--body", "foo"]);
let body = matches.match_body();
assert!(body.is_some());
assert_eq!(body.unwrap().to_string().unwrap(), "foo".to_string(... | rust_cleaned_test_functions.jsonl/103524 | {
"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,
10708,
14114,
368,
341,
262,
1077,
9071,
284,
1845,
486,
931,
445,
1944,
1138,
414,
659,
858,
9404,
10297,
313,
2599,
330,
5444,
311,
912,
1827,
77979,
3142,
3715,
1171,
414,
659,
455,
38344,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_eq2() {
let mut s = Stack::new();
s.push(Elt::Int(1)).unwrap();
s.push(Elt::Bool(false)).unwrap();
let res = s.eval(Op::Eq);
assert!(res.is_err());
if let Err(Error::Type) = res {
} else {
assert!(false);
}
} | rust_cleaned_test_functions.jsonl/34521 | {
"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,
21296,
10714,
17,
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,
11233,
3576,
4579,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_case_when() {
let mut ctx = EvalContext::default();
let dec1 = Datum::Dec("1.1".parse().unwrap());
let dec2 = Datum::Dec("2.2".parse().unwrap());
let dur1 = Datum::Dur(Duration::parse(&mut ctx, b"01:00:00", 0).unwrap());
let dur2 = Datum::Dur(Duration::par... | rust_cleaned_test_functions.jsonl/121614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
47636,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
1622,
16,
284,
68459,
486,
4900,
445,
16,
13,
16,
3263,
6400,
1005,
15454,
1423,
286,
1077,
1622,
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... | 2 |
#[test]
fn test_transaction_without_service() {
let (p_key, s_key) = gen_keypair();
let db = Arc::from(Box::new(MemoryDB::new()) as Box<dyn Database>) as Arc<dyn Database>;
let services = vec![];
let node_cfg = helpers::generate_testnet_config(1, 16_500)[0].clone();
let... | rust_cleaned_test_functions.jsonl/22030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
39904,
12267,
368,
341,
286,
1077,
320,
79,
3097,
11,
274,
3097,
8,
284,
4081,
3097,
12670,
1428,
286,
1077,
2927,
284,
19689,
486,
1499,
67758,
486,
931,
3189,
4731,
3506,
486,
931,
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... | 1 |
#[test]
fn test_to_signed_bytes_le() {
fn check(s: &str, result: Vec<u8>) {
assert_eq!(
BigInt::parse_bytes(s.as_bytes(), 10)
.unwrap()
.to_signed_bytes_le(),
result
);
}
check("0", vec![0]);
check("32767", vec![0xff, 0x7f]... | rust_cleaned_test_functions.jsonl/56610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
55617,
12524,
11751,
368,
341,
262,
5168,
1779,
1141,
25,
609,
495,
11,
1102,
25,
11312,
34837,
23,
9231,
341,
286,
2060,
10714,
33673,
310,
62608,
486,
6400,
12524,
1141,
5357,
12524,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extend_selection_prefer_lifetimes() {
do_check(r#"fn foo<<|>'a>() {}"#, &["'a", "<'a>"]);
do_check(r#"fn foo<'a<|>>() {}"#, &["'a", "<'a>"]);
} | rust_cleaned_test_functions.jsonl/29678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
23672,
10442,
802,
907,
333,
6889,
368,
341,
286,
653,
7200,
2601,
55543,
8822,
15229,
2442,
91,
5592,
64,
13555,
4687,
57676,
11,
609,
1183,
6,
64,
497,
4055,
6,
64,
29,
15049,
286,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_26() {
let key = "32b063d3da484ba1843e071b61c49ce7f30ba18a4f7ef2730ecd785494839966";
let nonce = "f593168e17311913753c59593fc66cb6";
let expected_output =
"f18115a9568724c25184728f563b65b737219cb0df1b3ce19a8bdcbdf7b8b2be";
hcha... | rust_cleaned_test_functions.jsonl/44688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
17,
21,
368,
341,
310,
1077,
1376,
284,
330,
18,
17,
65,
15,
21,
18,
67,
18,
3235,
19,
23,
19,
4645,
16,
23,
19,
18,
68,
15,
22,
16,
65,
21,
16,
66,
19,
24,
346,
22,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ready_state_change_event() {
let event: ReadyStateChangeEvent = js!(
return new Event( @{ReadyStateChangeEvent::EVENT_TYPE} );
).try_into().unwrap();
assert_eq!( event.event_type(), ReadyStateChangeEvent::EVENT_TYPE);
} | rust_cleaned_test_functions.jsonl/88358 | {
"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,
35456,
4387,
15947,
6748,
368,
341,
286,
1077,
1538,
25,
30982,
1397,
76498,
284,
6994,
33673,
310,
470,
501,
3665,
7,
33267,
19202,
1397,
76498,
486,
37349,
4189,
92,
1439,
286,
7457,
1539,
45514... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_num_nonzero() {
{
let mut cs = TestConstraintSystem::new();
let n = AllocatedNum::alloc(&mut cs, || Ok(Scalar::from(3))).unwrap();
n.assert_nonzero(&mut cs).unwrap();
assert!(cs.is_satisfied());
cs.set("ephemeral inverse", Sca... | rust_cleaned_test_functions.jsonl/119280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4273,
21637,
14154,
368,
341,
286,
341,
310,
1077,
5206,
10532,
284,
3393,
17890,
2320,
486,
931,
1428,
310,
1077,
308,
284,
1674,
39463,
4651,
486,
4742,
2099,
6984,
10532,
11,
1369,
7622,
7,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_sig_token_structure() {
// Valid cases.
let bool_token = SignatureToken::Bool;
assert_eq!(check_structure(&bool_token), None);
let struct_token = SignatureToken::Struct(StructHandleIndex::new(0), vec![]);
assert_eq!(check_structure(&struct_token), None);
let ref_token = S... | rust_cleaned_test_functions.jsonl/108581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 518
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29252,
6458,
38283,
368,
341,
262,
442,
7818,
5048,
624,
262,
1077,
1807,
6458,
284,
32232,
3323,
486,
11233,
280,
262,
2060,
10714,
10297,
2028,
38283,
2099,
2641,
6458,
701,
2240,
317,
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_parse_range() {
assert_eq!(FieldRange::from_str("1"), Some(Single(1)));
assert_eq!(FieldRange::from_str("-1"), Some(Single(-1)));
assert_eq!(FieldRange::from_str("1.."), Some(RightInf(1)));
assert_eq!(FieldRange::from_str("-1.."), Some(RightInf(-1)));
as... | rust_cleaned_test_functions.jsonl/82617 | {
"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,
21039,
9698,
368,
341,
286,
2060,
10714,
10297,
1877,
6046,
486,
1499,
2895,
445,
16,
3975,
4329,
3759,
2173,
7,
16,
4945,
286,
2060,
10714,
10297,
1877,
6046,
486,
1499,
2895,
13645,
16,
3975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_with_string() {
let mut output = String::new();
let method = StringMethod {
method: "join",
variable: "[\"FOO\" \"BAR\"]",
pattern: "\" \"",
selection: Select::All,
};
method.handle(&mut output, &VariableE... | rust_cleaned_test_functions.jsonl/85287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
6615,
3904,
368,
341,
286,
1077,
5206,
2550,
284,
923,
486,
931,
543,
286,
1077,
1714,
284,
923,
3523,
341,
310,
1714,
25,
262,
330,
5987,
756,
310,
3890,
25,
220,
10545,
2105,
3788,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str_lit() {
let msg = r#" "a\nb" "#;
let mess = tokenize(msg, |p| p.next_str_lit());
assert_eq!(
StrLit {
escaped: r#"a\nb"#.to_owned()
},
mess
);
} | rust_cleaned_test_functions.jsonl/77307 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
98399,
368,
341,
286,
1077,
3750,
284,
435,
55543,
220,
330,
64,
1699,
65,
1,
220,
5869,
280,
286,
1077,
9435,
284,
77651,
8119,
11,
760,
79,
91,
281,
4529,
2895,
98399,
1423,
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_decode_ldrsb_imm_t2() {
assert_eq!(
decode_32(0xf9170c09),
Instruction::LDRSB_imm {
params: Reg2FullParams {
rt: Reg::R0,
rn: Reg::R7,
imm32: 9,
index: true,
add: false,
... | rust_cleaned_test_functions.jsonl/64862 | {
"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,
15227,
50573,
5428,
65,
71370,
528,
17,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
24,
16,
22,
15,
66,
15,
24,
1326,
286,
29051,
486,
43,
7687,
16680,
7137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_cloudfront_get_cloud_front_origin_access_identity() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"cloudfront-get-cloud-front-origin-access-identity.xml",
);
let mock = MockRequestDispatcher:... | rust_cleaned_test_functions.jsonl/88938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
37356,
6951,
3062,
37356,
22926,
34043,
12759,
46244,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_patch_rate_limiters() {
let mut net = Net::default_net(TestMutators::default());
let mem_clone = net.mem.clone();
let (rxq, txq) = Net::virtqueues(&mem_clone);
net.assign_queues(rxq.create_queue(), txq.create_queue());
net.rx_rate_limiter = RateLimiter::n... | rust_cleaned_test_functions.jsonl/63433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 694
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39643,
9246,
14763,
388,
368,
341,
286,
1077,
5206,
4179,
284,
9374,
486,
2258,
19722,
31159,
51440,
2973,
486,
2258,
1423,
286,
1077,
1833,
54742,
284,
4179,
41493,
15997,
543,
286,
1077,
320,
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... | 1 |
#[test]
fn test_parse_conditions() {
let patterns = vec!["github.com", "^facebook.com", "twitter.com$"];
let expected = vec!["contains \"github.com\"", "starts with \"facebook.com\"", "ends with \"twitter.com\""];
let actual = parse_conditions(patterns);
assert_eq!(actual, expected);
} | rust_cleaned_test_functions.jsonl/29332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
54099,
368,
341,
262,
1077,
12624,
284,
7486,
0,
1183,
5204,
905,
497,
39915,
20944,
905,
497,
330,
14679,
905,
3,
6332,
262,
1077,
3601,
284,
7486,
0,
1183,
13372,
7245,
5204,
905,
55853... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jubjub_bls12() {
let params = JubjubBls12::new();
tests::test_suite::<Bls12>(¶ms);
let test_repr = hex!("9d12b88b08dcbef8a11ee0712d94cb236ee2f4ca17317075bfafc82ce3139d31");
let p = edwards::Point::<Bls12, _>::read(&test_repr[..], ¶ms).unwrap();
let q = edwards::Poin... | rust_cleaned_test_functions.jsonl/105386 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5374,
392,
73,
392,
880,
4730,
16,
17,
368,
341,
262,
1077,
3628,
284,
79280,
73,
392,
33,
4730,
16,
17,
486,
931,
1428,
262,
7032,
486,
1944,
57239,
27638,
33,
4730,
16,
17,
44784,
3519,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_abs_decimal() {
let test_cases = vec![("1.1", "1.1"), ("-1.1", "1.1")];
for (arg, expect_output) in test_cases {
let arg = arg.parse::<Decimal>().ok();
let expect_output = expect_output.parse::<Decimal>().ok();
let output = RpnFnScalarEvaluato... | rust_cleaned_test_functions.jsonl/9474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31170,
74429,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
20703,
445,
16,
13,
16,
497,
330,
16,
13,
16,
3975,
98670,
16,
13,
16,
497,
330,
16,
13,
16,
899,
4821,
286,
369,
320,
858,
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... | 2 |
#[test]
fn test_values() {
let vec = vec![(1, 'a'), (2, 'b'), (3, 'c')];
let map: HashMap<_, _> = vec.into_iter().collect();
let values: Vec<_> = map.values().copied().collect();
assert_eq!(values.len(), 3);
assert!(values.contains(&'a'));
assert!(values.contains(... | rust_cleaned_test_functions.jsonl/26952 | {
"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,
9146,
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,
29,
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_versions_from_str_max() {
assert_eq!(Err(ProtoverError::ExceedsMax), ProtoSet::from_str("4294967295"));
} | rust_cleaned_test_functions.jsonl/105772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65148,
5673,
2895,
6345,
368,
341,
286,
2060,
10714,
10297,
7747,
7,
31549,
423,
1454,
486,
840,
4635,
82,
5974,
701,
57677,
1649,
486,
1499,
2895,
445,
19,
17,
24,
19,
24,
21,
22,
17,
24,
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 |
#[test]
fn test_claim_neuron_memo_and_controller_by_proxy() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
let caller = *TEST_NEURON_2_OWNER_PRINCIPAL;
claim_neuron_by_memo_and_controller(owner, caller);
} | rust_cleaned_test_functions.jsonl/1148 | {
"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,
84969,
13925,
36090,
717,
6726,
8378,
21600,
3710,
29712,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
1077,
19865,
284,
353,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply_jql_number() {
let json = r#"{"post code": "90210", "country": "United States", "country abbreviation": "US", "places": [{"place name": "Beverly Hills", "longitude": -118.4065, "state": "California", "state abbreviation": "CA", "latitude": 34.0901}]}"#;
let selectors = r#"."places"... | rust_cleaned_test_functions.jsonl/14759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
5374,
1470,
5500,
368,
341,
262,
1077,
2951,
284,
435,
55543,
4913,
2203,
2038,
788,
330,
24,
15,
17,
16,
15,
497,
330,
11141,
788,
330,
22372,
4180,
497,
330,
11141,
71478,
788,
330,
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_config_file_defaults() {
// Only version is required
assert_eq!(
InterpreterConfig::from_reader(Cursor::new("version=3.7")).unwrap(),
InterpreterConfig {
version: PythonVersion { major: 3, minor: 7 },
implementation: PythonI... | rust_cleaned_test_functions.jsonl/13937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
2458,
42290,
368,
341,
286,
442,
8278,
2319,
374,
2567,
198,
286,
2060,
10714,
33673,
310,
82493,
2648,
486,
1499,
22306,
3025,
3823,
486,
931,
445,
4366,
28,
18,
13,
22,
15197,
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_add_node() {
let mut g: Csr = Csr::new();
let a = g.add_node(());
let b = g.add_node(());
let c = g.add_node(());
assert!(g.add_edge(a, b, ()));
assert!(g.add_edge(b, c, ()));
assert!(g.add_edge(c, a, ()));
println!("{:?}", g);
... | rust_cleaned_test_functions.jsonl/36545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5084,
368,
341,
286,
1077,
5206,
342,
25,
356,
15094,
284,
356,
15094,
486,
931,
543,
286,
1077,
264,
284,
342,
1364,
5084,
7,
1423,
286,
1077,
293,
284,
342,
1364,
5084,
7,
1423,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_module_functions_with_module() {
let gil = Python::acquire_gil();
let py = gil.python();
let m = pyo3::wrap_pymodule!(module_with_functions_with_module)(py);
py_assert!(
py,
m,
"m.pyfunction_with_module() == 'module_with_functions_with_module'"
);
... | rust_cleaned_test_functions.jsonl/22691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 499
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
31708,
6615,
10750,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
543,
262,
1077,
296,
284,
4510,
78,
18,
486,
10097,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_default() {
let config = ClientConfigBuilder::default()
.controller_uri(MOCK_CONTROLLER_URI)
.build()
.unwrap();
assert_eq!(config.max_connections_in_pool(), u32::max_value() as u32);
assert_eq!(config.max_controller_connections(),... | rust_cleaned_test_functions.jsonl/123712 | {
"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,
3062,
9993,
368,
341,
286,
1077,
2193,
284,
8423,
2648,
3297,
486,
2258,
741,
310,
659,
7152,
15572,
3189,
16678,
63995,
23116,
340,
310,
659,
5834,
741,
310,
659,
15454,
1428,
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_parse_command_errors() {
assert_eq!(Shell::parse_command("foo").is_ok(), true);
assert_eq!(Shell::parse_command("foo `{}`").is_ok(), true);
assert_eq!(Shell::parse_command("foo `{\"abc\": 1}`").is_ok(), true);
assert_eq!(Shell::parse_command("foo `{aaa}`").is_ok()... | rust_cleaned_test_functions.jsonl/76572 | {
"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,
21039,
10811,
20196,
368,
341,
286,
2060,
10714,
10297,
25287,
486,
6400,
10811,
445,
7975,
1827,
285,
19817,
1507,
830,
317,
286,
2060,
10714,
10297,
25287,
486,
6400,
10811,
445,
7975,
53692,
5541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitv_set_from_uints() {
let uints = vec![0, 2, 2, 3];
let a: BitvSet = uints.into_iter().collect();
let mut b = BitvSet::new();
b.insert(0);
b.insert(2);
b.insert(3);
assert_eq!(a, b);
} | rust_cleaned_test_functions.jsonl/119303 | {
"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,
13996,
85,
2602,
5673,
15807,
82,
368,
341,
286,
1077,
2622,
82,
284,
7486,
20703,
15,
11,
220,
17,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
264,
25,
6495,
85,
1649,
284,
2622,
82,
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 |
#[test]
fn test_check_point_values() {
let (genesis_config, _) = create_genesis_config(500);
let bank = Arc::new(Bank::new(&genesis_config));
// check that point values are 0 if no previous value was known and current values are not normal
assert_eq!(
bank.check_poin... | rust_cleaned_test_functions.jsonl/42423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
6085,
9146,
368,
341,
286,
1077,
320,
77894,
5332,
11,
27439,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
486,
931,
2099,
77894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frames_and_names() -> Result<()> {
let query1 = parse(
r#"
from orders
select [customer_no, gross, tax, gross - tax]
take 20
"#,
)?;
let query2 = parse(
r#"
from table_1
join customers [customer_no]
... | rust_cleaned_test_functions.jsonl/90565 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29319,
8378,
9187,
368,
1464,
5714,
71698,
341,
286,
1077,
3239,
16,
284,
4715,
1006,
310,
435,
2,
698,
286,
504,
10163,
198,
286,
3293,
508,
11049,
6536,
11,
19952,
11,
3742,
11,
19952,
481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_i128_min() {
Python::with_gil(|py| {
let v = std::i128::MIN;
let obj = v.to_object(py);
assert_eq!(v, obj.extract::<i128>(py).unwrap());
assert!(obj.extract::<i64>(py).is_err());
assert!(obj.extract::<u128>(py).is_err());
... | rust_cleaned_test_functions.jsonl/24281 | {
"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,
5318,
16,
17,
23,
7260,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
284,
1460,
486,
72,
16,
17,
23,
486,
16413,
280,
310,
1077,
2839,
284,
348,
2389,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_update_deser() {
let raw =
include_str!("../../test-data/raw_gateway_responses/get_state_update/1_success.txt");
let state_update: StateUpdate = serde_json::from_str(raw).unwrap();
let storage_diff = &state_update
.state_diff
.s... | rust_cleaned_test_functions.jsonl/56205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 880
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
8882,
15768,
261,
368,
341,
286,
1077,
7112,
4035,
310,
2924,
2895,
17223,
2748,
1944,
13945,
75909,
64049,
81292,
23302,
4387,
8882,
14,
16,
18632,
3909,
3071,
286,
1077,
1584,
8882,
25,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retrieving_app_level_messagens_slice() {
let mut store = create_store(|s| {
s.add_to_store( builder::build_new_order_single(1, true, "cl1", "AAPL", 100.0, 594.2, FieldSideEnum::Buy, FieldOrdTypeEnum::Limit ) );
s.add_to_store( builder::build_new_order_single(2, true, "cl2", "... | rust_cleaned_test_functions.jsonl/129875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 820
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
8927,
4405,
8191,
8274,
717,
433,
38796,
26488,
368,
341,
262,
1077,
5206,
3553,
284,
1855,
14809,
22428,
82,
91,
341,
286,
274,
1364,
2346,
14809,
7,
7363,
486,
5834,
5921,
7869,
19487,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concat_for_different_lengths() {
let empty: &[&str] = &[];
test_concat!("", empty);
test_concat!("a", ["a"]);
test_concat!("ab", ["a", "b"]);
test_concat!("abc", ["", "a", "bc"]);
} | rust_cleaned_test_functions.jsonl/2426 | {
"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,
57478,
5478,
82741,
54416,
368,
341,
286,
1077,
4287,
25,
44590,
5,
495,
60,
284,
609,
15078,
286,
1273,
57478,
17223,
497,
4287,
317,
286,
1273,
57478,
17223,
64,
497,
4383,
64,
15049,
286,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encoder_smoke() {
let mut encoder = EncoderBuilder::new().level(1).build(Vec::new()).unwrap();
encoder.write(b"Some ").unwrap();
encoder.write(b"data").unwrap();
let (_, result) = encoder.finish();
result.unwrap();
} | rust_cleaned_test_functions.jsonl/118876 | {
"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,
39068,
15874,
4740,
368,
341,
286,
1077,
5206,
23668,
284,
55115,
3297,
486,
931,
1005,
3294,
7,
16,
568,
5834,
49923,
486,
931,
6011,
15454,
543,
286,
23668,
3836,
1883,
94875,
27510,
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... | 1 |
#[test]
fn test_checked_fixed_point_mul_rounded_up() {
run_test(|| {
let currency = Token(DOT);
let tests: Vec<(Amount<Test>, UnsignedFixedPoint, Amount<Test>)> = vec![
(
Amount::new(10, currency),
UnsignedFixedPoint::checked_from_rational(1, 3).un... | rust_cleaned_test_functions.jsonl/110276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 861
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56456,
37839,
6085,
24944,
29896,
291,
8237,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1077,
11413,
284,
9660,
5432,
1793,
317,
286,
1077,
7032,
25,
11312,
28706,
10093,
71273,
8066,
97747,
13520,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mul32_reg_overflow() {
test_interpreter_and_jit_asm!(
"
mov r0, 0x40000001
mov r1, 4
mul32 r0, r1
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0x4 } },
4
);
} | rust_cleaned_test_functions.jsonl/58954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
18,
17,
4920,
79073,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
220,
15,
87,
19,
15,
15,
15,
15,
15,
15,
16,
198,
286,
1974,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_url_of_backend() {
let bucket_name = StringNonEmpty::static_str("bucket");
let mut bucket = BucketConf::default(bucket_name);
bucket.prefix = Some(StringNonEmpty::static_str("/backup 02/prefix/"));
let gcs = Config::default(bucket.clone());
assert... | rust_cleaned_test_functions.jsonl/30686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
3575,
40011,
368,
341,
286,
1077,
15621,
1269,
284,
923,
8121,
3522,
486,
1978,
2895,
445,
30410,
797,
286,
1077,
5206,
15621,
284,
47768,
15578,
486,
2258,
58934,
1269,
317,
286,
15621,
385... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_closing_sequence_score() {
let input_1 = vec![&'}', &'}', &']', &']', &')', &'}', &')',&']'];
assert_eq!(closing_sequence_score(input_1), 288957);
} | rust_cleaned_test_functions.jsonl/50442 | {
"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,
666,
17831,
23735,
10405,
368,
341,
286,
1077,
1946,
62,
16,
284,
7486,
20703,
5,
8275,
516,
609,
8275,
516,
609,
660,
516,
609,
660,
516,
609,
863,
516,
609,
8275,
516,
609,
863,
516,
5,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_8XY5() {
// 0x8XY5 - Subtract the value of register VY from register VX
// Set VF to 00 if a borrow occurs
// Set VF to 01 if a borrow does not occur
let opcode = 0x89A5;
let mut vm = get_vm();
// without borrow
vm.v[0x9] = 0xFF;
vm.v[0xA] = 0x... | rust_cleaned_test_functions.jsonl/253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
23,
16356,
20,
368,
341,
262,
442,
220,
15,
87,
23,
16356,
20,
481,
93210,
279,
897,
315,
4161,
647,
56,
504,
4161,
78177,
198,
262,
442,
688,
2573,
72892,
311,
220,
15,
15,
421,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_register() {
let mut event_manager = EventManager::new().unwrap();
let dummy_subscriber = Arc::new(Mutex::new(DummySubscriber::new()));
event_manager
.add_subscriber(dummy_subscriber.clone())
.unwrap();
dummy_subscriber.lock().unwrap().re... | rust_cleaned_test_functions.jsonl/92052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
368,
341,
286,
1077,
5206,
1538,
12144,
284,
3665,
2043,
486,
931,
1005,
15454,
543,
286,
1077,
17292,
5228,
20351,
284,
19689,
486,
931,
3189,
9371,
486,
931,
5432,
8574,
40236,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_openat() {
const CONTENTS: &[u8] = b"abcd";
let mut tmp = NamedTempFile::new().unwrap();
tmp.write_all(CONTENTS).unwrap();
let dirfd = open(tmp.path().parent().unwrap(),
OFlag::empty(),
Mode::empty()).unwrap();
let fd = openat(dirfd,... | rust_cleaned_test_functions.jsonl/91354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
266,
368,
341,
262,
733,
35768,
50,
25,
44590,
84,
23,
60,
284,
293,
1,
68644,
876,
262,
1077,
5206,
4174,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
262,
4174,
3836,
5705,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_resolv_conf() {
read_resolv_conf(format!("{}/resolv.conf-simple", tests_dir())).expect("simple failed");
read_resolv_conf(format!("{}/resolv.conf-macos", tests_dir())).expect("macos failed");
read_resolv_conf(format!("{}/resolv.conf-linux", tests_dir())).expect("linu... | rust_cleaned_test_functions.jsonl/39728 | {
"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,
6443,
4918,
35315,
16059,
368,
341,
286,
1349,
4918,
35315,
16059,
20698,
88928,
4472,
416,
35315,
13937,
65957,
497,
7032,
4334,
34670,
17119,
445,
22944,
4641,
797,
286,
1349,
4918,
35315,
16059,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ping_omaha_updates_consecutive_failed_update_checks_and_persists() {
block_on(async {
let mut http = MockHttpRequest::empty();
http.add_error(http_request::mock_errors::make_transport_error());
http.add_response(HttpResponse::new(vec![]));
... | rust_cleaned_test_functions.jsonl/59706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71661,
62,
316,
13546,
57829,
3382,
85780,
35060,
8882,
75797,
8378,
620,
388,
1671,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
5206,
1758,
284,
14563,
26362,
486,
3194,
543,
310,
1758,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_named_reference() {
assert_matches!("#some-child".parse::<Ref>(), Ok(Ref::Named(name)) if name == "some-child");
assert_matches!("#-".parse::<Ref>(), Ok(Ref::Named(name)) if name == "-");
assert_matches!("#_".parse::<Ref>(), Ok(Ref::Named(name)) if name == "_");
... | rust_cleaned_test_functions.jsonl/16471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
71834,
25433,
368,
341,
286,
2060,
38344,
0,
3584,
14689,
23484,
3263,
6400,
27638,
3945,
39019,
7622,
7,
3945,
486,
15810,
3153,
593,
421,
829,
621,
330,
14689,
23484,
797,
286,
2060,
3834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_row_group_rows_invalid_projection() {
let schema = "
message spark_schema {
REQUIRED INT32 key;
REQUIRED BOOLEAN value;
}
";
let schema = parse_message_type(&schema).unwrap();
let res = test_row_group_rows("nested_maps.snappy.parquet", Some... | rust_cleaned_test_functions.jsonl/69593 | {
"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,
8530,
6288,
10949,
31433,
72738,
368,
341,
286,
1077,
10802,
284,
6228,
414,
1943,
15186,
25371,
341,
286,
66577,
9221,
18,
17,
1376,
280,
286,
66577,
59393,
897,
280,
414,
456,
262,
7620,
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_chain_update_propagation_status2() {
let num_validators = 6;
let keypairs: HashMap<_, _> = iter::repeat_with(|| {
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
(vote_keypairs.node_keypair.pubkey(), vote_keypairs)
})
.take(num_valid... | rust_cleaned_test_functions.jsonl/25821 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
8882,
21663,
27137,
4773,
17,
368,
341,
286,
1077,
1629,
8337,
2973,
284,
220,
21,
280,
286,
1077,
1376,
77256,
25,
10528,
27,
6878,
716,
29,
284,
5367,
486,
30624,
6615,
79453,
341,
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... | 6 |
#[test]
fn test_uuid_fns() {
let uuid = uuid().unwrap();
let boot_id = boot_id().unwrap();
println!("UUID: {}", uuid);
println!("boot UUID: {}", boot_id);
} | rust_cleaned_test_functions.jsonl/68834 | {
"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,
25540,
761,
4412,
368,
341,
286,
1077,
16040,
284,
16040,
1005,
15454,
543,
286,
1077,
10459,
842,
284,
10459,
842,
1005,
15454,
1428,
286,
13751,
17223,
24754,
25,
24689,
16040,
317,
286,
13751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_vector_4() {
let address = "DdzFFzCqrhsn7ZAhKy8mxkzW6G3wryM7K6bH38VAjE2FesJMxia3UviivMvGz146TP1FpDharxTE6nUgCCnZx2fmtKpmxAosg9Tf5b8y".parse().unwrap();
let public_key = XPub::from_bytes([
0xcd, 0x84, 0x2e, 0x01, 0x0d, 0x81, 0xa6, 0xbe, 0x1e, 0x16, 0x9f, 0xd6, 0x35, 0x... | rust_cleaned_test_functions.jsonl/1896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 505
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
19,
368,
341,
286,
1077,
2621,
284,
330,
35,
37877,
1748,
89,
34,
23004,
4997,
77,
22,
57,
24765,
77118,
23,
18085,
74,
89,
54,
21,
38,
18,
86,
884,
44,
22,
42,
21,
65,
39,
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_watch() {
macro_rules! assert_contains {
($string:expr, $($test:expr),+) => {
let string = $string; // This might be a function call or something
if !($(string.contains($test))||+) {
panic!("{:?} does not contain any of {:?}", string, [$($test),+]);
... | rust_cleaned_test_functions.jsonl/25039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58562,
368,
341,
414,
18072,
21407,
0,
2060,
63598,
341,
286,
1711,
917,
96011,
11,
93977,
1944,
96011,
701,
36197,
589,
341,
688,
1077,
914,
284,
400,
917,
26,
442,
1096,
2578,
387,
264,
729,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qmp_resp() {
// 1.Empty response and ID change;
let mut resp = Response::create_empty_response();
resp.change_id(Some(0));
let json_msg = r#"{"return":{},"id":0}"#;
assert_eq!(serde_json::to_string(&resp).unwrap(), json_msg);
resp.change_id(Some(... | rust_cleaned_test_functions.jsonl/66355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
1307,
35160,
368,
341,
286,
442,
220,
16,
11180,
2033,
323,
3034,
2297,
280,
286,
1077,
5206,
9039,
284,
5949,
486,
3182,
15124,
9655,
543,
286,
9039,
21469,
842,
65405,
7,
15,
3237,
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_writer_lock() {
let lock = RwLock::<usize>::default();
let val = 10;
let mut guard = lock.write(1);
*guard = val;
assert_eq!(lock.wlock.load(Ordering::Relaxed), true);
assert_eq!(lock.rlock[0].load(Ordering::Relaxed), 0);
assert_eq!(unsaf... | rust_cleaned_test_functions.jsonl/77522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
9818,
368,
341,
286,
1077,
5296,
284,
55294,
11989,
27638,
51878,
6831,
2258,
543,
286,
1077,
1044,
284,
220,
16,
15,
401,
286,
1077,
5206,
7616,
284,
5296,
3836,
7,
16,
317,
286,
353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_list_from_iterator() {
let list = VecList::from_iter([0, 1, -1, 2, -2].iter().cloned());
assert_eq!(list, &[0, 1, -1, 2, -2][..]);
} | rust_cleaned_test_functions.jsonl/11521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
5673,
13491,
368,
341,
286,
1077,
1140,
284,
11312,
852,
486,
1499,
11723,
2561,
15,
11,
220,
16,
11,
481,
16,
11,
220,
17,
11,
481,
17,
936,
2015,
1005,
564,
19684,
1423,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_urlencoded_error() {
let resp: HttpResponse =
UrlencodedError::Overflow { size: 0, limit: 0 }.error_response();
assert_eq!(resp.status(), StatusCode::PAYLOAD_TOO_LARGE);
let resp: HttpResponse = UrlencodedError::UnknownLength.error_response();
assert_e... | rust_cleaned_test_functions.jsonl/26844 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
19329,
4096,
368,
341,
286,
1077,
9039,
25,
17580,
4035,
310,
22840,
19329,
1454,
486,
42124,
314,
1379,
25,
220,
15,
11,
3930,
25,
220,
15,
16908,
841,
9655,
543,
286,
2060,
10714,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hmac() {
use crate::CryptoCtx;
let ctx = CryptoCtx::new();
let key_handle = ctx.symmetric_key_generate("HMAC/SHA-512", None).unwrap();
let state_handle = ctx
.symmetric_state_open("HMAC/SHA-512", Some(key_handle), None)
.unwrap();
ctx.symmetric_state_absorb(... | rust_cleaned_test_functions.jsonl/132172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
11948,
368,
341,
262,
990,
17717,
486,
58288,
23684,
401,
262,
1077,
5635,
284,
32886,
23684,
486,
931,
1428,
262,
1077,
1376,
10630,
284,
5635,
44906,
3097,
48851,
445,
39,
25788,
14,
33145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_distance() {
let first_move = Move {
start: Point { x: 10, y: 0 },
end: Point { x: 10, y: 50 },
move_type: MoveType::Vertical,
};
assert_eq!(50, first_move.distance());
} | rust_cleaned_test_functions.jsonl/44996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
19464,
368,
341,
260,
1077,
1156,
17134,
284,
14561,
341,
394,
1191,
25,
5126,
314,
856,
25,
220,
16,
15,
11,
379,
25,
220,
15,
1153,
394,
835,
25,
5126,
314,
856,
25,
220,
16,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commutation() {
let basis = hermitian_basis_from_spin(0.5);
let x = find_structure_constants(&basis);
assert_eq!(x.len(), 3 * 2);
let basis = hermitian_basis_from_spin(1.);
let x = find_structure_constants(&basis);
assert_eq!(x.len(), 23 * 2);
... | rust_cleaned_test_functions.jsonl/79987 | {
"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,
2965,
30971,
368,
341,
286,
1077,
8037,
284,
1059,
1763,
1103,
62696,
5673,
47965,
7,
15,
13,
20,
317,
286,
1077,
856,
284,
1477,
38283,
55642,
2099,
88826,
317,
286,
2060,
10714,
10297,
87,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_request() {
let to_vmm_fd = EventFd::new(libc::EFD_NONBLOCK).unwrap();
let (api_request_sender, _from_api) = channel();
let (to_api, vmm_response_receiver) = channel();
let mut api_server = ApiServer::new(api_request_sender, vmm_response_receiver, to_vmm_f... | rust_cleaned_test_functions.jsonl/78941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 996
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
7893,
368,
341,
286,
1077,
311,
2273,
3821,
17676,
284,
3665,
74476,
486,
931,
44828,
66,
486,
36,
14596,
22128,
39964,
568,
15454,
543,
286,
1077,
320,
2068,
7893,
54356,
11,
716,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_15() {
let key = "2aa209e24478fa1bd6f6ffabe98555e034342cbec07364c54d1e407e282ef08e";
let nonce = "dbfdbde936c9d42df58ae15889f5c939";
let expected_output =
"f5047baa0acf9a603415a09b64268d77712ae902c73490e9c53db593765726db";
hcha... | rust_cleaned_test_functions.jsonl/44677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
16,
20,
368,
341,
310,
1077,
1376,
284,
330,
17,
5305,
17,
15,
24,
68,
17,
19,
19,
22,
23,
3632,
16,
8940,
21,
69,
21,
542,
8229,
24,
23,
20,
20,
20,
68,
15,
18,
19,
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... | 1 |
#[test]
fn test_zeroize() {
use zeroize::Zeroize;
let mut a = Fp::one();
a.zeroize();
assert!(bool::from(a.is_zero()));
} | rust_cleaned_test_functions.jsonl/23238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
551,
368,
341,
262,
990,
7168,
551,
486,
17999,
551,
401,
262,
1077,
5206,
264,
284,
434,
79,
486,
603,
543,
262,
264,
25847,
551,
543,
262,
2060,
10297,
2641,
486,
1499,
2877,
2079,
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 |
#[test]
fn test_file_open_error() {
let dir = tempfile::Builder::new()
.prefix("test_file_open_error")
.tempdir()
.unwrap();
let cfg = Config {
dir: dir.path().to_str().unwrap().to_owned(),
..Default::default()
};
let fs = Arc::new(ObfuscatedFileSystem::de... | rust_cleaned_test_functions.jsonl/53486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
11311,
4096,
368,
341,
262,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
286,
659,
11849,
445,
1944,
2458,
11311,
4096,
1138,
286,
659,
3888,
3741,
741,
286,
659,
15454,
543,
262,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pass_superclass() {
let hdr = indoc! {"
#include <memory>
class A {
public:
virtual void foo() const {};
virtual ~A() {}
};
class B : public A {
public:
void bar() const {}
};
inline std::unique_ptr<B> get_b() { return std::make_unique<... | rust_cleaned_test_functions.jsonl/9976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
38886,
1040,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
17269,
397,
262,
536,
362,
341,
262,
584,
510,
286,
4108,
737,
15229,
368,
733,
9321,
286,
4108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exec_special_noop() {
let header = make_test_header(EndianSlice::new(&[], LittleEndian));
let initial_registers = LineRow::new(&header);
let opcode = LineInstruction::Special(16);
let expected_registers = initial_registers;
assert_exec_opcode(header, ini... | rust_cleaned_test_functions.jsonl/3358 | {
"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,
18430,
41629,
6536,
453,
368,
341,
286,
1077,
4247,
284,
1281,
4452,
8757,
7,
43231,
33236,
486,
931,
2099,
12995,
14671,
43231,
3237,
286,
1077,
2856,
78360,
284,
7083,
3102,
486,
931,
2099,
2708... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shuffle() {
let mut r = thread_rng();
let empty: &mut [int] = &mut [];
r.shuffle(empty);
let mut one = [1];
r.shuffle(&mut one);
let b: &[_] = &[1];
assert_eq!(one, b);
let mut two = [1, 2];
r.shuffle(&mut two);
ass... | rust_cleaned_test_functions.jsonl/76079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73484,
368,
341,
286,
1077,
5206,
435,
284,
4516,
66849,
543,
286,
1077,
4287,
25,
609,
6984,
508,
396,
60,
284,
609,
6984,
5907,
286,
435,
45048,
24216,
317,
286,
1077,
5206,
825,
284,
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... | 2 |
#[test]
fn test_if_else_statement() {
assert_eq!(
parse_statement(&b"jika a == salah {\n} atau {\n}"[..]),
Ok((
&b""[..],
Statement::IfStatement(IfStatement {
test: Expression::BinaryExpression(Box::new(BinaryExpression {
... | rust_cleaned_test_functions.jsonl/129439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
62628,
37404,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
37404,
2099,
65,
1,
73,
11496,
264,
621,
77324,
28152,
77,
92,
38372,
28152,
77,
9863,
95874,
17036,
310,
7622,
94702,
394,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with() {
test_derive! {
custom_debug_derive {
struct Point {
#[debug(with = "my_fmt")]
x: f32,
y: f32,
}
}
expands to {
#[allow(non_upper_case_globals)]
const _DERIVE_core... | rust_cleaned_test_functions.jsonl/61110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
368,
341,
262,
1273,
35345,
533,
0,
341,
286,
2526,
15446,
35345,
533,
341,
310,
2036,
5126,
341,
394,
11506,
8349,
16980,
284,
330,
2408,
38128,
5422,
394,
856,
25,
282,
18,
17,
345,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display() {
macro_rules! t(
($path:expr, $exp:expr, $expf:expr) => (
{
let path = Path::new($path);
let f = format!("{}", path.display());
assert!(f.as_slice() == $exp);
let f = fo... | rust_cleaned_test_functions.jsonl/7680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
1711,
2343,
96011,
11,
400,
4580,
96011,
11,
400,
4580,
69,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933,
486,
931,
699,
234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_txn_status_resolving_pessimistic_lock() {
let engine = TestEngineBuilder::new().build().unwrap();
let k = b"k1";
let v = b"v1";
let ts = TimeStamp::compose;
// Check with resolving_pessimistic_lock flag.
must_success(
&e... | rust_cleaned_test_functions.jsonl/125141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1923
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
92299,
4773,
4918,
19648,
620,
66733,
4532,
9818,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
595,
284,
293,
62911,
16,
876,
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... | 1 |
#[test]
fn test_suffix_param() {
for suffix_param in vec!["-s", "--suffix"] {
let path = "/foo/bar/baz.exe";
new_ucmd!()
.args(&[suffix_param, ".exe", path, path])
.succeeds()
.stdout_only("baz\nbaz\n");
}
} | rust_cleaned_test_functions.jsonl/82224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37151,
4090,
368,
341,
262,
369,
20525,
4090,
304,
7486,
0,
1183,
12,
82,
497,
14482,
26786,
1341,
341,
286,
1077,
1815,
284,
3521,
7975,
49513,
3470,
1370,
19399,
876,
286,
501,
68887,
2277,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_send_task() {
let mut t: Turbine<TestSlot> = Turbine::new(1024);
let e1 = t.ep_new();
assert!(e1.is_ok() == true);
let e2 = t.ep_new();
assert!(e2.is_ok() == true);
let _ = t.ep_depends(e2.unwrap(), e1.unwrap());
let ep1 = t.ep_finalize(... | rust_cleaned_test_functions.jsonl/65711 | {
"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,
13565,
12184,
368,
341,
286,
1077,
5206,
259,
25,
8705,
46561,
71273,
19877,
29,
284,
8705,
46561,
486,
931,
7,
16,
15,
17,
19,
317,
286,
1077,
384,
16,
284,
259,
33376,
5921,
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... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.