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_struct_config_std140() {
assert_eq!(std::mem::size_of::<ConfigStd140>(), 16);
assert_eq!(std::mem::size_of::<u32>(), 4);
assert_eq!(std::mem::align_of::<u32>(), 4);
assert_eq!(memoffset::offset_of!(ConfigStd140, image_width), 0);
assert_eq!(std::mem::size_... | rust_cleaned_test_functions.jsonl/13697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
5332,
15656,
16,
19,
15,
368,
341,
286,
2060,
10714,
10297,
1834,
486,
10536,
486,
2141,
3575,
27638,
2648,
22748,
16,
19,
15,
39019,
220,
16,
21,
317,
286,
2060,
10714,
10297,
1834,
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_admin_direct_message() {
let mut transport = InprocTransport::default();
let mut inproc_listener = transport.listen("internal").unwrap();
let mesh = Mesh::new(512, 128);
let mesh_sender = mesh.get_sender();
let (tx, rx) = channel();
let jh = thre... | rust_cleaned_test_functions.jsonl/127040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12207,
32871,
6462,
368,
341,
286,
1077,
5206,
7557,
284,
758,
15782,
27560,
486,
2258,
543,
286,
1077,
5206,
304,
15782,
46493,
284,
7557,
22628,
445,
10481,
1827,
15454,
1428,
286,
1077,
11294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_jobs_are_empty_after_runner_starts() {
let some_job = SomeJob;
let another_job = AnotherJob;
let runner = Runner::new()
.add(Box::new(some_job))
.add(Box::new(another_job))
.run();
assert_eq!(runner.jobs_to_run(), 0);
} | rust_cleaned_test_functions.jsonl/45096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37247,
56855,
15124,
19844,
54828,
86552,
368,
341,
286,
1077,
1045,
20298,
284,
4329,
12245,
280,
286,
1077,
2441,
20298,
284,
13293,
12245,
401,
286,
1077,
22259,
284,
44946,
486,
931,
741,
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_assign_to_sysvar_with_feature() {
let mut transaction_context = TransactionContext::new(Vec::new(), 1);
let invoke_context = InvokeContext::new_mock(&mut transaction_context, &[]);
let new_owner = sysvar::id();
let from = Pubkey::new_unique();
let mut from... | rust_cleaned_test_functions.jsonl/106200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
2346,
20344,
947,
6615,
17069,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
17869,
1972,
486,
931,
49923,
486,
931,
1507,
220,
16,
317,
286,
1077,
19873,
8467,
284,
39667,
1972,
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_write_i32_vec_to_writer() {
let mut cursor = Cursor::new(vec![]);
let position = cursor.position() as usize;
DictionaryBuilder::write_i32_vec_to_writer(&mut cursor, vec![]).unwrap();
assert_eq!(0, cursor.get_ref()[position]);
DictionaryBuilder::write_i32_vec_to_writer(&mut c... | rust_cleaned_test_functions.jsonl/134080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
5318,
18,
17,
13251,
2346,
28908,
368,
341,
262,
1077,
5206,
8128,
284,
28067,
486,
931,
25592,
0,
1294,
626,
262,
1077,
2309,
284,
8128,
6187,
368,
438,
22301,
280,
262,
10466,
3297,
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_writeln() {
let mut s = vec![];
let foo = 123;
interpol::writeln!(&mut s, "{foo}").unwrap();
assert_eq!(String::from_utf8(s).unwrap(), "123\n");
} | rust_cleaned_test_functions.jsonl/80890 | {
"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,
1670,
51097,
368,
341,
262,
1077,
5206,
274,
284,
7486,
0,
40901,
262,
1077,
15229,
284,
220,
16,
17,
18,
280,
262,
22876,
486,
93456,
0,
2099,
6984,
274,
11,
13868,
7975,
92,
1827,
15454,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_signal_flow() {
let mut graph: RouteGraph<S, R> = RouteGraphBuilder::new().with_buffer_size(32).build();
let output = graph.add_node_with_idx(|id| {
Node::with_id(
id,
1,
Box::new(OutputRoute {
outpu... | rust_cleaned_test_functions.jsonl/72323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 953
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21137,
27441,
368,
341,
286,
1077,
5206,
4771,
25,
9572,
11212,
18858,
11,
431,
29,
284,
9572,
11212,
3297,
486,
931,
1005,
4197,
7776,
2368,
7,
18,
17,
568,
5834,
1428,
286,
1077,
2550,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_267_regression() {
// Checks that skip_field will error appropriately when given a big stack of StartGroup
// https://github.com/danburkert/prost/issues/267
let buf = vec![b'C'; 1 << 20];
<() as Message>::decode(&buf[..]).err().unwrap();
} | rust_cleaned_test_functions.jsonl/8858 | {
"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,
62,
17,
21,
22,
91144,
368,
341,
286,
442,
24843,
429,
10706,
5013,
686,
1465,
34901,
979,
2661,
264,
2409,
5611,
315,
5145,
2808,
79133,
286,
442,
3703,
1110,
5204,
905,
3446,
276,
11240,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_transaction() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let sender = AccountKey::random(&mut rng);
let recipient = AccountKey::random(&mut rng);
let value = 1475 * MILLIMOB_TO_PICOMOB;
let input_credentials = get_input_cre... | rust_cleaned_test_functions.jsonl/32204 | {
"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,
30015,
28884,
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,
4646,
284,
8615,
1592,
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_try_add_capabilities() {
let mut writer = create_writer();
assert_eq!(writer.capabilities.len(), 0);
writer.try_add_capabilities(&[spirv::Capability::Shader]);
assert_eq!(writer.capabilities.len(), 1);
writer.try_add_capabilities(&[spirv::Capability::Sha... | rust_cleaned_test_functions.jsonl/61028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
2891,
92092,
368,
341,
286,
1077,
5206,
6916,
284,
1855,
28908,
1428,
286,
2060,
10714,
10297,
18189,
27388,
8456,
19406,
1507,
220,
15,
317,
286,
6916,
48779,
2891,
92092,
2099,
58,
49077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_after_reader() {
let lock = RwLock::<usize>::default();
let shared = Arc::new(AtomicUsize::new(0));
let s = shared.clone();
let lock_thread = thread::spawn(move || {
let _r = lock.read(0);
let _w = lock.write(1);
s.store... | rust_cleaned_test_functions.jsonl/77533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
19844,
22306,
368,
341,
286,
1077,
5296,
284,
55294,
11989,
27638,
51878,
6831,
2258,
543,
286,
1077,
6094,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
3237,
286,
1077,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strtree() {
let mut tree = STRtree::<&str>::with_capacity(10).unwrap();
let point = Geometry::new_from_wkt("POINT(5 5)").unwrap();
let line = Geometry::new_from_wkt("LINESTRING (0 0, 10 0)").unwrap();
let polygon = Geometry::new_from_wkt("POLYGON((2 2, 8 2, 8 8, ... | rust_cleaned_test_functions.jsonl/48570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
9344,
368,
341,
286,
1077,
5206,
4916,
284,
12152,
9344,
27638,
5,
495,
6831,
4197,
35603,
7,
16,
15,
568,
15454,
1428,
286,
1077,
1459,
284,
38918,
486,
931,
5673,
1670,
5840,
445,
21531,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bits_per_entry() {
const SAMPLE_SIZE: usize = 1_000_000;
let mut rng = rand::thread_rng();
let keys: Vec<u64> = (0..SAMPLE_SIZE).map(|_| rng.gen()).collect();
let filter = Fuse32::try_from(&keys).unwrap();
let bpe = (filter.len() as f64) * 32.0 / (SAMPLE_... | rust_cleaned_test_functions.jsonl/32213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20034,
5678,
9078,
368,
341,
286,
733,
62420,
4098,
25,
22301,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
6894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rosetta() {
assert_eq!(sha_256("Rosetta code"),
"764faf5c61ac315f1497f9dfa542713965b785e5cc2f707d6468d7d1124cdfcf".to_string());
} | rust_cleaned_test_functions.jsonl/30466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26608,
746,
2565,
368,
341,
262,
2060,
10714,
10297,
15247,
62,
17,
20,
21,
445,
74020,
26527,
2038,
4461,
2290,
330,
22,
21,
19,
76476,
20,
66,
21,
16,
580,
18,
16,
20,
69,
16,
19,
24,
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_path_expr() {
check_assist(
inline_local_variable,
"
fn foo() {
let d = 10;
let a<|> = d;
let b = a * 10;
let c = a as usize;
}",
"
fn foo() {
let d = 10;
<|>let b = d * 10;
let c = d as usize;
}",
);
} | rust_cleaned_test_functions.jsonl/60327 | {
"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,
2638,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
262,
1077,
294,
284,
220,
16,
15,
280,
262,
1077,
264,
27,
91,
29,
284,
294,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_main_export_nonexistent() {
let wasm: Vec<u8> = vec![0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00];
let mut checker = EcicChecker::default(&wasm);
assert_eq!(
checker.checks.get_check_status("export-main"),
CheckStatus::Unknown
);
... | rust_cleaned_test_functions.jsonl/10741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11027,
27114,
21637,
64085,
368,
341,
286,
1077,
98263,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
87,
15,
15,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
22,
18,
11,
220,
15,
87,
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_time_parse_unchecked() {
assert_eq!(Time::parse_unchecked(b"000000"), Time::from_hms(0, 0, 0));
assert_eq!(Time::parse_unchecked(b"012345"), Time::from_hms(1, 23, 45));
assert_eq!(Time::parse_unchecked(b"123456"), Time::from_hms(12, 34, 56));
assert_eq!(Time::pars... | rust_cleaned_test_functions.jsonl/81399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
21039,
4907,
7549,
368,
341,
286,
2060,
10714,
10297,
1462,
486,
6400,
4907,
7549,
1883,
1,
15,
15,
15,
15,
15,
15,
3975,
4120,
486,
1499,
1523,
1011,
7,
15,
11,
220,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_highest_index() {
use super::HighestIndex as TestingMethod;
let candles = RandomCandles::default();
let src: Vec<ValueType> = candles.take(300).map(|x| x.close).collect();
(1..255).for_each(|length| {
let mut ma = TestingMethod::new(length, &src[0]).unwrap();
let length = length... | rust_cleaned_test_functions.jsonl/15552 | {
"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,
1523,
7504,
3560,
368,
341,
197,
41819,
2256,
486,
96329,
1552,
438,
26768,
3523,
401,
197,
10217,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
197,
10217,
2286,
25,
11312,
48325,
929,
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... | 3 |
#[test]
fn test_from_bool_value() {
assert_eq!(
AMQPValue::try_from(&Value::Bool(false), AMQPType::Boolean),
Some(AMQPValue::Boolean(false))
);
assert_eq!(
AMQPValue::try_from(&Value::Bool(true), AMQPType::Boolean),
Some(AMQPValue::Boolean(... | rust_cleaned_test_functions.jsonl/115690 | {
"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,
5673,
22159,
3142,
368,
341,
286,
2060,
10714,
33673,
310,
6769,
66520,
1130,
486,
1539,
5673,
2099,
1130,
486,
11233,
3576,
701,
6769,
66520,
929,
486,
6890,
1326,
310,
4329,
7,
1402,
66520,
1130... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_identity_fuzz() {
let alphabet = make_alphabet();
let mut arena = Arena::default();
let mut rng: rand::rngs::StdRng = rand::SeedableRng::seed_from_u64(0);
let mut s = String::default();
for _ in 0..10000 {
s.clear();
let length = (rng.next_u32() % 75) as usi... | rust_cleaned_test_functions.jsonl/5623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46244,
761,
8889,
368,
341,
262,
1077,
27790,
284,
1281,
8418,
18485,
543,
262,
1077,
5206,
24902,
284,
27047,
486,
2258,
1428,
262,
1077,
5206,
28422,
25,
10382,
486,
69890,
82,
486,
22748,
49,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_key_long_comment() {
let key = "options ssh-dss abcdefg comment and other text".parse::<KeyEntry>().unwrap();
assert_eq!(key.options.as_deref(), Some("options"));
assert_eq!(key.key_type, "ssh-dss");
assert_eq!(key.key, "abcdefg");
assert_eq!(key.comment.a... | rust_cleaned_test_functions.jsonl/31209 | {
"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,
3097,
17799,
17638,
368,
341,
286,
1077,
1376,
284,
330,
2875,
29230,
1737,
778,
39022,
750,
70,
3980,
323,
1008,
1467,
3263,
6400,
27638,
1592,
5874,
10483,
15454,
543,
286,
2060,
10714,
10297,
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_with_query() {
let c = "with my_customers as (
select distinct c_customer_sk
, c_current_addr_sk
from
( select cs_sold_date_sk sold_date_sk,
cs_bill_customer_sk customer_sk,
cs_item_sk item_sk
from catalog_sales
... | rust_cleaned_test_functions.jsonl/76158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 951
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
5738,
368,
341,
310,
1077,
272,
284,
330,
4197,
847,
15875,
388,
438,
2399,
3293,
12460,
272,
28840,
33811,
198,
286,
1154,
272,
11080,
7387,
33811,
198,
504,
5872,
286,
320,
3293,
10532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lookups() {
fn file_pos(offset: u32) -> FilePosition {
FilePosition { file_id: 1, offset }
}
let mut regtest = Chain::new(regtest_genesis());
let mut offset = 0;
let mut limits = vec![];
let mut rows = vec![];
for hex_block in... | rust_cleaned_test_functions.jsonl/126194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1092
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24271,
8602,
368,
341,
286,
5168,
1034,
6479,
26245,
25,
575,
18,
17,
8,
1464,
2887,
3812,
341,
310,
2887,
3812,
314,
1034,
842,
25,
220,
16,
11,
4347,
456,
286,
555,
286,
1077,
5206,
1217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_where_typecheck() {
assert_cli::Assert::main_binary()
.with_args(&["* | where 5"])
.fails()
.and()
.stderr()
.contains("Expected boolean expression, found")
.unwrap();
} | rust_cleaned_test_functions.jsonl/15995 | {
"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,
36814,
1819,
2028,
368,
341,
286,
2060,
47147,
486,
8534,
486,
3817,
31761,
741,
310,
659,
4197,
8384,
2099,
1183,
9,
760,
1380,
220,
20,
14108,
310,
659,
59631,
741,
310,
659,
437,
741,
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 |
#[test]
fn test_rent_create_account() {
let lamports = 42;
let account = create_account(lamports, &Rent::default());
let rent = Rent::from_account(&account).unwrap();
assert_eq!(rent, Rent::default());
} | rust_cleaned_test_functions.jsonl/18555 | {
"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,
83127,
8657,
13500,
368,
341,
286,
1077,
31603,
3394,
284,
220,
19,
17,
280,
286,
1077,
2692,
284,
1855,
13500,
2333,
309,
3394,
11,
609,
67740,
486,
2258,
1423,
286,
1077,
8016,
284,
29737,
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 |
#[test]
fn test_vdpa_kern_is_valid() {
let m = GuestMemoryMmap::<()>::from_ranges(&[(GuestAddress(0), 0x10_0000)]).unwrap();
let vdpa = unwrap_not_found!(VhostKernVdpa::new(VHOST_VDPA_PATH, &m));
let mut config = VringConfigData {
queue_max_size: 32,
queue_size: ... | rust_cleaned_test_functions.jsonl/127248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
67,
6595,
4698,
932,
6892,
8337,
368,
341,
286,
1077,
296,
284,
26215,
10642,
44,
2186,
27638,
368,
6831,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
62,
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_set_item() {
Python::with_gil(|py| {
let list = PyList::new(py, &[2, 3, 5, 7]);
let val = 42i32.to_object(py);
let val2 = 42i32.to_object(py);
assert_eq!(2, list[0].extract::<i32>().unwrap());
list.set_item(0, val).unwrap();
... | rust_cleaned_test_functions.jsonl/108622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
5634,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
1140,
284,
5355,
852,
486,
931,
46827,
11,
44590,
17,
11,
220,
18,
11,
220,
20,
11,
220,
22,
2558,
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_tyck_info_pool() {
let type1_id: TypeId = TypeId::of::<TestType1>();
let type2_id: TypeId = TypeId::of::<TestType2>();
let type3_id: TypeId = TypeId::of::<TestType3>();
let mut tyck_info_pool: TyckInfoPool = TyckInfoPool::new();
let tyck_info1: NonNull<T... | rust_cleaned_test_functions.jsonl/83197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1787
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53171,
377,
3109,
15709,
368,
341,
286,
1077,
943,
16,
842,
25,
3990,
764,
284,
3990,
764,
486,
1055,
27638,
2271,
929,
16,
3913,
286,
1077,
943,
17,
842,
25,
3990,
764,
284,
3990,
764,
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_validate_states() {
let td = Builder::new().prefix("tikv-store-test").tempdir().unwrap();
let worker = LazyWorker::new("snap-manager");
let sched = worker.scheduler();
let kv_db =
engine_test::kv::new_engine(td.path().to_str().unwrap(), None, ALL_CFS, ... | rust_cleaned_test_functions.jsonl/12752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
22972,
368,
341,
286,
1077,
17941,
284,
20626,
486,
931,
1005,
11849,
445,
83,
1579,
85,
33252,
16839,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
11864,
284,
44263,
21936,
486,
931,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_instruction_get_argument_value() {
let result_1 = Instruction::get_argument_value("-99");
let result_2 = Instruction::get_argument_value("+4");
let result_3 = Instruction::get_argument_value("+0");
let expected_1 = -99;
let expected_2 = 4;
let exp... | rust_cleaned_test_functions.jsonl/68840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54923,
3062,
9025,
3142,
368,
341,
286,
1077,
1102,
62,
16,
284,
29051,
486,
455,
9025,
3142,
13645,
24,
24,
797,
286,
1077,
1102,
62,
17,
284,
29051,
486,
455,
9025,
3142,
34973,
19,
797,
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_does_not_panic() {
use rand::Rng;
let version = "1.0.0-littleendian";
let file_name = "generated_primitive";
let testdata = crate::test_util::arrow_test_data();
let path = format!(
"{}/arrow-ipc-stream/integration/{}/{}.arrow_file",
testdata, version, file_n... | rust_cleaned_test_functions.jsonl/128633 | {
"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,
96374,
7913,
620,
31270,
368,
341,
262,
990,
10382,
486,
49,
968,
26,
4710,
262,
1077,
2319,
284,
330,
16,
13,
15,
13,
15,
2852,
2377,
408,
1103,
876,
262,
1077,
1034,
1269,
284,
330,
16187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arrow_reader_single_column() {
let json_values = get_json_array("parquet/generated_simple_numerics/blogs.json");
let projected_json_values = json_values
.into_iter()
.map(|value| match value {
JObject(fields) => {
json!... | rust_cleaned_test_functions.jsonl/115771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 596
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46566,
22306,
19487,
8744,
368,
341,
286,
1077,
2951,
9146,
284,
633,
9455,
3858,
445,
1732,
23300,
79372,
30015,
99001,
1211,
3470,
22081,
4323,
3071,
286,
1077,
27348,
9455,
9146,
284,
2951,
9146,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_populate() {
let mut lattice = Lattice::from("ABC", 1, 2);
lattice.insert(0, 1, 1.0, 3); // A
lattice.insert(1, 1, 1.2, 4); // B
lattice.insert(2, 1, 2.5, 5); // C
lattice.insert(0, 2, 3.0, 6); // AB
lattice.insert(1, 2, 4.0, 7); // BC
latt... | rust_cleaned_test_functions.jsonl/39797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
6334,
368,
341,
286,
1077,
5206,
54272,
284,
444,
31791,
486,
1499,
445,
25411,
497,
220,
16,
11,
220,
17,
317,
286,
54272,
7030,
7,
15,
11,
220,
16,
11,
220,
16,
13,
15,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_mut() {
let mut lock = RwLock::new(NonCopy(10));
*lock.get_mut().unwrap() = NonCopy(20);
assert_eq!(lock.into_inner().unwrap(), NonCopy(20));
} | rust_cleaned_test_functions.jsonl/134541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
29523,
368,
341,
286,
1077,
5206,
5296,
284,
55294,
11989,
486,
931,
7,
8121,
12106,
7,
16,
15,
1106,
286,
353,
1023,
670,
29523,
1005,
15454,
368,
284,
11581,
12106,
7,
17,
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 |
#[test]
fn test_seconds_since_midnight() {
assert_eq!(
[0xd0u8, 0x97, 0x1, 0x0],
seconds_since_midnight(29, 0, 0).to_le_bytes()
)
} | rust_cleaned_test_functions.jsonl/13419 | {
"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,
34825,
56262,
43733,
9287,
368,
341,
286,
2060,
10714,
33673,
310,
508,
15,
9703,
15,
84,
23,
11,
220,
15,
87,
24,
22,
11,
220,
15,
87,
16,
11,
220,
15,
87,
15,
1259,
310,
6486,
56262,
437... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mismatch_program() {
let mut processor = processor_stub();
processor.json = r#"{"hello":"world"}"#.to_owned();
processor.program = ".hi".to_owned();
let context = Context::new().unwrap();
let output = processor.run(&context).unwrap();
... | rust_cleaned_test_functions.jsonl/90629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
24976,
25096,
368,
341,
310,
1077,
5206,
17654,
284,
17654,
62781,
543,
310,
17654,
4323,
284,
435,
55543,
4913,
14990,
3252,
14615,
9207,
57676,
13,
983,
51973,
543,
310,
17654,
45082,
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_t2() {
let oup = exec_target_with_in(TARGET_EXE_PATH, &["-t", "3"], super::IN_DAT_1.as_bytes());
assert_eq!(oup.stderr, "");
assert_eq!(
oup.stdout,
concat!(
"that for strange effects and extraordinary combinations we must go to lif... | rust_cleaned_test_functions.jsonl/67524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
17,
368,
341,
286,
1077,
5908,
79,
284,
3883,
11123,
6615,
1243,
4140,
16474,
4966,
36,
7944,
11,
609,
1183,
12,
83,
497,
330,
18,
7914,
2256,
486,
687,
36347,
62,
16,
5357,
12524,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_async_write_partial() {
quickcheck(test as fn(_) -> _);
fn test(encode_ops: PartialWithErrors<GenInterruptedWouldBlock>) {
use stream::decode_all;
let source = "abc".repeat(1024 * 100).into_bytes();
let writer =
PartialAsyncWrite::new(Cursor::new(Vec... | rust_cleaned_test_functions.jsonl/121591 | {
"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,
28346,
9165,
52068,
368,
341,
262,
3974,
2028,
8623,
438,
5168,
48139,
1464,
716,
626,
262,
5168,
1273,
7,
6180,
21959,
25,
24552,
2354,
13877,
27,
9967,
22528,
291,
27989,
4713,
9231,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_round_real() {
let test_cases = vec![
(
Some(Real::new(-3.12_f64).unwrap()),
Some(Real::new(-3f64).unwrap()),
),
(
Some(Real::new(f64::MAX).unwrap()),
Some(Real::new(f64::MAX).unwrap()),
... | rust_cleaned_test_functions.jsonl/9502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
15266,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
2399,
394,
4329,
7,
12768,
486,
931,
4080,
18,
13,
16,
17,
761,
21,
19,
568,
15454,
14702,
394,
4329,
7,
12768,
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... | 2 |
#[test]
fn test_coinbase_serialize_json() {
use crypto::random::Random;
for _ in 0..10 {
let address = Address::random().unwrap();
let distance = Random::u64_range(1, 10).unwrap();
let difficulty = Random::u64_range(1, 10).unwrap();
let coinbase_a = Coinbase::new(&addres... | rust_cleaned_test_functions.jsonl/70437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75718,
3152,
88686,
9455,
368,
341,
262,
990,
19028,
486,
11463,
486,
13999,
401,
262,
369,
716,
304,
220,
15,
496,
16,
15,
341,
286,
1077,
2621,
284,
9177,
486,
11463,
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... | 2 |
#[test]
fn test_part1() {
let passes = fixtures::Fixture::open("day05");
let mut max_pass = 0;
for pass in passes.iter() {
let pass_id = get_seat_id(&pass);
if pass_id > max_pass {
max_pass = pass_id;
}
}
assert_eq!(max_... | rust_cleaned_test_functions.jsonl/6801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
1077,
16211,
284,
37664,
486,
18930,
486,
2508,
445,
1292,
15,
20,
797,
286,
1077,
5206,
1932,
15464,
284,
220,
15,
280,
286,
369,
1494,
304,
16211,
19471,
368,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_unicast()
{
let server = setup_listen_server(SockType::SockRdm);
let client = TipcConn::new(SockType::SockRdm).unwrap();
let bytes_sent = client
.unicast(
TEST_MESSAGE.as_bytes(),
server.socket_ref(),
server.node_ref(),
).unwrap();... | rust_cleaned_test_functions.jsonl/29800 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3525,
559,
741,
515,
262,
1077,
3538,
284,
6505,
79286,
12015,
3759,
1176,
929,
486,
79812,
49,
13849,
626,
262,
1077,
2943,
284,
29873,
66,
9701,
486,
931,
3759,
1176,
929,
486,
79812,
49,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_characters() {
let querier = new_valid_db("insert_characters.db");
let mut characters = Vec::new();
characters.push(models::Character {
name: String::from("Test_Character_Insert_1"),
components: Some(String::from("{ \"interactable\": true }... | rust_cleaned_test_functions.jsonl/107696 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
79060,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
4208,
79060,
7076,
797,
286,
1077,
5206,
5766,
284,
11312,
486,
931,
1428,
286,
5766,
2552,
20289,
486,
12404,
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... | 1 |
#[test]
fn test_keywords_after_if() {
check(
r#"fn quux() { if true { () } $0 }"#,
expect![[r#"
kw unsafe
kw fn
kw const
kw type
kw impl
kw extern
kw use
... | rust_cleaned_test_functions.jsonl/22464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
19844,
11119,
368,
341,
286,
1779,
1006,
310,
435,
55543,
8822,
922,
2200,
368,
314,
421,
830,
314,
1719,
335,
400,
15,
335,
57676,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
29525,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_selection() {
let items = string_vec_to_status(&[
"a/b",
]);
let mut res = StatusTree::default();
res.update(&items).unwrap();
assert!(res.move_selection(MoveSelection::Down));
assert_eq!(res.selection, Some(1));
assert!(re... | rust_cleaned_test_functions.jsonl/34453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23672,
368,
341,
286,
1077,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
310,
330,
64,
3470,
497,
715,
286,
22712,
286,
1077,
5206,
592,
284,
8104,
6533,
486,
2258,
543,
286,
592,
5317,
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_rpc_get_slot_leaders() {
let rpc = RpcHandler::start();
let bank = rpc.working_bank();
// Test that slot leaders will be returned across epochs
let query_start = 0;
let query_limit = 2 * bank.epoch_schedule().slots_per_epoch;
let request =
... | rust_cleaned_test_functions.jsonl/6305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
27563,
11751,
6393,
368,
341,
286,
1077,
35596,
284,
79961,
3050,
486,
2468,
543,
286,
1077,
6073,
284,
35596,
18282,
287,
35733,
1428,
286,
442,
3393,
429,
9446,
6036,
686,
387,
5927... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_public_symptoms_with_inputs() {
simple_logger::setup();
let breathlessness = Breathlessness {
cause: UserInput::Some(BreathlessnessCause::HurryOrHill),
};
let cough = Cough {
cough_type: UserInput::Some(CoughType::Dry),
days: ... | rust_cleaned_test_functions.jsonl/116366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
26825,
51173,
6615,
28557,
368,
341,
286,
4285,
27413,
486,
15188,
1428,
286,
1077,
11486,
31928,
284,
57192,
31928,
341,
310,
5240,
25,
2657,
2505,
486,
8373,
5349,
265,
587,
31928,
60912,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encoding() {
assert_eq!(Encoding::Plain.to_string(), "PLAIN");
assert_eq!(Encoding::PlainDictionary.to_string(), "PLAIN_DICTIONARY");
assert_eq!(Encoding::Rle.to_string(), "RLE");
assert_eq!(Encoding::BitPacked.to_string(), "BIT_PACKED");
assert_eq!(
Encoding::DeltaBinaryPac... | rust_cleaned_test_functions.jsonl/126071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
37613,
368,
341,
197,
6948,
10714,
10297,
14690,
486,
26982,
2389,
3904,
1507,
330,
90889,
797,
197,
6948,
10714,
10297,
14690,
486,
26982,
8517,
2389,
3904,
1507,
330,
90889,
44663,
3580,
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_ndarray_from_ca() -> Result<()> {
let ca = Float64Chunked::new("", &[1.0, 2.0, 3.0]);
let ndarr = ca.to_ndarray()?;
assert_eq!(ndarr, ArrayView1::from(&[1.0, 2.0, 3.0]));
let mut builder = ListPrimitiveChunkedBuilder::new("", 10, 10, DataType::Float64);
b... | rust_cleaned_test_functions.jsonl/104230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 548
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43544,
1653,
5673,
49604,
368,
1464,
5714,
71698,
341,
286,
1077,
2162,
284,
13001,
21,
19,
28304,
291,
486,
931,
19814,
44590,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
2558,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filter() {
::init().unwrap();
let vec = vec![1i32, 2, 3];
let mut it = Iterator::from_vec(vec).filter(|val| val % 2 == 1);
let mut vals = Vec::new();
while let Ok(Some(res)) = it.next() {
vals.push(res);
}
assert_eq!(vals, [1,... | rust_cleaned_test_functions.jsonl/50294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
1077,
7486,
284,
7486,
20703,
16,
72,
18,
17,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
5206,
432,
284,
23023,
486,
1499,
13251,
25592,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_join_request_dev_nonce_extraction() {
let data = phy_join_request_payload();
let phy = PhyPayload::new(&data[..]);
assert!(phy.is_ok());
if let MacPayload::JoinRequest(join_request) = phy.unwrap().mac_payload() {
assert_eq!(
join_request.dev_nonce(),
... | rust_cleaned_test_functions.jsonl/81616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
7893,
10433,
48508,
94842,
368,
341,
262,
1077,
821,
284,
36455,
31017,
7893,
32813,
543,
262,
1077,
36455,
284,
92582,
29683,
486,
931,
2099,
691,
95874,
10149,
262,
2060,
10297,
12700,
2079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_auth_float_parsing() {
let auth: Auth = "Sentry sentry_version=2.0, \
sentry_key=public"
.parse()
.unwrap();
assert_eq!(auth.version(), 2);
assert_eq!(auth.public_key(), "public");
assert_eq!(
auth.to_string(),
"Sentry sentry... | rust_cleaned_test_functions.jsonl/119261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14014,
17586,
620,
28598,
368,
341,
262,
1077,
4166,
25,
7366,
284,
330,
50,
4085,
3208,
884,
9438,
28,
17,
13,
15,
11,
3044,
2549,
3208,
884,
3097,
28,
888,
698,
286,
659,
6400,
741,
286,
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_avro_3405_writer_add_metadata_success() {
let schema = Schema::parse_str(SCHEMA).unwrap();
let mut writer = Writer::new(&schema, Vec::new());
writer
.add_user_metadata("stringKey".to_string(), String::from("stringValue"))
.unwrap();
writer... | rust_cleaned_test_functions.jsonl/37666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26173,
299,
62,
18,
19,
15,
20,
28908,
2891,
22220,
18632,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
59461,
35839,
568,
15454,
543,
286,
1077,
5206,
6916,
284,
29404,
486,
931,
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_typed_arena_drop_small_count() {
DROP_COUNTER.with(|c| c.set(0));
{
let arena: TypedArena<SmallDroppable> = TypedArena::default();
for _ in 0..100 {
// Allocate something with drop glue to make sure it doesn't leak.
arena.alloc(SmallDroppable);
... | rust_cleaned_test_functions.jsonl/41102 | {
"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,
528,
32501,
62,
30527,
29584,
31966,
3180,
368,
341,
262,
56942,
48411,
18164,
22428,
66,
91,
272,
980,
7,
15,
1106,
262,
341,
286,
1077,
24902,
25,
50554,
93937,
27,
25307,
35,
75056,
480,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_v32_8() {
let mut data : &[u8] = &[0x8f, 0xff, 0xff, 0xff, 0x7f];
assert_eq!(Ok(0xffffffff), data.read_v32());
} | rust_cleaned_test_functions.jsonl/72926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2273,
18,
17,
62,
23,
368,
341,
286,
1077,
5206,
821,
549,
44590,
84,
23,
60,
284,
44590,
15,
87,
23,
69,
11,
220,
15,
9020,
11,
220,
15,
9020,
11,
220,
15,
9020,
11,
220,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_orientation() {
let kml_str = r#"<Orientation>
<heading>45.01</heading>
<tilt>-10.02</tilt>
<roll>0.0</roll>
</Orientation>"#;
let l: Kml = kml_str.parse().unwrap();
assert_eq!(
l,
Kml::Orientation(... | rust_cleaned_test_functions.jsonl/94659 | {
"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,
66269,
368,
341,
286,
1077,
595,
1014,
2895,
284,
435,
2,
22476,
22332,
397,
310,
366,
11412,
29,
19,
20,
13,
15,
16,
522,
11412,
397,
310,
366,
1646,
83,
38643,
16,
15,
13,
15,
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_components() {
macro_rules! t(
(s: $path:expr, $op:ident, $exp:expr) => (
{
let path = Path::new($path);
assert!(path.$op() == ($exp).as_bytes());
}
);
(s: $path:expr, $op:ident, $... | rust_cleaned_test_functions.jsonl/105873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2019
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23258,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
453,
25,
1713,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chi_squared_small() {
let mut chi = ChiSquared::new(0.5);
let mut rng = ::test::rng();
for _ in 0..1000 {
chi.sample(&mut rng);
chi.ind_sample(&mut rng);
}
} | rust_cleaned_test_functions.jsonl/93274 | {
"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,
98826,
54641,
31966,
368,
341,
286,
1077,
5206,
25798,
284,
33282,
88294,
486,
931,
7,
15,
13,
20,
317,
286,
1077,
5206,
28422,
284,
3504,
1944,
486,
69890,
543,
286,
369,
716,
304,
220,
15,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_content_disposition_file_name_re() {
let val = br#"form-data; name="my_field"; filename="file_name.txt""#;
let file_name = CONTENT_DISPOSITION_FILE_NAME_RE.captures(val).unwrap();
assert_eq!(file_name.get(1).unwrap().as_bytes(), b"file_name.txt");
let val = br#"f... | rust_cleaned_test_functions.jsonl/98057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7495,
9932,
3487,
2458,
1269,
1288,
368,
341,
286,
1077,
1044,
284,
1411,
55543,
627,
13945,
26,
829,
428,
2408,
5013,
5123,
3899,
428,
1192,
1269,
3909,
3014,
2,
280,
286,
1077,
1034,
1269,
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_print_parse() {
let a = ("test", 1u8, 2u32).to_variant();
let a2 = Variant::parse(Some(a.type_()), &a.print(false)).unwrap();
assert_eq!(a, a2);
let a3: Variant = a.to_string().parse().unwrap();
assert_eq!(a, a3);
} | rust_cleaned_test_functions.jsonl/30230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
21039,
368,
341,
286,
1077,
264,
284,
3489,
1944,
497,
220,
16,
84,
23,
11,
220,
17,
84,
18,
17,
568,
983,
46112,
1428,
286,
1077,
264,
17,
284,
39292,
486,
6400,
65405,
2877,
4852,
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_insert_data_blobs_basic() {
let entries = make_tiny_test_entries(2);
let shared_blobs = entries.to_blobs();
for (i, b) in shared_blobs.iter().enumerate() {
b.write().unwrap().set_index(i as u64).unwrap();
}
let blob_locks: Vec<_> = shared_blo... | rust_cleaned_test_functions.jsonl/133180 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
1769,
880,
68164,
34729,
368,
341,
286,
1077,
10695,
284,
1281,
528,
6441,
4452,
26092,
7,
17,
317,
286,
1077,
6094,
880,
68164,
284,
10695,
2389,
880,
68164,
1428,
286,
369,
320,
72,
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... | 4 |
#[test]
fn test_json_qualified_option_statement() {
let n = OptionStmt {
base: BaseNode::default(),
assignment: Assignment::Member(Box::new(MemberAssgn {
base: BaseNode::default(),
member: MemberExpr {
base: BaseNode::default(),
object:... | rust_cleaned_test_functions.jsonl/40423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 615
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
62,
36335,
9672,
37404,
368,
341,
262,
1077,
308,
284,
6959,
31063,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
16319,
25,
34427,
486,
9366,
67758,
486,
931,
88281,
5615,
4905,
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_message_data_offsets() {
let offsets = SecpSignatureOffsets {
message_data_offset: 99,
message_data_size: 1,
..SecpSignatureOffsets::default()
};
assert_eq!(
test_case(1, &offsets),
Err(Secp256k1Error::InvalidSig... | rust_cleaned_test_functions.jsonl/47858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
1769,
56924,
368,
341,
286,
1077,
35046,
284,
4520,
79,
25088,
81095,
341,
310,
1943,
1769,
6917,
25,
220,
24,
24,
345,
310,
1943,
1769,
2368,
25,
220,
16,
345,
310,
5241,
8430,
79,
2508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cumsum_agg_as_key() -> Result<()> {
let df = df![
"depth" => &[0i32, 1, 2, 3, 4, 5, 6, 7, 8, 9],
"soil" => &["peat", "peat", "peat", "silt", "silt", "silt", "sand", "sand", "peat", "peat"]
]?;
// this checks if the grouper can work with the complex query as a key
... | rust_cleaned_test_functions.jsonl/22409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91328,
1242,
83534,
11898,
3097,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
6764,
90515,
286,
330,
17561,
1,
589,
44590,
15,
72,
18,
17,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_update_stake() {
// Assert that doubling a neuron's stake halves its age
let mut neuron = Neuron::default();
let now = 10;
neuron.cached_neuron_stake_e8s = Tokens::new(5, 0).unwrap().get_e8s();
neuron.aging_since_timestamp_seconds = 0;
neuron.update_stake(Tokens::new(10, ... | rust_cleaned_test_functions.jsonl/1184 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
1261,
726,
368,
341,
262,
442,
5319,
429,
59015,
264,
48284,
594,
18279,
74112,
1181,
4231,
198,
262,
1077,
5206,
48284,
284,
4182,
36090,
486,
2258,
543,
262,
1077,
1431,
284,
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 |
#[test]
fn test_encode_frame() {
let mut encoder = Encoder::default();
encoder.lossless = Some(true);
encoder.basic_info.xsize = 3;
encoder.basic_info.ysize = 3;
let frame = BitmapFrame { data: &RGBA_DATA };
let encoded = encoder.encode_frame(&frame).expect("Failed to encode");
let... | rust_cleaned_test_functions.jsonl/115353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
8929,
368,
341,
262,
1077,
5206,
23668,
284,
55115,
486,
2258,
543,
262,
23668,
46043,
1717,
284,
4329,
3715,
317,
262,
23668,
33257,
3109,
1993,
2141,
284,
220,
18,
280,
262,
23668,
33257,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_integer() {
assert!(_0.is_integer());
assert!(_1.is_integer());
assert!(_2.is_integer());
assert!(!_1_2.is_integer());
assert!(!_3_2.is_integer());
assert!(!_NEG1_2.is_integer());
} | rust_cleaned_test_functions.jsonl/830 | {
"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,
6892,
31725,
368,
341,
286,
2060,
0,
2490,
15,
2079,
31725,
1423,
286,
2060,
0,
2490,
16,
2079,
31725,
1423,
286,
2060,
0,
2490,
17,
2079,
31725,
1423,
286,
2060,
0,
67097,
16,
62,
17,
2079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_returns_err_on_illegal_patterns() {
check_err("alf_loves_cats", WildcardPatternError::NoStars);
check_err("*alf*loves*cats*", WildcardPatternError::TooManyStars);
check_err("*alf*loves*cats", WildcardPatternError::TooManyStars);
check_err("*alf*loves_cats", Wild... | rust_cleaned_test_functions.jsonl/80624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58900,
9266,
4470,
26743,
6428,
64923,
368,
341,
286,
1779,
9266,
445,
3104,
5560,
2342,
77370,
497,
13630,
4951,
15760,
1454,
486,
2753,
61028,
626,
286,
1779,
9266,
29592,
3104,
9,
385,
2342,
9,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assign() {
let new_owner = Pubkey::new(&[9; 32]);
let pubkey = solana_sdk::pubkey::new_rand();
let mut account = AccountSharedData::new(100, 0, &system_program::id());
assert_eq!(
assign(
&mut account,
&pubkey.into(),
... | rust_cleaned_test_functions.jsonl/73048 | {
"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,
20688,
368,
341,
286,
1077,
501,
29027,
284,
22611,
792,
486,
931,
2099,
58,
24,
26,
220,
18,
17,
10149,
286,
1077,
95116,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
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_bool_single_column_reader_test_batch_size_divides_into_row_group_size() {
let message_type = "
message test_schema {
REQUIRED BOOLEAN leaf;
}
";
// row group boundaries (25 rows in 3 row groups --> row
let converter = F... | rust_cleaned_test_functions.jsonl/125239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
19487,
8744,
22306,
4452,
14534,
2368,
16237,
3341,
45514,
8530,
6288,
2368,
368,
341,
286,
1077,
1943,
1819,
284,
6228,
286,
1943,
1273,
25371,
341,
688,
66577,
59393,
15933,
280,
286,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero_args() {
let input = quote! {
struct Zero {
pub zero: ()
}
};
let expected = quote! {
impl::zero::Zero for Zero {
fn zero() {
let __v0 = ();
__v0
}
}
};
let output = ref... | rust_cleaned_test_functions.jsonl/83615 | {
"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,
19359,
8384,
368,
341,
262,
1077,
1946,
284,
12641,
0,
341,
286,
2036,
18306,
341,
310,
6675,
7168,
25,
12668,
286,
456,
262,
3634,
262,
1077,
3601,
284,
12641,
0,
341,
286,
11605,
486,
14154,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wallet_import_export_with_different_wallet_key() {
let _setup = SetupDefaults::init();
let (export_path, wallet_name) = export_test_wallet();
delete_wallet(&wallet_name, None, None, None).unwrap();
let xtype = "type1";
let id = "id1";
let value ... | rust_cleaned_test_functions.jsonl/118712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62308,
18434,
27114,
6615,
82741,
62308,
3097,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16273,
486,
2327,
1428,
286,
1077,
320,
1533,
2638,
11,
15085,
1269,
8,
284,
7485,
4452,
62308,
1428,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compare_names() {
for &(a, b) in &[
("hello", "world"),
("", "world"),
("123", "hello"),
("123", ""),
("123test", "123"),
("hello", ""),
("hello", "hello"),
("hello123", "hello123"),
("hello123", "hello12"),
("he... | rust_cleaned_test_functions.jsonl/112255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
9187,
368,
341,
262,
369,
22796,
64,
11,
293,
8,
304,
609,
9640,
286,
3489,
14990,
497,
330,
14615,
4461,
286,
3489,
497,
330,
14615,
4461,
286,
3489,
16,
17,
18,
497,
330,
14990,
4461,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_expect_nothing() {
let ctx = TestContext::new();
let cmx1_path = ctx.new_include(
"some1.cmx",
json!({
"program": {
"binary": "bin/hello_world"
}
}),
);
assert_matches!(ctx.che... | rust_cleaned_test_functions.jsonl/50695 | {
"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,
68918,
6536,
1596,
368,
341,
286,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
286,
1077,
9961,
87,
16,
2638,
284,
5635,
4618,
37878,
1006,
310,
330,
14689,
16,
520,
18085,
756,
310,
2951,
0,
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_get_cid_from_app_data_2() {
let test_app_data_hash: H256 =
"1FE7C5555B3F9C14FF7C60D90F15F1A5B11A0DA5B1E8AA043582A1B2E1058D0C"
.parse()
.unwrap();
assert_eq!(
get_cid_from_app_data(test_app_data_hash).unwrap(),
St... | rust_cleaned_test_functions.jsonl/110889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
68699,
5673,
8191,
1769,
62,
17,
368,
341,
286,
1077,
1273,
8191,
1769,
8950,
25,
472,
17,
20,
21,
4035,
310,
330,
16,
11419,
22,
34,
20,
20,
20,
20,
33,
18,
37,
24,
34,
16,
19,
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_personalized_push_messages() {
let mut crds = Crds::default();
let mut push = CrdsGossipPush::default();
let peer_1 = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::new_rand(),
0,
)));
assert_eq!(... | rust_cleaned_test_functions.jsonl/79136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78035,
1506,
14218,
23428,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
5206,
4484,
284,
4553,
5356,
38,
41473,
16644,
486,
2258,
543,
286,
1077,
14397,
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_consts() {
let context = Context::create();
let bool_type = context.bool_type();
let i8_type = context.i8_type();
let i16_type = context.i16_type();
let i32_type = context.i32_type();
let i64_type = context.i64_type();
let i128_type = context.i128_type();
let f16_... | rust_cleaned_test_functions.jsonl/122314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1635
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48530,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
1807,
1819,
284,
2266,
28791,
1819,
543,
262,
1077,
600,
23,
1819,
284,
2266,
8607,
23,
1819,
543,
262,
1077,
600,
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_serialize_deserialize_invalid() {
let serialized = "bjad%%";
let deserialized = Uid::from_str(&serialized);
assert!(deserialized.is_err());
} | rust_cleaned_test_functions.jsonl/58323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15768,
9050,
31433,
368,
341,
286,
1077,
32916,
284,
330,
35751,
329,
2769,
876,
286,
1077,
939,
67577,
284,
547,
307,
486,
1499,
2895,
2099,
75277,
317,
286,
2060,
10297,
5799,
67577,
2079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_find_or_insert() {
let mut m: HashMap<int,int> = HashMap::new();
assert_eq!(*m.find_or_insert(1, 2), 2);
assert_eq!(*m.find_or_insert(1, 3), 2);
} | rust_cleaned_test_functions.jsonl/45624 | {
"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,
21814,
8734,
17678,
368,
341,
286,
1077,
5206,
296,
25,
10528,
4159,
9871,
29,
284,
10528,
486,
931,
543,
286,
2060,
10714,
0,
4071,
76,
2658,
8734,
17678,
7,
16,
11,
220,
17,
701,
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 |
#[test]
fn test_varlist_combine_chr20_bug_case2() {
let mut lst1: Vec<Var> = vec![];
lst1.push(generate_var2(
0,
19,
42449920,
vec!["AAAGCTT".to_string(), "A".to_string()],
));
lst1.push(generate_var2(
1,
19,... | rust_cleaned_test_functions.jsonl/25122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 977
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
1607,
72374,
68993,
17,
15,
73232,
19096,
17,
368,
341,
286,
1077,
5206,
18845,
16,
25,
11312,
27,
3962,
29,
284,
7486,
0,
15078,
286,
18845,
16,
2552,
3268,
13220,
4612,
17,
1006,
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_comment() {
let text = "Hello, {# foo bar baz #} there!";
let instructions = compile(text).unwrap();
assert_eq!(2, instructions.len());
assert_eq!(&Literal("Hello, "), &instructions[0]);
assert_eq!(&Literal(" there!"), &instructions[1]);
} | rust_cleaned_test_functions.jsonl/18181 | {
"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,
17638,
368,
972,
286,
1077,
1467,
284,
330,
9707,
11,
314,
2,
15229,
3619,
50247,
671,
92,
1052,
93397,
286,
1077,
11221,
284,
19192,
7235,
568,
15454,
1647,
286,
2060,
10714,
10297,
17,
11,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_quote_spanned_impl() {
let span = Span::call_site();
let tokens = quote_spanned! {span=>
impl<'a, T: ToTokens> ToTokens for &'a T {
fn to_tokens(&self, tokens: &mut TokenStream) {
(**self).to_tokens(tokens)
}
}
};
let expec... | rust_cleaned_test_functions.jsonl/53393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45236,
37382,
18694,
21007,
368,
341,
262,
1077,
9390,
284,
11903,
486,
6659,
24507,
543,
262,
1077,
11211,
284,
12641,
37382,
18694,
0,
314,
1480,
28,
397,
286,
11605,
18291,
64,
11,
350,
25,
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_invalid_unicode_escape() {
let well_formed = [
r"\u{FF}",
r"\u{0}",
r"\u{F}",
r"\u{10FFFF}",
r"\u{1_0__FF___FF_____}",
];
for c in &well_formed {
assert_invalid_str(c);
}
let invalid ... | rust_cleaned_test_functions.jsonl/4167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
54662,
21832,
368,
341,
286,
1077,
1632,
7915,
291,
284,
2278,
310,
435,
11934,
84,
90,
1748,
24375,
310,
435,
11934,
84,
90,
15,
24375,
310,
435,
11934,
84,
90,
37,
24375,
310,
435,
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... | 3 |
#[test]
fn test_simple_update_location() {
let querier = new_valid_db("simple_update_location.db");
let mut location = common_location();
location.description = Some(String::from("updated description."));
assert_eq!(
1,
querier.update_location("Test_Locat... | rust_cleaned_test_functions.jsonl/107690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
8882,
13126,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
22944,
8882,
13126,
7076,
797,
286,
1077,
5206,
3728,
284,
4185,
13126,
543,
286,
3728,
13178,
284,
4329,
2242,
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_router_discovery() {
let dummy_config = Ipv6::DUMMY_CONFIG;
let mut state_builder = StackStateBuilder::default();
let mut ndp_configs = NdpConfigurations::default();
ndp_configs.set_dup_addr_detect_transmits(None);
state_builder.device_builder().set_defaul... | rust_cleaned_test_functions.jsonl/82822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55587,
9932,
7449,
368,
341,
286,
1077,
17292,
5332,
284,
358,
30168,
21,
486,
35,
58673,
12568,
280,
286,
1077,
5206,
1584,
28532,
284,
14284,
1397,
3297,
486,
2258,
543,
286,
1077,
5206,
15581,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_day1_part1() {
let data = input_generator_day1(DATA);
let result = solve_day1_part1(&data);
assert_eq!(result, 7);
} | rust_cleaned_test_functions.jsonl/106864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16763,
16,
10495,
16,
368,
341,
286,
1077,
821,
284,
1946,
25813,
16763,
16,
59093,
317,
286,
1077,
1102,
284,
11625,
16763,
16,
10495,
16,
2099,
691,
317,
286,
2060,
10714,
10297,
1382,
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 |
#[test]
fn test_string_array_builder_append_string() {
let mut builder = StringBuilder::new(20);
let var = "hello".to_owned();
builder.append_value(&var).unwrap();
builder.append(true).unwrap();
builder.append_value("world").unwrap();
let string_array = builder.... | rust_cleaned_test_functions.jsonl/30994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
3858,
28532,
26041,
3904,
368,
341,
286,
1077,
5206,
7363,
284,
11410,
486,
931,
7,
17,
15,
626,
286,
1077,
762,
284,
330,
14990,
3263,
983,
51973,
543,
286,
7363,
2057,
3142,
2099,
947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version_set_log_and_apply() {
let (_, opt) = make_version();
let mut vs = VersionSet::new(
"db",
opt.clone(),
share(TableCache::new("db", opt.clone(), 100)),
);
assert_eq!(2, vs.new_file_number());
// Simulate NewDB
... | rust_cleaned_test_functions.jsonl/41933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
2602,
5224,
8378,
36551,
368,
341,
286,
1077,
39464,
3387,
8,
284,
1281,
9438,
543,
286,
1077,
5206,
6165,
284,
6079,
1649,
486,
931,
1006,
310,
330,
1999,
756,
310,
3387,
15997,
3148,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cant_send_to_stopped() {
let system = ActorSystem::create(ActorSystemConfig::default().thread_pool_size(2));
let aid = system.spawn().with((), simple_handler).unwrap();
system.stop_actor(&aid);
assert_eq!(false, system.is_actor_alive(&aid));
// Make sure ... | rust_cleaned_test_functions.jsonl/51705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
517,
13565,
2346,
1261,
17573,
368,
341,
286,
1077,
1849,
284,
24718,
2320,
486,
3182,
7,
18870,
2320,
2648,
486,
2258,
1005,
4528,
15709,
2368,
7,
17,
1106,
286,
1077,
12296,
284,
1849,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_environment() {
let xd = BaseDirectories::with_env("", "", &*make_env(vec![
("HOME", "test_files/user".to_string()),
("XDG_DATA_HOME", "test_files/user/data".to_string()),
("XDG_CONFIG_HOME", "test_files/user/config".to_string()),
("XDG_CAC... | rust_cleaned_test_functions.jsonl/83584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
51774,
368,
341,
262,
1077,
79052,
284,
5351,
56397,
486,
4197,
15879,
19814,
7342,
609,
9,
6927,
15879,
25592,
90515,
310,
3489,
27546,
497,
330,
1944,
10931,
11739,
3263,
983,
3904,
14702,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_async() {
delay();
let client: Public<ASync> = Public::new(SANDBOX_URL);
let time = client.get_time().and_then(|time| {
let time_str = format!("{:?}", time);
assert!(time_str.starts_with("Time {"));
assert!(time_str.contains("iso:"));
assert!(time_str.... | rust_cleaned_test_functions.jsonl/83253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
368,
341,
262,
7626,
543,
262,
1077,
2943,
25,
3066,
27,
1911,
1721,
29,
284,
3066,
486,
931,
3759,
1093,
3506,
60155,
8000,
317,
262,
1077,
882,
284,
2943,
670,
3009,
1005,
437,
68367,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sync_state() {
// Create a coordinator for a validator node
let mut validator_coordinator = test_utils::create_validator_coordinator();
// Get the sync state from state sync
let (callback_sender, mut callback_receiver) = oneshot::channel();
assert_ok!... | rust_cleaned_test_functions.jsonl/84043 | {
"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,
3062,
23008,
4387,
368,
341,
286,
442,
4230,
264,
30284,
369,
264,
22935,
2436,
198,
286,
1077,
5206,
22935,
11393,
17442,
284,
1273,
17309,
486,
3182,
64959,
11393,
17442,
1428,
286,
442,
2126,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_hash() {
let a = ByteArray::from_slice_unnamed(b"A");
let b = ByteArray::from_slice_unnamed(b"B");
let c = ByteArray::from_slice_unnamed(b"C");
let cat = a.concat(b).concat(c);
let hash = sha2::Sha256::digest(&cat.data);
let hashed = cat.apply_func... | rust_cleaned_test_functions.jsonl/86774 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
1077,
264,
284,
32920,
486,
1499,
26488,
4907,
30245,
1883,
29133,
797,
286,
1077,
293,
284,
32920,
486,
1499,
26488,
4907,
30245,
1883,
63590,
797,
286,
1077,
272,
284,
32920... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_u64() {
let start_addr1 = GuestAddress(0x0);
let start_addr2 = GuestAddress(0x1000);
let bad_addr = GuestAddress(0x2001);
let bad_addr2 = GuestAddress(0x1ffc);
let gm = GuestMemory::new(&[(start_addr1, 0x1000), (start_addr2, 0x1000)]).unwrap();
... | rust_cleaned_test_functions.jsonl/40958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 747
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
7300,
21,
19,
368,
341,
286,
1077,
1191,
7387,
16,
284,
26215,
4286,
7,
15,
87,
15,
317,
286,
1077,
1191,
7387,
17,
284,
26215,
4286,
7,
15,
87,
16,
15,
15,
15,
317,
286,
1077,
3873,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_dependency() -> Result<(), Error> {
let child_a = ChildDecl {
name: "childA".to_string(),
url: "ignored:///child".to_string(),
startup: fsys::StartupMode::Lazy,
environment: None,
};
let child_b = ChildDecl {
... | rust_cleaned_test_functions.jsonl/24101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1005
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
62387,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1682,
4306,
284,
9391,
21629,
341,
310,
829,
25,
330,
3048,
32,
3263,
983,
3904,
3148,
310,
2515,
25,
330,
58471,
60896,
3048,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tap_enable() {
let _tap_ip_guard = TAP_IP_LOCK.lock().unwrap();
let tap = Tap::new(1).unwrap();
let ret = tap.enable();
assert!(ret.is_ok());
} | rust_cleaned_test_functions.jsonl/55544 | {
"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,
528,
391,
18988,
368,
341,
286,
1077,
716,
30047,
10385,
36796,
284,
350,
2537,
16607,
27661,
21003,
1005,
15454,
1428,
286,
1077,
15239,
284,
36134,
486,
931,
7,
16,
568,
15454,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sub_assign() {
let mut vector = Vector3D::new(3, 4, 5);
vector -= Vector3D::new(10, 20, 30);
assert_eq!(vector, Vector3D::from([-7, -16, -25]));
} | rust_cleaned_test_functions.jsonl/21640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
20688,
368,
341,
310,
1077,
5206,
4621,
284,
4196,
18,
35,
486,
931,
7,
18,
11,
220,
19,
11,
220,
20,
317,
310,
4621,
5982,
4196,
18,
35,
486,
931,
7,
16,
15,
11,
220,
17,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_alogithm_id() {
assert_eq!(
Into::<TPM2_ALG_ID>::into(KeyDerivationFunction::Kdf1Sp800_56a),
TPM2_ALG_KDF1_SP800_56A
);
assert_eq!(
Into::<TPM2_ALG_ID>::into(KeyDerivationFunction::Kdf2),
TPM2_ALG_KDF2
);
... | rust_cleaned_test_functions.jsonl/41515 | {
"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,
45514,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
31645,
27638,
4239,
44,
17,
8912,
38,
3450,
6831,
18122,
21358,
22171,
39127,
5152,
486,
42,
2940,
16,
6406,
23,
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_normalize_path() {
assert_eq!(normalize_path(Path::new("a/../b")), PathBuf::from("b"));
assert_eq!(normalize_path(Path::new("a/./b/")), PathBuf::from("a/b/"));
assert_eq!(
normalize_path(Path::new("a/./b/../c")),
PathBuf::from("a/c")
);
if cfg!(windows) {
a... | rust_cleaned_test_functions.jsonl/2999 | {
"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,
80807,
2638,
368,
341,
262,
2060,
10714,
10297,
30590,
2638,
33030,
486,
931,
445,
64,
78380,
65,
35674,
7933,
15064,
486,
1499,
445,
65,
4010,
262,
2060,
10714,
10297,
30590,
2638,
33030,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_default_value_extreme() {
let d = TestExtremeDefaultValues::new();
assert_eq!(f64::INFINITY, d.get_inf_double());
assert_eq!(f64::NEG_INFINITY, d.get_neg_inf_double());
assert!(d.get_nan_double().is_nan());
assert_eq!(f32::INFINITY, d.get_inf_float());
assert_eq!(f32::NEG... | rust_cleaned_test_functions.jsonl/63842 | {
"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,
9993,
3142,
9927,
9634,
368,
341,
262,
1077,
294,
284,
3393,
92518,
3675,
6227,
486,
931,
543,
262,
2060,
10714,
10297,
69,
21,
19,
486,
687,
55990,
11,
294,
670,
26051,
24598,
1423,
262,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.