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_store_missing_index_field() {
let tmp_dir = tempfile::tempdir().unwrap();
let path = tmp_dir.path().join("test_store_invalid_json");
let name = path.to_str().unwrap();
let doc_store =
DocumentStore::open(name, vec![IndexSpec::new("index", vec!["index_f... | rust_cleaned_test_functions.jsonl/110733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
40447,
3560,
5013,
368,
341,
286,
1077,
4174,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
4174,
4334,
3875,
1005,
5987,
445,
1944,
14809,
31433,
9455,
797,
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_kx() {
let (client_pk, client_sk) = gen_keypair();
let (server_pk, server_sk) = gen_keypair();
assert!(client_pk != server_pk);
assert!(client_sk != server_sk);
let (client_rx, client_tx) =
client_session_keys(&client_pk, &client_sk, &server_... | rust_cleaned_test_functions.jsonl/42253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
87,
368,
341,
286,
1077,
320,
2972,
33321,
11,
2943,
33811,
8,
284,
4081,
3097,
12670,
543,
286,
1077,
320,
4030,
33321,
11,
3538,
33811,
8,
284,
4081,
3097,
12670,
1428,
286,
2060,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_name_server() {
env_logger::try_init().ok();
let config = NameServerConfig {
socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(8, 8, 8, 8)), 53),
protocol: Protocol::Udp,
tls_dns_name: None,
};
let mut io_loop = Runtime::ne... | rust_cleaned_test_functions.jsonl/73599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1269,
12015,
368,
341,
286,
6105,
27413,
486,
1539,
6137,
1005,
562,
1428,
286,
1077,
2193,
284,
3988,
5475,
2648,
341,
310,
7575,
7387,
25,
20954,
13986,
486,
931,
8972,
79,
13986,
486,
53,
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_seal_lifecycle_upgrade_32kib_top_8_8_2_v1_1() -> Result<()> {
seal_lifecycle_upgrade::<SectorShape32KiB>(
SECTOR_SIZE_32_KIB,
&ARBITRARY_POREP_ID_V1_1_0,
ApiVersion::V1_1_0,
)
} | rust_cleaned_test_functions.jsonl/114498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
278,
907,
19517,
67794,
62,
18,
17,
74,
579,
10426,
62,
23,
62,
23,
62,
17,
2273,
16,
62,
16,
368,
1464,
5714,
71698,
341,
262,
25349,
907,
19517,
67794,
27638,
68188,
12301,
18,
17,
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_duration_to() {
let tbl = vec![0, 100, 1_000, 5_000, 9999, 1_000_000, 1_000_000_000];
for ms in tbl {
let d = Duration::from_millis(ms);
assert_eq!(ms, duration_to_ms(d));
let exp_sec = ms as f64 / 1000.0;
let act_sec = duration_to_... | rust_cleaned_test_functions.jsonl/21942 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
2346,
368,
341,
286,
1077,
21173,
284,
7486,
20703,
15,
11,
220,
16,
15,
15,
11,
220,
16,
62,
15,
15,
15,
11,
220,
20,
62,
15,
15,
15,
11,
220,
24,
24,
24,
24,
11,
220,
16,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ifnot_taken() {
let template = compile("{{ if not boolean }}Hello!{{ endif }}");
let context = context();
let template_registry = other_templates();
let formatter_registry = formatters();
let string = template
.render(&context, &template_... | rust_cleaned_test_functions.jsonl/2377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
1921,
72933,
368,
972,
286,
1077,
3811,
284,
19192,
445,
2979,
421,
537,
2710,
3869,
9707,
0,
2979,
12330,
3869,
2815,
286,
1077,
2266,
284,
2266,
1647,
286,
1077,
3811,
50650,
284,
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_output_circuit_with_bls12_381() {
use ff::Field;
use pairing::bls12_381::*;
use rand::{SeedableRng, Rng, XorShiftRng};
use ::circuit::test::*;
use jubjub::{JubjubBls12, fs, edwards};
let params = &JubjubBls12::new();
let rng = &mut XorShiftRng::from_seed([0x3dbe6258,... | rust_cleaned_test_functions.jsonl/38831 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
666,
37268,
6615,
880,
4730,
16,
17,
62,
18,
23,
16,
368,
341,
262,
990,
25539,
486,
1877,
280,
262,
990,
47713,
486,
2024,
82,
16,
17,
62,
18,
23,
16,
56162,
262,
990,
10382,
22964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ingest_multiple_file() {
let path_dir = Builder::new()
.prefix("test_ingest_multiple_file")
.tempdir()
.unwrap();
let root_path = path_dir.path();
let db_path = root_path.join("db");
let path_str = db_path.to_str().unwrap();
... | rust_cleaned_test_functions.jsonl/37070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59112,
477,
45233,
2458,
368,
341,
286,
1077,
1815,
4334,
284,
20626,
486,
931,
741,
310,
659,
11849,
445,
1944,
59112,
477,
45233,
2458,
1138,
310,
659,
3888,
3741,
741,
310,
659,
15454,
543,
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... | 5 |
#[test]
fn test_filename_parsing() {
// so "-f" should not be interpreted as a formatting option.
new_ucmd!()
.arg("--format")
.arg("a")
.arg("-A")
.arg("x")
.arg("--")
.arg("-f")
.succeeds()
.no_stderr()
.stdout_is(uninde... | rust_cleaned_test_functions.jsonl/48825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13323,
620,
28598,
368,
341,
9401,
262,
442,
773,
6523,
69,
1,
1265,
537,
387,
32298,
438,
264,
36566,
2999,
624,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
21549,
2243,
1138,
286,
659,
858... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_3861() {
let macro_fixture = parse_macro(
r#"
macro_rules! rgb_color {
($p:expr, $t: ty) => {
pub fn new() {
let _ = 0 as $t << $p;
}
};
}
"#,
);
macro_fixture.expand_items(... | rust_cleaned_test_functions.jsonl/28774 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
18,
23,
21,
16,
368,
341,
262,
1077,
18072,
74409,
284,
4715,
58810,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
17993,
6714,
341,
310,
1711,
79,
96011,
11,
400,
83,
25,
13580,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_elide_empty_files() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.args(&["-e", "-n", "4", "threebytes.txt"])
.succeeds()
.no_stdout()
.no_stderr();
assert_eq!(at.read("xaa"), "a");
assert_eq!(at.read("xab"), "b");
assert_eq!(at.read("xac"), "c");
ass... | rust_cleaned_test_functions.jsonl/25877 | {
"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,
21602,
577,
15124,
10931,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
575,
8710,
16365,
2099,
1183,
12,
68,
497,
6523,
77,
497,
330,
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_reset_least_bit() {
assert_eq!(reset_least_bit(0), 0);
assert_eq!(reset_least_bit(16), 0);
assert_eq!(reset_least_bit(3), 2);
} | rust_cleaned_test_functions.jsonl/38810 | {
"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,
18983,
88716,
13996,
368,
972,
310,
2060,
10714,
10297,
9716,
88716,
13996,
7,
15,
701,
220,
15,
736,
310,
2060,
10714,
10297,
9716,
88716,
13996,
7,
16,
21,
701,
220,
15,
736,
310,
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 |
#[test]
fn test_invalid_satoshi_conversion() {
INVALID_TEST_AMOUNTS
.iter()
.for_each(|amounts| test_from_satoshi(amounts.satoshi, BitcoinAmount(amounts.satoshi)));
} | rust_cleaned_test_functions.jsonl/131271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
643,
14030,
6023,
64132,
368,
341,
394,
32269,
11641,
59993,
50,
198,
503,
659,
2015,
741,
503,
659,
1958,
32046,
22428,
6045,
82,
91,
1273,
5673,
643,
14030,
6023,
33989,
82,
514,
14030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_string_license_template_path() {
let toml = r#"license_template_path = """#;
let config = Config::from_toml(toml, Path::new("")).unwrap();
assert!(config.license_template.is_none());
} | rust_cleaned_test_functions.jsonl/62923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
3904,
63839,
8693,
2638,
368,
341,
286,
1077,
311,
1014,
284,
435,
55543,
13266,
8693,
2638,
284,
4210,
2,
280,
286,
1077,
2193,
284,
5532,
486,
1499,
528,
316,
75,
1155,
316,
75,
11,
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 |
#[test]
fn test_eval_add1() {
let mut s = Stack::new();
s.push(Elt::Int(1)).unwrap();
s.push(Elt::Int(1)).unwrap();
assert!(s.eval(Op::Add).is_ok());
assert_eq!(s.pop().unwrap(), Elt::Int(2));
} | rust_cleaned_test_functions.jsonl/34517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
2891,
16,
368,
341,
286,
1077,
5206,
274,
284,
14284,
486,
931,
543,
286,
274,
2552,
10722,
4832,
486,
1072,
7,
16,
4579,
15454,
543,
286,
274,
2552,
10722,
4832,
486,
1072,
7,
16,
4579... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prev() {
let mut ll = LinkedList::<u8>::with_capacity(4);
let hnd1 = ll.push_tail(1);
let hnd2 = ll.push_tail(2);
let hnd3 = ll.push_tail(3);
ll.pop_tail();
assert_eq!(ll.is_prev(&hnd1, &hnd1), Some(false));
assert_eq!(ll.is_prev(&hnd1, ... | rust_cleaned_test_functions.jsonl/59901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
25566,
368,
341,
286,
1077,
5206,
9323,
284,
22917,
27638,
84,
23,
6831,
4197,
35603,
7,
19,
317,
286,
1077,
305,
303,
16,
284,
9323,
2552,
35471,
7,
16,
317,
286,
1077,
305,
303,
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_serialize_body() {
let body = MessageBody::<TestTask>::new(TestTaskParams { a: 4 });
let serialized = serde_json::to_string(&body).unwrap();
assert_eq!(serialized, JSON);
} | rust_cleaned_test_functions.jsonl/97955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
14114,
368,
341,
262,
1077,
2487,
284,
4856,
5444,
27638,
2271,
6262,
6831,
931,
31159,
6262,
4870,
314,
264,
25,
220,
19,
1625,
262,
1077,
32916,
284,
61570,
9455,
486,
983,
3904,
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 |
#[test]
fn test_mac_with_iv_parsing() {
for test in wycheproof::mac_with_iv::TestName::all() {
let _kat = wycheproof::mac_with_iv::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22802,
6615,
51411,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
11948,
6615,
51411,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
284,
289,
5641,
747,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_queen_moves() {
let position = PositionBuilder::new()
.place(Square::F2, Piece::Queen, Color::White)
.build();
let moves = MoveGenerator::new().moves(&position);
assert_targets(
&[
Square::A2,
Square::B2,
Square::C2,
Square::D2,
... | rust_cleaned_test_functions.jsonl/134605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 812
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47342,
268,
45390,
368,
341,
262,
1077,
2309,
284,
12380,
3297,
486,
931,
741,
414,
659,
2007,
3759,
5151,
486,
37,
17,
11,
28930,
486,
52006,
11,
3478,
486,
14075,
340,
414,
659,
5834,
543,
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_decode_packet_with_options() {
let buf = [
0x44, 0x01, 0x84, 0x9e, 0x51, 0x55, 0x77, 0xe8, 0xb2, 0x48, 0x69,
0x04, 0x54, 0x65, 0x73, 0x74, 0x43, 0x61, 0x3d, 0x31,
];
let packet = PacketUdp::from_bytes(&buf);
assert!(packet.is_ok());
... | rust_cleaned_test_functions.jsonl/92788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 755
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
21078,
6615,
8743,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
87,
19,
19,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
23,
19,
11,
220,
15,
87,
24,
68,
11,
220,
15,
87,
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_outputs_are_sorted() {
let mut rng: StdRng = SeedableRng::from_seed([92u8; 32]);
let sender = AccountKey::random(&mut rng);
let recipient = AccountKey::random(&mut rng);
let num_inputs = 3;
let num_outputs = 11;
let tx = get_transaction(num_inputs,... | rust_cleaned_test_functions.jsonl/32209 | {
"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,
35189,
56855,
41277,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
24,
17,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
4646,
284,
8615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deploy_custom_module_by_mock_client() {
if let Err(e) = run_test_deploy_custom_module_by_mock_client() {
println!("err: {:?}", e);
assert!(false)
}
} | rust_cleaned_test_functions.jsonl/79826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91890,
15875,
10750,
3710,
34134,
8179,
368,
341,
262,
421,
1077,
15495,
2026,
8,
284,
1598,
4452,
91890,
15875,
10750,
3710,
34134,
8179,
368,
341,
286,
13751,
17223,
615,
25,
71964,
384,
317,
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
] | 2 |
#[test]
fn test_identity_constrained_qp() {
let settings = Settings::new(1., array![1.], array![1., 1., 1., 1.], 50, 2, false);
let mut problem_data = ProblemData::new(
CsMat::csc_from_dense(Array2::eye(4).view(), f64::EPSILON),
array![1., 1., 1., 1.],
CsMat:... | rust_cleaned_test_functions.jsonl/49655 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 614
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46244,
3382,
57727,
88550,
368,
341,
286,
1077,
5003,
284,
11296,
486,
931,
7,
16,
2572,
1334,
20703,
16,
13,
1125,
1334,
20703,
16,
2572,
220,
16,
2572,
220,
16,
2572,
220,
16,
13,
1125,
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_examples() {
let actual = read_examples();
let expected: Examples = fs::read_dir("examples")
.unwrap()
.filter_map(|entry| {
let path = entry.unwrap().path();
if path.extension() == Some(OsStr::new("qn")) {
let stem = path.file_ste... | rust_cleaned_test_functions.jsonl/119061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45279,
368,
341,
262,
1077,
5042,
284,
1349,
45279,
1428,
262,
1077,
3601,
25,
25311,
284,
8619,
486,
878,
4334,
445,
51668,
1138,
286,
659,
15454,
741,
286,
659,
5315,
5376,
22428,
4085,
91,
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... | 3 |
#[test]
fn test_scan_eyes() {
let result = Sequence::scan_eyes(Black, Two, 0b00001100, 0b01110010, 8, 0);
let expected = 0b00110000;
assert_eq!(result, expected);
// two twos
let result = Sequence::scan_eyes(Black, Two, 0b000101000, 0b111010111, 9, 0);
let expect... | rust_cleaned_test_functions.jsonl/56147 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
62,
57231,
368,
341,
286,
1077,
1102,
284,
28871,
486,
16405,
62,
57231,
7,
14417,
11,
9043,
11,
220,
15,
65,
15,
15,
15,
15,
16,
16,
15,
15,
11,
220,
15,
65,
15,
16,
16,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_path_join() {
let pattern = Path::new("one").join(&Path::new("**/*.rs"));
assert!(Pattern::new(pattern.to_str().unwrap()).is_ok());
} | rust_cleaned_test_functions.jsonl/40582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
31017,
368,
341,
286,
1077,
5383,
284,
7933,
486,
931,
445,
603,
1827,
5987,
2099,
1820,
486,
931,
91389,
23540,
5428,
4010,
286,
2060,
10297,
15760,
486,
931,
30948,
2389,
2895,
1005,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_encrypt_decrypt() {
let peer1_key = ed25519_dalek::SecretKey::generate(&mut rand::thread_rng());
let peer1_id = peer1_key.compute_node_ids().unwrap().1;
let peer1_channel_key = ChannelKey::generate();
let peer2_key = ed25519_dalek::SecretKey::generate(&mut rand::... | rust_cleaned_test_functions.jsonl/25418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 880
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
80764,
368,
341,
286,
1077,
14397,
16,
3097,
284,
1578,
17,
20,
20,
16,
24,
814,
1574,
74,
486,
19773,
1592,
486,
19366,
2099,
6984,
10382,
486,
4528,
66849,
1423,
286,
1077,
14397,
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_iltag_to_bytes() {
let tag = DummyTag::new(15, 4);
let serialized = tag.to_bytes().unwrap();
assert_eq!(serialized.as_slice(), &[0x0F, 0x00, 0x01, 0x02, 0x03]);
} | rust_cleaned_test_functions.jsonl/25690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2963,
351,
2346,
12524,
368,
341,
262,
1077,
4772,
284,
50567,
5668,
486,
931,
7,
16,
20,
11,
220,
19,
317,
262,
1077,
32916,
284,
4772,
2389,
12524,
1005,
15454,
543,
262,
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... | 1 |
#[test]
fn test_triple_dash_at_beginning_of_line_in_code() {
let config = integration_test_utils::make_config_from_args(&[]);
let output =
integration_test_utils::run_delta(TRIPLE_DASH_AT_BEGINNING_OF_LINE_IN_CODE, &config);
let output = strip_ansi_codes(&output);
ass... | rust_cleaned_test_functions.jsonl/70051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
3778,
84585,
3752,
23338,
1229,
3575,
6528,
1243,
4136,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
56703,
286,
1077,
2550,
4035,
310,
17590,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_block_inode_populated_directory_without_long() {
let dir = tempdir();
dir.child("one").touch().unwrap();
dir.child("two").touch().unwrap();
#[cfg(unix)]
let matched = "one\ntwo\n$";
#[cfg(windows)]
let matched = "one\ntwo\n$";
cmd()
.arg("--blocks")... | rust_cleaned_test_functions.jsonl/38952 | {
"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,
2019,
7113,
46748,
17061,
7757,
14846,
39904,
17799,
368,
341,
262,
1077,
5419,
284,
2730,
3741,
543,
262,
5419,
17531,
445,
603,
1827,
22020,
1005,
15454,
543,
262,
5419,
17531,
445,
19789,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_adjust_sysvar_balance_for_rent() {
let (genesis_config, _mint_keypair) = create_genesis_config(0);
let bank = Bank::new(&genesis_config);
let mut smaller_sample_sysvar = bank.get_account(&sysvar::clock::id()).unwrap();
assert_eq!(smaller_sample_sysvar.lamports(), ... | rust_cleaned_test_functions.jsonl/2656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44153,
20344,
947,
29396,
5478,
83127,
368,
341,
286,
1077,
320,
77894,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_second_example() {
let square = Square::from(vec![2, 7, 6, 9, 5, 1, 4, 3, 8]);
assert!(square.is_magic());
} | rust_cleaned_test_functions.jsonl/13902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29644,
39304,
368,
341,
262,
1077,
9334,
284,
15619,
486,
1499,
25592,
20703,
17,
11,
220,
22,
11,
220,
21,
11,
220,
24,
11,
220,
20,
11,
220,
16,
11,
220,
19,
11,
220,
18,
11,
220,
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 |
#[test]
fn test_string_concat() {
let mut c = Compiler::new();
c.add(Instruction::LoadConst(Value::from("foo")));
c.add(Instruction::LoadConst(Value::from(42)));
c.add(Instruction::StringConcat);
c.add(Instruction::Emit);
let mut output = String::new();
simple_eval(&c.finish().0, ()... | rust_cleaned_test_functions.jsonl/72133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
57478,
368,
341,
262,
1077,
5206,
272,
284,
45631,
486,
931,
543,
262,
272,
1364,
7,
16664,
486,
5879,
19167,
25346,
486,
1499,
445,
7975,
17621,
262,
272,
1364,
7,
16664,
486,
5879,
19167... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lcg64_xor_1024mix() {
let mut prng = Lcg64Xor1024Mix::new();
for _ in 0..6 {
println!("{}", prng.next_long());
}
for _ in 0..16 {
assert_ne!(prng.next_long(), prng.next_long());
}
} | rust_cleaned_test_functions.jsonl/54523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
27446,
21,
19,
76462,
62,
16,
15,
17,
19,
35071,
368,
341,
286,
1077,
5206,
548,
968,
284,
444,
27446,
21,
19,
55,
269,
16,
15,
17,
19,
58083,
486,
931,
543,
286,
369,
716,
304,
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... | 3 |
#[test]
fn test_app_fuse_actions() {
let mut application_bytes = TEST_BYTES.to_vec();
let mut app = ElectronApp::from_bytes(&mut application_bytes).unwrap();
assert_eq!(
app.get_fuse_status(FUSE).unwrap(),
FuseStatus::Present(true)
);
// Setting ... | rust_cleaned_test_functions.jsonl/27183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8191,
761,
810,
25368,
368,
341,
286,
1077,
5206,
3766,
12524,
284,
13602,
40705,
2389,
13251,
543,
286,
1077,
5206,
906,
284,
76876,
2164,
486,
1499,
12524,
2099,
6984,
3766,
12524,
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... | 1 |
#[test]
fn test_ringbuffer() {
let mut buf = [0u8; 8];
let tmp = Rc::new(TmpBuffer::new(8));
let mut r = RingBuffer::new(8, &tmp);
assert_eq!(r.read_avail(), 0);
assert_eq!(r.write_avail(), 8);
r.write(b"12345").unwrap();
assert_eq!(r.read_avail(), 5)... | rust_cleaned_test_functions.jsonl/23570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34683,
7573,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
84,
23,
26,
220,
23,
4821,
286,
1077,
4174,
284,
81463,
486,
931,
4140,
1307,
4095,
486,
931,
7,
23,
3237,
286,
1077,
5206,
435,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_number_of_inputs() {
let (orig_tx, _ledger) = create_test_tx();
let max_inputs = 25;
for num_inputs in 0..100 {
let mut tx_prefix = orig_tx.prefix.clone();
tx_prefix.inputs.clear();
for _i in 0..num_inputs {
tx... | rust_cleaned_test_functions.jsonl/33272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
5500,
3575,
28557,
368,
341,
286,
1077,
320,
4670,
17805,
11,
716,
50704,
8,
284,
1855,
4452,
17805,
543,
286,
1077,
1932,
28557,
284,
220,
17,
20,
401,
286,
369,
1629,
28557,
304,
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... | 5 |
#[test]
fn test_boolean_min_max_smaller() {
let a = BooleanArray::from(&[Some(false)]);
assert_eq!(Some(false), min_boolean(&a));
assert_eq!(Some(false), max_boolean(&a));
let a = BooleanArray::from(&[None, Some(false)]);
assert_eq!(Some(false), min_boolean(&a));
assert_eq!(Some(false),... | rust_cleaned_test_functions.jsonl/112100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
7260,
6345,
15874,
13956,
368,
341,
262,
1077,
264,
284,
6992,
1857,
486,
1499,
2099,
58,
8373,
3576,
41958,
262,
2060,
10714,
10297,
8373,
3576,
701,
1308,
46642,
2099,
64,
1106,
262,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exists() {
let db = DB::new("./wiki/");
let kb = db.find("keyboard shortcuts").unwrap();
assert_eq!("Keyboard Shortcuts", kb.title());
assert!(db.exists("keyboard shortcuts"));
} | rust_cleaned_test_functions.jsonl/73781 | {
"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,
9766,
368,
341,
286,
1077,
2927,
284,
5952,
486,
931,
13988,
29707,
49897,
286,
1077,
38653,
284,
2927,
2658,
445,
41713,
54920,
1827,
15454,
543,
286,
2060,
10714,
17223,
18912,
10698,
22497,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_impl_fn_for_zst() {
parse_macro(
r#"
macro_rules! impl_fn_for_zst {
{ $( $( #[$attr: meta] )*
struct $Name: ident impl$( <$( $lifetime : lifetime ),+> )? Fn =
|$( $arg: ident: $ArgTy: ty ),*| -> $ReturnTy: ty
$body: block; )+
} => {
... | rust_cleaned_test_functions.jsonl/28765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1744
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21007,
15246,
5478,
6415,
267,
368,
341,
1066,
262,
4715,
58810,
1006,
286,
435,
2,
698,
32606,
21407,
0,
11605,
15246,
5478,
6415,
267,
220,
341,
286,
314,
220,
4930,
4930,
671,
3442,
2991,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_token_stx_transfer() {
let input_path = {
let mut r = PathBuf::new();
r.push(env!("CARGO_MANIFEST_DIR"));
r.push("tests");
r.push("stx_token_transfer");
r.set_extension("json");
r
};
let str = std::fs... | rust_cleaned_test_functions.jsonl/134583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
1261,
87,
35403,
368,
341,
286,
1077,
1946,
2638,
284,
341,
310,
1077,
5206,
435,
284,
7933,
15064,
486,
931,
543,
310,
435,
2552,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
4010,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_adjusted_notary_delay_cup_delay() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
let settings = NotarizationDelaySettings {
unit_delay: Duration::from_secs(1),
initial_notary_delay: Duration::from_secs(0),
... | rust_cleaned_test_functions.jsonl/31394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
44153,
291,
7913,
658,
22198,
666,
454,
22198,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
1077,
5003,
284,
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... | 3 |
#[test]
fn test_post() {
let mut post = Post::default();
post.add_text("I ate a salad for lunch today");
assert_eq!("", post.content());
post.request_review();
assert_eq!("", post.content());
post.reject();
assert_eq!("", post.content());
post.r... | rust_cleaned_test_functions.jsonl/83605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6333,
368,
341,
286,
1077,
5206,
1736,
284,
3877,
486,
2258,
543,
286,
1736,
1364,
4326,
445,
40,
29812,
264,
32466,
369,
15786,
3351,
797,
286,
2060,
10714,
17223,
497,
1736,
5406,
5231,
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_face_encoding() {
initialize();
let rect = DETECTOR.face_locations(&OBAMA_1_MATRIX)[0];
let landmarks = PREDICTOR.face_landmarks(&OBAMA_1_MATRIX, &rect);
MODEL.get_face_encodings(&OBAMA_1_MATRIX, &[landmarks], 0);
} | rust_cleaned_test_functions.jsonl/32178 | {
"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,
30985,
37613,
368,
341,
262,
9468,
1428,
262,
1077,
7608,
284,
40243,
35411,
46031,
45032,
2099,
20608,
38100,
62,
16,
58376,
6620,
15,
935,
262,
1077,
59924,
284,
393,
6504,
14805,
868,
46031,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_claim_neuron() {
local_test_on_sns_subnet(|runtime| async move {
// Set up an SNS with a ledger account for a single user
let user = Sender::from_keypair(&TEST_USER1_KEYPAIR);
let alloc = Tokens::from_tokens(1000).unwrap();
let sys_params = NervousSystemParam... | rust_cleaned_test_functions.jsonl/107247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1741
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84969,
13925,
36090,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
442,
2573,
705,
458,
328,
2448,
448,
264,
46933,
2692,
369,
264,
3175,
1196,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_passwords_2_eq() {
assert!(has_2_eq_digits(&1123456));
assert!(has_2_eq_digits(&1245699));
assert!(!has_2_eq_digits(&12344456));
assert!(has_2_eq_digits(&112233));
assert!(!has_2_eq_digits(&123444));
assert!(has_2_eq_digits(&111122));
... | rust_cleaned_test_functions.jsonl/82199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
10122,
82,
62,
17,
10714,
368,
341,
286,
2060,
10297,
4648,
62,
17,
10714,
41432,
2099,
16,
16,
17,
18,
19,
20,
21,
1106,
286,
2060,
10297,
4648,
62,
17,
10714,
41432,
2099,
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... | 1 |
#[test]
fn test_response_for_market_list() {
let mock_transport = MockRequest::new(
"{\"status\": \"success\",\"data\": [\"ETHARS\",\"ETHCLP\"]}",
"",
);
let api = Api::<MockRequest>::new(API_KEY, SECRET_KEY, Box::new(mock_transport));
let expected = json... | rust_cleaned_test_functions.jsonl/75228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9655,
5478,
68725,
2019,
368,
341,
286,
1077,
7860,
46398,
284,
14563,
1900,
486,
931,
1006,
310,
54734,
2829,
11693,
7245,
5630,
34333,
691,
11693,
508,
2105,
7625,
17048,
34333,
7625,
3140,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_hyphenated_str() {
let uuid1 = Uuid::new_v4();
let s = uuid1.to_hyphenated_str();
assert!(s.len() == 36);
assert!(s.chars().all(|c| c.is_digit_radix(16) || c == '-'));
} | rust_cleaned_test_functions.jsonl/58272 | {
"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,
2346,
1523,
88,
14769,
657,
2895,
368,
341,
286,
1077,
16040,
16,
284,
547,
2423,
486,
931,
2273,
19,
543,
286,
1077,
274,
284,
16040,
16,
2389,
1523,
88,
14769,
657,
2895,
1428,
286,
2060,
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_linear_interp() {
let xx = vec![1.0, 2.0, 3.0, 5.0, 7.0, 10.0];
let yy = vec![1.0, 4.0, 9.0, 25.0, 49.0, 100.0];
let mut by1d = BaryRat1D::new(&xx, &yy, 2, 1);
let res = by1d.interp(1.5);
assert!(res.is_ok());
let mut by1d = BaryRat1D::ne... | rust_cleaned_test_functions.jsonl/120684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40674,
68711,
368,
341,
286,
1077,
20908,
284,
7486,
20703,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
20,
13,
15,
11,
220,
22,
13,
15,
11,
220,
16,
15,
13,
15,
935... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_i8() {
let vec: Vec<u8> = vec![129, 167, 98, 117, 110, 100, 108, 101, 100, 145, 220, 19, 13];
let buf = to_i8(&vec);
println!("new bundle: {:?}", buf);
} | rust_cleaned_test_functions.jsonl/110926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
5318,
23,
368,
341,
286,
1077,
7486,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
16,
17,
24,
11,
220,
16,
21,
22,
11,
220,
24,
23,
11,
220,
16,
16,
22,
11,
220,
16,
16,
15,
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_file() {
// TODO: Can this be replaced by AtPath?
use std::env;
let temp = env::temp_dir();
let tmpdir = Path::new(&temp);
let file = tmpdir.join("test");
{
let mut f = File::create(&file).unwrap();
// spell-checker:disable-next-line
if f.write_al... | rust_cleaned_test_functions.jsonl/48795 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
368,
341,
262,
442,
5343,
25,
2980,
419,
387,
12575,
553,
2411,
1820,
5267,
262,
990,
1460,
486,
3160,
280,
262,
1077,
2730,
284,
6105,
486,
3888,
4334,
543,
262,
1077,
4174,
3741,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extra_hash_descriptor_deserialization_with_minimal_fields() {
let input = json!({
"name": "another name",
"size": "1234",
});
let descriptor: HashDescriptor =
serde_json::from_value::<ExtraHashDescriptor>(input).unwrap().into();
... | rust_cleaned_test_functions.jsonl/33097 | {
"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,
31858,
8950,
33774,
15768,
50563,
6615,
7260,
2861,
12132,
368,
341,
286,
1077,
1946,
284,
2951,
0,
2262,
310,
330,
606,
788,
330,
41963,
829,
756,
310,
330,
2141,
788,
330,
16,
17,
18,
19,
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... | 1 |
#[test]
fn test_apply_infix_op_scalar_vector() -> Result<(), YolkError> {
let lhs = Value::Scalar("a".parse()?);
let rhs = Value::Vector(Vector::from_expanded_ident("b", 3));
lhs.apply_infix_op(&InfixOp::Add, &rhs)?;
Ok(())
} | rust_cleaned_test_functions.jsonl/131949 | {
"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,
36551,
1243,
5743,
10287,
41652,
12247,
368,
1464,
5714,
68843,
809,
22604,
1454,
29,
341,
262,
1077,
22505,
284,
5162,
486,
20639,
445,
64,
3263,
6400,
93333,
317,
262,
1077,
12916,
284,
5162,
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... | 3 |
#[test]
fn test_func_get_infinity() {
assert_eq!(get_infinity(10), i64::MAX);
assert_eq!(get_infinity(-10), i64::MIN);
} | rust_cleaned_test_functions.jsonl/95578 | {
"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,
9596,
3062,
1243,
19888,
368,
341,
286,
2060,
10714,
10297,
455,
1243,
19888,
7,
16,
15,
701,
600,
21,
19,
486,
10586,
317,
286,
2060,
10714,
10297,
455,
1243,
19888,
4080,
16,
15,
701,
600,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_get_block_time() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let RpcHandler {
io,
meta,
bank,
block_commitment_cache,
bank_forks,
..
} = start_rpc_handler_with_tx_and_blockstore(&bob_pubkey, ve... | rust_cleaned_test_functions.jsonl/3057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7113,
3009,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
341,
310,
6399,
345,
310,
8823,
345,
310,
6073,
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... | 1 |
#[test]
fn test_noninvertible_matrix_returns_none() {
let matrix = Matrix2x2::new(1f32, 2f32, 4f32, 8f32);
assert!(matrix.inverse().is_none());
} | rust_cleaned_test_functions.jsonl/128977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
83729,
1238,
10193,
58900,
31488,
368,
341,
286,
1077,
6172,
284,
11631,
17,
87,
17,
486,
931,
7,
16,
69,
18,
17,
11,
220,
17,
69,
18,
17,
11,
220,
19,
69,
18,
17,
11,
220,
23,
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 |
#[test]
fn test_fail_key_too_long() {
let src_data = b"(test) abc []";
let mut limits = yass_parser::ParserLimits::unlimited();
limits.max_key_length = 2;
let expected_error = yass_parser::ParserError::KeyTooLong { pos: yass::Pos::new(0, 7) };
assert_eq!(yass_parser::parse(limits, src_data).... | rust_cleaned_test_functions.jsonl/126510 | {
"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,
22121,
3097,
2346,
78,
17799,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
8,
39022,
3056,
876,
262,
1077,
5206,
13388,
284,
379,
395,
18517,
486,
6570,
94588,
486,
359,
18235,
543,
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_pos() {
assert!(Pos::make_none().is_none());
assert!(
!Pos::from_lnum_bol_offset(
RcOc::new(RelativePath::make(Prefix::Dummy, PathBuf::from("a"))),
(0, 0, 0),
(0, 0, 0)
)
.is_none(),
);
... | rust_cleaned_test_functions.jsonl/123996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6479,
368,
341,
286,
2060,
10297,
4859,
486,
6927,
31488,
1005,
285,
31488,
1423,
286,
2060,
33673,
310,
753,
4859,
486,
1499,
907,
2413,
880,
337,
6917,
1006,
394,
81463,
46,
66,
486,
931,
2785... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lookup() {
assert_eq!(
LookupFuture::lookup(
vec![Name::root()],
RecordType::A,
DnsRequestOptions::default(),
CachingClient::new(0, mock(vec![v4_message()])),
)
.wait()
.unwrap... | rust_cleaned_test_functions.jsonl/122936 | {
"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,
27464,
368,
341,
286,
2060,
10714,
33673,
310,
50311,
24206,
486,
21020,
1006,
394,
7486,
20703,
675,
486,
2888,
73845,
394,
13583,
929,
486,
32,
345,
394,
422,
4412,
1900,
3798,
486,
2258,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatch_change() {
use configuration::ConfigManager;
use std::error::Error;
use std::result::Result;
#[derive(Clone)]
struct CfgManager(Arc<Mutex<RaftstoreConfig>>);
impl ConfigManager for CfgManager {
fn dispatch(&mut self, c: ConfigChange) -> Result<(), Box<d... | rust_cleaned_test_functions.jsonl/63651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
15947,
368,
341,
262,
990,
6546,
486,
2648,
2043,
280,
262,
990,
1460,
486,
841,
486,
1454,
280,
262,
990,
1460,
486,
1382,
486,
2077,
401,
262,
11506,
27098,
65297,
5563,
262,
2036,
356,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip() {
fn check_roundtrip(s: &str) {
assert_eq!(SelectorSpec::from_str(s).unwrap().to_string(), s);
}
check_roundtrip("!(!a)");
check_roundtrip("!a || !b");
check_roundtrip("!a && !b");
check_roundtrip("!(a && !b)");
che... | rust_cleaned_test_functions.jsonl/24524 | {
"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,
29896,
32981,
368,
341,
286,
5168,
1779,
29896,
32981,
1141,
25,
609,
495,
8,
341,
310,
2060,
10714,
10297,
5877,
8327,
486,
1499,
2895,
1141,
568,
15454,
1005,
983,
3904,
1507,
274,
317,
286,
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_file_reader() {
let test_file = get_test_file("alltypes_plain.parquet");
let reader_result = SerializedFileReader::new(test_file);
assert!(reader_result.is_ok());
let reader = reader_result.unwrap();
// Test contents in Parquet metadata
let metada... | rust_cleaned_test_functions.jsonl/27261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1860
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
368,
341,
286,
1077,
1273,
2458,
284,
633,
4452,
2458,
445,
541,
9242,
41015,
33277,
23300,
797,
286,
1077,
6604,
5287,
284,
91472,
1703,
5062,
486,
931,
8623,
2458,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bivar_poly_to_from_bytes() {
let degree = 3;
let mut rng = rand::thread_rng();
let bi_poly = BivarPoly::random(degree, &mut rng);
// length is fixed by the degree and Fr size
let bi_poly_bytes = bi_poly.to_bytes();
let dp1 = degree + 1;
let... | rust_cleaned_test_functions.jsonl/49479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 514
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
56398,
36133,
2346,
5673,
12524,
368,
341,
286,
1077,
8381,
284,
220,
18,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
6032,
36133,
284,
425,
56398,
38164,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_array_chunks_mut_infer() {
let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5, 6];
for a in v.array_chunks_mut() {
let sum = a.iter().sum::<i32>();
*a = [sum; 3];
}
assert_eq!(v, &[3, 3, 3, 12, 12, 12, 6]);
let v2: &mut [i32] = &mut [0, 1, 2, 3, 4, 5, 6];
v2.arra... | rust_cleaned_test_functions.jsonl/9649 | {
"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,
3858,
65470,
29523,
1243,
802,
368,
341,
262,
1077,
348,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_change_option() {
test_harness(|| unsafe {
library_init();
let session = get_session();
let uris = vec!["http://localhost/1".into()];
let options = vec![KeyVal {
key: "dir".into(),
val: "mydownload".into(),
}];
let mut ... | rust_cleaned_test_functions.jsonl/25966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
9672,
368,
341,
262,
1273,
1523,
23518,
79453,
19860,
341,
286,
6733,
6137,
543,
286,
1077,
3797,
284,
633,
12316,
1428,
286,
1077,
4335,
285,
284,
7486,
0,
1183,
1254,
1110,
8301,
14,
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... | 2 |
#[test]
fn test_parse_valid_with_headers() {
let mut codec = build_codec();
let mut buffer = BytesMut::new();
buffer.put_slice(
b"CONNECT foo.bar.com:443 HTTP/1.1\r\n\
Host: ignored\r\n\
Auithorization: ignored",
);
buffer... | rust_cleaned_test_functions.jsonl/8067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
6615,
26719,
368,
341,
286,
1077,
5206,
34647,
284,
1936,
51084,
543,
286,
1077,
5206,
4147,
284,
30024,
51440,
486,
931,
543,
286,
4147,
3597,
26488,
1006,
310,
293,
1,
39521,
15229,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_followed_by_success() {
let schema = r#"{
"type": "record",
"name": "test",
"fields": [{"name": "f1", "type": "int"}, {"name": "f2", "type": "int"}]
}"#;
let mut decoder = Decoder::new(&schema, None, "Test".to_string(), false).unwrap();
// This is not a valid Avro b... | rust_cleaned_test_functions.jsonl/75359 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
43490,
291,
3710,
18632,
368,
341,
286,
1077,
10802,
284,
435,
55543,
515,
44470,
788,
330,
8548,
756,
31486,
788,
330,
1944,
756,
1,
9007,
788,
61753,
606,
788,
330,
69,
16,
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,
1... | 1 |
#[test]
fn test_vec_list_extend() {
let mut list = VecList::new();
list.push_back(0);
list.push_back(1);
list.extend([-1, 2, -2].iter());
assert_eq!(list, &[0, 1, -1, 2, -2][..]);
} | rust_cleaned_test_functions.jsonl/11520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
70265,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
3895,
7,
15,
317,
286,
1140,
2552,
3895,
7,
16,
317,
286,
1140,
15831,
41197,
16,
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_rootisharraystack() {
let mut rootish_array_stack: Array<char> = Array::new();
assert_eq!(rootish_array_stack.size(), 0);
for (i, elem) in "abcdefgh".chars().enumerate() {
rootish_array_stack.add(i, elem);
}
for (i, elem) in "abcdefgh".chars().... | rust_cleaned_test_functions.jsonl/62778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
812,
1653,
7693,
368,
341,
286,
1077,
5206,
3704,
812,
3858,
15528,
25,
2910,
21919,
29,
284,
2910,
486,
931,
543,
286,
2060,
10714,
10297,
2888,
812,
3858,
15528,
2486,
1507,
220,
15,
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... | 6 |
#[test]
fn test_session_extrapolation_oculus_go() {
let input_json_string = r#"{
"sessionSettings": {
"fjdshfks":false,
"video": {
"preferredFps": 60.0
},
"headset": {
"controllers": {
"... | rust_cleaned_test_functions.jsonl/14532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12316,
2702,
376,
16657,
367,
49648,
19425,
25515,
368,
341,
286,
1077,
1946,
9455,
3904,
284,
435,
55543,
515,
310,
330,
5920,
6086,
788,
341,
1060,
330,
69,
43390,
927,
69,
2787,
788,
3849,
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... | 1 |
#[test]
fn test_data_dir() {
let udf_env = "get_data_dir";
let cwd = env::current_dir().unwrap();
let existing_pb = cwd.join("..");
let existing = existing_pb.display().to_string();
let existing_str = existing.as_str();
let non_existing = cwd.join("non-existing-... | rust_cleaned_test_functions.jsonl/17899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 637
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
4334,
368,
341,
286,
1077,
575,
2940,
15879,
284,
330,
455,
1769,
4334,
876,
286,
1077,
46938,
284,
6105,
486,
3231,
4334,
1005,
15454,
1428,
286,
1077,
6350,
31409,
284,
46938,
5446,
95032,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_abstract_class_no_make_unique() {
// attempt to instantiate the class.
let hdr = indoc! {"
class A {
public:
A();
virtual void foo() const = 0;
};
"};
let rs = quote! {};
run_test("", hdr, rs, &["A"], &[]);
} | rust_cleaned_test_functions.jsonl/9883 | {
"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,
85939,
4790,
6536,
28230,
21218,
368,
341,
9401,
262,
442,
4774,
311,
40902,
279,
536,
624,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
536,
362,
341,
286,
584,
510,
310,
362,
543,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_image_alpha_blending() {
let mut target = ImageBuffer::new(1, 1);
target.put_pixel(0, 0, Rgba([255u8, 0, 0, 255]));
assert!(*target.get_pixel(0, 0) == Rgba([255, 0, 0, 255]));
target.blend_pixel(0, 0, Rgba([0, 255, 0, 255]));
assert!(*target.get_pixel(0, 0... | rust_cleaned_test_functions.jsonl/2193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
26633,
13141,
2459,
368,
341,
286,
1077,
5206,
2169,
284,
4654,
4095,
486,
931,
7,
16,
11,
220,
16,
317,
286,
2169,
3597,
29760,
7,
15,
11,
220,
15,
11,
431,
56380,
2561,
17,
20,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subscribe() {
// The node should:
// - Create an empty vector in mesh[topic]
// - Send subscription request to all peers
let subscribe_topic = vec![String::from("test_subscribe")];
let (gs, _, topic_hashes) = inject_nodes1()
.peer_no(... | rust_cleaned_test_functions.jsonl/66878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 798
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88935,
368,
341,
286,
442,
576,
2436,
1265,
510,
286,
442,
481,
4230,
458,
4287,
4621,
304,
11294,
58,
16411,
921,
286,
442,
481,
11000,
15142,
1681,
311,
678,
25029,
198,
23459,
286,
1077,
1796... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_set_get_upvar() {
let mut ss = ScopeStack::new();
ss.set("a", Value::from("1"));
ss.set("b", Value::from("2"));
ss.push();
ss.upvar(0, "a");
assert_eq!(ss.get("a").unwrap().as_str(), "1");
assert!(ss.get("b").is_none());
ss.set("... | rust_cleaned_test_functions.jsonl/80370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
3062,
8237,
947,
368,
341,
286,
1077,
5206,
10870,
284,
34920,
4336,
486,
931,
1428,
286,
10870,
980,
445,
64,
497,
5162,
486,
1499,
445,
16,
4010,
286,
10870,
980,
445,
65,
497,
5162,
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_unit_from_empty_seq() {
assert_de_tokens_error::<()>(
&[Token::Seq { len: Some(0) }, Token::SeqEnd],
"invalid type: sequence, expected unit",
);
} | rust_cleaned_test_functions.jsonl/129528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14832,
5673,
15124,
14486,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
368,
17055,
286,
44590,
3323,
486,
20183,
314,
2422,
25,
4329,
7,
15,
8,
2470,
9660,
486,
20183,
3727,
1259,
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 |
#[test]
fn test_inplace_concat() {
let gil = Python::acquire_gil();
let py = gil.python();
let d = seq_dict(py);
py_run!(
py,
*d,
"s += ByteSequence([4, 5]); assert list(s) == [1, 2, 3, 4, 5]"
);
py_expect_exception!(py, *d, "s += 'hello'", PyTypeError);
} | rust_cleaned_test_functions.jsonl/46918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
2007,
57478,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
262,
1077,
294,
284,
12981,
5243,
46827,
626,
262,
4510,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rdr_rule_with_to_v4_address_range_to_v4_address_range() {
assert_eq!(
parse_str_to_rdr_rules(
"rdr proto tcp to 1.2.3.4 range 10000:10005 -> to 192.168.1.1 range 20000:20005;"
),
Ok(vec![filter::Rdr {
proto: filter::Sock... | rust_cleaned_test_functions.jsonl/29494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
3612,
21124,
6615,
2346,
2273,
19,
6744,
9698,
2346,
2273,
19,
6744,
9698,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
2895,
2346,
1710,
3612,
21407,
1006,
394,
330,
81,
3612,
18433,
28051... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_to_account_with_rent_exempt_reserve() {
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_balance(StakeState::size_of());
let minimum_delegation = crate::get_minimum_delegation(&FeatureSet::all_enabled());
let stake_lamports = (rent_exempt_r... | rust_cleaned_test_functions.jsonl/31659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
2346,
13500,
6615,
83127,
95736,
89591,
368,
341,
286,
1077,
8016,
284,
29737,
486,
2258,
543,
286,
1077,
8016,
95736,
89591,
284,
8016,
57790,
29396,
7,
623,
726,
1397,
486,
2141,
3575,
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... | 3 |
#[test]
fn test_empty_event() {
let ethabi_event = ethabi::Event { name: "hello".into(), inputs: vec![], anonymous: false };
let e = Event::from(ðabi_event);
let expected = quote! {
pub mod hello {
use ethabi;
use super::INTERNAL_ERR;
pub fn event() -> ethabi::Event {
ethabi::Eve... | rust_cleaned_test_functions.jsonl/22234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
6748,
368,
341,
197,
10217,
8372,
25084,
6748,
284,
8372,
25084,
486,
1556,
314,
829,
25,
330,
14990,
3263,
18122,
1507,
11127,
25,
7486,
0,
12995,
22151,
25,
895,
3634,
197,
10217,
384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signing() {
let base64_key = "eyJjaGlsZF9rZXlzIjp7fSwKICAgICAgICAicGFpbGxpZXJfcGsiOnsibiI6IjU5ODdlNjIyMjYxY2FmOTZlMjU4MjZjNzBjZjMyM2IyNjE5NGZmOWNmZTY5ZTNmNDBmMzBkMzA2NTcxNjQyY2FlYThhMzE0M2QxMWZmOTRjMTM4ODM2MDQ4NjczNTdhZThjMGU2NjNiZjAzZDAwOTMwMTZkN2Y0ZDc5MGFlMjRlMjkxNzgwM2Q4MTJiNjQxYWYyZD... | rust_cleaned_test_functions.jsonl/35195 | {
"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,
11172,
287,
368,
341,
286,
1077,
2331,
21,
19,
3097,
284,
330,
84609,
5580,
38,
4730,
90814,
24,
81,
80723,
95505,
40,
46054,
22,
69,
13218,
42,
1317,
9042,
1317,
9042,
31001,
292,
36332,
16650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_to_json() {
let hex = "0xb78e1ba6fa7f7b3a3f3ac2a31e6675d84f2261c711c3b438a252f648b26df3ed";
let hash: HashValue = serde_json::from_value(json!(hex)).unwrap();
assert_eq!(hash, hex.parse().unwrap());
let val: Value = serde_json::to_value(hash).unwrap();
... | rust_cleaned_test_functions.jsonl/127520 | {
"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,
5673,
8378,
2346,
9455,
368,
341,
286,
1077,
12371,
284,
330,
15,
7929,
22,
23,
68,
16,
4645,
21,
3632,
22,
69,
22,
65,
18,
64,
18,
69,
18,
580,
17,
64,
18,
16,
68,
21,
21,
22,
20,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_var_in_closure_no_block() {
cov_mark::check!(test_extract_var_in_closure_no_block);
check_assist(
extract_variable,
r#"
fn main() {
let lambda = |x: u32| $0x * 2$0;
}
"#,
r#"
fn main() {
let lambda = |x: u32| { let $0var_name = ... | rust_cleaned_test_functions.jsonl/133783 | {
"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,
39123,
4612,
1243,
72823,
6536,
7113,
368,
341,
286,
21836,
18924,
486,
2028,
10297,
1944,
39123,
4612,
1243,
72823,
6536,
7113,
317,
286,
1779,
12083,
380,
1006,
310,
8649,
14635,
345,
310,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_span_of_non_empty() {
let parent = dangerous::input(&[1, 2, 3, 4]);
let sub_range = 1..2;
let sub = dangerous::input(&parent.as_dangerous()[sub_range.clone()]);
assert_eq!(sub.span_of_non_empty(&parent), Some(sub_range));
let non_span = dangerous::input(&[]);
assert_eq!(... | rust_cleaned_test_functions.jsonl/15440 | {
"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,
37382,
3575,
21637,
15124,
368,
341,
262,
1077,
2681,
284,
11406,
486,
1355,
2099,
58,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
262,
1077,
1186,
9698,
284,
220,
16,
496,
17,
280,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_update_vote_stake_rewards() {
let thread_pool = ThreadPoolBuilder::new().num_threads(1).build().unwrap();
check_bank_update_vote_stake_rewards(|bank: &Bank| {
bank.load_vote_and_stake_accounts_with_thread_pool(&thread_pool, null_tracer())
});
chec... | rust_cleaned_test_functions.jsonl/28851 | {
"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,
35733,
8882,
54360,
1261,
726,
77997,
368,
341,
286,
1077,
4516,
15709,
284,
72716,
3297,
486,
931,
1005,
2413,
29725,
7,
16,
568,
5834,
1005,
15454,
543,
286,
1779,
35733,
8882,
54360,
1261,
726,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subtract_more_than_two_days() {
let clock = Clock::new(2, 20).add_minutes(-3000);
assert_eq!(clock.to_string(), "00:20");
} | rust_cleaned_test_functions.jsonl/128356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
2144,
36664,
51613,
23241,
28353,
368,
341,
262,
1077,
8866,
284,
26142,
486,
931,
7,
17,
11,
220,
17,
15,
568,
718,
67655,
4080,
18,
15,
15,
15,
317,
262,
2060,
10714,
10297,
20666,
238... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_alignment() {
assert_eq!(
Address::from(0x1234).as_page_aligned(size::kb(4)),
Address::from(0x1000)
);
assert_eq!(
Address::from(0xFFF1_2345u64).as_page_aligned(0x10000),
Address::from(0xFFF1_0000u64)
);
} | rust_cleaned_test_functions.jsonl/126119 | {
"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,
51006,
368,
341,
286,
2060,
10714,
33673,
310,
9177,
486,
1499,
7,
15,
87,
16,
17,
18,
19,
568,
300,
6129,
66385,
6856,
486,
21310,
7,
19,
6965,
310,
9177,
486,
1499,
7,
15,
87,
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... | 1 |
#[test]
fn test_alpns_list_to_wire() {
let mut alpns = Vec::new();
alpns.push("h2".to_string());
alpns.push("http/1.1".to_string());
let expected = b"\x02h2\x08http/1.1";
let wire = alpns
.into_iter()
.map(|a| [&[a.len() as u8], a.as_bytes()].conca... | rust_cleaned_test_functions.jsonl/40847 | {
"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,
8418,
79,
4412,
2019,
2346,
75206,
368,
341,
286,
1077,
5206,
452,
79,
4412,
284,
11312,
486,
931,
543,
286,
452,
79,
4412,
2552,
445,
71,
17,
3263,
983,
3904,
1423,
286,
452,
79,
4412,
2552,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vectors_rfc4493() {
// Test vectors from RFC 4493.
let key = hex::decode("2b7e151628aed2a6abf7158809cf4f3c").expect("Could not decode key");
let data= hex::decode("6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411e5fbc1191a0a52eff69f2445df4f9b17ad2b417b... | rust_cleaned_test_functions.jsonl/29058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 511
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49158,
1710,
8316,
19,
19,
24,
18,
368,
341,
262,
442,
3393,
22879,
504,
39233,
220,
19,
19,
24,
18,
624,
262,
1077,
1376,
284,
12371,
486,
18196,
445,
17,
65,
22,
68,
16,
20,
16,
21,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_generic_container_2() {
let schema = r#"
{
"type":"record",
"name":"TestGeneric",
"fields":[
{
"name":"a",
"type":"string"
},
{
"name":"... | rust_cleaned_test_functions.jsonl/114076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3010
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
15847,
62,
17,
368,
341,
286,
1077,
10802,
284,
435,
2,
698,
286,
341,
310,
330,
1313,
3252,
8548,
756,
310,
330,
606,
3252,
2271,
19964,
756,
310,
330,
9007,
8899,
198,
394,
341,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zinc_parse_grid_embedded() {
let mut input = Cursor::new(
concat!(
"<<",
"\n",
r#"ver: "3.0""#,
"\n",
"id",
"\n\r",
"@foo",
"\n",
"@... | rust_cleaned_test_functions.jsonl/21739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
2840,
21039,
15604,
24007,
9789,
368,
341,
286,
1077,
5206,
1946,
284,
28067,
486,
931,
1006,
310,
33720,
33673,
394,
14717,
756,
394,
2917,
77,
756,
394,
435,
55543,
423,
25,
330,
18,
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_aggregate_slot() {
let mut heaviest_subtree_fork_choice = setup_forks();
heaviest_subtree_fork_choice.aggregate_slot((1, Hash::default()));
assert_eq!(
heaviest_subtree_fork_choice
.stake_voted_at(&(1, Hash::default()))
... | rust_cleaned_test_functions.jsonl/70813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
14240,
27563,
368,
341,
286,
1077,
5206,
566,
98362,
5228,
9344,
761,
669,
31936,
284,
6505,
761,
73302,
1428,
1789,
286,
566,
98362,
5228,
9344,
761,
669,
31936,
88534,
27563,
1188,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_command_with_args() {
new_ucmd!()
.args(&["-n", "19", "echo", "a", "b", "c"])
.run()
.stdout_is("a b c\n");
} | rust_cleaned_test_functions.jsonl/15168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
6615,
8384,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
77,
497,
330,
16,
24,
497,
330,
3047,
497,
330,
64,
497,
330,
65,
497,
330,
66,
14108,
286,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_compile_errors() {
let t = trybuild::TestCases::new();
t.compile_fail("tests/ui/invalid_macro_args.rs");
t.compile_fail("tests/ui/invalid_need_module_arg_position.rs");
t.compile_fail("tests/ui/invalid_property_args.rs");
t.compile_fail("tests/ui/invalid_pyclass_args.rs");
... | rust_cleaned_test_functions.jsonl/129738 | {
"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,
74170,
20196,
368,
341,
262,
1077,
259,
284,
1430,
5834,
486,
2271,
37302,
486,
931,
543,
262,
259,
18922,
22121,
445,
23841,
22444,
14,
11808,
58810,
8384,
25638,
797,
262,
259,
18922,
22121,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple() {
let data = "foo
bar
baz
quux
baz
baz
zoom";
let expected = "foo
bar
baz
quux
zoom
";
let mut dedup = DedupTxt::default();
let mut dest = Vec::new();
let mut r = Cursor::new(&data);
dedup.dedup(&mut r, &mut dest).unwrap();
let ... | rust_cleaned_test_functions.jsonl/28029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
286,
1077,
821,
284,
330,
7975,
198,
2257,
198,
42573,
198,
446,
2200,
198,
42573,
198,
42573,
198,
28716,
876,
286,
1077,
3601,
284,
330,
7975,
198,
2257,
198,
42573,
198,
446,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nice_list_api() {
let ctx = TestContext::new();
let con = ctx.connection();
assert_eq!(con.rpush("my_list", [1i, 2i, 3i, 4i][]), Ok(4i));
assert_eq!(con.rpush("my_list", [5i, 6i, 7i, 8i][]), Ok(8i));
assert_eq!(con.llen("my_list"), Ok(8i));
assert_eq!(con.lpop("my_list"... | rust_cleaned_test_functions.jsonl/31509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
558,
2019,
11697,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
390,
284,
5635,
20310,
1428,
262,
2060,
10714,
10297,
443,
1746,
9077,
445,
2408,
2019,
497,
508,
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_gt_positive_and_zero() {
assert!(decimal("1.0") > decimal("0.0"));
assert!(decimal("0.1") > decimal("0.0"));
} | rust_cleaned_test_functions.jsonl/58114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37479,
54160,
8378,
19359,
368,
341,
262,
2060,
10297,
23289,
445,
16,
13,
15,
899,
861,
12122,
445,
15,
13,
15,
4010,
262,
2060,
10297,
23289,
445,
15,
13,
16,
899,
861,
12122,
445,
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 |
#[test]
fn test_let_var() {
let let_var = Let::bindings(
vec![Binding::new("cat", If::cond(true, "Musti", "Naukio"))],
Var::new("cat"),
);
let query = Query::from(let_var);
let serialized = serde_json::to_value(&query).unwrap();
let expected = j... | rust_cleaned_test_functions.jsonl/49624 | {
"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,
62,
1149,
4612,
368,
341,
286,
1077,
1077,
4612,
284,
6771,
486,
65495,
1006,
310,
7486,
20703,
15059,
486,
931,
445,
4616,
497,
1416,
486,
1297,
3715,
11,
330,
31776,
72,
497,
330,
45,
2863,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_legal_moves_all_sente() {
const INITIAL_SFEN:&'static str = "sfen l6nl/5+P1gk/2np1S3/p1p4Pp/3P2Sp1/1PPb2P1P/P5GS1/R8/LN4bKL w RGgsn5p 1";
let position_parser = PositionParser::new();
let (_, banmen, mc, _, _) = match position_parser.parse(&INITIAL_SFEN.split(" ").collect::<Vec<&str>>()... | rust_cleaned_test_functions.jsonl/81343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
5705,
643,
6817,
368,
972,
4777,
56854,
84679,
953,
35218,
6,
1978,
607,
284,
330,
17246,
268,
326,
21,
15643,
14,
20,
10,
47,
16,
70,
74,
14,
17,
6199,
16,
50,
18,
4322,
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... | 2 |
#[test]
fn test_serve_without_new() {
let output = Command::new("target/debug/hibana")
.arg("serve")
.output()
.expect("failed to run build command");
assert_eq!(String::from_utf8_lossy(&output.stdout), BUILD_WITHOUT_PROJECT);
} | rust_cleaned_test_functions.jsonl/108363 | {
"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,
643,
5852,
39904,
5921,
368,
341,
262,
1077,
2550,
284,
7348,
486,
931,
445,
5657,
67479,
14,
5803,
3362,
1138,
286,
659,
858,
445,
13267,
1138,
286,
659,
3006,
741,
286,
659,
17119,
445,
16091,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.