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_flags_from_vec_29() {
let (flags, subcommand, argv) = flags_from_vec(svec![
"deno",
"--seed",
"250",
"--v8-flags=--expose-gc",
"run",
"script.ts"
]);
assert_eq!(
flags,
DenoFlags {
seed: Some(250 as u64),
v8_flags: Some(... | rust_cleaned_test_functions.jsonl/112858 | {
"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,
14130,
5673,
13251,
62,
17,
24,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
284,
8042,
5673,
13251,
1141,
4083,
90515,
414,
330,
5183,
78,
756,
414,
14482,
22602,
756,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permissions_request_read() {
let guard = PERMISSION_PROMPT_GUARD.lock().unwrap();
let whitelist = vec![PathBuf::from("/foo/bar")];
let mut perms0 = DenoPermissions::from_flags(&Flags {
read_whitelist: whitelist.clone(),
..Default::default()
});
set_prompt_result(f... | rust_cleaned_test_functions.jsonl/78059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44767,
7893,
6443,
368,
341,
262,
1077,
7616,
284,
96540,
71346,
2828,
84513,
7376,
21003,
1005,
15454,
543,
262,
1077,
67727,
284,
7486,
20703,
1820,
15064,
486,
1499,
4283,
7975,
49513,
899,
935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_index_trait_range_panic_wrong_order() {
Python::with_gil(|py| {
let list = PyList::new(py, &[2, 3, 5]);
#[allow(clippy::reversed_empty_ranges)]
list[2..1].extract::<Vec<i32>>().unwrap();
})
} | rust_cleaned_test_functions.jsonl/108643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
3560,
78491,
9698,
620,
31270,
75198,
7869,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_for_max_stake() {
solana_logger::setup();
let mut validator_config = ValidatorConfig::default();
validator_config.rpc_config.enable_validator_exit = true;
let config = ClusterConfig {
cluster_lamports: 10_000,
node_stakes: vec![100; 4],
validator_conf... | rust_cleaned_test_functions.jsonl/36004 | {
"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,
18760,
5478,
6345,
1261,
726,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1077,
5206,
22935,
5332,
284,
32566,
2648,
486,
2258,
543,
262,
22935,
5332,
55177,
5332,
28697,
64959,
16880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_close_wait_ack() {
let mut s = socket_close_wait();
s.send_slice(b"abcdef").unwrap();
recv!(s, [TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1 + 1),
payload: &b"abcdef"[..],
..RECV_TEMPL
}]);
... | rust_cleaned_test_functions.jsonl/1748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12704,
18760,
48447,
368,
341,
286,
1077,
5206,
274,
284,
7575,
12704,
18760,
543,
286,
274,
5219,
26488,
1883,
1,
41202,
1827,
15454,
543,
286,
27006,
10297,
82,
11,
508,
77536,
693,
649,
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... | 1 |
#[test]
fn test_message_unique_program_ids_order_preserved() {
let program_id0 = Pubkey::new_unique();
let program_id1 = Pubkey::default(); // Key less than program_id0
let program_ids = get_program_ids(&[
Instruction::new_with_bincode(program_id0, &0, vec![]),
In... | rust_cleaned_test_functions.jsonl/55516 | {
"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,
6462,
21218,
25096,
8077,
7869,
32116,
2771,
368,
341,
286,
1077,
2025,
842,
15,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
2025,
842,
16,
284,
22611,
792,
486,
2258,
2129,
442,
5309,
268... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
let vals = vec![
("12.34", "1.234", "13.574"),
("12.34", "-1.234", "11.106"),
("1234e6", "1234e-6", "1234000000.001234"),
("1234e-6", "1234e6", "1234000000.001234"),
("18446744073709551616.0", "1", "18446744073709551617"... | rust_cleaned_test_functions.jsonl/75811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
1077,
28356,
284,
7486,
90515,
310,
3489,
16,
17,
13,
18,
19,
497,
330,
16,
13,
17,
18,
19,
497,
330,
16,
18,
13,
20,
22,
19,
4461,
310,
3489,
16,
17,
13,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_playback_status_to_fidl() {
let status = PlaybackStatus::Playing;
let status: fidl::PlaybackStatus = status.into();
let expected = fidl::PlaybackStatus::Playing;
assert_eq!(expected, status);
} | rust_cleaned_test_functions.jsonl/15962 | {
"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,
22144,
1419,
4773,
2346,
761,
55464,
368,
341,
286,
1077,
2639,
284,
95301,
2522,
486,
27471,
280,
286,
1077,
2639,
25,
32104,
75,
486,
87125,
2522,
284,
2639,
39860,
543,
286,
1077,
3601,
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 |
#[test]
fn test_file_type() {
assert_eq!("block special file", pretty_filetype(S_IFBLK, 0));
assert_eq!("character special file", pretty_filetype(S_IFCHR, 0));
assert_eq!("regular file", pretty_filetype(S_IFREG, 1));
assert_eq!("regular empty file", pretty_filetype(S_IFREG, 0));
... | rust_cleaned_test_functions.jsonl/36729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
1819,
368,
341,
286,
2060,
10714,
17223,
4574,
3281,
1034,
497,
5020,
2458,
1313,
3759,
19035,
9389,
42,
11,
220,
15,
1106,
286,
2060,
10714,
17223,
19190,
3281,
1034,
497,
5020,
2458,
1313,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_f64() {
let cases = vec![
("12345", 12345f64),
("123.45", 123.45),
("-123.45", -123.45),
("0.00012345000098765", 0.00012345000098765),
("1234500009876.5", 1234500009876.5),
("3.141592653589793", 3.141592653589793)... | rust_cleaned_test_functions.jsonl/40306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 911
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
761,
21,
19,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
16,
17,
18,
19,
20,
497,
220,
16,
17,
18,
19,
20,
69,
21,
19,
1326,
310,
3489,
16,
17,
18,
13,
19,
20,
497,
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_timer() {
let mut timer = Timer::new(10);
timer.add_task(Duration::from_millis(20), Task::A);
timer.add_task(Duration::from_millis(150), Task::C);
timer.add_task(Duration::from_millis(100), Task::B);
assert_eq!(timer.pending.len(), 3);
let tick_ti... | rust_cleaned_test_functions.jsonl/1908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16255,
368,
341,
286,
1077,
5206,
9021,
284,
17759,
486,
931,
7,
16,
15,
317,
286,
9021,
1364,
12184,
64114,
486,
1499,
717,
56212,
7,
17,
15,
701,
5430,
486,
32,
317,
286,
9021,
1364,
12184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_valid_s3_list_multipart_uploads() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"s3-list-multipart-uploads.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
... | rust_cleaned_test_functions.jsonl/29201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
643,
18,
2019,
717,
18204,
62,
19374,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
82,
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_array() {
let mut builder = PrimitiveArrayBuilder::<i64>::with_capacity(16);
let data_array: DFInt64Array = builder.finish();
// verify empty data array and data type
assert!(data_array.is_empty());
assert_eq!(&DataType::Int64, data_array.data_type());
} | rust_cleaned_test_functions.jsonl/102160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
3858,
368,
341,
262,
1077,
5206,
7363,
284,
51460,
1857,
3297,
27638,
72,
21,
19,
6831,
4197,
35603,
7,
16,
21,
317,
262,
1077,
821,
3858,
25,
43376,
1072,
21,
19,
1857,
284,
7363,
4008... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flatten_grammar_with_final_precedence() {
let result = flatten_variable(Variable {
name: "test".to_string(),
kind: VariableType::Named,
rule: Rule::prec_left(
Precedence::Integer(101),
Rule::seq(vec![Rule::non_terminal(1... | rust_cleaned_test_functions.jsonl/122535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 852
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
14456,
62,
41094,
6615,
20676,
10442,
1998,
763,
368,
341,
286,
1077,
1102,
284,
45343,
14635,
7,
7827,
341,
310,
829,
25,
330,
1944,
3263,
983,
3904,
3148,
310,
3093,
25,
12407,
929,
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_delta() {
let mut rng = rand::thread_rng();
let y = Scalar::random(&mut rng);
let z = Scalar::random(&mut rng);
// Choose n = 256 to ensure we overflow the group order during
let n = 256;
// code copied from previous implementation
... | rust_cleaned_test_functions.jsonl/17372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26710,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
379,
284,
35176,
486,
11463,
2099,
6984,
28422,
317,
286,
1077,
1147,
284,
35176,
486,
11463,
2099,
6984,
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_resolve_module_5() {
let (_temp_dir, deno_dir) = test_setup();
let module_specifier = "http://localhost:4545/tests/subdir/mod2.ts";
let containing_file = add_root!("/deno/tests/006_url_imports.ts");
let expected_module_name = "http://localhost:4545/tests/subdir/mod2.ts";
let expected_... | rust_cleaned_test_functions.jsonl/42048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
10750,
62,
20,
368,
341,
220,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
220,
1077,
4688,
13594,
3049,
284,
330,
1254,
1110,
8301,
25,
19,
20,
19,
20,
62468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_human_formatted() {
assert_eq!(dur(10, 4), parse_dur("10m 4s").unwrap());
assert_eq!(dur(19, 3), parse_dur("19m3s").unwrap());
assert_eq!(dur(0, 10), parse_dur(" 10 ").unwrap());
assert_eq!(dur(0, 9), parse_dur("6s 3s").unwrap()); // Units are added
asse... | rust_cleaned_test_functions.jsonl/51536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86247,
86610,
368,
341,
286,
2060,
10714,
10297,
70692,
7,
16,
15,
11,
220,
19,
701,
4715,
82289,
445,
16,
15,
76,
220,
19,
82,
1827,
15454,
1423,
286,
2060,
10714,
10297,
70692,
7,
16,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_timeout() {
let (mut pm, mut timeout_rx) = make_pacemaker();
// jump start the pacemaker
pm.process_certificates(Some(0), None, None);
for _ in 0..2 {
let round = block_on(timeout_rx.next()).unwrap();
// round for timeout is not changed as no timeo... | rust_cleaned_test_functions.jsonl/9072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
20537,
368,
341,
262,
1077,
320,
6984,
8836,
11,
5206,
9632,
24330,
8,
284,
1281,
620,
580,
58675,
1428,
262,
442,
7784,
1191,
279,
22894,
58675,
198,
262,
8836,
16988,
37097,
24405,
65405,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_process_unknown_command() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
// This command does not exist.
let reset_reponse = ctap_state.process_command(&... | rust_cleaned_test_functions.jsonl/35319 | {
"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,
11305,
57507,
10811,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
7,
1423,
286,
1077,
5206,
20251,
391,
4387,
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_parse_invalid_framing() {
let input = "--BEGIN data-----
-----END data-----";
assert_eq!(parse(&input), Err(PemError::MalformedFraming));
} | rust_cleaned_test_functions.jsonl/61389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31433,
761,
2396,
287,
368,
341,
286,
1077,
1946,
284,
14482,
37588,
821,
34764,
286,
34703,
4689,
821,
15081,
876,
286,
2060,
10714,
10297,
6400,
2099,
1355,
701,
15495,
5304,
336,
1454,
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 |
#[test]
fn test_trim_end_matches() {
let tests: Vec<(_, _, _)> = vec![
("/a/b/cde/", "/", "/a/b/cde"),
("\nhello\nworld\n", "\n", "\nhello\nworld"),
(", hello, world, ", ", ", ", hello, world"),
];
for (input, pat, expected) in tests {
let ... | rust_cleaned_test_functions.jsonl/119640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70025,
6213,
38344,
368,
341,
286,
1077,
7032,
25,
11312,
27,
41117,
8358,
716,
16018,
284,
7486,
90515,
310,
88889,
64,
3470,
2899,
450,
28105,
64657,
3521,
64,
3470,
2899,
450,
4461,
310,
51658,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fq_repr_is_zero() {
assert!(BigInteger256::from(0).is_zero());
assert!(!BigInteger256::from(1).is_zero());
assert!(!BigInteger256([0, 0, 1, 0]).is_zero());
} | rust_cleaned_test_functions.jsonl/3540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
68535,
6892,
19359,
368,
341,
262,
2060,
10297,
53219,
17,
20,
21,
486,
1499,
7,
15,
568,
285,
19359,
1423,
262,
2060,
0,
3471,
53219,
17,
20,
21,
486,
1499,
7,
16,
568,
285,
19359,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encoder_send() {
fn check_send<S: Send>(_: &S) {}
let enc = EncoderBuilder::new().build(Vec::new());
check_send(&enc);
} | rust_cleaned_test_functions.jsonl/118878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39068,
13565,
368,
341,
286,
5168,
1779,
13565,
18858,
25,
11000,
2235,
23211,
609,
50,
8,
5613,
286,
1077,
3209,
284,
55115,
3297,
486,
931,
1005,
5834,
49923,
486,
931,
1423,
286,
1779,
13565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_simpleslicedeserializer_impl() {
let data: [u8; 4] = [0; 4];
let mut v = SimpleSliceDeserializer::new(&data);
for i in 0..4 {
v.offset = i;
assert_eq!(v.offset(), i);
assert_eq!(v.avaliable(), 4 - i);
for r in 0..v.avaliable() {
v.can_read... | rust_cleaned_test_functions.jsonl/90004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
6664,
642,
415,
58526,
41939,
21007,
368,
341,
262,
1077,
821,
25,
508,
84,
23,
26,
220,
19,
60,
284,
508,
15,
26,
220,
19,
935,
262,
1077,
5206,
348,
284,
8993,
33236,
80097,
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... | 3 |
#[test]
fn test_parse_int() {
assert_eq!(parse_int::<u16>(b"0"), Some(0));
assert_eq!(parse_int::<u8>(b"12"), Some(12));
assert_eq!(parse_int::<u16>(b"2018"), Some(2018));
assert_eq!(parse_int::<u32>(b"2018"), Some(2018));
assert_eq!(parse_int::<u32>(b"01d8"), None);
... | rust_cleaned_test_functions.jsonl/100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4042,
368,
341,
286,
2060,
10714,
10297,
6400,
4042,
27638,
84,
16,
21,
2235,
65,
1,
15,
3975,
4329,
7,
15,
1106,
286,
2060,
10714,
10297,
6400,
4042,
27638,
84,
23,
2235,
65,
1,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_guide_library_rejects_mixed_length() {
let g1 = Guide::new(0, "foo-1", "ACGTCAGCATGCATGACGTT", "FOO", GuideType::Other);
let g2 = Guide::new(1, "foo-2", "GCTAGACTGGACTCTAATGCC", "FOO", GuideType::Other);
let result = GuideLibrary::new(vec![g1, g2]);
assert!(resul... | rust_cleaned_test_functions.jsonl/48768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80407,
39461,
1288,
583,
82,
717,
3286,
5118,
368,
341,
286,
1077,
342,
16,
284,
12712,
486,
931,
7,
15,
11,
330,
7975,
12,
16,
497,
330,
1706,
38,
7749,
1890,
28196,
22863,
828,
38,
1706,
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_primitive_array_gt_eq_scalar() {
cmp_i64_scalar!(
gt_eq_scalar,
vec![6, 7, 8, 9, 10, 6, 7, 8, 9, 10],
8,
vec![false, false, true, true, true, false, false, true, true, true]
);
} | rust_cleaned_test_functions.jsonl/36031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
37479,
10714,
41652,
368,
341,
286,
26089,
5318,
21,
19,
41652,
33673,
310,
25161,
10714,
41652,
345,
310,
7486,
20703,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
11,
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_record_schema_with_currently_parsing_schema() {
let schema = Schema::parse_str(
r#"
{
"type": "record",
"name": "test",
"fields": [{
"name": "recordField",
"type": {
... | rust_cleaned_test_functions.jsonl/108436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1701
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
25371,
6615,
11080,
398,
620,
28598,
25371,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
2,
698,
310,
341,
394,
330,
1313,
788,
330,
8548,
756,
394,
330,
606,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_move_iter() {
let v = SmallVector::zero();
let v: Vec<int> = v.move_iter().collect();
assert_eq!(Vec::new(), v);
let v = SmallVector::one(1);
assert_eq!(vec!(1), v.move_iter().collect());
let v = SmallVector::many(vec!(1, 2, 3));
assert_e... | rust_cleaned_test_functions.jsonl/86520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
11723,
368,
341,
286,
1077,
348,
284,
14994,
3781,
486,
14154,
543,
286,
1077,
348,
25,
11312,
4159,
29,
284,
348,
13635,
11723,
1005,
17384,
543,
286,
2060,
10714,
10297,
10050,
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_physical_memory_map_from_u32_gets_valid_segment() {
let address: u32 = 0x1000_0000;
let expected_map: PhysicalMap = PhysicalMap::CartridgeDomain1_2;
let result_map: PhysicalMap = PhysicalMap::from_u32(address);
assert_eq!(expected_map, result_map);
} | rust_cleaned_test_functions.jsonl/77138 | {
"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,
84980,
19195,
5376,
5673,
7300,
18,
17,
3062,
82,
8337,
28061,
368,
341,
220,
1077,
2621,
25,
575,
18,
17,
284,
220,
15,
87,
16,
15,
15,
15,
62,
15,
15,
15,
15,
280,
220,
1077,
3601,
5376,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_as_u64() {
let arr: Vec<u8> = (0..HASH_BYTES).map(|i| i as u8 + 1).collect();
let hash = Hash::new(&arr);
assert_eq!(CrdsFilter::hash_as_u64(&hash), 0x807060504030201);
} | rust_cleaned_test_functions.jsonl/82264 | {
"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,
8950,
11898,
7300,
21,
19,
368,
341,
286,
1077,
2890,
25,
11312,
34837,
23,
29,
284,
320,
15,
496,
70707,
40705,
568,
2186,
22428,
72,
91,
600,
438,
575,
23,
488,
220,
16,
568,
17384,
543,
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_export_to_json() {
let descriptor = "wpkh(xprv9s21ZrQH143K4CTb63EaMxja1YiTnSEWKMbn23uoEnAzxjdUJRQkazCAtzxGm4LSoTSVTptoV9RbchnKPW9HxKtZumdyxyikZFDLhogJ5Uj/44'/0'/0'/0/*)";
let change_descriptor = "wpkh(xprv9s21ZrQH143K4CTb63EaMxja1YiTnSEWKMbn23uoEnAzxjdUJRQkazCAtzxGm4LSoTSVTptoV9R... | rust_cleaned_test_functions.jsonl/21477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27114,
2346,
9455,
368,
341,
286,
1077,
16414,
284,
330,
8421,
30664,
2075,
649,
85,
24,
82,
17,
16,
57,
81,
48,
39,
16,
19,
18,
42,
19,
1162,
65,
21,
18,
36,
64,
44,
87,
5580,
16,
56,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_persist_app() {
block_on(async {
let config = config_generator();
let storage = Rc::new(Mutex::new(MemStorage::new()));
let app_set = make_test_app_set();
StateMachineBuilder::new(
StubPolicyEngine,
StubHttp... | rust_cleaned_test_functions.jsonl/126411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
8191,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
5819,
284,
81463,
486,
931,
3189,
9371,
486,
931,
3189,
336,
5793,
486,
931,
7392,
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_decode_tokens() -> Result<(), io::Error> {
// Given
let mut vocab_file = tempfile::NamedTempFile::new()?;
write!(vocab_file, "{{\"hello\": 1,\n \"world\": 0,\n \"<unk>\": 2,\n \"!\": 3\n}}")?;
let path = vocab_file.into_temp_path();
let openai_gpt_vocab = O... | rust_cleaned_test_functions.jsonl/25062 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
28838,
368,
1464,
5714,
68843,
6399,
486,
1454,
29,
341,
322,
286,
16246,
198,
286,
1077,
5206,
23820,
2458,
284,
54819,
486,
15810,
12151,
1703,
486,
931,
94136,
286,
3270,
10297,
86847,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_parallel_vs_sequential() {
let prod_ctor = || (0u32..100);
let xform_ctor = || do_some_work;
let result_xform = |acc: u32, x| acc.wrapping_add(x);
let prod = prod_ctor();
let par_r =
ParallelIterator::new(prod_ctor, xform_ctor).fold(0, &result_... | rust_cleaned_test_functions.jsonl/57636 | {
"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,
60625,
42434,
3453,
15838,
368,
341,
286,
1077,
14475,
54185,
284,
1369,
320,
15,
84,
18,
17,
496,
16,
15,
15,
317,
286,
1077,
856,
627,
54185,
284,
1369,
653,
61855,
11498,
280,
286,
1077,
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_no_maturity_increase_if_no_proposal() {
// Single neuron
assert_eq!(compute_maturities(vec![1], Vec::<&str>::new()), vec![0]);
// Two neurons
assert_eq!(
compute_maturities(vec![1, 5], Vec::<&str>::new()),
vec![0, 0]
);
} | rust_cleaned_test_functions.jsonl/1132 | {
"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,
6536,
717,
37854,
73807,
11119,
6536,
21663,
32556,
368,
341,
262,
442,
11327,
48284,
198,
262,
2060,
10714,
10297,
27706,
717,
2628,
1361,
25592,
20703,
16,
1125,
11312,
27638,
5,
495,
6831,
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_neuron_action_is_not_authorized() {
local_test_on_sns_subnet(|runtime| async move {
let neuron_owner = Sender::from_keypair(&TEST_USER1_KEYPAIR);
let unauthorized_caller = Sender::from_keypair(&TEST_USER2_KEYPAIR);
let neuron_owner_account_identifier =
Ac... | rust_cleaned_test_functions.jsonl/107250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
36090,
7931,
6892,
7913,
62,
19084,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
48284,
29027,
284,
54610,
486,
1499,
3097,
12670,
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... | 2 |
#[test]
fn test_message_unique_program_ids() {
let program_id0 = Pubkey::default();
let program_ids = get_program_ids(&[
Instruction::new_with_bincode(program_id0, &0, vec![]),
Instruction::new_with_bincode(program_id0, &0, vec![]),
]);
assert_eq!(program_... | rust_cleaned_test_functions.jsonl/55512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
21218,
25096,
8077,
368,
341,
286,
1077,
2025,
842,
15,
284,
22611,
792,
486,
2258,
543,
286,
1077,
2025,
8077,
284,
633,
25096,
8077,
2099,
9640,
310,
29051,
486,
931,
6615,
21816,
1851,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lograte_env() {
assert_ne!(DEFAULT_LOG_RATE, 0);
let _writelock = get_env_lock().write();
static mut COUNTER: Counter = create_counter!("test_lograte_env", 0, 1);
env::set_var("SOLANA_DEFAULT_LOG_RATE", "50");
inc_counter!(COUNTER, Level::Error, 2);
... | rust_cleaned_test_functions.jsonl/92061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
7698,
15879,
368,
341,
286,
2060,
13925,
10297,
17285,
8419,
29108,
11,
220,
15,
317,
286,
1077,
716,
86,
58962,
1176,
284,
633,
15879,
9818,
1005,
4934,
543,
286,
1099,
5206,
356,
35019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_containing() {
let mut map = HashMap::new();
map.insert("hey", 1);
let tests = vec![
(to_value("hello world").unwrap(), to_value("hel").unwrap(), true),
(to_value("hello world").unwrap(), to_value("hol").unwrap(), false),
(to_value(vec... | rust_cleaned_test_functions.jsonl/125455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10260,
2056,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
2415,
7030,
445,
35561,
497,
220,
16,
626,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
983,
3142,
445,
14990,
1879,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_slice_serialize_deserialize() {
let config = ReadConfig {
error_on_trailing_bytes: true,
};
let test = Test {
slice: b"Hello there",
};
let mut slice = [0u8; 1024];
let length = binver::write_to_slice(&mut slice, &test).unwrap();
assert_eq!(slice[6.... | rust_cleaned_test_functions.jsonl/103509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
88686,
15768,
9050,
368,
341,
262,
1077,
2193,
284,
4457,
2648,
341,
286,
1465,
4470,
3547,
14277,
12524,
25,
830,
345,
262,
3634,
262,
1077,
1273,
284,
3393,
341,
286,
15983,
25,
293,
1,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_algo_with_prefix_to_url() {
let mock_client = mock_client();
let algorithm = mock_client.algo("algo://anowell/Pinky/0.1");
assert_eq!(
algorithm.to_url().unwrap().path(),
"/v1/algo/anowell/Pinky/0.1"
);
} | rust_cleaned_test_functions.jsonl/692 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76993,
6615,
13974,
2346,
2903,
368,
341,
286,
1077,
7860,
8179,
284,
7860,
8179,
543,
286,
1077,
12111,
284,
7860,
8179,
12168,
3346,
445,
72464,
1110,
276,
79499,
16341,
38034,
14,
15,
13,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_dependencies() {
fn do_check(toml: &str, expected: Vec<Dependency>) {
let cargo_toml = CargoToml::new(toml).unwrap();
assert_eq!(cargo_toml.dependencies(), expected);
}
do_check(r#"
[dependencies]
foo = "1.0"
bar = { git = "https://example.com" }
[dependencies.b... | rust_cleaned_test_functions.jsonl/99638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
71841,
368,
341,
262,
5168,
653,
7200,
1155,
316,
75,
25,
609,
495,
11,
3601,
25,
11312,
27,
36387,
9231,
341,
286,
1077,
25652,
528,
316,
75,
284,
61288,
24732,
75,
486,
931,
1155,
316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_thread_task() {
let myself = Process::myself().unwrap();
let task = myself.task_main_thread().unwrap();
check_unwrap(&myself, task.stat());
} | rust_cleaned_test_functions.jsonl/17534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11027,
10814,
12184,
368,
341,
262,
1077,
7037,
284,
8603,
486,
2408,
721,
1005,
15454,
543,
262,
1077,
3383,
284,
7037,
15034,
11027,
10814,
1005,
15454,
543,
262,
1779,
4907,
10097,
2099,
2408,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_json_block() {
let n = Block {
base: BaseNode::default(),
body: vec![Statement::Expr(ExprStmt {
base: BaseNode::default(),
expression: Expression::StringLit(StringLit {
base: Default::default(),
value: "hello".to_string(... | rust_cleaned_test_functions.jsonl/40417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
7113,
368,
341,
262,
1077,
308,
284,
8362,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
2487,
25,
7486,
20703,
8636,
486,
16041,
7,
16041,
31063,
341,
310,
2331,
25,
5351,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_auto_import_split_common_target_longer() {
check_assist(
add_import,
"
use std::fmt::Debug;
impl std::fmt::nested::Display<|> for Foo {
}
",
"
use std::fmt::{ nested::Display, Debug};
impl Display<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/39957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27740,
18434,
17052,
21107,
11123,
17799,
261,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
18434,
345,
310,
6228,
810,
1460,
486,
12501,
486,
7939,
401,
6383,
1460,
486,
12501,
486,
59271,
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... | 1 |
#[test]
fn test_disk_backing_file_helper() {
let num_sectors = 2;
let f = TempFile::new().unwrap();
let size = SECTOR_SIZE * num_sectors;
f.as_file().set_len(size).unwrap();
let disk_properties =
DiskProperties::new(String::from(f.as_path().to_str().unwrap())... | rust_cleaned_test_functions.jsonl/73913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41687,
3895,
287,
2458,
10418,
368,
341,
286,
1077,
1629,
3453,
12532,
284,
220,
17,
280,
286,
1077,
282,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
1379,
284,
5052,
26275,
4098,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_vcx_schema_get_attrs_with_pool() {
let _setup = SetupLibraryWalletPoolZeroFees::init();
let (schema_id, _) = libindy::utils::anoncreds::tests::create_and_write_test_schema(utils::constants::DEFAULT_SCHEMA_ATTRS);
let cb = return_types_u32::Return_U32_U32_STR::new().unwr... | rust_cleaned_test_functions.jsonl/118201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
25371,
3062,
39578,
6615,
15709,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16915,
38259,
10551,
17999,
37,
5516,
486,
2327,
1428,
286,
1077,
320,
17349,
842,
11,
27439,
284,
3051,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_maximum_too_low() {
let array = [0u8; 2048];
FastCDC::new(&array, 64, 256, 1023);
} | rust_cleaned_test_functions.jsonl/32055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93581,
2346,
78,
23767,
368,
341,
286,
1077,
1334,
284,
508,
15,
84,
23,
26,
220,
17,
15,
19,
23,
935,
286,
17288,
73458,
486,
931,
2099,
1653,
11,
220,
21,
19,
11,
220,
17,
20,
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 |
#[test]
fn test_verify_root_mismatch() {
let (root, proof, _) = test_generate_proof::<NoExtensionLayout>(
test_entries(),
vec![b"bravo"],
);
let items = vec![
(b"bravo", Some("incorrect")),
];
match verify_proof::<NoExtensionLayout, _, _, _>(&root, &proof, items.iter()) {
Err(VerifyError::RootMism... | rust_cleaned_test_functions.jsonl/56662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
12993,
717,
24976,
368,
341,
10217,
320,
2888,
11,
11064,
11,
27439,
284,
1273,
48851,
86757,
27638,
2753,
12049,
2175,
17055,
197,
18185,
26092,
3148,
197,
40213,
20703,
65,
1,
1323,
27217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_less_than() {
assert_expression!(
"A < B",
Expression::BinaryExpression(
Operator::Less,
Box::new("A".as_var_expr(1, 7)),
Box::new("B".as_var_expr(1, 11)),
ExpressionType::Unresolved
)
... | rust_cleaned_test_functions.jsonl/102631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50747,
51613,
368,
341,
286,
2060,
28068,
33673,
310,
330,
32,
366,
425,
756,
310,
16378,
486,
21338,
9595,
1006,
394,
28498,
486,
27451,
345,
394,
8261,
486,
931,
445,
32,
3263,
300,
4612,
2191... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes_compare() {
let pairs: Vec<(&[u8], &[u8], _)> = vec![
(b"", b"\x00", Ordering::Less),
(b"\x00", b"\x00", Ordering::Equal),
(b"\xFF", b"\x00", Ordering::Greater),
(b"\xFF", b"\xFF\x00", Ordering::Less),
(b"a", b"b", ... | rust_cleaned_test_functions.jsonl/55211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
12524,
32235,
368,
341,
286,
1077,
13530,
25,
11312,
27,
2099,
58,
84,
23,
1125,
44590,
84,
23,
1125,
716,
16018,
284,
7486,
90515,
310,
320,
65,
56323,
293,
11934,
87,
15,
15,
497,
686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_config_defaults_with_serialization() {
let _ = env_logger::builder().is_test(true).try_init();
if serde_json::from_str::<ConfigurationSpec>(r#"{}"#).is_ok() {
panic!("discovery handler is required");
}
serde_json::from_str::<ConfigurationSpec>(
... | rust_cleaned_test_functions.jsonl/34768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 566
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
42290,
6615,
25602,
2022,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
17850,
1005,
285,
4452,
3715,
568,
1539,
6137,
1428,
286,
421,
61570,
9455,
486,
1499,
2895,
27638,
7688,
8327,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_update_epoch_slots_new_root() {
let mut current_root = 0;
let mut completed_slots = BTreeSet::new();
let node_info = Node::new_localhost_with_address(&BvmAddr::default());
let node_group_info = RwLock::new(NodeGroupInfo::new_with_invalid_keypair(
node... | rust_cleaned_test_functions.jsonl/20953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
20682,
54161,
5921,
12993,
368,
341,
286,
1077,
5206,
1482,
12993,
284,
220,
15,
401,
286,
1077,
5206,
8145,
54161,
284,
425,
6533,
1649,
486,
931,
543,
286,
1077,
2436,
3109,
284,
6018,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_in_out() {
#[api_v2_schema]
#[derive(Serialize, Deserialize)]
enum Sort {
Asc,
Desc,
}
#[api_v2_schema]
#[derive(Serialize, Deserialize)]
struct Params {
sort: Option<Sort>,
limit: Option<u16>,
}
#[api_v2_operation]
f... | rust_cleaned_test_functions.jsonl/95584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
1243,
6068,
368,
341,
262,
11506,
2068,
2273,
17,
25371,
921,
262,
11506,
27098,
3759,
9050,
11,
48440,
5563,
262,
7618,
15967,
341,
286,
39560,
345,
286,
31185,
345,
262,
555,
262,
11506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_internal_fn_big() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(
engine.eval::<INT>(
"
fn math_me(a, b, c, d, e, f) {
a - b * c + d * e - f
}
math_me(100, 5, 2, 9, 6, 32)... | rust_cleaned_test_functions.jsonl/131007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23472,
15246,
36386,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
4712,
284,
8200,
486,
931,
1428,
262,
2060,
10714,
33673,
286,
4712,
31710,
27638,
3221,
17055,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_send_generic_message_fails_with_invalid_connection() {
init!("true");
let handle = ::connection::tests::build_test_connection();
match send_generic_message(handle, "this is the message", "type", "title") {
Ok(x) => panic!("test shoudl fail: {}", x),
... | rust_cleaned_test_functions.jsonl/75280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
41232,
6462,
761,
6209,
6615,
31433,
15866,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
3705,
284,
3504,
7742,
486,
23841,
486,
5834,
4452,
15866,
1428,
286,
2432,
3624,
41232,
6462,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_or_as_filename() {
new_ucmd!()
.args(&["x", "-a", "-z", "-o"])
.run()
.status_code(1);
} | rust_cleaned_test_functions.jsonl/11035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
11898,
13323,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
87,
497,
6523,
64,
497,
6523,
89,
497,
6523,
78,
14108,
286,
659,
6108,
741,
286,
659,
2829,
4136,
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 |
#[test]
fn test_direct_read_write() {
let path = tempdir_with_prefix("_rust_rocksdb_direct_read_write");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
opts.set_use_direct_reads(true);
opts.set_use_direct_io_for_flush_and_compaction(true);
DB::open(opts, path.path().to_st... | rust_cleaned_test_functions.jsonl/34112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32871,
6443,
9165,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
32871,
6443,
9165,
797,
262,
1077,
5206,
12185,
284,
5952,
3798,
486,
931,
543,
262,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_angle_x() {
let angle: Radians<f64> = Radians::full_turn_div_4();
let unit_y = Vector3::unit_y();
let unit_z = Vector3::unit_z();
let matrix = Matrix4x4::from_affine_angle_x(angle);
let expected = unit_z.extend(0.0);
let result = matrix * unit... | rust_cleaned_test_functions.jsonl/129124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
3212,
368,
341,
286,
1077,
9210,
25,
431,
20736,
63895,
21,
19,
29,
284,
431,
20736,
486,
8878,
37274,
16237,
62,
19,
543,
286,
1077,
4982,
4178,
284,
4196,
18,
486,
3843,
4178,
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_drop_panic() {
let (array, receiver) = default_drop();
assert_eq!(receiver.try_recv().ok(), None);
let result = thread::spawn(move || {
array.set(DroppableElement::new(1, None));
})
.join();
assert!(result.is_err());
let in... | rust_cleaned_test_functions.jsonl/13511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
620,
31270,
368,
341,
286,
1077,
320,
1653,
11,
13964,
8,
284,
1638,
29584,
1428,
286,
2060,
10714,
10297,
37553,
48779,
36118,
1005,
562,
1507,
2240,
626,
286,
1077,
1102,
284,
4516,
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... | 2 |
#[test]
fn test_is_valid_password() {
assert_eq!(is_valid_password(112233), true);
assert_eq!(is_valid_password(123444), false);
assert_eq!(is_valid_password(111122), true);
} | rust_cleaned_test_functions.jsonl/82656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8337,
10122,
368,
341,
6948,
10714,
10297,
285,
8337,
10122,
7,
16,
16,
17,
17,
18,
18,
701,
830,
317,
6948,
10714,
10297,
285,
8337,
10122,
7,
16,
17,
18,
19,
19,
19,
701,
895,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hierarchy_on_def() {
check_hierarchy(
r#"
//- /lib.rs
fn call$0ee() {}
fn caller() {
callee();
}
"#,
expect![["callee Function FileId(0) 0..14 3..9"]],
expect![["caller Function FileId(0) 15..44 18..24 : [33..39]"]],
expect![[]],
... | rust_cleaned_test_functions.jsonl/38285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
95043,
4470,
7844,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
8822,
1618,
3,
15,
2127,
368,
5613,
8822,
19865,
368,
341,
262,
94800,
543,
532,
57676... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_special_tokens() {
let trainer = UnigramTrainerBuilder::default()
.show_progress(false)
.special_tokens(vec![
AddedToken::from("[SEP]", true),
AddedToken::from("[CLS]", true),
])
.build()
.unwrap(... | rust_cleaned_test_functions.jsonl/18988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41629,
28838,
368,
341,
286,
1077,
28894,
284,
1230,
49127,
1282,
1743,
3297,
486,
2258,
741,
310,
659,
3445,
27200,
3576,
340,
310,
659,
15144,
28838,
25592,
90515,
394,
17684,
3323,
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... | 1 |
#[test]
fn test_arginfo_cmp() {
let info = flag!("-foo", FooFlag);
assert_eq!(info.cmp("-foo"), Ordering::Equal);
assert_eq!(info.cmp("bar"), Ordering::Less);
assert_eq!(info.cmp("-bar"), Ordering::Greater);
assert_eq!(info.cmp("-qux"), Ordering::Less);
assert_eq!... | rust_cleaned_test_functions.jsonl/16227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6057,
2733,
35193,
368,
341,
286,
1077,
3546,
284,
5181,
0,
13645,
7975,
497,
33428,
12135,
317,
286,
2060,
10714,
10297,
2733,
520,
1307,
13645,
7975,
3975,
68621,
486,
2993,
317,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_call_superclass() {
let hdr = indoc! {"
#include <memory>
class A {
public:
virtual void foo() const {};
virtual ~A() {}
};
class B : public A {
public:
void bar() const {}
};
inline std::unique_ptr<B> get_b() { return std::make_unique<... | rust_cleaned_test_functions.jsonl/9975 | {
"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,
13429,
38886,
1040,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
17269,
397,
262,
536,
362,
341,
262,
584,
510,
286,
4108,
737,
15229,
368,
733,
9321,
286,
4108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pacemaker_time_interval() {
let interval = ExponentialTimeInterval::new(Duration::from_millis(3000), 1.5, 2);
assert_eq!(3000, interval.get_round_duration(0).as_millis());
assert_eq!(4500, interval.get_round_duration(1).as_millis());
assert_eq!(
6750,
interval.ge... | rust_cleaned_test_functions.jsonl/9071 | {
"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,
620,
580,
58675,
3009,
20541,
368,
341,
262,
1077,
9873,
284,
1374,
59825,
68041,
486,
931,
64114,
486,
1499,
717,
56212,
7,
18,
15,
15,
15,
701,
220,
16,
13,
20,
11,
220,
17,
317,
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 |
#[test]
fn test_find_subsequences() {
assert_eq!(
Solution::find_subsequences(vec![4, 6, 7, 7]),
vec![
vec![4, 6],
vec![4, 6, 7],
vec![4, 6, 7, 7],
vec![4, 7],
vec![4, 7, 7],
vec![6, 7... | rust_cleaned_test_functions.jsonl/60427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5228,
61708,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
3903,
5228,
61708,
25592,
20703,
19,
11,
220,
21,
11,
220,
22,
11,
220,
22,
17036,
310,
7486,
90515,
394,
7486,
20703,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_swab_256_test() {
new_ucmd!()
.args(&["conv=swab"])
.pipe_in_fixture("seq-byte-values.test")
.succeeds()
.stdout_is_fixture_bytes("seq-byte-values-swapped.test");
} | rust_cleaned_test_functions.jsonl/99856 | {
"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,
32581,
370,
62,
17,
20,
21,
4452,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12027,
28,
2280,
370,
14108,
286,
659,
13768,
1243,
74409,
445,
13262,
53952,
69050,
5958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bloom_indexer_single_column_prune() -> Result<()> {
struct Test {
name: &'static str,
expr: Expression,
expected_eval_result: BloomFilterExprEvalResult,
}
let tests: Vec<Test> = vec![
Test {
name: "ColumnUInt8 = 34",
expr: col(... | rust_cleaned_test_functions.jsonl/101376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 738
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
18474,
3560,
261,
19487,
8744,
5294,
2886,
368,
1464,
5714,
71698,
341,
262,
2036,
3393,
341,
286,
829,
25,
30136,
1978,
607,
345,
286,
15169,
25,
16378,
345,
286,
3601,
21296,
5287,
25,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bounding_box() {
let layout = Layout::new(Vector::new(13, 2), Vertex::new(2, 0), 10, 10);
let s = Tile::new(3, 4);
assert_eq!(layout.bounding_box_of(s), (23, 42, 10, 10));
} | rust_cleaned_test_functions.jsonl/95168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
13586,
10194,
368,
341,
286,
1077,
6789,
284,
13821,
486,
931,
20258,
486,
931,
7,
16,
18,
11,
220,
17,
701,
23225,
486,
931,
7,
17,
11,
220,
15,
701,
220,
16,
15,
11,
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_spj_0_with_re() {
let task = generate_judge_task(SOURCE_RE, PROBLEM);
let judge = Judge::new();
for report in judge.judge(task) {
match report {
Report::RuntimeError => {}
res => panic!("Wrong judge result: {}", res),
}
}
} | rust_cleaned_test_functions.jsonl/52122 | {
"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,
10123,
73,
62,
15,
6615,
1288,
368,
341,
262,
1077,
3383,
284,
6923,
5374,
19561,
12184,
3759,
13077,
2192,
11,
5308,
69292,
317,
262,
1077,
11651,
284,
20207,
486,
931,
543,
262,
369,
1895,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersection_size_hint() {
let x = BTreeSet::from([3, 4]);
let y = BTreeSet::from([1, 2, 3]);
let mut iter = x.intersection(&y);
assert_eq!(iter.size_hint(), (1, Some(1)));
assert_eq!(iter.next(), Some(&3));
assert_eq!(iter.size_hint(), (0, Some(0)));
assert_eq!(iter.... | rust_cleaned_test_functions.jsonl/13736 | {
"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,
82558,
2368,
45825,
368,
341,
262,
1077,
856,
284,
425,
6533,
1649,
486,
1499,
2561,
18,
11,
220,
19,
2558,
262,
1077,
379,
284,
425,
6533,
1649,
486,
1499,
2561,
16,
11,
220,
17,
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_mut_rev_iterator() {
let mut xs = [1, 2, 3, 4, 5];
for (i, x) in xs.iter_mut().rev().enumerate() {
*x += i;
}
assert!(xs == [5, 5, 5, 5, 5])
} | rust_cleaned_test_functions.jsonl/12891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
38082,
13491,
368,
341,
262,
1077,
5206,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
369,
320,
72,
11,
856,
8,
304,
11943,
19471,
29523,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_encode_many() {
let pems = parse_many(SAMPLE_CRLF);
let encoded = encode_many(&pems);
assert_eq!(SAMPLE_CRLF, encoded);
} | rust_cleaned_test_functions.jsonl/61397 | {
"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,
11224,
22101,
368,
341,
286,
1077,
281,
11852,
284,
4715,
22101,
3759,
18918,
920,
80658,
317,
286,
1077,
20498,
284,
16164,
22101,
2099,
79,
11852,
626,
286,
2060,
10714,
10297,
82725,
920,
80658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_serde_stakes_enum_compat() {
#[derive(Debug, PartialEq, Deserialize, Serialize)]
struct Dummy {
head: String,
#[serde(with = "serde_stakes_enum_compat")]
stakes: Arc<StakesEnum>,
tail: String,
}
let mut rng = rand::t... | rust_cleaned_test_functions.jsonl/22044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
1261,
2050,
31054,
89602,
368,
341,
286,
11506,
27098,
42618,
11,
55039,
11,
48440,
11,
39900,
5563,
286,
2036,
50567,
341,
310,
1968,
25,
923,
345,
310,
11506,
47024,
16980,
284,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_example_1_1() {
assert_eq!(
solve_1(&parse("80871224585914546619083218645595")),
String::from("24176176")
);
} | rust_cleaned_test_functions.jsonl/103743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
62,
16,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
11625,
62,
16,
2099,
6400,
445,
23,
15,
23,
22,
16,
17,
17,
19,
20,
23,
20,
24,
16,
19,
20,
19,
21,
21,
16,
24,
15,
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_mut_chunks_rev() {
let mut v = [0u8, 1, 2, 3, 4, 5, 6];
for (i, chunk) in v.chunks_mut(3).rev().enumerate() {
for x in chunk.iter_mut() {
*x = i as u8;
}
}
let result = [2u8, 2, 2, 1, 1, 1, 0];
assert!(v == result);
... | rust_cleaned_test_functions.jsonl/31859 | {
"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,
29523,
65470,
38082,
368,
341,
286,
1077,
5206,
348,
284,
508,
15,
84,
23,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
286,
369,
320,
72,
11,
11879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_expand_template() {
let rv = expand_template("{{ {foo} {bar} }}", |var| var.key.to_uppercase());
assert_eq!(&rv, "{ FOO BAR }");
} | rust_cleaned_test_functions.jsonl/76136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67875,
8693,
368,
341,
262,
1077,
17570,
284,
9225,
8693,
445,
2979,
314,
7975,
92,
314,
2257,
92,
3869,
497,
760,
947,
91,
762,
4735,
2389,
34445,
5638,
1423,
262,
2060,
10714,
0,
2099,
10553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_tiledinputpart_level_height_failure_invalid_level() {
let input = MultiPartInputFile::new(&*SRC_IMAGE_PATH, 0, true).unwrap();
let tiled_input_part = super::TiledInputPart::new(&input, 0);
tiled_input_part.level_height(i32::MIN).unwrap();
} | rust_cleaned_test_functions.jsonl/59304 | {
"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,
528,
2181,
1355,
4480,
8274,
9561,
43618,
31433,
8274,
368,
341,
286,
1077,
1946,
284,
17439,
5800,
2505,
1703,
486,
931,
2099,
9,
56017,
19121,
7944,
11,
220,
15,
11,
830,
568,
15454,
543,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_capture_quantifiers() {
struct Row {
description: &'static str,
language: Language,
pattern: &'static str,
capture_quantifiers: &'static [(usize, &'static str, CaptureQuantifier)],
}
let rows = &[
// Simple quantifiers
Row {
... | rust_cleaned_test_functions.jsonl/77482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4750
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55148,
53346,
11836,
368,
341,
262,
2036,
10801,
341,
286,
4008,
25,
30136,
1978,
607,
345,
286,
4128,
25,
11434,
345,
286,
5383,
25,
30136,
1978,
607,
345,
286,
12322,
53346,
11836,
25,
30136,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_str() {
assert_eq!(from_str("\""), Err(SyntaxError(EOFWhileParsingString, 1, 2)));
assert_eq!(from_str("\"lol"), Err(SyntaxError(EOFWhileParsingString, 1, 5)));
assert_eq!(from_str("\"\""), Ok(String("".to_string())));
assert_eq!(from_str("\"foo\""), Ok(S... | rust_cleaned_test_functions.jsonl/41698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2895,
368,
341,
286,
2060,
10714,
10297,
1499,
2895,
38915,
3975,
262,
15495,
93549,
1454,
7,
23483,
7983,
68839,
703,
11,
220,
16,
11,
220,
17,
4945,
286,
2060,
10714,
10297,
1499,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kubeconfig_path() {
let expect_str = "/fake/.kube/config";
env::set_var(KUBECONFIG, expect_str);
assert_eq!(PathBuf::from(expect_str), kubeconfig_path().unwrap());
} | rust_cleaned_test_functions.jsonl/94957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
3760,
1676,
2638,
368,
341,
286,
1077,
1720,
2895,
284,
3521,
30570,
11930,
97717,
14730,
876,
286,
6105,
486,
746,
4612,
16738,
42389,
24652,
11,
1720,
2895,
317,
286,
2060,
10714,
10297,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_make_mac() {
let key = key();
let mac = Mac::new(
MacType::Header,
&key,
sys_time(1000, 100),
"nonny",
"POST",
"mysite.com",
443,
"/v1/api",
None,
None,
... | rust_cleaned_test_functions.jsonl/52131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
22802,
368,
341,
286,
1077,
1376,
284,
1376,
543,
286,
1077,
8978,
284,
7401,
486,
931,
1006,
310,
7401,
929,
486,
4047,
345,
310,
609,
792,
345,
310,
5708,
3009,
7,
16,
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... | 1 |
#[test]
fn test_map_no_available_assoc_id() {
let mut aid_map: Map = Default::default();
for i in 0..31 {
aid_map.aids[i] = u64::max_value();
}
// Set the remaining 24 aids in the last array positions
for i in 0..24 {
aid_map.aids[31] += 1... | rust_cleaned_test_functions.jsonl/42226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
6536,
26962,
18891,
842,
368,
341,
286,
1077,
5206,
12296,
5376,
25,
5027,
284,
7899,
486,
2258,
543,
1789,
286,
369,
600,
304,
220,
15,
496,
18,
16,
341,
310,
12296,
5376,
5849,
3365,
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... | 3 |
#[test]
fn test_iter() {
let mut iter = ArrayVec::from([1, 2, 3]).into_iter();
assert_eq!(iter.size_hint(), (3, Some(3)));
assert_eq!(iter.next_back(), Some(3));
assert_eq!(iter.next(), Some(1));
assert_eq!(iter.next_back(), Some(2));
assert_eq!(iter.size_hint(), (0, Some(0)));
asser... | rust_cleaned_test_functions.jsonl/36763 | {
"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,
11723,
368,
341,
262,
1077,
5206,
5367,
284,
2910,
10050,
486,
1499,
2561,
16,
11,
220,
17,
11,
220,
18,
10697,
18122,
11723,
543,
262,
2060,
10714,
10297,
2015,
2486,
45825,
1507,
320,
18,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_class_declaration() {
expect_printed("class A {}", "class A {}");
expect_printed("class A extends B {}", "class A extends B {}");
expect_printed("class A { b() {} }", "class A { b() {} }");
expect_printed("class A { null() {} }", "class A { null() {} }");
expect_printed("clas... | rust_cleaned_test_functions.jsonl/93451 | {
"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,
4790,
77926,
368,
341,
262,
1720,
10064,
291,
445,
1040,
362,
24689,
330,
1040,
362,
4687,
797,
262,
1720,
10064,
291,
445,
1040,
362,
2239,
425,
24689,
330,
1040,
362,
2239,
425,
4687,
797,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval() {
let result = Packet::parse("C200B40A82\n").unwrap().eval();
assert_eq!(result, 3);
let result = Packet::parse("04005AC33890").unwrap().eval();
assert_eq!(result, 54);
let result = Packet::parse("880086C3E88112").unwrap().eval();
assert_eq!... | rust_cleaned_test_functions.jsonl/129858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
368,
341,
286,
1077,
1102,
284,
28889,
486,
6400,
445,
34,
17,
15,
15,
33,
19,
15,
32,
23,
17,
1699,
1827,
15454,
1005,
14170,
543,
286,
2060,
10714,
10297,
1382,
11,
220,
18,
317,
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_list_primitive_accessors() {
// primitives
let list = make_list(vec![Field::Bool(false)]);
assert_eq!(false, list.get_bool(0).unwrap());
let list = make_list(vec![Field::Byte(3), Field::Byte(4)]);
assert_eq!(4, list.get_byte(1).unwrap());
let list = make_list(vec![Field... | rust_cleaned_test_functions.jsonl/43813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
84087,
12759,
1087,
368,
341,
262,
442,
71194,
198,
262,
1077,
1140,
284,
1281,
2019,
25592,
20703,
1877,
486,
11233,
3576,
41958,
262,
2060,
10714,
10297,
3849,
11,
1140,
670,
22159,
7,
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_invalid_request() {
let mut block = default_block();
let mem = default_mem();
let vq = VirtQueue::new(GuestAddress(0), &mem, 16);
block.set_queue(0, vq.create_queue());
block.activate(mem.clone()).unwrap();
initialize_virtqueue(&vq);
let r... | rust_cleaned_test_functions.jsonl/73917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
7893,
368,
341,
286,
1077,
5206,
2504,
284,
1638,
7113,
543,
286,
1077,
1833,
284,
1638,
12976,
543,
286,
1077,
348,
80,
284,
47775,
7554,
486,
931,
6699,
3045,
4286,
7,
15,
701,
609,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find() {
::init().unwrap();
// Our find
let vec = vec![1i32, 2, 3];
let val = Iterator::from_vec(vec).find(|val| val == 2);
assert_eq!(val.unwrap(), 2);
} | rust_cleaned_test_functions.jsonl/50295 | {
"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,
21814,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
442,
5633,
1477,
198,
286,
1077,
7486,
284,
7486,
20703,
16,
72,
18,
17,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
1044,
284,
23023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_squash() {
solana_logger::setup();
let (genesis_block, mint_keypair) = GenesisBlock::new(2);
let key1 = Keypair::new();
let key2 = Keypair::new();
let parent = Arc::new(Bank::new(&genesis_block));
let tx_transfer_mint_to_1 =
syste... | rust_cleaned_test_functions.jsonl/41903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
643,
446,
988,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
320,
77894,
7113,
11,
28337,
3097,
12670,
8,
284,
40788,
4713,
486,
931,
7,
17,
317,
286,
1077,
1376,
16,
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... | 2 |
#[test]
fn test_is_string_at_position_g() {
let example: Vec<char> = "abaa".to_string().chars().collect();
assert!(!is_string_at_position(&example, 1, "a"));
} | rust_cleaned_test_functions.jsonl/126891 | {
"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,
6892,
3904,
3752,
9661,
1889,
368,
341,
286,
1077,
3110,
25,
11312,
21919,
29,
284,
330,
370,
5305,
3263,
983,
3904,
1005,
19255,
1005,
17384,
543,
286,
2060,
0,
3471,
285,
3904,
3752,
9661,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lines() {
let arena = Arena::new();
assert_syntaxes(
&parse(&arena, "foo\nbar"),
&[
Syntax::new_comment(
&arena,
vec![SingleLineSpan {
line: 0.into(),
... | rust_cleaned_test_functions.jsonl/16027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 567
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
18323,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
1428,
286,
2060,
78894,
288,
1006,
310,
609,
6400,
2099,
30527,
11,
330,
7975,
1699,
2257,
4461,
310,
609,
9640,
394,
32117,
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_close_range_native() -> Result<()> {
let fd = fcntl::open("/dev/null", fcntl::OFlag::O_RDWR, sys::stat::Mode::empty())?;
let syscall = LinuxSyscall {};
syscall
.close_range(0)
.context("failed to clean up the fds")?;
let fd_flag = fcntl::f... | rust_cleaned_test_functions.jsonl/84397 | {
"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,
12704,
9698,
44494,
368,
1464,
5714,
71698,
341,
286,
1077,
12414,
284,
282,
75017,
486,
2508,
4283,
3583,
19293,
497,
282,
75017,
486,
46,
12135,
486,
46,
66266,
11,
5708,
486,
9878,
486,
3636,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_panic_hook_single_method() {
local_test_e(|runtime| async move {
let canister = Project::new(std::env::var("CARGO_MANIFEST_DIR").unwrap())
.cargo_bin("panics", &[])
.install_(&runtime, Vec::new())
.await
.unwrap();
let res: Resu... | rust_cleaned_test_functions.jsonl/126879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
31270,
32005,
19487,
9032,
368,
341,
262,
2205,
4452,
2204,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
646,
1571,
284,
5787,
486,
931,
5194,
486,
3160,
486,
947,
445,
34,
7581,
46,
25143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rng_32_true_values() {
let seed: &[_] = &[1, 23, 456, 7890, 12345];
let mut ra: IsaacRng = SeedableRng::from_seed(seed);
// Regression test that isaac is actually using the above vector
let v = (0..10).map(|_| ra.next_u32()).collect::<Vec<_>>();
assert_eq!... | rust_cleaned_test_functions.jsonl/42033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66849,
62,
18,
17,
16082,
9146,
368,
341,
286,
1077,
10320,
25,
609,
13496,
60,
284,
44590,
16,
11,
220,
17,
18,
11,
220,
19,
20,
21,
11,
220,
22,
23,
24,
15,
11,
220,
16,
17,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_next() {
let mut kc = KeltnerChannel::new(3, 2.0_f64).unwrap();
let a = kc.next(2.0);
let b = kc.next(5.0);
let c = kc.next(1.0);
let d = kc.next(6.25);
assert_eq!(round(a.average), 2.0);
assert_eq!(round(b.average), 3.5);
assert_... | rust_cleaned_test_functions.jsonl/130306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
368,
341,
286,
1077,
5206,
87518,
284,
730,
3818,
1194,
9629,
486,
931,
7,
18,
11,
220,
17,
13,
15,
761,
21,
19,
568,
15454,
1428,
286,
1077,
264,
284,
87518,
4529,
7,
17,
13,
15,
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_sparse_index() -> Result<()> {
let schema = DataSchemaRefExt::create(vec![
DataField::new("name", DataType::Utf8, true),
DataField::new("age", DataType::Int32, false),
]);
let block1 = DataBlock::create_by_array(schema.clone(), vec![
Series::new(vec!["jack", ... | rust_cleaned_test_functions.jsonl/34177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
3560,
368,
1464,
5714,
71698,
341,
262,
1077,
10802,
284,
2885,
8632,
3945,
6756,
486,
3182,
25592,
90515,
286,
2885,
1877,
486,
931,
445,
606,
497,
33172,
486,
38980,
23,
11,
830,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_style_underline() {
_do_test_file_style_underline(&[
"--file-style",
"magenta",
"--file-decoration-style",
"magenta underline",
]);
} | rust_cleaned_test_functions.jsonl/70078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
15117,
58228,
1056,
368,
341,
286,
716,
2982,
4452,
2458,
15117,
58228,
1056,
2099,
9640,
310,
14482,
1192,
11297,
756,
310,
330,
76,
47062,
756,
310,
14482,
1192,
30266,
11297,
756,
310,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.