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_as_vectype() {
let vector = Acceleration::new(1.0, 2.0, 3.0);
let answer = Velocity::new(1.0, 2.0, 3.0);
let result = vector.as_vectype::<Velocity<f64>>();
let snd_result = result.as_vectype::<Acceleration<f64>>();
assert_eq!(answer, result);
assert_eq!(vector, snd_resu... | rust_cleaned_test_functions.jsonl/40026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
59402,
499,
368,
341,
262,
1077,
4621,
284,
46905,
367,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
1077,
4226,
284,
54434,
486,
931,
7,
16,
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_from_ids() {
assert!(SMethod::from_ids(TYPE_CODE, MAP_METHOD_ID).map(|e| e.name()) == Ok("map"));
assert!(SMethod::from_ids(TYPE_CODE, FILTER_METHOD_ID).map(|e| e.name()) == Ok("filter"));
} | rust_cleaned_test_functions.jsonl/84388 | {
"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,
5673,
8077,
368,
341,
286,
2060,
10297,
50,
3523,
486,
1499,
8077,
69227,
10020,
11,
27223,
14058,
3450,
568,
2186,
22428,
68,
91,
384,
2644,
2140,
621,
7622,
445,
2186,
4010,
286,
2060,
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_config_template_no_superfluous_keys() {
let template_config = std::include_str!("../etc/config-template.toml")
.lines()
.map(|l| l.strip_prefix('#').unwrap_or(l))
.join("\n");
let mut deserializer = toml::Deserializer::new(&template_config);
... | rust_cleaned_test_functions.jsonl/2171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
8693,
6536,
38886,
1489,
9193,
12631,
368,
341,
286,
1077,
3811,
5332,
284,
1460,
486,
997,
2895,
17223,
1244,
12107,
14730,
33409,
73494,
75,
1138,
310,
659,
7969,
741,
310,
659,
2186,
2242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pct_encoded() -> Result<()> {
init();
let mut counter = 0;
let prop = prop::for_all(
|| pct_encoded_str_gen(),
move |s| {
counter += 1;
log::debug!("{:>03}, value = {}", counter, s);
let (_, r) = pct_encoded(Elms::new(s.as_bytes())).ok().unwrap();
... | rust_cleaned_test_functions.jsonl/43682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71512,
73069,
368,
1464,
5714,
71698,
341,
262,
2930,
543,
262,
1077,
5206,
5546,
284,
220,
15,
280,
262,
1077,
2004,
284,
2004,
486,
1958,
5705,
1006,
414,
1369,
81847,
73069,
2895,
16322,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unbalanced_brackets() {
let inputs = ["[[]", "[]]", "(()", "())", "{{}", "{}}"];
for input in &inputs {
assert!(tokenize(input).is_err());
}
} | rust_cleaned_test_functions.jsonl/51084 | {
"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,
4907,
58402,
17682,
18382,
368,
341,
286,
1077,
11127,
284,
4383,
58,
1294,
497,
330,
1294,
19076,
330,
5065,
497,
330,
2140,
497,
47219,
9545,
13868,
3417,
6332,
286,
369,
1946,
304,
609,
24941,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_seek_bytes() {
// results in a prefix of eight null bytes.
new_ucmd!()
.args(&["seek=8", "oflag=seek_bytes"])
.pipe_in("abcdefghijklm\n")
.succeeds()
.stdout_is("\0\0\0\0\0\0\0\0abcdefghijklm\n");
} | rust_cleaned_test_functions.jsonl/99838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
12524,
368,
341,
1066,
262,
442,
3059,
304,
264,
9252,
315,
8063,
845,
5820,
624,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
25713,
28,
23,
497,
330,
1055,
13363,
28,
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_send_propose_and_prevote() {
let sandbox = timestamping_sandbox();
// get some tx
let tx = gen_timestamping_tx();
sandbox.recv(&tx);
// round happens
sandbox.add_time(Duration::from_millis(1000));
sandbox.add_time(Duration::from_millis(1999));
sandbox.assert_st... | rust_cleaned_test_functions.jsonl/16571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
21663,
960,
8378,
25566,
1272,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
1428,
262,
442,
633,
1045,
9854,
198,
262,
1077,
9854,
284,
4081,
23073,
287,
17805,
543,
262,
42754,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty() {
let mut bv = BitVec::new(0);
assert!(bv.is_empty());
bv.push(true);
assert!(!bv.is_empty());
} | rust_cleaned_test_functions.jsonl/128605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
15124,
368,
341,
286,
1077,
5206,
56937,
284,
6495,
10050,
486,
931,
7,
15,
626,
286,
2060,
10297,
54929,
2079,
15124,
5231,
286,
56937,
2552,
3715,
317,
286,
2060,
0,
3471,
54929,
2079,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pipelines() {
assert_display_snapshot!((resolve_and_translate(parse(r###"
from employees
group dept (take 1)
"###,
).unwrap()).unwrap()), @r###"
SELECT
DISTINCT employees.*
FROM
employees
"###);
} | rust_cleaned_test_functions.jsonl/62576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
93997,
368,
341,
286,
2060,
14825,
53265,
0,
1188,
17325,
8378,
66381,
27762,
2601,
14374,
698,
286,
504,
8256,
198,
286,
1874,
44593,
320,
22769,
220,
16,
340,
286,
330,
14374,
345,
286,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_increase_file_size() {
let expected = 5 * 1024;
let (at, mut ucmd) = at_and_ucmd!();
let mut file = at.make_file(TFILE1);
ucmd.args(&["-s", "+5K", TFILE1]).succeeds();
file.seek(SeekFrom::End(0)).unwrap();
let actual = file.seek(SeekFrom::Current(0)).unwrap();
assert... | rust_cleaned_test_functions.jsonl/50490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73807,
2458,
2368,
368,
341,
262,
1077,
3601,
284,
220,
20,
353,
220,
16,
15,
17,
19,
280,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
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_sig_verify() {
let msg = "uncle".as_bytes();
let mut pk = [0u8; PUBLIC_KEY_LENGTH];
pk.copy_from_slice(
"4KxUVD9NtyRJjU3BCvPgJSttoJX7cb3DMdDTNucLN121"
.from_base58()
.unwrap()
.as_slice(),
);
let ... | rust_cleaned_test_functions.jsonl/18198 | {
"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,
29252,
35638,
368,
341,
286,
1077,
3750,
284,
330,
1347,
273,
3263,
300,
12524,
543,
286,
1077,
5206,
22458,
284,
508,
15,
84,
23,
26,
31416,
6600,
15023,
935,
286,
22458,
12232,
5673,
26488,
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_election_with_priority_log() {
let tests = vec![
(true, false, false, 3, 1, 1, 1, StateRole::Leader),
(true, false, false, 2, 2, 2, 1, StateRole::Leader),
(true, false, false, 1, 3, 3, 1, StateRole::Leader),
(true, true, true, 3, 1, 1, 1, StateRole::L... | rust_cleaned_test_functions.jsonl/19201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
1170,
6615,
38161,
5224,
368,
341,
262,
1077,
7032,
284,
7486,
90515,
1789,
286,
320,
1866,
11,
895,
11,
895,
11,
220,
18,
11,
220,
16,
11,
220,
16,
11,
220,
16,
11,
3234,
9030,
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... | 5 |
#[test]
fn test_file_storage() {
let a: i64 = 6;
let mut counter: i64 = 0;
let mut s = FileStorage::new("file_test").unwrap();
s.flush().unwrap();
assert_eq!(a * 10, test_func_1(a, &mut counter));
assert_eq!(counter, 1);
assert_eq!(a * 10, cache!(s, test_f... | rust_cleaned_test_functions.jsonl/123186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
23310,
368,
341,
286,
1077,
264,
25,
600,
21,
19,
284,
220,
21,
280,
286,
1077,
5206,
5546,
25,
600,
21,
19,
284,
220,
15,
280,
286,
1077,
5206,
274,
284,
2887,
5793,
486,
931,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boolean_evaluation() {
let test_cases = [
("0|0|1", true, 2),
("1^0|0|1", false, 2),
("0&0&0&1^1|0", true, 10),
];
for case in test_cases {
assert_eq!(boolean_evaluation(case.0, case.1), case.2);
}
} | rust_cleaned_test_functions.jsonl/74234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
86505,
368,
341,
262,
1077,
1273,
41427,
284,
2278,
286,
3489,
15,
91,
15,
91,
16,
497,
830,
11,
220,
17,
1326,
286,
3489,
16,
61,
15,
91,
15,
91,
16,
497,
895,
11,
220,
17,
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... | 6 |
#[test]
fn test_sparse_divisors() {
for i in 0..64 {
for j in i..64 {
let d = (1u64 << i) | (1u64 << j);
check(d);
check(!d);
}
}
} | rust_cleaned_test_functions.jsonl/65994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
16237,
41214,
368,
341,
286,
369,
600,
304,
220,
15,
496,
21,
19,
341,
310,
369,
502,
304,
600,
496,
21,
19,
341,
394,
1077,
294,
284,
320,
16,
84,
21,
19,
1115,
600,
8,
760,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_scrape_normal() {
let mut file = File::open("test_resources/contests_normal").unwrap();
let mut contents = String::new();
file.read_to_string(&mut contents).unwrap();
let contests = scrape_normal(&contents).unwrap();
assert_eq!(contests.len(), 50);
} | rust_cleaned_test_functions.jsonl/25789 | {
"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,
13171,
19842,
13973,
368,
341,
286,
1077,
5206,
1034,
284,
2887,
486,
2508,
445,
1944,
35569,
14,
772,
17966,
13973,
1827,
15454,
543,
286,
1077,
5206,
8794,
284,
923,
486,
931,
543,
286,
1034,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_valid_sqs_send_message_batch() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"sqs-send-message-batch.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
l... | rust_cleaned_test_functions.jsonl/49940 | {
"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,
21039,
8337,
643,
26358,
13565,
6462,
14534,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
82,
26358,
74118,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_path_clean_long() {
let mut test_paths: Vec<(String, String)> = Vec::new();
for i in 1..1234 {
let ss = "a".repeat(i);
let correct_path = format!("{}{}", "/", ss);
test_paths.push((correct_path.clone(), correct_path.clone()));
test... | rust_cleaned_test_functions.jsonl/3001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
19573,
17799,
368,
341,
286,
1077,
5206,
1273,
24152,
25,
11312,
28706,
703,
11,
923,
16018,
284,
11312,
486,
931,
543,
286,
369,
600,
304,
220,
16,
496,
16,
17,
18,
19,
341,
310,
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_split() {
let mut s = ByteString::from_static("helloworld");
let s1 = s.split_off(5);
assert_eq!(s, "hello");
assert_eq!(s1, "world");
let mut s = ByteString::from_static("helloworld");
let s1 = s.split_to(5);
assert_eq!(s, "world");
... | rust_cleaned_test_functions.jsonl/65281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
368,
341,
286,
1077,
5206,
274,
284,
95302,
486,
1499,
25360,
445,
71,
95292,
797,
286,
1077,
274,
16,
284,
274,
5289,
13651,
7,
20,
317,
286,
2060,
10714,
10297,
82,
11,
330,
14990,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nested_textgroup() {
const FORMAT_STR: &str = "outer [middle [inner](blue)](red bold)";
let outer_style = Some(Color::Green.normal());
let middle_style = Some(Color::Red.bold());
let inner_style = Some(Color::Blue.normal());
let formatter = StringFormatte... | rust_cleaned_test_functions.jsonl/71882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
4326,
4074,
368,
341,
286,
733,
52225,
7159,
25,
609,
495,
284,
330,
2676,
508,
19656,
508,
4382,
9533,
12203,
7252,
7,
1151,
13939,
24023,
286,
1077,
15955,
15117,
284,
4329,
15028,
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_ticks() -> Result<()> {
let input = "L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL";
let mut world = input_generator(input)?;
world.step();
let new_world = World::from_str(
"#.##.##.##
#... | rust_cleaned_test_functions.jsonl/127659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 898
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49961,
368,
1464,
5714,
71698,
341,
286,
1077,
1946,
284,
330,
43,
1214,
43,
1214,
43,
1214,
43,
198,
49356,
86708,
1214,
43,
198,
43,
1214,
1214,
496,
43,
33947,
49356,
1214,
43,
1214,
43,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_slice() {
let v = create_values(10);
let view: ArrayView<_> = (&v).into();
assert_eq!(view.len(), 10);
assert_eq!(view.slice(2..).len(), 8);
assert_eq!(view.slice(2..).iter().next().unwrap().value(), 2);
assert_eq!(view.slice(..8).len(), 8);
... | rust_cleaned_test_functions.jsonl/94462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
286,
1077,
348,
284,
1855,
9146,
7,
16,
15,
317,
286,
1077,
1651,
25,
2910,
851,
32399,
29,
284,
15899,
85,
568,
18122,
1428,
286,
2060,
10714,
10297,
1050,
19406,
1507,
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_program_bpf_c_dup() {
solana_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(50);
let mut bank = Bank::new_for_tests(&genesis_config);
let (name, id, entrypoint) = solana_bpf_loader_program!();
b... | rust_cleaned_test_functions.jsonl/5754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
880,
15897,
666,
51932,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
40788,
2648,
1731,
341,
286,
59366,
5332,
345,
286,
28337,
3097,
12670,
345,
286,
54538,
262,
335,
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_tpm_properties() {
let mut context = create_ctx_without_session();
let (_capabs, _more) = context
.get_capability(CapabilityType::TPMProperties, 0, 80)
.unwrap();
} | rust_cleaned_test_functions.jsonl/49684 | {
"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,
528,
5187,
25158,
368,
341,
286,
1077,
5206,
2266,
284,
1855,
15147,
39904,
12316,
1428,
286,
1077,
5453,
11346,
3435,
11,
716,
6384,
8,
284,
2266,
198,
310,
659,
455,
89686,
3025,
391,
2897,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_group_the_people() {
assert_eq!(
Solution::group_the_people(vec![3, 3, 3, 3, 3, 1, 3]),
vec![vec![0, 1, 2], vec![3, 4, 6], vec![5]]
);
assert_eq!(
Solution::group_the_people(vec![2, 1, 3, 3, 3, 2]),
vec![vec![0, 5], vec![1],... | rust_cleaned_test_functions.jsonl/106981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
16068,
62717,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
4074,
16068,
62717,
25592,
20703,
18,
11,
220,
18,
11,
220,
18,
11,
220,
18,
11,
220,
18,
11,
220,
16,
11,
220,
18,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slerp_quarter() {
let q = Quaternion::from([-0.5, 0.5, 0.5, 0.5]);
let r = Quaternion::from([0.5, 0.5, 0.5, 0.5]);
let expected = Quaternion::from([
-0.2588190451025208,
0.5576775358252053,
0.5576775358252053,
0.55767753582... | rust_cleaned_test_functions.jsonl/15359 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
1536,
79,
11280,
5295,
368,
341,
286,
1077,
2804,
284,
24801,
486,
1499,
41197,
15,
13,
20,
11,
220,
15,
13,
20,
11,
220,
15,
13,
20,
11,
220,
15,
13,
20,
2558,
286,
1077,
435,
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_push_and_get() {
let mut list = List::<f64>::new();
let mut vs = vec![0.0_f64; 100];
for (count, _) in (0..100).enumerate() {
assert_eq!(list.len(), count);
for (i, v) in vs.iter().take(count).enumerate() {
assert!((list.at(i) - *... | rust_cleaned_test_functions.jsonl/35055 | {
"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,
14218,
8378,
3062,
368,
341,
286,
1077,
5206,
1140,
284,
1759,
27638,
69,
21,
19,
6831,
931,
543,
286,
1077,
5206,
6165,
284,
7486,
20703,
15,
13,
15,
761,
21,
19,
26,
220,
16,
15,
15,
4821,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reverse() {
let mut v = vec![10, 20];
assert_eq!(v[0], 10);
assert_eq!(v[1], 20);
v.reverse();
assert_eq!(v[0], 20);
assert_eq!(v[1], 10);
let mut v3 = Vec::<i32>::new();
v3.reverse();
assert!(v3.is_empty());
} | rust_cleaned_test_functions.jsonl/111403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43277,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
16,
15,
11,
220,
17,
15,
935,
286,
2060,
10714,
10297,
85,
58,
15,
1125,
220,
16,
15,
317,
286,
2060,
10714,
10297,
85,
58,
16,
1125,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_property_names() {
let _setup_guard = setup();
let isolate = &mut v8::Isolate::new(Default::default());
let scope = &mut v8::HandleScope::new(isolate);
let context = v8::Context::new(scope);
let scope = &mut v8::ContextScope::new(scope, context);
let js_test_str: v8::Lo... | rust_cleaned_test_functions.jsonl/1222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 841
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
3062,
16638,
9187,
368,
341,
220,
1077,
716,
15188,
36796,
284,
6505,
543,
220,
1077,
42123,
284,
609,
6984,
348,
23,
486,
3872,
33066,
486,
931,
87874,
486,
2258,
5231,
220,
1077,
6891,
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_validate_internal_consistency() {
let (tx, _, _) = create_tx(5000.into(), 15.into(), 1, 2, 1, 4);
let factories = CryptoFactories::default();
assert!(tx.validate_internal_consistency(&factories, None).is_ok());
} | rust_cleaned_test_functions.jsonl/56569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
23472,
31971,
47094,
368,
341,
286,
1077,
320,
3998,
11,
8358,
27439,
284,
1855,
17805,
7,
20,
15,
15,
15,
39860,
1507,
220,
16,
20,
39860,
1507,
220,
16,
11,
220,
17,
11,
220,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_param() {
let uuid_str = "c1aa1e3b-9614-4895-9ebd-705255fa5bc2";
let uuid_wrapper = Uuid::from_param(uuid_str.into()).unwrap();
assert_eq!(uuid_str, uuid_wrapper.to_string())
} | rust_cleaned_test_functions.jsonl/60745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
4090,
368,
341,
286,
1077,
16040,
2895,
284,
330,
66,
16,
5305,
16,
68,
18,
65,
12,
24,
21,
16,
19,
12,
19,
23,
24,
20,
12,
24,
3065,
67,
12,
22,
15,
20,
17,
20,
20,
3632,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_length_at_end_is_ignored() {
let mut log = new_record_test();
log.write("foo");
log.shrink_size(1);
assert_eq!(EOF, log.read());
assert_eq!(0, log.dropped_bytes());
assert_eq!("", log.reported_msg());
} | rust_cleaned_test_functions.jsonl/46692 | {
"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,
34199,
5118,
3752,
6213,
6892,
62,
58471,
368,
341,
286,
1077,
5206,
1487,
284,
501,
14192,
4452,
543,
286,
1487,
3836,
445,
7975,
797,
286,
1487,
2395,
34365,
2368,
7,
16,
317,
286,
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_should_panic() {
fn f() {
panic!();
}
let desc = TestDescAndFn {
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
should_panic: ShouldPanic::Yes,
allow_fail: false,
... | rust_cleaned_test_functions.jsonl/3484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
620,
31270,
368,
341,
286,
5168,
282,
368,
341,
310,
21975,
0,
543,
286,
456,
286,
1077,
6560,
284,
3393,
11065,
3036,
24911,
341,
310,
6560,
25,
3393,
11065,
341,
394,
829,
25,
23105,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lore_seeker_db() -> Result<(), DbError> {
let db = Db::from_sets_dir("/opt/git/github.com/fenhl/lore-seeker/master/data/sets")?;
test_indicator(&db, "Ancient Elemental", ColorSet::rainbow());
test_indicator(&db, "Awaken the Nameless", ColorSet::blue());
Ok(())
... | rust_cleaned_test_functions.jsonl/118260 | {
"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,
5560,
265,
3453,
51216,
8685,
368,
1464,
5714,
68843,
11988,
1454,
29,
341,
286,
1077,
2927,
284,
11988,
486,
1499,
21289,
4334,
4283,
2912,
60590,
71120,
905,
6663,
268,
17958,
14,
20156,
7806,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_timeout_expired() {
Runtime::builder()
.build()
.expect("build runtime failed")
.block_on(async {
let err = timeout(
Duration::from_secs(1),
futures_util::future::pending::<()>(),
... | rust_cleaned_test_functions.jsonl/16035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20537,
80221,
368,
341,
286,
10954,
486,
17850,
741,
310,
659,
5834,
741,
310,
659,
17119,
445,
5834,
15592,
4641,
1138,
310,
659,
4574,
4470,
18285,
341,
394,
1077,
1848,
284,
9632,
1006,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_slots() {
test_insert_data_shreds_slots("test_insert_data_shreds_slots_single", false);
test_insert_data_shreds_slots("test_insert_data_shreds_slots_bulk", true);
} | rust_cleaned_test_functions.jsonl/7599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
54161,
368,
341,
286,
1273,
17678,
1769,
3712,
53369,
54161,
445,
1944,
17678,
1769,
3712,
53369,
54161,
19487,
497,
895,
317,
286,
1273,
17678,
1769,
3712,
53369,
54161,
445,
1944,
17678,
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 |
#[test]
fn test_point_mul_by_node_index() -> ThresholdEcdsaResult<()> {
for curve in EccCurveType::all() {
let g = EccPoint::generator_g(curve)?;
for node_index in 0..300 {
let g_ni = g.mul_by_node_index(node_index)?;
let scalar = EccScalar::from_node_index(curve, n... | rust_cleaned_test_functions.jsonl/39321 | {
"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,
6085,
24944,
3710,
5084,
3560,
368,
1464,
58079,
36,
4385,
9081,
2077,
71698,
341,
262,
369,
15655,
304,
80660,
31325,
929,
486,
541,
368,
341,
286,
1077,
342,
284,
80660,
2609,
486,
35851,
1889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decimal2str() {
let d = Decimal::of(0.00001, 5);
let actual = decimal2str(&d);
assert_eq!(actual, "0.00001".to_string());
} | rust_cleaned_test_functions.jsonl/120425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
17,
495,
368,
341,
262,
1077,
294,
284,
26728,
486,
1055,
7,
15,
13,
15,
15,
15,
15,
16,
11,
220,
20,
317,
262,
1077,
5042,
284,
12122,
17,
495,
2099,
67,
317,
262,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_expand_bug() {
let items = string_vec_to_status(&[
"a/b/c",
"a/b2/d",
]);
//0 a/
//1 b/
//2 c
//3 b2/
//4 d
let mut res = StatusTree::default();
res.update(&items).unwrap();
... | rust_cleaned_test_functions.jsonl/34459 | {
"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,
67875,
73232,
368,
341,
286,
1077,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
310,
330,
64,
3470,
2899,
497,
2303,
310,
330,
64,
3470,
17,
3446,
497,
715,
286,
22712,
286,
442,
15,
264,
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_vec_list_pack_to_empty() {
let mut list: VecList<i32> = VecList::with_capacity(5);
list.pack_to(0);
assert_eq!(list.capacity(), 0);
} | rust_cleaned_test_functions.jsonl/11552 | {
"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,
13251,
2019,
32995,
2346,
15124,
368,
341,
286,
1077,
5206,
1140,
25,
11312,
852,
21897,
18,
17,
29,
284,
11312,
852,
486,
4197,
35603,
7,
20,
317,
286,
1140,
20807,
2346,
7,
15,
317,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_foldr_non_consuming() {
let h = hlist![1, false, 42f32];
let folder = hlist![
|acc, &i| i + acc,
|acc, &_| if acc > 42f32 { 9000 } else { 0 },
|acc, &f| f + acc
];
let folded = h.to_ref().foldr(folder, 1f32);
assert_eq!(... | rust_cleaned_test_functions.jsonl/41568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
81,
21637,
3382,
61117,
368,
341,
286,
1077,
305,
284,
305,
1607,
20703,
16,
11,
895,
11,
220,
19,
17,
69,
18,
17,
935,
286,
1077,
8527,
284,
305,
1607,
90515,
310,
760,
4475,
11,
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_vars_in_scope() {
let mut ss = ScopeStack::new();
// No vars initially
assert_eq!(ss.vars_in_scope().len(), 0);
// Add two vars to current scope
ss.set("a", Value::from("1"));
ss.set("b", Value::from("2"));
assert_eq!(ss.vars_in_scope().le... | rust_cleaned_test_functions.jsonl/80373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11168,
1243,
23199,
368,
341,
286,
1077,
5206,
10870,
284,
34920,
4336,
486,
931,
543,
286,
442,
2308,
19942,
15102,
198,
286,
2060,
10714,
10297,
778,
59628,
1243,
23199,
1005,
2892,
1507,
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_recognize_four() {
let tail: &[u8] = &[0x61, 0xF0, 0x90, 0x86, 0x92, 0x0d, 0x0a, 0x0d, 0x0a];
let mut full = AsyncBuffer::new(format!("GET /first HTTP/1.1\r\n{}", std::str::from_utf8(tail).unwrap()));
let result = block_on(async { recognize(&mut full).await });
assert!(result.is_ok())
} | rust_cleaned_test_functions.jsonl/48185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
3934,
551,
56142,
368,
341,
220,
1077,
9787,
25,
44590,
84,
23,
60,
284,
44590,
15,
87,
21,
16,
11,
220,
15,
9770,
15,
11,
220,
15,
87,
24,
15,
11,
220,
15,
87,
23,
21,
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_message_type() {
let eh = ExtensionHeader::new();
assert_eq!(eh.extension_header_type() as u8, ExtensionHeaderType::SuspendReq as u8)
} | rust_cleaned_test_functions.jsonl/127870 | {
"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,
6462,
1819,
368,
341,
286,
1077,
35246,
284,
26473,
4047,
486,
931,
543,
286,
2060,
10714,
10297,
2636,
40475,
8757,
1819,
368,
438,
575,
23,
11,
26473,
4047,
929,
486,
50,
12758,
27234,
438,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dns_header() -> Result<(), String> {
let query = &Vec::from(BASIC_QUERY);
let dns_header = DnsHeader::parse(query)?;
assert_eq!(dns_header.id, 0x24B1);
assert!(!dns_header.qr);
assert_eq!(dns_header.opcode, DNS_OPCODE_QUERY);
assert!(!dns_he... | rust_cleaned_test_functions.jsonl/120288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
71125,
8757,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
3239,
284,
609,
10050,
486,
1499,
5349,
44659,
31585,
317,
286,
1077,
44077,
8757,
284,
422,
4412,
4047,
486,
6400,
10741,
8972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stage_channels() {
let cache = InMemoryCache::new();
let stage_instance = StageInstance {
channel_id: ChannelId(1),
discoverable_disabled: true,
guild_id: GuildId(2),
id: StageId(3),
privacy_level: PrivacyLevel::GuildOn... | rust_cleaned_test_functions.jsonl/112086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35238,
19291,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
1428,
286,
1077,
6430,
11904,
284,
22112,
2523,
341,
310,
5496,
842,
25,
13434,
764,
7,
16,
1326,
310,
6997,
480,
51401,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_controller_client() {
let rt = Runtime::new().unwrap();
rt.spawn(run_server());
let config = ClientConfigBuilder::default()
.connection_type(ConnectionType::Mock(MockType::Happy))
.controller_uri(PravegaNodeUri::from("127.0.0.2:9091".to_string()))... | rust_cleaned_test_functions.jsonl/123995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21600,
8179,
368,
341,
286,
1077,
16677,
284,
10954,
486,
931,
1005,
15454,
543,
286,
16677,
59296,
38772,
12015,
5231,
286,
1077,
2193,
284,
8423,
2648,
3297,
486,
2258,
741,
310,
659,
7742,
1819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_read_index() {
setup_for_test();
let wrequest_ctx = b"somedata".to_vec();
let wrs = vec![ReadState {
index: 2u64,
request_ctx: wrequest_ctx.clone(),
}];
let s = new_storage();
let mut raw_node = new_raw_node(1, vec![], 10, 1, s.clone(), vec![new_... | rust_cleaned_test_functions.jsonl/2059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5084,
6443,
3560,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
289,
2035,
15147,
284,
293,
40787,
24139,
459,
3263,
983,
13251,
543,
262,
1077,
3112,
82,
284,
7486,
20703,
4418,
1397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsing_after_editing_beginning_of_code() {
let mut parser = Parser::new();
parser.set_language(get_language("javascript")).unwrap();
let mut code = b"123 + 456 * (10 + x);".to_vec();
let mut tree = parser.parse(&code, None).unwrap();
assert_eq!(
tree.root_node().to_... | rust_cleaned_test_functions.jsonl/15866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 685
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
19844,
13156,
287,
23338,
1229,
3575,
4136,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
14073,
15197,
15454,
1428,
262,
1077,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing_with_a_timeout_and_implicit_reset() {
allocations::record(|| {
let mut parser = Parser::new();
parser.set_language(get_language("javascript")).unwrap();
parser.set_timeout_micros(5);
let tree = parser.parse(
"[\"ok\", 1, 2, 3, 5, 6, 7, 8, ... | rust_cleaned_test_functions.jsonl/15872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
6615,
4306,
20537,
8378,
62,
30940,
18983,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
286,
6729,
980,
29021,
5433,
29021,
445,
14073... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_monkey() {
assert_decompressed_input_matches_output(include_bytes!("../../testdata/monkey.compressed"),
include_bytes!("../../testdata/monkey"),
65536,
65536);
} | rust_cleaned_test_functions.jsonl/26452 | {
"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,
20737,
792,
368,
341,
220,
2060,
2259,
45703,
5898,
38344,
7645,
77863,
12524,
17223,
2748,
92425,
14,
96016,
905,
14318,
4461,
14265,
2924,
12524,
17223,
2748,
92425,
14,
96016,
4461,
14265,
220,
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 |
#[test]
fn test_real_consts() {
let pi: f32 = Float::pi();
let two_pi: f32 = Float::two_pi();
let frac_pi_2: f32 = Float::frac_pi_2();
let frac_pi_3: f32 = Float::frac_pi_3();
let frac_pi_4: f32 = Float::frac_pi_4();
let frac_pi_6: f32 = Float::frac_pi_6();
... | rust_cleaned_test_functions.jsonl/124476 | {
"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,
15266,
48530,
368,
341,
286,
1077,
8938,
25,
282,
18,
17,
284,
13001,
486,
2493,
543,
286,
1077,
1378,
47771,
25,
282,
18,
17,
284,
13001,
486,
19789,
47771,
543,
286,
1077,
53676,
47771,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_quote() {
assert_eq!(eval(r#"'1><2' + '3<>4'"#), Ok(to_value("1><23<>4")));
assert_eq!(eval(r#"'1==2' + '3--4'"#), Ok(to_value("1==23--4")));
assert_eq!(eval(r#"'1!=2' + '3>>4'"#), Ok(to_value("1!=23>>4")));
assert_eq!(eval(r#"'!=1<>2' + '3>>4'"#), Ok(to_va... | rust_cleaned_test_functions.jsonl/28417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
45236,
368,
341,
286,
2060,
10714,
10297,
14170,
2601,
2,
20584,
16,
1784,
17,
6,
488,
364,
18,
21122,
19,
14913,
2,
701,
7622,
12186,
3142,
445,
16,
1784,
17,
18,
21122,
19,
17621,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_suppress_non_maximum_matches_reference_implementation() {
fn prop(image: GrayTestImage) -> TestResult {
let expected = suppress_non_maximum_reference(&image.0, 3);
let actual = suppress_non_maximum(&image.0, 3);
match pixel_diff_summary(&actual, &expec... | rust_cleaned_test_functions.jsonl/47925 | {
"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,
23723,
1873,
21637,
93581,
38344,
25433,
62,
14369,
368,
341,
286,
5168,
2004,
10075,
25,
23366,
2271,
1906,
8,
1464,
3393,
2077,
341,
310,
1077,
3601,
284,
27222,
21637,
93581,
25433,
2099,
1805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_check_jira_refs_checks_all_commits() {
let git = MockGithub::new();
let pr = new_pr("Do stuff");
let commits = vec![
new_commit("Do stuff"),
new_commit("Fix [CLIENT-123] whoops, add jira ref"),
];
let projects = vec!["SERVER".into(), "CLIENT".into()];
ex... | rust_cleaned_test_functions.jsonl/35649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
5374,
8832,
60638,
75797,
5705,
25149,
1199,
368,
341,
262,
1077,
16345,
284,
14563,
78717,
486,
931,
1428,
262,
1077,
548,
284,
501,
5294,
445,
5404,
6259,
797,
262,
1077,
41535,
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... | 1 |
#[test]
fn test_add_description_multi() {
let subcommand = Subcommand::Add {
modification: Modification {
description: DescriptionMod::Set(s!("foo bar")),
..Default::default()
},
};
assert_eq!(
Subcommand::parse(argv!["a... | rust_cleaned_test_functions.jsonl/84273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
11448,
25133,
368,
341,
286,
1077,
1186,
5631,
284,
3719,
5631,
486,
2212,
341,
310,
17030,
25,
73855,
341,
394,
4008,
25,
7662,
4459,
486,
1649,
1141,
17223,
7975,
3619,
30154,
394,
5241,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_record_for_header_with_no_version(
) -> Result<(), record::value::TryFromIteratorError> {
let record = Record::new(
record::Kind::Header,
record::Value::try_from_iter([("SO", "coordinate")])?,
);
assert_eq!(
Header::try_fr... | rust_cleaned_test_functions.jsonl/14305 | {
"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,
53283,
5673,
14192,
5478,
8757,
6615,
6536,
9438,
1006,
262,
873,
1464,
5714,
68843,
3255,
486,
957,
486,
21453,
3830,
11951,
1454,
29,
341,
286,
1077,
3255,
284,
13583,
486,
931,
1006,
310,
3255,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_log_level() {
#[derive(Serialize, Deserialize, Debug)]
struct LevelHolder {
#[serde(with = "log_level_serde")]
v: Level,
}
let legal_cases = vec![
("critical", Level::Critical),
("error", Level::Error),
... | rust_cleaned_test_functions.jsonl/16566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 715
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5224,
8274,
368,
341,
286,
11506,
27098,
3759,
9050,
11,
48440,
11,
11091,
5563,
286,
2036,
9395,
8589,
341,
310,
11506,
47024,
16980,
284,
330,
839,
8274,
75861,
450,
5422,
310,
348,
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... | 6 |
#[test]
fn test_report_installation_error() {
block_on(async {
let config = config_generator();
let response = json!({"response":{
"server": "prod",
"protocol": "3.0",
"app": [{
"appid": "{00000000-0000-0000-0000-000000000... | rust_cleaned_test_functions.jsonl/94215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 911
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
34245,
367,
4096,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
2033,
284,
2951,
0,
16864,
2322,
12602,
1060,
330,
4030,
788,
330,
19748,
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_array_literal_containing_spread() {
test("([...c])", "[...c]");
test("([4, ...c, a])", "[...c]");
test("([foo(), ...c, bar()])", "[foo(), ...c, bar()]");
test("([...a, b, ...c])", "[...a, ...c]");
test("([...b, ...c])", "[...b, ...c]");
} | rust_cleaned_test_functions.jsonl/471 | {
"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,
3858,
34100,
10260,
2056,
10123,
878,
368,
341,
262,
1273,
445,
82466,
66,
2467,
497,
10545,
1112,
66,
37389,
262,
1273,
445,
2561,
19,
11,
2503,
66,
11,
264,
2467,
497,
10545,
1112,
66,
37389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interfaces() {
assert_to_bytes!(
Interfaces {
types: vec![Type {
inputs: vec![InterfaceType::S8],
outputs: vec![InterfaceType::S16],
}],
imports: vec![Import {
namespac... | rust_cleaned_test_functions.jsonl/132567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72960,
368,
341,
286,
2060,
2346,
12524,
33673,
310,
79857,
341,
394,
4494,
25,
7486,
20703,
929,
341,
503,
11127,
25,
7486,
20703,
5051,
929,
486,
50,
23,
1259,
503,
16275,
25,
7486,
20703,
505... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_url_for_external() {
let req = HttpRequest::default();
let mut resource = ResourceHandler::<()>::default();
resource.name("index");
let routes = vec![(
Resource::external("youtube", "https://youtube.com/watch/{video_id}"),
None,
)]... | rust_cleaned_test_functions.jsonl/50139 | {
"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,
2903,
5478,
47432,
368,
341,
286,
1077,
4232,
284,
44049,
486,
2258,
1428,
286,
1077,
5206,
5101,
284,
11765,
3050,
27638,
368,
6831,
2258,
543,
286,
5101,
2644,
445,
1252,
797,
286,
1077,
11291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chrono_datetime_from_timestamp_seconds() {
let datetime_from_timestamp: DateTime<Utc> = Timestamp::Seconds(2).into();
assert_eq!(
Utc.timestamp_nanos(
(2 * MILLIS_PER_SECOND * NANOS_PER_MILLI)
.try_into()
.unwrap... | rust_cleaned_test_functions.jsonl/105315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
2248,
78,
28943,
5673,
23073,
34825,
368,
341,
286,
1077,
8874,
5673,
23073,
25,
6520,
36397,
10413,
29,
284,
32758,
486,
15343,
7,
17,
568,
18122,
543,
286,
2060,
10714,
33673,
310,
547,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_newline_output() {
fn run(args: &[&str]) -> Assert {
bin().with_args(&["--no-newline"]).with_args(args)
}
// No args
run(&[])
.stdout()
.is("")
.stdout()
.doesnt_contain("\n")
.unwrap();
// One arg
run(&["Hello"])
... | rust_cleaned_test_functions.jsonl/89787 | {
"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,
6536,
5921,
1056,
7645,
368,
341,
262,
5168,
1598,
7356,
25,
44590,
5,
495,
2467,
1464,
5319,
341,
286,
9544,
1005,
4197,
8384,
2099,
1183,
313,
2152,
22269,
1056,
45014,
4197,
8384,
7356,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_front() {
let mut ring = VecDeque::new();
ring.push_back(10);
ring.push_back(20);
assert_eq!(ring.front(), Some(&10));
ring.pop_front();
assert_eq!(ring.front(), Some(&20));
ring.pop_front();
assert_eq!(ring.front(), None);
} | rust_cleaned_test_functions.jsonl/73725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22926,
368,
341,
262,
1077,
5206,
10058,
284,
11312,
73891,
486,
931,
543,
262,
10058,
2552,
3895,
7,
16,
15,
317,
262,
10058,
2552,
3895,
7,
17,
15,
317,
262,
2060,
10714,
10297,
12640,
23445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_instruction_packing() {
let mint_address = Pubkey::new_unique();
let destination_token_address = Pubkey::new_unique();
let original_create = VestingInstruction::Create {
seeds: [50u8; 32],
schedules: vec![Schedule {
amount: 42,
... | rust_cleaned_test_functions.jsonl/25479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54923,
620,
8985,
368,
341,
286,
1077,
28337,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
9106,
6458,
6744,
284,
22611,
792,
486,
931,
21218,
1428,
286,
1077,
4024,
8657,
284,
55888,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sugiyama_layout() {
let mut graph = Graph::new();
let a1 = graph.add_node("a1");
let a2 = graph.add_node("a2");
let a3 = graph.add_node("a3");
let b1 = graph.add_node("b1");
let b2 = graph.add_node("b2");
let b3 = graph.add_node("b3");
... | rust_cleaned_test_functions.jsonl/87837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
768,
16220,
3029,
14466,
368,
341,
286,
1077,
5206,
4771,
284,
12165,
486,
931,
543,
286,
1077,
264,
16,
284,
4771,
1364,
5084,
445,
64,
16,
797,
286,
1077,
264,
17,
284,
4771,
1364,
5084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_file() {
// Debug-Ausgabe:
let currentWD = env::current_dir().unwrap();
println!("Current Directory: {}", currentWD.display());
let mut content:String = String::new();
let mut filename:String;
filename = currentWD.display().to_string();
filename.push_str("/doc/language_refere... | rust_cleaned_test_functions.jsonl/61935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2458,
368,
341,
220,
442,
11091,
6691,
355,
61229,
510,
220,
1077,
1482,
17563,
284,
6105,
486,
3231,
4334,
1005,
15454,
543,
220,
13751,
17223,
5405,
18033,
25,
24689,
1482,
17563,
8181,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_backspace_should_not_decrease_column_count_past_zero() {
new_ucmd!()
.arg("-w2")
.pipe_in("1\x08\x083456")
.succeeds()
.stdout_is("1\x08\x0834\n56");
} | rust_cleaned_test_functions.jsonl/23292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3895,
8746,
43378,
7913,
2259,
19947,
8744,
3180,
93019,
19359,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
86,
17,
1138,
286,
659,
13768,
1243,
445,
16,
3462,
15,
23,
3462,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_minutely() {
let expression = "@minutely";
let schedule = Schedule::from_str(expression).expect("Failed to parse @minutely.");
let starting_date = Utc.ymd(2017, 2, 25).and_hms(23, 59, 36);
let mut events = schedule.after(&starting_date);
events.next().unw... | rust_cleaned_test_functions.jsonl/50817 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
97366,
368,
341,
286,
1077,
7493,
284,
8428,
1065,
97366,
876,
286,
1077,
9700,
284,
23512,
486,
1499,
2895,
48330,
568,
17119,
445,
9408,
311,
4715,
569,
1065,
97366,
7320,
286,
1077,
5916,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_drop() {
struct TwoVec<T> {
x: Soa2<T, T>,
y: Soa2<T, T>,
}
let (mut c0, mut c1, mut c2, mut c3) = (0, 0, 0, 0);
{
let mut tv =
TwoVec {
x: Soa2::new(),
y: Soa2::new(),
};
tv.x.push(... | rust_cleaned_test_functions.jsonl/121397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
29584,
368,
341,
262,
2036,
9043,
10050,
3125,
29,
341,
286,
856,
25,
2055,
64,
17,
3125,
11,
350,
12520,
286,
379,
25,
2055,
64,
17,
3125,
11,
350,
12520,
262,
555,
262,
1077,
320,
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_cast_decimal_to_decimal() -> Result<()> {
let array = vec![1234, 2222, 3, 4000, 5000];
let decimal_array = array
.iter()
.map(|v| Some(*v))
.collect::<DecimalArray>()
.with_precision_and_scale(10, 3)?;
generic_decimal_to_o... | rust_cleaned_test_functions.jsonl/57551 | {
"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,
5303,
74429,
2346,
74429,
368,
1464,
5714,
71698,
341,
286,
1077,
1334,
284,
7486,
20703,
16,
17,
18,
19,
11,
220,
17,
17,
17,
17,
11,
220,
18,
11,
220,
19,
15,
15,
15,
11,
220,
20,
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... | 3 |
#[test]
fn test_fx18_set_sound() {
let mut machine = Machine::new(TestContext::new());
machine.register_set(0xA, 4);
machine.test_opcode(0xFA18);
// Should set the sound timer value in VX
assert_eq!(machine.sound_timer, 4);
// Should increment program counter by two
assert_eq!(machin... | rust_cleaned_test_functions.jsonl/127973 | {
"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,
62691,
16,
23,
2602,
37676,
368,
341,
262,
1077,
5206,
5662,
284,
12960,
486,
931,
31159,
1972,
486,
931,
1423,
262,
5662,
9929,
2602,
7,
15,
14673,
11,
220,
19,
317,
262,
5662,
5958,
71319,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_run_fonts_ascii_build() {
let c = RunFonts::new().ascii("Arial");
let b = c.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:rFonts w:ascii="Arial" />"#
);
} | rust_cleaned_test_functions.jsonl/117549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
71502,
50238,
20801,
368,
341,
286,
1077,
272,
284,
6452,
55369,
486,
931,
1005,
23324,
445,
24555,
797,
286,
1077,
293,
284,
272,
13239,
543,
286,
2060,
10714,
33673,
310,
607,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fn_signature_two_args_second() {
let info = call_info(
r#"fn foo(x: u32, y: u32) -> u32 {x + y}
fn bar() { foo(3, <|>); }"#,
);
assert_eq!(info.parameters(), ["x: u32", "y: u32"]);
assert_eq!(info.active_parameter, Some(1));
} | rust_cleaned_test_functions.jsonl/55347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
23241,
8384,
29644,
368,
341,
286,
1077,
3546,
284,
1618,
3109,
1006,
310,
435,
55543,
8822,
15229,
2075,
25,
575,
18,
17,
11,
379,
25,
575,
18,
17,
8,
1464,
575,
18,
17,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_response_new_json_serialization() -> Result<()> {
let response = ErrorResponse::new(501, "The endpoint is not implemented");
let json = serde_json::to_string(&response)?;
let deserialized: Response = serde_json::from_str(&json)?;
assert_eq!(deserialized.sta... | rust_cleaned_test_functions.jsonl/5304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
9655,
5921,
9455,
25602,
2022,
368,
1464,
5714,
71698,
341,
286,
1077,
2033,
284,
95724,
486,
931,
7,
20,
15,
16,
11,
330,
785,
14887,
374,
537,
11537,
797,
286,
1077,
2951,
284,
61570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ror_mem() {
let code = vec![0x66, 0x02];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
memory.set(0x02, 0x4B);
nes.C = 1;
nes.next(&mut memory).unwrap();
assert_eq!(0xa5, memory.get(0x02));
assert_eq!(1, nes.N);
... | rust_cleaned_test_functions.jsonl/38696 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
269,
12976,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
87,
21,
21,
11,
220,
15,
87,
15,
17,
935,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
286,
1077,
5206,
4938,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cond_1() {
// cond in BFS is same as conde
let query = proto_vulcan_query!(|q| {
cond {
member(q, [1, 2, 3]),
member(q, [4, 5, 6]),
member(q, [7, 8, 9]),
}
});
let mut iter = query.run();
... | rust_cleaned_test_functions.jsonl/32313 | {
"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,
24433,
62,
16,
368,
341,
286,
442,
9756,
304,
90351,
374,
1852,
438,
390,
450,
198,
286,
1077,
3239,
284,
18433,
2273,
360,
4814,
5738,
10297,
91,
80,
91,
341,
310,
9756,
341,
394,
4462,
10583... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_os_str_len() {
let mut os_string = OsString::new();
assert_eq!(0, os_string.len());
os_string.push("abc");
assert_eq!(3, os_string.len());
os_string.clear();
assert_eq!(0, os_string.len());
} | rust_cleaned_test_functions.jsonl/105025 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29387,
2895,
6043,
368,
341,
286,
1077,
5206,
2643,
3904,
284,
15433,
703,
486,
931,
543,
286,
2060,
10714,
10297,
15,
11,
2643,
3904,
19406,
5231,
286,
2643,
3904,
2552,
445,
13683,
797,
286,
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_decls() {
assert_eq!(declaration(&b"void "[..]), Done(&b" "[..], Decl::Void));
assert_eq!(declaration(&b"int foo;"[..]), Done(&b";"[..], Decl::named("foo", Type::Int)));
assert_eq!(declaration(&b"int foo[123] "[..]),
Done(&b" "[..], Decl::named("foo",
... | rust_cleaned_test_functions.jsonl/11385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1094
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
18074,
368,
341,
262,
2060,
10714,
10297,
80383,
2099,
65,
1,
1004,
10545,
496,
9719,
27357,
2099,
65,
1,
10545,
496,
1125,
31625,
486,
35882,
3237,
262,
2060,
10714,
10297,
80383,
2099,
65,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_grep_line() {
let source = into_source(
vec![" bin/node/cli/src/command.rs:127:1: let PartialComponents { client, task_manager, ..}"]
);
let query = "PartialComponents";
run_test(source, query, Some(2), 64);
} | rust_cleaned_test_functions.jsonl/81789 | {
"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,
1889,
9995,
6528,
368,
341,
286,
1077,
2530,
284,
1119,
10347,
1006,
286,
7486,
0,
1183,
170,
252,
101,
9544,
37211,
82604,
13437,
83205,
25638,
25,
16,
17,
22,
25,
16,
25,
3502,
1077,
24552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast() {
assert_ulps_eq!(Matrix2::new(0.2f64, 1.5, 4.7, 2.3).cast().unwrap(), Matrix2::new(0.2f32, 1.5, 4.7, 2.3));
assert_ulps_eq!(Matrix3::new(
0.2f64, 1.5, 4.7,
2.3, 5.7, 2.1,
4.6, 5.2, 6.6,
).cast().unwrap(), Matrix3::new(
... | rust_cleaned_test_functions.jsonl/105471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 593
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
368,
341,
286,
2060,
61039,
1690,
10714,
10297,
6689,
17,
486,
931,
7,
15,
13,
17,
69,
21,
19,
11,
220,
16,
13,
20,
11,
220,
19,
13,
22,
11,
220,
17,
13,
18,
568,
3829,
1005,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_country_fails() {
// Setup environment
let mut exec = fasync::TestExecutor::new().expect("Failed to create an executor");
let test_values = test_setup();
let (phy, mut phy_stream) = fake_phy();
let phy_id = 10u16;
test_values.phys.insert(phy_id... | rust_cleaned_test_functions.jsonl/20597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
28106,
761,
6209,
368,
341,
286,
442,
18626,
4573,
198,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
458,
31558,
797,
286,
1077,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_meta_doc_comments_non_latin() {
parse_macro(
r#"
macro_rules! foo {
($(#[$ i:meta])+) => (
$(#[$ i])+
fn bar() {}
)
}
"#,
).
assert_expand_items(
r#"foo! {
/// 錦瑟無端五十弦,一弦一柱思華年。
... | rust_cleaned_test_functions.jsonl/28743 | {
"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,
13381,
18869,
30359,
21637,
907,
14768,
368,
341,
262,
4715,
58810,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
32735,
3442,
600,
25,
5490,
2467,
36197,
589,
2399,
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_empty_pubkey_msg() {
// test-vector generated via the following go code:
//package main
//import (
// "fmt"
// "github.com/tendermint/go-amino"
// "github.com/tendermint/tendermint/crypto"
// "github.com/... | rust_cleaned_test_functions.jsonl/22291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
34014,
792,
6483,
368,
341,
286,
442,
1273,
65192,
7907,
4566,
279,
2701,
728,
2038,
510,
16885,
286,
442,
1722,
1887,
8945,
286,
442,
474,
2399,
286,
442,
197,
21871,
698,
1789,
286,
442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_groupby_on_lists() -> Result<()> {
let s0 = Series::new("", [1i32, 2, 3]);
let s1 = Series::new("groups", [4i32, 5]);
let mut builder = ListPrimitiveChunkedBuilder::<i32>::new("arrays", 10, 10, DataType::Int32);
builder.append_series(&s0);
builder.append_series(&s1);
let... | rust_cleaned_test_functions.jsonl/179 | {
"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,
6288,
1694,
4470,
37288,
368,
1464,
5714,
71698,
341,
262,
1077,
274,
15,
284,
11131,
486,
931,
19814,
508,
16,
72,
18,
17,
11,
220,
17,
11,
220,
18,
2558,
262,
1077,
274,
16,
284,
11131,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_aead() -> Fallible<()> {
for &algo in ALL_AEAD_ALGORITHMS {
let cryptosys = LibSodiumCryptoSystem::new(algo)?;
assert!(cryptosys.aead_max_message_size() > 1024 * 1024 * 1024);
let plaintext = b"Secret payload";
let additional_data = b"som... | rust_cleaned_test_functions.jsonl/49528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1530
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
3149,
368,
1464,
14785,
1238,
71698,
341,
286,
369,
609,
72464,
304,
13097,
1566,
36,
1808,
8912,
66889,
4826,
341,
310,
1077,
14436,
436,
1047,
284,
5688,
50,
46776,
58288,
2320,
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... | 4 |
#[test]
fn test_convert_object_with_implicit_keys() {
let b = ast::BaseNode::default();
let pkg = parse_package("{ a, b }");
let want = Package {
loc: b.location.clone(),
package: "main".to_string(),
files: vec![File {
loc: b.location.c... | rust_cleaned_test_functions.jsonl/132517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
5314,
6615,
62,
30940,
12631,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
4715,
26328,
13976,
264,
11,
293,
335,
797,
286,
1077,
1366,
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_split_region() {
let (mut cluster, client, ctx) = must_new_cluster_and_kv_client();
// Split region commands
let key = b"b";
let mut req = SplitRegionRequest::default();
req.set_context(ctx);
req.set_split_key(key.to_vec());
let resp = client.split_region(&req).unwra... | rust_cleaned_test_functions.jsonl/61688 | {
"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,
17052,
20627,
368,
341,
262,
1077,
320,
6984,
10652,
11,
2943,
11,
5635,
8,
284,
1969,
5921,
28441,
8378,
97066,
8179,
1428,
262,
442,
27810,
5537,
11293,
198,
262,
1077,
1376,
284,
293,
1,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signature_to_asn1_der_short_encodings() {
let r_bytes = [
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x01,
... | rust_cleaned_test_functions.jsonl/81732 | {
"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,
39859,
2346,
11898,
77,
16,
35345,
16673,
13781,
58335,
368,
341,
286,
1077,
435,
12524,
284,
2278,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub() {
let two: ModInt = ModInt::from_value_modulus(BigInt::from(2), BigInt::zero());
let one: ModInt = ModInt::one();
let one2 = two - one;
assert_eq!(BigInt::from(1), one2.value);
assert_eq!(BigInt::zero(), one2.modulus);
let one3: ModInt = Mo... | rust_cleaned_test_functions.jsonl/126147 | {
"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,
5228,
368,
341,
286,
1077,
1378,
25,
5650,
1072,
284,
5650,
1072,
486,
1499,
3142,
7480,
19425,
5349,
343,
1072,
486,
1499,
7,
17,
701,
62608,
486,
14154,
1423,
286,
1077,
825,
25,
5650,
1072,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_allocate_mixed() {
let a = BlockArena::new();
let mut allocated = vec![];
let mut allocated_size = 0;
let n = 10000;
let mut r = rand::thread_rng();
for i in 0..n {
let size = if i % (n / 10) == 0 {
if i == 0 {
... | rust_cleaned_test_functions.jsonl/14862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 924
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77078,
717,
3286,
368,
341,
286,
1077,
264,
284,
8362,
93937,
486,
931,
543,
286,
1077,
5206,
20204,
284,
7486,
0,
15078,
286,
1077,
5206,
20204,
2368,
284,
220,
15,
280,
286,
1077,
308,
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... | 9 |
#[test]
fn test_all() {
struct TestClassification {
num: u64,
result: perfect_numbers::Classification
}
let test_table: Vec<TestClassification> = vec![
TestClassification { num: 6, result: Classification::Perfect },
TestClassification { num: 28, result: Classification... | rust_cleaned_test_functions.jsonl/30403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
368,
341,
262,
2036,
3393,
85040,
341,
286,
1629,
25,
575,
21,
19,
345,
286,
1102,
25,
4727,
32964,
486,
85040,
198,
262,
456,
262,
1077,
1273,
5237,
25,
11312,
27,
60100,
2404,
29,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_by_url_local() {
let sut = ObjectStoreRegistry::default();
let url = ListingTableUrl::parse("../").unwrap();
sut.get_by_url(&url).unwrap();
} | rust_cleaned_test_functions.jsonl/96530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
3710,
2903,
13564,
368,
341,
286,
1077,
34212,
284,
3002,
6093,
15603,
486,
2258,
543,
286,
1077,
2515,
284,
38764,
2556,
2864,
486,
6400,
17409,
1827,
15454,
543,
286,
34212,
670,
3710,
290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_yearly() {
let expression = "@yearly";
let schedule = Schedule::from_str(expression).expect("Failed to parse @yearly.");
let starting_date = Utc.ymd(2017, 6, 15).and_hms(14, 29, 36);
let mut events = schedule.after(&starting_date);
assert_eq!(Utc.ymd(2018,... | rust_cleaned_test_functions.jsonl/50812 | {
"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,
14645,
398,
368,
341,
286,
1077,
7493,
284,
8428,
3157,
398,
876,
286,
1077,
9700,
284,
23512,
486,
1499,
2895,
48330,
568,
17119,
445,
9408,
311,
4715,
569,
3157,
398,
7320,
286,
1077,
5916,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_lamport_with_clean() {
with_create_zero_lamport(|bank| {
bank.freeze();
bank.squash();
bank.force_flush_accounts_cache();
// do clean and assert that it actually did its job
assert_eq!(3, bank.get_snapshot_storages(N... | rust_cleaned_test_functions.jsonl/95887 | {
"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,
8657,
19359,
907,
309,
403,
6615,
19573,
368,
341,
286,
448,
8657,
19359,
907,
309,
403,
22428,
17033,
91,
341,
310,
6073,
76685,
543,
310,
6073,
514,
446,
988,
543,
310,
6073,
48194,
39213,
556... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_send_message() {
// Test Messages
let instantiate_msg = InstantiateMsg {
version: "1.0.0".to_string(),
};
let send_msg = ExecuteMsg::SendMessage {
nonce: 0,
nick: "Bob".to_string(),
text: "Hello Alice".to_string()... | rust_cleaned_test_functions.jsonl/69944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 791
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
6462,
368,
341,
286,
442,
3393,
26729,
198,
286,
1077,
40902,
6483,
284,
32288,
6611,
341,
310,
2319,
25,
330,
16,
13,
15,
13,
15,
3263,
983,
3904,
3148,
286,
3634,
286,
1077,
3624,
648... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_suback() {
let mut data: &[u8] = &[0b10010000, 3, 0, 10, 0b00000010];
match decode_slice(&mut data) {
Ok(Some(Packet::Suback(s))) => {
assert_eq!(s.pid.get(), 10);
assert_eq!(
s.return_codes.get(0),
Some(&SubscribeReturnCode... | rust_cleaned_test_functions.jsonl/77910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
473,
368,
341,
262,
1077,
5206,
821,
25,
44590,
84,
23,
60,
284,
44590,
15,
65,
16,
15,
15,
16,
15,
15,
15,
15,
11,
220,
18,
11,
220,
15,
11,
220,
16,
15,
11,
220,
15,
65,
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... | 2 |
#[test]
fn test_deserializer_constructor() {
let input = r#"{
"d": {
"guild_id": "1",
"role_id": "2"
},
"op": 0,
"s": 7,
"t": "GUILD_ROLE_DELETE"
}"#;
let deserializer = GatewayEventDeserializer:... | rust_cleaned_test_functions.jsonl/78644 | {
"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,
15768,
41939,
66210,
368,
341,
286,
1077,
1946,
284,
435,
55543,
515,
310,
330,
67,
788,
341,
394,
330,
57877,
842,
788,
330,
16,
756,
394,
330,
5778,
842,
788,
330,
17,
698,
310,
1153,
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_benchmarks() {
ExtBuilder::default().has_stakers(false).build().execute_with(|| {
assert_ok!(test_benchmark_bond::<Test>());
assert_ok!(test_benchmark_bond_extra::<Test>());
assert_ok!(test_benchmark_unbond::<Test>());
assert_ok!(test_benchmark_withdraw_unbonded_update::<Test>());
... | rust_cleaned_test_functions.jsonl/120492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
15544,
368,
341,
197,
76605,
3297,
486,
2258,
1005,
4648,
1261,
8312,
3576,
568,
5834,
1005,
10257,
6615,
79453,
341,
298,
6948,
19817,
10297,
1944,
880,
39381,
880,
2111,
27638,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.