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_insert() {
let mutation = insert(
"Guild",
&["GuildId", "UserId", "UpdatedAt"],
&[&"1", &"2", &CommitTimestamp::new()],
);
match mutation.operation.unwrap() {
v1::mutation::Operation::Insert(mut w) => {
asser... | rust_cleaned_test_functions.jsonl/132325 | {
"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,
17678,
368,
341,
286,
1077,
26374,
284,
5656,
1006,
310,
330,
72574,
756,
310,
609,
1183,
72574,
764,
497,
330,
13504,
497,
330,
72279,
8097,
310,
44590,
5,
1,
16,
497,
609,
1,
17,
497,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_switch_implies_cfg_test() {
rustc_span::create_default_session_globals_then(|| {
let matches = optgroups().parse(&["--test".to_string()]).unwrap();
let (sess, cfg) = mk_session(matches);
let cfg = build_configuration(&sess, to_crate_config(cfg));
assert!(cfg.c... | rust_cleaned_test_functions.jsonl/100711 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27652,
21007,
550,
18343,
4452,
368,
341,
262,
23071,
66,
37382,
486,
3182,
9993,
12316,
58775,
68367,
79453,
341,
286,
1077,
9071,
284,
3387,
16753,
1005,
6400,
2099,
1183,
313,
1944,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_header_readwrite() {
let mut bytes: Vec<u8> = vec![0; 128];
let mut buffer = IntBuffer { index: 0 };
buffer.write_u32(234, &mut bytes);
buffer.write_u16(44, &mut bytes);
buffer.write_u8(99, &mut bytes);
buffer.write_u32(1, &mut bytes);
buf... | rust_cleaned_test_functions.jsonl/95497 | {
"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,
8757,
6443,
4934,
368,
341,
286,
1077,
5206,
5820,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
26,
220,
16,
17,
23,
4821,
286,
1077,
5206,
4147,
284,
1333,
4095,
314,
1922,
25,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_empty() {
let assr = Assembler::new(16);
let segments: Vec<_> = assr.iter_data(10).collect();
assert_eq!(segments, vec![]);
} | rust_cleaned_test_functions.jsonl/52017 | {
"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,
11723,
15124,
368,
341,
286,
1077,
1071,
81,
284,
1634,
35401,
486,
931,
7,
16,
21,
317,
286,
1077,
20632,
25,
11312,
32399,
29,
284,
1071,
81,
19471,
1769,
7,
16,
15,
568,
17384,
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 |
#[test]
fn test_neq() {
cmp_bool!(
neq,
&[true, false, true, false],
&[true, true, false, false],
&[false, true, true, false]
);
} | rust_cleaned_test_functions.jsonl/34263 | {
"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,
13925,
80,
368,
341,
286,
26089,
22159,
33673,
310,
834,
80,
345,
310,
44590,
1866,
11,
895,
11,
830,
11,
895,
1259,
310,
44590,
1866,
11,
830,
11,
895,
11,
895,
1259,
310,
44590,
3849,
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_vsock_basic_metrics() {
// Save the metrics values that we need tested.
let mut tx_packets_count = METRICS.vsock.tx_packets_count.count();
let mut rx_packets_count = METRICS.vsock.rx_packets_count.count();
let tx_bytes_count = METRICS.vsock.tx_bytes_count.count()... | rust_cleaned_test_functions.jsonl/37608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
13199,
34729,
37686,
368,
341,
286,
442,
10255,
279,
16734,
2750,
429,
582,
1184,
12510,
624,
286,
1077,
5206,
9854,
63569,
3180,
284,
36822,
84172,
3133,
13199,
33807,
63569,
3180,
6501,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rainbow_highlighting() {
check_highlighting(
r#"
fn main() {
let hello = "hello";
let x = hello.to_string();
let y = hello.to_string();
let x = "other color please!";
let y = x.to_string();
}
fn bar() {
let mut hello = "hello";
}
"#
.trim(),
... | rust_cleaned_test_functions.jsonl/5120 | {
"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,
1710,
466,
15439,
74546,
287,
368,
341,
262,
1779,
74546,
287,
1006,
286,
435,
2,
698,
8822,
1887,
368,
341,
262,
1077,
23811,
284,
330,
14990,
876,
262,
1077,
856,
284,
23811,
2389,
3904,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_java_version_redhat() {
let java_8 = "OpenJDK 64-Bit Server VM (25.222-b10) for linux-amd64 JRE (1.8.0_222-b10), built on Jul 11 2019 20:48:53 by \"root\" with gcc 7.3.1 20180303 (Red Hat 7.3.1-5)";
let java_12 = "OpenJDK 64-Bit Server VM (12.0.2+10) for linux-amd64 JRE (12... | rust_cleaned_test_functions.jsonl/36218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
77323,
9438,
26058,
9198,
368,
341,
286,
1077,
1642,
62,
23,
284,
330,
5002,
41,
18301,
220,
21,
19,
7671,
275,
8422,
17792,
320,
17,
20,
13,
17,
17,
17,
1455,
16,
15,
8,
369,
36245,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_8XYE() {
// 0x8XYE - Store the value of register VY shifted left one bit in register VX
// Set register VF to the most significant bit prior to the shift
// VY is unchanged
let opcode = 0x89AE;
let mut vm = get_vm();
// the most-significant bit of Vx is 0
... | rust_cleaned_test_functions.jsonl/256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
23,
16356,
36,
368,
341,
262,
442,
220,
15,
87,
23,
16356,
36,
481,
9129,
279,
897,
315,
4161,
647,
56,
28973,
2115,
825,
2699,
304,
4161,
78177,
198,
262,
442,
286,
2573,
4161,
72892,
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_inner_attribute_completion() {
check(
r"#![$0]",
expect![[r#"
at allow(…)
at automatically_derived
at cfg_attr(…)
at cfg(…)
at cold
at crate_name = ""
a... | rust_cleaned_test_functions.jsonl/38681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1044
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34345,
16791,
60164,
368,
341,
286,
1779,
1006,
310,
435,
1,
8010,
3442,
15,
45016,
310,
1720,
0,
15505,
81,
2,
698,
394,
518,
2138,
7,
1940,
340,
394,
518,
9463,
35345,
2221,
198,
394,
518,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_cookies() {
let req = TestRequest::default()
.header(header::COOKIE, "cookie1=value1")
.header(header::COOKIE, "cookie2=value2")
.finish();
{
let cookies = req.cookies().unwrap();
assert_eq!(cookies.len(), 2);
... | rust_cleaned_test_functions.jsonl/30109 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
94158,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
2258,
741,
310,
659,
2708,
25534,
486,
44796,
11,
330,
16236,
16,
46538,
16,
1138,
310,
659,
2708,
25534,
486,
44796,
11,
330,
16236... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_papapred() {
let full_input_file = "test_assets/PaPa_rates.txt";
let papa = PaPaPred::new(full_input_file, None).unwrap();
let rates = papa.rates("ACCGCCT").unwrap();
assert_eq!(rates.a, 6.0526200e-04);
assert_eq!(rates.c, 2.3540691e-05);
assert!(... | rust_cleaned_test_functions.jsonl/35939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1054
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
391,
391,
1151,
368,
341,
286,
1077,
2480,
5898,
2458,
284,
330,
1944,
53299,
16341,
64,
20291,
55373,
3909,
876,
286,
1077,
281,
18321,
284,
15681,
20291,
50925,
486,
931,
28907,
5898,
2458,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eliminate() {
let two = scalar_from_u64::<Bls12>(2);
let three = scalar_from_u64::<Bls12>(3);
let four = scalar_from_u64::<Bls12>(4);
let five = scalar_from_u64::<Bls12>(5);
let six = scalar_from_u64::<Bls12>(6);
let seven = scalar_from_u6... | rust_cleaned_test_functions.jsonl/102231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 673
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84655,
3277,
368,
341,
1789,
286,
1077,
1378,
284,
17274,
5673,
7300,
21,
19,
27638,
33,
4730,
16,
17,
2235,
17,
317,
286,
1077,
2326,
284,
17274,
5673,
7300,
21,
19,
27638,
33,
4730,
16,
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... | 3 |
#[test]
fn test_transpose() {
let matrix = Matrix::new(&vec![vec![1.,2.,3.,4.,5.], vec![6.,7.,8.,9.,10.]]);
assert_eq!(Matrix::new(&vec![vec![1.,6.], vec![2.,7.], vec![3.,8.], vec![4.,9.], vec![5.,10.]]), transpose(&matrix));
} | rust_cleaned_test_functions.jsonl/52103 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
2900,
368,
341,
286,
1077,
6172,
284,
11631,
486,
931,
2099,
4083,
20703,
4083,
20703,
16,
2572,
17,
2572,
18,
2572,
19,
2572,
20,
13,
1125,
7486,
20703,
21,
2572,
22,
2572,
23,
2572,
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_mkdir_parent() {
cleanup(TEST_DIR4);
let prog = Command::new(EXE).arg("-p").arg(TEST_DIR4).status();
let exit_success = prog.unwrap().success();
cleanup(TEST_DIR4);
assert_eq!(exit_success, true);
} | rust_cleaned_test_functions.jsonl/32985 | {
"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,
717,
12438,
15960,
368,
341,
262,
21290,
50320,
8291,
19,
317,
262,
1077,
29271,
284,
7348,
486,
931,
25409,
36,
568,
858,
13645,
79,
1827,
858,
50320,
8291,
19,
568,
2829,
543,
262,
1077,
4869,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_if_cursor_on_param() {
check_assist_not_applicable(
replace_derive_with_manual_impl,
r#"
//- minicore: derive, fmt
#[derive$0(Debug)]
struct Foo {}
"#,
);
check_assist_not_applicable(
replace_derive_with_manual_impl,... | rust_cleaned_test_functions.jsonl/18001 | {
"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,
58493,
11119,
28601,
4470,
4090,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
8290,
35345,
533,
6615,
75428,
21007,
345,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
42430,
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_ranges_open_high() {
let ranges = ranges(&["3:", "2:5"]);
assert_eq!(RangeCheckResult::BeforeOrBetweenRanges, ranges.check(1));
assert_eq!(RangeCheckResult::InRange, ranges.check(3));
assert_eq!(RangeCheckResult::InRange, ranges.check(5));
assert_eq!(RangeCheckResult::InRang... | rust_cleaned_test_functions.jsonl/35933 | {
"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,
58748,
11311,
22680,
368,
341,
262,
1077,
21283,
284,
21283,
2099,
1183,
18,
12147,
330,
17,
25,
20,
55919,
262,
2060,
10714,
10297,
6046,
3973,
2077,
486,
10227,
2195,
25477,
74902,
11,
21283,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_merge_transfer_leader() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
cluster.cfg.raft_store.store_batch_system.max_batch_size = Some(1);
cluster.cfg.raft_store.store_batch_system.pool_size = 2;
let pd_client = Arc::clone(&cluster.pd_clie... | rust_cleaned_test_functions.jsonl/56286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 949
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
35403,
79991,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
10652,
30481,
13,
2944,
14809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cleanup() {
let storage = TestStorageBuilder::new().build().unwrap();
let (tx, rx) = channel();
storage
.async_prewrite(
Context::new(),
vec![Mutation::Put((Key::from_raw(b"x"), b"100".to_vec()))],
b"x".to_vec(),... | rust_cleaned_test_functions.jsonl/22311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42444,
368,
341,
286,
1077,
5819,
284,
3393,
5793,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
320,
3998,
11,
19111,
8,
284,
5496,
543,
286,
5819,
198,
310,
659,
7692,
620,
52473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize_newtype_struct() {
let value = toml::toml! {
foo = "bar"
};
#[derive(Deserialize)]
struct NewtypeWrapper(String);
#[derive(Deserialize)]
struct Sample {
foo: NewtypeWrapper,
}
let deserializer =... | rust_cleaned_test_functions.jsonl/67384 | {
"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,
15768,
9050,
5921,
1313,
15126,
368,
341,
286,
1077,
897,
284,
311,
1014,
486,
37401,
75,
0,
341,
310,
15229,
284,
330,
2257,
698,
286,
3634,
286,
11506,
27098,
7,
64465,
5563,
286,
2036,
1532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_windows_count() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let c = v.array_windows::<3>();
assert_eq!(c.count(), 4);
let v2: &[i32] = &[0, 1, 2, 3, 4];
let c2 = v2.array_windows::<6>();
assert_eq!(c2.count(), 0);
let v3: &[i32] = &[];
let c3 = v3.array_windows... | rust_cleaned_test_functions.jsonl/9657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
58220,
3180,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
272,
284,
348,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date_time_utc() {
let db = checked_memory_handle();
let date = NaiveDate::from_ymd(2016, 2, 23);
let time = NaiveTime::from_hms_milli(23, 56, 4, 789);
let dt = NaiveDateTime::new(date, time);
let utc = Utc.from_utc_datetime(&dt);
db.execute("INSER... | rust_cleaned_test_functions.jsonl/15052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 732
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
3009,
84259,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
1077,
2400,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
16,
21,
11,
220,
17,
11,
220,
17,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_non_blocking_unix_metric_sink() {
let harness = UnixServerHarness::new("test_non_blocking_unix_metric_sink");
harness.run_quiet(|path| {
let socket = UnixDatagram::unbound().unwrap();
socket.set_nonblocking(true).unwrap();
let sink = UnixMetri... | rust_cleaned_test_functions.jsonl/25611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
91449,
80572,
41294,
51567,
368,
341,
286,
1077,
32408,
284,
46995,
5475,
74248,
486,
931,
445,
1944,
21637,
91449,
80572,
41294,
51567,
3071,
286,
32408,
7634,
11280,
3891,
22428,
2343,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trailing_separator() {
new_ucmd!()
.args(&["-t", "x", "-k", "1,1"])
.pipe_in("aax\naaa\n")
.succeeds()
.stdout_is("aax\naaa\n");
} | rust_cleaned_test_functions.jsonl/20530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
14277,
58204,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
83,
497,
330,
87,
497,
6523,
74,
497,
330,
16,
11,
16,
14108,
286,
659,
13768,
1243,
445,
64,
706... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dynamic_width_number_display_numeric_decimal() {
fn num(n: usize) -> Number {
let mut number = Number::DynamicWidth(DynamicWidthNumber::new(10));
for _ in 0..n {
number.increment().unwrap();
}
number
}
asser... | rust_cleaned_test_functions.jsonl/51163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
7927,
5500,
14825,
29418,
74429,
368,
341,
286,
5168,
1629,
1445,
25,
22301,
8,
1464,
5624,
341,
310,
1077,
5206,
1372,
284,
5624,
486,
21752,
3327,
5432,
5040,
3327,
2833,
486,
931,
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... | 2 |
#[test]
fn test_deletes_words() {
assert!(get_blank_search().append_search_string("").delete_word().get_query().as_slice() == "");
assert!(get_blank_search().append_search_string("a").delete_word().get_query().as_slice() == "");
assert!(get_blank_search().append_search_string("a ").delet... | rust_cleaned_test_functions.jsonl/96109 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
13881,
18981,
368,
341,
286,
2060,
10297,
455,
56103,
10716,
1005,
5090,
10716,
3904,
80821,
4542,
13533,
1005,
455,
5738,
1005,
300,
26488,
368,
621,
14498,
286,
2060,
10297,
455,
56103,
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_fmt_temporal() {
let s = Int32Chunked::new("Date", &[Some(1), None, Some(3)]).into_date();
assert_eq!(
r#"shape: (3,)
Series: 'Date' [date]
[
1970-01-02
null
1970-01-04
]"#,
format!("{:?}", s.into_series())
);
let s = Int64Chunked::new(... | rust_cleaned_test_functions.jsonl/4392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
11771,
9819,
368,
341,
286,
1077,
274,
284,
1333,
18,
17,
28304,
291,
486,
931,
445,
1916,
497,
44590,
8373,
7,
16,
701,
2240,
11,
4329,
7,
18,
7252,
568,
18122,
4164,
543,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_for_verify_false_positive() {
// https://github.com/enarx/enarx/issues/520
let naples_cek = sev::Certificate::decode(&mut &naples::CEK[..], ()).unwrap();
let rome_ask = ca::Certificate::decode(&mut &builtin::rome::ASK[..], ()).unwrap();
assert!((&rome_ask, &naples_cek).verify().i... | rust_cleaned_test_functions.jsonl/84101 | {
"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,
5478,
35638,
36015,
54160,
368,
341,
262,
442,
3703,
1110,
5204,
905,
13606,
277,
87,
13606,
277,
87,
38745,
14,
20,
17,
15,
198,
262,
1077,
25859,
642,
62,
45700,
284,
511,
85,
486,
33202,
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_find_loop_backedges_none() {
let mir_body = goto_switchint();
let basic_coverage_blocks = graph::CoverageGraph::from_mir(&mir_body);
if false {
eprintln!(
"basic_coverage_blocks = {:?}",
basic_coverage_blocks.iter_enumerated().collect::<Vec<_>>()
... | rust_cleaned_test_functions.jsonl/68933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
17198,
3895,
16900,
31488,
368,
341,
262,
1077,
8652,
14114,
284,
7986,
27652,
396,
543,
262,
1077,
6770,
73384,
25201,
284,
4771,
486,
66312,
11212,
486,
1499,
717,
404,
2099,
19936,
14114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_estimate() {
assert_eq!(2048, estimate_bit_size(2048));
assert_eq!(2048, estimate_bit_size(2047));
} | rust_cleaned_test_functions.jsonl/43391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78718,
368,
341,
286,
2060,
10714,
10297,
17,
15,
19,
23,
11,
16045,
13996,
2368,
7,
17,
15,
19,
23,
1106,
286,
2060,
10714,
10297,
17,
15,
19,
23,
11,
16045,
13996,
2368,
7,
17,
15,
19,
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 |
#[test]
fn test_module_no_double_free() {
let _module = {
let context = Context::create();
context.create_module("my_mod")
};
// Context will live on in the module until here
} | rust_cleaned_test_functions.jsonl/63540 | {
"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,
10750,
6536,
24598,
8905,
368,
341,
262,
1077,
716,
4352,
284,
341,
286,
1077,
2266,
284,
9608,
486,
3182,
1428,
286,
2266,
2520,
10750,
445,
2408,
7480,
1138,
262,
3634,
262,
442,
9608,
686,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_object_and_string_to_repo() {
let json = r#"[{"dam": ["dam1","dam2"]}, "website"]"#;
let repos: Repos = new(json).unwrap();
assert_eq!(repos, vec![
Repo{ repo_type: RepoType::Dam, sites: Some(vec!["dam1".to_string(), "dam2".to_string()]) },
Repo{ r... | rust_cleaned_test_functions.jsonl/71247 | {
"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,
5314,
8378,
3904,
2346,
37784,
368,
341,
286,
1077,
2951,
284,
435,
2,
36864,
4913,
15408,
788,
4383,
15408,
16,
2198,
15408,
17,
1341,
2137,
330,
19485,
1341,
57676,
280,
286,
1077,
45774,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_typedef_to_up_in_fn_call() {
let hdr = indoc! {"
#include <string>
#include <memory>
typedef std::unique_ptr<std::string> my_string;
inline uint32_t take_str(my_string a) {
return a->size();
}
"};
let rs = quote! {
use ffi::... | rust_cleaned_test_functions.jsonl/9862 | {
"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,
42111,
4219,
2346,
8237,
1243,
15246,
13429,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
917,
397,
286,
671,
997,
366,
17269,
397,
286,
13501,
1460,
486,
9587,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple_fragment() {
let did: DID = DID::parse("did:example:123456#public-key-1").unwrap();
assert_eq!(did.method(), "example");
assert_eq!(did.method_id(), "123456");
assert_eq!(did.path(), "");
assert_eq!(did.query(), None);
assert_eq!(did.fragment(), Some("public-key-1"));
} | rust_cleaned_test_functions.jsonl/93406 | {
"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,
21039,
30015,
43012,
368,
341,
220,
1077,
1521,
25,
59119,
284,
59119,
486,
6400,
445,
22920,
25,
8687,
25,
16,
17,
18,
19,
20,
21,
2,
888,
16173,
12,
16,
1827,
15454,
543,
220,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poh_recorder_record_at_min_passes() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_... | rust_cleaned_test_functions.jsonl/106266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
7080,
1358,
14192,
3752,
7260,
15464,
288,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
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_delete_node_fails_if_not_authorized() {
ExternalityBuilder::build().execute_with(|| {
create_twin();
create_twin_bob();
create_farm();
create_node();
assert_noop!(
TfgridModule::delete_node_farm(Origin::signed(bob()), 1),
Error... | rust_cleaned_test_functions.jsonl/35350 | {
"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,
11353,
5084,
761,
6209,
11119,
7913,
62,
19084,
368,
341,
262,
1374,
4160,
2719,
3297,
486,
5834,
1005,
10257,
6615,
79453,
341,
286,
1855,
528,
7526,
543,
286,
1855,
528,
7526,
880,
674,
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... | 2 |
#[test]
fn test_assign_from_slice() {
fn check(slice: &[BigDigit], data: &[BigDigit]) {
let mut p = BigUint::from_slice(&[2627_u32, 0_u32, 9182_u32, 42_u32]);
p.assign_from_slice(slice);
assert!(p.data == data);
}
check(&[1], &[1]);
check(&[0, 0, 0], &[]);
check(&[1, ... | rust_cleaned_test_functions.jsonl/106398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
5673,
26488,
368,
341,
262,
5168,
1779,
75282,
25,
44590,
15636,
36420,
1125,
821,
25,
44590,
15636,
36420,
2467,
341,
286,
1077,
5206,
281,
284,
6164,
21570,
486,
1499,
26488,
2099,
58,
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_external_word() {
let _ = pretty_env_logger::try_init();
equal_tokens!(
"cargo +nightly run" ->
b::pipeline(vec![vec![
b::bare("cargo"),
b::sp(),
b::external_word("+nightly"),
b::sp(),
... | rust_cleaned_test_functions.jsonl/5872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47432,
13533,
368,
341,
286,
1077,
716,
284,
5020,
15879,
27413,
486,
1539,
6137,
1428,
286,
6144,
28838,
33673,
310,
330,
66715,
488,
9287,
398,
1598,
1,
12381,
310,
293,
486,
51258,
25592,
20703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cp_reflink_always() {
let (at, mut ucmd) = at_and_ucmd!();
let result = ucmd
.arg("--reflink=always")
.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_EXISTING_FILE)
.run();
if result.succeeded() {
// Check the content of the destination file
a... | rust_cleaned_test_functions.jsonl/21276 | {
"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,
39811,
7793,
2080,
8418,
2284,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1102,
284,
575,
8710,
198,
286,
659,
858,
21549,
1097,
208... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_last_expr() {
let rules = create_rules(
r#"
macro_rules! vec {
($($item:expr),*) => {
{
let mut v = Vec::new();
$(
v.push($item);
)*
v
... | rust_cleaned_test_functions.jsonl/14713 | {
"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,
12195,
21915,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
7486,
341,
310,
1711,
699,
1203,
96011,
701,
3764,
589,
341,
394,
341,
503,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fixed_size_binary_offsets() {
// Test the case where offset != 0
let a = create_fixed_size_binary_array(&[
Some(b"hello"),
None,
None,
Some(b"world"),
None,
None,
]);
let b = create_fixed_size... | rust_cleaned_test_functions.jsonl/24221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
2368,
31761,
56924,
368,
341,
286,
442,
3393,
279,
1142,
1380,
4347,
961,
220,
15,
198,
286,
1077,
264,
284,
1855,
37839,
2368,
31761,
3858,
2099,
9640,
310,
4329,
1883,
1,
14990,
4461,
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_array_sum() {
let c: Result<Color, _> = [-1, 255, 255].try_into();
assert_eq!(c, Err(IntoColorError::IntConversion));
} | rust_cleaned_test_functions.jsonl/758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
10160,
368,
341,
286,
1077,
272,
25,
5714,
88827,
11,
716,
29,
284,
10055,
16,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
936,
1539,
45514,
543,
286,
2060,
10714,
10297,
66,
11,
15495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trip_non_ascii_password() {
let keyring = Keyring::new(TEST_SERVICE, TEST_USER);
keyring.set_password(TEST_NON_ASCII_PASSWORD).unwrap();
let stored_password = keyring.get_password().unwrap();
assert_eq!(stored_password, TEST_NON_ASCII_PASSWORD);
... | rust_cleaned_test_functions.jsonl/99049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
63883,
21637,
50238,
10122,
368,
341,
286,
1077,
1376,
12640,
284,
5309,
12640,
486,
931,
50320,
21590,
11,
13602,
9107,
626,
286,
1376,
12640,
980,
10122,
50320,
22128,
98924,
23059,
568,
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_hash_internal_state_genesis() {
let bank0 = Bank::new(&GenesisBlock::new(10).0);
let bank1 = Bank::new(&GenesisBlock::new(20).0);
assert_ne!(bank0.hash_internal_state(), bank1.hash_internal_state());
} | rust_cleaned_test_functions.jsonl/41901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
23472,
4387,
16322,
13774,
368,
341,
286,
1077,
6073,
15,
284,
8547,
486,
931,
2099,
84652,
4713,
486,
931,
7,
16,
15,
568,
15,
317,
286,
1077,
6073,
16,
284,
8547,
486,
931,
2099,
84652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_random_wallet_mainnet_no_entropy() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let mut jscontext = JavaScript::new(format!("{}/xpring.js", out_dir))?;
let wallet = generate_random(&mut jscontext, None, false).unwrap();
assert!(!wallet.mnemonic.is_e... | rust_cleaned_test_functions.jsonl/118734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
22644,
62308,
11027,
4711,
6536,
50374,
368,
341,
286,
1077,
700,
4334,
284,
1460,
486,
3160,
486,
947,
445,
3656,
8291,
1827,
15454,
543,
286,
1077,
5206,
6994,
2147,
284,
12914,
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_nested_scope_with_variable_segment() {
let app = App::new()
.scope("/app", |scope| {
scope.nested("/{project_id}", |scope| {
scope.resource("/path1", |r| {
r.f(|r| {
HttpResponse::Created(... | rust_cleaned_test_functions.jsonl/22453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
23199,
6615,
14635,
28061,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
4186,
4283,
676,
497,
760,
4186,
91,
341,
394,
6891,
1253,
9980,
65871,
4987,
842,
9545,
760,
4186... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fq2_doubling() {
use super::fq::FqRepr;
use PrimeField;
let mut a = Fq2 {
c0: Fq::from_repr(FqRepr([
0x2d0078036923ffc7,
0x11e59ea221a3b6d2,
0x8b1a52e0a90f59ed,
0xb966ce3bc2108b13,
0xccc649c4b9532bf3,
0x... | rust_cleaned_test_functions.jsonl/130069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
17,
814,
283,
9695,
368,
341,
262,
990,
2256,
486,
63919,
486,
37,
80,
693,
649,
280,
262,
990,
12518,
1877,
401,
262,
1077,
5206,
264,
284,
434,
80,
17,
341,
286,
272,
15,
25,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cascading_in_lines() {
test(
"var XXX = 4; function f() { var YYY = XXX; bar(YYY); baz(YYY); }",
"var XXX = 4; function f() { var YYY = XXX; bar(YYY); baz(YYY); }",
);
} | rust_cleaned_test_functions.jsonl/27659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
5061,
2228,
1243,
18323,
368,
341,
262,
1273,
1006,
286,
330,
947,
19975,
284,
220,
19,
26,
220,
729,
282,
368,
314,
762,
809,
10060,
284,
19975,
26,
3619,
7,
52309,
1215,
50247,
7,
52309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vld1q_s8() {
unsafe {
let a: [i8; 16] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
let e = transmute(a);
let r = vld1q_s8(transmute(&a));
assert!(cmp_arm(r, e));
}
} | rust_cleaned_test_functions.jsonl/33015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
507,
16,
80,
643,
23,
368,
341,
286,
19860,
341,
310,
1077,
264,
25,
508,
72,
23,
26,
220,
16,
21,
60,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proof_empty_trie() {
let mut memdb = MemoryDB::new(true);
let mut trie = PatriciaTrieMut::new(&mut memdb);
trie.root().unwrap();
let proof = trie.get_proof(b"not-exist").unwrap();
assert_eq!(proof.len(), 0);
} | rust_cleaned_test_functions.jsonl/37146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
15124,
3547,
645,
368,
341,
262,
1077,
5206,
1833,
1999,
284,
13850,
3506,
486,
931,
3715,
317,
262,
1077,
5206,
59067,
284,
53934,
51,
7231,
51440,
486,
931,
2099,
6984,
1833,
1999,
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,
1,
1... | 1 |
#[test]
fn test_early_return() {
let span = span::mock().named("err_early_return");
let (subscriber, handle) = collector::mock()
.new_span(span.clone())
.enter(span.clone())
.event(event::mock().at_level(Level::ERROR))
.exit(span.clone())
.drop_span(span)
... | rust_cleaned_test_functions.jsonl/3564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
22140,
12511,
368,
341,
262,
1077,
9390,
284,
9390,
486,
16712,
1005,
30245,
445,
615,
62,
22140,
12511,
797,
262,
1077,
320,
59205,
11,
3705,
8,
284,
31953,
486,
16712,
741,
286,
659,
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_tag_id_downcast_mut() {
let mut tag = DummyTag::new(132, 1);
let t: &mut dyn ILTag = &mut tag;
match tag_id_downcast_mut::<DummyTag>(132, t) {
Ok(v) => {
v.set_dummy(1234);
assert_eq!(1234, v.get_dummy())
}
_ => panic!(),
}
ma... | rust_cleaned_test_functions.jsonl/25696 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9372,
842,
13998,
3829,
29523,
368,
341,
262,
1077,
5206,
4772,
284,
50567,
5668,
486,
931,
7,
16,
18,
17,
11,
220,
16,
317,
262,
1077,
259,
25,
609,
6984,
31070,
11344,
5668,
284,
609,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_capabilities() {
assert_eq!(
p2p::types::Capabilities::from_bits_truncate(0b00000000 as u32),
p2p::types::Capabilities::UNKNOWN
);
assert_eq!(
p2p::types::Capabilities::from_bits_truncate(0b10000000 as u32),
p2p::types::Capabilities::UNKNOWN
);
assert_eq!(
p2p::types::Capabilitie... | rust_cleaned_test_functions.jsonl/18873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92092,
368,
341,
6948,
10714,
33673,
197,
3223,
17,
79,
486,
9242,
486,
55315,
486,
1499,
20034,
3547,
26900,
7,
15,
65,
15,
15,
15,
15,
15,
15,
15,
15,
438,
575,
18,
17,
1326,
197,
3223,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decimal_as_string() {
test_none_with_ctx_and_extra(cast_any_as_string::<Decimal>);
let cs: Vec<(Decimal, Vec<u8>, String)> = vec![
(
Decimal::from(i64::MAX),
i64::MAX.to_string().into_bytes(),
i64::MAX.to_string(),
... | rust_cleaned_test_functions.jsonl/1974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
11898,
3904,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
37248,
11898,
3904,
27638,
11269,
29,
626,
286,
1077,
10532,
25,
11312,
28706,
11269,
11,
11312,
34837,
23,
8066,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_option_as_deref() {
let ref_option = &Some(&42);
assert_eq!(ref_option.as_deref(), Some(&42));
let ref_option = &Some(String::from("a result"));
assert_eq!(ref_option.as_deref(), Some("a result"));
let ref_option = &Some(vec![1, 2, 3, 4, 5]);
assert_eq!(ref_option.... | rust_cleaned_test_functions.jsonl/20250 | {
"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,
9672,
11898,
814,
43970,
368,
341,
1066,
262,
1077,
2053,
9672,
284,
609,
8373,
2099,
19,
17,
317,
262,
2060,
10714,
10297,
1097,
9672,
5357,
814,
43970,
1507,
4329,
2099,
19,
17,
3237,
262,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_t116() {
init();
let result = t116(*MAIN_SIG_MAP, *SUB_SIG_MAP);
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
16,
16,
21,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
16,
16,
21,
4071,
41815,
55687,
16306,
11,
353,
29038,
55687,
16306,
317,
286,
13751,
79878,
1102,
19406,
1423,
286,
13751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_validate_circuit_duplicate_members() {
let store = setup_admin_service_store();
let event_store = store.clone_boxed();
let (mesh, cm, pm, peer_connector) = setup_peer_connector(None);
let orchestrator = setup_orchestrator();
let signature_verifier = Secp... | rust_cleaned_test_functions.jsonl/47873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 900
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
666,
37268,
70434,
30397,
368,
341,
286,
1077,
3553,
284,
6505,
12207,
12267,
14809,
543,
286,
1077,
1538,
14809,
284,
3553,
15997,
10194,
291,
1428,
286,
1077,
320,
23506,
11,
9961,
11,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_real_blocks() {
assert!(futures::executor::block_on(check_hash(
bitcoin::BlockHeader {
version: 536870912,
prev_blockhash: into(
"508ff5554dc9f83e3cab31b8fb89d10604ebcd963c7b8ce131fd3ef47c2a0921"
),
... | rust_cleaned_test_functions.jsonl/123330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 775
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
25201,
368,
341,
1789,
286,
2060,
10297,
69,
74606,
486,
80787,
486,
4574,
4470,
24077,
8950,
1006,
310,
17873,
486,
4713,
4047,
341,
394,
2319,
25,
220,
20,
18,
21,
23,
22,
15,
24,
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_string_equal() {
let a = StringArray::from(vec!["hello", "world"]);
let b = StringArray::from(vec!["hello", "world"]);
assert!(a.equals(&b));
assert!(b.equals(&a));
let b = StringArray::from(vec!["hello", "arrow"]);
assert!(!a.equals(&b));
... | rust_cleaned_test_functions.jsonl/109122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
11478,
368,
341,
286,
1077,
264,
284,
923,
1857,
486,
1499,
25592,
0,
1183,
14990,
497,
330,
14615,
15049,
286,
1077,
293,
284,
923,
1857,
486,
1499,
25592,
0,
1183,
14990,
497,
330,
14615... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pseudo_random_send() {
const N: usize = 100;
for cap in 0..N {
let c = make::<i32>(cap);
let l = Arc::new(Mutex::new(vec![0i32; N]));
let done = make::<bool>(0);
go!(c, done, l, {
let mut l = l.lock().unwrap();
... | rust_cleaned_test_functions.jsonl/2882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 752
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
21952,
22644,
13565,
368,
341,
286,
733,
451,
25,
22301,
284,
220,
16,
15,
15,
401,
286,
369,
2062,
304,
220,
15,
496,
45,
341,
310,
1077,
272,
284,
1281,
27638,
72,
18,
17,
2235,
11346... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_convert_details() {
let job_details = vec![
"07-02-2020 21:09:39",
"ECorp",
"Security Engineer",
"HIRED",
"My name is Elliot"
];
let style = "Fbl";
let results = vec![
Cell::new(&job_details[... | rust_cleaned_test_functions.jsonl/92017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
13260,
368,
341,
286,
1077,
2618,
13260,
284,
7486,
90515,
310,
330,
15,
22,
12,
15,
17,
12,
17,
15,
17,
15,
220,
17,
16,
25,
15,
24,
25,
18,
24,
756,
310,
330,
7498,
30115,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_float_scientific_notation() {
let mut reader = Lexer::from_str("1.0e1 1.0E1 1.0e+1 1.0e-1");
assert_tok(
&mut reader,
TokenKind::LitFloat("1.0e1".into(), FloatSuffix::Double),
1,
1,
);
assert_tok(
&mut re... | rust_cleaned_test_functions.jsonl/101126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17586,
643,
12295,
1086,
7913,
367,
368,
341,
286,
1077,
5206,
6604,
284,
85082,
486,
1499,
2895,
445,
16,
13,
15,
68,
16,
220,
16,
13,
15,
36,
16,
220,
16,
13,
15,
68,
10,
16,
220,
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_start() {
let addr = unused_addr();
let (tx, rx) = mpsc::channel();
let h = thread::spawn(move || {
let sys = scrappy_rt::System::new("test");
let srv: Server = Server::build()
.backlog(100)
.disable_signals()
.bind("test", addr, m... | rust_cleaned_test_functions.jsonl/5727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 945
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
368,
341,
262,
1077,
10789,
284,
20006,
7387,
543,
262,
1077,
320,
3998,
11,
19111,
8,
284,
296,
81984,
486,
10119,
1428,
262,
1077,
305,
284,
4516,
486,
46087,
34081,
1369,
341,
286,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_vec_join() {
let t = VecJoinTemplate {
s: vec!["foo".into(), "bar".into(), "bazz".into()],
};
assert_eq!(t.render().unwrap(), "foo, bar, bazz");
} | rust_cleaned_test_functions.jsonl/8698 | {
"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,
13251,
31017,
368,
341,
262,
1077,
259,
284,
11312,
12292,
7275,
341,
286,
274,
25,
7486,
0,
1183,
7975,
3263,
18122,
1507,
330,
2257,
3263,
18122,
1507,
330,
65,
9802,
3263,
18122,
73845,
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 |
#[test]
fn test_add_assign_f64() {
let mut x = Vec3::new(1.0, 0.0, -1.0);
x += 233.0;
assert_eq!(x, Vec3::new(234.0, 233.0, 232.0))
} | rust_cleaned_test_functions.jsonl/35219 | {
"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,
2891,
20688,
761,
21,
19,
368,
341,
286,
1077,
5206,
856,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
11,
481,
16,
13,
15,
317,
286,
856,
1421,
220,
17,
18,
18,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_helm_chart_version() -> io::Result<()> {
let config_name = "Chart.yaml";
let config_content = "
apiVersion: v1
name: starship
version: 0.2.0
";
let project_dir = create_project_dir()?;
fill_config(&project_dir, config_name,... | rust_cleaned_test_functions.jsonl/100126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
1523,
23162,
40961,
9438,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
14488,
33406,
876,
286,
1077,
2193,
7495,
284,
6228,
286,
6330,
5637,
25,
348,
16,
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... | 3 |
#[test]
fn test_conns_drop_on_pool_drop() {
static DROPPED: AtomicUsize = AtomicUsize::new(0);
struct Connection;
impl Drop for Connection {
fn drop(&mut self) {
DROPPED.fetch_add(1, Ordering::SeqCst);
}
}
struct Handler;
impl ManageConnection for Handler ... | rust_cleaned_test_functions.jsonl/127894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 861
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
4412,
29584,
4470,
15709,
29584,
368,
341,
262,
1099,
422,
1285,
4406,
1479,
25,
30316,
52,
2141,
284,
30316,
52,
2141,
486,
931,
7,
15,
626,
262,
2036,
11032,
401,
262,
11605,
15733,
369,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reserve_exact_2() {
// This is all the same as test_reserve
let mut v = VecDeque::new();
v.reserve_exact(2);
assert!(v.capacity() >= 2);
for i in 0..16 {
v.push_back(i);
}
assert!(v.capacity() >= 16);
v.reserve_exact(16);
assert!(v.capacity() >= 32... | rust_cleaned_test_functions.jsonl/73735 | {
"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,
89591,
71084,
62,
17,
368,
341,
262,
442,
1096,
374,
678,
279,
1852,
438,
1273,
89591,
271,
262,
1077,
5206,
348,
284,
11312,
73891,
486,
931,
1428,
262,
348,
48520,
71084,
7,
17,
317,
262,
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... | 2 |
#[test]
fn test_missing_loader() {
let dir = create_dir_and_file("file.not-a-real-extension");
let asset_server = setup(dir.path());
let path: AssetPath = "file.not-a-real-extension".into();
let handle = asset_server.get_handle_untyped(path.get_id());
let err = futures_... | rust_cleaned_test_functions.jsonl/3151 | {
"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,
40447,
22139,
368,
341,
286,
1077,
5419,
284,
1855,
4334,
8378,
2458,
445,
1192,
11971,
7409,
74795,
80539,
797,
286,
1077,
9329,
12015,
284,
6505,
14161,
3875,
5231,
286,
1077,
1815,
25,
22605,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_module_rename_in_path() {
test_rename(
r#"
mod <|>foo {
pub fn bar() {}
}
fn main() {
foo::bar();
}"#,
"baz",
r#"
mod baz {
pub fn bar() {}
}
fn main() {
baz::bar();
}"#,
);
... | rust_cleaned_test_functions.jsonl/16223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
79399,
1243,
2638,
368,
341,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
1463,
82639,
29,
7975,
341,
286,
6675,
5168,
3619,
368,
5613,
262,
555,
262,
5168,
1887,
368,
341,
286,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_passive_mdns() {
passive_mdns_test(
MdnsQueryType::Passive,
SocketAddr::new(*TEST_MDNS_IPV4, BASE_TEST_PORT + 3),
)
} | rust_cleaned_test_functions.jsonl/23779 | {
"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,
15464,
533,
32994,
4412,
368,
341,
286,
27879,
32994,
4412,
4452,
1006,
310,
386,
45226,
2859,
929,
486,
12187,
533,
345,
310,
20954,
13986,
486,
931,
4071,
10033,
46497,
2448,
58830,
19,
11,
2219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_favicon_parsed_with_base() {
let base = favicon_parsed_with_base(
Some("favicon.ico"),
"http://example.com/page/index.html?a=b",
);
assert!(base.is_ok());
assert_eq!(base.unwrap(), "http://example.com/page/favicon.ico");
} | rust_cleaned_test_functions.jsonl/64935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
27921,
75788,
6615,
7651,
368,
341,
286,
1077,
2331,
284,
82804,
75788,
6615,
7651,
1006,
310,
4329,
445,
54557,
39186,
4461,
310,
330,
1254,
1110,
8687,
905,
32180,
9022,
2564,
98461,
22086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rolling_quantile_limits() {
let values = &[1.0, 2.0, 3.0, 4.0];
let interpol_options = vec![
QuantileInterpolOptions::Lower,
QuantileInterpolOptions::Higher,
QuantileInterpolOptions::Nearest,
QuantileInterpolOptions::Midpoint,
... | rust_cleaned_test_functions.jsonl/8713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 720
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16210,
53346,
457,
31820,
368,
341,
286,
1077,
2750,
284,
44590,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
4821,
286,
1077,
22876,
8743,
284,
7486,
905... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_target_set() {
let mut expected =
vec![BuildTarget { arch: String::from("x64"), board: String::from("workstation") }];
let mut results =
get_target_sets(Some(&String::from("x64")), Some(&String::from("workstation")));
assert_eq!(expected, results);... | rust_cleaned_test_functions.jsonl/28545 | {
"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,
11123,
2602,
368,
341,
286,
1077,
5206,
3601,
4035,
310,
7486,
20703,
11066,
6397,
314,
5325,
25,
923,
486,
1499,
445,
87,
21,
19,
3975,
4479,
25,
923,
486,
1499,
445,
1778,
20155,
899,
19376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_validate() {
let mut cfg = Config::new();
cfg.validate().unwrap();
assert_eq!(
cfg.raft_min_election_timeout_ticks,
cfg.raft_election_timeout_ticks
);
assert_eq!(
cfg.raft_max_election_timeout_ticks,
c... | rust_cleaned_test_functions.jsonl/34726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
42681,
368,
341,
286,
1077,
5206,
13286,
284,
5532,
486,
931,
543,
286,
13286,
19520,
1005,
15454,
543,
286,
2060,
10714,
33673,
310,
13286,
13,
2944,
7260,
2204,
1170,
20537,
49961,
345,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conda_env_interpreter() {
let base = OsStr::new("base");
assert_eq!(
conda_env_interpreter(base, true),
PathBuf::from_iter(&["base", "python.exe"])
);
assert_eq!(
conda_env_interpreter(base, false),
PathBuf::from_ite... | rust_cleaned_test_functions.jsonl/13939 | {
"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,
24433,
64,
15879,
15318,
28637,
368,
341,
286,
1077,
2331,
284,
15433,
2580,
486,
931,
445,
3152,
797,
286,
2060,
10714,
33673,
310,
390,
3235,
15879,
15318,
28637,
12663,
11,
830,
1326,
310,
7933... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes() {
assert_eq!(
Scalar::zero().to_bytes_le(),
[
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0
]
);
assert_eq!(
Scalar::one().to_bytes... | rust_cleaned_test_functions.jsonl/56375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 701
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
12524,
368,
341,
286,
2060,
10714,
33673,
310,
35176,
486,
14154,
1005,
983,
12524,
11751,
3148,
310,
2278,
394,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
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_remove_proposal_denied() {
let mut context = VMContextBuilder::new();
testing_env!(context.predecessor_account_id(accounts(1)).build());
let mut contract = Contract::new(
Config::test_config(),
VersionedPolicy::Default(vec![accounts(1).into()]),
... | rust_cleaned_test_functions.jsonl/16635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
21663,
32556,
49522,
1122,
368,
341,
286,
1077,
5206,
2266,
284,
17792,
1972,
3297,
486,
931,
543,
286,
7497,
15879,
10297,
2147,
6225,
26911,
269,
13500,
842,
91868,
7,
16,
4579,
5834,
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... | 1 |
#[test]
fn test_aggsig_multisig() {
let numkeys = 5;
let secp = Secp256k1::with_caps(ContextFlag::Full);
let mut keypairs: Vec<(SecretKey, PublicKey)> = vec![];
for _ in 0..numkeys {
keypairs.push(secp.generate_keypair(&mut thread_rng()).unwrap());
}
let pks: Vec<PublicKey> = keypairs.clone().int... | rust_cleaned_test_functions.jsonl/15033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 741
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
5857,
343,
26290,
285,
343,
368,
341,
197,
10217,
1629,
10563,
284,
220,
20,
280,
197,
10217,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
4197,
52955,
14001,
12135,
486,
9432,
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... | 6 |
#[test]
fn test_get_unified_log_level() {
assert_eq!("FATAL", get_unified_log_level(Level::Critical));
assert_eq!("ERROR", get_unified_log_level(Level::Error));
assert_eq!("WARN", get_unified_log_level(Level::Warning));
assert_eq!("INFO", get_unified_log_level(Level::Info));
... | rust_cleaned_test_functions.jsonl/20808 | {
"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,
3062,
4907,
1870,
5224,
8274,
368,
341,
286,
2060,
10714,
17223,
37,
30074,
497,
633,
4907,
1870,
5224,
8274,
30263,
486,
42008,
1106,
286,
2060,
10714,
17223,
3682,
497,
633,
4907,
1870,
5224,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dictionary_array_from_iter() {
let test = vec!["a", "a", "b", "c"];
let array: DictionaryArray<Int8Type> = test
.iter()
.map(|&x| if x == "b" { None } else { Some(x) })
.collect();
assert_eq!(
"DictionaryArray {keys: [Some(0... | rust_cleaned_test_functions.jsonl/11642 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42605,
3858,
5673,
11723,
368,
341,
286,
1077,
1273,
284,
7486,
0,
1183,
64,
497,
330,
64,
497,
330,
65,
497,
330,
66,
6332,
286,
1077,
1334,
25,
10466,
1857,
34520,
23,
929,
29,
284,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_apply_strategy_for_type_2() {
let data = [
0, 0, 0, 2, 0, 0, 0, 10, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
];
let expected = vec![1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
let mut decoder = Decoder::new(&data);
if let StrategyDataTypes::VecInt8(actual) ... | rust_cleaned_test_functions.jsonl/30702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
49308,
5478,
1819,
62,
17,
368,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
17,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
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... | 2 |
#[test]
fn test_enum_for_tuple() {
check(
r#"
enum Foo<|>{
A(i8),
B(i8),
}
fn main() {
let f: Foo;
f = Foo::A(1);
}
"#,
expect![[r#"
Foo Enum FileId(0) 0..33 5..8 Other
FileId(0) 70..73 EnumLiteral
"#]],
);
... | rust_cleaned_test_functions.jsonl/47768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
5478,
21773,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9018,
33428,
27,
91,
41446,
262,
362,
1956,
23,
1326,
262,
425,
1956,
23,
1326,
532,
8822,
1887,
368,
341,
262,
1077,
282,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_matcher_data_attribute_present() {
let m = Matcher::from("a[target]");
let mut attr = HashMap::new();
attr.insert("target".to_string(), AttributeSpec::Present);
assert_eq!(m.attribute, attr);
} | rust_cleaned_test_functions.jsonl/66002 | {
"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,
10708,
261,
1769,
16791,
36976,
368,
341,
286,
1077,
296,
284,
60632,
486,
1499,
445,
64,
57033,
37389,
286,
1077,
5206,
6376,
284,
10528,
486,
931,
543,
286,
6376,
7030,
445,
5657,
3263,
983,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fill_0() {
let hw = RefCell::new(CpuHardware::new());
let g = RefCell::new(Graph::new());
let ret = Node::fill(&g, &hw, Shape::new([0]), 123.);
assert_eq!(ret.shape(), Shape::new([0]));
assert!(ptr::eq(ret.hardware(), &hw));
assert_eq!(ret.calculate().get_values_f32(), ve... | rust_cleaned_test_functions.jsonl/31063 | {
"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,
30728,
62,
15,
368,
341,
262,
1077,
31256,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
262,
1077,
342,
284,
8550,
3599,
486,
931,
63779,
486,
931,
1423,
262,
1077,
2112,
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_tuple_structs() {
common::setup();
#[derive(PolarClass)]
struct Foo(i32, i32);
impl Foo {
fn new(a: i32, b: i32) -> Self {
Self(a, b)
}
}
// we can auto generate these accessors too. For now we have to rely on the attribute for
// f... | rust_cleaned_test_functions.jsonl/30390 | {
"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,
21773,
15126,
82,
368,
341,
262,
4185,
486,
15188,
1428,
262,
11506,
27098,
5304,
7417,
1957,
5563,
262,
2036,
33428,
1956,
18,
17,
11,
600,
18,
17,
626,
262,
11605,
33428,
341,
286,
5168,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_escaping() {
assert_eq!(format!("{{"), "{");
assert_eq!(format!("}}"), "}");
assert_eq!(format!("{{}}"), "{}");
assert_eq!(format!("}}{{"), "}{");
} | rust_cleaned_test_functions.jsonl/80888 | {
"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,
62,
42480,
368,
341,
262,
2060,
10714,
10297,
2243,
17223,
2979,
3975,
13868,
797,
262,
2060,
10714,
10297,
2243,
17223,
3417,
3975,
330,
20305,
262,
2060,
10714,
10297,
2243,
17223,
2979,
3417,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_config_builder_returns_new_builder() {
assert_eq!(
Config::builder(),
Builder::new(),
"Config::builder should return an unmodified new Builder"
);
} | rust_cleaned_test_functions.jsonl/91432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
28532,
58900,
5921,
28532,
368,
341,
286,
2060,
10714,
33673,
310,
5532,
486,
17850,
3148,
310,
20626,
486,
931,
3148,
310,
330,
2648,
486,
17850,
1265,
470,
458,
650,
27162,
501,
20626,
698... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_listener_startup() {
let mut config = ClusterConfig {
node_stakes: vec![100; 1],
cluster_lamports: 1_000,
num_listeners: 3,
validator_configs: make_identical_validator_configs(&ValidatorConfig::default(), 1),
..ClusterConfig::default()
};
let c... | rust_cleaned_test_functions.jsonl/31760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46493,
80858,
368,
341,
262,
1077,
5206,
2193,
284,
35380,
2648,
341,
286,
2436,
1261,
2050,
25,
7486,
20703,
16,
15,
15,
26,
220,
16,
1259,
286,
10652,
907,
309,
3394,
25,
220,
16,
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_ops_other_number_types() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
let mut scope = Scope::new();
scope.push("x", 42_u16);
assert!(matches!(
*engine.eval_with_scope::<bool>(&mut scope, "x == 42").expect_err("should error"),
EvalAltResult::E... | rust_cleaned_test_functions.jsonl/49952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21959,
30456,
5500,
9763,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
4712,
284,
8200,
486,
931,
1428,
262,
1077,
5206,
6891,
284,
34920,
486,
931,
1428,
262,
6891... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_target_ssh_address_priority() {
let name = Some("bubba");
let start = std::time::SystemTime::now();
use std::iter::FromIterator;
// An empty set returns nothing.
let addrs = BTreeSet::<TargetAddrEntry>::new();
assert_eq!(Target::new_with_addr_entr... | rust_cleaned_test_functions.jsonl/115225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1909
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11123,
82805,
6744,
38161,
368,
341,
286,
1077,
829,
284,
4329,
445,
65,
392,
4645,
797,
286,
1077,
1191,
284,
1460,
486,
1678,
486,
2320,
1462,
486,
3328,
543,
286,
990,
1460,
486,
2015,
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_terminate() {
assert_eq!(js_parser_rs::parse("\n".chars()), Ok(vec![]));
assert_eq!(js_parser_rs::parse("\r".chars()), Ok(vec![]));
assert_eq!(js_parser_rs::parse("\n ;".chars()), Ok(vec![TokenType::Semicolon]));
} | rust_cleaned_test_functions.jsonl/61525 | {
"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,
62,
48061,
368,
341,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
4921,
77,
3263,
19255,
11858,
7622,
25592,
0,
1294,
1106,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
4921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unknown_symbol() {
let writer_schema =
Schema::parse_str(r#"{"type": "enum", "name": "Test", "symbols": ["FOO", "BAR"]}"#)
.unwrap();
let reader_schema =
Schema::parse_str(r#"{"type": "enum", "name": "Test", "symbols": ["BAR", "BAZ"]}"#)
.unwrap();... | rust_cleaned_test_functions.jsonl/129454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
21179,
368,
341,
262,
1077,
6916,
25371,
4035,
286,
12539,
486,
6400,
2895,
2601,
55543,
4913,
1313,
788,
330,
9018,
497,
330,
606,
788,
330,
2271,
497,
330,
67426,
788,
4383,
3788,
46,
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_get_slot_id_change_granularity() {
let mut context = get_context(accounts(1));
testing_env!(context.build());
let mut contract = Contract::new();
testing_env!(context.is_view(true).build());
let slot = contract.get_slot_id(None);
assert_eq!(slot, 1... | rust_cleaned_test_functions.jsonl/43009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 643
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
27563,
842,
15947,
15682,
276,
28979,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
16,
1106,
286,
7497,
15879,
10297,
2147,
13239,
1423,
286,
1077,
5206,
5116,
284,
19185,
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_block_read_count() {
let g = GlobalIoStats::default();
g.init();
g.global_update(StatsFop::Read, 4000, true);
assert_eq!(g.block_count_read[1].load(Ordering::Relaxed), 1);
g.global_update(StatsFop::Read, 4096, true);
assert_eq!(g.block_count_read[... | rust_cleaned_test_functions.jsonl/40871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
6443,
3180,
368,
341,
286,
1077,
342,
284,
7962,
42799,
16635,
486,
2258,
543,
286,
342,
8271,
543,
286,
342,
21932,
8882,
7,
16635,
37,
453,
486,
4418,
11,
220,
19,
15,
15,
15,
11,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iso8601_from_epoch_micros_test() {
let expected_iso = "2021-07-20T23:18:18Z";
let dt = iso8601_from_epoch(EpochUnit::Microseconds(1626823098000000));
assert_eq!(expected_iso, dt);
} | rust_cleaned_test_functions.jsonl/124210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49660,
23,
21,
15,
16,
5673,
20682,
73003,
82,
4452,
368,
341,
286,
1077,
3601,
49660,
284,
330,
17,
15,
17,
16,
12,
15,
22,
12,
17,
15,
51,
17,
18,
25,
16,
23,
25,
16,
23,
57,
876,
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_turn_right() {
let mut ship = Ship::new();
assert_eq!(ship.facing, 90);
ship.turn_right(180);
assert_eq!(ship.facing, 270);
ship.turn_right(90);
assert_eq!(ship.facing, 0);
} | rust_cleaned_test_functions.jsonl/120428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37274,
10539,
368,
341,
286,
1077,
5206,
8284,
284,
26803,
486,
931,
543,
286,
2060,
10714,
10297,
5270,
833,
4527,
11,
220,
24,
15,
317,
286,
8284,
45634,
10539,
7,
16,
23,
15,
317,
286,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_follower_commit_entry() {
let l = default_logger();
let mut tests = vec![
(vec![new_entry(1, 2, SOME_DATA)], 2),
(
vec![
new_entry(1, 2, SOME_DATA),
new_entry(1, 3, Some("somedata2")),
],
3,
),
... | rust_cleaned_test_functions.jsonl/62306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 876
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
29034,
36346,
9078,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
7032,
284,
7486,
90515,
286,
320,
4083,
20703,
931,
9078,
7,
16,
11,
220,
17,
11,
65555,
7896,
25035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qcolor() {
let blue1 = QColor::from_name("blue");
let blue2 = QColor::from_rgb_f(0., 0., 1.);
assert_eq!(blue1.get_rgba().0, 0.);
assert_eq!(blue1.get_rgba().2, 1.);
assert!(blue1 == blue2);
let red1 = QColor::from_name("red");
let red2 = QColor::from_rgb_f(1., 0., 0... | rust_cleaned_test_functions.jsonl/59781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
3423,
368,
341,
262,
1077,
6303,
16,
284,
55758,
486,
1499,
1269,
445,
12203,
797,
262,
1077,
6303,
17,
284,
55758,
486,
1499,
37407,
761,
7,
15,
2572,
220,
15,
2572,
220,
16,
58957,
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_non_used_facet_collector() {
let mut facet_collector = FacetCollector::for_field(Field::from_field_id(0));
facet_collector.add_facet(Facet::from("/country"));
facet_collector.add_facet(Facet::from("/countryeurope"));
} | rust_cleaned_test_functions.jsonl/10755 | {
"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,
21637,
27803,
41589,
295,
10211,
27669,
368,
341,
286,
1077,
5206,
44507,
10211,
27669,
284,
16945,
295,
53694,
486,
1958,
5013,
57788,
486,
1499,
5013,
842,
7,
15,
1106,
286,
44507,
10211,
27669,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.