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_return_pod_by_ref_and_ptr() {
let hdr = indoc! {"
#include <cstdint>
struct B {
uint32_t a;
};
struct A {
B b;
};
inline const B& return_b_ref(const A& a) {
return a.b;
}
inline const B* retur... | rust_cleaned_test_functions.jsonl/9737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12511,
85337,
3710,
7793,
8378,
4348,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
2036,
425,
341,
310,
2622,
18,
17,
528,
264,
280,
286,
2605,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_controller() {
local_test_e(|runtime| async move {
let universal_canister = set_up_universal_canister(&runtime).await;
universal_canister
.set_controller(universal_canister.canister_id().get())
.await
.unwrap();
// Can't use "... | rust_cleaned_test_functions.jsonl/39207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 797
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
21600,
368,
341,
262,
2205,
4452,
2204,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
20178,
27421,
1571,
284,
738,
8237,
4907,
33952,
27421,
1571,
2099,
22255,
568,
11421,
401,
286,
20178,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_outer_join() {
let (temp, rain) = create_frames();
let joined = temp.outer_join(&rain, "days", "days").unwrap();
println!("{:?}", &joined);
assert_eq!(joined.height(), 5);
assert_eq!(joined.column("days").unwrap().sum::<i32>(), Some(7));
} | rust_cleaned_test_functions.jsonl/4174 | {
"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,
67258,
31017,
368,
341,
286,
1077,
320,
3888,
11,
11174,
8,
284,
1855,
29319,
543,
286,
1077,
10859,
284,
2730,
53719,
31017,
2099,
29093,
11,
330,
13778,
497,
330,
13778,
1827,
15454,
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_bpf_to_bpf_scratch_registers() {
test_interpreter_and_jit_elf!(
"tests/elfs/scratch_registers.so",
[1],
(
b"log_64" => syscalls::BpfSyscallU64::call; syscalls::BpfSyscallU64 {},
),
{ |_vm, res: Result| { res.unwrap() == 112 } },
41
... | rust_cleaned_test_functions.jsonl/59035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
15897,
2346,
880,
15897,
59728,
754,
78360,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
62,
490,
33673,
286,
330,
23841,
14,
490,
82,
14,
54055,
78360,
26476,
756,
286,
508,
16,
125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_100099() {
assert_eq!(
get_final_state(parse_opcodes(&String::from("1,0,0,0,99"))),
vec![2, 0, 0, 0, 99]
);
} | rust_cleaned_test_functions.jsonl/105028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
15,
15,
15,
24,
24,
368,
341,
286,
2060,
10714,
33673,
310,
633,
20676,
4387,
27762,
10287,
25814,
2099,
703,
486,
1499,
445,
16,
11,
15,
11,
15,
11,
15,
11,
24,
24,
2761,
1326,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date_set_permissions_error() {
if !(get_effective_uid() == 0 || is_wsl()) {
let (_, mut ucmd) = at_and_ucmd!();
let result = ucmd.arg("--set").arg("2020-03-11 21:45:00+08:00").fails();
let result = result.no_stdout();
assert!(result.stderr.starts_with("date: c... | rust_cleaned_test_functions.jsonl/77626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
2602,
44767,
4096,
368,
341,
262,
421,
18208,
455,
27125,
533,
25396,
368,
621,
220,
15,
1369,
374,
1670,
3226,
2140,
341,
286,
1077,
39464,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_block() {
let keys = KeyPair::random();
let ts = Utc::now();
let txs = [2];
let tx_count = txs.len() as u32;
let content = Block {
height: Height(500),
tx_count,
prev_hash: crypto::hash(&[1]),
tx_hash: crypt... | rust_cleaned_test_functions.jsonl/43027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
368,
341,
286,
1077,
6894,
284,
5309,
12443,
486,
11463,
543,
286,
1077,
10591,
284,
547,
10413,
486,
3328,
543,
286,
1077,
9854,
82,
284,
508,
17,
935,
286,
1077,
9854,
3180,
284,
9854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_segments_of_arrays() {
let mut buf = vec![255; 64];
let v1 = [1u8, 2, 3];
let v2 = [1u8, 3];
let v3 = [2u8, 5, 2, 3, 56, 3];
let dat = vec![v1.as_ref(), v2.as_ref(), v3.as_ref()];
Field::write(&dat, &mut buf, 48, 56);
<Vec<&[u8]> as Field>::check(&buf, 48.into(), 56.... | rust_cleaned_test_functions.jsonl/118849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55735,
3575,
68983,
368,
341,
262,
1077,
5206,
6607,
284,
7486,
20703,
17,
20,
20,
26,
220,
21,
19,
935,
262,
1077,
348,
16,
284,
508,
16,
84,
23,
11,
220,
17,
11,
220,
18,
935,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_icmpv4_in_ipv6() {
let ip_config = Ipv6::DUMMY_CONFIG;
let mut ctx = DummyEventDispatcherBuilder::from_config(ip_config.clone())
.build::<DummyEventDispatcher>();
let device = DeviceId::new_ethernet(1);
let frame_dst = FrameDestination::Unicast... | rust_cleaned_test_functions.jsonl/122985 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 699
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
32747,
1307,
85,
19,
1243,
49378,
21,
368,
341,
286,
1077,
5997,
5332,
284,
358,
30168,
21,
486,
35,
58673,
12568,
280,
286,
1077,
5206,
5635,
284,
50567,
1556,
21839,
3297,
486,
1499,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_char_with_surrounding_properties() {
let o = CellGrid::o();
let q = CellGrid::q();
let u = CellGrid::u();
let unit4 = Cell::unit(4);
// Expecting to m... | rust_cleaned_test_functions.jsonl/33914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
9232,
6615,
49946,
1049,
287,
25158,
368,
341,
286,
1077,
297,
284,
13972,
3543,
486,
78,
543,
286,
1077,
2804,
284,
13972,
3543,
486,
80,
543,
286,
1077,
575,
284,
13972,
3543,
486,
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_formats() {
let rocket = rocket::ignite()
.mount("/", routes![json, xml, json_long, msgpack_long, msgpack,
plain, binary, other]);
let client = Client::tracked(rocket).unwrap();
let response = client.post("/").header(ContentType::JSON).dispatch();
assert_... | rust_cleaned_test_functions.jsonl/34696 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68351,
368,
341,
262,
1077,
24306,
284,
24306,
486,
95408,
741,
286,
659,
16557,
35460,
11291,
20703,
2236,
11,
8396,
11,
2951,
17799,
11,
3750,
4748,
17799,
11,
3750,
4748,
345,
2290,
14396,
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_preserve_root() {
for d in [
"/",
"/////dev///../../../../",
"../../../../../../../../../../../../../../",
"./../../../../../../../../../../../../../../",
] {
new_ucmd!()
.arg("--preserve-root")
.arg("-R")
.... | rust_cleaned_test_functions.jsonl/49269 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32116,
5852,
12993,
368,
341,
1066,
262,
369,
294,
304,
2278,
286,
3521,
756,
286,
330,
97656,
3583,
2575,
84257,
756,
286,
63392,
84257,
84257,
2748,
756,
286,
5924,
84257,
84257,
84257,
2748,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ascii_boundary_below() -> io::Result<()> {
test_truncate_length("1337_hello_world", 15, "1337_hello_worl", "…")
} | rust_cleaned_test_functions.jsonl/106751 | {
"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,
50238,
54004,
82750,
368,
1464,
6399,
486,
2077,
71698,
341,
262,
1273,
3547,
26900,
5118,
445,
16,
18,
18,
22,
96724,
31792,
497,
220,
16,
20,
11,
330,
16,
18,
18,
22,
96724,
1670,
269,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iter() {
let mut p = make_parser();
assert_eq!(p.next().and_then(|n| Some(n.typ)), Some(ItemType::ItemText));
assert_eq!(p.collect::<Vec<_>>().len(), 12);
} | rust_cleaned_test_functions.jsonl/8624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
368,
341,
286,
1077,
5206,
281,
284,
1281,
18517,
543,
286,
2060,
10714,
10297,
79,
4529,
1005,
437,
68367,
22428,
77,
91,
4329,
1445,
49286,
5731,
4329,
29771,
929,
486,
1234,
1178,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_distinct() {
let expected_sql = "SELECT DISTINCT \"bar\" FROM \"test\"";
let query = Select::from_table("test").column(Column::new("bar")).distinct();
let (sql, _) = Postgres::build(query).unwrap();
assert_eq!(expected_sql, sql);
} | rust_cleaned_test_functions.jsonl/6448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16031,
7800,
368,
341,
286,
1077,
3601,
18063,
284,
330,
4858,
59086,
7245,
2257,
2105,
4295,
7245,
1944,
95349,
286,
1077,
3239,
284,
8427,
486,
1499,
5237,
445,
1944,
1827,
6229,
95105,
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... | 1 |
#[test]
fn test_shr_reg_reg() {
assert_emit!(0xD3, 0xE8; emit_shr_reg_cl(0, RAX));
assert_emit!(0x41, 0xD3, 0xE9; emit_shr_reg_cl(0, R9));
assert_emit!(0x48, 0xD3, 0xE8; emit_shr_reg_cl(1, RAX));
assert_emit!(0x49, 0xD3, 0xE9; emit_shr_reg_cl(1, R9));
} | rust_cleaned_test_functions.jsonl/85466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
81,
4920,
4920,
368,
341,
286,
2060,
69082,
10297,
15,
15764,
18,
11,
220,
15,
12606,
23,
26,
16691,
3712,
81,
4920,
6794,
7,
15,
11,
431,
2954,
1106,
286,
2060,
69082,
10297,
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 |
#[test]
fn test_storage_stage_process_account_proofs() {
solana_logger::setup();
let keypair = Arc::new(Keypair::new());
let storage_keypair = Arc::new(Keypair::new());
let archiver_keypair = Arc::new(Keypair::new());
let exit = Arc::new(AtomicBool::new(false));
... | rust_cleaned_test_functions.jsonl/82499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
35238,
11305,
13500,
2540,
36081,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
1376,
12670,
284,
19689,
486,
931,
7,
6608,
1082,
1310,
486,
931,
1423,
286,
1077,
5819,
3097... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_get_colors_error() {
let status = Command::new(get_path())
.arg("--base-colors=#FFFFFF,#001488")
.arg("--target-colors=000000")
.stderr(Stdio::null())
.status()
.expect("failed to start color_bruteforcer");
match status.... | rust_cleaned_test_functions.jsonl/4295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
33670,
4096,
368,
341,
286,
1077,
2639,
284,
7348,
486,
931,
5433,
2638,
2398,
310,
659,
858,
21549,
3152,
7889,
82,
45131,
28321,
38898,
15,
15,
16,
19,
23,
23,
1138,
310,
659,
858,
215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pool_ray_srm() {
pool_actions::run_test(
"RDM.RAY-SRM-V4",
vec![
utils::Swap {
protocol: "RDM",
from_token: "SOL",
to_token: "RAY",
amount: 0.111,
},
utils::Swap {
... | rust_cleaned_test_functions.jsonl/120672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15709,
72690,
643,
8719,
368,
341,
262,
7314,
25368,
486,
6108,
4452,
1006,
286,
330,
49,
8395,
2013,
3022,
6222,
23652,
19625,
19,
756,
286,
7486,
90515,
310,
12439,
486,
46179,
341,
394,
11507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stop_sending_other_error_with_reset() {
let (mut client, mut server, request_stream_id) = connect_and_send_request(false);
// Stop sending with RequestRejected.
assert_eq!(
Ok(()),
server
.conn
.stream_stop... | rust_cleaned_test_functions.jsonl/101903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
643,
2459,
30456,
4096,
6615,
18983,
368,
341,
1789,
286,
1077,
320,
6984,
2943,
11,
5206,
3538,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
3576,
626,
286,
442,
14215,
11628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rm_force() {
let (at, mut ucmd) = testing(UTIL_NAME);
let file_a = "test_rm_force_a";
let file_b = "test_rm_force_b";
let result = ucmd.arg("-f")
.arg(file_a)
.arg(file_b)
.run();
assert_empty_stderr!(result);
... | rust_cleaned_test_functions.jsonl/61414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58537,
40739,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
1034,
4306,
284,
330,
1944,
58537,
40739,
4306,
876,
262,
1077,
1034,
880,
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_escaped_char() {
assert_eq!(
apply(
r#"
'\'' +
"#
.trim()
),
Ok(vec![
Token::Char(span(1, 1, "'\\''")),
Token::Symbol(span(1, 6, "+"))
])
)
} | rust_cleaned_test_functions.jsonl/27569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
65826,
9232,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
1006,
394,
435,
2,
698,
15777,
4605,
3610,
1,
4956,
503,
659,
10666,
741,
310,
2837,
310,
7622,
25592,
90515,
394,
9660,
486,
4768,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_std() {
::init().unwrap();
let mut it = Iterator::from_vec(vec![1i32, 2, 3]).into_iter();
assert_eq!(it.next(), Some(Ok(1)));
assert_eq!(it.next(), Some(Ok(2)));
assert_eq!(it.next(), Some(Ok(3)));
assert_eq!(it.next(), None);
} | rust_cleaned_test_functions.jsonl/50298 | {
"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,
15656,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
1077,
5206,
432,
284,
23023,
486,
1499,
13251,
25592,
20703,
16,
72,
18,
17,
11,
220,
17,
11,
220,
18,
10697,
18122,
11723,
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_index_debug() {
let mut list = VecList::new();
let index = list.push_back(5);
assert_eq!(
format!("{:?}", index),
format!("Index(0, {})", index.generation)
);
} | rust_cleaned_test_functions.jsonl/11490 | {
"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,
3560,
15446,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1077,
1922,
284,
1140,
2552,
3895,
7,
20,
626,
286,
2060,
10714,
33673,
310,
3561,
88928,
25,
52652,
1922,
1326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_current() {
let now = Instant::now();
let not_the_future = now + Duration::from_secs(4);
let future = now + Duration::from_secs(5);
let past_the_future = now + Duration::from_secs(6);
let value = LruValue {
lookup: Err(ResolveErrorKind::Mes... | rust_cleaned_test_functions.jsonl/2126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
11080,
368,
341,
286,
1077,
1431,
284,
18058,
486,
3328,
543,
286,
1077,
537,
16068,
59740,
284,
1431,
488,
21045,
486,
1499,
68718,
7,
19,
317,
286,
1077,
3853,
284,
1431,
488,
21045,
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_yield_rate_period() {
let expected = 0.005_f32;
let invest = Investment::new(10000, 12, 0.06, 0);
assert!(
&expected.approx_eq(&invest.yield_rate_period(), 2.0 * ::std::f32::EPSILON, 2),
"expected: {}, actual: {}",
expected,
... | rust_cleaned_test_functions.jsonl/126190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83709,
9246,
20818,
368,
341,
286,
1077,
3601,
284,
220,
15,
13,
15,
15,
20,
761,
18,
17,
280,
286,
1077,
2725,
284,
32250,
486,
931,
7,
16,
15,
15,
15,
15,
11,
220,
16,
17,
11,
220,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_run_classical_register() {
pyo3::prepare_freethreaded_python();
Python::with_gil(|py| -> () {
let mut circs: Vec<CircuitWrapper> = Vec::new();
circs.push(CircuitWrapper::new());
let mut circ1 = CircuitWrapper::new();
circ1.internal += RotateX::new(0, 0... | rust_cleaned_test_functions.jsonl/8604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 903
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
14007,
4790,
938,
14000,
368,
341,
262,
4510,
78,
18,
486,
13609,
74179,
769,
878,
291,
55869,
543,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
1464,
1719,
341,
286,
1077,
5206,
422... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let cmd = RelayCmd::EXTEND;
assert_eq!(Into::<u8>::into(cmd), 6_u8);
let body = "7F000001 138C
71510FC729E1DBE35586F0031D69A38FC684B26D657821EE640C299BA9F8FD38D3A3376F2DD3A79A0B73836AB4B42E5FB3BEE1383F3184A852B292626DCC64AF672A8FAEFC263C38370768EF9EA6C244B... | rust_cleaned_test_functions.jsonl/66344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 752
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
368,
341,
262,
1077,
5439,
284,
46172,
15613,
486,
5722,
4689,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
220,
21,
7300,
23,
626,
262,
1077,
2487,
284,
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_star_network_pull_50() {
let mut network = star_network_create(50);
let thread_pool = build_gossip_thread_pool();
network_simulator_pull_only(&thread_pool, &mut network);
} | rust_cleaned_test_functions.jsonl/2395 | {
"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,
31681,
20966,
65693,
62,
20,
15,
368,
341,
262,
1077,
5206,
3922,
284,
6774,
20966,
8657,
7,
20,
15,
317,
262,
1077,
4516,
15709,
284,
1936,
1889,
41473,
10814,
15709,
543,
262,
3922,
18314,
105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_aes_siv_cmac256_enc() {
let key = hex::decode("fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0\
f0f1f2f3f4f5f6f7f8f9fafbfcfdfeff").unwrap();
let aad = hex::decode("101112131415161718191a1b1c1d1e1f\
2021222324252627").unwrap();
let plaintext = hex::decode("112233445566778899aab... | rust_cleaned_test_functions.jsonl/78463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 931
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
643,
344,
666,
11948,
17,
20,
21,
13781,
368,
341,
9401,
262,
1077,
1376,
981,
284,
12371,
486,
18196,
445,
14092,
823,
2940,
9792,
13233,
2577,
24,
69,
23,
69,
22,
69,
21,
69,
20,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_votable() {
let (genesis_block, mint_keypair) = GenesisBlock::new(500);
let bank = Arc::new(Bank::new(&genesis_block));
let key1 = Keypair::new();
assert_eq!(bank.is_votable(), false);
// Set is_delta to true
let tx_transfer_mint_to_1 =
... | rust_cleaned_test_functions.jsonl/41910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
2273,
354,
480,
368,
341,
286,
1077,
320,
77894,
7113,
11,
28337,
3097,
12670,
8,
284,
40788,
4713,
486,
931,
7,
20,
15,
15,
317,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
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... | 2 |
#[test]
fn test_set_time_warp() {
let mut environment = CanisterEnv::new();
let start = environment.now();
environment.set_time_warp(TimeWarp { delta_s: 1_000 });
let delta_s = environment.now() - start;
assert!(delta_s >= 1000, "delta_s = {}", delta_s);
assert!(delta_s < 1005, "delta_... | rust_cleaned_test_functions.jsonl/57026 | {
"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,
2602,
3009,
1670,
7876,
368,
341,
262,
1077,
5206,
4573,
284,
2980,
1571,
14359,
486,
931,
1428,
262,
1077,
1191,
284,
4573,
10700,
543,
262,
4573,
980,
3009,
1670,
7876,
36968,
54,
7876,
314,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_and() {
match decode_16(0x401a) {
Instruction::AND_reg { params, thumb32 } => {
assert_eq!(params.rd, Reg::R2);
assert_eq!(params.rn, Reg::R2);
assert_eq!(params.rm, Reg::R3);
assert_eq!(thumb32, false);
assert_e... | rust_cleaned_test_functions.jsonl/64776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
8378,
368,
341,
1066,
262,
2432,
16895,
62,
16,
21,
7,
15,
87,
19,
15,
16,
64,
8,
341,
286,
29051,
486,
3976,
4920,
314,
3628,
11,
24050,
18,
17,
335,
589,
341,
310,
2060,
10714,
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_should_panic_non_string_message_type() {
use crate::tests::TrFailedMsg;
use std::any::TypeId;
fn f() {
std::panic::panic_any(1i32);
}
let expected = "foobar";
let failed_msg = format!(
r#"expected panic with string value,
found non-string value: `{:?}`
... | rust_cleaned_test_functions.jsonl/7705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
620,
31270,
21637,
3904,
6462,
1819,
368,
341,
262,
990,
17717,
486,
23841,
486,
1282,
9408,
6611,
280,
262,
990,
1460,
486,
3767,
486,
31934,
280,
262,
5168,
282,
368,
341,
286,
1460,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_can_validate_option_fields_without_lifetime() {
let instance = ParentWithOptionalChild { child: Some(Child { value: String::new() }) };
let res = instance.validate();
assert!(res.is_err());
let err = res.unwrap_err();
let errs = err.errors();
assert_eq!(errs.len(), 1);
... | rust_cleaned_test_functions.jsonl/779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
42681,
9672,
12132,
39904,
98827,
368,
341,
262,
1077,
2867,
284,
17022,
2354,
15309,
3652,
314,
1682,
25,
4329,
7,
3652,
314,
897,
25,
923,
486,
931,
368,
6413,
3634,
262,
1077,
592,
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... | 3 |
#[test]
fn test_read_holding_registers() {
let (_s, cfg) = start_dummy_server_with_cfg();
let mut trans = Transport::new_with_cfg("127.0.0.1", cfg).unwrap();
assert_eq!(trans.read_holding_registers(0, 5).unwrap().len(), 5);
assert!(trans.read_holding_registers(0, 5).unwrap().iter... | rust_cleaned_test_functions.jsonl/46834 | {
"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,
6443,
1523,
14995,
78360,
368,
341,
286,
1077,
5453,
82,
11,
13286,
8,
284,
1191,
60321,
12015,
6615,
18343,
543,
286,
1077,
5206,
1356,
284,
16742,
486,
931,
6615,
18343,
445,
16,
17,
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_empty_statement() {
let src = r#"
;;;let a = 10;;
if(a) ;
a
"#;
assert_eq!(&exec(src), "10");
} | rust_cleaned_test_functions.jsonl/39568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
37404,
368,
341,
262,
1077,
2286,
284,
435,
2,
698,
286,
2587,
6768,
1149,
264,
284,
220,
16,
15,
28207,
286,
421,
2877,
8,
4386,
286,
264,
198,
262,
5869,
280,
262,
2060,
10714,
0,
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 |
#[test]
fn test_state_info_update() {
fn update_delta(port: Delta<StateEvent>, system: Delta<SystemState>) -> StateDelta {
StateDelta {
port: IpVersions { ipv4: port.clone(), ipv6: port },
system: IpVersions { ipv4: system.clone(), ipv6: system },
... | rust_cleaned_test_functions.jsonl/64394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1438
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
3109,
8882,
368,
341,
286,
5168,
2647,
26710,
21230,
25,
24957,
62201,
1556,
8066,
1849,
25,
24957,
30721,
1397,
9231,
1464,
3234,
20277,
341,
310,
3234,
20277,
341,
394,
2635,
25,
35033,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mm_anon() {
let siz = 1024 * 1024;
let addr = mm_anon(siz).unwrap();
unsafe {
assert_eq!(*(addr.offset((siz - 1) as isize) as *const u8), 0u8);
}
} | rust_cleaned_test_functions.jsonl/91343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35599,
12008,
263,
368,
341,
286,
1077,
64896,
284,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
280,
286,
1077,
10789,
284,
9465,
12008,
263,
1141,
449,
568,
15454,
543,
286,
19860,
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_lif_manager_add_same_name() {
let mut lm = LIFManager::new();
let l = LIF::new(3, LIFType::LAN, "lan1", PortId::from(0), vec![PortId::from(1)], 0, None)
.unwrap();
lm.add_lif(&l).unwrap();
let l = LIF::new(4, LIFType::LAN, "lan1", PortId::from(0), vec!... | rust_cleaned_test_functions.jsonl/81914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
333,
12144,
2891,
33574,
1269,
368,
341,
286,
1077,
5206,
40238,
284,
444,
2773,
2043,
486,
931,
543,
286,
1077,
326,
284,
444,
2773,
486,
931,
7,
18,
11,
444,
2773,
929,
486,
23408,
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_rfc6979_sample() {
let msg = "sample";
let k = "A6E3C57DD01ABE90086538398355DD4C3B17AA873382B0F24D6129493D8AAD60";
let r = "EFD48B2AACB6A8FD1140DD9CD45E81D69D2C877B56AAF991C34D0EA84EAF3716";
let s = "F7CB1C942D657C41D436C7A1B6E29F65F3E900DBB9AFF4064DC4AB2F843ACDA8... | rust_cleaned_test_functions.jsonl/81724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
8316,
21,
24,
22,
24,
17491,
368,
341,
286,
1077,
3750,
284,
330,
13611,
876,
286,
1077,
595,
284,
330,
32,
21,
36,
18,
34,
20,
22,
4103,
15,
16,
1867,
36,
24,
15,
15,
23,
21,
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_find_saves_node() {
let node_table = DummyNodeTable { node: None };
let mut svc: Service<TestsIdType, net::SocketAddr, DummyNodeTable, String> =
Service::new(node_table);
let node = test::new_node(test::make_id(43));
assert!(svc.handler.on_find_node(&... | rust_cleaned_test_functions.jsonl/110956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
643,
4693,
5084,
368,
341,
286,
1077,
2436,
5237,
284,
50567,
1955,
2556,
314,
2436,
25,
2240,
2605,
286,
1077,
5206,
46154,
25,
5362,
27,
18200,
764,
929,
11,
4179,
486,
10286,
13986,
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_insert_all() {
let mut map = MultiMap::new();
map.insert("a", "b");
map.insert_all("a", vec!["c"], false);
map.insert_all("a", vec!["d"], false);
assert_eq!(*map.get("a").unwrap(), vec!["b", "c", "d"]);
let replace = map.insert_all("a", vec!["e"], true);
assert_e... | rust_cleaned_test_functions.jsonl/134333 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
5705,
368,
341,
262,
1077,
5206,
2415,
284,
17439,
2227,
486,
931,
1428,
262,
2415,
7030,
445,
64,
497,
330,
65,
3071,
262,
2415,
7030,
5705,
445,
64,
497,
7486,
0,
1183,
66,
7914,
895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_count() {
use rand::thread_rng;
use rand::Rng;
use rand::seq::SliceRandom;
use std::collections::HashMap;
TIMER.run();
let mut rng = thread_rng();
let count = Arc::new(AtomicUsize::new(0));
let mut timer_refs = vec![];
let mut timer_map = HashMap::new();
... | rust_cleaned_test_functions.jsonl/507 | {
"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,
3180,
368,
972,
262,
990,
10382,
486,
4528,
66849,
463,
262,
990,
10382,
486,
49,
968,
463,
41819,
10382,
486,
13262,
486,
33236,
13999,
463,
41819,
1460,
486,
51137,
486,
18497,
1926,
262,
49931,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_benchmarks() {
ExtBuilder::build_with(|storage| {
pallet_balances::GenesisConfig::<Test, pallet_balances::Instance1> {
balances: vec![
(account("Origin", 0, 0), 1 << 32),
(account("Vault", 0, 0), 1 << 32),
... | rust_cleaned_test_functions.jsonl/43779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
15544,
368,
341,
286,
9447,
3297,
486,
5834,
6615,
22428,
16172,
91,
341,
310,
58803,
56441,
3020,
486,
84652,
2648,
27638,
2271,
11,
58803,
56441,
3020,
486,
2523,
16,
29,
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... | 2 |
#[test]
fn test_neuron_spawn() {
let from = *TEST_NEURON_1_OWNER_PRINCIPAL;
// Compute the subaccount to which the transfer would have been made
let nonce = 1234u64;
let block_height = 543212234;
let dissolve_delay_seconds = MIN_DISSOLVE_DELAY_FOR_VOTE_ELIGIBILITY_SECONDS;
let neuron_st... | rust_cleaned_test_functions.jsonl/1161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1716
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
36090,
76026,
368,
341,
262,
1077,
504,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
442,
22603,
279,
1186,
4608,
311,
892,
279,
8317,
1035,
614,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_start_training_selected_participant() {
let mut protocol = Protocol::new(get_default_fl_settings());
let resp = protocol.start_training(ClientState::Selected);
assert_eq!(StartTrainingResponse::Accept, resp);
assert!(protocol.next_event().is_none());
} | rust_cleaned_test_functions.jsonl/97780 | {
"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,
4906,
32891,
23755,
10495,
21757,
368,
341,
286,
1077,
5206,
11507,
284,
24572,
486,
931,
5433,
9993,
5081,
10853,
5231,
286,
1077,
9039,
284,
11507,
4962,
32891,
46851,
1397,
486,
6316,
626,
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 |
#[test]
fn test_issue_203() {
struct Bar(RwLock<()>);
impl Drop for Bar {
fn drop(&mut self) {
let _n = self.0.write();
}
}
thread_local! {
static B: Bar = Bar(RwLock::new(()));
}
thread::spawn(|| {
... | rust_cleaned_test_functions.jsonl/15765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
17,
15,
18,
368,
341,
286,
2036,
4716,
2785,
86,
11989,
71698,
626,
286,
11605,
15733,
369,
4716,
341,
310,
5168,
5943,
2099,
6984,
656,
8,
341,
394,
1077,
716,
77,
284,
656,
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_cipher_filter() {
let ecdhe_ciphers: Vec<&TlsCipherSuite> = CIPHERS
.values()
.filter(|c| c.kx == TlsCipherKx::Ecdhe)
.collect();
assert!(ecdhe_ciphers.len() > 20);
} | rust_cleaned_test_functions.jsonl/37915 | {
"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,
76692,
8727,
368,
341,
286,
1077,
384,
4385,
383,
666,
82077,
25,
11312,
52244,
51,
4730,
79460,
28000,
29,
284,
356,
58088,
50,
198,
310,
659,
3661,
741,
310,
659,
5315,
22428,
66,
91,
272,
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_url_1() {
test_url("/npoplayer.html?tx_eonpo_npoplayer%5Bmid%5D=WO_EO_16582885&tx_eonpo_npoplayer%5Bhash%5D=45a69ca57ac8eee5025d45f06f9910f85fd9a0db814c590fg560293d<549880f&tx_eonpo_npoplayer%5Boverlay%5D=https%3A%2F%2Fblauwbloed.eo.nl%2Ffileadmin%2Fbestanden-2016%2Fuser_upload%2F2021-07... | rust_cleaned_test_functions.jsonl/23709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 464
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
62,
16,
368,
341,
286,
1273,
2903,
4283,
6199,
93108,
2564,
30,
3998,
2204,
263,
5368,
1089,
8374,
10333,
4,
20,
33,
16106,
4,
20,
35,
28,
22681,
2089,
46,
62,
16,
21,
20,
23,
17,
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... | 1 |
#[test]
fn test_hover_return_impl_traits_has_goto_type_action() {
check_actions(
r#"
trait Foo {}
trait Bar {}
fn foo() -> impl Foo + Bar {}
fn main() { let s$0t = foo(); }
"#,
expect![[r#"
[
GoToType(
[
... | rust_cleaned_test_functions.jsonl/66676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
12511,
21007,
39693,
21778,
97732,
1819,
7931,
368,
341,
286,
1779,
25368,
1006,
310,
435,
2,
698,
29432,
33428,
5613,
29432,
4716,
5613,
8822,
15229,
368,
1464,
11605,
33428,
488,
4716,
1008... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_open_subkey_with_flags_query_info() {
let hklm = RegKey::predef(HKEY_LOCAL_MACHINE);
let win = hklm
.open_subkey_with_flags("Software\\Microsoft\\Windows", KEY_READ)
.unwrap();
let info = win.query_info().unwrap();
info.get_last_write_time_system();
#[cfg(fea... | rust_cleaned_test_functions.jsonl/128082 | {
"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,
11311,
5228,
792,
6615,
14130,
5738,
3109,
368,
341,
262,
1077,
305,
10561,
76,
284,
3184,
1592,
486,
1726,
750,
10896,
4784,
28399,
66702,
317,
262,
1077,
3164,
284,
305,
10561,
76,
198,
286,
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_utf_16le_decode_near_end() {
let mut output = [0u8; 4];
let mut decoder = UTF_16LE.new_decoder();
{
let (result, read, written, had_errors) =
decoder.decode_to_utf8(&[0x03], &mut output[..], false);
assert_eq!(result, CoderResult::I... | rust_cleaned_test_functions.jsonl/86902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39453,
62,
16,
21,
273,
15227,
76340,
6213,
368,
341,
286,
1077,
5206,
2550,
284,
508,
15,
84,
23,
26,
220,
19,
935,
286,
1077,
5206,
24551,
284,
20076,
62,
16,
21,
867,
4618,
49843,
543,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_combo_option() {
let m = UciMessage::Option(UciOptionConfig::Combo {
name: "Style".to_string(),
default: Some(String::from("Normal")),
var: vec![String::from("Solid"), String::from("Normal"), String::from("Risky")],
});
asser... | rust_cleaned_test_functions.jsonl/19052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
54781,
9672,
368,
341,
286,
1077,
296,
284,
547,
5855,
2052,
486,
5341,
12317,
5855,
5341,
2648,
486,
56893,
341,
310,
829,
25,
330,
2323,
3263,
983,
3904,
3148,
310,
1638,
25,
4329,
2242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_specfile() {
let specfile = super::test_utils::file("logspec.toml");
std::fs::remove_file(&specfile).ok();
assert!(!specfile.exists());
let logger = Logger::try_with_str("info")
.unwrap()
.log_to_file(
FileSpec::default()
... | rust_cleaned_test_functions.jsonl/125196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2012
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13594,
1192,
368,
341,
286,
1077,
1398,
1192,
284,
2256,
486,
1944,
17309,
486,
1192,
445,
839,
9535,
73494,
75,
3071,
286,
1460,
486,
3848,
486,
5399,
2458,
2099,
9535,
1192,
568,
562,
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... | 2 |
#[test]
fn test_guide_library_positive() {
let g1 = Guide::new(0, "foo-1", "ACGTCAGCATGCATGACGTT", "FOO", GuideType::Other);
let g2 = Guide::new(1, "foo-2", "GCTAGACTGGACTCTAATGC", "FOO", GuideType::Other);
let l1 = GuideLibrary::new(vec![]).unwrap();
assert_eq!(l1.len(), 0);
... | rust_cleaned_test_functions.jsonl/48767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80407,
39461,
54160,
368,
341,
286,
1077,
342,
16,
284,
12712,
486,
931,
7,
15,
11,
330,
7975,
12,
16,
497,
330,
1706,
38,
7749,
1890,
28196,
22863,
828,
38,
1706,
38,
14903,
497,
330,
3788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_many_categorys() {
let enc = build_fake_str_enc();
let cat_it = ["dog", "cat", "fish", "background"].iter().cloned();
let res: Vec<Option<Vec<f64>>> = cat_it.map(|v| enc.get_one_hot(&v)).collect();
let v = vec![
Some(vec![0.0, 1.0, 0.0]),
S... | rust_cleaned_test_functions.jsonl/109963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22101,
11847,
82,
368,
341,
286,
1077,
3209,
284,
1936,
56881,
2895,
13781,
543,
286,
1077,
8251,
14631,
284,
4383,
18457,
497,
330,
4616,
497,
330,
18170,
497,
330,
6742,
5521,
2015,
1005,
564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_catchable() {
#[derive(Debug, Display, Clone)]
enum MainErrorKind {
A1,
#[allow(dead_code)]
A2,
}
impl Error for MainErrorKind {};
impl From<MainErrorKind> for CommonError {
fn from(error: MainErrorKind) -> Self {
CommonError::new(CommonErrorKind::Main, Box::new(error))... | rust_cleaned_test_functions.jsonl/103847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
754,
480,
368,
341,
197,
197,
13353,
27098,
42618,
11,
10623,
11,
27913,
5563,
197,
37777,
4697,
1454,
10629,
341,
298,
22985,
16,
345,
298,
197,
13353,
7183,
83207,
4136,
5563,
298,
22985,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_spaces() {
let mut reader = Lexer::from_str("1 2 3");
assert_tok(
&mut reader,
TokenKind::LitInt("1".into(), IntBase::Dec, IntSuffix::Int),
1,
1,
);
assert_tok(
&mut reader,
TokenKin... | rust_cleaned_test_functions.jsonl/101124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
6615,
67883,
368,
341,
286,
1077,
5206,
6604,
284,
85082,
486,
1499,
2895,
445,
16,
220,
17,
220,
18,
797,
286,
2060,
76162,
1006,
310,
609,
6984,
6604,
345,
310,
9660,
10629,
486,
68954,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_passfile() -> Result<()> {
let user = "user";
let pass = "pass";
let path = create_passfile(&UserConfig::new(user.into(), pass.into()))?;
let buf = read(&path)?;
let s = String::from_utf8(buf)?;
assert_eq!(s, format!("{}+plc\n{}\n", user, pass));
let output = Command::new("/usr/b... | rust_cleaned_test_functions.jsonl/102213 | {
"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,
15464,
1192,
368,
1464,
5714,
71698,
341,
197,
10217,
1196,
284,
330,
872,
876,
197,
10217,
1494,
284,
330,
6385,
876,
197,
10217,
1815,
284,
1855,
15464,
1192,
2099,
1474,
2648,
486,
931,
4277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_optopt() {
let long_args = vec!("--test=20".to_string());
let opts = vec!(optopt("t", "test", "testing", "TEST"));
let rs = getopts(long_args.as_slice(), opts.as_slice());
match rs {
Ok(ref m) => {
assert!(m.opt_present("test"));
... | rust_cleaned_test_functions.jsonl/11179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 505
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
2912,
368,
341,
286,
1077,
1293,
8384,
284,
7486,
17223,
313,
1944,
28,
17,
15,
3263,
983,
3904,
1423,
286,
1077,
12185,
284,
7486,
10297,
2912,
2912,
445,
83,
497,
330,
1944,
497,
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... | 3 |
#[test]
fn test_parsing_after_editing_end_of_code() {
let mut parser = Parser::new();
parser.set_language(get_language("javascript")).unwrap();
let mut code = b"x * (100 + abc);".to_vec();
let mut tree = parser.parse(&code, None).unwrap();
assert_eq!(
tree.root_node().to_sexp(),
... | rust_cleaned_test_functions.jsonl/15867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 666
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
19844,
13156,
287,
6213,
3575,
4136,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
14073,
15197,
15454,
1428,
262,
1077,
5206,
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_grounding_not_3() -> TestResult {
test_grounding(
r#"
f(x) if x > 0 and not (x >= 1 and x = 1);
"#,
term!(call!("f", [sym!("x")])),
&[|r: Bindings| {
assert_partial_expression!(r, "x... | rust_cleaned_test_functions.jsonl/63052 | {
"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,
72492,
287,
7913,
62,
18,
368,
1464,
3393,
2077,
341,
286,
1273,
72492,
287,
1006,
310,
435,
2,
698,
310,
282,
2075,
8,
421,
856,
861,
220,
15,
323,
537,
320,
87,
2604,
220,
16,
323,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_args_lr_update_rate() {
let mut args = Args::new();
assert_eq!(100, args.lr_update_rate());
args.set_lr_update_rate(50);
assert_eq!(50, args.lr_update_rate());
} | rust_cleaned_test_functions.jsonl/118612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
46086,
8882,
9246,
368,
341,
286,
1077,
5206,
2827,
284,
17693,
486,
931,
543,
286,
2060,
10714,
10297,
16,
15,
15,
11,
2827,
63349,
8882,
9246,
5231,
286,
2827,
980,
46086,
8882,
9246,
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 |
#[test]
fn test_memory_transport_server_only_auth() {
test_transport_success(
memory::MemoryTransport,
Auth::ServerOnly,
"/memory/0",
expect_memory_noise_addr,
);
} | rust_cleaned_test_functions.jsonl/14345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
46398,
12015,
18410,
14014,
368,
341,
286,
1273,
46398,
18632,
1006,
310,
4938,
486,
10642,
27560,
345,
310,
7366,
486,
5475,
7308,
345,
310,
3521,
17269,
14,
15,
756,
310,
1720,
19195,
403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_range_of_line_at_position_b() {
let code: Vec<char> = "text\ntext".to_string().chars().collect();
assert_eq!(range_of_line_at_position(&code, 5), 5..9);
let code: Vec<char> = "text\ntext".to_string().chars().collect();
assert_eq!(range_of_line_at_position(&code, ... | rust_cleaned_test_functions.jsonl/126884 | {
"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,
9698,
3575,
6528,
3752,
9661,
880,
368,
341,
286,
1077,
2038,
25,
11312,
21919,
29,
284,
330,
1318,
59,
406,
427,
3263,
983,
3904,
1005,
19255,
1005,
17384,
543,
286,
2060,
10714,
10297,
9669,
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_integration() {
let expr = ExprDefBuilder::aggr_func(ExprType::Sum, FieldTypeTp::Double)
.push_child(ExprDefBuilder::column_ref(0, FieldTypeTp::VarString))
.build();
AggrFnDefinitionParserSum.check_supported(&expr).unwrap();
let src_schema = [Fiel... | rust_cleaned_test_functions.jsonl/110901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 921
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90250,
368,
341,
286,
1077,
15169,
284,
28819,
2620,
3297,
486,
351,
901,
9596,
7,
16041,
929,
486,
9190,
11,
84614,
62241,
486,
7378,
340,
310,
659,
9077,
17268,
7,
16041,
2620,
3297,
486,
6229... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct() {
ok("struct Foo {}");
err(
"struct Foo {} struct Foo {}",
pos(1, 15),
Msg::ShadowStruct("Foo".into()),
);
err(
"struct Foo {} class Foo {}",
pos(1, 15),
Msg::ShadowStruct("Foo".into(... | rust_cleaned_test_functions.jsonl/45236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
368,
341,
286,
5394,
445,
1235,
33428,
4687,
797,
286,
1848,
1006,
310,
330,
1235,
33428,
4687,
2036,
33428,
4687,
756,
310,
1133,
7,
16,
11,
220,
16,
20,
1326,
310,
24205,
486,
23667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hand_evaluation() {
let g = test_helpers::create_test_bid_phase();
// User: ♣2 ♣6 ♣9 ♣10 ♣A ♥6 ♥9 ♥10 ♥A ♠2 ♠7 ♠8 ♠K
assert_eq!(
hand_evaluation(hand_score(g.hand(Position::User)), Some(Suit::Clubs)),
BidResponse::HandEvaluation(HandRating::Excell... | rust_cleaned_test_functions.jsonl/83222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23194,
86505,
368,
341,
286,
1077,
342,
284,
1273,
54473,
486,
3182,
4452,
62509,
37593,
543,
286,
442,
2657,
25,
220,
35358,
96,
17,
35358,
96,
21,
35358,
96,
24,
35358,
96,
16,
15,
35358,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let a = Bump::new();
assert_eq!(Map::<i64, i64>::from(&a, Vec::new()), map![]);
assert_eq!(
Map::<i64, i64>::from(&a, vec![(6, 7), (8, 9)]),
map![&a; 8 => 9, 6 => 7]
);
} | rust_cleaned_test_functions.jsonl/118072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
368,
341,
286,
1077,
264,
284,
425,
1510,
486,
931,
543,
286,
2060,
10714,
10297,
2227,
27638,
72,
21,
19,
11,
600,
21,
19,
6831,
1499,
2099,
64,
11,
11312,
486,
931,
11858,
2415,
0,
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_directed_bounds() {
// if shift and expand operation have reached the end of the vecs an error should be returned
let mut lsh = hi8::LshMem::new(2, 1, 1).multi_probe(1000).l2(4.).unwrap();
lsh.store_vec(&[1.]).unwrap();
assert!(lsh.query_bucket_ids(&[1.]).is... | rust_cleaned_test_functions.jsonl/107651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
32871,
291,
36878,
368,
341,
286,
442,
421,
6407,
323,
9225,
5666,
614,
8643,
279,
835,
315,
279,
7486,
82,
458,
1465,
1265,
387,
5927,
198,
286,
1077,
5206,
326,
927,
284,
15588,
23,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generated() {
let mut rng = StdRng::seed_from_u64(0);
let mut n_pixels = 0;
while n_pixels < 20_000_000 {
let min_len = rng.gen_range(1..=5000);
let channels = rng.gen_range(3..=4);
let gen = ImageGen::new_random(&mut rng);
let img = gen.generate(&mut... | rust_cleaned_test_functions.jsonl/27216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67313,
368,
341,
262,
1077,
5206,
28422,
284,
42517,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
15,
626,
262,
1077,
5206,
308,
49745,
284,
220,
15,
280,
262,
1393,
308,
49745,
366,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_to_vec() {
Python::with_gil(|py| {
let src = b"Hello Python";
let bytearray = PyByteArray::new(py, src);
let vec = bytearray.to_vec();
assert_eq!(src, vec.as_slice());
});
} | rust_cleaned_test_functions.jsonl/47842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
13251,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
2286,
284,
293,
1,
9707,
13027,
876,
310,
1077,
95603,
284,
5355,
18394,
486,
931,
46827,
11,
2286,
626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doesnt_accept_wrong_proto() {
#[cfg(feature = "proto-ipv4")]
{
let socket = RawSocket::new(
IpVersion::Ipv4,
IpProtocol::Unknown(ipv4_locals::IP_PROTO + 1),
buffer(1),
buffer(1),
);
... | rust_cleaned_test_functions.jsonl/7287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 572
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96374,
406,
35728,
75198,
37689,
368,
341,
286,
11506,
14072,
27062,
284,
330,
15110,
12,
42676,
19,
5422,
286,
341,
310,
1077,
7575,
284,
23022,
10286,
486,
931,
1006,
394,
35033,
5637,
486,
8065... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slice_range() {
let data = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
assert_eq!(get_slice_range(data, 0..6).unwrap(), &[0, 1, 2, 3, 4, 5]);
assert_eq!(get_slice_range(data, 7..10).unwrap(), &[7, 8, 9]);
get_slice_range(data, 5..15).unwrap_err();
get_slice_range... | rust_cleaned_test_functions.jsonl/100520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
26488,
9698,
368,
341,
286,
1077,
821,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
935,
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_straight_flush_ranks() {
test(&["4H 6H 7H 8H 5H", "5S 7S 8S 9S 6S"], &["5S 7S 8S 9S 6S"])
} | rust_cleaned_test_functions.jsonl/49921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
7386,
39213,
1710,
4039,
368,
341,
1066,
262,
1273,
2099,
1183,
19,
39,
220,
21,
39,
220,
22,
39,
220,
23,
39,
220,
20,
39,
497,
330,
20,
50,
220,
22,
50,
220,
23,
50,
220,
24,
50,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_client_state_failed_by_supply_error_client_id() {
let gp_client_id = ClientId::new(ClientType::Grandpa, 0).unwrap();
let gp_client_id_failed = ClientId::new(ClientType::Grandpa, 1).unwrap();
let gp_client_state = GPClientState::new(
ChainId::new("ibc".to_string(), 0),
Height::default... | rust_cleaned_test_functions.jsonl/60059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
8179,
4387,
35060,
3710,
65630,
4096,
8179,
842,
368,
341,
10217,
28705,
8179,
842,
284,
8423,
764,
486,
931,
46851,
929,
486,
40151,
6595,
11,
220,
15,
568,
15454,
543,
10217,
28705,
8179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_try_map() {
// One - OK
let one: OneOrSet<MockKeyU8> = OneOrSet::new_one(MockKeyU8(1));
let one_add: OneOrSet<MockKeyU8> = one
.try_map(|item| {
if item.key() == &1 {
Ok(MockKeyU8(item.0 + 1))
} else {
Err(Error::OneOrSetEmpty)
}
... | rust_cleaned_test_functions.jsonl/5924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5376,
368,
341,
262,
442,
3776,
481,
10402,
198,
262,
1077,
825,
25,
3776,
2195,
1649,
27,
11571,
1592,
52,
23,
29,
284,
3776,
2195,
1649,
486,
931,
11667,
66436,
1592,
52,
23,
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... | 6 |
#[test]
fn test_position() {
let b = [1, 2, 3, 5, 5];
assert_eq!(b.iter().position(|&v| v == 9), None);
assert_eq!(b.iter().position(|&v| v == 5), Some(3));
assert_eq!(b.iter().position(|&v| v == 3), Some(2));
assert_eq!(b.iter().position(|&v| v == 0), None);
} | rust_cleaned_test_functions.jsonl/9607 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9661,
368,
341,
262,
1077,
293,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
11,
220,
20,
935,
262,
2060,
10714,
10297,
65,
19471,
1005,
3487,
22428,
5,
85,
91,
348,
621,
220,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_security_feature_from_str() {
assert_eq!(SecurityFeature::from_str("nat").unwrap(), SecurityFeature::NAT);
assert_eq!(SecurityFeature::from_str("NAT").unwrap(), SecurityFeature::NAT);
assert_eq!(SecurityFeature::from_str("NaT").unwrap(), SecurityFeature::NAT);
ass... | rust_cleaned_test_functions.jsonl/112937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48726,
17069,
5673,
2895,
368,
341,
286,
2060,
10714,
10297,
15352,
13859,
486,
1499,
2895,
445,
33297,
1827,
15454,
1507,
8234,
13859,
486,
45,
828,
317,
286,
2060,
10714,
10297,
15352,
13859,
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_g1_generator() {
let generator = G1Affine::prime_subgroup_generator();
assert!(generator.is_on_curve());
assert!(generator.is_in_correct_subgroup_assuming_on_curve());
} | rust_cleaned_test_functions.jsonl/15276 | {
"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,
1889,
16,
25813,
368,
341,
262,
1077,
13823,
284,
479,
16,
25841,
482,
486,
32338,
5228,
4074,
25813,
543,
262,
2060,
10297,
35851,
2079,
4470,
43407,
1423,
262,
2060,
10297,
35851,
2079,
1243,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_if_not_endif() {
let text = "{{ if not foo }}Hello!{{ endif }}";
let instructions = compile(text).unwrap();
assert_eq!(2, instructions.len());
assert_eq!(&Branch(vec!["foo"], false, 2), &instructions[0]);
assert_eq!(&Literal("Hello!"), &instructions[1... | rust_cleaned_test_functions.jsonl/131990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
7913,
62,
2330,
368,
972,
286,
1077,
1467,
284,
47219,
421,
537,
15229,
3869,
9707,
0,
2979,
12330,
3869,
3534,
286,
1077,
11221,
284,
19192,
7235,
568,
15454,
1647,
286,
2060,
10714,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mut_chunks_exact_0() {
let mut v = [1, 2, 3, 4];
let _it = v.chunks_exact_mut(0);
} | rust_cleaned_test_functions.jsonl/12927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 64
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
65470,
71084,
62,
15,
368,
341,
262,
1077,
5206,
348,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
1077,
716,
275,
284,
348,
5329,
15296,
71084,
29523,
7,
15,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_truncate() {
let mut v: Vec<Box<_>> = vec![Box::new(6), Box::new(5), Box::new(4)];
v.truncate(1);
let v = v;
assert_eq!(v.len(), 1);
assert_eq!(*(v[0]), 6);
} | rust_cleaned_test_functions.jsonl/80755 | {
"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,
3547,
26900,
368,
341,
262,
1077,
5206,
348,
25,
11312,
79852,
32399,
2452,
284,
7486,
20703,
1611,
486,
931,
7,
21,
701,
8261,
486,
931,
7,
20,
701,
8261,
486,
931,
7,
19,
12587,
262,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_deserialize() {
use self::serde_json::from_str;
use Month::*;
let cases: Vec<(&str, Month)> = vec![
("\"january\"", January),
("\"jan\"", January),
("\"FeB\"", February),
("\"MAR\"", March),
("\"mar\"", Ma... | rust_cleaned_test_functions.jsonl/92414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
15768,
9050,
368,
341,
286,
990,
656,
486,
47024,
9455,
486,
1499,
2895,
280,
286,
990,
19397,
79304,
286,
1077,
5048,
25,
11312,
27,
2099,
495,
11,
19397,
16018,
284,
7486,
90515,
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... | 3 |
#[test]
fn test_hash_sha2_256() {
let mut output = [0x00_u8; 32];
sha2_256(TEST_INPUT, &mut output);
assert_eq!(
output,
[
136, 15, 25, 218, 88, 54, 49, 152, 115, 168, 147, 189, 207, 171, 243,
129, 161, 76, 15, 141, 197, 106, 111, 2... | rust_cleaned_test_functions.jsonl/37532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
48836,
17,
62,
17,
20,
21,
368,
341,
286,
1077,
5206,
2550,
284,
508,
15,
87,
15,
15,
7300,
23,
26,
220,
18,
17,
935,
286,
15870,
17,
62,
17,
20,
21,
50320,
21022,
11,
609,
6984,
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_get_coefficients() {
let x = DMatrix::from_vec(5, 1, vec![2_f64, 1., 3., 4., 5.]);
let y = DMatrix::from_vec(5, 1, vec![1_f64, 2., 3., 4., 5.]);
let result = get_coefficients(&x, &y);
assert_approx_eq!(result[(0)], 0.9818181818181818);
let x = DMatrix::fr... | rust_cleaned_test_functions.jsonl/6779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
31990,
28142,
368,
341,
286,
1077,
856,
284,
422,
6689,
486,
1499,
13251,
7,
20,
11,
220,
16,
11,
7486,
20703,
17,
761,
21,
19,
11,
220,
16,
2572,
220,
18,
2572,
220,
19,
2572,
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_two_longs() {
assert_eq!(sum_two_longs(-600000, 700000), 100000);
} | rust_cleaned_test_functions.jsonl/123613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 58
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
23241,
907,
13181,
368,
972,
286,
2060,
10714,
10297,
1242,
23241,
907,
13181,
4080,
21,
15,
15,
15,
15,
15,
11,
220,
22,
15,
15,
15,
15,
15,
701,
220,
16,
15,
15,
15,
15,
15,
736,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_buffer_wraparound_tx() {
let mut s = socket_established();
s.tx_buffer = SocketBuffer::new(vec![b'.'; 9]);
assert_eq!(s.send_slice(b"xxxyyy"), Ok(6));
assert_eq!(s.tx_buffer.dequeue_many(3), &b"xxx"[..]);
assert_eq!(s.tx_buffer.len(), 3);
// "abcd... | rust_cleaned_test_functions.jsonl/91918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
38550,
19454,
17805,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
33807,
7776,
284,
20954,
4095,
486,
931,
25592,
20703,
65,
6,
3159,
26,
220,
24,
2558,
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_buffered_reader_seek_relative() {
let inner: &[u8] = &[5, 6, 7, 0, 1, 2, 3, 4];
let mut reader = BufReader::with_capacity(2, io::Cursor::new(inner));
assert!(reader.seek_relative(3).is_ok());
assert_eq!(reader.fill_buf().ok(), Some(&[0, 1][..]));
assert!(... | rust_cleaned_test_functions.jsonl/17434 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
291,
22306,
74473,
29286,
368,
341,
286,
1077,
9179,
25,
44590,
84,
23,
60,
284,
44590,
20,
11,
220,
21,
11,
220,
22,
11,
220,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prewrite_committed_encounter_newer_lock() {
let engine = TestEngineBuilder::new().build().unwrap();
let mut statistics = Statistics::default();
let k1 = b"k1";
let v1 = b"v1";
let v2 = b"v2";
must_prewrite_put_async_commit(&engine, k1, v1, k1, &S... | rust_cleaned_test_functions.jsonl/31436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
52473,
2965,
5483,
13781,
39914,
5921,
261,
9818,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
5206,
13142,
284,
24624,
486,
2258,
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... | 2 |
#[test]
fn test_overlap() {
let cube_a = Cuboid {
lower: [1, 1, 1],
upper: [4, 4, 4],
};
let cube_b = Cuboid {
lower: [2, 2, 2],
upper: [3, 3, 3],
};
let mut new_cubes = Vec::new();
// B is fully inside A so it sh... | rust_cleaned_test_functions.jsonl/93684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65794,
368,
341,
286,
1077,
23739,
4306,
284,
18030,
588,
341,
310,
4722,
25,
508,
16,
11,
220,
16,
11,
220,
16,
1259,
310,
8416,
25,
508,
19,
11,
220,
19,
11,
220,
19,
1259,
286,
3634,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into() {
let v = QUATERNION;
{
let v: [f32; 4] = v.into();
assert_eq!(v, [1.0, 2.0, 3.0, 4.0]);
}
{
let v: (f32, f32, f32, f32) = v.into();
assert_eq!(v, (1.0, 2.0, 3.0, 4.0));
}
} | rust_cleaned_test_functions.jsonl/15342 | {
"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,
45514,
368,
341,
286,
1077,
348,
284,
25999,
828,
13660,
1271,
280,
286,
341,
310,
1077,
348,
25,
508,
69,
18,
17,
26,
220,
19,
60,
284,
348,
39860,
543,
310,
2060,
10714,
10297,
85,
11,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_qmp_event_msg() {
let event_json =
r#"{"event":"STOP","data":{},"timestamp":{"seconds":1575531524,"microseconds":91519}}"#;
let qmp_event: schema::QmpEvent = serde_json::from_str(&event_json).unwrap();
match qmp_event {
schema::QmpEvent::STOP {
... | rust_cleaned_test_functions.jsonl/66356 | {
"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,
8976,
1307,
6748,
6483,
368,
341,
286,
1077,
1538,
9455,
4035,
310,
435,
55543,
4913,
3087,
3252,
50669,
2198,
691,
788,
6257,
1335,
13035,
22317,
17403,
788,
16,
20,
22,
20,
20,
18,
16,
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... | 2 |
#[test]
fn test_pop_sequence_recurrence() {
assert!(!cdll::LinkedList::is_valid_pop_sequence_recurrence(
0,
&[2, 0, 1]
));
assert!(cdll::LinkedList::is_valid_pop_sequence_recurrence(
0,
&[0, 1, 2]
));
assert!(cdll::LinkedLis... | rust_cleaned_test_functions.jsonl/23387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
23735,
7080,
20559,
368,
341,
286,
2060,
0,
3471,
4385,
654,
486,
33915,
486,
285,
8337,
17061,
23735,
7080,
20559,
1006,
310,
220,
15,
345,
310,
44590,
17,
11,
220,
15,
11,
220,
16,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_all_passes_for_module() {
let context = Context::create();
let module = context.create_module("my_module");
let pass_manager = PassManager::create(());
pass_manager.add_argument_promotion_pass();
pass_manager.add_constant_merge_pass();
pass_manager.add_dead_arg_elim... | rust_cleaned_test_functions.jsonl/42667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
5705,
15464,
288,
5478,
10750,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
2408,
10750,
797,
262,
1077,
1494,
12144,
284,
9970,
2043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_established_retransmit_reset_after_ack() {
let mut s = socket_established();
s.remote_win_len = 6;
s.send_slice(b"abcdef").unwrap();
s.send_slice(b"123456").unwrap();
s.send_slice(b"ABCDEF").unwrap();
recv!(s, time 1000, Ok(TcpRepr {
se... | rust_cleaned_test_functions.jsonl/1766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
1288,
1458,
1763,
18983,
19844,
48447,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
34093,
25672,
6043,
284,
220,
21,
280,
286,
274,
5219,
26488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encrypt_decrypt() {
let _ = simple_logger::SimpleLogger::new()
.with_level(log::Level::Info.to_level_filter())
.init();
let plaintext = b"Hello world!Hello world!";
let current_plaintext = *plaintext;
let oracle = PaddingOracle::new(16, 1,... | rust_cleaned_test_functions.jsonl/78891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
80764,
368,
341,
286,
1077,
716,
284,
4285,
27413,
486,
16374,
7395,
486,
931,
741,
310,
659,
4197,
8274,
12531,
486,
4449,
486,
1731,
2389,
8274,
8727,
2398,
310,
659,
2327,
1428,
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_true() {
assert_eq!(
crate::rsass(
"a {b: join(c, d, $bracketed: true)}\
\n"
)
.unwrap(),
"a {\
\n b: [c d];\
\n}\
\n"
);
} | rust_cleaned_test_functions.jsonl/71426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16082,
368,
341,
286,
2060,
10714,
33673,
310,
17717,
486,
5428,
395,
1006,
394,
330,
64,
314,
65,
25,
5138,
1337,
11,
294,
11,
400,
1323,
5709,
291,
25,
830,
9139,
5661,
310,
1124,
77,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_normalize() {
fn t(wp: &PosixPath, s: &str) {
let ss = wp.to_str();
let sss = s.to_owned();
if (ss != sss) {
debug!("got %s", ss);
debug!("expected %s", sss);
assert_eq!(ss, sss);
}
}
... | rust_cleaned_test_functions.jsonl/45744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80807,
368,
341,
286,
5168,
259,
88117,
25,
609,
4859,
941,
1820,
11,
274,
25,
609,
495,
8,
341,
310,
1077,
10870,
284,
12609,
2389,
2895,
543,
310,
1077,
274,
778,
284,
274,
2389,
51973,
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... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.