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_matches() {
let mut p = Polar::new();
qnull(&mut p, "1 matches 2");
qeval(&mut p, "1 matches 1");
// This doesn't fail because `y` is parsed as an unknown specializer
qeval(&mut p, "x = {foo: 1} and x matches {foo: 1}");
qeval(&mut p, "x = {foo: 1, bar: 2} and x matc... | rust_cleaned_test_functions.jsonl/97649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38344,
368,
341,
262,
1077,
5206,
281,
284,
55896,
486,
931,
543,
262,
2804,
2921,
2099,
6984,
281,
11,
330,
16,
9071,
220,
17,
797,
262,
2804,
14170,
2099,
6984,
281,
11,
330,
16,
9071,
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_sum_axes_to_desire() {
assert_eq!(sum_axes_to_desire(&[2, 3, 4], &[2, 1, 4]), vec![1]);
} | rust_cleaned_test_functions.jsonl/83797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
58394,
2346,
15768,
554,
368,
341,
262,
2060,
10714,
10297,
1242,
58394,
2346,
15768,
554,
2099,
58,
17,
11,
220,
18,
11,
220,
19,
1125,
44590,
17,
11,
220,
16,
11,
220,
19,
9719,
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 |
#[test]
fn test_ppoll() {
let (r1, mut w1) = crate::pipe().unwrap();
let (r2, mut w2) = crate::pipe().unwrap();
let mut fds = [
PollFd {
fd: r1.as_raw_fd(),
events: Events::IN,
revents: Events::empty(),
},
... | rust_cleaned_test_functions.jsonl/21448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 915
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31600,
965,
368,
341,
286,
1077,
320,
81,
16,
11,
5206,
289,
16,
8,
284,
17717,
486,
13768,
1005,
15454,
543,
286,
1077,
320,
81,
17,
11,
5206,
289,
17,
8,
284,
17717,
486,
13768,
1005,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_ended_map() {
let xs = [1, 2, 3, 4, 5, 6];
let mut it = xs.iter().map(|&x| x * -1);
assert_eq!(it.next(), Some(-1));
assert_eq!(it.next(), Some(-2));
assert_eq!(it.next_back(), Some(-6));
assert_eq!(it.next_back(), Some(-5));
assert_... | rust_cleaned_test_functions.jsonl/1021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
62,
2883,
5376,
368,
341,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
286,
1077,
5206,
432,
284,
11943,
19471,
1005,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_column_writer_compression_v1() {
let props = WriterProperties::builder()
.set_writer_version(WriterVersion::PARQUET_1_0)
.set_compression(Compression::SNAPPY)
.build();
column_roundtrip_random::<Int32Type>(
"test_col_writer_rnd_8",
... | rust_cleaned_test_functions.jsonl/30540 | {
"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,
8744,
28908,
2965,
4011,
2273,
16,
368,
341,
286,
1077,
6914,
284,
29404,
7903,
486,
17850,
741,
310,
659,
746,
28908,
9438,
7,
6492,
5637,
486,
16567,
5757,
1348,
62,
16,
62,
15,
340,
310,
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_insert_rlu_and_ttl() {
let tx1 = Arc::new(tx!(MicroTari(100_000), fee: MicroTari(500), lock: 4000, inputs: 2, outputs: 1).0);
let tx2 = Arc::new(tx!(MicroTari(100_000), fee: MicroTari(300), lock: 3000, inputs: 2, outputs: 1).0);
let tx3 = Arc::new(tx!(MicroTari(100_000), ... | rust_cleaned_test_functions.jsonl/5503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
1710,
9835,
8378,
87157,
368,
341,
286,
1077,
9854,
16,
284,
19689,
486,
931,
27301,
10297,
34609,
51,
2780,
7,
16,
15,
15,
62,
15,
15,
15,
701,
11060,
25,
18157,
51,
2780,
7,
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... | 1 |
#[test]
fn test_deletion() {
let mut rb_tree = generate_rb_tree(6);
rb_tree.insert("a", "abv");
rb_tree.delete("a");
let studd = rb_tree.search("a");
assert!(studd.unwrap().1.is_none());
} | rust_cleaned_test_functions.jsonl/62002 | {
"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,
2259,
52625,
368,
341,
286,
1077,
5206,
18717,
11663,
284,
6923,
68544,
11663,
7,
21,
626,
286,
18717,
11663,
7030,
445,
64,
497,
330,
370,
85,
797,
286,
18717,
11663,
7440,
445,
64,
3071,
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_duration_num_days() {
assert_eq!(Duration::zero().num_days(), 0);
assert_eq!(Duration::days(1).num_days(), 1);
assert_eq!(Duration::days(-1).num_days(), -1);
assert_eq!(Duration::seconds(86399).num_days(), 0);
assert_eq!(Duration::seconds(86401).num_days()... | rust_cleaned_test_functions.jsonl/974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
4273,
28353,
368,
341,
286,
2060,
10714,
10297,
12945,
486,
14154,
1005,
2413,
28353,
1507,
220,
15,
317,
286,
2060,
10714,
10297,
12945,
486,
13778,
7,
16,
568,
2413,
28353,
1507,
220,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_twitch_live() {
Builder::new_current_thread().enable_all().build().unwrap().block_on(async move {
let u = TestUrl::new();
let b = qliveplayer_lib::streamfinder::twitch::Twitch::new();
println!(
"{:?}",
b.get_live(u.twitch_live_url.as_ref()).awa... | rust_cleaned_test_functions.jsonl/25596 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
5539,
55203,
368,
341,
262,
20626,
486,
931,
11080,
10814,
1005,
12552,
5705,
1005,
5834,
1005,
15454,
1005,
4574,
4470,
18285,
3271,
341,
286,
1077,
575,
284,
3393,
2864,
486,
931,
543,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contains_high_card() {
let mut cards = vec![];
cards.push(Card {
rank: Rank::Three,
suit: Suit::Diamonds,
});
cards.push(Card {
rank: Rank::Five,
suit: Suit::Clubs,
});
cards.push(Card {
r... | rust_cleaned_test_functions.jsonl/80723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
22680,
16888,
368,
341,
286,
1077,
5206,
7411,
284,
7486,
0,
15078,
286,
7411,
2552,
58645,
341,
310,
7077,
25,
19298,
486,
19641,
345,
310,
7781,
25,
32611,
486,
76510,
82,
345,
286,
162... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_color() {
assert_eq!(
KeyboardController::parse_color(String::from("red")),
Ok((0xff, 0x00, 0x00))
);
assert_eq!(
KeyboardController::parse_color(String::from("RED")),
Ok((0xff, 0x00, 0x00))
);
assert_e... | rust_cleaned_test_functions.jsonl/25332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6714,
368,
341,
286,
2060,
10714,
33673,
310,
25616,
2051,
486,
6400,
6714,
2242,
486,
1499,
445,
1151,
30154,
310,
7622,
1188,
15,
9020,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
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_pool_polis_ray() {
pool_actions::run_test(
"RDM.POLIS-RAY-V4",
vec![
utils::Swap {
protocol: "RDM",
from_token: "SOL",
to_token: "RAY",
amount: 0.222,
},
utils::Swap {
... | rust_cleaned_test_functions.jsonl/120674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15709,
47323,
285,
72690,
368,
341,
262,
7314,
25368,
486,
6108,
4452,
1006,
286,
330,
49,
8395,
1069,
1930,
1637,
10911,
3022,
19625,
19,
756,
286,
7486,
90515,
310,
12439,
486,
46179,
341,
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_detect_simple_anagram() {
let inputs = ["tan", "stand", "at"];
let outputs: Vec<&str> = vec!["tan"];
assert_eq!(anagram::anagrams_for("ant", &inputs), outputs);
} | rust_cleaned_test_functions.jsonl/65505 | {
"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,
56457,
30015,
12008,
5745,
368,
341,
262,
1077,
11127,
284,
4383,
52591,
497,
330,
2685,
497,
330,
266,
6332,
262,
1077,
16275,
25,
11312,
52244,
495,
29,
284,
7486,
0,
1183,
52591,
6332,
262,
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 |
#[test]
fn test_issuer_credential_create_succeeds() {
init!("true");
match issuer_credential_create(::credential_def::tests::create_cred_def_fake(),
"1".to_string(),
"8XFh8yBzrpJQmNyZzgoTqB".to_owned(),
... | rust_cleaned_test_functions.jsonl/104592 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
66817,
666,
30320,
8657,
643,
29264,
82,
368,
341,
286,
2930,
17223,
1866,
797,
286,
2432,
54835,
666,
30320,
8657,
38732,
66799,
7844,
486,
23841,
486,
3182,
73475,
7844,
56881,
3148,
6656,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_no_includes() {
let ctx = TestContext::new();
let cmx_path = ctx.new_include(
"some.cmx",
json!({
"program": {
"binary": "bin/hello_world"
}
}),
);
ctx.merge_includes(&cmx_path... | rust_cleaned_test_functions.jsonl/50691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
1243,
7396,
368,
341,
286,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
286,
1077,
9961,
87,
2638,
284,
5635,
4618,
37878,
1006,
310,
330,
14689,
520,
18085,
756,
310,
2951,
0,
2262,
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_deref() {
let start_addr = GuestAddress(0x0);
let guest_mem = GuestMemoryMmap::new(&[(start_addr, 0x400)]).unwrap();
let sample_buf = &[1, 2, 3, 4, 5];
assert_eq!(guest_mem.write(sample_buf, start_addr).unwrap(), 5);
let slice = guest_mem
.fin... | rust_cleaned_test_functions.jsonl/72072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
43970,
368,
341,
286,
1077,
1191,
7387,
284,
26215,
4286,
7,
15,
87,
15,
317,
286,
1077,
8640,
12976,
284,
26215,
10642,
44,
2186,
486,
931,
2099,
9697,
2468,
7387,
11,
220,
15,
87,
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_param_spec_wrong_parameters() {
let spec = "input in(a: Int8, b: Int8): Int8\noutput x := in(1)";
assert_eq!(1, number_of_naming_errors(spec));
} | rust_cleaned_test_functions.jsonl/74823 | {
"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,
4090,
13594,
75198,
18263,
368,
341,
286,
1077,
1398,
284,
330,
1355,
304,
2877,
25,
1333,
23,
11,
293,
25,
1333,
23,
1648,
1333,
23,
1699,
3006,
856,
1669,
304,
7,
16,
24023,
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 |
#[test]
fn test_dh_from_der() {
let params = include_bytes!("../test/dhparams.pem");
let dh = Dh::params_from_pem(params).unwrap();
let der = dh.params_to_der().unwrap();
Dh::params_from_der(&der).unwrap();
} | rust_cleaned_test_functions.jsonl/46402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
71,
5673,
35345,
368,
341,
286,
1077,
3628,
284,
2924,
12524,
17223,
1244,
1944,
3446,
71,
3519,
49373,
797,
286,
1077,
34096,
284,
43227,
486,
3519,
5673,
620,
336,
8917,
568,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tweet_retrieval() {
let today = Utc::now();
let yesterday = today - chrono::Duration::days(1);
let tweets = vec![
Tweet {
id: "manual_tweet_1".to_owned(),
author_id: "author_1".to_owned(),
text: "this is a test".... | rust_cleaned_test_functions.jsonl/103852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75419,
1288,
8927,
831,
368,
341,
286,
1077,
3351,
284,
547,
10413,
486,
3328,
543,
286,
1077,
13671,
284,
3351,
481,
80372,
486,
12945,
486,
13778,
7,
16,
317,
286,
1077,
23150,
284,
7486,
9051... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fixed_schema() {
let schema = Schema::parse_str(r#"{"type": "fixed", "name": "test", "size": 16}"#).unwrap();
let expected = SchemaPiece::Fixed { size: 16usize };
assert_eq!(&expected, schema.top_node().inner);
} | rust_cleaned_test_functions.jsonl/2986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
25371,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
2601,
55543,
4913,
1313,
788,
330,
22021,
497,
330,
606,
788,
330,
1944,
497,
330,
2141,
788,
220,
16,
21,
9863,
2,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_member_with_invalid_block() {
let sender_id = sender_id();
// invalid block
let candidate_block = Block::new(hex::decode("00000020ed658cc40670cceda23bb0b614821fe6d48a41d107d19f3f3a5608ad3d483092b151160ab71133b428e1f62eaeb598ae858ff66017c99601f29088b7c64a481d6284e145d29... | rust_cleaned_test_functions.jsonl/99676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 604
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
19388,
6615,
31433,
7113,
368,
341,
286,
1077,
4646,
842,
284,
4646,
842,
543,
286,
442,
8318,
2504,
198,
286,
1077,
9144,
7113,
284,
8362,
486,
931,
44660,
486,
18196,
445,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accessing_elements() {
let array = [1,2,3,4,5];
let result = array[3];
assert!(result == 4);
} | rust_cleaned_test_functions.jsonl/129919 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12759,
287,
22801,
368,
341,
286,
1077,
1334,
284,
508,
16,
11,
17,
11,
18,
11,
19,
11,
20,
935,
286,
1077,
1102,
284,
1334,
58,
18,
935,
286,
2060,
10297,
1382,
621,
220,
19,
317,
262,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bufs_vec() {
let buf = &b"hello world"[..];
let b1: &[u8] = &mut [];
let b2: &[u8] = &mut [];
let mut dst = [IoSlice::new(b1), IoSlice::new(b2)];
assert_eq!(1, buf.chunks_vectored(&mut dst[..]));
} | rust_cleaned_test_functions.jsonl/65333 | {
"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,
10363,
82,
13251,
368,
341,
262,
1077,
6607,
284,
609,
65,
1,
14990,
1879,
36864,
496,
4821,
262,
1077,
293,
16,
25,
44590,
84,
23,
60,
284,
609,
6984,
5907,
262,
1077,
293,
17,
25,
44590,
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_leading_plus() {
assert_eq!("+127".parse::<u8>().ok(), Some(127));
assert_eq!("+9223372036854775807".parse::<i64>().ok(), Some(9223372036854775807));
} | rust_cleaned_test_functions.jsonl/108503 | {
"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,
11751,
2228,
28043,
368,
341,
262,
2060,
10714,
17223,
10,
16,
17,
22,
3263,
6400,
27638,
84,
23,
10483,
562,
1507,
4329,
7,
16,
17,
22,
1106,
262,
2060,
10714,
17223,
10,
24,
17,
17,
18,
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_bidir_evq() {
let primary = super::Queue::new();
let secondary = primary.secondary();
primary.emit_owned(1);
assert_eq!(secondary.peek(), &[1]);
primary.emit_owned(2);
primary.emit_owned(3);
assert_eq!(secondary.peek(), &[2, 3]);
... | rust_cleaned_test_functions.jsonl/2485 | {
"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,
62509,
404,
43713,
80,
368,
341,
286,
1077,
6028,
284,
2256,
486,
7554,
486,
931,
543,
286,
1077,
14246,
284,
6028,
69056,
1428,
286,
6028,
16812,
51973,
7,
16,
317,
286,
2060,
10714,
10297,
186... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_refresh() {
let url = &mockito::server_url();
let _m = test_mocks::mock_auth();
let _m2 = test_mocks::mock_refresh();
let agent = ureq::agent();
let endpoint = &format!("{}/token", url);
let response = authenticate(agent.clone(), endpoint, "admin"... | rust_cleaned_test_functions.jsonl/67299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42076,
368,
341,
286,
1077,
2515,
284,
609,
16712,
6357,
486,
4030,
2903,
543,
286,
1077,
716,
76,
284,
1273,
717,
25183,
486,
16712,
14014,
543,
286,
1077,
716,
76,
17,
284,
1273,
717,
25183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cached_return_flag_result() {
let r = cached_return_flag_result(1).unwrap();
assert!(!r.was_cached);
assert_eq!(*r, 1);
let r = cached_return_flag_result(1).unwrap();
assert!(r.was_cached);
// derefs to inner
assert_eq!(*r, 1);
assert!(r.is_positive());
let r... | rust_cleaned_test_functions.jsonl/13136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64369,
12511,
10933,
5287,
368,
341,
262,
1077,
435,
284,
20579,
12511,
10933,
5287,
7,
16,
568,
15454,
543,
262,
2060,
0,
3471,
81,
1418,
300,
64369,
317,
262,
2060,
10714,
0,
4071,
81,
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... | 1 |
#[test]
fn test_rule_many_conditions_bpf_output() {
// Builds rule.
let mut conditions = Vec::with_capacity(43);
for _ in 0..42 {
conditions.push(Cond::new(0, ArgLen::QWORD, MaskedEq(0), 0).unwrap());
}
conditions.push(Cond::new(0, ArgLen::QWORD, Eq, 0).unwrap... | rust_cleaned_test_functions.jsonl/17476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1005
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21124,
22101,
54099,
880,
15897,
7645,
368,
341,
286,
442,
67118,
5912,
624,
286,
1077,
5206,
4682,
284,
11312,
486,
4197,
35603,
7,
19,
18,
317,
286,
369,
716,
304,
220,
15,
496,
19,
17,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_take() {
use crate::Provider;
let key = Key::<Provider>::random().expect(line_error!());
let mut bucket = Bucket::<Provider>::new();
let id1 = RecordId::random::<Provider>().expect(line_error!());
let id2 = RecordId::random::<Provider>().expect(line_erro... | rust_cleaned_test_functions.jsonl/95953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
368,
341,
286,
990,
17717,
486,
5179,
401,
286,
1077,
1376,
284,
5309,
27638,
5179,
6831,
11463,
1005,
17119,
8797,
4096,
0,
5231,
286,
1077,
5206,
15621,
284,
47768,
27638,
5179,
6831,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_str_truncate() {
let mut s = String::from_str("12345");
s.truncate(5);
assert_eq!(s, "12345");
s.truncate(3);
assert_eq!(s, "123");
s.truncate(0);
assert_eq!(s, "");
let mut s = String::from_str("12345");
let p = s.as_ptr()... | rust_cleaned_test_functions.jsonl/54 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
3547,
26900,
368,
341,
286,
1077,
5206,
274,
284,
923,
486,
1499,
2895,
445,
16,
17,
18,
19,
20,
797,
286,
274,
5427,
26900,
7,
20,
317,
286,
2060,
10714,
10297,
82,
11,
330,
16,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_version() {
let content = r###"
[package]
name = "tester"
version = "0.1.0-rc.0"
"###;
let new = set_version(String::from(content), "1.2.3-rc.4").unwrap();
let expected = content.replace("0.1.0-rc.0", "1.2.3-rc.4");
assert_eq!... | rust_cleaned_test_functions.jsonl/68182 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
9438,
368,
341,
286,
1077,
2213,
284,
435,
14374,
698,
286,
508,
1722,
921,
286,
829,
284,
330,
73358,
698,
286,
2319,
284,
330,
15,
13,
16,
13,
15,
12,
1287,
13,
15,
698,
286,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_error_types() -> Result<(), Error> {
combined_keys_gen!(sender_combined_key, receiver_combined_key);
let shared_key = SharedKey::generate();
#[derive(PartialEq, Debug, Serialize, Deserialize)]
struct Resource {
name: String,
#[serde(with = "as_json_strin... | rust_cleaned_test_functions.jsonl/31595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 994
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
4096,
9763,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
10856,
12631,
16322,
10297,
11644,
89945,
3097,
11,
13964,
89945,
3097,
317,
262,
1077,
6094,
3097,
284,
16990,
1592,
486,
19366,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pi_mean() {
let result = get_actual_result("test_csvs/PiDigits.csv", "mean");
assert_abs_diff_eq!(result, 4.53480000000000, epsilon = mean_epsilon());
} | rust_cleaned_test_functions.jsonl/80549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47771,
16933,
368,
341,
262,
1077,
1102,
284,
633,
40149,
5287,
445,
1944,
14020,
82,
16341,
72,
47167,
11219,
497,
330,
14287,
797,
262,
2060,
31170,
15850,
10714,
10297,
1382,
11,
220,
19,
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_record_changeset() {
extern crate serde_json;
use dao::Dao;
let input = r#"
{
"record": {
"city": {
"Text": "Akishima"
},
"city_id": {
"Int": 10
},
"country_id": {
"Int": 50
},
"last_update": {
"Timestamp": "2006-02-15T17:45:25Z"... | rust_cleaned_test_functions.jsonl/13720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
47526,
295,
368,
341,
262,
15637,
17717,
61570,
9455,
280,
262,
990,
24775,
486,
12197,
401,
262,
1077,
1946,
284,
435,
2,
698,
515,
220,
330,
8548,
788,
341,
262,
330,
8926,
788,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poh_verify_fuzz() {
solana_logger::setup();
for _ in 0..100 {
let mut time = Measure::start("ticks");
let num_ticks = thread_rng().gen_range(1, 100);
info!("create {} ticks:", num_ticks);
let mut entries = create_random_ticks(num_ti... | rust_cleaned_test_functions.jsonl/1638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
35638,
761,
8889,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
369,
716,
304,
220,
15,
496,
16,
15,
15,
341,
310,
1077,
5206,
882,
284,
34104,
486,
2468,
445,
35078,
797,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_exp() {
let mut exp = Exp::new(10.0);
let mut rng = ::test::rng();
for _ in 0..1000 {
assert!(exp.sample(&mut rng) >= 0.0);
assert!(exp.ind_sample(&mut rng) >= 0.0);
}
} | rust_cleaned_test_functions.jsonl/44610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14214,
368,
341,
286,
1077,
5206,
1343,
284,
7787,
486,
931,
7,
16,
15,
13,
15,
317,
286,
1077,
5206,
28422,
284,
3504,
1944,
486,
69890,
543,
286,
369,
716,
304,
220,
15,
496,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_custom_chain_genesis() -> Result<()> {
let net = ChainNetworkID::from_str("test1:123")?;
let temp_path = temp_path();
let opt = StarcoinOpt {
net: Some(net),
base_data_dir: Some(temp_path.path().to_path_buf()),
genesis_config: Some(BuiltinNetworkID::Test.to_st... | rust_cleaned_test_functions.jsonl/8286 | {
"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,
15875,
30583,
16322,
13774,
368,
1464,
5714,
71698,
341,
262,
1077,
4179,
284,
28525,
12320,
915,
486,
1499,
2895,
445,
1944,
16,
25,
16,
17,
18,
899,
37445,
262,
1077,
2730,
2638,
284,
2730,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mmap_noreplace() {
serial_test(|| {
with_cleanup(
|| {
// Make sure we mmapped the memory
let res = unsafe { dzmmap(START, BYTES_IN_PAGE) };
assert!(res.is_ok());
// Use dzmmap_nor... | rust_cleaned_test_functions.jsonl/107211 | {
"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,
717,
2186,
1089,
460,
2007,
368,
341,
286,
6146,
4452,
79453,
341,
310,
448,
42444,
1006,
394,
1369,
341,
503,
442,
7405,
2704,
582,
9465,
5677,
279,
4938,
198,
503,
1077,
592,
284,
19860,
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... | 4 |
#[test]
fn test_diff_unified_two_directories() {
let config = integration_test_utils::make_config_from_args(&["--width", "80"]);
let output = integration_test_utils::run_delta(DIFF_UNIFIED_TWO_DIRECTORIES, &config);
let output = strip_ansi_codes(&output);
let mut lines = output.l... | rust_cleaned_test_functions.jsonl/70045 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
4907,
1870,
23241,
32871,
2433,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
1183,
313,
3098,
497,
330,
23,
15,
15049,
286,
1077,
2550,
284,
17590,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overlapping_memory_regions() {
let regions_summary = [(GuestAddress(0), 100_usize), (GuestAddress(99), 100_usize)];
assert_eq!(
format!(
"{:?}",
new_guest_memory_mmap(®ions_summary).err().unwrap()
),
format!(... | rust_cleaned_test_functions.jsonl/63914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 743
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15431,
90619,
19195,
58035,
368,
341,
286,
1077,
13604,
27251,
284,
17826,
37804,
4286,
7,
15,
701,
220,
16,
15,
15,
11306,
551,
701,
320,
37804,
4286,
7,
24,
24,
701,
220,
16,
15,
15,
11306,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_facet_missing_fuchsia_test_facet() -> Result<(), Error> {
let meta = json!({
"facets": []
});
let f = test_facet(&meta);
assert!(f.is_err());
Ok(())
} | rust_cleaned_test_functions.jsonl/120018 | {
"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,
41589,
295,
40447,
761,
73391,
4452,
41589,
295,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
8823,
284,
2951,
0,
2262,
688,
330,
22185,
1415,
788,
4167,
286,
1625,
286,
1077,
282,
284,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sums() {
for (input, output) in sum_inputs_outputs() {
assert_eq!(crate::sum(input.0, input.1), output);
}
} | rust_cleaned_test_functions.jsonl/105175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
6237,
368,
341,
286,
369,
320,
1355,
11,
2550,
8,
304,
2629,
28557,
35189,
368,
341,
310,
2060,
10714,
10297,
61711,
486,
1242,
5384,
13,
15,
11,
1946,
13,
16,
701,
2550,
317,
286,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_decode_ascii_only_windows_1257_to_cow_without_bom_handling_and_without_replacement() {
match WINDOWS_1257.decode_without_bom_handling_and_without_replacement(b"abc") {
Some(cow) => match cow {
Cow::Borrowed(s) => {
assert_eq!(s, "abc");
... | rust_cleaned_test_functions.jsonl/90265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
50238,
18410,
58220,
62,
16,
17,
20,
22,
2346,
666,
363,
39904,
880,
316,
75642,
8378,
39904,
1288,
16101,
368,
341,
286,
2432,
75165,
62,
16,
17,
20,
22,
15922,
39904,
880,
316,
75642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_16_1() {
let f = |s: &str| {
let mut ver_sum = 0;
parse_bits(get_bits(s.trim()).into_iter().by_ref(), &mut ver_sum);
ver_sum
};
assert_eq!(16, f("8A004A801A8002F478"));
assert_eq!(12, f("620080001611562C8802118E34"));
assert_eq!(23, f("C0015000016115A2... | rust_cleaned_test_functions.jsonl/100928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
21,
62,
16,
368,
341,
262,
1077,
282,
284,
760,
82,
25,
609,
495,
91,
341,
286,
1077,
5206,
2739,
10160,
284,
220,
15,
280,
286,
4715,
20034,
5433,
20034,
1141,
16419,
6011,
18122,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_virtio_console() {
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(&mut focal);
let mut workload_path = dirs::home_dir().unwrap();
workload_path.push("workloads");
let kernel_path = direct_k... | rust_cleaned_test_functions.jsonl/23990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 933
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
51724,
368,
341,
310,
1077,
5206,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
310,
1077,
8640,
284,
26215,
486,
931,
2099,
6984,
41099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_partial_cmp() {
let comparisons: Vec<(Label, Label)> = vec![
(
Label::from_raw_bytes(b"yljkjljk").unwrap(),
Label::from_raw_bytes(b"Z").unwrap(),
),
(
Label::from_raw_bytes(b"Z").unwrap(),
... | rust_cleaned_test_functions.jsonl/5052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
35193,
368,
341,
286,
1077,
35495,
25,
11312,
28706,
2476,
11,
9402,
16018,
284,
7486,
90515,
310,
2399,
394,
9402,
486,
1499,
16067,
12524,
1883,
1,
3923,
41808,
43870,
41808,
1827,
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... | 2 |
#[test]
fn test_decompose_sccs_nearly_scc() {
let mut graph = petgraph_impl::new();
let n0 = graph.add_node(0);
let n1 = graph.add_node(1);
let n2 = graph.add_node(2);
let n3 = graph.add_node(3);
let n4 = graph.add_node(4);
graph.add_edge(n0, n1, 10);
... | rust_cleaned_test_functions.jsonl/115482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
52706,
643,
638,
82,
1089,
22140,
643,
638,
368,
341,
286,
1077,
5206,
4771,
284,
6753,
4439,
21007,
486,
931,
543,
286,
1077,
308,
15,
284,
4771,
1364,
5084,
7,
15,
317,
286,
1077,
308,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signed() {
use traits::{One, Signed, Zero};
assert!(!BigDecimal::zero().is_positive());
assert!(!BigDecimal::one().is_negative());
assert!(BigDecimal::one().is_positive());
assert!((-BigDecimal::one()).is_negative());
assert!((-BigDecimal::one()).... | rust_cleaned_test_functions.jsonl/75823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55617,
368,
341,
286,
990,
24055,
22964,
3966,
11,
52453,
11,
18306,
2440,
286,
2060,
0,
3471,
76422,
486,
14154,
1005,
285,
54160,
1423,
286,
2060,
0,
3471,
76422,
486,
603,
1005,
285,
53865,
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_query_pub_key() {
let mut chain = Chain::new();
// Transactions
let (t0, t0_s) = Transaction::debug_make_register(format!("SN1337BIKE"));
let pub_key = t0.get_public_key_output().clone();
let (t1, _) = Transaction::debug_make_register(format!("MYCOOLBIKE"... | rust_cleaned_test_functions.jsonl/102223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
34014,
3097,
368,
341,
286,
1077,
5206,
8781,
284,
28525,
486,
931,
1428,
286,
442,
55285,
198,
286,
1077,
320,
83,
15,
11,
259,
15,
643,
8,
284,
17869,
486,
8349,
28230,
14000,
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,
1... | 1 |
#[test]
fn test_runner() {
//Need to start with empty repo
fs::remove_dir_all("./data").unwrap_or(());
//Had issues with stopping and starting trow causing test fails.
//It might be possible to improve things with a thread_local
let _trow = start_trow();
let mut... | rust_cleaned_test_functions.jsonl/3956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1035
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54828,
368,
341,
286,
442,
23657,
311,
1191,
448,
4287,
15867,
198,
286,
8619,
486,
5399,
4334,
5705,
13988,
691,
1827,
15454,
8734,
5065,
626,
286,
442,
55468,
4714,
448,
22535,
323,
5916,
259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_device() {
let mut test_config = create_test_config_no_paths();
test_config.device_config = Some(build_full_config());
match test_config.device() {
Ok(d) => {
assert_eq!(*d, build_full_config().device);
}
Err(e) => p... | rust_cleaned_test_functions.jsonl/83807 | {
"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,
3062,
9204,
368,
341,
286,
1077,
5206,
1273,
5332,
284,
1855,
4452,
5332,
6536,
24152,
543,
286,
1273,
5332,
18355,
5332,
284,
4329,
43333,
16372,
5332,
1423,
286,
2432,
1273,
5332,
18355,
368,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_json_serialization_back_and_forth_is_unique() {
const ERROR_MESSAGE: &str = "Some Error!";
let mut original_response = CommonResponse::default();
original_response.error.push(ERROR_MESSAGE.to_owned());
let json_response = original_response.to_string();
let... | rust_cleaned_test_functions.jsonl/78535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
25602,
2022,
3895,
8378,
761,
2364,
6892,
21218,
368,
341,
286,
733,
12874,
14641,
25,
609,
495,
284,
330,
8373,
4600,
26782,
286,
1077,
5206,
4024,
9655,
284,
7718,
2582,
486,
2258,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bishop_moves() {
let position = PositionBuilder::new()
.place(Square::A1, Piece::Bishop, Color::White)
.build();
let moves = MoveGenerator::new().moves(&position);
assert_targets(
&[
Square::B2,
Square::C3,
Square::D4,
Square::E5,
... | rust_cleaned_test_functions.jsonl/134603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 640
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
20158,
45390,
368,
341,
262,
1077,
2309,
284,
12380,
3297,
486,
931,
741,
414,
659,
2007,
3759,
5151,
486,
32,
16,
11,
28930,
486,
33,
20158,
11,
3478,
486,
14075,
340,
414,
659,
5834,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unstable_profile_flag() {
let h = parses!(
"--crate-name",
"foo",
"--crate-type",
"lib",
"./src/lib.rs",
"--emit=dep-info,link",
"--out-dir",
"/out",
"-Zprofile"
);
... | rust_cleaned_test_functions.jsonl/65399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4907,
27992,
13789,
10933,
368,
341,
286,
1077,
305,
284,
70835,
33673,
310,
14482,
61711,
11494,
756,
310,
330,
7975,
756,
310,
14482,
61711,
10604,
756,
310,
330,
2740,
756,
310,
5924,
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_neg() {
let cases = vec![
("123.45", "-123.45"),
("1", "-1"),
("1234500009876.5", "-1234500009876.5"),
("1111.5551", "-1111.5551"),
("0.555", "-0.555"),
("0", "0"),
("0.0", "0.0"),
("0.00", "0... | rust_cleaned_test_functions.jsonl/13668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
16,
17,
18,
13,
19,
20,
497,
6523,
16,
17,
18,
13,
19,
20,
4461,
310,
3489,
16,
497,
6523,
16,
4461,
310,
3489,
16,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_propose_config_change_by_incorrect_validator() {
let mut testkit = testkit_with_supervisor(1);
let consensus_config = consensus_config_propose_first_variant(&testkit);
let config_proposal = ConfigProposeBuilder::new(CFG_CHANGE_HEIGHT)
.extend_consensus_config_propose(consens... | rust_cleaned_test_functions.jsonl/93834 | {
"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,
21663,
960,
5332,
15947,
3710,
1243,
19928,
64959,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
1273,
8226,
6615,
23723,
31396,
7,
16,
626,
262,
1077,
23869,
5332,
284,
23869,
5332,
21663,
960,
129... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_files_exists() {
assert!(path_exists("test_files"));
assert!(fs::metadata("test_files/runtime-bad")
.unwrap().permissions().mode() & 0o077 != 0);
} | rust_cleaned_test_functions.jsonl/83583 | {
"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,
10931,
9766,
368,
341,
262,
2060,
10297,
2343,
9766,
445,
1944,
10931,
4010,
262,
2060,
10297,
3848,
486,
17637,
445,
1944,
10931,
39298,
1455,
329,
1138,
338,
659,
15454,
1005,
29900,
1005,
8516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_uncleaned_roots_with_no_account() {
solana_logger::setup();
let accounts = AccountsDB::new(Vec::new());
assert_eq!(accounts.uncleaned_root_count(), 0);
// simulate slots are rooted after while
accounts.add_root(0);
assert_eq!(accounts.uncleaned_... | rust_cleaned_test_functions.jsonl/33679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76576,
2675,
291,
26608,
2412,
6615,
6536,
13500,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
9618,
284,
40655,
3506,
486,
931,
49923,
486,
931,
5231,
286,
2060,
10714,
10297,
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_accountsdb_multi_pass_rest_of_hash_calculation() {
solana_logger::setup();
// passes:
for pass in 0..3 {
let mut account_maps: Vec<CalculateHashIntermediate> = Vec::new();
let key = Pubkey::new(&[11u8; 32]);
... | rust_cleaned_test_functions.jsonl/17797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1886
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
25133,
15464,
32231,
3575,
8950,
38241,
2914,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
442,
16211,
510,
73363,
286,
369,
1494,
304,
220,
15,
496,
18,
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... | 4 |
#[test]
fn test_latent_endpoint() {
let server_addr = (Ipv4Addr::LOCALHOST, 8000).into();
let bh_addr = (Ipv4Addr::LOCALHOST, 8001).into();
let mut executor = fasync::TestExecutor::new_with_fake_time().unwrap();
let () = executor.set_fake_time(Time::from_nanos(0));
let ... | rust_cleaned_test_functions.jsonl/78097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 882
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26174,
306,
36699,
368,
341,
286,
1077,
3538,
7387,
284,
320,
80656,
19,
13986,
486,
39081,
28687,
11,
220,
23,
15,
15,
15,
568,
18122,
543,
286,
1077,
42989,
7387,
284,
320,
80656,
19,
13986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dispatch_with_selecting_request_wrong_server_id_returns_none() {
let mut req = new_test_request();
let requested_ip_addr = Ipv4Addr::new(192, 168, 1, 2);
req.ciaddr = requested_ip_addr;
req.options.remove(0);
let mut server = new_test_server(|| 42);
... | rust_cleaned_test_functions.jsonl/61721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6615,
13051,
287,
7893,
75198,
12015,
842,
58900,
31488,
368,
341,
286,
1077,
5206,
4232,
284,
501,
4452,
7893,
543,
286,
1077,
11223,
10385,
7387,
284,
358,
30168,
19,
13986,
486,
931,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_atan_1_arg() {
let tests = vec![
(Datum::Null, Datum::Null),
(Datum::F64(1.0_f64), Datum::F64(f64::consts::PI / 4.0_f64)),
(Datum::F64(-1.0_f64), Datum::F64(-f64::consts::PI / 4.0_f64)),
(Datum::F64(f64::MAX), Datum::F64(f64::consts::PI / 2... | rust_cleaned_test_functions.jsonl/125529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
276,
62,
16,
6057,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
68036,
486,
3280,
11,
68459,
486,
3280,
1326,
310,
320,
68036,
486,
37,
21,
19,
7,
16,
13,
15,
761,
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... | 2 |
#[test]
fn test_transact_errors() {
let mut sqlite = db::new_connection("").unwrap();
let mut conn = Conn::connect(&mut sqlite).unwrap();
// Good: empty transaction.
let report = conn.transact(&mut sqlite, "[]").unwrap();
assert_eq!(report.tx_id, 0x10000000 + 1);
... | rust_cleaned_test_functions.jsonl/76422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 971
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
531,
20196,
368,
341,
286,
1077,
5206,
22003,
284,
2927,
486,
931,
15866,
80821,
15454,
543,
286,
1077,
5206,
4534,
284,
18213,
486,
6459,
2099,
6984,
22003,
568,
15454,
1428,
286,
442,
7684... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_noto_sans() {
run_test(
&TEST_DATA,
"harfbuzz/good-noto-sans",
"noto/NotoSansKhmer-Regular.ttf",
&[3],
419,
);
} | rust_cleaned_test_functions.jsonl/103198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
2072,
643,
596,
368,
341,
310,
1598,
4452,
1006,
394,
609,
10033,
7896,
345,
394,
330,
12982,
10798,
8889,
4846,
1386,
29169,
78,
1331,
596,
756,
394,
330,
1921,
78,
20290,
2072,
46882,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_requests() {
let mut rt = tokio::runtime::Runtime::new().expect("can't create runtime");
let client = Client::new(
BASE_URL.parse().unwrap(),
HashMap::new(),
5000,
12,
ProxyDetails::Enabled,
HashMap::new(),
... | rust_cleaned_test_functions.jsonl/89910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37216,
368,
341,
286,
1077,
5206,
16677,
284,
9628,
815,
486,
22255,
486,
15123,
486,
931,
1005,
17119,
445,
4814,
944,
1855,
15592,
3071,
286,
1077,
2943,
284,
8423,
486,
931,
1006,
310,
22194,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_builder_i32_alloc_zero_bytes() {
let mut b = Int32BufferBuilder::new(0);
b.append(123);
let a = b.finish();
assert_eq!(4, a.len());
} | rust_cleaned_test_functions.jsonl/74106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
5318,
18,
17,
14802,
19359,
12524,
368,
341,
286,
1077,
5206,
293,
284,
1333,
18,
17,
4095,
3297,
486,
931,
7,
15,
317,
286,
293,
2057,
7,
16,
17,
18,
317,
286,
1077,
264,
284,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_highlighting_with_local_variable_tracking() {
let source = vec![
"module.exports = function a(b) {",
" const module = c;",
" console.log(module, b);",
"}",
]
.join("\n");
assert_eq!(
&to_token_vector(&source, get_language("javascript"), ... | rust_cleaned_test_functions.jsonl/12258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74546,
287,
6615,
13564,
14635,
66105,
368,
341,
262,
1077,
2530,
284,
7486,
90515,
286,
330,
4352,
7435,
284,
729,
264,
1883,
8,
314,
756,
286,
330,
220,
733,
4688,
284,
272,
64497,
286,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overflow() {
assert_parser_err!("PRINT &O-10", QError::Overflow);
assert_parser_err!("PRINT &O40000000000", QError::Overflow);
} | rust_cleaned_test_functions.jsonl/102669 | {
"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,
79073,
368,
341,
310,
2060,
18517,
9266,
17223,
24372,
609,
46,
12,
16,
15,
497,
1207,
1454,
486,
42124,
317,
310,
2060,
18517,
9266,
17223,
24372,
609,
46,
19,
15,
15,
15,
15,
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 |
#[test]
fn test_configure_fdt_boot() {
let fdt = FdtPlaceholder([0u8; FDT_MAX_SIZE]);
let guest_memory = create_guest_mem();
// Error case: FDT doesn't fit in guest memory.
let fdt_addr = GuestAddress(guest_memory.last_addr().raw_value() - FDT_MAX_SIZE as u64 + 1);
asser... | rust_cleaned_test_functions.jsonl/35682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75887,
761,
8047,
52062,
368,
341,
286,
1077,
282,
8047,
284,
434,
8047,
48305,
2561,
15,
84,
23,
26,
434,
10599,
6806,
4098,
2558,
286,
1077,
8640,
19195,
284,
1855,
62739,
12976,
1428,
286,
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_account_grow_many() {
let (_accounts_dir, paths) = get_temp_accounts_paths(2).unwrap();
let size = 4096;
let accounts = AccountsDB::new_sized(paths, size);
let mut keys = vec![];
for i in 0..9 {
let key = Pubkey::new_rand();
let acc... | rust_cleaned_test_functions.jsonl/33670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
1889,
651,
22101,
368,
341,
286,
1077,
5453,
26206,
4334,
11,
12716,
8,
284,
633,
11771,
55665,
24152,
7,
17,
568,
15454,
543,
286,
1077,
1379,
284,
220,
19,
15,
24,
21,
280,
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... | 5 |
#[test]
fn test_count_coverage_simple() {
use super::{Coverage, BASE_A, BASE_C, BASE_G, BASE_T};
let filename = std::path::Path::new("sample_data/sample_a.bam");
let start: usize = 10400;
let cov = Coverage::from_bam(
&filename,
0u32,
start as ... | rust_cleaned_test_functions.jsonl/21909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3180,
73384,
30015,
368,
341,
286,
990,
2256,
22964,
66312,
11,
22194,
1566,
11,
22194,
920,
11,
22194,
2646,
11,
22194,
1139,
2440,
286,
1077,
3899,
284,
1460,
486,
2343,
486,
1820,
486,
931,
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_at_exit() {
let _guard = LOCK_FOR_TEST.write().unwrap();
VM::init();
let closure = |_vm| {
println!("test class::vm::tests::test_at_exit worked!");
};
VM::at_exit(closure);
} | rust_cleaned_test_functions.jsonl/39475 | {
"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,
3752,
16880,
368,
341,
286,
1077,
716,
26098,
284,
49463,
14516,
11641,
3836,
1005,
15454,
543,
286,
17792,
486,
2327,
1428,
286,
1077,
21955,
284,
70886,
7338,
91,
341,
310,
13751,
17223,
1944,
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 |
#[test]
fn test_next() {
let mut mad = MeanAbsoluteDeviation::new(5).unwrap();
assert_eq!(round(mad.nexta(1.5)), 0.0);
assert_eq!(round(mad.nexta(4.0)), 1.25);
assert_eq!(round(mad.nexta(8.0)), 2.333);
assert_eq!(round(mad.nexta(4.0)), 1.813);
assert_eq!(round(ma... | rust_cleaned_test_functions.jsonl/92405 | {
"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,
11257,
368,
341,
286,
1077,
5206,
12796,
284,
16327,
27331,
14592,
7101,
486,
931,
7,
20,
568,
15454,
1428,
286,
2060,
10714,
10297,
1049,
1255,
329,
4529,
64,
7,
16,
13,
20,
5731,
220,
15,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
let vec_a = Vec2::new(1.0, -4.0);
let vec_b = Vec2::new(5.0, -7.0);
let ans = vec_a + vec_b;
assert_approx_eq!(ans.x(), 6.0);
assert_approx_eq!(ans.y(), -11.0);
} | rust_cleaned_test_functions.jsonl/77717 | {
"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,
2891,
368,
341,
286,
1077,
7486,
4306,
284,
11312,
17,
486,
931,
7,
16,
13,
15,
11,
481,
19,
13,
15,
317,
286,
1077,
7486,
880,
284,
11312,
17,
486,
931,
7,
20,
13,
15,
11,
481,
22,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_csv_parse_1() {
assert_eq!(
csv::parse("alice, domain1, data1, action1"),
Some(vec![
"alice".to_owned(),
"domain1".to_owned(),
"data1".to_owned(),
"action1".to_owned()
])
)
} | rust_cleaned_test_functions.jsonl/13053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14020,
21039,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
13147,
486,
6400,
445,
63195,
11,
7947,
16,
11,
821,
16,
11,
1917,
16,
4461,
310,
4329,
25592,
90515,
394,
330,
63195,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fn_signature_two_args() {
check(
r#"
fn foo(x: u32, y: u32) -> u32 {x + y}
fn bar() { foo($03, ); }
"#,
expect![[r#"
fn foo(x: u32, y: u32) -> u32
(<x: u32>, y: u32)
"#]],
);
check(
r#"
fn foo(x: u32, y: u32) -> u32 ... | rust_cleaned_test_functions.jsonl/75005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 622
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
23241,
8384,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
8822,
15229,
2075,
25,
575,
18,
17,
11,
379,
25,
575,
18,
17,
8,
1464,
575,
18,
17,
314,
87,
488,
379,
532,
8822,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_monotype_function() {
let monotype_ex = Parser::new("(?A: int) => int").parse_monotype();
let mut m = BTreeMap::<String, types::Tvar>::new();
let got =
convert_monotype(&monotype_ex, &mut m, &mut sub::Substitution::default()).unwrap();
let mut... | rust_cleaned_test_functions.jsonl/131390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
20737,
4156,
9174,
368,
341,
286,
1077,
1615,
4156,
2702,
284,
21102,
486,
931,
31732,
30,
32,
25,
526,
8,
589,
526,
1827,
6400,
20737,
4156,
1428,
286,
1077,
5206,
296,
284,
425,
6533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bsd() {
let mut rng = BsdLcg::from_seed([1, 0, 0, 0]);
for &num in &[1103527590, 377401575, 662824084, 1147902781, 2035015474] {
assert_eq!(rng.next_u32(), num);
}
} | rust_cleaned_test_functions.jsonl/61515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
13446,
368,
341,
286,
1077,
5206,
28422,
284,
425,
13446,
43,
27446,
486,
1499,
33809,
2561,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
10149,
286,
369,
609,
2413,
304,
44590,
16,
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... | 2 |
#[test]
fn test_drawdata_memory_layout() {
use std::mem;
assert_eq!(
mem::size_of::<DrawData>(),
mem::size_of::<sys::ImDrawData>()
);
assert_eq!(
mem::align_of::<DrawData>(),
mem::align_of::<sys::ImDrawData>()
);
use memoffset::offset_of;
use sys::ImDr... | rust_cleaned_test_functions.jsonl/123845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
691,
19195,
14466,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
2060,
10714,
33673,
286,
1833,
486,
2141,
3575,
27638,
8137,
1043,
65766,
286,
1833,
486,
2141,
3575,
27638,
7791,
486,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_utf16_lossy() {
// completely positive cases tested above.
// lead + eof
assert_eq!(String::from_utf16_lossy(&[0xD800]), String::from_str("\u{FFFD}"));
// lead + lead
assert_eq!(String::from_utf16_lossy(&[0xD800, 0xD800]),
String::f... | rust_cleaned_test_functions.jsonl/47 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
39453,
16,
21,
11193,
88,
368,
341,
286,
442,
6587,
6785,
5048,
12510,
3403,
624,
286,
442,
2990,
488,
76760,
198,
286,
2060,
10714,
10297,
703,
486,
1499,
39453,
16,
21,
11193,
88,
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_unknown_cmd() {
assert_eq!(
run_test(Some("z3_unknown_command"))
.unwrap_err()
.to_string(),
"While spawning child process with z3_unknown_command"
)
} | rust_cleaned_test_functions.jsonl/19452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
11684,
368,
341,
262,
2060,
10714,
33673,
286,
1598,
4452,
65405,
445,
89,
18,
57507,
10811,
5455,
310,
659,
15454,
9266,
741,
310,
659,
983,
3904,
3148,
286,
330,
7983,
78429,
1682,
1882,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_slice_partition_dedup_by() {
let mut slice: [i32; 9] = [1, -1, 2, 3, 1, -5, 5, -2, 2];
let (dedup, duplicates) = slice.partition_dedup_by(|a, b| a.abs() == b.abs());
assert_eq!(dedup, [1, 2, 3, 1, -5, -2]);
assert_eq!(duplicates, [5, -1, 2]);
} | rust_cleaned_test_functions.jsonl/9701 | {
"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,
26488,
43840,
814,
291,
454,
3710,
368,
341,
262,
1077,
5206,
15983,
25,
508,
72,
18,
17,
26,
220,
24,
60,
284,
508,
16,
11,
481,
16,
11,
220,
17,
11,
220,
18,
11,
220,
16,
11,
481,
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_collisions_const_acc() {
let input = "p=< 0, 2,-3>, v=<-1, 1,-3>, a=< 2, 0,-1>\n\
p=<-6, 4, 1>, v=< 7,-4,-5>, a=<-2, 1, 3>\n\
p=<-5, 0, 2>, v=< 0,-2, 2>, a=< 2, 0,-1>\n\
p=<-2,-8,-2>, v=< 2, 8, 4>, a=< 0,-3,-2>\n";
let particles = Parti... | rust_cleaned_test_functions.jsonl/41540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43597,
6805,
13610,
17737,
368,
341,
262,
1077,
1946,
284,
330,
79,
38698,
220,
15,
11,
220,
17,
4999,
18,
8066,
348,
38698,
12,
16,
11,
220,
16,
4999,
18,
8066,
264,
38698,
220,
17,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve_module_6() {
let (_temp_dir, deno_dir) = test_setup();
let specifier = "http://localhost:4545/tests/subdir/mod2.ts";
let referrer = add_root!("/deno/tests/006_url_imports.ts");
let expected_module_name = "http://localhost:4545/tests/subdir/mod2.ts";
let expected_file... | rust_cleaned_test_functions.jsonl/72757 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
10750,
62,
21,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
262,
1077,
97616,
284,
330,
1254,
1110,
8301,
25,
19,
20,
19,
20,
62468,
37885,
3741... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_report_update_check_retries() {
let (mut reporter, mut receiver) = CobaltMetricsReporter::new_mock();
reporter.report_metrics(Metrics::UpdateCheckRetries(3)).unwrap();
assert_eq!(
receiver.try_next().unwrap().unwrap(),
CobaltEvent {
... | rust_cleaned_test_functions.jsonl/90999 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
8882,
7200,
1288,
4543,
368,
341,
286,
1077,
320,
6984,
18960,
11,
5206,
13964,
8,
284,
45951,
3145,
27328,
52766,
486,
931,
34134,
543,
286,
18960,
22776,
37686,
3189,
13468,
486,
4289,
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_ignore_typedef_but_import_union_from_c() {
let ir = ir_from_cc("typedef union {} MyUnion;").unwrap();
assert_ir_not_matches!(ir, quote! { TypeAlias { identifier: "MyUnion" ... } });
} | rust_cleaned_test_functions.jsonl/37192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
42111,
4219,
86874,
18434,
51621,
5673,
666,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
445,
5286,
11300,
4687,
3017,
32658,
26,
1827,
15454,
543,
9401,
262,
2060,
51433,
7913,
38344,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_latest() {
let dir = tempdir().unwrap();
let paths = create_files(dir.path(), 3).unwrap();
let repo = LogRepository::new(dir.path());
let latest = repo.latest().unwrap();
match latest {
None => assert!(false),
Some(p) => assert_eq!(... | rust_cleaned_test_functions.jsonl/101110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64880,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
12716,
284,
1855,
10931,
14161,
3875,
1507,
220,
18,
568,
15454,
543,
286,
1077,
15867,
284,
2835,
4624,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_position() -> crate::Result<()> {
const CONST_VAL: u32 = 9u32;
let positions_delta: Vec<u32> = iter::repeat(CONST_VAL).take(2_000_000).collect();
let positions_data = create_positions_data(&positions_delta[..])?;
assert_eq!(positions_data.len(), 1_015_627);
... | rust_cleaned_test_functions.jsonl/110176 | {
"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,
9661,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
733,
29602,
6096,
25,
575,
18,
17,
284,
220,
24,
84,
18,
17,
280,
286,
1077,
9892,
26710,
25,
11312,
34837,
18,
17,
29,
284,
5367,
486,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rounding() {
test_rounding_1(0, 0, "PT0S");
test_rounding_1(1, 0, "PT0.0S");
test_rounding_1(2, 0, "PT0.00S");
test_rounding_1(3, 0, "PT0.000S");
test_rounding_1(4, 0, "PT0.0000S");
test_rounding_1(5, 0, "PT0.00000S");
test_rounding_1(6, 0, "PT0.000000S");
test_ro... | rust_cleaned_test_functions.jsonl/60408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 481
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
287,
368,
341,
262,
1273,
29896,
287,
62,
16,
7,
15,
11,
220,
15,
11,
330,
2828,
15,
50,
797,
262,
1273,
29896,
287,
62,
16,
7,
16,
11,
220,
15,
11,
330,
2828,
15,
13,
15,
50,
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_pow() {
fn naive_pow<T: Mul<Output=T> + Copy>(one: T, base: T, exp: usize) -> T {
(0..exp).fold(one, |acc, _| acc * base)
}
macro_rules! assert_pow {
(($num:expr, $exp:expr) => $expected:expr) => {{
let result = $num.pow($exp);
... | rust_cleaned_test_functions.jsonl/21925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56183,
368,
341,
286,
5168,
49665,
56183,
3125,
25,
29351,
27,
5097,
60461,
29,
488,
14540,
2235,
603,
25,
350,
11,
2331,
25,
350,
11,
1343,
25,
22301,
8,
1464,
350,
341,
310,
320,
15,
496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_host_port() {
let addr = "127.0.0.1:2222";
let parsed_addr = parse_user_host_port(addr).unwrap();
assert!(parsed_addr.proto.is_none());
assert!(parsed_addr.user.is_none());
assert_eq!("127.0.0.1", parsed_addr.host.unwrap());
assert_eq!("2222", parsed_addr.port.unwra... | rust_cleaned_test_functions.jsonl/56555 | {
"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,
21039,
12848,
8716,
368,
341,
262,
1077,
10789,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
17,
17,
17,
17,
876,
262,
1077,
15676,
7387,
284,
4715,
3317,
12848,
8716,
24497,
568,
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_verify_signature_dog_correct() {
assert!(verify_signature("dog".to_string(),
11318728,
4228098967,
26379711));
} | rust_cleaned_test_functions.jsonl/16193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
39859,
814,
538,
31550,
368,
341,
286,
2060,
10297,
12446,
39859,
445,
18457,
3263,
983,
3904,
3148,
7561,
220,
16,
16,
18,
16,
23,
22,
17,
23,
345,
7561,
220,
19,
17,
17,
23,
15,
24,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_ipv4_compat() {
let test_cases = vec![
(Some(hex("00000000000000000001000001020304")), Some(0)),
(Some(hex("00000000000000000000000001020304")), Some(1)),
(Some(hex("10101010")), Some(0)),
(Some(hex("00000000000000000001ffff01020304")), ... | rust_cleaned_test_functions.jsonl/59416 | {
"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,
6892,
49378,
19,
89602,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
8373,
44660,
445,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
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... | 2 |
#[test]
fn test_quota_exceeded() {
let received_messages = Arc::new(AtomicUsize::new(0));
let quota_exceeded = Arc::new(AtomicIsize::new(0));
let log = create_logger(
received_messages.clone(),
quota_exceeded.clone(),
Level::Debug,
);
l... | rust_cleaned_test_functions.jsonl/118964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1005
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
97093,
2702,
94206,
368,
341,
286,
1077,
3949,
23428,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
1106,
286,
1077,
42042,
2702,
94206,
284,
19689,
486,
931,
7,
65857,
40,
2141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_disable_in_memory_pessimistic_locks() {
let txn_ext = Arc::new(TxnExt::default());
let storage = TestStorageBuilder::new(DummyLockManager {}, ApiVersion::V1)
.pipelined_pessimistic_lock(true)
.in_memory_pessimistic_lock(false)
.build_for_txn(tx... | rust_cleaned_test_functions.jsonl/133301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33842,
1243,
19195,
620,
66733,
4532,
9818,
82,
368,
341,
286,
1077,
49721,
9927,
284,
19689,
486,
931,
4140,
42967,
6756,
486,
2258,
1423,
286,
1077,
5819,
284,
3393,
5793,
3297,
486,
931,
5432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_are_all_msg_different() {
assert!(are_all_msg_different("abcdefgh".as_bytes(), 2));
assert!(!are_all_msg_different("abcdabgh".as_bytes(), 2));
} | rust_cleaned_test_functions.jsonl/8589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56855,
5705,
6483,
82741,
368,
341,
262,
2060,
10297,
546,
5705,
6483,
82741,
445,
56747,
3263,
300,
12524,
1507,
220,
17,
1106,
262,
2060,
0,
3471,
546,
5705,
6483,
82741,
445,
68644,
370,
866,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_int_divide_int() {
let test_cases = vec![
(13, false, 11, false, Some(1)),
(13, false, -11, false, Some(-1)),
(-13, false, 11, false, Some(-1)),
(-13, false, -11, false, Some(1)),
(33, false, 11, false, Some(3)),
(33... | rust_cleaned_test_functions.jsonl/78971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
16237,
577,
4042,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
16,
18,
11,
895,
11,
220,
16,
16,
11,
895,
11,
4329,
7,
16,
6965,
310,
320,
16,
18,
11,
895,
11,
481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_simple_file() {
let schema = Schema::new(vec![
Field::new("a", DataType::UInt32, false),
Field::new("b", DataType::Utf8, false),
Field::new("c", DataType::Float64, false),
]);
let file = File::open("test/data/example1.ndjson").unw... | rust_cleaned_test_functions.jsonl/77005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
30015,
2458,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
90515,
310,
8601,
486,
931,
445,
64,
497,
33172,
486,
18777,
18,
17,
11,
895,
1326,
310,
8601,
486,
931,
445,
65,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_4_i32() -> Result<()> {
let a0: &dyn Array = &Int32Array::from_slice(&[0, 1]);
let a1: &dyn Array = &Int32Array::from_slice(&[2, 6]);
let a2: &dyn Array = &Int32Array::from_slice(&[3, 5]);
let a3: &dyn Array = &Int32Array::from_slice(&[4, 7]);
let o... | rust_cleaned_test_functions.jsonl/47140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
62,
19,
5318,
18,
17,
368,
1464,
5714,
71698,
341,
286,
1077,
264,
15,
25,
609,
43085,
2910,
284,
609,
1072,
18,
17,
1857,
486,
1499,
26488,
2099,
58,
15,
11,
220,
16,
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... | 2 |
#[test]
fn test_cast_as_decimal() {
let mut ctx = EvalContext::new(Arc::new(EvalConfig::default_for_test()));
let t = Time::parse_utc_datetime("2012-12-12 12:00:23", 0).unwrap();
let int_t = 20121212120023u64;
let duration_t = Duration::parse(b"12:00:23", 0).unwrap();
let... | rust_cleaned_test_functions.jsonl/2961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
11898,
74429,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
931,
4346,
1287,
486,
931,
10722,
831,
2648,
486,
2258,
5478,
4452,
7392,
286,
1077,
259,
284,
4120,
486,
6400,
84259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.