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_create_tx_manually_selected_insufficient() {
let (wallet, descriptors, _) = get_funded_wallet(get_test_wpkh());
let small_output_txid = wallet.database.borrow_mut().received_tx(
testutils! (@tx ( (@external descriptors, 0) => 25_000 ) (@confirmations 1)),
... | rust_cleaned_test_functions.jsonl/11346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
17062,
1832,
23755,
34386,
26683,
368,
341,
286,
1077,
320,
35735,
11,
47517,
11,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
2613,
7645,
17805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let scenario = parse_input(get_test_input());
let expected_grid = String::from(r"
/...\
. . /....\
. /.+..+.\ .
. . . . . .
\.+./ \.+../
\....../ ");
let expected_carts = vec![
Cart { pos: (0, 2), dir: (0, 1), intersection_count:... | rust_cleaned_test_functions.jsonl/63952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
286,
1077,
15048,
284,
4715,
5898,
5433,
4452,
5898,
5231,
286,
1077,
3601,
15604,
284,
923,
486,
1499,
2601,
698,
14,
30801,
1789,
13,
256,
659,
220,
608,
1934,
5661,
13,
14751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_e2e() {
let packet_size: u16 = 512;
let data_size: usize = 123456;
let data = gen_data(data_size);
let mut plans = load_encoding_plans(".encoding_plan_cache/").unwrap();
let plan_keys: HashSet<u16> = plans.keys().copied().collect();
let encoder = match Ra... | rust_cleaned_test_functions.jsonl/96426 | {
"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,
11224,
15227,
2204,
17,
68,
368,
341,
262,
1077,
10151,
2368,
25,
575,
16,
21,
284,
220,
20,
16,
17,
280,
262,
1077,
821,
2368,
25,
22301,
284,
220,
16,
17,
18,
19,
20,
21,
401,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_sort_boolean_sort() {
for size in [0, 1, 10_000].iter() {
helper_sort(false, &|a| boolean_sort(a), generators_bool(), *size);
}
} | rust_cleaned_test_functions.jsonl/43395 | {
"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,
18435,
46642,
18435,
368,
341,
262,
369,
1379,
304,
508,
15,
11,
220,
16,
11,
220,
16,
15,
62,
15,
15,
15,
936,
2015,
368,
341,
286,
13137,
18435,
3576,
11,
609,
91,
64,
91,
2710,
18435,
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
] | 2 |
#[test]
fn test_list_tuple() {
let data = "[{name=\"argc\",value=\"1\"},{name=\"argv\",value=\"0xbfc4d4d4\"}]";
let result = Value::List(ListValue::ValueList(vec![
Value::Tuple(TupleValue::Data(vec![
Variable("name", Value::Const(Cow::from("argc"))),
V... | rust_cleaned_test_functions.jsonl/74246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
21773,
368,
341,
286,
1077,
821,
284,
10545,
90,
606,
4070,
23307,
16215,
957,
4070,
16,
2105,
16561,
606,
4070,
6508,
16215,
957,
4070,
15,
7929,
8316,
19,
67,
19,
67,
19,
2105,
25439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_register() {
assert_eq!(
write_register(&b"Pff=1020"[..]),
Done(&b""[..], (255, vec!(16, 32)))
);
} | rust_cleaned_test_functions.jsonl/40121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9165,
14000,
368,
341,
262,
2060,
10714,
33673,
286,
3270,
14000,
2099,
65,
67681,
542,
28,
16,
15,
17,
15,
36864,
496,
17036,
286,
27357,
2099,
65,
3014,
95874,
1125,
320,
17,
20,
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 |
#[test]
fn test_key_manager_rename() {
let (_tmp, manager) = new_tmp_key_manager(None, None, None, None);
let mut manager = manager.unwrap().unwrap();
manager.method = EncryptionMethod::Aes192Ctr;
let file = manager.new_file("foo").unwrap();
manager.rename_file("foo", "f... | rust_cleaned_test_functions.jsonl/115450 | {
"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,
3097,
12144,
79399,
368,
341,
286,
1077,
5453,
5173,
11,
6645,
8,
284,
501,
16125,
3097,
12144,
26717,
11,
2240,
11,
2240,
11,
2240,
317,
286,
1077,
5206,
6645,
284,
6645,
55395,
1005,
15454,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_predicates() {
assert!(Matrix3::<f64>::identity().is_identity());
assert!(Matrix3::<f64>::identity().is_symmetric());
assert!(Matrix3::<f64>::identity().is_diagonal());
assert!(Matrix3::<f64>::identity().is_invertible());
assert!(!A.is_identity());
... | rust_cleaned_test_functions.jsonl/30159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12830,
24821,
368,
341,
286,
2060,
10297,
6689,
18,
27638,
69,
21,
19,
6831,
16912,
1005,
285,
46244,
1423,
286,
2060,
10297,
6689,
18,
27638,
69,
21,
19,
6831,
16912,
1005,
285,
26825,
15903,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_degenerate_consensus_two_bases() {
let pssm: DNAMotif = DNAMotif::from_seqs(
vec![b"AAACCG".to_vec(), b"CGTGTT".to_vec()].as_ref(),
Some(&[0., 0., 0., 0.]),
)
.unwrap();
assert_eq!(pssm.degenerate_consensus(), b"MRWSYK".to_vec());
} | rust_cleaned_test_functions.jsonl/17030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
19366,
31971,
13626,
23241,
96290,
368,
341,
286,
1077,
281,
778,
76,
25,
60656,
1402,
354,
333,
284,
60656,
1402,
354,
333,
486,
1499,
93261,
1006,
310,
7486,
20703,
65,
1,
6029,
1706,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_hex_with_parse_error() {
let res: Result<RgbColor, Error> = "#0qfd00".parse();
assert!(res.is_err());
assert_eq!(format!("{}", res.unwrap_err()), "couldn't parse hex value: invalid digit found in string");
} | rust_cleaned_test_functions.jsonl/46475 | {
"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,
31433,
32655,
6615,
21039,
4096,
368,
341,
286,
1077,
592,
25,
5714,
23370,
9511,
1636,
11,
4600,
29,
284,
5869,
15,
80,
6902,
15,
15,
3263,
6400,
543,
286,
2060,
10297,
416,
2079,
9266,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug() {
let root = RootLocation::from("path");
let debug = format!("{:?}", root);
assert_eq!(debug, r#"Raw("path")"#);
} | rust_cleaned_test_functions.jsonl/92101 | {
"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,
15446,
368,
341,
286,
1077,
3704,
284,
18854,
4707,
486,
1499,
445,
2343,
797,
286,
1077,
7390,
284,
3561,
88928,
25,
52652,
3704,
317,
286,
2060,
10714,
10297,
8349,
11,
435,
55543,
20015,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_with_mock() {
let key = [0x55u8; 32];
let identity = X25519Public::try_from(&key as &[u8]).unwrap();
let mut mock_consensus_enclave = MockConsensusEnclave::new();
mock_consensus_enclave
.expect_get_identity()
.times(1)
.return_... | rust_cleaned_test_functions.jsonl/5706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
34134,
368,
341,
286,
1077,
1376,
284,
508,
15,
87,
20,
20,
84,
23,
26,
220,
18,
17,
935,
286,
1077,
9569,
284,
1599,
17,
20,
20,
16,
24,
12676,
486,
1539,
5673,
2099,
792,
438,
4459... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_i64() {
for &i in &[
0,
1,
2,
3,
1234,
-0,
-1,
-2,
-3,
-1234,
i64::max_value(),
i64::max_value() - 1,
i64::max_value() / 2,
i64::min_value(),
i64::min_value() + 1,
... | rust_cleaned_test_functions.jsonl/132321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1023
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
21,
19,
368,
341,
262,
369,
609,
72,
304,
609,
9640,
286,
220,
15,
345,
286,
220,
16,
345,
286,
220,
17,
345,
286,
220,
18,
345,
286,
220,
16,
17,
18,
19,
345,
286,
481,
15,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_proof_path_storage_key_branch() {
let mut key = ProofPath::new(&[255u8; 32]);
key = key.prefix(11);
key = key.suffix(5);
let mut buf = vec![0; PROOF_PATH_SIZE];
key.write(&mut buf);
let mut key2 = ProofPath::read(&buf);
key2.start = 5;
assert_eq!(buf[0], BRANCH_... | rust_cleaned_test_functions.jsonl/25535 | {
"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,
86757,
2638,
23310,
3097,
28031,
368,
341,
262,
1077,
5206,
1376,
284,
36991,
1820,
486,
931,
2099,
58,
17,
20,
20,
84,
23,
26,
220,
18,
17,
2558,
262,
1376,
284,
1376,
38543,
7,
16,
16,
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_local_flags() {
let _m = crate::PTSNAME_MTX.lock();
// Open one pty to get attributes for the second one
let mut termios = {
let pty = openpty(None, None).unwrap();
assert!(pty.master > 0);
assert!(pty.slave > 0);
let termios = tcgetattr(pty.slav... | rust_cleaned_test_functions.jsonl/103389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
14130,
368,
341,
1066,
262,
1077,
716,
76,
284,
17717,
486,
73693,
7535,
1245,
22867,
21003,
1428,
262,
442,
5264,
825,
281,
1881,
311,
633,
8201,
369,
279,
2086,
825,
198,
262,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_on_a_only() {
let string = "a";
let option_test: Option<Mechanism<String>>;
option_test = helpers::capture_matches(&string, Kind::A);
let test = option_test.unwrap();
assert_eq!(test.is_pass(), true);
assert_eq!(test.raw(), "a");
assert_eq!(test.to_string(), "... | rust_cleaned_test_functions.jsonl/90566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
4470,
4306,
18410,
368,
341,
262,
1077,
914,
284,
330,
64,
876,
262,
1077,
2999,
4452,
25,
6959,
33274,
4737,
67813,
3464,
2452,
401,
262,
2999,
4452,
284,
30187,
486,
45070,
38344,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dep_set_serialize() {
let mut x: HashTrieSet<Dep> = HashTrieSet::new();
x.insert_mut(Dep::new(1));
x.insert_mut(Dep::new(2));
let x: DepSet = x.into();
let buf = x.serialize();
let y = DepSet::deserialize(&buf);
assert_eq!(x, y);
} | rust_cleaned_test_functions.jsonl/3501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49258,
2602,
88686,
368,
341,
286,
1077,
5206,
856,
25,
6531,
51,
7231,
1649,
27,
7839,
29,
284,
6531,
51,
7231,
1649,
486,
931,
543,
286,
856,
7030,
29523,
5432,
747,
486,
931,
7,
16,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_genotype_allele_conversion() {
let allele = GenotypeAllele::Unphased(1);
let converted: i32 = allele.into();
let expected = 4;
assert_eq!(converted, expected);
} | rust_cleaned_test_functions.jsonl/8782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
4156,
62,
94520,
64132,
368,
341,
286,
1077,
69410,
284,
9316,
4156,
70451,
273,
486,
1806,
759,
1475,
7,
16,
317,
286,
1077,
16099,
25,
600,
18,
17,
284,
69410,
39860,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_new_bitfield() {
let mut field = BooleanBitfield::new();
let original_len = field.len();
for i in 0..100 {
if i < original_len {
assert!(!field.get(i).unwrap());
} else {
assert!(field.get(i).is_err());
... | rust_cleaned_test_functions.jsonl/30468 | {
"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,
5921,
13996,
2566,
368,
341,
286,
1077,
5206,
2070,
284,
6992,
8344,
2566,
486,
931,
543,
286,
1077,
4024,
6043,
284,
2070,
19406,
1428,
286,
369,
600,
304,
220,
15,
496,
16,
15,
15,
341,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_iter_mut_double_ended() {
let mut list = VecList::new();
list.push_back(0);
list.push_back(1);
list.push_back(-1);
list.push_back(2);
list.push_back(-2);
let mut iter = list.iter_mut();
assert_eq!(iter.next(), Some(&mut 0));
... | rust_cleaned_test_functions.jsonl/11508 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
29523,
24598,
62,
2883,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
3895,
7,
15,
317,
286,
1140,
2552,
3895,
7,
16,
317,
286,
1140,
2552,
3895,
408... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_figment_is_default() {
figment::Jail::expect_with(|_| {
let mut default: Config = Config::figment().extract().unwrap();
default.profile = Config::default().profile;
assert_eq!(default, Config::default());
Ok(())
});
} | rust_cleaned_test_functions.jsonl/22113 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62141,
478,
6892,
9993,
368,
341,
286,
4144,
478,
486,
41,
604,
486,
17119,
6615,
22428,
35395,
341,
310,
1077,
5206,
1638,
25,
5532,
284,
5532,
486,
904,
478,
1005,
23493,
1005,
15454,
543,
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_iter_bit() {
let mut n = BitIter::new(0b1010_0011);
assert_eq!(n.next(), Some(true));
assert_eq!(n.next(), Some(false));
assert_eq!(n.next(), Some(true));
assert_eq!(n.next(), Some(false));
assert_eq!(n.next(), Some(false));
assert_eq!(n.next(), Some(false));
ass... | rust_cleaned_test_functions.jsonl/130326 | {
"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,
11723,
13996,
368,
341,
262,
1077,
5206,
308,
284,
6495,
8537,
486,
931,
7,
15,
65,
16,
15,
16,
15,
62,
15,
15,
16,
16,
317,
262,
2060,
10714,
10297,
77,
4529,
1507,
4329,
3715,
1106,
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_decode_cmp_reg_w() {
assert_eq!(
decode_32(0xebb71f46),
Instruction::CMP_reg {
params: Reg2ShiftNoSetFlagsParams {
rn: Reg::R7,
rm: Reg::R6,
shift_t: SRType::LSL,
shift_n: 5,
},
... | rust_cleaned_test_functions.jsonl/64860 | {
"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,
15227,
35193,
4920,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
54468,
65,
22,
16,
69,
19,
21,
1326,
286,
29051,
486,
93158,
4920,
341,
310,
3628,
25,
3184,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multi_field_hash() {
test_struct!([]
{ [] x: u16 = 0xa5a5,
[] y: u64 = 1 }
[(Djb2Hasher, SimpleHasher, 0x3d17c937_u64)]);
} | rust_cleaned_test_functions.jsonl/43903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
5013,
8950,
368,
341,
262,
1273,
15126,
0,
2561,
921,
338,
314,
3056,
856,
25,
575,
16,
21,
284,
220,
15,
9591,
20,
64,
20,
345,
4293,
3056,
379,
25,
575,
21,
19,
284,
220,
16,
456,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_first_use() {
let context = Context::create();
let module = context.create_module("ivs");
let builder = context.create_builder();
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let fn_val = module.add_function("my_fn", fn_type, None)... | rust_cleaned_test_functions.jsonl/125605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12978,
15951,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
344,
82,
797,
262,
1077,
7363,
284,
2266,
2520,
28532,
543,
262,
1077,
737... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone() {
use bitstream_io::{BigEndian, BitRead, BitReader};
let actual_data: [u8; 4] = [0xB1, 0xED, 0x3B, 0xC1];
let mut r = BitReader::endian(Cursor::new(&actual_data), BigEndian);
assert!(r.byte_aligned());
assert_eq!(r.read::<u32>(4).unwrap(), 0xB);
let mut r2 =... | rust_cleaned_test_functions.jsonl/65125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
368,
341,
262,
990,
2699,
4027,
16939,
22964,
15636,
43231,
11,
6495,
4418,
11,
6495,
5062,
2315,
1066,
262,
1077,
5042,
1769,
25,
508,
84,
23,
26,
220,
19,
60,
284,
508,
15,
14377,
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_null_writer() {
let mut s = NullWriter;
let buf = vec![0, 0, 0];
s.write(buf.as_slice()).unwrap();
s.flush().unwrap();
} | rust_cleaned_test_functions.jsonl/91537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
28908,
368,
341,
286,
1077,
5206,
274,
284,
18084,
6492,
280,
286,
1077,
6607,
284,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
935,
286,
274,
3836,
10731,
5357,
26488,
6011,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_strip_trailing_newline() {
assert_eq!(strip_trailing_newline(""), "");
assert_eq!(strip_trailing_newline("foo"), "foo");
assert_eq!(strip_trailing_newline("foo\n"), "foo");
assert_eq!(strip_trailing_newline("foo\n\n"), "foo\n");
assert_eq!(strip_trailing_n... | rust_cleaned_test_functions.jsonl/118130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66130,
3547,
14277,
5921,
1056,
368,
341,
286,
2060,
10714,
10297,
13105,
3547,
14277,
5921,
1056,
86076,
14498,
286,
2060,
10714,
10297,
13105,
3547,
14277,
5921,
1056,
445,
7975,
3975,
330,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_localfs_get_blob_path() {
let config = LocalFsConfig {
readahead: true,
readahead_sec: 20,
blob_file: "/a/b/cxxxxxxxxxxxxxxxxxxxxxxx".to_string(),
dir: "/a/b".to_string(),
alt_dirs: Vec::new(),
};
let json = serd... | rust_cleaned_test_functions.jsonl/20349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1042
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
3848,
3062,
45908,
2638,
368,
341,
286,
1077,
2193,
284,
8774,
48300,
2648,
341,
310,
1349,
42787,
25,
830,
345,
310,
1349,
42787,
17242,
25,
220,
17,
15,
345,
310,
23404,
2458,
25,
3521,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_and() {
let mut mcu = McuFactory::create("attiny85");
mcu.set_register(1, 0xC5);
mcu.set_register(2, 0x95);
let memory_data = vec![0x12, 0x20];
mcu.load_program_memory(&memory_data);
assert_eq!(mcu.get_program_counter(), 0x0);
mcu.step();
assert_eq!(mcu.get_progra... | rust_cleaned_test_functions.jsonl/54988 | {
"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,
8378,
368,
341,
262,
1077,
5206,
19223,
84,
284,
4483,
84,
4153,
486,
3182,
445,
1587,
6441,
23,
20,
797,
262,
19223,
84,
980,
14000,
7,
16,
11,
220,
15,
12125,
20,
317,
262,
19223,
84,
980,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concurrent_logging() {
let mut runner = Runner::new();
let _query = runner.proxy.start_logging(
"test",
&mut vec![
&mut Metric::CpuLoad(CpuLoad { interval_ms: 100 }),
&mut Metric::Temperature(Temperature {
... | rust_cleaned_test_functions.jsonl/66700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 917
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
59982,
368,
341,
286,
1077,
5206,
22259,
284,
44946,
486,
931,
1428,
286,
1077,
716,
1631,
284,
22259,
41103,
4962,
59982,
1006,
310,
330,
1944,
756,
310,
609,
6984,
7486,
90515,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_degenerated_enumeration() {
let size: usize = 6;
// Make matrix of size < 10 as follows:
// each of them overlapping 4 times
let data = iproduct![0..size, 1..(size / 2 + 1)]
.map(|(i, j)| (j as f64)... | rust_cleaned_test_functions.jsonl/46165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
16187,
6205,
3389,
367,
368,
341,
286,
1077,
1379,
25,
22301,
284,
220,
21,
280,
286,
442,
7405,
6172,
315,
1379,
366,
220,
16,
15,
438,
11017,
510,
16885,
16885,
286,
442,
1817,
315,
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_and() {
for a_val in [false, true].iter() {
for b_val in [false, true].iter() {
let mut cs = TestConstraintSystem::<Scalar>::new();
let a = AllocatedBit::alloc(cs.namespace(|| "a"), Some(*a_val)).unwrap();
let b = AllocatedBit::... | rust_cleaned_test_functions.jsonl/13763 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
368,
341,
286,
369,
264,
6189,
304,
508,
3849,
11,
830,
936,
2015,
368,
341,
310,
369,
293,
6189,
304,
508,
3849,
11,
830,
936,
2015,
368,
341,
394,
1077,
5206,
10532,
284,
3393,
17890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_collect_item_overstack() {
let mut inv = Inventory::new(InventoryType::Player, 46);
let item = ItemStack::new(Item::DiamondSword, 1);
inv.set_item_at(SLOT_HOTBAR_OFFSET, item.clone());
inv.collect_item(item.clone());
assert_eq!(inv.item_at(SLOT_HOTBAR_OFF... | rust_cleaned_test_functions.jsonl/59272 | {
"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,
68140,
5634,
15431,
7693,
368,
341,
286,
1077,
5206,
1529,
284,
28126,
486,
931,
7,
22319,
929,
486,
4476,
11,
220,
19,
21,
317,
286,
1077,
1509,
284,
38115,
486,
931,
29771,
486,
76510,
50,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mul_by_x() {
// multiplying by `x` a point in G2 is the same as multiplying by
// the equivalent scalar.
let generator = G2Projective::generator();
let x = if crate::BLS_X_IS_NEGATIVE {
-Scalar::from(crate::BLS_X)
} else {
Scalar::from(crate::BLS_X)
};
... | rust_cleaned_test_functions.jsonl/47811 | {
"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,
24944,
3710,
3212,
368,
341,
262,
442,
84192,
553,
1565,
87,
63,
264,
1459,
304,
479,
17,
374,
279,
1852,
438,
84192,
553,
198,
262,
442,
279,
13578,
17274,
624,
262,
1077,
13823,
284,
479,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_gen_modules_list() {
let lints = vec![
Lint::new("should_assert_eq", "group1", "abc", None, "module_name"),
Lint::new("should_assert_eq2", "group2", "abc", Some("abc"), "deprecated"),
Lint::new("incorrect_stuff", "group3", "abc", None, "another_module"),
Lint:... | rust_cleaned_test_functions.jsonl/1262 | {
"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,
16322,
15848,
2019,
368,
341,
262,
1077,
326,
21042,
284,
7486,
90515,
286,
444,
396,
486,
931,
445,
5445,
16553,
10714,
497,
330,
4074,
16,
497,
330,
13683,
497,
2240,
11,
330,
4352,
1269,
4461... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_no_concat_alias() {
let s = ("aa", "bb");
let t = ("aabb", "");
let u = ("a", "abb");
assert!(s != t && t != u);
assert!(hash(&s) != hash(&t) && hash(&s) != hash(&u));
let v: (&[u8], &[u8], &[u8]) = (&[1u8], &[0u8, 0], &[0u8]);
let w... | rust_cleaned_test_functions.jsonl/104538 | {
"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,
8950,
6536,
57478,
35947,
368,
341,
286,
1077,
274,
284,
3489,
5305,
497,
330,
6066,
797,
286,
1077,
259,
284,
3489,
64,
12523,
497,
14498,
286,
1077,
575,
284,
3489,
64,
497,
330,
12523,
3071,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scalar_mul3() {
let base_point = Secp256r1Point::generator();
let int: Secp256r1Scalar = ECScalar::from(
&BigInt::from_hex("7CF27B188D034F7E8A52380304B51AC3C08969E277F21B35A60B48FC47669978")
.unwrap(),
);
let test = base_point * int;
... | rust_cleaned_test_functions.jsonl/12369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
24944,
18,
368,
341,
286,
1077,
2331,
6085,
284,
4520,
79,
17,
20,
21,
81,
16,
2609,
486,
35851,
543,
286,
1077,
526,
25,
4520,
79,
17,
20,
21,
81,
16,
20639,
284,
20633,
20639,
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_password_verify() {
run_test(|url, client| {
let login = create_and_authorize_user(
url,
&client,
"test_password_verify@gmail.com",
"Admin2193!",
);
let verify_response = client
... | rust_cleaned_test_functions.jsonl/32297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10122,
35638,
368,
341,
286,
1598,
4452,
22428,
1085,
11,
2943,
91,
341,
310,
1077,
5858,
284,
1855,
8378,
22938,
551,
3317,
1006,
394,
2515,
345,
394,
609,
2972,
345,
394,
330,
1944,
10122,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pop_schema() {
let mut conn = TestConn::default();
conn.sanitized_partition_map();
let t = r#"
[{:db/id "e" :db/ident :test/one :db/valueType :db.type/long :db/cardinality :db.cardinality/one}
{:db/id "f" :db/ident :test/many :db/valueType :db.ty... | rust_cleaned_test_functions.jsonl/93663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
25371,
368,
341,
286,
1077,
5206,
4534,
284,
3393,
9701,
486,
2258,
543,
286,
4534,
514,
276,
83443,
43840,
5376,
1428,
286,
1077,
259,
284,
435,
2,
698,
310,
18466,
25,
1999,
38146,
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... | 1 |
#[test]
fn test_hero_field_order() {
let database = Database::new();
let schema = RootNode::new(&database, EmptyMutation::<Database>::new());
let doc = r#"
{
hero {
id
name
}
}"#;
assert_eq!(
::execute(doc, None, &s... | rust_cleaned_test_functions.jsonl/35462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1060
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78716,
5013,
7869,
368,
341,
262,
1077,
4625,
284,
9994,
486,
931,
543,
262,
1077,
10802,
284,
18854,
1955,
486,
931,
2099,
12216,
11,
22228,
53998,
27638,
5988,
6831,
931,
5231,
262,
1077,
4629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_proposal_vote_requester() {
let state = setup_splinter_state();
let peer_connector = setup_peer_connector();
let orchestrator = setup_orchestrator();
// set up key registry
let mut key_registry = StorageKeyRegistry::new("memory".to_string()).unwr... | rust_cleaned_test_functions.jsonl/124185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 574
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
21663,
32556,
54360,
7893,
261,
368,
341,
286,
1077,
1584,
284,
6505,
643,
500,
2245,
4387,
543,
286,
1077,
14397,
76393,
284,
6505,
45159,
76393,
543,
286,
1077,
65128,
850,
284,
6505,
873... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sorted_vector_all_ones() {
let mut v = vec![1, 1, 1];
assert_eq!(Solution::remove_duplicates(&mut v), 1);
assert_eq!(v, vec![1]);
} | rust_cleaned_test_functions.jsonl/74289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41277,
12247,
5705,
62,
3154,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
16,
11,
220,
16,
11,
220,
16,
935,
286,
2060,
10714,
10297,
36842,
486,
5399,
75051,
2099,
6984,
348,
701,
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 |
#[test]
fn test_is_locked_out_root_slot_child_pass() {
let mut tower = Tower::new(EpochStakes::new_for_tests(2), 0, 0.67);
let descendants = vec![(0, vec![1].into_iter().collect())]
.into_iter()
.collect();
tower.lockouts.root_slot = Some(0);
assert!(!towe... | rust_cleaned_test_functions.jsonl/113937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
60271,
6068,
12993,
27563,
17268,
15464,
368,
341,
286,
1077,
5206,
21271,
284,
21938,
486,
931,
10722,
79,
4953,
623,
2050,
486,
931,
5478,
32509,
7,
17,
701,
220,
15,
11,
220,
15,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_ndarray_error() {
let test_file = dicom_test_files::path("pydicom/CT_small.dcm").unwrap();
let obj = open_file(test_file).unwrap();
assert!(matches!(
obj.decode_pixel_data().unwrap().to_ndarray::<u8>(),
Err(Error::InvalidDataType { .. })
... | rust_cleaned_test_functions.jsonl/120763 | {
"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,
2346,
43544,
1653,
4096,
368,
341,
286,
1077,
1273,
2458,
284,
21249,
316,
4452,
10931,
486,
2343,
445,
3288,
29680,
316,
14,
1162,
31966,
950,
6226,
1827,
15454,
543,
286,
1077,
2839,
284,
1787,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_legal_moves_banmen_with_kaku_nari_contiguous_sente() {
const KOMAKINDS:[KomaKind; 2] = [SFu,GFu];
const OFFSETS:[(i32,i32); 4] = [
(-1,0),(1,0),(0,-1),(0,1)
];
let blank_banmen = Banmen([[Blank; 9]; 9]);
for k in &KOMAKINDS {
for o in &OFFSETS {
let mut banmen = blank_b... | rust_cleaned_test_functions.jsonl/81157 | {
"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,
82324,
45390,
880,
276,
5676,
6615,
4698,
23557,
1089,
2780,
10260,
27029,
643,
6817,
368,
972,
4777,
730,
1898,
11907,
5245,
50,
7259,
42,
7786,
10629,
26,
220,
17,
60,
284,
508,
28667,
84,
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_characters_per_minute_also_counts_spaces() {
let now = Clock::now();
let in_1_minute = now.add(Duration::minutes(1));
let content_with_15_chars = "abcde fghijklmn";
let unit = TrainingSession {
lesson_content: content_with_15_chars.to_string(),
... | rust_cleaned_test_functions.jsonl/58816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79060,
5678,
76944,
8418,
704,
25977,
67883,
368,
341,
286,
1077,
1431,
284,
26142,
486,
3328,
543,
286,
1077,
304,
62,
16,
76944,
284,
1431,
1364,
64114,
486,
37037,
7,
16,
1106,
286,
1077,
221... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_runtime_get_vm_config() {
let req = VmmAction::GetVmConfiguration;
check_runtime_request(req, |result, _| {
assert_eq!(
result,
Ok(VmmData::MachineConfiguration(VmConfig::default()))
);
});
} | rust_cleaned_test_functions.jsonl/44538 | {
"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,
33232,
3062,
39008,
5332,
368,
341,
286,
1077,
4232,
284,
647,
3821,
2512,
486,
1949,
88124,
7688,
280,
286,
1779,
33232,
7893,
6881,
11,
760,
1382,
11,
85137,
341,
310,
2060,
10714,
33673,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_infinity() {
let vec = to_vec(&::std::f64::INFINITY).unwrap();
assert_eq!(vec, b"\xf9|\x00");
} | rust_cleaned_test_functions.jsonl/110267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
19888,
368,
341,
262,
1077,
7486,
284,
311,
13251,
2099,
486,
1834,
486,
69,
21,
19,
486,
687,
55990,
568,
15454,
543,
262,
2060,
10714,
10297,
4083,
11,
293,
11934,
5848,
24,
22957,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_raw_fd_api() {
unsafe { pcap_on_demand::load_pcap_library() };
use std::fs::File;
use std::io::prelude::*;
#[cfg(not(windows))]
use std::os::unix::io::{FromRawFd, RawFd};
use std::thread;
const N_PACKETS: usize = 64;
let data: Vec<u8> = (0..191).cycle().take... | rust_cleaned_test_functions.jsonl/132617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1709
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
17676,
11697,
368,
341,
262,
19860,
314,
94554,
4470,
91295,
486,
1078,
620,
11346,
39461,
368,
2605,
262,
990,
1460,
486,
3848,
486,
1703,
280,
262,
990,
1460,
486,
815,
486,
1726,
52538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bencode_list() {
let left = vec![
(Value::List(vec![Value::Int(1), Value::Int(2), Value::Int(3)])),
(Value::List(vec![
Value::Int(1),
Value::Str("foo".to_string()),
Value::Int(3),
])),
(... | rust_cleaned_test_functions.jsonl/107902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
880,
6180,
2019,
368,
341,
286,
1077,
2115,
284,
7486,
90515,
310,
320,
1130,
486,
852,
25592,
20703,
1130,
486,
1072,
7,
16,
701,
5162,
486,
1072,
7,
17,
701,
5162,
486,
1072,
7,
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... | 2 |
#[test]
fn test_parse_update_profile_response() {
init!("indy");
let result = parse_update_profile_response(UPDATE_PROFILE_RESPONSE.to_vec()).unwrap();
assert_eq!(result, UPDATE_PROFILE_RESPONSE_STR);
} | rust_cleaned_test_functions.jsonl/38976 | {
"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,
21039,
8882,
13789,
9655,
368,
341,
286,
2930,
17223,
48990,
3071,
286,
1077,
1102,
284,
4715,
8882,
13789,
9655,
7,
9239,
34533,
35901,
2389,
13251,
6011,
15454,
1428,
286,
2060,
10714,
10297,
1382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rle_specific_roundtrip() {
let bit_width = 1;
let buffer_len = RleEncoder::min_buffer_size(bit_width);
let values: Vec<i16> = vec![0, 1, 1, 1, 1, 0, 0, 0, 0, 1];
let mut encoder = RleEncoder::new(bit_width, buffer_len);
for v in &values {
asser... | rust_cleaned_test_functions.jsonl/72792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
273,
56592,
29896,
32981,
368,
341,
286,
1077,
2699,
7927,
284,
220,
16,
280,
286,
1077,
4147,
6043,
284,
431,
273,
19921,
486,
1065,
7776,
2368,
54672,
7927,
317,
286,
1077,
2750,
25,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_generic_default_parameter_is_second() {
check_assist(
add_missing_impl_members,
r#"
trait Foo<T1, T2 = Self> {
fn bar(&self, this: &T1, that: &T2);
}
struct S<T>;
impl Foo<T> for S<T> { <|> }"#,
r#"
trait Foo<T1, T2 = Self> {
fn bar(&self, thi... | rust_cleaned_test_functions.jsonl/110455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
9993,
24899,
6892,
29644,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
435,
2,
698,
29432,
33428,
3125,
16,
11,
350,
17,
284,
10115,
29,
341,
262,
5168,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_small_box_str_then_mutate() {
let b = String::from("hello world").into_boxed_str();
assert_eq!(b.len(), 11);
let mut repr = Repr::from_box_str(b);
// dropping the heap allocated buffer
assert_eq!(repr.capacity(), 11);
assert!(repr.i... | rust_cleaned_test_functions.jsonl/14402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
31966,
10194,
2895,
68367,
29523,
349,
368,
341,
286,
1077,
293,
284,
923,
486,
1499,
445,
14990,
1879,
1827,
18122,
10194,
291,
2895,
543,
286,
2060,
10714,
10297,
65,
19406,
1507,
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_list_nodes_filter_metadata_not_equal() {
let pool = create_connection_pool_and_migrate();
let registry = DieselRegistry::new(pool);
registry
.add_node(get_node_1())
.expect("Unable to insert node");
registry
.add_node(get_node_... | rust_cleaned_test_functions.jsonl/106769 | {
"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,
2019,
14896,
8727,
22220,
7913,
11478,
368,
341,
286,
1077,
7314,
284,
1855,
15866,
15709,
8378,
717,
34479,
543,
286,
1077,
19424,
284,
53794,
15603,
486,
931,
41838,
626,
286,
19424,
198,
310,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_del_item() {
let gil = Python::acquire_gil();
let py = gil.python();
let v : Vec<i32> = vec![1, 1, 2, 3, 5, 8];
let seq = v.to_py_object(py).into_object().cast_into::<PySequence>(py).unwrap();
assert!(seq.del_item(py, 10).is_err());
assert_eq!(... | rust_cleaned_test_functions.jsonl/22528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 596
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
18029,
5634,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
549,
11312,
21897,
18,
17,
29,
284,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_ansi_term_style_with_special_raw_attribute() {
assert_eq!(
parse_ansi_term_style("raw", None, false),
(ansi_term::Style::new(), false, true, false)
);
assert_eq!(
parse_ansi_term_style("raw syntax italic white hidden", No... | rust_cleaned_test_functions.jsonl/129641 | {
"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,
21039,
62,
52067,
17464,
15117,
6615,
41629,
16067,
16791,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
62,
52067,
17464,
15117,
445,
1041,
497,
2240,
11,
895,
1326,
310,
320,
52067,
17464,
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_bad_functions() -> TestResult {
let p = polar();
p.load_str(
r#"f(2);
f(1);
g(1);
g(2);
h(2);
k(x) if f(x) and h(x) and g(x);"#,
)?;
qvar(&p, "k(a)", "a", values![2]);
Ok(())
} | rust_cleaned_test_functions.jsonl/68093 | {
"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,
34199,
31708,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
7,
17,
317,
1843,
282,
7,
16,
317,
1843,
342,
7,
16,
317,
1843,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_attack_backward() {
let warrior = warrior_at_level(6);
warrior.attack_toward(Direction::Backward);
assert_eq!(warrior.action(), Some(Action::Attack(Direction::Backward)));
} | rust_cleaned_test_functions.jsonl/72720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45697,
70477,
368,
341,
262,
1077,
37390,
284,
37390,
3752,
8274,
7,
21,
317,
262,
37390,
61611,
528,
81971,
81740,
486,
3707,
1606,
317,
262,
2060,
10714,
10297,
11455,
3254,
12395,
1507,
4329,
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 |
#[test]
fn test_subscribe() {
let node_handler = run_node(6336, 8085);
let mut client =
create_ws_client("ws://localhost:8085/api/explorer/v1/ws").expect("Cannot connect to node");
client
.stream_ref()
.set_read_timeout(Some(Duration::from_secs(30)))
.unwrap();
... | rust_cleaned_test_functions.jsonl/85930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 589
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88935,
368,
341,
262,
1077,
2436,
10183,
284,
1598,
5084,
7,
21,
18,
18,
21,
11,
220,
23,
15,
23,
20,
626,
262,
1077,
5206,
2943,
4035,
286,
1855,
50211,
8179,
445,
8915,
1110,
8301,
25,
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... | 2 |
#[test]
fn test_manhattan_first_example() {
let first_line = "R8,U5,L5,D3";
let second_line = "U7,R6,D4,L4";
assert_eq!(6, get_closest_intersection(first_line, second_line));
} | rust_cleaned_test_functions.jsonl/45002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17062,
25337,
12978,
39304,
368,
341,
286,
1077,
1156,
6528,
284,
330,
49,
23,
50481,
20,
30114,
20,
27266,
18,
876,
286,
1077,
2086,
6528,
284,
330,
52,
22,
23508,
21,
27266,
19,
30114,
19,
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 |
#[test]
fn test_line_locate_point_linestring() {
// finite example using the ring
let ring: LineString<f64> = include!("./test_fixtures/ring.rs").into();
let pt = point!(x: 10.0, y: 1.0);
assert_eq!(ring.line_locate_point(&pt), Some(0.0));
let pt = point!(x: 10.0, y: 1.0... | rust_cleaned_test_functions.jsonl/63907 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
13400,
349,
6085,
24606,
65040,
368,
341,
286,
442,
34226,
3110,
1667,
279,
10058,
198,
286,
1077,
10058,
25,
7083,
703,
63895,
21,
19,
29,
284,
2924,
0,
13988,
1944,
36060,
18513,
7382,
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_highbit_ignored() {
// the agreement.
let k = PrivateKey::generate();
let mut u = [0u8; 32];
crate::util::secure_rand_bytes(&mut u).unwrap();
debug_assert_ne!(u[31] & 127u8, (u[31] & 127u8) | 128u8);
let mut u_msb_zero = u;
... | rust_cleaned_test_functions.jsonl/4452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22680,
4489,
62,
58471,
368,
341,
16885,
286,
442,
279,
9128,
624,
286,
1077,
595,
284,
9679,
1592,
486,
19366,
543,
286,
1077,
5206,
575,
284,
508,
15,
84,
23,
26,
220,
18,
17,
935,
286,
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_el_double_nested_direct_child_no_match() {
let doc = Document::from(
"<div class='container'><span>text<a class='link button' id='linkmain'>hi there</a></span></div>",
);
let sel = doc.select("div.container > a.button.link");
let el = sel.first();
... | rust_cleaned_test_functions.jsonl/66016 | {
"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,
21602,
24598,
66279,
32871,
17268,
6536,
10708,
368,
341,
286,
1077,
4629,
284,
11789,
486,
1499,
1006,
310,
4055,
611,
536,
1131,
3586,
18407,
1480,
29,
1318,
9312,
536,
1131,
2080,
3137,
6,
877,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sieve_of_eratosthenes_in_range_2() {
assert_eq!(sieve_of_eratosthenes(2)[0], 2);
assert_eq!(sieve_of_eratosthenes(2).len(), 1);
} | rust_cleaned_test_functions.jsonl/3448 | {
"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,
643,
19155,
3575,
80604,
266,
535,
12032,
288,
1243,
9698,
62,
17,
368,
341,
262,
2060,
10714,
10297,
82,
19155,
3575,
80604,
266,
535,
12032,
288,
7,
17,
6620,
15,
1125,
220,
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 |
#[test]
fn test_truncate_when_cast_json_object_or_array_as_decimal() {
test_none_with_ctx(cast_any_as_any::<Real, Int>);
let cs = vec![
(
Json::from_object(BTreeMap::default()).unwrap(),
Decimal::zero(),
ERR_TRUNCATE_WRONG... | rust_cleaned_test_functions.jsonl/1989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
26900,
47636,
5303,
9455,
5314,
8734,
3858,
11898,
74429,
368,
341,
286,
1273,
31488,
6615,
15147,
1337,
559,
37248,
11898,
37248,
27638,
12768,
11,
1333,
29,
626,
286,
1077,
10532,
284,
7486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_core() {
let mut user = User::default();
assert!(user.avatar_url().unwrap().ends_with("/avatars/210/abc.webp?size=1024"));
assert!(user.static_avatar_url().unwrap().ends_with("/avatars/210/abc.webp?size=1024"));
user.avatar = Some("a_aaa".to_stri... | rust_cleaned_test_functions.jsonl/35172 | {
"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,
15467,
368,
341,
310,
1077,
5206,
1196,
284,
2657,
486,
2258,
1428,
310,
2060,
10297,
872,
36169,
2903,
1005,
15454,
1005,
1412,
6615,
4283,
74814,
14,
17,
16,
15,
14,
13683,
6411,
79,
30,
2141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dsu() {
let mut dsu = DSU::new(10);
dsu.make_set(1).unwrap();
dsu.make_set(2).unwrap();
dsu.make_set(3).unwrap();
dsu.make_set(7).unwrap();
dsu.make_set(8).unwrap();
dsu.union_sets(1, 2).unwrap();
dsu.union_sets(2, 3).unwrap();
... | rust_cleaned_test_functions.jsonl/108421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
27051,
368,
341,
286,
1077,
5206,
11472,
84,
284,
20578,
52,
486,
931,
7,
16,
15,
626,
286,
11472,
84,
10117,
2602,
7,
16,
568,
15454,
543,
286,
11472,
84,
10117,
2602,
7,
17,
568,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_required_features() {
let p = project("foo")
.file("Cargo.toml", r#"
[project]
name = "foo"
version = "0.0.1"
authors = []
[features]
default = ["a", "b"]
a = []
b = ["a"]
... | rust_cleaned_test_functions.jsonl/93341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 906
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
18743,
14965,
368,
341,
262,
1077,
281,
284,
2390,
445,
7975,
1138,
286,
659,
1192,
445,
98228,
73494,
75,
497,
435,
2,
698,
310,
508,
4987,
921,
310,
829,
284,
330,
7975,
698,
310,
231... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_drop_create() {
let _setup = SetupMocks::init();
let handle = create_connection("test_create_drop_create").unwrap();
assert_eq!(get_state(handle), VcxStateType::VcxStateInitialized as u32);
let did1 = get_pw_did(handle).unwrap();
release(handle).... | rust_cleaned_test_functions.jsonl/20873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
29584,
8657,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
3705,
284,
1855,
15866,
445,
1944,
8657,
29584,
8657,
1827,
15454,
1428,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_player_satchel_add_count() {
let mut player = Player::new();
let tool = "Blue Towel".to_string();
let tool1 = "Red Towel".to_string();
player.add_tool(&tool);
let has_tool = player.has_tool(&tool);
let tool_count = player.satchel.count(&tool);
... | rust_cleaned_test_functions.jsonl/101963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15524,
643,
754,
301,
2891,
3180,
368,
341,
286,
1077,
5206,
2781,
284,
7312,
486,
931,
543,
286,
1077,
5392,
284,
330,
10331,
40393,
301,
3263,
983,
3904,
543,
286,
1077,
5392,
16,
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... | 1 |
#[test]
fn test_file_system_boundaries() {
// Helper function to get the device ID for a given path
fn device_num(path: impl AsRef<Path>) -> u64 {
use std::os::unix::fs::MetadataExt;
path.as_ref().metadata().map(|md| md.dev()).unwrap()
}
// Can't simulate file system bound... | rust_cleaned_test_functions.jsonl/10871 | {
"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,
2458,
17687,
19447,
5431,
368,
341,
262,
442,
12906,
729,
311,
633,
279,
3671,
3034,
369,
264,
2661,
1815,
7213,
262,
5168,
3671,
4273,
5581,
25,
11605,
1634,
3945,
82883,
9231,
1464,
575,
21,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stack_to_vec() {
// Zero always for the index == len - 1
assert_eq!(0, stack_to_vec(0, 1));
assert_eq!(0, stack_to_vec(4, 5));
assert_eq!(0, stack_to_vec(1999, 2000));
// len-1 always for index 0
assert_eq!(0, stack_to_vec(0, 1));
assert_e... | rust_cleaned_test_functions.jsonl/121686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15528,
2346,
13251,
368,
341,
286,
442,
18306,
2677,
369,
279,
1922,
621,
2422,
481,
220,
16,
198,
286,
2060,
10714,
10297,
15,
11,
5611,
2346,
13251,
7,
15,
11,
220,
16,
1106,
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_assembler_simple_labels() {
test_case(&[":mylabel", "SET A, mylabel"], &[0x8401]);
// TODO: Both should be fine
test_case(&["DAT 1", ":mylabel", "SET A, mylabel"], &[0x0001, 0x8801]);
test_case(&[":begin DAT \"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\"", "SET A, begin"],
... | rust_cleaned_test_functions.jsonl/44777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
35401,
30015,
14547,
368,
341,
262,
1273,
19096,
2099,
58,
788,
2408,
1502,
497,
330,
5884,
362,
11,
847,
1502,
7914,
44590,
15,
87,
23,
19,
15,
16,
2558,
262,
442,
5343,
25,
11733,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_defaults() {
let dir = tempdir_in("/tmp").unwrap();
let dirstring = dir.path().to_string_lossy().to_string();
let cfg = Config::build(dirstring.clone()).validate().unwrap();
assert!(cfg.election_timeout_millis >= DEFAULT_ELECTION_TIMEOUT_MIN as u64);
... | rust_cleaned_test_functions.jsonl/40939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
42290,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1243,
4283,
5173,
1827,
15454,
543,
286,
1077,
5419,
917,
284,
5419,
3875,
1005,
983,
3904,
11193,
88,
1005,
983,
3904,
543,
286,
1077,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example_case() {
check_assist(
introduce_named_lifetime,
r#"impl Cursor<'_<|>> {
fn node(self) -> &SyntaxNode {
match self {
Cursor::Replace(node) | Cursor::Before(node) => node,
}
... | rust_cleaned_test_functions.jsonl/109547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
19096,
368,
341,
286,
1779,
12083,
380,
1006,
310,
19131,
71834,
98827,
345,
310,
435,
55543,
6383,
28067,
18291,
41743,
91,
2452,
341,
394,
5168,
2436,
1193,
8,
1464,
609,
33890,
1955,
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_response_for_orders_create() {
let mock_transport = MockRequest::new(
"",
"{\"status\":\"success\",\"data\":{\"status\":\"executed\",\"created_at\":\"2017-09-01T19:35:26.641136\",\"amount\":{\"executed\":\"0.3\",\"original\":\"0.3\"},\"avg_execution_price\":\"3000... | rust_cleaned_test_functions.jsonl/75234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1085
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9655,
5478,
37129,
8657,
368,
341,
286,
1077,
7860,
46398,
284,
14563,
1900,
486,
931,
1006,
310,
8324,
310,
54734,
2829,
23488,
5630,
34333,
691,
92729,
2829,
23488,
11748,
2774,
34333,
7120,
3752,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trace_create_serialize() {
let t = LocalizedTrace {
action: Action::Create(Create {
from: Address::from_low_u64_be(4),
value: 6.into(),
gas: 7.into(),
init: Bytes::new(vec![0x12, 0x34]),
}),
result: Res::Create(CreateResult {
gas_used: 8.into(),
code: vec![0x56... | rust_cleaned_test_functions.jsonl/39047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23575,
8657,
88686,
368,
341,
197,
10217,
259,
284,
8774,
1506,
6550,
341,
298,
38933,
25,
5586,
486,
4021,
81243,
341,
571,
42727,
25,
9177,
486,
1499,
23767,
7300,
21,
19,
21263,
7,
19,
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... | 1 |
#[test]
fn test_data_payload_creator() {
let mut phy = DataPayloadCreator::new();
let nwk_skey = AES128([2; 16]);
let app_skey = AES128([1; 16]);
let fctrl = FCtrl::new(0x80, true);
phy.set_confirmed(false)
.set_uplink(true)
.set_f_port(1)
.set_dev_addr(&[4, 3, 2, 1])... | rust_cleaned_test_functions.jsonl/81606 | {
"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,
1769,
32813,
68532,
368,
341,
262,
1077,
5206,
36455,
284,
2885,
29683,
31865,
486,
931,
543,
262,
1077,
308,
50522,
643,
792,
284,
38841,
16,
17,
23,
2561,
17,
26,
220,
16,
21,
2558,
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_resolver_capability_creates_dependency() {
let child_a = ChildDecl {
name: "childA".to_string(),
url: "ignored:///child".to_string(),
startup: fsys::StartupMode::Lazy,
environment: None,
};
let child_b = ChildDecl {
... | rust_cleaned_test_functions.jsonl/24109 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 691
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91578,
89686,
92862,
973,
62387,
368,
341,
286,
1077,
1682,
4306,
284,
9391,
21629,
341,
310,
829,
25,
330,
3048,
32,
3263,
983,
3904,
3148,
310,
2515,
25,
330,
58471,
60896,
3048,
3263,
983,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part1() {
assert_eq!(
solve_part1(vec![1721, 979, 366, 299, 675, 1456]),
Some((299, 1721))
);
} | rust_cleaned_test_functions.jsonl/7217 | {
"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,
10495,
16,
368,
341,
286,
2060,
10714,
33673,
310,
11625,
10495,
16,
25592,
20703,
16,
22,
17,
16,
11,
220,
24,
22,
24,
11,
220,
18,
21,
21,
11,
220,
17,
24,
24,
11,
220,
21,
22,
20,
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_eval_unary_function_vector() {
#[derive(Debug, Clone, Copy, RpnFunction)]
#[rpn_function(args = 1)]
struct FnFoo;
impl FnFoo {
fn call(
_ctx: &mut EvalContext,
_payload: RpnFnCallPayload<'_>,
v: ... | rust_cleaned_test_functions.jsonl/111583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
4907,
658,
9174,
12247,
368,
341,
394,
11506,
27098,
42618,
11,
27913,
11,
14540,
11,
431,
19958,
5152,
5563,
286,
11506,
81,
19958,
9174,
7356,
284,
220,
16,
5563,
286,
2036,
50182,
40923,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str_to_audio_stream() {
println!("Running test_str_to_audio_stream");
let test_cases = vec![
"Background",
"MEDIA",
"interruption",
"SYSTEM_AGENT",
"SystemAgent",
"system agent",
"Communication",
... | rust_cleaned_test_functions.jsonl/10531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 595
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
2346,
29688,
12673,
368,
341,
286,
13751,
17223,
18990,
1273,
2895,
2346,
29688,
12673,
797,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
330,
8706,
756,
310,
330,
80120,
756,
310,
330,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_serialize_lua() -> LuaResult<()> {
use mlua::serde::de::DeserializeFromLua;
use mlua::serde::ser::SerializeToLua;
let lua = Lua::new();
let globals = lua.globals();
globals.set("null", lua.null())?;
#[derive(Clone, Serialize, Deserialize)]
struct Test {
name:... | rust_cleaned_test_functions.jsonl/50712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
76013,
368,
1464,
37662,
2077,
71698,
341,
262,
990,
15739,
4284,
486,
47024,
486,
450,
486,
64465,
3830,
58020,
280,
262,
990,
15739,
4284,
486,
47024,
486,
799,
486,
15680,
1249,
58020,
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_to_ascii_lowercase() {
assert_eq!("url()URL()uRl()Ürl".to_ascii_lowercase(), "url()url()url()Ürl");
// assert_eq!("HİKß".to_ascii_lowercase(), "hİKß");
for i in 0..501 {
let lower = if 'A' as u32 <= i && i <= 'Z' as u32 { i + 'a' as u32 - 'A' as u32 }
... | rust_cleaned_test_functions.jsonl/13533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
50238,
93129,
368,
341,
286,
2060,
10714,
17223,
1085,
368,
3144,
368,
84,
49,
75,
368,
52491,
2381,
3263,
983,
50238,
93129,
1507,
330,
1085,
368,
1085,
368,
1085,
368,
52491,
2381,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_options_correct_defaults() {
let opts = HeadOptions::new();
let opts2: HeadOptions = Default::default();
assert_eq!(opts, opts2);
assert!(opts.verbose == false);
assert!(opts.quiet == false);
assert!(opts.zeroed == false);
assert!(opts.al... | rust_cleaned_test_functions.jsonl/99656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8743,
31550,
42290,
368,
341,
286,
1077,
12185,
284,
11203,
3798,
486,
931,
543,
286,
1077,
12185,
17,
25,
11203,
3798,
284,
7899,
486,
2258,
1428,
286,
2060,
10714,
10297,
10518,
11,
12185,
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_make_bounded_mean_symmetric() {
let transformation = make_sized_bounded_mean(5, (0., 10.)).unwrap_test();
let arg = vec![1., 2., 3., 4., 5.];
let ret = transformation.invoke(&arg).unwrap_test();
let expected = 3.;
assert_eq!(ret, expected);
assert!... | rust_cleaned_test_functions.jsonl/81928 | {
"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,
28230,
880,
13082,
16933,
26825,
15903,
368,
341,
286,
1077,
17991,
284,
1281,
643,
1506,
880,
13082,
16933,
7,
20,
11,
320,
15,
2572,
220,
16,
15,
13,
4579,
15454,
4452,
543,
286,
1077,
1392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pretty_print() {
assert_eq!(format!("{}", PrettyPrinter::<Packet<&'static [u8]>>::new("\n", &&REPR_PACKET_BYTES[..])),
"\nIPv6 src=fe80::1 dst=ff02::1 nxt_hdr=UDP hop_limit=64\n \\ UDP src=1 dst=2 len=4");
} | rust_cleaned_test_functions.jsonl/91042 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
21322,
10064,
368,
341,
286,
2060,
10714,
10297,
2243,
79878,
35316,
45660,
27638,
16679,
52244,
6,
1978,
508,
84,
23,
60,
77595,
931,
4921,
77,
497,
1009,
787,
6480,
40328,
40705,
95874,
876... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_tx_custom_fee_rate() {
let (wallet, _, _) = get_funded_wallet(get_test_wpkh());
let addr = wallet.get_new_address().unwrap();
let (psbt, details) = wallet
.create_tx(
TxBuilder::with_recipients(vec![(addr.script_pubkey(), 25_000)])
... | rust_cleaned_test_functions.jsonl/11327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
15875,
34305,
9246,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
10789,
284,
15085,
670,
5921,
6744,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_ref() {
let cases: Vec<[u64; 4]> = vec![
[0, 0, 0, 0],
[
14963070332212552755,
2414807501862983188,
16116531553419129213,
6357427774790868134,
],
];
for case in cases.i... | rust_cleaned_test_functions.jsonl/73090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
7793,
368,
341,
286,
1077,
5048,
25,
11312,
66746,
84,
21,
19,
26,
220,
19,
25669,
284,
7486,
90515,
310,
508,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
1259,
310,
2278,
394,
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... | 7 |
#[test]
fn test_read_number() {
assert_eq!(from_str("+"), Err(SyntaxError(InvalidSyntax, 1, 1)));
assert_eq!(from_str("."), Err(SyntaxError(InvalidSyntax, 1, 1)));
assert_eq!(from_str("NaN"), Err(SyntaxError(InvalidSyntax, 1, 1)));
assert_eq!(from_str("-"), Err(SyntaxError(... | rust_cleaned_test_functions.jsonl/6543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5500,
368,
341,
286,
2060,
10714,
10297,
1499,
2895,
34973,
3975,
256,
15495,
93549,
1454,
7,
7928,
33890,
11,
220,
16,
11,
220,
16,
4945,
286,
2060,
10714,
10297,
1499,
2895,
73133,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u8_to_compact_string() {
let vals = [u8::MIN, 1, 42, u8::MAX - 2, u8::MAX - 1, u8::MAX];
for x in &vals {
let c = x.to_compact_string();
let s = x.to_string();
assert_eq!(c, s);
assert!(!c.is_heap_allocated());
}
} | rust_cleaned_test_functions.jsonl/2792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
23,
2346,
18177,
531,
3904,
368,
341,
262,
1077,
28356,
284,
508,
84,
23,
486,
16413,
11,
220,
16,
11,
220,
19,
17,
11,
575,
23,
486,
10586,
481,
220,
17,
11,
575,
23,
486,
10586,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_int_to_uint() {
let tests: Vec<(i64, FieldTypeTp, Option<u64>)> = vec![
(123, FieldTypeTp::Tiny, Some(123)),
(256, FieldTypeTp::Tiny, None),
(123, FieldTypeTp::Short, Some(123)),
(65536, FieldTypeTp::Short, None),
(123, FieldTyp... | rust_cleaned_test_functions.jsonl/48533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 914
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
2346,
15807,
368,
341,
286,
1077,
7032,
25,
11312,
28706,
72,
21,
19,
11,
84614,
62241,
11,
6959,
34837,
21,
19,
9231,
29,
284,
7486,
90515,
310,
320,
16,
17,
18,
11,
84614,
62241,
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... | 3 |
#[test]
fn test_get_descriptor_after_vmo_write() {
let (descriptors, vmo, tx, rx) =
Descriptors::new(TX_BUFFERS, RX_BUFFERS, BUFFER_STRIDE).expect("create descriptors");
vmo.write(&[netdev::FrameType::Ethernet.into_primitive()][..], 0).expect("vmo write");
assert_eq!(tx.len()... | rust_cleaned_test_functions.jsonl/12667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
33774,
19844,
2273,
6355,
9165,
368,
341,
286,
1077,
320,
5799,
25705,
11,
348,
6355,
11,
9854,
11,
19111,
8,
4035,
310,
3874,
25705,
486,
931,
4140,
55,
62128,
4321,
11,
28170,
62128,
432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_pr_core_utils_tests() {
let test_cases = vec![
("", vec!["0Ft"], vec!["0F"], 0),
("", vec!["0Fnt"], vec!["0F"], 0),
("+3", vec!["0Ft"], vec!["3-0F"], 0),
("+3 -f", vec!["0Ft"], vec!["3f-0F"], 0),
("-a -3", vec!["0Ft"], vec!["a3-0F"], 0),
(... | rust_cleaned_test_functions.jsonl/103060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 881
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
5294,
15467,
17309,
32509,
368,
341,
262,
1077,
1273,
41427,
284,
7486,
90515,
286,
3489,
497,
7486,
0,
1183,
15,
37,
83,
7914,
7486,
0,
1183,
15,
37,
7914,
220,
15,
1326,
286,
3489,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_param_completion_last_param() {
check(
r#"
fn foo(file_id: FileId) {}
fn bar(file_id: FileId) {}
fn baz(file<|>) {}
"#,
expect![[r#"
bn file_id: FileId
"#]],
);
} | rust_cleaned_test_functions.jsonl/59337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4090,
60164,
12195,
4090,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
8822,
15229,
4866,
842,
25,
2887,
764,
8,
5613,
8822,
3619,
4866,
842,
25,
2887,
764,
8,
5613,
8822,
50247,
4866,
27,
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_shl_carry_assign_decimal()
{
let mut d = DecimalDigit(0u8);
let carry = d.shl_carry_assign(5, DecimalDigit(10));
assert_eq!(d, DecimalDigit(10));
assert_eq!(carry, DecimalDigit(0));
let mut d = DecimalDigit(43u8);
let carry = d.shl_carry_assig... | rust_cleaned_test_functions.jsonl/26394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 729
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
75,
666,
11433,
20688,
74429,
741,
262,
341,
286,
1077,
5206,
294,
284,
26728,
36420,
7,
15,
84,
23,
317,
286,
1077,
6777,
284,
294,
2395,
75,
666,
11433,
20688,
7,
20,
11,
26728,
36420,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_acpi_event_deserialize() {
let acpi_event_deserialized = AcpiEvent {
device_class: DeviceClass("AAAAAA".to_string()),
bus_id: BusId("AAAAA".to_string()),
event_type: 5,
event_data: 7,
};
let mut acpi_event_buffer = Cursor::... | rust_cleaned_test_functions.jsonl/76946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14718,
2493,
6748,
15768,
9050,
368,
341,
286,
1077,
1613,
2493,
6748,
15768,
67577,
284,
6381,
2493,
1556,
341,
310,
3671,
4790,
25,
13903,
1957,
445,
25699,
6029,
3263,
983,
3904,
14702,
310,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_received_frag_same() {
let mut fsm = FragStateMachine::new();
let orig_message = b"This is some message to be split";
let frags = split_message(orig_message,
b"nonce123", 22).unwrap();
let b = (frags.len() + 1) / 2;
for ... | rust_cleaned_test_functions.jsonl/24550 | {
"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,
40783,
80817,
33574,
368,
341,
286,
1077,
5206,
83138,
284,
58089,
94666,
486,
931,
543,
286,
1077,
2713,
6462,
284,
293,
21520,
374,
1045,
1943,
311,
387,
6718,
876,
286,
1077,
97203,
284,
6718,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.