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_same_module_struct_resolution() {
let allocator = Arena::new();
let vm_cache = VMModuleCache::new(&allocator);
let code = String::from(
"
modules:
module M1 {
struct X {}
struct T { i: u64, x: V#Self.X }
}
script:
... | rust_cleaned_test_functions.jsonl/127132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 658
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
10750,
15126,
39849,
368,
341,
262,
1077,
43655,
284,
27047,
486,
931,
543,
262,
1077,
10995,
11529,
284,
17792,
3332,
8233,
486,
931,
2099,
57631,
626,
262,
1077,
2038,
284,
923,
486,
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_display_local_timestamp_without_date() {
let c_time = chrono::offset::Utc::now().format("%Y-%m-%d %H:%M:%S").to_string();
assert_eq!(
convert_to_local_timestamp(&c_time, false).unwrap(),
Local::now().format("%H:%M:%S").to_string(),
);
} | rust_cleaned_test_functions.jsonl/10674 | {
"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,
14825,
13564,
23073,
39904,
4164,
368,
341,
286,
1077,
272,
3009,
284,
80372,
486,
3176,
486,
97768,
486,
3328,
1005,
2243,
4430,
56,
11069,
76,
11069,
67,
1018,
39,
7533,
44,
7533,
50,
1827,
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_step_config() {
let l = default_logger();
// a raft that cannot make progress
let mut r = new_test_raft(1, vec![1, 2], 10, 1, new_storage(), &l);
r.become_candidate();
r.become_leader();
let index = r.raft_log.last_index();
let mut m = new_message(1, 1, MessageType::M... | rust_cleaned_test_functions.jsonl/19145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11946,
5332,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
442,
264,
52455,
429,
4157,
1281,
5098,
198,
262,
1077,
5206,
435,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
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_slow() {
let text = b"gccttaacattattacgccta\0";
let pos_correct = vec![
21, 20, 5, 6, 14, 11, 8, 7, 17, 1, 15, 18, 2, 16, 0, 19, 4, 13, 10, 3, 12, 9,
];
assert_eq!(slow(text), pos_correct);
} | rust_cleaned_test_functions.jsonl/51322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82447,
368,
341,
286,
1077,
1467,
284,
293,
1,
20669,
302,
2565,
580,
1587,
1587,
580,
20669,
77519,
59,
15,
3302,
286,
1077,
1133,
31550,
284,
7486,
90515,
310,
220,
17,
16,
11,
220,
17,
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_undo_char() {
let mut test = setup_new_test();
// test deletes a single mistake
test.on_char(get_wrong_char(test.current_char));
assert_eq!(test.done, 1);
assert_eq!(test.mistakes, 1);
test.undo_char();
assert_eq!(test.done, 0);
as... | rust_cleaned_test_functions.jsonl/27499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98940,
9232,
368,
341,
286,
1077,
5206,
1273,
284,
6505,
5921,
4452,
1428,
286,
442,
1273,
54170,
264,
3175,
16523,
198,
286,
1273,
3488,
9232,
5433,
75198,
9232,
8623,
4952,
9232,
1106,
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... | 2 |
#[test]
fn test_name_auction_length() {
assert_eq!(
get_name_auction_length(&String::from("1.chain")).unwrap(),
29760
);
assert_eq!(
get_name_auction_length(&String::from("12345678.chain")).unwrap(),
14880
);
assert_eq!(
get_name_auction_length(&String... | rust_cleaned_test_functions.jsonl/82846 | {
"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,
1269,
4306,
2654,
5118,
368,
341,
262,
2060,
10714,
33673,
286,
633,
1269,
4306,
2654,
5118,
2099,
703,
486,
1499,
445,
16,
52041,
15197,
15454,
3148,
286,
220,
17,
24,
22,
21,
15,
198,
262,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_truncating_buffer_serializer() {
// Test truncate front.
let body = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
let ser = BufferSerializer::new_vec_truncate(
Buf::new(body.clone(), ..),
TruncateDirection::DiscardFront,
);
... | rust_cleaned_test_functions.jsonl/83356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 628
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
1347,
1095,
7776,
67441,
368,
341,
1789,
286,
442,
3393,
56772,
4065,
624,
23459,
286,
1077,
2487,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_call_with_kwargs() {
let gil = Python::acquire_gil();
let py = gil.python();
let list = vec![3, 6, 5, 4, 7].to_object(py);
let dict = vec![("reverse", true)].into_py_dict(py);
list.call_method(py, "sort", (), Some(dict)).unwrap();
assert_eq!(list.e... | rust_cleaned_test_functions.jsonl/57476 | {
"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,
13429,
6615,
36235,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
1140,
284,
7486,
20703,
18,
11,
220,
21,
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_385() {
assert_eq!(
Solution::deserialize("324".to_string()),
NestedInteger::Int(324)
);
assert_eq!(
Solution::deserialize("[123,[456,[789]]]".to_string()),
NestedInteger::List(vec![
NestedInteger::Int(123),
... | rust_cleaned_test_functions.jsonl/95 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
23,
20,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
66777,
445,
18,
17,
19,
3263,
983,
3904,
14702,
310,
71742,
3486,
486,
1072,
7,
18,
17,
19,
340,
286,
1439,
286,
2060,
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_bad_record_type() {
let mut log = new_record_test();
let test = "foo";
log.write(test);
// the record type is in header[6]
log.increment_byte(6, 100);
log.fix_checksum(0, test.len());
log.read();
} | rust_cleaned_test_functions.jsonl/46689 | {
"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,
34199,
14192,
1819,
368,
341,
286,
1077,
5206,
1487,
284,
501,
14192,
4452,
543,
286,
1077,
1273,
284,
330,
7975,
876,
286,
1487,
3836,
8623,
317,
286,
442,
279,
3255,
943,
374,
304,
4247,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_on() {
let c = MainContext::new();
let mut v = None;
{
let v = &mut v;
let future = futures_util::future::lazy(|_ctx| {
*v = Some(123);
Ok::<i32, ()>(123)
});
let res = c.block_on(fut... | rust_cleaned_test_functions.jsonl/82049 | {
"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,
7113,
4470,
368,
341,
286,
1077,
272,
284,
4697,
1972,
486,
931,
1428,
286,
1077,
5206,
348,
284,
2240,
280,
286,
341,
310,
1077,
348,
284,
609,
6984,
348,
401,
310,
1077,
3853,
284,
36823,
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_vcx_issuer_credential_release() {
init!("true");
let handle = create_default_issuer_credential();
let unknown_handle = handle + 1;
assert_eq!(vcx_issuer_credential_release(unknown_handle), error::INVALID_ISSUER_CREDENTIAL_HANDLE.code_num);
} | rust_cleaned_test_functions.jsonl/66781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
62,
66817,
666,
30320,
24577,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
3705,
284,
1855,
9993,
62,
66817,
666,
30320,
543,
286,
1077,
9788,
10630,
284,
3705,
488,
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_tail() {
let (at, mut ucmd) = testing(UTIL_NAME);
let result = ucmd.args(&["-d", ":", "--complement", "-f", "1", INPUT]).run();
assert_eq!(result.stdout, at.read("lists_tail.expected"));
} | rust_cleaned_test_functions.jsonl/77650 | {
"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,
35471,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
1102,
284,
575,
8710,
16365,
2099,
1183,
12,
67,
497,
330,
12147,
14482,
874,
2764,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_emit_simple_binary_op() {
let program = Program::Binary {
op: OpCode::Add as u8,
left: int(73),
right: int(68)
};
let code = emit(&program);
assert_eq!(interpret(&code), Ok(Term::Integer(141)));
} | rust_cleaned_test_functions.jsonl/24917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
30015,
31761,
10287,
368,
341,
262,
1077,
2025,
284,
6687,
486,
21338,
341,
286,
1179,
25,
97779,
486,
2212,
438,
575,
23,
345,
286,
2115,
25,
526,
7,
22,
18,
1326,
286,
1290,
25,
526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_windows_last() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let c = v.windows(2);
assert_eq!(c.last().unwrap()[1], 5);
let v2: &[i32] = &[0, 1, 2, 3, 4];
let c2 = v2.windows(2);
assert_eq!(c2.last().unwrap()[0], 3);
} | rust_cleaned_test_functions.jsonl/4148 | {
"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,
58220,
12195,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
272,
284,
348,
68113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_unmodified_tree_into_tree_to_blob() -> BitResult<()> {
BitRepo::with_minimal_repo_with_dir(|repo| {
let ours = commit! {
dir < "typechange blob->tree"
};
let theirs = commit! {
dir {
bar < "default bar contents"
... | rust_cleaned_test_functions.jsonl/94176 | {
"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,
20888,
4907,
27162,
11663,
45514,
11663,
2346,
45908,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
6615,
4334,
22428,
23476,
91,
341,
286,
1077,
11350,
284,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bad_kernel_magic() {
let gm = create_guest_mem();
let mut bad_image = make_test_bin();
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
let offset = 0x1;
#[cfg(target_arch = "aarch64")]
let offset = 0x38;
bad_image[offset] = 0x33;
... | rust_cleaned_test_functions.jsonl/88246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
26876,
54612,
368,
341,
286,
1077,
37879,
284,
1855,
62739,
12976,
543,
286,
1077,
5206,
3873,
4954,
284,
1281,
4452,
21816,
543,
286,
11506,
14072,
40268,
8637,
34330,
284,
330,
87,
23,
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... | 1 |
#[test]
fn test_replace_submit_dir() {
let mut program = program_def(
"%{SUBMIT_DIR}",
Some("%{SUBMIT_DIR}/out"),
Some("%{SUBMIT_DIR}/err"),
"/submit-dir",
5,
1,
);
replace_placeholders_worker(&mut program);
... | rust_cleaned_test_functions.jsonl/107297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
31674,
4334,
368,
341,
286,
1077,
5206,
2025,
284,
2025,
7844,
1006,
310,
5962,
90,
29038,
18330,
8291,
24375,
310,
4329,
4430,
90,
29038,
18330,
8291,
4472,
411,
4461,
310,
4329,
4430,
90,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_le_mem() {
let uints = [0, 1, 2, 42, 10_123, 100_123_456, ::u64::MAX];
let mut writer = MemWriter::new();
for i in uints.iter() {
writer.write_le_u64(*i).unwrap();
}
let mut reader = MemReader::new(writer.unwrap());
for i i... | rust_cleaned_test_functions.jsonl/4835 | {
"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,
6443,
9165,
11751,
12976,
368,
341,
286,
1077,
2622,
82,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
19,
17,
11,
220,
16,
15,
62,
16,
17,
18,
11,
220,
16,
15,
15,
62,
16,
17,
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... | 3 |
#[test]
fn test_idempotent() {
let blockman = BlockManager::new();
let a = create_block("A", NULL_BLOCK_IDENTIFIER, 0);
let b = create_block("B", "A", 1);
let c = create_block("C", "B", 1);
let d = create_block("D", "C", 1);
blockman
.put(vec![a.clon... | rust_cleaned_test_functions.jsonl/10256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
842,
3262,
63532,
368,
341,
286,
1077,
2504,
1515,
284,
8362,
2043,
486,
931,
1428,
286,
1077,
264,
284,
1855,
7113,
445,
32,
497,
1770,
18756,
49554,
11,
220,
15,
317,
286,
1077,
293,
284,
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_issuer_handle_credential_init_message_from_initial_state() {
let _setup = TestModeSetup::init();
let mut issuer_sm = _issuer_sm();
issuer_sm = issuer_sm.handle_message(CredentialIssuanceMessage::CredentialInit(mock_connection())).unwrap();
assert... | rust_cleaned_test_functions.jsonl/20324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
66817,
10630,
666,
30320,
6137,
6462,
5673,
15809,
4387,
368,
341,
310,
1077,
716,
15188,
284,
3393,
3636,
21821,
486,
2327,
1428,
310,
1077,
5206,
54835,
15874,
284,
716,
66817,
15874,
543,
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_keep_alive_msg() {
let msg_str = r#"{"timestamp":1568284616.24,"peer":"192.0.2.0","peer_asn":"64496","id":"21-192-0-2-0-53776312","host":"rrc00","type":"KEEPALIVE"}
"#;
let _msg: RisMessage = serde_json::from_str(&msg_str).unwrap();
} | rust_cleaned_test_functions.jsonl/94948 | {
"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,
50293,
58850,
6483,
368,
341,
286,
1077,
3750,
2895,
284,
435,
55543,
4913,
13035,
788,
16,
20,
21,
23,
17,
23,
19,
21,
16,
21,
13,
17,
19,
1335,
16537,
3252,
16,
24,
17,
13,
15,
13,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_ended_flatten() {
let u = [0, 1];
let v = [5, 6, 7, 8];
let mut it = u.iter().map(|x| &v[*x..v.len()]).flatten();
assert_eq!(it.next_back().unwrap(), &8);
assert_eq!(it.next().unwrap(), &5);
assert_eq!(it.next_back().unwrap(), &7);
assert_eq!(it.next_back().unw... | rust_cleaned_test_functions.jsonl/70228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
62,
2883,
5081,
14456,
368,
341,
262,
1077,
575,
284,
508,
15,
11,
220,
16,
935,
262,
1077,
348,
284,
508,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
935,
262,
1077,
5206,
432,
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_header() {
fn t(input: &str, expect: &str) {
let output = format!("{}", Markdown(input));
assert_eq!(output, expect);
reset_ids(true);
}
t("# Foo bar", "\n<h1 id='foo-bar' class='section-header'>\
<a href='#foo-bar'>Foo bar</... | rust_cleaned_test_functions.jsonl/43372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8757,
368,
341,
286,
5168,
259,
5384,
25,
609,
495,
11,
1720,
25,
609,
495,
8,
341,
310,
1077,
2550,
284,
3561,
79878,
73192,
5384,
1106,
310,
2060,
10714,
10297,
3006,
11,
1720,
317,
310,
758... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exit_without_value() {
test_interpreter_and_jit_asm!(
"
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0x0 } },
1
);
} | rust_cleaned_test_functions.jsonl/59004 | {
"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,
16880,
39904,
3142,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
4869,
756,
286,
10239,
286,
84201,
286,
314,
70886,
7338,
11,
592,
25,
5714,
91,
314,
592,
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 |
#[test]
fn test_the_other_thing() {
//Define the function "add"
//Takes are x and y
modfunc!(replace_add,IDC, add(x: u64, y: u64) => u64 {
x + y
});
//verify add works correctly
assert_eq!(add(5,2),7);
//define a function that is not add
fn totally_not_add(x: u64, y: u6... | rust_cleaned_test_functions.jsonl/121111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16068,
30456,
62,
1596,
368,
1476,
262,
442,
35338,
279,
729,
330,
718,
698,
262,
442,
51,
2050,
525,
856,
323,
379,
198,
262,
1463,
2830,
10297,
8156,
2891,
96758,
34,
11,
912,
2075,
25,
575,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account_deserialize() {
let key = Pubkey::new_unique();
let (account1, _account2) = make_two_accounts(&key);
account1.deserialize_data::<String>().unwrap();
} | rust_cleaned_test_functions.jsonl/48199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
15768,
9050,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
320,
4608,
16,
11,
716,
4608,
17,
8,
284,
1281,
23241,
55665,
2099,
792,
317,
286,
2692,
16,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_compute_vote_index_one() {
let keypair = Keypair::new();
let vote = CrdsValue::new_unsigned(CrdsData::Vote(
0,
Vote::new(&keypair.pubkey(), test_tx(), 0),
));
for i in 0..MAX_VOTES {
let votes = vec![&vote];
assert!(... | rust_cleaned_test_functions.jsonl/5327 | {
"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,
57028,
54360,
3560,
11667,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
6910,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
41412,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_t09() {
// Flatten arrays
let (r, sioe) = do_execute!(&["-s", "..\"dna\""], super::IN_DAT_09);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(
buff!(sioe, sout),
"[\"c\",\"a\",\"c\",\"g\",\"t\",\"a\",\"t\"]\n",
);
assert_eq!(... | rust_cleaned_test_functions.jsonl/118364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
15,
24,
368,
341,
286,
442,
85638,
18386,
198,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
12,
82,
497,
32213,
2105,
92877,
2105,
7914,
2256,
486,
687,
3634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eh_frame_hdr_indirect_length() {
let section = Section::with_endian(Endian::Little)
.L8(1)
.L8(0x0b)
.L8(0x83)
.L8(0x0b)
.L32(0x12345)
.L32(2);
let section = section.get_contents().unwrap();
let bases... | rust_cleaned_test_functions.jsonl/9377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
28238,
9122,
1226,
5118,
368,
341,
286,
1077,
3772,
284,
11113,
486,
4197,
87193,
7,
43231,
486,
38103,
340,
310,
659,
43,
23,
7,
16,
340,
310,
659,
43,
23,
7,
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_into_alogithm_id() {
assert_eq!(
Into::<TPM2_ALG_ID>::into(HashingAlgorithm::Sha1),
TPM2_ALG_SHA1
);
assert_eq!(
Into::<TPM2_ALG_ID>::into(HashingAlgorithm::Sha256),
TPM2_ALG_SHA256
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/41501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 675
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
31645,
27638,
4239,
44,
17,
8912,
38,
3450,
6831,
18122,
7,
6370,
287,
27847,
486,
62316,
16,
1326,
310,
63644,
17,
8912,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_broker_app_name_job() {
let _ = env_logger::builder().is_test(true).try_init();
assert_eq!(
"node-instance-name-1-job",
create_broker_app_name("instance.name", Some("node"), true, "1-job")
);
} | rust_cleaned_test_functions.jsonl/1224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
880,
45985,
8191,
1269,
20298,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
17850,
1005,
285,
4452,
3715,
568,
1539,
6137,
1428,
286,
2060,
10714,
33673,
310,
330,
3509,
73655,
11494,
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_aggregate_signatures_1() {
let sign_1 = Bn256.to_compressed_g1(G1::one()).unwrap();
let sign_2 = Bn256.to_compressed_g1(G1::one()).unwrap();
let signatures = [&sign_1[..], &sign_2[..]];
// Aggregation
let agg_signature = Bn256
.aggreg... | rust_cleaned_test_functions.jsonl/65099 | {
"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,
20587,
14240,
11172,
2789,
62,
16,
368,
341,
1789,
286,
1077,
1841,
62,
16,
284,
425,
77,
17,
20,
21,
2389,
2965,
14318,
1889,
16,
6699,
16,
486,
603,
6011,
15454,
543,
286,
1077,
1841,
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_append_block_at_wrong_location() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let mut ledger_db = create_db();
let account_key = AccountKey::random(&mut rng);
// initialize a ledger with 3 blocks.
let n_blocks = 3;
let (blocks, _) = ... | rust_cleaned_test_functions.jsonl/89699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
7113,
3752,
75198,
13126,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
5206,
469... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skewness_with_low_d2() {
let skewness = |x: FisherSnedecor| x.skewness().unwrap();
get_value(0.1, 0.1, skewness);
} | rust_cleaned_test_functions.jsonl/42685 | {
"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,
33811,
365,
2090,
6615,
23767,
814,
17,
368,
341,
286,
1077,
40543,
2090,
284,
760,
87,
25,
35504,
50,
18694,
757,
269,
91,
856,
39454,
365,
2090,
1005,
15454,
543,
286,
633,
3142,
7,
15,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_clear_gif_full() {
assert_borders_full!("clear.gif",
Borders {
top: 0,
right: 0,
bottom: 0,
left: 0,
});
} | rust_cleaned_test_functions.jsonl/48478 | {
"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,
21811,
1889,
333,
16372,
368,
341,
262,
2060,
880,
7917,
16372,
17223,
7422,
16008,
756,
5108,
80712,
341,
6526,
1909,
25,
220,
15,
345,
6526,
1290,
25,
220,
15,
345,
6526,
5622,
25,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_time_coverage() {
let result = parse_time_coverage("2010", "2020", "P0001-00-00").unwrap();
let expected = (
TimeInstance::from(DateTime::new_utc(2010, 1, 1, 0, 0, 0)),
TimeInstance::from(DateTime::new_utc(2021, 1, 1, 0, 0, 0)),
TimeStep ... | rust_cleaned_test_functions.jsonl/121837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
3009,
73384,
368,
341,
286,
1077,
1102,
284,
4715,
3009,
73384,
445,
17,
15,
16,
15,
497,
330,
17,
15,
17,
15,
497,
330,
47,
15,
15,
15,
16,
12,
15,
15,
12,
15,
15,
1827,
15454,
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_csp_real() {
let json = r#"{
"csp-report": {
"document-uri": "https://sentry.io/sentry/csp/issues/88513416/",
"referrer": "https://sentry.io/sentry/sentry/releases/7329107476ff14cfa19cf013acd8ce47781bb93a/",
"violated-directive"... | rust_cleaned_test_functions.jsonl/4019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2154,
15266,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
310,
330,
66,
2154,
47411,
788,
341,
394,
330,
6062,
87232,
788,
330,
2428,
1110,
82,
4085,
4245,
2687,
4085,
2899,
2154,
38745... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_entry_ref() {
let xs = [
("One".to_owned(), 10),
("Two".to_owned(), 20),
("Three".to_owned(), 30),
("Four".to_owned(), 40),
("Five".to_owned(), 50),
("Six".to_owned(), 60),
];
let mut map: HashMap<_,... | rust_cleaned_test_functions.jsonl/26970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 948
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9078,
7793,
368,
341,
286,
1077,
11943,
284,
2278,
310,
3489,
3966,
3263,
983,
51973,
1507,
220,
16,
15,
1326,
310,
3489,
11613,
3263,
983,
51973,
1507,
220,
17,
15,
1326,
310,
3489,
19641,
3263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_arguments_pgo() {
assert_eq!(
CompilerArguments::CannotCache("-fprofile-use", None),
parse_arguments_(
stringvec!["-c", "foo.c", "-fprofile-use", "-o", "foo.o"],
false
)
);
assert_eq!(
C... | rust_cleaned_test_functions.jsonl/17758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
620,
3346,
368,
341,
286,
2060,
10714,
33673,
310,
45631,
19139,
486,
17444,
8233,
13645,
69,
5365,
24673,
497,
2240,
1326,
310,
4715,
43433,
62,
1006,
394,
914,
4083,
0,
1183,
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_collect_stats() {
use engine_test::{kv::KvTestEngine, raft::RaftTestEngine};
use std::sync::Mutex;
use std::time::Instant;
use tikv_util::worker::LazyWorker;
struct RunnerTest {
store_stat: Arc<Mutex<StoreStat>>,
stats_monitor: Sta... | rust_cleaned_test_functions.jsonl/64558 | {
"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,
68140,
15381,
368,
341,
286,
990,
4712,
4452,
22964,
43408,
486,
42,
85,
2271,
4571,
11,
52455,
486,
55535,
723,
2271,
4571,
2440,
286,
990,
1460,
486,
12996,
486,
38099,
280,
286,
990,
1460,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_case_49() {
let key = "bfba2449a607f3cca1c911d3b7d9cb972bcd84b0246189c7820032e031949f1e";
let nonce = "97e8ad5eb5a75cc805900850969de48e";
let expected_output =
"19faebfbb954552fcfbf9b91f271c9397a15c641733c394a9cb731c286c68645";
hcha... | rust_cleaned_test_functions.jsonl/44711 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
19,
24,
368,
341,
310,
1077,
1376,
284,
330,
13233,
4645,
17,
19,
19,
24,
64,
21,
15,
22,
69,
18,
24441,
16,
66,
24,
16,
16,
67,
18,
65,
22,
67,
24,
7221,
24,
22,
17,
91490,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_amounts_to_hr() {
let c = Currency::Btc;
assert_eq!(&c.amount_to_hr_string(1, false), "0.00000001");
assert_eq!(&c.amount_to_hr_string(100, false), "0.00000100");
assert_eq!(&c.amount_to_hr_string(713, false), "0.00000713");
assert_eq!(&c.amount_to_hr_string(100_000, false), "0.0010000... | rust_cleaned_test_functions.jsonl/51423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13471,
82,
2346,
70138,
368,
341,
197,
10217,
272,
284,
28453,
486,
33,
10413,
280,
197,
6948,
10714,
0,
2099,
66,
25276,
2346,
70138,
3904,
7,
16,
11,
895,
701,
330,
15,
13,
15,
15,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unity_mac_os() {
let mut os = OsContext {
raw_description: "Mac OS X 10.16.0".to_string().into(),
..OsContext::default()
};
normalize_os_context(&mut os);
assert_eq_dbg!(Some("macOS"), os.name.as_str());
assert_eq_dbg!(Some("10.16.0"), os.version.as_str());
... | rust_cleaned_test_functions.jsonl/68965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2439,
22802,
29387,
368,
341,
262,
1077,
5206,
2643,
284,
15433,
1972,
341,
286,
7112,
11448,
25,
330,
19552,
10085,
1599,
220,
16,
15,
13,
16,
21,
13,
15,
3263,
983,
3904,
1005,
18122,
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_fmt() {
let cigar = Cigar::from(vec![
Op::new(Kind::Match, 1),
Op::new(Kind::Skip, 13),
Op::new(Kind::SoftClip, 144),
]);
assert_eq!(cigar.to_string(), "1M13N144S");
} | rust_cleaned_test_functions.jsonl/127483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
368,
341,
286,
1077,
53674,
284,
356,
51284,
486,
1499,
25592,
90515,
310,
10672,
486,
931,
7,
10629,
486,
8331,
11,
220,
16,
1326,
310,
10672,
486,
931,
7,
10629,
486,
35134,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simplify_and_false() {
let expr_a = lit(false).and(col("c2"));
let expr_b = col("c2").and(lit(false));
let expected = lit(false);
assert_eq!(simplify(&expr_a), expected);
assert_eq!(simplify(&expr_b), expected);
} | rust_cleaned_test_functions.jsonl/19676 | {
"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,
643,
70206,
8378,
36015,
368,
341,
286,
1077,
15169,
4306,
284,
13020,
3576,
568,
437,
19611,
445,
66,
17,
4010,
286,
1077,
15169,
880,
284,
1375,
445,
66,
17,
1827,
437,
2333,
275,
3576,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_regex_sources() -> Result<(), Box<dyn Error>> {
ore::log::init();
let temp_dir = tempfile::tempdir()?;
let config = util::Config::default();
let (_server, mut client) = util::start_server(config)?;
let regex_path = Path::join(temp_dir.path(), "request.log");
fs::write(... | rust_cleaned_test_functions.jsonl/123703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41832,
52896,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
16144,
486,
839,
486,
2327,
1428,
262,
1077,
2730,
4334,
284,
54819,
486,
3888,
3741,
94136,
262,
1077,
2193,
284,
4094,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_unix_stream_timeout_zero_duration() {
let dir = tmpdir();
let socket_path = dir.path().join("sock");
let listener = or_panic!(UnixListener::bind(&socket_path));
let stream = or_panic!(UnixStream::connect(&socket_path));
let result = stream.set_write_time... | rust_cleaned_test_functions.jsonl/98541 | {
"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,
80572,
12673,
20537,
19359,
25454,
368,
341,
286,
1077,
5419,
284,
4174,
3741,
543,
286,
1077,
7575,
2638,
284,
5419,
3875,
1005,
5987,
445,
13199,
3071,
286,
1077,
11446,
284,
476,
620,
31270,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_rev_cloned_collect() {
let data = vec![5, 9, 3];
let iterout = vec![3, 5, 9];
let pq = BinaryHeap::from(data);
let v: Vec<_> = pq.iter().rev().cloned().collect();
assert_eq!(v, iterout);
} | rust_cleaned_test_functions.jsonl/62349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
38082,
6794,
19684,
68140,
368,
341,
262,
1077,
821,
284,
7486,
20703,
20,
11,
220,
24,
11,
220,
18,
935,
262,
1077,
5367,
411,
284,
7486,
20703,
18,
11,
220,
20,
11,
220,
24,
935,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_accounts_cow() {
let mut rng = rand::thread_rng();
let mut accounts = new_rand_vote_accounts(&mut rng, 64);
// Add vote accounts.
let mut vote_accounts = VoteAccounts::default();
for (pubkey, (stake, vote_account)) in (&mut accounts).take(1024) {
... | rust_cleaned_test_functions.jsonl/23439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 666
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
55665,
666,
363,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
5206,
9618,
284,
501,
33864,
54360,
55665,
2099,
6984,
28422,
11,
220,
21,
19,
317,
286,
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... | 4 |
#[test]
fn test_vec() {
let supported = SupportedAlgorithms::all();
let array: Vec<u8> = (&supported).into();
let decoded: SupportedAlgorithms = (&array as &[_]).into();
assert_eq!(supported, decoded);
let mut supported = SupportedAlgorithms::new();
supported.set(Algorithm::RSASHA256);... | rust_cleaned_test_functions.jsonl/47075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
368,
341,
262,
1077,
7248,
284,
48980,
2101,
18980,
486,
541,
543,
262,
1077,
1334,
25,
11312,
34837,
23,
29,
284,
15899,
18216,
568,
18122,
543,
262,
1077,
29213,
25,
48980,
2101,
18980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_ConstrainedEntss() {
let mut schemaReplicant = SchemaReplicant::default();
associate_causetId(&mut schemaReplicant, Keyword::namespaced("foo", "bar"), 99);
add_attribute(&mut schemaReplicant, 99, Attribute {
value_type: MinkowskiValueType::Boolean,
... | rust_cleaned_test_functions.jsonl/32593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 962
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
15100,
57727,
2250,
778,
368,
341,
286,
1077,
5206,
10802,
18327,
35237,
284,
12539,
18327,
35237,
486,
2258,
1428,
286,
21946,
666,
11855,
295,
764,
2099,
6984,
10802,
18327,
35237,
11,
48970... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_network_home_generate_key_file() {
let dir = tempdir().unwrap();
fs::create_dir_all(dir.path().join("localhost/accounts/latest")).unwrap();
let network_home = NetworkHome::new(dir.path().join("localhost").as_path());
network_home.generate_key_file().unwrap();
... | rust_cleaned_test_functions.jsonl/39526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
21653,
48851,
3097,
2458,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
8619,
486,
3182,
4334,
5705,
14161,
3875,
1005,
5987,
445,
8301,
83743,
33149,
15197,
15454,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recordbatch_iterator() {
let df = df!(
"foo" => &[1, 2, 3, 4, 5]
)
.unwrap();
let mut iter = df.iter_record_batches();
assert_eq!(5, iter.next().unwrap().num_rows());
assert!(iter.next().is_none());
} | rust_cleaned_test_functions.jsonl/18787 | {
"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,
14192,
14049,
13491,
368,
341,
286,
1077,
6764,
284,
6764,
33673,
310,
330,
7975,
1,
589,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
921,
286,
1727,
286,
659,
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_verifying_key_path() {
for rsp in ®ISTERED_SEAL_PROOFS {
rsp.cache_verifying_key_path()
.expect("failed to get verifying key path");
}
} | rust_cleaned_test_functions.jsonl/88714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26042,
7766,
3097,
2638,
368,
341,
286,
369,
42160,
304,
609,
46302,
1479,
3620,
969,
5756,
46,
8485,
341,
310,
42160,
20087,
26042,
7766,
3097,
2638,
741,
394,
659,
17119,
445,
16091,
311,
633,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_statsd_client_as_gauged_f64() {
let client: Box<dyn Gauged<f64>> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.gauge("some.gauge", 3.2).unwrap();
} | rust_cleaned_test_functions.jsonl/10618 | {
"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,
15381,
67,
8179,
11898,
1889,
19179,
291,
761,
21,
19,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
18373,
768,
291,
63895,
21,
19,
2452,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
515... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_auth() {
let mut headers = Headers::new();
headers.set(Authorization("foo bar baz".to_owned()));
assert_eq!(headers.to_string(), "Authorization: foo bar baz\r\n".to_owned());
} | rust_cleaned_test_functions.jsonl/31561 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
14014,
368,
341,
286,
1077,
5206,
7102,
284,
21426,
486,
931,
543,
286,
7102,
980,
4346,
1553,
2022,
445,
7975,
3619,
50247,
3263,
983,
51973,
7392,
286,
2060,
10714,
10297,
7713,
2389,
390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_new_record() {
let mut collection = setup_collection();
collection.create().unwrap();
let record = collection.new_record();
assert_eq!(record.data, None);
assert_eq!(record.get_id(), None);
} | rust_cleaned_test_functions.jsonl/63503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
14192,
368,
341,
286,
1077,
5206,
4426,
284,
6505,
25019,
543,
286,
4426,
2520,
1005,
15454,
543,
286,
1077,
3255,
284,
4426,
4618,
14192,
543,
286,
2060,
10714,
10297,
8548,
2196,
11,
2240,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_usage_description_newline_handling() {
let mut opts = Options::new();
opts.optflag(
"k",
"k\u{2013}w\u{2013}",
"The word kiwi is normally spelled with two i's",
);
opts.optflag(
"a",
"apple",
"This description forces a new line.\n H... | rust_cleaned_test_functions.jsonl/52393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31507,
11448,
5921,
1056,
75642,
368,
341,
262,
1077,
5206,
12185,
284,
14566,
486,
931,
543,
262,
12185,
28102,
9903,
1006,
286,
330,
74,
756,
286,
330,
74,
3770,
90,
17,
15,
16,
18,
92,
86,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prune_out_of_bounds() {
let blockstore_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&blockstore_path).unwrap();
blockstore.prune(5);
drop(blockstore);
Blockstore::destroy(&blockstore_path).expect("Expected successful database... | rust_cleaned_test_functions.jsonl/94030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
2886,
6068,
3575,
36878,
368,
341,
286,
1077,
2504,
4314,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
4574,
4314,
2638,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast_range_i8_max() {
assert_eq!(i8::max_value.to_int(), Some(i8::max_value as int));
assert_eq!(i8::max_value.to_i8(), Some(i8::max_value as i8));
assert_eq!(i8::max_value.to_i16(), Some(i8::max_value as i16));
assert_eq!(i8::max_value.to_i32(), Some(i8::max... | rust_cleaned_test_functions.jsonl/12451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9698,
5318,
23,
6345,
368,
341,
286,
2060,
10714,
10297,
72,
23,
486,
2810,
3142,
2389,
4042,
1507,
220,
4329,
1956,
23,
486,
2810,
3142,
438,
526,
1106,
286,
2060,
10714,
10297,
72,
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_value_arc() {
assert_ne!(crate::Type::INVALID, MySharedArc::type_());
let b = MySharedArc::from_refcounted(std::sync::Arc::new(MySharedInner {
foo: String::from("abc"),
}));
let v = b.to_value();
let b2 = v.get_some::<MySharedArc>().unwrap();
... | rust_cleaned_test_functions.jsonl/49617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
62914,
368,
341,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
36809,
486,
1313,
62,
5231,
286,
1077,
293,
284,
3017,
16997,
36809,
486,
1499,
7793,
1830,
291,
5194,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trusted_insert_shreds() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
// Make shred for slot 1
let (shreds1, _) = make_slot_entries(1, 0, 1);
let last_root = 100;
blockstor... | rust_cleaned_test_functions.jsonl/9555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
27145,
17678,
3712,
53369,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
7,
50704,
2638,
3875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_btree_ranges_complex() {
let index_schema = IndexSchema::new(vec![
FieldSpec::new(vec![String::from("a")], Value::Int32(0)),
FieldSpec::new(vec![String::from("b")], Value::Int32(0)),
FieldSpec::new(vec![String::from("c")], Value::Int32(0)),
... | rust_cleaned_test_functions.jsonl/71775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
880,
9344,
58748,
41522,
368,
341,
286,
1077,
1922,
25371,
284,
8008,
8632,
486,
931,
25592,
90515,
310,
8601,
8327,
486,
931,
25592,
20703,
703,
486,
1499,
445,
64,
899,
1125,
5162,
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_load_int_const() {
let mut masm = MacroAssembler::new();
masm.load_int_const(Int32, R0, 0);
assert_emit!(0x52800000; masm);
let mut masm = MacroAssembler::new();
masm.load_int_const(Int32, R0, 0xFFFF);
assert_emit!(0x529FFFE0; masm);
let ... | rust_cleaned_test_functions.jsonl/20612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
4042,
13610,
368,
341,
286,
1077,
5206,
9243,
76,
284,
53317,
77858,
486,
931,
543,
286,
9243,
76,
5104,
4042,
13610,
24123,
18,
17,
11,
431,
15,
11,
220,
15,
317,
286,
2060,
69082,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_syntax() {
let nonempty = NonEmpty::from((0, vec![1, 2, 3]));
for n in &nonempty {
assert_eq!(*n, *n); // Prove that we're dealing with references.
}
for _ in nonempty {}
} | rust_cleaned_test_functions.jsonl/17875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
78894,
368,
341,
286,
1077,
2477,
3194,
284,
11581,
3522,
486,
1499,
1188,
15,
11,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
14382,
286,
369,
308,
304,
609,
6280,
3194,
341,
310,
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 |
#[test]
fn test_get_vertex_bytes() {
let vertices = &[
([0., 0., 0.], [1., 1., 1.], [2., 2.]),
([3., 3., 3.], [4., 4., 4.], [5., 5.]),
([6., 6., 6.], [7., 7., 7.], [8., 8.]),
];
let mut positions = Vec::new();
let mut normals = Vec::new();
... | rust_cleaned_test_functions.jsonl/54644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 919
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
26611,
12524,
368,
341,
286,
1077,
17228,
284,
609,
9640,
310,
11743,
15,
2572,
220,
15,
2572,
220,
15,
13,
1125,
508,
16,
2572,
220,
16,
2572,
220,
16,
13,
1125,
508,
17,
2572,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_enum_no_reader_schema() {
let writer_raw_schema = r#"
{
"type": "record",
"name": "test",
"fields": [
{"name": "a", "type": "long", "default": 42},
{"name": "b", "type": "string"},
... | rust_cleaned_test_functions.jsonl/77303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 887
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
6536,
22306,
25371,
368,
341,
286,
1077,
6916,
16067,
25371,
284,
435,
2,
698,
310,
341,
394,
330,
1313,
788,
330,
8548,
756,
394,
330,
606,
788,
330,
1944,
756,
394,
330,
9007,
788,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timeout() -> io::Result<()> {
let mut events = Events::new();
let mut sources = Sources::new();
sources.register((), &io::stdin(), interest::READ);
let err = sources
.wait_timeout(&mut events, Duration::from_millis(1))
.unwrap_err();
... | rust_cleaned_test_functions.jsonl/1041 | {
"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,
20537,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
4357,
284,
17627,
486,
931,
543,
286,
1077,
5206,
8173,
284,
47032,
486,
931,
1428,
286,
8173,
9929,
7,
1507,
609,
815,
486,
51602... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_image_buffer_copy_within_oob() {
let mut image: GrayImage = ImageBuffer::from_raw(4, 4, vec![0u8; 16]).unwrap();
assert!(!image.copy_within(Rect { x: 0, y: 0, width: 5, height: 4 }, 0, 0));
assert!(!image.copy_within(Rect { x: 0, y: 0, width: 4, height: 5 }, 0, 0));
... | rust_cleaned_test_functions.jsonl/25548 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
7776,
16096,
72385,
14179,
674,
368,
341,
286,
1077,
5206,
2168,
25,
23366,
1906,
284,
4654,
4095,
486,
1499,
16067,
7,
19,
11,
220,
19,
11,
7486,
20703,
15,
84,
23,
26,
220,
16,
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,
1... | 1 |
#[test]
fn test_pop() {
let mut data = String::from("ประเทศไทย中华b¢€𤭢");
assert_eq!(data.pop().unwrap(), '𤭢'); // 4 bytes
assert_eq!(data.ap(), '€'); // 3 bytes
assert_eq!(data.po(), '¢'); // 2 bytes
assert_eq!(data.pop), 'b'); // 1 bytes
assert_eq!(data.pop), '华');
assert_eq!(data,... | rust_cleaned_test_functions.jsonl/3167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
368,
341,
262,
1077,
5206,
821,
284,
923,
486,
1499,
445,
130391,
100849,
65,
56394,
15056,
101877,
255,
95,
797,
262,
2060,
10714,
10297,
691,
8288,
1005,
15454,
1507,
364,
101877,
255,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chromatic_scale_with_sharps() {
process_chromatic_case(
"C",
&[
"C", "C#", "D", "D#", "E", "F", "F#", "G", "G#", "A", "A#", "B",
],
);
} | rust_cleaned_test_functions.jsonl/103939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
98766,
16727,
6615,
3712,
277,
1690,
368,
341,
262,
1882,
4138,
98766,
19096,
1006,
286,
330,
34,
756,
286,
609,
9640,
310,
330,
34,
497,
330,
34,
75915,
330,
35,
497,
330,
35,
75915,
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_full_jitter_backoff() {
let mut backoff = FullJitterBackoff::new(2, 7, 3);
assert!(backoff.next_delay_duration().unwrap() <= Duration::from_millis(2));
assert!(backoff.next_delay_duration().unwrap() <= Duration::from_millis(4));
assert!(backoff.next_delay_duration... | rust_cleaned_test_functions.jsonl/16664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
5374,
3248,
3895,
1847,
368,
341,
286,
1077,
5206,
1182,
1847,
284,
8627,
41,
3248,
3707,
1847,
486,
931,
7,
17,
11,
220,
22,
11,
220,
18,
317,
286,
2060,
10297,
1419,
1847,
4529,
22198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_features() {
let p = project("foo")
.file("Cargo.toml", r#"
[project]
name = "foo"
version = "0.0.1"
authors = []
[features]
default = ["a"]
a = []
[[test]]
name = "f... | rust_cleaned_test_functions.jsonl/93339 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 796
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
14965,
368,
341,
262,
1077,
281,
284,
2390,
445,
7975,
1138,
286,
659,
1192,
445,
98228,
73494,
75,
497,
435,
2,
698,
310,
508,
4987,
921,
310,
829,
284,
330,
7975,
698,
310,
2319,
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_at_signs_file_not_readable() {
let td = tempfile::Builder::new()
.prefix("sccache")
.tempdir()
.unwrap();
let arg = format!("-@{}", td.path().join("foo").display());
// File foo doesn't exist.
assert_eq!(
parse_argum... | rust_cleaned_test_functions.jsonl/18539 | {
"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,
3752,
11172,
82,
2458,
7913,
91232,
368,
341,
286,
1077,
17941,
284,
54819,
486,
3297,
486,
931,
741,
310,
659,
11849,
445,
82,
638,
1777,
1138,
310,
659,
3888,
3741,
741,
310,
659,
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_rlp_nested_empty_list_encode() {
let mut stream = RlpStream::new_list(2);
stream.append_list(&(Vec::new() as Vec<u32>));
stream.append(&0x28_u32);
assert_eq!(stream.out()[..], hex!("c2c028")[..]);
} | rust_cleaned_test_functions.jsonl/74208 | {
"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,
1710,
13545,
66279,
15124,
2019,
11224,
368,
341,
10217,
5206,
4269,
284,
431,
13545,
3027,
486,
931,
2019,
7,
17,
317,
44440,
2057,
2019,
29089,
10050,
486,
931,
368,
438,
11312,
34837,
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 |
#[test]
fn test_ancestor_iterator_with_hash() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = setup_forks(ledger_path.path());
// Insert frozen hashes
let mut slot_to_bank_hash = HashMap::new();
for slot in 0..=4 {
let bank_hash = Has... | rust_cleaned_test_functions.jsonl/122485 | {
"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,
62,
66878,
13491,
6615,
8950,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
6505,
761,
73302,
7,
50704,
2638,
3875,
5231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_packages() {
let p = project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
authors = []
[dependencies.d1]
path = "d1"
[dependencies.d2]
... | rust_cleaned_test_functions.jsonl/95366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
41874,
368,
341,
262,
1077,
281,
284,
2390,
741,
286,
659,
1192,
1006,
310,
330,
98228,
73494,
75,
756,
310,
435,
2,
698,
310,
508,
1722,
921,
310,
829,
284,
330,
7975,
698,
310,
2319,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_real_as_json() {
test_none_with_ctx(cast_any_as_json::<Real>);
let cs = vec![
(
f64::from(f32::MAX),
Json::from_f64(f64::from(f32::MAX)).unwrap(),
),
(
f64::from(f32::MIN),
Json::... | rust_cleaned_test_functions.jsonl/2000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
11898,
9455,
368,
341,
286,
1273,
31488,
6615,
15147,
1337,
559,
37248,
11898,
9455,
27638,
12768,
29,
626,
286,
1077,
10532,
284,
7486,
90515,
310,
2399,
394,
282,
21,
19,
486,
1499,
955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_count() {
let rocket = super::rocket();
// Count should start at 0.
assert_eq!(get_count(&rocket), 0);
for _ in 0..99 { register_hit(&rocket); }
assert_eq!(get_count(&rocket), 99);
register_hit(&rocket);
assert_eq!(get_count(&rocket), 100);
} | rust_cleaned_test_functions.jsonl/9217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3180,
368,
341,
262,
1077,
24306,
284,
2256,
486,
46790,
1428,
262,
442,
4504,
1265,
1191,
518,
220,
15,
624,
262,
2060,
10714,
10297,
455,
3180,
2099,
46790,
701,
220,
15,
626,
262,
369,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_9() {
assert_eq!(
parse_column_type(&mut Parser::new("smallint(8) unsigned zerofill")),
ColumnType::SmallInt(NumericAttr {
maximum: Some(8),
decimal: None,
unsigned: Some(true),
zero_fill: Some(true),... | rust_cleaned_test_functions.jsonl/73838 | {
"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,
62,
24,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
8744,
1819,
2099,
6984,
21102,
486,
931,
445,
9004,
396,
7,
23,
8,
3774,
76178,
1055,
483,
30154,
310,
9332,
929,
486,
25307,
1072,
8204,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_range_covered() {
let meta = vec![(b"b", b"d"), (b"d", b"e"), (b"e", b"f"), (b"f", b"h")];
let mut region_ranges = BTreeMap::new();
let mut region_peers = HashMap::new();
{
for (i, (start, end)) in meta.into_iter().enumerate() {
let... | rust_cleaned_test_functions.jsonl/86484 | {
"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,
6892,
9698,
38087,
291,
368,
341,
286,
1077,
8823,
284,
7486,
0,
9697,
65,
1,
65,
497,
293,
44917,
3975,
320,
65,
44917,
497,
293,
1,
68,
3975,
320,
65,
1,
68,
497,
293,
96171,
3975,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_long() {
match Variant::VInteger(42).plus(Variant::VLong(2)).unwrap() {
Variant::VLong(result) => assert_eq!(result, 44),
_ => panic!("assertion failed"),
}
} | rust_cleaned_test_functions.jsonl/84547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
368,
341,
394,
2432,
39292,
486,
53,
3486,
7,
19,
17,
568,
7138,
12410,
15341,
486,
53,
6583,
7,
17,
4579,
15454,
368,
341,
503,
39292,
486,
53,
6583,
4456,
8,
589,
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
] | 2 |
#[test]
fn test_ensure_on_channel_followed_by_scheduled_scan() {
let exec = fasync::TestExecutor::new().expect("failed to create an executor");
let mut m = MockObjects::new(&exec);
let mut me = m.make_mlme();
me.make_client_station();
let mut client = me.get_bound_client(... | rust_cleaned_test_functions.jsonl/32101 | {
"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,
62,
27289,
4470,
14571,
43490,
291,
3710,
643,
26644,
28857,
368,
341,
286,
1077,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
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... | 1 |
#[test]
fn test_hover_self_has_impl_action() {
check_actions(
r#"struct foo where Self$0:;"#,
expect![[r#"
[
Implementation(
FilePosition {
file_id: FileId(
0,
... | rust_cleaned_test_functions.jsonl/66667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
25637,
21778,
21007,
7931,
368,
341,
286,
1779,
25368,
1006,
310,
435,
55543,
1235,
15229,
1380,
10115,
3,
15,
62973,
2,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
2278,
503,
30813,
1006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_character_renderer() -> SimpleResult<()> {
let data = b"\x41\x10\x09".to_vec();
let offset = Offset::Dynamic(Context::new(&data));
let a = H2String::new(3, CharacterReader::ASCII, CharacterFormatter::pretty_str_character())?;
assert_eq!("\"A\\x10\\t\"", a.to_disp... | rust_cleaned_test_functions.jsonl/102197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40988,
52345,
368,
1464,
8993,
2077,
71698,
341,
286,
1077,
821,
284,
293,
11934,
87,
19,
16,
3462,
16,
15,
3462,
15,
24,
3263,
983,
13251,
543,
286,
1077,
4347,
284,
16861,
486,
21752,
14001,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_server_continues_on_bad_data_udp() {
named_test_harness("example.toml", |port, _, _| {
let mut io_loop = Runtime::new().unwrap();
let addr: SocketAddr = SocketAddr::new(Ipv4Addr::new(127, 0, 0, 1).into(), port);
let stream = UdpClientStream::<TokioUdpSocket>::new(addr... | rust_cleaned_test_functions.jsonl/75217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12015,
68948,
1137,
4470,
34199,
1769,
69432,
368,
341,
262,
6941,
4452,
1523,
23518,
445,
8687,
73494,
75,
497,
760,
403,
11,
8358,
85137,
341,
286,
1077,
5206,
6399,
17198,
284,
10954,
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_doc_comment() {
assert_eq!(lex("/// \n"), (Token::DocComment, 4));
assert_eq!(lex("///hello\n"), (Token::DocComment, 8));
assert_eq!(lex("/// hello\n"), (Token::DocComment, 9));
} | rust_cleaned_test_functions.jsonl/80515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
17638,
368,
341,
286,
2060,
10714,
10297,
2571,
445,
2575,
1124,
77,
3975,
320,
3323,
486,
9550,
10677,
11,
220,
19,
1106,
286,
2060,
10714,
10297,
2571,
445,
2575,
14990,
1699,
3975,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_elf() {
test_interpreter_and_jit_elf!(
"tests/elfs/noop.so",
[],
(
b"log" => syscalls::BpfSyscallString::call; syscalls::BpfSyscallString {},
b"log_64" => syscalls::BpfSyscallU64::call; syscalls::BpfSyscallU64 {},
),
{ |_vm... | rust_cleaned_test_functions.jsonl/59053 | {
"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,
12411,
62,
490,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
62,
490,
33673,
286,
330,
23841,
14,
490,
82,
33100,
453,
26476,
756,
286,
10239,
286,
2399,
310,
293,
47012,
1,
589,
5708,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multidimensional_array() {
let datums = vec![
Datum::Int32(1),
Datum::Int32(2),
Datum::Int32(3),
Datum::Int32(4),
Datum::Int32(5),
Datum::Int32(6),
Datum::Int32(7),
Datum::Int32(8),
];... | rust_cleaned_test_functions.jsonl/56496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 622
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
307,
28221,
3858,
368,
341,
286,
1077,
3258,
6237,
284,
7486,
90515,
310,
68459,
486,
1072,
18,
17,
7,
16,
1326,
310,
68459,
486,
1072,
18,
17,
7,
17,
1326,
310,
68459,
486,
1072,
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_empty_has_no_sigs() {
let sig = Signature::default();
let blockhash = hash(Hash::default().as_ref());
let status_cache = BankStatusCache::default();
assert_eq!(
status_cache.get_signature_status(&sig, &blockhash, &HashMap::new()),
None
... | rust_cleaned_test_functions.jsonl/82705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
21778,
6536,
643,
14462,
368,
341,
286,
1077,
8366,
284,
32232,
486,
2258,
543,
286,
1077,
2504,
8296,
284,
5175,
7,
6370,
486,
2258,
1005,
300,
7793,
1423,
286,
1077,
2639,
11529,
284,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_du_threshold() {
let scene = TestScenario::new(util_name!());
let threshold = if cfg!(windows) { "7K" } else { "10K" };
scene
.ucmd()
.arg(format!("--threshold={}", threshold))
.succeeds()
.stdout_contains("links")
.stdout_does_not_contain("d... | rust_cleaned_test_functions.jsonl/23741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
84,
21858,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
5231,
262,
1077,
12171,
284,
421,
13286,
10297,
27077,
8,
314,
330,
22,
42,
1,
335,
770,
314,
330,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_query_matches_with_multiple_on_same_root() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
"(class_declaration
name: (identifier) @the-class-name
(class_body
... | rust_cleaned_test_functions.jsonl/25147 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 810
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
45233,
4470,
33574,
12993,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
4128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_static_provider_custom_time_expiration() {
let start_time = Utc::now();
let result = StaticProvider::new(
"fake-key".to_owned(),
"fake-secret".to_owned(),
None,
Some(10000),
)
.credentials()
.wait();
... | rust_cleaned_test_functions.jsonl/83675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
29518,
15875,
3009,
2702,
28479,
368,
341,
286,
1077,
1191,
3009,
284,
547,
10413,
486,
3328,
543,
286,
1077,
1102,
284,
23105,
5179,
486,
931,
1006,
310,
330,
30570,
16173,
3263,
983,
5197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part_b() {
let xss = read_input(InputType::Sample);
for xs in &xss {
println!("{:?}", xs);
}
assert_eq!(1134, part_b(&xss));
} | rust_cleaned_test_functions.jsonl/13194 | {
"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,
10495,
880,
368,
341,
286,
1077,
856,
778,
284,
1349,
5898,
29773,
929,
486,
17571,
317,
286,
369,
11943,
304,
609,
87,
778,
341,
310,
13751,
88928,
25,
52652,
11943,
317,
286,
555,
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
] | 2 |
#[test]
fn test_a_big_bitmap() {
let mut bitmap: Bitmap = (1..1_000_000).collect();
let serialized_buffer = bitmap.serialize();
assert_eq!(serialized_buffer.len(), 131_208);
assert!(bitmap.run_optimize());
let serialized_buffer = bitmap.serialize();
assert_eq!(serialized_buffer.len(), 230);
} | rust_cleaned_test_functions.jsonl/103104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
36386,
41527,
368,
341,
10217,
5206,
19746,
25,
17533,
284,
320,
16,
496,
16,
62,
15,
15,
15,
62,
15,
15,
15,
568,
17384,
543,
10217,
32916,
7776,
284,
19746,
33969,
1428,
11120,
6948,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next_sequence_send_fail() {
let port_channel = (PortId::default(), ChannelId::new(0));
let context: Context<Test> = Context::new();
new_test_ext().execute_with(|| {
let result = context.get_next_sequence_send(&port_channel.clone()).unwrap_err().to_string();
assert_eq!(result, ICS04Error:... | rust_cleaned_test_functions.jsonl/60073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
23735,
13565,
22121,
368,
341,
10217,
2635,
14571,
284,
320,
7084,
764,
486,
2258,
1507,
13434,
764,
486,
931,
7,
15,
1106,
10217,
2266,
25,
9608,
71273,
29,
284,
9608,
486,
931,
1428,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_remove_derive_attrs() {
let tt = mbe::parse_to_token_tree(
r#"
#[allow(unused)]
#[derive(Copy)]
#[derive(Hello)]
struct A {
bar: u32
}
"#,
)
.unwrap()
.0;
let result = format!("{:#?}", remove_derive_attrs(&tt).unwrap... | rust_cleaned_test_functions.jsonl/90737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
35345,
533,
39578,
368,
341,
286,
1077,
17853,
284,
296,
1371,
486,
6400,
2346,
6458,
11663,
1006,
310,
435,
2,
698,
262,
11506,
7183,
18364,
2591,
5563,
262,
11506,
27098,
3025,
1266,
5563... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hash_chain() {
let mut blockchain = Blockchain::new();
blockchain.set_check_trans(false);
let genesis_hash = blockchain.tip();
let block1 = generate_random_block(&genesis_hash);
let block2 = generate_random_block(&block1.hash);
let block3 = gen... | rust_cleaned_test_functions.jsonl/61921 | {
"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,
3062,
8950,
30583,
368,
341,
286,
1077,
5206,
17944,
284,
42885,
486,
931,
543,
286,
17944,
980,
7200,
7965,
3576,
317,
286,
1077,
59366,
8950,
284,
17944,
78044,
543,
286,
1077,
2504,
16,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_introduce_var_return() {
check_assist_range(
introduce_variable,
"
fn foo() -> u32 {
<|>return 2 + 2<|>;
}
",
"
fn foo() -> u32 {
let <|>var_name = 2 + 2;
return var_name;
}
",
);
} | rust_cleaned_test_functions.jsonl/5718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
47845,
4612,
12511,
368,
341,
286,
1779,
12083,
380,
9698,
1006,
310,
19131,
14635,
345,
310,
6228,
8822,
15229,
368,
1464,
575,
18,
17,
341,
262,
82639,
29,
689,
220,
17,
488,
220,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.