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_large() {
let x = b"GATCACAGGTCTATCACCCTATTAACCACTCACGGGAGCTCTCCATGC\
ATTTGGTATTTTCGTCTGGGGGGTATGCACGCGATAGCATTGCGAGACGCTGGAGCCGGAGCACCCTATGTCGCAGTAT\
CTGTCTTTGATTCCTGCCTCATCCTATTATTTATCGCACCTACGTTCAATATTACAGGCGAACATACTTACTAAAGTGT";
let y = b"GGGTATGCACGCGATAGCATTGCGAGATGCTGGAGC... | rust_cleaned_test_functions.jsonl/35194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
368,
341,
286,
1077,
856,
284,
293,
89199,
828,
92832,
1890,
25388,
1162,
828,
34,
29442,
1162,
828,
15204,
1706,
5049,
1162,
92832,
22254,
38,
1890,
1162,
1162,
3706,
828,
22863,
5661,
828... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_packet_offsets() {
assert_eq!(
get_packet_offsets_from_tx(test_tx(), 0),
PacketOffsets::new(1, 1, 64, 4, 2)
);
assert_eq!(
get_packet_offsets_from_tx(test_tx(), 100),
PacketOffsets::new(1, 1, 64, 4, 2)
);
... | rust_cleaned_test_functions.jsonl/22083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
21078,
56924,
368,
341,
286,
2060,
10714,
33673,
310,
633,
21078,
56924,
5673,
17805,
8623,
17805,
1507,
220,
15,
1326,
310,
28889,
81095,
486,
931,
7,
16,
11,
220,
16,
11,
220,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_memtable_kv_operations() {
let region_id = 8;
let mut memtable = MemTable::new(region_id, Arc::new(GlobalStats::default()));
let (k1, v1) = (b"key1", b"value1");
let (k5, v5) = (b"key5", b"value5");
memtable.put(k1.to_vec(), v1.to_vec(), FileId::new(LogQu... | rust_cleaned_test_functions.jsonl/18144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1012
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12976,
2005,
97066,
57345,
368,
341,
286,
1077,
5537,
842,
284,
220,
23,
280,
286,
1077,
5206,
1833,
2005,
284,
13550,
2556,
486,
931,
48059,
842,
11,
19689,
486,
931,
46744,
16635,
486,
2258,
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_or_with_multiple_like_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let name2 = _random_vector(10);
let value2 = _random_string(10);
let name3 = _random_vector(10);
let value3 = _random_string(10);
let quer... | rust_cleaned_test_functions.jsonl/11923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 747
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
45233,
25535,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
829,
17,
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_timestamp_difference() {
fn test_timestamp_difference_with_initial(initial: Timestamp) {
let offsets = generate_interesting_offsets(initial);
assert_eq!(offsets.plus_one - initial, Timestamp::default() + 1);
assert_eq!(
offsets.plus_lim... | rust_cleaned_test_functions.jsonl/63527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 759
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
47525,
368,
341,
286,
5168,
1273,
23073,
47525,
6615,
15809,
34331,
25,
32758,
8,
341,
310,
1077,
35046,
284,
6923,
62527,
287,
56924,
34331,
317,
310,
2060,
10714,
10297,
3176,
82,
60540,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pooling_allocator_with_memory_pages_exceeded() {
assert_eq!(
PoolingInstanceAllocator::new(
PoolingAllocationStrategy::Random,
ModuleLimits {
memory_pages: 0x10001,
..Default::default()
},... | rust_cleaned_test_functions.jsonl/48878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15709,
287,
56910,
6615,
19195,
21655,
2702,
94206,
368,
341,
286,
2060,
10714,
33673,
310,
22728,
287,
2523,
42730,
486,
931,
1006,
394,
22728,
287,
78316,
19816,
486,
13999,
345,
394,
13711,
94588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_offset_from_nix_expr() {
let expr = "let a = 1; in\nmap (x: a + x)\n[1 2 3 4]";
let start = range(expr, TextRange::new(TextSize::from(0), TextSize::from(1)));
assert_eq!(0, start.start.line);
assert_eq!(0, start.end.line);
assert_eq!(0, start.start.cha... | rust_cleaned_test_functions.jsonl/113847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
6917,
5673,
1089,
941,
21915,
368,
341,
286,
1077,
15169,
284,
330,
1149,
264,
284,
220,
16,
26,
304,
1699,
2186,
320,
87,
25,
264,
488,
856,
10699,
77,
58,
16,
220,
17,
220,
18,
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_permutations() {
{
let v: [i32; 0] = [];
let mut it = permutations(&v);
let (min_size, max_opt) = it.size_hint();
assert_eq!(min_size, 1);
assert_eq!(max_opt.unwrap(), 1);
assert_eq!(it.next(), Some(to_vec(&v)));
... | rust_cleaned_test_functions.jsonl/22055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31961,
82141,
368,
341,
286,
341,
310,
1077,
348,
25,
508,
72,
18,
17,
26,
220,
15,
60,
284,
5907,
310,
1077,
5206,
432,
284,
71949,
2099,
85,
317,
310,
1077,
320,
1065,
2368,
11,
1932,
1503... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_is_dsym_dir() {
assert!(fixture("macos/crash.dSYM").is_dsym_dir());
assert!(!fixture("macos/crash").is_dsym_dir());
} | rust_cleaned_test_functions.jsonl/46975 | {
"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,
6892,
814,
23802,
4334,
368,
341,
286,
2060,
10297,
59612,
445,
11948,
436,
2899,
81,
988,
950,
79234,
1827,
285,
814,
23802,
4334,
1423,
286,
2060,
0,
3471,
59612,
445,
11948,
436,
2899,
81,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_violated_50_burst() {
let bucket = VectorTokenBucket::new(Duration::from_millis(1000), 100, *D00, 0.50, 1.0);
Instant::set_time(50_000);
assert!(!bucket.get_tokens(90), "Burst should be violated.");
assert_ne!(None, bucket.get_delay(), "Bucket sho... | rust_cleaned_test_functions.jsonl/42328 | {
"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,
2273,
24903,
657,
62,
20,
15,
880,
32612,
368,
341,
310,
1077,
15621,
284,
4196,
3323,
36018,
486,
931,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
15,
701,
220,
16,
15,
15,
11,
353,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_naive_tf_from_example_index() {
let idx = create_test_index();
let mdl = naive_tf::from_index(&idx);
assert_eq!(2, mdl.labels.len());
assert_eq!(4, mdl.terms.len());
assert_eq!(2, mdl.word_bag.len());
assert_eq!(4, mdl.word_bag[0].len());
assert_eq!("brown".to_strin... | rust_cleaned_test_functions.jsonl/74636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58631,
533,
47719,
5673,
39304,
3560,
368,
341,
262,
1077,
7187,
284,
1855,
4452,
3560,
543,
262,
1077,
51700,
284,
49665,
47719,
486,
1499,
3560,
2099,
6361,
626,
262,
2060,
10714,
10297,
17,
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_stake_process_instruction_decode_bail() {
let stake_address = Pubkey::new_unique();
let stake_account = create_default_stake_account();
let rent_address = sysvar::rent::id();
let rent = Rent::default();
let rent_account = account::create_account_s... | rust_cleaned_test_functions.jsonl/31632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5039
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
11305,
54923,
15227,
880,
604,
368,
341,
1789,
286,
1077,
18279,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
18279,
13500,
284,
1855,
9993,
1261,
726,
13500,
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 |
#[test]
fn test_parse_padding_1() {
assert_eq!(
parse_layout_padding("10px"),
Ok(LayoutPadding {
top: PixelValue::px(10.0),
right: PixelValue::px(10.0),
bottom: PixelValue::px(10.0),
left: PixelValue::px(10.0),
... | rust_cleaned_test_functions.jsonl/114064 | {
"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,
21039,
40726,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
14466,
40726,
445,
16,
15,
1767,
4461,
310,
7622,
76690,
21616,
341,
394,
1909,
25,
27469,
1130,
486,
1767,
7,
16,
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... | 1 |
#[test]
fn test_hover_through_literal_string_in_builtin_macro() {
check_hover_no_result(
r#"
#[rustc_builtin_macro]
macro_rules! format {}
fn foo() {
format!("hel$0lo {}", 0);
}
"#,
);
} | rust_cleaned_test_functions.jsonl/66649 | {
"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,
53445,
87399,
34100,
3904,
1243,
73829,
58810,
368,
341,
286,
1779,
53445,
6536,
5287,
1006,
310,
435,
2,
698,
310,
11506,
35788,
66,
73829,
58810,
921,
310,
18072,
21407,
0,
3561,
10086,
310,
516... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_css() {
let src = "div { width: 100px; height: 50px; color: #ffffff; background-color: #003300; }";
let stylesheet = parse(src.to_string());
assert_eq!(
stylesheet,
Stylesheet {
rules: vec![
Rule {
selector... | rust_cleaned_test_functions.jsonl/128734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
368,
972,
262,
1077,
2286,
284,
330,
611,
314,
2374,
25,
220,
16,
15,
15,
1767,
26,
2608,
25,
220,
20,
15,
1767,
26,
1894,
25,
671,
26886,
26,
4004,
7889,
25,
671,
15,
15,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_replace() {
let mut file = NamedTempFile::new().unwrap();
let feed1 = "https://satylogin.medium.com/feed";
let feed2 = "https://motw.rs/rss.xml";
let now = chrono::Utc::now();
let config_list = vec![
Config {
feed: feed1.to_stri... | rust_cleaned_test_functions.jsonl/16202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 670
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
368,
341,
286,
1077,
5206,
1034,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
5395,
16,
284,
330,
2428,
1110,
36468,
88,
3673,
84366,
905,
93730,
876,
286,
1077,
5395,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_affine_as_affine() {
let affine = Affine([[1., 2.], [3., 4.]], [5., 6.]);
let affine_clone = affine.as_affine();
approx_eq!(f64, affine_clone.0[0][0], affine.0[0][0]);
approx_eq!(f64, affine_clone.0[0][1], affine.0[0][1]);
approx_eq!(f64, affine_clone.0[1... | rust_cleaned_test_functions.jsonl/102301 | {
"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,
48914,
482,
11898,
48914,
482,
368,
341,
286,
1077,
68809,
284,
9748,
482,
27119,
16,
2572,
220,
17,
13,
1125,
508,
18,
2572,
220,
19,
13,
20492,
508,
20,
2572,
220,
21,
13,
2558,
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 |
#[test]
fn test_loading_cosine() {
// The math library does not need to be loaded since it is already
// statically linked in
let libm = match DynamicLibrary::open(None) {
Err(error) => panic!("Could not load self as module: {}", error),
Ok(libm) => libm
}... | rust_cleaned_test_functions.jsonl/34337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57726,
61192,
482,
368,
341,
286,
442,
576,
6888,
6733,
1558,
537,
1184,
311,
387,
6661,
2474,
432,
374,
2669,
198,
286,
442,
91174,
10592,
304,
198,
286,
1077,
3051,
76,
284,
2432,
21886,
16915... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_input_day4() {
assert_eq!(parse_input_day4("12345-123456".into()), (12345, 123456));
} | rust_cleaned_test_functions.jsonl/82200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 63
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5898,
16763,
19,
368,
341,
286,
2060,
10714,
10297,
6400,
5898,
16763,
19,
445,
16,
17,
18,
19,
20,
12,
16,
17,
18,
19,
20,
21,
3263,
18122,
11858,
320,
16,
17,
18,
19,
20,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_intfastfield_small() {
let path = Path::new("test");
let mut directory: RAMDirectory = RAMDirectory::create();
{
let write: WritePtr = directory.open_write(Path::new("test")).unwrap();
let mut serializer = FastFieldSerializer::from_write(write).unw... | rust_cleaned_test_functions.jsonl/12504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 628
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
9349,
2566,
31966,
368,
341,
286,
1077,
1815,
284,
7933,
486,
931,
445,
1944,
797,
286,
1077,
5206,
6220,
25,
22038,
9310,
284,
22038,
9310,
486,
3182,
543,
286,
341,
310,
1077,
3270,
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_verify_transaction() {
// root
// a b
// txn0 txn1 txn2 default
let txn_info0_hash = b"hello".test_only_hash();
let txn_info2_hash = b"!".test_only_hash();
let txn1_hash = HashValue::random();
let state_root1_hash = ... | rust_cleaned_test_functions.jsonl/33628 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 932
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
28884,
368,
341,
262,
442,
310,
3704,
63477,
262,
442,
981,
264,
1797,
293,
7213,
262,
442,
220,
49721,
15,
256,
49721,
16,
256,
49721,
17,
256,
1638,
198,
262,
1077,
49721,
3109,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_change_mode() {
let cursor_mode = CursorMode {
shape: Some(CursorShape::Horizontal),
style_id: Some(1),
cell_percentage: Some(100.0),
blinkwait: Some(1),
blinkon: Some(1),
blinkoff: Some(1),
};
let mu... | rust_cleaned_test_functions.jsonl/94973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
7302,
368,
341,
286,
1077,
8128,
7302,
284,
28067,
3636,
341,
310,
6083,
25,
4329,
3025,
3823,
12301,
486,
15837,
1326,
310,
1707,
842,
25,
4329,
7,
16,
1326,
310,
2779,
46044,
25,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_l2_snapshot() {
let text =
fetch_l2_snapshot("binance", MarketType::EuropeanOption, "BTC-210129-40000-C").unwrap();
assert!(text.starts_with("{"));
} | rust_cleaned_test_functions.jsonl/81943 | {
"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,
907,
17,
53265,
368,
341,
262,
1077,
1467,
4035,
286,
7807,
907,
17,
53265,
445,
6863,
681,
497,
7993,
929,
486,
63369,
5341,
11,
330,
59118,
12,
17,
16,
15,
16,
17,
24,
12,
19,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_should_ignore_file() {
let mut files = HashSet::new();
files.insert((10, 20));
assert!(!should_ignore_file(true, &None, &mut files, 0, 0));
// New file is not known it will be inserted to the hashmp and should not be ignored
assert!(!should_ignore_file(f... | rust_cleaned_test_functions.jsonl/32370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
58493,
2458,
368,
341,
286,
1077,
5206,
3542,
284,
18931,
486,
931,
543,
286,
3542,
7030,
1188,
16,
15,
11,
220,
17,
15,
3237,
286,
2060,
0,
3471,
5445,
58493,
2458,
3715,
11,
609,
4064... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_float() {
#[allow(clippy::float_cmp)]
with_graph(|graph| {
let float: f64 = graph.query("RETURN 12.3").unwrap();
assert_eq!(float, 12.3);
});
} | rust_cleaned_test_functions.jsonl/73408 | {
"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,
17586,
368,
341,
262,
11506,
7183,
9849,
45749,
486,
3649,
35193,
5563,
262,
448,
14738,
22428,
4439,
91,
341,
286,
1077,
2224,
25,
282,
21,
19,
284,
4771,
4786,
445,
51533,
220,
16,
17,
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 |
#[test]
fn test_string_number_comparison() {
fold("'1' < 2", "true");
fold("'2' > 1", "true");
fold("'123' > 34", "true");
fold("'NaN' < NaN", "false");
fold("'1' == 2", "false");
fold("'1' != 1", "false");
fold("'NaN' == NaN", "false");
fold("'1' === 1", "false");
fold("'1' ... | rust_cleaned_test_functions.jsonl/122161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
5500,
90797,
368,
341,
262,
11555,
45456,
16,
6,
366,
220,
17,
497,
330,
1866,
797,
262,
11555,
45456,
17,
6,
861,
220,
16,
497,
330,
1866,
797,
262,
11555,
45456,
16,
17,
18,
6,
861,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_protected_inner_class() {
let hdr = indoc! {"
#include <cstdint>
inline uint32_t DoMath(uint32_t a) {
return a * 3;
}
class A {
protected:
inline uint32_t protected_method() { return 0; }
struct B {
int x;
};
inline ... | rust_cleaned_test_functions.jsonl/9969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22357,
1569,
34345,
4790,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
397,
262,
7381,
2622,
18,
17,
528,
3155,
8815,
8488,
18,
17,
528,
264,
8,
220,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_camel_case() {
let mut bytes = BytesMut::with_capacity(2048);
let mut head = RequestHead::default();
head.set_camel_case_headers(true);
head.headers.insert(DATE, HeaderValue::from_static("date"));
head.headers
.insert(CONTENT_TYPE, HeaderValue:... | rust_cleaned_test_functions.jsonl/38445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
35562,
19096,
368,
341,
286,
1077,
5206,
5820,
284,
30024,
51440,
486,
4197,
35603,
7,
17,
15,
19,
23,
317,
286,
1077,
5206,
1968,
284,
6145,
12346,
486,
2258,
543,
286,
1968,
980,
666,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_1vcpu_ht_on() {
// test update_deterministic_cache_entry
// test L1
check_update_deterministic_cache_entry(1, true, 1, 0);
// test L2
check_update_deterministic_cache_entry(1, true, 2, 0);
// test L3
check_update_deterministic_cache_entry(1... | rust_cleaned_test_functions.jsonl/7318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
85,
16475,
49086,
4470,
368,
341,
286,
442,
1273,
2647,
814,
16483,
4532,
11529,
9078,
198,
286,
442,
1273,
444,
16,
198,
286,
1779,
8882,
814,
16483,
4532,
11529,
9078,
7,
16,
11,
830... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fat_list_root() {
let images = fat_test_image_paths();
for image in &images {
let disk = FakeDisk::new(&image);
let len = disk.len();
let mut fs = crate::fat::Filesystem::new(&disk, 0, len);
fs.init().expect("Error initialising fil... | rust_cleaned_test_functions.jsonl/104527 | {
"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,
761,
266,
2019,
12993,
368,
341,
286,
1077,
5335,
284,
8664,
4452,
4954,
24152,
1428,
286,
369,
2168,
304,
609,
3642,
341,
310,
1077,
13364,
284,
36965,
47583,
486,
931,
2099,
1805,
317,
310,
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... | 2 |
#[test]
fn test_get_slot_entries_with_shred_count_corruption() {
let blocktree_path = get_tmp_ledger_path!();
{
let blocktree = Blocktree::open(&blocktree_path).unwrap();
let num_ticks = 8;
let entries = create_ticks(num_ticks, 0, Hash::default());
... | rust_cleaned_test_functions.jsonl/116902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
27563,
26092,
6615,
3712,
1151,
3180,
14734,
14123,
368,
341,
286,
1077,
2504,
9344,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
9344,
284,
8362,
9344,
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_extension_successful_with_minimal_json_response() {
use colorful_extension::*;
let mock = mock("POST", "/token")
.match_header("Accept", "application/json")
.match_header("Authorization", "Basic YWFhOmJiYg==")
.match_body("grant_type=authorization_code&code=ccc"... | rust_cleaned_test_functions.jsonl/12781 | {
"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,
31035,
92951,
6615,
7260,
2861,
9455,
9655,
368,
341,
262,
990,
33866,
31035,
79304,
262,
1077,
7860,
284,
7860,
445,
2946,
497,
3521,
5839,
1138,
286,
659,
6347,
8757,
445,
16646,
497,
330,
5132,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_probe_duplicate_tx() {
//! Checks that committed transactions do not change the blockchain state when probed.
let (mut testkit, api) = init_testkit();
let tx = inc_count(&api, 5);
let snapshot = testkit.probe(tx.clone());
let schema = CounterSchema::new(&snapshot);
asse... | rust_cleaned_test_functions.jsonl/86872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49108,
70434,
17805,
368,
341,
262,
17664,
24843,
429,
11163,
14131,
653,
537,
2297,
279,
17944,
1584,
979,
462,
2721,
382,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_when() {
let dec1 = Datum::Dec("1.1".parse().unwrap());
let dec2 = Datum::Dec("2.2".parse().unwrap());
let dur1 = Datum::Dur(Duration::parse(b"01:00:00", 0).unwrap());
let dur2 = Datum::Dur(Duration::parse(b"12:00:12", 0).unwrap());
let time1 = Datum:... | rust_cleaned_test_functions.jsonl/32217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
47636,
368,
341,
286,
1077,
1622,
16,
284,
68459,
486,
4900,
445,
16,
13,
16,
3263,
6400,
1005,
15454,
1423,
286,
1077,
1622,
17,
284,
68459,
486,
4900,
445,
17,
13,
17,
3263,
6400,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_function_no_parameters() {
let src = "
// Package foo does a thing.
package foo
// one returns the number one.
one = () => 1
";
let loc = Locator::new(&src[..]);
assert_docs_full(
src,
PackageDoc {
... | rust_cleaned_test_functions.jsonl/10000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
6536,
18263,
368,
341,
286,
1077,
2286,
284,
6228,
286,
442,
16906,
15229,
1558,
264,
3166,
624,
286,
6328,
15229,
271,
286,
442,
825,
4675,
279,
1372,
825,
624,
286,
825,
284,
1719,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_netinfo() {
let cmd = ChanCmd::NETINFO;
assert_eq!(Into::<u8>::into(cmd), 8_u8);
// example client netinfo.
let localhost = "127.0.0.1".parse::<IpAddr>().unwrap();
fbody(
cmd,
"00000000 04 04 7F000001 00",
&msg::Netinfo::for_client(Some(localhost)).in... | rust_cleaned_test_functions.jsonl/6036 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19722,
2733,
368,
341,
262,
1077,
5439,
284,
41302,
15613,
486,
15373,
6637,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
220,
23,
7300,
23,
626,
262,
442,
3110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tree_from_file() {
let tree = Chain::<f32>::from_urdf_file("urdf/sample.urdf").unwrap();
assert_eq!(tree.dof(), 12);
let names = tree
.iter()
.map(|joint| joint.joint().name.clone())
.collect::<Vec<_>>();
assert_eq!(names.len(), 13);
println!("{}", nam... | rust_cleaned_test_functions.jsonl/20027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
5673,
2458,
368,
341,
262,
1077,
4916,
284,
28525,
27638,
69,
18,
17,
6831,
1499,
64879,
2940,
2458,
445,
324,
2940,
69851,
44785,
2940,
1827,
15454,
543,
262,
2060,
10714,
10297,
9344,
950... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_second_order_differentia() {
let x = backprop(scalar(2.0));
let y = x.pow(4.0) - Computed::new(scalar(2.0)) * x.pow(2.0);
assert_eq!(*y, scalar(8.0));
let grads = gradients(&vec![y.clone()], &vec![x.clone()], true);
assert_eq!(grads[0][[]], 24.0);
let grads = gradients... | rust_cleaned_test_functions.jsonl/35599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29644,
7869,
82741,
685,
368,
341,
262,
1077,
856,
284,
1182,
2674,
1141,
59153,
7,
17,
13,
15,
3237,
262,
1077,
379,
284,
856,
25290,
7,
19,
13,
15,
8,
481,
1198,
19292,
486,
931,
1141,
591... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_large_merge_segments() {
let test_input = vec![
create_random_segment_meta(1_000_000),
create_random_segment_meta(100_001),
create_random_segment_meta(100_000),
create_random_segment_meta(1_000_001),
create_random_segment_meta(1... | rust_cleaned_test_functions.jsonl/57300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
20888,
55735,
368,
341,
286,
1077,
1273,
5898,
284,
7486,
90515,
310,
1855,
22644,
28061,
13381,
7,
16,
62,
15,
15,
15,
62,
15,
15,
15,
1326,
310,
1855,
22644,
28061,
13381,
7,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sum_avg_expr() -> Result<()> {
let funcs = vec![AggregateFunction::Sum, AggregateFunction::Avg];
let data_types = vec![
DataType::UInt32,
DataType::UInt64,
DataType::Int32,
DataType::Int64,
DataType::Float32,
... | rust_cleaned_test_functions.jsonl/4585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1652
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
26631,
21915,
368,
1464,
5714,
71698,
341,
286,
1077,
76871,
284,
7486,
20703,
64580,
5152,
486,
9190,
11,
56922,
5152,
486,
39447,
935,
286,
1077,
821,
9763,
284,
7486,
90515,
310,
33172,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_column_major() {
assert_eq!(
Mat::row_major(
1.0, 2.0,
3.0, 4.0,
5.0, 6.0
),
Mat::column_major(
1.0, 3.0, 5.0,
2.0, 4.0, 6.0,
)
);
} | rust_cleaned_test_functions.jsonl/596 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
47916,
368,
341,
286,
2060,
10714,
33673,
310,
6867,
486,
651,
47916,
1006,
394,
220,
16,
13,
15,
11,
220,
220,
17,
13,
15,
345,
394,
220,
18,
13,
15,
11,
220,
220,
19,
13,
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... | 1 |
#[test]
fn test_topn_with_empty_limit() {
let mut topn_heap =
TopNHeap::new(0, Arc::new(RefCell::new(EvalContext::default()))).unwrap();
let cur_key: Vec<Datum> = vec![Datum::I64(1), Datum::I64(2)];
let row_data = RowColsDict::new(HashMap::default(), b"ssss".to_vec());
... | rust_cleaned_test_functions.jsonl/67541 | {
"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,
10426,
77,
6615,
15124,
14763,
368,
341,
286,
1077,
5206,
1909,
77,
33059,
4035,
310,
6909,
45,
27909,
486,
931,
7,
15,
11,
19689,
486,
931,
7,
3945,
3599,
486,
931,
10722,
831,
1972,
486,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_relative_method_uri() {
let keypair: KeyPair = generate_testkey();
let mut document: IotaDocument = IotaDocument::from_keypair(&keypair).unwrap();
assert!(document.proof().is_none());
assert!(document.sign(keypair.secret()).is_ok());
assert_eq!(document.proof().unwrap().ver... | rust_cleaned_test_functions.jsonl/84338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29286,
9032,
15572,
368,
341,
262,
1077,
1376,
12670,
25,
5309,
12443,
284,
6923,
4452,
792,
543,
262,
1077,
5206,
2197,
25,
358,
6089,
7524,
284,
358,
6089,
7524,
486,
1499,
3097,
12670,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extend_or_shorten_widget_width() {
let mut app = App::new(Config::default());
assert_eq!(
app.extend_or_shorten_widget_width(Key::Char('>')).unwrap(),
EventState::Consumed
);
assert_eq!(app.left_main_chunk_percentage, 20);
app.left... | rust_cleaned_test_functions.jsonl/112402 | {
"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,
70265,
8734,
16673,
268,
13585,
7927,
368,
341,
286,
1077,
5206,
906,
284,
1845,
486,
931,
33687,
486,
2258,
1423,
286,
2060,
10714,
33673,
310,
906,
15831,
8734,
16673,
268,
13585,
7927,
21358,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type_parameter() {
check(
"T:Int",
type_parameter,
TypeParam {
name: TokenSyntax::from("T"),
type_constraint: Some(TypeConstraintSyntax {
sep: TokenSyntax::from(":"),
constraint: T... | rust_cleaned_test_functions.jsonl/129308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
24899,
368,
341,
286,
1779,
1006,
310,
330,
51,
43979,
756,
310,
943,
24899,
345,
310,
3990,
2001,
341,
394,
829,
25,
9660,
33890,
486,
1499,
445,
51,
4461,
394,
943,
46973,
25,
4329,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_escaping() {
let template = compile("{ escapes }");
let context = context();
let template_registry = other_templates();
let formatter_registry = formatters();
let string = template
.render(&context, &template_registry, &formatter_registry... | rust_cleaned_test_functions.jsonl/2391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
42480,
368,
972,
286,
1077,
3811,
284,
19192,
13976,
65109,
335,
2815,
286,
1077,
2266,
284,
2266,
1647,
286,
1077,
3811,
50650,
284,
1008,
49526,
1647,
286,
1077,
24814,
50650,
284,
1352,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_matrix_transpose_generic() {
let matrix: [u8; 9] = [0, 1, 2, 3, 4, 5, 6, 7, 8];
let mut output_matrix: [u8; 9] = [0; 9];
let stride = 1;
transpose_generic(&matrix, &mut output_matrix, 3, 3, stride);
for y in 0..3 {
for x in 0..3 {
... | rust_cleaned_test_functions.jsonl/20803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10193,
7965,
2900,
41232,
368,
341,
286,
1077,
6172,
25,
508,
84,
23,
26,
220,
24,
60,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_eval_fun1() {
let source_code = "let apply = fun f -> fun x -> fun y -> if x < y then f x + y else f x * y in apply (fun x -> x + 1) 5 3;;";
let result = interpret(source_code, false, false);
assert_eq!(result, vec![ExprVal::I64(18)],);
} | rust_cleaned_test_functions.jsonl/41116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
28315,
16,
368,
341,
286,
1077,
2530,
4136,
284,
330,
1149,
3796,
284,
2464,
282,
1464,
2464,
856,
1464,
2464,
379,
1464,
421,
856,
366,
379,
1221,
282,
856,
488,
379,
770,
282,
856,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_code_fetch() {
let (_temp_dir, deno_dir) = test_setup();
let cwd = std::env::current_dir().unwrap();
let cwd_string = String::from(cwd.to_str().unwrap()) + "/";
// Test failure case.
let module_specifier = "hello.ts";
let containing_file = add_root!("/baddir/badfile.ts");
let r =... | rust_cleaned_test_functions.jsonl/18030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
11803,
368,
341,
220,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
220,
1077,
46938,
284,
1460,
486,
3160,
486,
3231,
4334,
1005,
15454,
543,
220,
1077,
46938,
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_create() {
new_test_ext().execute_with(|| {
assert_eq!(DigitalTwin::total(), None);
let sender = 1;
assert_ok!(DigitalTwin::create(Origin::signed(sender)));
assert_eq!(DigitalTwin::total(), Some(1));
assert_eq!(DigitalTwin::owne... | rust_cleaned_test_functions.jsonl/126433 | {
"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,
8657,
368,
341,
286,
501,
4452,
9927,
1005,
10257,
6615,
79453,
341,
310,
2060,
10714,
10297,
38112,
51,
7526,
486,
5035,
1507,
2240,
317,
310,
1077,
4646,
284,
220,
16,
280,
310,
2060,
19817,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple_anagrams() {
let inputs = [
"gallery",
"ballerina",
"regally",
"clergy",
"largely",
"leading",
];
let mut outputs: Vec<&str> = vec!["gallery", "regally", "largely"];
outputs.sort();
let mut result = anagram::anagrams_fo... | rust_cleaned_test_functions.jsonl/65509 | {
"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,
45233,
12008,
68772,
368,
341,
262,
1077,
11127,
284,
2278,
286,
330,
26205,
756,
286,
330,
3959,
261,
2210,
756,
286,
330,
1580,
745,
756,
286,
330,
564,
41943,
756,
286,
330,
26897,
974,
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_fail_unfinished_string() {
let src_data = b"(test) \"abc";
assert!(yass_parser::parse(yass_parser::ParserLimits::unlimited(), src_data).is_err());
} | rust_cleaned_test_functions.jsonl/126501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
4907,
12129,
3904,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
8,
7245,
13683,
876,
262,
2060,
10297,
88,
395,
18517,
486,
6400,
7021,
395,
18517,
486,
6570,
94588,
486,
359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_none_or_up_to_42_large() {
let occurence: Occurences<u32> = Occurences::NoneOrUpTo(Some(42));
occurence.check_count(43).unwrap();
} | rust_cleaned_test_functions.jsonl/4445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
8734,
8237,
2346,
62,
19,
17,
45228,
368,
341,
286,
1077,
2983,
86937,
25,
19927,
552,
98162,
34837,
18,
17,
29,
284,
19927,
552,
98162,
486,
4064,
2195,
2324,
1249,
65405,
7,
19,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_percent_rank() -> Result<()> {
let r = percent_rank("arr".into());
// empty case
let expected = vec![0.0; 0];
test_f64_result(&r, vec![0; 0], 0..0, vec![0..0; 0], expected)?;
// singleton case
let expected = vec![0.0];
test_f64_result(&r,... | rust_cleaned_test_functions.jsonl/129707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29883,
20417,
368,
1464,
5714,
71698,
341,
286,
1077,
435,
284,
3266,
20417,
445,
1118,
3263,
18122,
5231,
286,
442,
4287,
1142,
198,
286,
1077,
3601,
284,
7486,
20703,
15,
13,
15,
26,
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... | 5 |
#[test]
fn test_simple_operator_eq_plaintext_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let query = Operator::Eq(
TagName::PlainTagName(name1.clone()),
TargetValue::Unencrypted(value1.clone())
);
let json = que... | rust_cleaned_test_functions.jsonl/11876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
40594,
10714,
6317,
1641,
427,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
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 |
#[test]
fn test_iterate_into_string() {
let words = vec!["hello", " ", "world"];
let capitalized_words = format!("{} {}", capitalize_first(words[0]), capitalize_first(words[2]));
assert_eq!(capitalized_words, "Hello World");
} | rust_cleaned_test_functions.jsonl/48522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
45514,
3904,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
3670,
330,
14615,
6332,
286,
1077,
97321,
18981,
284,
3561,
17223,
6257,
24689,
52725,
12978,
36289,
58,
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 |
#[test]
fn test_cp_localize_to_target() {
assert!(
localize_to_target(
Path::new("a/source/"),
Path::new("a/source/c.txt"),
Path::new("target/")
)
.unwrap()
== Path::new("target/c.txt")
);
} | rust_cleaned_test_functions.jsonl/57419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39811,
13564,
551,
2346,
11123,
368,
341,
262,
2060,
33673,
286,
94416,
2346,
11123,
1006,
310,
7933,
486,
931,
445,
64,
54373,
14,
4461,
310,
7933,
486,
931,
445,
64,
54373,
2899,
3909,
4461,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_option_list_get() {
// Regression test for #798
let gil = Python::acquire_gil();
let py = gil.python();
let list = PyCell::new(
py,
OptionList {
items: vec![Some(1), None],
},
)
.unwrap();
py_assert!(py, list, "list[0] == 1");
... | rust_cleaned_test_functions.jsonl/46923 | {
"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,
9672,
2019,
3062,
368,
341,
262,
442,
47470,
1273,
369,
671,
22,
24,
23,
198,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
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_environment_tag_is_moved() {
let mut event = Annotated::new(Event {
tags: Annotated::new(Tags(PairList(vec![Annotated::new(TagEntry(
Annotated::new("environment".to_string()),
Annotated::new("despacito".to_string()),
))]))),
..Event::default()
... | rust_cleaned_test_functions.jsonl/14087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51774,
9372,
6892,
717,
4941,
368,
341,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
341,
286,
9492,
25,
1527,
87029,
486,
931,
4140,
2032,
5304,
1310,
852,
25592,
20703,
2082,
87029,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_blockstore_from_root() {
let GenesisConfigInfo {
mut genesis_config, ..
} = create_genesis_config(123);
let ticks_per_slot = 1;
genesis_config.ticks_per_slot = ticks_per_slot;
let (ledger_path, blockhash) = create_new_tmp_ledger_auto_d... | rust_cleaned_test_functions.jsonl/46819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
7113,
4314,
5673,
12993,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
11,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
17,
18,
626,
286,
1077,
29957,
567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_memory_export() {
let wasm: Vec<u8> = vec![
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x05, 0x03, 0x01, 0x00, 0x00, 0x07,
0x0a, 0x01, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x02, 0x00,
];
let mut checker = EcicChecker::default(&wasm);
... | rust_cleaned_test_functions.jsonl/10744 | {
"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,
19195,
27114,
368,
341,
286,
1077,
98263,
25,
11312,
34837,
23,
29,
284,
7486,
90515,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
22,
18,
11,
220,
15,
87,
21,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str() {
assert_eq!(
r#"gene_id "g0";"#.parse(),
Ok(Attributes::from(vec![Entry::new("gene_id", "g0")]))
);
assert_eq!(
r#"gene_id "g0"; transcript_id "t0";"#.parse(),
Ok(Attributes::from(vec![
Entry::ne... | rust_cleaned_test_functions.jsonl/83479 | {
"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,
5673,
2895,
368,
341,
286,
2060,
10714,
33673,
310,
435,
55543,
42371,
842,
330,
70,
15,
5123,
57676,
13,
6400,
3148,
310,
7622,
7,
10516,
486,
1499,
25592,
20703,
5874,
486,
931,
445,
42371,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_search_guild_members() {
let route = Route::SearchGuildMembers {
guild_id: GUILD_ID,
limit: Some(99),
query: "foo bar",
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/members/searc... | rust_cleaned_test_functions.jsonl/119976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
1889,
1498,
30397,
368,
341,
286,
1077,
6021,
284,
9572,
486,
5890,
72574,
24371,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
3930,
25,
4329,
7,
24,
24,
1326,
310,
3239,
25,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delay_first_test_case() {
let first_line = "R75,D30,R83,U83,L12,D49,R71,U7,L72";
let second_line = "U62,R66,U55,R34,D71,R55,D58,R83";
assert_eq!(610, get_minimum_signal_delay_intersection(first_line, second_line));
} | rust_cleaned_test_functions.jsonl/45005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22198,
12978,
4452,
19096,
368,
341,
286,
1077,
1156,
6528,
284,
330,
49,
22,
20,
27266,
18,
15,
23508,
23,
18,
50481,
23,
18,
30114,
16,
17,
27266,
19,
24,
23508,
22,
16,
50481,
22,
30114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_either() {
let req = TestRequest::default().finish();
let mut cfg: EitherConfig<Query<Info>, Query<OtherInfo>, _> = EitherConfig::default();
assert!(Either::<Query<Info>, Query<OtherInfo>>::from_request(&req, &cfg).poll().is_err());
let req = TestRequest::defaul... | rust_cleaned_test_functions.jsonl/46184 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 825
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
2485,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
2258,
1005,
30150,
543,
286,
1077,
5206,
13286,
25,
20988,
2648,
27,
2859,
27,
1731,
8066,
11361,
27,
11409,
1731,
8066,
716,
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... | 5 |
#[test]
fn test_ord() {
let body1 = ReportBody::try_from(&REPORT_BODY_SRC).expect("Could not read report");
let mut body2 = body1.clone();
let orig_value = body2.0.cpu_svn.svn[0];
body2.0.cpu_svn.svn[0] = 255;
assert!(body1 < body2);
body2.0.cpu_svn.svn[0] = orig... | rust_cleaned_test_functions.jsonl/102457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67324,
368,
341,
286,
1077,
2487,
16,
284,
8259,
5444,
486,
1539,
5673,
2099,
78131,
44411,
29409,
568,
17119,
445,
12895,
537,
1349,
1895,
797,
286,
1077,
5206,
2487,
17,
284,
2487,
16,
15997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accounts_unsquashed() {
let key = Pubkey::default();
let paths = get_tmp_accounts_path!();
let db0 = AccountsDB::new(0, &paths.paths);
let account0 = Account::new(1, 0, &key);
db0.store(0, &key, &account0);
db0.add_fork(1, Some(0));
... | rust_cleaned_test_functions.jsonl/77666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
4907,
97407,
13571,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
2258,
1428,
1789,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
2927,
15,
284,
40655,
3506,
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_random_wallet_no_entropy_testnet() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let mut jscontext = JavaScript::new(format!("{}/xpring.js", out_dir))?;
let wallet = generate_random(&mut jscontext, None, true)?;
assert_eq!(wallet.mnemonic.is_empty(), false);
... | rust_cleaned_test_functions.jsonl/118727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
62308,
6536,
50374,
4452,
4711,
368,
341,
286,
1077,
700,
4334,
284,
1460,
486,
3160,
486,
947,
445,
3656,
8291,
1827,
15454,
543,
286,
1077,
5206,
6994,
2147,
284,
12914,
486,
931,
20698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_skipmap_iterator_prev() {
let skm = make_skipmap();
let mut iter = skm.iter();
iter.next();
assert!(iter.valid());
iter.prev();
assert!(!iter.valid());
iter.seek(&"abc".as_bytes());
iter.prev();
assert_eq!(
curr... | rust_cleaned_test_functions.jsonl/89160 | {
"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,
44830,
2186,
13491,
25566,
368,
341,
286,
1077,
1901,
76,
284,
1281,
44830,
2186,
543,
286,
1077,
5206,
5367,
284,
1901,
76,
19471,
1428,
286,
5367,
4529,
543,
286,
2060,
10297,
2015,
20586,
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_get_default_bundle_filename() {
assert_eq!(get_default_bundle_filename("blah.ts"), "blah.bundle.js");
assert_eq!(
get_default_bundle_filename("http://example.com/blah.ts"),
"blah.bundle.js"
);
assert_eq!(get_default_bundle_filename("blah.js"), "blah.bundle.js");
assert_eq!(
... | rust_cleaned_test_functions.jsonl/112829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9993,
60986,
13323,
368,
341,
220,
2060,
10714,
10297,
455,
9993,
60986,
13323,
445,
70614,
21288,
3975,
330,
70614,
51085,
2857,
797,
220,
2060,
10714,
33673,
262,
633,
9993,
60986,
13323,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip_bank_to_and_from_full_snapshot_simple() {
solana_logger::setup();
let genesis_config = GenesisConfig::default();
let original_bank = Bank::new_for_tests(&genesis_config);
while !original_bank.is_complete() {
original_bank.register_tick(&Hash... | rust_cleaned_test_functions.jsonl/67614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 762
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
35733,
2346,
8378,
5673,
16372,
53265,
30015,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
59366,
5332,
284,
40788,
2648,
486,
2258,
543,
286,
1077,
4024,
35733,
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_scalar_matrix_multiplication() {
let matrix1x3 = Matrix1x3::new(1_i32, 2_i32, 3_i32);
let scalar = 13_i32;
let expected = Matrix1x3::new(13_i32, 26_i32, 39_i32);
let result = scalar * matrix1x3;
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/129169 | {
"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,
41652,
10193,
91802,
1693,
368,
341,
286,
1077,
6172,
16,
87,
18,
284,
11631,
16,
87,
18,
486,
931,
7,
16,
5318,
18,
17,
11,
220,
17,
5318,
18,
17,
11,
220,
18,
5318,
18,
17,
317,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_start() {
let subcommand = Subcommand::Modify {
filter: Filter {
conditions: vec![Condition::IdList(vec![TaskId::WorkingSetId(123)])],
},
modification: Modification {
active: Some(true),
..Default::defaul... | rust_cleaned_test_functions.jsonl/84279 | {
"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,
4906,
368,
341,
286,
1077,
1186,
5631,
284,
3719,
5631,
486,
44427,
341,
310,
4051,
25,
12339,
341,
394,
4682,
25,
7486,
20703,
10547,
486,
764,
852,
25592,
20703,
6262,
764,
486,
33978,
1649,
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_join_lines_normal_comments() {
check_join_lines(
r"
fn foo() {
// Hello<|>
// world!
}
",
r"
fn foo() {
// Hello<|> world!
}
",
);
} | rust_cleaned_test_functions.jsonl/79942 | {
"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,
31017,
18323,
13973,
30359,
368,
341,
286,
1779,
31017,
18323,
1006,
310,
435,
698,
8822,
15229,
368,
341,
262,
442,
21927,
27,
91,
397,
262,
442,
1879,
4894,
532,
756,
310,
435,
698,
8822,
1522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_remove_active_device() {
let mut d = TestDevices::default();
let core_a = MockDeviceId(1);
let core_b = MockDeviceId(2);
let a = d.add_active_device(core_a, |id| id + 10).expect("can add device");
let b = d.add_active_device(core_b, |id| id + 20).expec... | rust_cleaned_test_functions.jsonl/18160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 918
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
18193,
12930,
9204,
368,
341,
286,
1077,
5206,
294,
284,
3393,
40835,
486,
2258,
543,
286,
1077,
6200,
4306,
284,
14563,
6985,
764,
7,
16,
317,
286,
1077,
6200,
880,
284,
14563,
6985,
764,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_describe_portal() {
const EXPECTED: &[u8] = b"D\0\0\0\x0EPsqlx_p_5\0";
let mut buf = Vec::new();
let m = Describe::Portal(5);
m.encode(&mut buf);
assert_eq!(buf, EXPECTED);
} | rust_cleaned_test_functions.jsonl/29087 | {
"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,
11224,
15768,
3114,
97077,
368,
341,
262,
733,
8921,
1479,
25,
44590,
84,
23,
60,
284,
293,
61428,
59,
15,
59,
15,
59,
15,
3462,
15,
9197,
3544,
87,
620,
62,
20,
59,
15,
3302,
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_to_float_str() {
let val: ScalarCow<'_> = "foobar".into();
assert_eq!(val.to_float(), None);
let val: ScalarCow<'_> = "42.34".into();
assert_eq!(val.to_float(), Some(42.34));
let val: ScalarCow<'_> = "42".into();
assert_eq!(val.to_float(), Some(4... | rust_cleaned_test_functions.jsonl/108134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
17586,
2895,
368,
341,
286,
1077,
1044,
25,
35176,
89915,
18291,
98377,
284,
330,
50267,
3263,
18122,
543,
286,
2060,
10714,
10297,
831,
2389,
17586,
1507,
2240,
626,
286,
1077,
1044,
25,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_euler() {
let e = euler::e_approximation(30);
assert!((std::f32::consts::E - e as f32).abs() < 1e-1);
let e = euler::random_e(1000);
assert!((std::f32::consts::E - e as f32).abs() < 1e-1);
} | rust_cleaned_test_functions.jsonl/130161 | {
"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,
2204,
8479,
368,
341,
262,
1077,
384,
284,
90970,
486,
68,
90425,
5465,
7,
18,
15,
317,
262,
2060,
0,
1188,
1834,
486,
69,
18,
17,
486,
95773,
486,
36,
481,
384,
438,
282,
18,
17,
568,
343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_Elf_from_rel_hdr() {
let elf: Result<Elf<'_, LittleEndian, Elf32>, ElfError> =
Elf::try_from(&ELF32_REL_ELF_HDR[0..]);
assert!(elf.is_ok());
} | rust_cleaned_test_functions.jsonl/119466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2089,
11008,
5673,
13557,
28238,
368,
341,
262,
1077,
40745,
25,
5714,
27,
75832,
18291,
6878,
14671,
43231,
11,
43600,
18,
17,
8066,
43600,
1454,
29,
4035,
286,
43600,
486,
1539,
5673,
2099,
2749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_utf8_memo() {
let program_id = Pubkey::new(&[0; 32]);
let string = b"letters and such";
assert_eq!(Ok(()), process_instruction(&program_id, &[], string));
let emoji = "🐆".as_bytes();
let bytes = [0xF0, 0x9F, 0x90, 0x86];
assert_eq!(emoji, bytes)... | rust_cleaned_test_functions.jsonl/26376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39453,
23,
717,
6726,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
931,
2099,
58,
15,
26,
220,
18,
17,
10149,
286,
1077,
914,
284,
293,
1,
21053,
323,
1741,
876,
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... | 1 |
#[test]
fn test_tx_out_from_tx_out_stored_with_memo() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let source = tx::TxOut {
amount: Amount::new(1u64 << 13, &RistrettoPublic::from_random(&mut rng)).unwrap(),
target_key: RistrettoPublic::from_random(&mut rng)... | rust_cleaned_test_functions.jsonl/55003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
6068,
5673,
17805,
6068,
1261,
3018,
6615,
717,
6726,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_class_with_methods_without_constructor() {
let langs = [ForeignLang::Java, ForeignLang::Cpp];
parse_code(
"class_with_methods_without_constructor",
r#"
foreigner_class!(class Foo {
});
"#,
&langs,
);
parse_code(
"class_with_methods_without_construc... | rust_cleaned_test_functions.jsonl/71605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4790,
6615,
36084,
39904,
66210,
368,
341,
262,
1077,
63952,
284,
508,
58632,
26223,
486,
15041,
11,
19078,
26223,
486,
9890,
935,
262,
4715,
4136,
1006,
286,
330,
1040,
6615,
36084,
39904,
66210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str_to_version() {
let ver = "0.1.2";
let res = ver.to_version().unwrap();
assert_eq!(res.to_string(), ver);
assert!("foo".to_version().is_err());
assert!("1.0.0.0".to_version().is_err());
} | rust_cleaned_test_functions.jsonl/46667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
2346,
9438,
368,
341,
286,
1077,
2739,
284,
330,
15,
13,
16,
13,
17,
876,
286,
1077,
592,
284,
2739,
2389,
9438,
1005,
15454,
543,
286,
2060,
10714,
10297,
416,
2389,
3904,
1507,
2739,
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_verify_transactions_load_duplicate_account() {
let GenesisConfigInfo { genesis_config, .. } =
create_genesis_config_with_leader(42, &solana_sdk::pubkey::new_rand(), 42);
let bank = Bank::new_for_tests(&genesis_config);
let mut rng = rand::thread_rng();
... | rust_cleaned_test_functions.jsonl/53917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
68182,
12411,
70434,
13500,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
4035,
310,
1855,
16322,
13774,
5332,
6615,
79991,
7,
19,
17,
11,
609,
38198,
3362,
61783... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_setup_irqchip() {
let kvm = KvmContext::new().unwrap();
let mut vm = Vm::new(kvm.fd()).expect("Cannot create new vm");
let vcpu_count = 1;
let _vcpu = Vcpu::new_aarch64(1, vm.fd(), super::super::TimestampUs::default()).unwrap();
vm.setup_irqchip(vcpu_cou... | rust_cleaned_test_functions.jsonl/1916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
22623,
29662,
368,
341,
286,
1077,
94748,
284,
730,
7338,
1972,
486,
931,
1005,
15454,
1428,
286,
1077,
5206,
10995,
284,
647,
76,
486,
931,
5969,
7338,
58339,
6011,
17119,
445,
17444,
1855... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cstr_internal_null_end() {
assert_de_tokens_error::<Box<CStr>>(
&[Token::Bytes(b"ac\0")],
"nul byte found in provided data at position: 2",
);
} | rust_cleaned_test_functions.jsonl/129555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
495,
23472,
15162,
6213,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
1611,
20373,
2580,
97238,
286,
44590,
3323,
486,
7078,
1883,
1,
580,
59,
15,
899,
1259,
286,
330,
77,
360,
4922,
1730... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_intersect() {
assert!(span(5, 7).intersect(&span(1, 6)));
assert!(!span(5, 7).intersect(&span(1, 5)));
assert!(span(5, 7).intersect(&span(5, 7)));
assert!(span(5, 7).intersect(&span(4, 7)));
assert!(!span(5, 7).intersect(&span(7, 9)));
assert!(!span(5, 7).intersect(&span(... | rust_cleaned_test_functions.jsonl/104880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
368,
341,
262,
2060,
10297,
1480,
7,
20,
11,
220,
22,
568,
96018,
2099,
1480,
7,
16,
11,
220,
21,
4945,
262,
2060,
0,
3471,
1480,
7,
20,
11,
220,
22,
568,
96018,
2099,
1480,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_token_account_mint() {
let mint_pubkey = SplTokenPubkey::new(&[2; 32]);
let mut account_data = vec![0; Account::get_packed_len()];
Account::unpack_unchecked_mut(&mut account_data, &mut |account: &mut Account| {
account.mint = mint_pubkey;
Ok(()... | rust_cleaned_test_functions.jsonl/67695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
6458,
13500,
717,
396,
368,
341,
286,
1077,
28337,
34014,
792,
284,
51198,
3323,
29162,
792,
486,
931,
2099,
58,
17,
26,
220,
18,
17,
2558,
286,
1077,
5206,
2692,
1769,
284,
7486,
20703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_config() {
init_default_config();
let c =
parse_args_from(&["audioserve", "--config", "test_data/sample-config.yaml"]).unwrap();
assert_eq!("neco", c.ssl.as_ref().unwrap().key_password);
assert_eq!(Some("asecret".into()), c.shared_secret);
... | rust_cleaned_test_functions.jsonl/51094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5332,
368,
341,
286,
2930,
9993,
5332,
543,
286,
1077,
272,
4035,
310,
4715,
8384,
5673,
2099,
1183,
7880,
3530,
5852,
497,
14482,
1676,
497,
330,
1944,
1769,
69851,
25130,
33406,
45014,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intopy_roundtrip() {
Python::with_gil(|py| {
fn test_roundtrip<T: IntoPy<PyObject> + AsRef<OsStr> + Debug + Clone>(
py: Python,
obj: T,
) {
let pyobject = obj.clone().into_py(py);
let pystring: &PyStr... | rust_cleaned_test_functions.jsonl/21882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
1266,
29896,
32981,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
5168,
1273,
29896,
32981,
3125,
25,
31645,
13828,
27,
53376,
29,
488,
1634,
3945,
27,
28867,
2580,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vecarray() {
let mut array = ArrayVecFormatter::<16>::new();
array.message_start().unwrap();
// First unit
array
.response_unit()
.unwrap()
.data(&b"potato"[..])
.data(0u8)
.finish()
.unwrap();
// Second unit
array.response_... | rust_cleaned_test_functions.jsonl/95661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
1653,
368,
341,
262,
1077,
5206,
1334,
284,
2910,
10050,
14183,
27638,
16,
21,
6831,
931,
543,
262,
1334,
6698,
4906,
1005,
15454,
543,
262,
442,
5512,
4982,
198,
262,
1334,
198,
286,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seek_with_bad_delta_returns_error() {
let (_ramdisk, remote_block_device) = make_ramdisk();
let mut cache = Cache::new(remote_block_device).expect("Cache::new failed");
cache.seek(SeekFrom::End(-(RAMDISK_SIZE as i64) - 1)).expect_err("seek suceeded");
cache.seek(S... | rust_cleaned_test_functions.jsonl/96364 | {
"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,
74473,
6615,
34199,
26710,
58900,
4096,
368,
341,
286,
1077,
5453,
2396,
30496,
11,
8699,
7113,
9204,
8,
284,
1281,
62124,
30496,
543,
286,
1077,
5206,
6500,
284,
19479,
486,
931,
61381,
7113,
920... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fmt_writer() {
use crate::take_chunks;
use std::string::ToString;
let file = ::core::file!();
print!("first");
assert_eq!(take_chunks(), &["first"]);
print!("first {}\nthird\n", "second");
assert_eq!(take_chunks(), &["first ", "second", "... | rust_cleaned_test_functions.jsonl/2118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
28908,
368,
341,
286,
990,
17717,
486,
22769,
65470,
280,
286,
990,
1460,
486,
917,
486,
5870,
401,
286,
1077,
1034,
284,
3504,
2153,
486,
1192,
0,
1428,
286,
1173,
17223,
3896,
797,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pcapng_iter_section_interfaces_be() {
let (_, section) = parse_section(TEST001_BE).expect("could not parse section");
assert_eq!(section.iter_interfaces().count(), 1);
for (idx, interface) in section.iter_interfaces().enumerate() {
println!("found interface {}", idx);
... | rust_cleaned_test_functions.jsonl/132437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
11346,
968,
11723,
16221,
72960,
21263,
368,
341,
262,
1077,
39464,
3772,
8,
284,
4715,
16221,
50320,
15,
15,
16,
27168,
568,
17119,
445,
28077,
537,
4715,
3772,
797,
262,
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... | 2 |
#[test]
fn test_bool_query() {
let query = QueryRequest::new().with_query(Query::bool_query(
vec![Query::term("fieldname", "fieldvalue")],
vec![],
vec![],
vec![],
None,
));
let json = serde_json::to_string(&query).unwrap();
assert_that(&json.as_str()).is_equal_to(r#"{"query":{"bool... | rust_cleaned_test_functions.jsonl/35089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
5738,
368,
341,
220,
1077,
3239,
284,
11361,
1900,
486,
931,
1005,
4197,
5738,
59036,
486,
2641,
5738,
1006,
262,
7486,
20703,
2859,
486,
4991,
445,
86098,
497,
330,
2566,
957,
899,
1259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_domain_search() {
use super::testing::domain_search_test;
let io_loop = Runtime::new().expect("failed to create tokio runtime io_loop");
let handle = io_loop.handle().clone();
domain_search_test::<Runtime, TokioRuntime>(io_loop, handle);
} | rust_cleaned_test_functions.jsonl/121536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
10716,
368,
341,
286,
990,
2256,
486,
8840,
486,
12204,
10716,
4452,
280,
286,
1077,
6399,
17198,
284,
10954,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
9628,
815,
15592,
6399,
17198,
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_dft() -> Result<(), Box<dyn Error>> {
// correct for different k_B in old code
let KB_old = 1.38064852e-23 * JOULE / KELVIN;
let NAV_old = 6.022140857e23 / MOL;
let parameters = GcPcSaftFunctionalParameters::from_json_segments(
&["propane"],
"parameters/gc_substa... | rust_cleaned_test_functions.jsonl/61406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
723,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
442,
4396,
369,
2155,
595,
1668,
304,
2310,
2038,
198,
262,
1077,
25016,
21108,
284,
220,
16,
13,
18,
23,
15,
21,
19,
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... | 5 |
#[test]
fn test_type_checker() -> Result<(), String> {
let src = r#"
let not = fn b =>
match b with
| true => false
| false => true in
let zero = 0 in
let x = 20 in
let pt = {x, y: 20} in
let get_x = ... | rust_cleaned_test_functions.jsonl/21666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 813
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
62715,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
2286,
284,
435,
2,
698,
310,
1077,
537,
284,
5168,
293,
6274,
310,
2432,
293,
448,
198,
394,
760,
830,
589,
895,
198,
394,
760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_uncles() {
let genesis = BlockBuilder::genesis();
let b1a = genesis.add_block();
let b2a = b1a.add_block();
let b3a = b2a.add_block();
let b4a = b3a.add_block();
let b5a = b4a.add_block();
let b1b = genesis.add_block_with_difficulty(9);
let b2b = b1a.add_block_with_difficul... | rust_cleaned_test_functions.jsonl/39252 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
76576,
642,
368,
341,
197,
10217,
59366,
284,
8362,
3297,
486,
77894,
543,
197,
10217,
293,
16,
64,
284,
59366,
1364,
7113,
543,
197,
10217,
293,
17,
64,
284,
293,
16,
64,
1364,
7113,
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_parse_attribute_strp_32() {
let buf = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x99, 0x99];
let unit = test_parse_attribute_unit(4, Format::Dwarf32, LittleEndian);
let form = constants::DW_FORM_strp;
let value = AttributeValue::DebugStrRef(DebugStrOffset(0... | rust_cleaned_test_functions.jsonl/102043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16791,
2895,
79,
62,
18,
17,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.