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_new_raft_with_bad_config_errors() {
let invalid_config = new_test_config(INVALID_ID, 1, 1);
let s = MemStorage::new_with_conf_state((vec![1, 2], vec![]));
let raft = Raft::new(&invalid_config, s, &default_logger());
assert!(raft.is_err())
} | rust_cleaned_test_functions.jsonl/19190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
62,
2944,
6615,
34199,
5332,
20196,
368,
341,
262,
1077,
8318,
5332,
284,
501,
4452,
5332,
23515,
10044,
3450,
11,
220,
16,
11,
220,
16,
317,
262,
1077,
274,
284,
13550,
5793,
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_module_from_code() {
let gil = Python::acquire_gil();
let py = gil.python();
let adder_mod = PyModule::from_code(
py,
"def add(a,b):\n\treturn a+b",
"adder_mod.py",
"adder_mod",
)
.expect("Module code should be loaded");
let add_func = ad... | rust_cleaned_test_functions.jsonl/22683 | {
"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,
10750,
5673,
4136,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
262,
1077,
912,
261,
7480,
284,
5355,
3332,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parser() {
assert_eq!(tok_values("\\x"), [Command("\\x")]);
assert_eq!(tok_values("\\x a b"),
[Command("\\x"), Argument("a"), Argument("b")]);
assert_eq!(tok_values("\\x 'a b'"),
[Command("\\x"), Argument("'a b'")]);
assert_eq!(tok_values("... | rust_cleaned_test_functions.jsonl/33449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
368,
341,
286,
2060,
10714,
10297,
29594,
9146,
29710,
87,
3975,
508,
4062,
29710,
87,
899,
2558,
286,
2060,
10714,
10297,
29594,
9146,
29710,
87,
264,
293,
4461,
310,
508,
4062,
29710,
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_index() {
let m = mat4x3(1., 2., 3., 2., 4., 6., 3., 6., 9., 4., 8., 12.);
assert_eq!(m[3], vec3(4., 8., 12.));
assert_eq!(m[1], m.c1);
assert_eq!(m[2][0], 3.);
assert_eq!(m[0][1], 2.)
} | rust_cleaned_test_functions.jsonl/76101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
286,
1077,
296,
284,
5517,
19,
87,
18,
7,
16,
2572,
220,
17,
2572,
220,
18,
2572,
220,
17,
2572,
220,
19,
2572,
220,
21,
2572,
220,
18,
2572,
220,
21,
2572,
220,
24,
2572,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_control_flow_graph() {
for _ in 0..20 {
let mut rand_input = [0u8; 2048];
thread_rng().fill_bytes(&mut rand_input);
let module_bytes = translate_to_fuzz_mvp(&rand_input).write();
let module: elements::Module = elements::deserialize_buffer(&module_bytes)
.expect("failed t... | rust_cleaned_test_functions.jsonl/130404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
13436,
27441,
14738,
368,
341,
197,
2023,
716,
304,
220,
15,
496,
17,
15,
341,
298,
10217,
5206,
10382,
5898,
284,
508,
15,
84,
23,
26,
220,
17,
15,
19,
23,
935,
298,
68214,
66849,
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... | 3 |
#[test]
fn test_rearrange_sequence() {
let mut colors = vec![
Color::white(),
Color::graytone(0.25),
Color::graytone(0.5),
Color::graytone(0.8),
Color::black(),
];
rearrange_sequence(&mut colors, DistanceMetric::CIE76);
... | rust_cleaned_test_functions.jsonl/24385 | {
"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,
1288,
1118,
844,
23735,
368,
341,
286,
1077,
5206,
7987,
284,
7486,
90515,
310,
3478,
486,
5782,
3148,
310,
3478,
486,
11650,
57929,
7,
15,
13,
17,
20,
1326,
310,
3478,
486,
11650,
57929,
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... | 1 |
#[test]
fn test_mutable_freeze() {
let mut buf = MutableBuffer::new(1);
buf.extend_from_slice(b"aaaa bbbb cccc dddd");
assert_eq!(19, buf.len());
assert_eq!(64, buf.capacity());
assert_eq!(b"aaaa bbbb cccc dddd", buf.data());
let immutable_buf = buf.freeze();
... | rust_cleaned_test_functions.jsonl/54337 | {
"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,
717,
5922,
8905,
2986,
368,
341,
286,
1077,
5206,
6607,
284,
31143,
4095,
486,
931,
7,
16,
317,
286,
6607,
15831,
5673,
26488,
1883,
1,
28458,
293,
53151,
272,
37054,
294,
40360,
797,
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... | 1 |
#[test]
fn test_signature_rsa_pss_verify() {
test::run(
test_file!("rsa_pss_verify_tests.txt"),
|section, test_case| {
assert_eq!(section, "");
let digest_name = test_case.consume_string("Digest");
let alg = match digest_name.as_ref() {
"S... | rust_cleaned_test_functions.jsonl/17914 | {
"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,
39859,
82522,
620,
778,
35638,
368,
341,
262,
1273,
486,
6108,
1006,
286,
1273,
2458,
17223,
60869,
620,
778,
35638,
32509,
3909,
4461,
286,
760,
2809,
11,
1273,
19096,
91,
341,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_function_expression_simple() {
let b = ast::BaseNode::default();
let symbols = ["a", "b"]
.into_iter()
.map(|s| (s.to_string(), Symbol::from(s)))
.collect::<BTreeMap<_, _>>();
let f = FunctionExpr {
loc: b.location.clone(),
... | rust_cleaned_test_functions.jsonl/131379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
28068,
30015,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
17738,
284,
4383,
64,
497,
330,
65,
7026,
310,
659,
18122,
11723,
741,
310,
659,
2186,
22428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_groth16_srs_io() {
use memmap::MmapOptions;
use std::fs::File;
use std::io::{Seek, SeekFrom, Write};
use tempfile::NamedTempFile;
const NUM_PROOFS_TO_AGGREGATE: usize = 16;
let mut rng = rand_chacha::ChaChaRng::seed_from_u64(0u64);
println!("Creating parameters...")... | rust_cleaned_test_functions.jsonl/2135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 657
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
299,
339,
16,
21,
643,
5428,
16939,
368,
341,
262,
990,
1833,
2186,
486,
44,
2186,
3798,
280,
262,
990,
1460,
486,
3848,
486,
1703,
280,
262,
990,
1460,
486,
815,
22964,
39350,
11,
29739... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_head_empty_body() {
let req = Request::with_connector(
Head, Url::parse("http://example.dom").unwrap(), &mut MockConnector
).unwrap();
let bytes = run_request(req);
let s = from_utf8(&bytes[..]).unwrap();
assert_no_body(s);
} | rust_cleaned_test_functions.jsonl/2065 | {
"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,
13138,
15124,
14114,
368,
341,
286,
1077,
4232,
284,
6145,
486,
4197,
76393,
1006,
310,
11203,
11,
22840,
486,
6400,
445,
1254,
1110,
8687,
21435,
1827,
15454,
1507,
609,
6984,
14563,
35954,
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... | 1 |
#[test]
fn test_pause() {
let runc_id = format!("{}", Uuid::new_v4());
let runc_path = env::temp_dir().join(&runc_id).join("runc.amd64");
let runc_root =
PathBuf::from(env::var_os("XDG_RUNTIME_DIR").expect("expected temporary path"))
.join("rust-runc")
... | rust_cleaned_test_functions.jsonl/24469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 782
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59989,
368,
341,
286,
1077,
435,
1347,
842,
284,
3561,
79878,
547,
2423,
486,
931,
2273,
19,
1423,
286,
1077,
435,
1347,
2638,
284,
6105,
486,
3888,
4334,
1005,
5987,
2099,
81,
1347,
842,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_rekove_without_reload() -> Result<()> {
let k: Key<Provider> = Key::random()?;
let v0 = DBView::load(k.clone(), empty::<ReadResult>())?;
let mut writes = vec![];
let id = RecordId::random::<Provider>()?;
let mut w = v0.writer(id);
writes.push(w.truncate()?);
writes.... | rust_cleaned_test_functions.jsonl/125344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
74,
994,
39904,
79405,
368,
1464,
5714,
71698,
341,
262,
1077,
595,
25,
5309,
27,
5179,
29,
284,
5309,
486,
11463,
94136,
262,
1077,
348,
15,
284,
5952,
851,
486,
1078,
5969,
15997,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_emit_jcc_unsigned_greater() {
let mut buf = MacroAssembler::new();
let lbl = buf.create_label();
emit_jcc(&mut buf, CondCode::UnsignedGreater, lbl);
emit_nop(&mut buf);
buf.bind_label(lbl);
assert_eq!(vec![0x0f, 0x87, 1, 0, 0, 0, 0x90], buf.data())... | rust_cleaned_test_functions.jsonl/85431 | {
"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,
69082,
5374,
638,
67830,
97994,
368,
341,
286,
1077,
5206,
6607,
284,
53317,
77858,
486,
931,
543,
286,
1077,
16421,
284,
6607,
2520,
6106,
543,
286,
16691,
5374,
638,
2099,
6984,
6607,
11,
44826,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exa1_skip_if_not_pressed() {
let mut machine = Machine::new(TestContext::new());
machine.register_set(0xB, 0xD);
machine.key.key_down(0xC);
machine.test_opcode(0xEBA1);
// Should skip next instruction
assert_eq!(machine.pc, PC_BEGIN + 4);
// Should not skip if it is ... | rust_cleaned_test_functions.jsonl/127979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
64,
16,
44830,
11119,
7913,
46178,
368,
341,
262,
1077,
5206,
5662,
284,
12960,
486,
931,
31159,
1972,
486,
931,
1423,
262,
5662,
9929,
2602,
7,
15,
14377,
11,
220,
15,
15764,
317,
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_construct_hash() {
assert_eq!(H128::default(), H128::new());
assert_eq!(H128::new(), H128::zero());
assert_eq!(H128::len(), 16);
} | rust_cleaned_test_functions.jsonl/123491 | {
"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,
64803,
8950,
368,
341,
197,
6948,
10714,
10297,
39,
16,
17,
23,
486,
2258,
1507,
472,
16,
17,
23,
486,
931,
1423,
197,
6948,
10714,
10297,
39,
16,
17,
23,
486,
931,
1507,
472,
16,
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_raw_bytes() {
let (sql, params) = Sqlite::build(Select::default().value(Value::bytes(vec![1, 2, 3]).raw())).unwrap();
assert_eq!("SELECT x'010203'", sql);
assert!(params.is_empty());
} | rust_cleaned_test_functions.jsonl/52926 | {
"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,
16067,
12524,
368,
341,
286,
1077,
320,
3544,
11,
3628,
8,
284,
7224,
632,
486,
5834,
7,
3379,
486,
2258,
1005,
957,
25346,
486,
9651,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
10697,
1041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_project() {
let project: Project = read_test_file("project");
// Split for clippy's complexity checks.
check_project_a(&project);
check_project_b(&project);
check_project_c(&project);
} | rust_cleaned_test_functions.jsonl/12950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
16352,
368,
341,
262,
1077,
2390,
25,
5787,
284,
1349,
4452,
2458,
445,
4987,
3071,
262,
442,
27810,
369,
1185,
45749,
594,
23094,
12341,
624,
262,
1779,
16352,
4306,
2099,
4987,
317,
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 |
#[test]
fn test_match_libname() {
assert_eq!(match_libname("liblldb.so"), Some("lldb"));
assert_eq!(match_libname("liblldb-3.8.so"), Some("lldb-3.8"));
assert_eq!(match_libname("liblldbIntelFeatures.so"), None);
} | rust_cleaned_test_functions.jsonl/64725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
16142,
606,
368,
341,
262,
2060,
10714,
10297,
6347,
16142,
606,
445,
2740,
32459,
65,
26476,
3975,
4329,
445,
32459,
65,
4010,
262,
2060,
10714,
10297,
6347,
16142,
606,
445,
2740,
32459,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() -> Result<(), EtError> {
let mut out = Vec::new();
assert!(run(["entab"], &b">test\nACGT"[..], io::Cursor::new(&mut out)).is_ok());
assert_eq!(&out[..], b"id\tsequence\ntest\tACGT\n");
Ok(())
} | rust_cleaned_test_functions.jsonl/49291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
368,
1464,
5714,
68843,
18888,
1454,
29,
341,
286,
1077,
5206,
700,
284,
11312,
486,
931,
543,
286,
2060,
10297,
6108,
19065,
306,
370,
7914,
609,
65,
755,
1944,
1699,
1706,
25388,
36864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drain_filter() {
{
let mut set: HashSet<i32> = (0..8).collect();
let drained = set.drain_filter(|&k| k % 2 == 0);
let mut out = drained.collect::<Vec<_>>();
out.sort_unstable();
assert_eq!(vec![0, 2, 4, 6], out);
ass... | rust_cleaned_test_functions.jsonl/53018 | {
"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,
26680,
466,
8727,
368,
341,
286,
341,
310,
1077,
5206,
738,
25,
18931,
21897,
18,
17,
29,
284,
320,
15,
496,
23,
568,
17384,
543,
310,
1077,
60408,
284,
738,
950,
29093,
8727,
22428,
5,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_str_local_path() {
let path = "/tmp/local_path.txt";
let res = S3Path::from_str(&path);
assert!(res.is_err());
} | rust_cleaned_test_functions.jsonl/85012 | {
"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,
5673,
2895,
13564,
2638,
368,
341,
286,
1077,
1815,
284,
3521,
5173,
22270,
2638,
3909,
876,
286,
1077,
592,
284,
328,
18,
1820,
486,
1499,
2895,
2099,
2343,
317,
286,
2060,
10297,
416,
2079,
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 |
#[test]
fn test_cpi() {
let mut state = State8080::empty_state();
state.memory = vec![0xfe, 0x40];
state.a = 0x4a;
state.cc.cy = 1;
state.cc.z = 1;
emulate_8080_op(&mut state);
assert_eq!(state.cc.cy, 0);
assert_eq!(state.cc.z, 0);
assert_e... | rust_cleaned_test_functions.jsonl/7782 | {
"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,
666,
2493,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
31469,
11,
220,
15,
87,
19,
15,
935,
286,
1584,
5849,
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_key_derivation() {
// testnet compressed
let sk = PrivateKey::from_wif("cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy").unwrap();
assert_eq!(sk.network, Testnet);
assert_eq!(sk.compressed, true);
assert_eq!(&sk.to_wif(), "cVt4o7BGAig1UXywgGSmARhxMdz... | rust_cleaned_test_functions.jsonl/15427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
35345,
39127,
368,
341,
286,
442,
1273,
4711,
30649,
198,
286,
1077,
1901,
284,
9679,
1592,
486,
1499,
1670,
333,
445,
66,
53,
83,
19,
78,
22,
33,
16128,
343,
16,
13401,
88,
45540,
38,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accumulate_axis_inplace_noop() {
let mut a = Array2::<u8>::zeros((0, 3));
a.accumulate_axis_inplace(Axis(0), |&prev, curr| *curr += prev);
assert_eq!(a, Array2::zeros((0, 3)));
let mut a = Array2::<u8>::zeros((3, 1));
a.accumulate_axis_inplace(Axis(1), |&prev, curr| *curr +=... | rust_cleaned_test_functions.jsonl/92635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75837,
6334,
23567,
1243,
2007,
6536,
453,
368,
341,
262,
1077,
5206,
264,
284,
2910,
17,
27638,
84,
23,
6831,
35716,
1188,
15,
11,
220,
18,
1106,
262,
264,
13,
98387,
23567,
1243,
2007,
4346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kth_multiple() {
let test_cases = [
(0, 1),
(1, 3),
(2, 5),
(3, 7),
(4, 9),
(5, 15),
(6, 21),
(7, 25),
(8, 27),
(9, 35),
(100, 35721),
(1000, 82_046_671_875),
];
for case in test_cases {
... | rust_cleaned_test_functions.jsonl/97312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
339,
45233,
368,
341,
262,
1077,
1273,
41427,
284,
2278,
286,
320,
15,
11,
220,
16,
701,
715,
286,
320,
16,
11,
220,
18,
1326,
286,
320,
17,
11,
220,
20,
1326,
286,
320,
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... | 5 |
#[test]
fn test_with_rho_and_sigma() {
let settings = Settings::new(1., array![2., 2.], array![2., 2.], 50, 2, false);
let mut problem_data = ProblemData::new(
CsMat::csc_from_dense(array![[65., 76.], [76., 89.]].view(), f64::EPSILON),
array![7., 3.],
CsMat::... | rust_cleaned_test_functions.jsonl/49657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 537
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
79160,
8378,
49005,
368,
341,
286,
1077,
5003,
284,
11296,
486,
931,
7,
16,
2572,
1334,
20703,
17,
2572,
220,
17,
13,
1125,
1334,
20703,
17,
2572,
220,
17,
13,
1125,
220,
20,
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_intersection() {
let b1 = Box3D::from_points(&[point3(-15.0, -20.0, -20.0), point3(10.0, 20.0, 20.0)]);
let b2 = Box3D::from_points(&[point3(-10.0, 20.0, 20.0), point3(15.0, -20.0, -20.0)]);
assert!(b1.intersection(&b2).is_some());
let b1 = Box3D::from_points(&[p... | rust_cleaned_test_functions.jsonl/92558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82558,
368,
341,
286,
1077,
293,
16,
284,
8261,
18,
35,
486,
1499,
12928,
2099,
58,
2768,
18,
4080,
16,
20,
13,
15,
11,
481,
17,
15,
13,
15,
11,
481,
17,
15,
13,
15,
701,
1459,
18,
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_bootstrap_from_matches() {
// Create command line test data
let app = clap_app!(myapp =>
(@arg base_dir: -b --base_dir +takes_value "A path to a directory to store your files")
(@arg config: -c --config +takes_value "A path to the configuration file to use... | rust_cleaned_test_functions.jsonl/9032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1015
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88424,
5673,
38344,
368,
341,
286,
442,
4230,
3210,
1555,
1273,
821,
198,
286,
1077,
906,
284,
89577,
8191,
10297,
2408,
676,
6274,
310,
8006,
858,
2331,
4334,
25,
481,
65,
1177,
3152,
4334,
488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_addhelper() {
let mut x = [1, 2, 3];
let cout = addhelper(&mut x, &[4, 5, 6]);
assert_eq!(x, [5, 7, 9]);
assert!(!cout);
let mut x = [1, 2, 3];
let cout = addhelper(&mut x, &[4, 5]);
assert_eq!(x, [5, 7, 3]);
assert!(!cout);
... | rust_cleaned_test_functions.jsonl/9425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
18764,
368,
341,
286,
1077,
5206,
856,
284,
508,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
5034,
284,
912,
18764,
2099,
6984,
856,
11,
44590,
19,
11,
220,
20,
11,
220,
21,
2558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_char() {
// 𝄞mus<invalid>ic<invalid>
let v = [
0xD8, 0x34, 0xDD, 0x1E, 0x00, 0x6d, 0x00, 0x75, 0x00, 0x73, 0xDD, 0x1E, 0x00, 0x69, 0x00,
0x63, 0xD8, 0x34,
];
assert_eq!(
utf16be_to_char(&v)
.map(|r| r.map_er... | rust_cleaned_test_functions.jsonl/39684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 760
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
9232,
368,
341,
286,
442,
81250,
226,
252,
37727,
27,
11808,
29,
292,
27,
11808,
397,
286,
1077,
348,
284,
2278,
310,
220,
15,
15764,
23,
11,
220,
15,
87,
18,
19,
11,
220,
15,
82331,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_samples_for_harvest() {
let fs = 44100;
let x_length = 256;
let frame_period = 5.0;
unsafe {
let samples = GetSamplesForHarvest(fs, x_length, frame_period);
assert_eq!(samples, 2);
}
} | rust_cleaned_test_functions.jsonl/20847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
18297,
5478,
1523,
277,
7019,
368,
341,
10217,
8619,
1843,
284,
220,
19,
19,
16,
15,
15,
280,
10217,
856,
5118,
257,
284,
220,
17,
20,
21,
280,
10217,
4034,
20818,
284,
220,
20,
13,
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_timeout() {
exec! {
"sleep",
args: ["60"],
timeout: 3000,
log: true,
code: 9, // SIGKILL
stdout: [],
stderr: []
};
} | rust_cleaned_test_functions.jsonl/72687 | {
"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,
20537,
368,
341,
262,
3883,
0,
341,
286,
330,
25809,
756,
286,
2827,
25,
4383,
21,
15,
8097,
286,
9632,
25,
220,
18,
15,
15,
15,
345,
286,
1487,
25,
830,
3554,
286,
2038,
25,
220,
24,
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 |
#[test]
fn test_mmio_console_config_cmdline_parser() {
let mut vm_config = VmConfig::default();
assert!(parse_virtio_serial(&mut vm_config, "virtio-serial-device").is_ok());
assert!(vm_config
.add_chardev("socket,id=test_console,path=/path/to/socket,server,nowait")
... | rust_cleaned_test_functions.jsonl/127552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35599,
815,
51724,
5332,
11684,
1056,
18517,
368,
341,
286,
1077,
5206,
10995,
5332,
284,
647,
76,
2648,
486,
2258,
543,
286,
2060,
10297,
6400,
2273,
2106,
815,
25602,
2099,
6984,
10995,
5332,
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_div_roundup() {
assert_eq!(div_roundup(5u8, 2u8), 3u8);
assert_eq!(div_roundup(4u8, 2u8), 2u8);
assert_eq!(div_roundup(4000u32, 1500u32), 3u32);
} | rust_cleaned_test_functions.jsonl/17564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
29896,
454,
368,
341,
262,
2060,
10714,
10297,
611,
29896,
454,
7,
20,
84,
23,
11,
220,
17,
84,
23,
701,
220,
18,
84,
23,
317,
262,
2060,
10714,
10297,
611,
29896,
454,
7,
19,
84,
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_scoring() {
test(
&vec!["2H 3C 4D 5D 6H", "4S AH 3S 2D 5H"],
&vec!["2H 3C 4D 5D 6H"],
)
} | rust_cleaned_test_functions.jsonl/121275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
7386,
13171,
5503,
368,
341,
1066,
262,
1273,
1006,
286,
609,
4083,
0,
1183,
17,
39,
220,
18,
34,
220,
19,
35,
220,
20,
35,
220,
21,
39,
497,
330,
19,
50,
47288,
220,
18,
50,
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_convert_options_declaration() {
let b = ast::BaseNode::default();
let pkg = parse_package(
r#"option task = { name: "foo", every: 1h, delay: 10m, cron: "0 2 * * *", retry: 5}"#,
);
let got = test_convert(pkg).unwrap();
let symbols = collect_sy... | rust_cleaned_test_functions.jsonl/131372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3562
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
8743,
77926,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
4715,
26328,
1006,
310,
435,
55543,
2047,
3383,
284,
314,
829,
25,
330,
7975,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_fizz_or_buzz() {
let three_four = FizzBuzz::new(3, 4);
let two_five = FizzBuzz::new(2, 5);
assert_eq!("59", three_four.get_value(59));
assert_eq!("3", two_five.get_value(3));
assert_eq!("143", two_five.get_value(143));
} | rust_cleaned_test_functions.jsonl/74961 | {
"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,
7913,
761,
8759,
8734,
880,
8889,
368,
341,
286,
1077,
2326,
56142,
284,
434,
8759,
59473,
486,
931,
7,
18,
11,
220,
19,
317,
286,
1077,
1378,
95258,
284,
434,
8759,
59473,
486,
931,
7,
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_non_finite_floats() {
let mut tokens = json_token_iter(b"inf");
tokens
.next()
.expect("there is a token")
.expect_err("but it is invalid, ensure that Rust float boundary cases don't parse");
} | rust_cleaned_test_functions.jsonl/58151 | {
"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,
21637,
761,
15856,
17586,
82,
368,
341,
286,
1077,
5206,
11211,
284,
2951,
6458,
11723,
1883,
1,
13573,
797,
286,
11211,
198,
310,
659,
3600,
741,
310,
659,
17119,
445,
18532,
374,
264,
3950,
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_process_error_cases() {
let mut event_manager = EventManager::new().unwrap();
let mut net = Net::default_net(TestMutators::default());
let mem = Net::default_guest_memory();
let (rxq, txq) = Net::virtqueues(&mem);
net.assign_queues(rxq.create_queue(), txq.... | rust_cleaned_test_functions.jsonl/72369 | {
"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,
11305,
4096,
41427,
368,
341,
286,
1077,
5206,
1538,
12144,
284,
3665,
2043,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
4179,
284,
9374,
486,
2258,
19722,
31159,
51440,
2973,
486,
2258,
1423,
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_ipblock_intersects() {
assert_eq!(IpBlock::new(5, 6).intersects(&IpBlock::new(4, 9)), true);
assert_eq!(IpBlock::new(4, 9).intersects(&IpBlock::new(5, 6)), true);
assert_eq!(IpBlock::new(2, 4).intersects(&IpBlock::new(5, 8)), false);
} | rust_cleaned_test_functions.jsonl/109568 | {
"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,
10385,
4574,
15318,
54429,
368,
341,
286,
2060,
10714,
10297,
23378,
4713,
486,
931,
7,
20,
11,
220,
21,
568,
2245,
54429,
2099,
23378,
4713,
486,
931,
7,
19,
11,
220,
24,
5731,
830,
317,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_text_performance() {
let width = 1000;
let height = 1000;
let mut surface = Surface::new_raster_n32_premul(ISize::new(width, height)).unwrap();
let canvas = surface.canvas();
let font = Font::new(
Typeface::new("Source Sans Pro", FontStyle::n... | rust_cleaned_test_functions.jsonl/81983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4326,
84833,
368,
341,
286,
1077,
2374,
284,
220,
16,
15,
15,
15,
280,
286,
1077,
2608,
284,
220,
16,
15,
15,
15,
401,
286,
1077,
5206,
7329,
284,
26963,
486,
931,
1710,
2300,
1089,
18,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_a_ray_when_the_camera_is_transformed() {
let mut camera = camera::Camera::new(201, 101, std::f64::consts::PI / 2.0);
let transform = matrix::Matrix4::IDENTITY
.translation(0.0, -2.0, 5.0)
.rotation_y(std::f64::consts::PI / 4.0);
camera.transform = ... | rust_cleaned_test_functions.jsonl/116189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
72690,
47636,
16068,
29843,
6892,
18449,
291,
368,
341,
286,
1077,
5206,
6249,
284,
6249,
486,
13445,
486,
931,
7,
17,
15,
16,
11,
220,
16,
15,
16,
11,
1460,
486,
69,
21,
19,
486,
9577... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json() {
use serialize::json::{Json, List, U64};
let ctx = TestContext::new();
let con = ctx.connection();
redis::cmd("SET").arg("foo").arg("[1, 2, 3]").execute(&con);
let json : Json = redis::cmd("GET").arg("foo").query(&con).unwrap();
assert_eq!(json, List(vec![
... | rust_cleaned_test_functions.jsonl/31505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
368,
341,
262,
990,
24235,
486,
2236,
22964,
5014,
11,
1759,
11,
547,
21,
19,
2315,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
390,
284,
5635,
20310,
1428,
262,
20870,
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_fmt() {
let fields = OptionalFields::default();
assert_eq!(fields.to_string(), "");
let fields = OptionalFields::from(vec![String::from("n")]);
assert_eq!(fields.to_string(), "n");
let fields = OptionalFields::from(vec![String::from("n"), String::from("d... | rust_cleaned_test_functions.jsonl/36907 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
368,
341,
286,
1077,
5043,
284,
12256,
8941,
486,
2258,
543,
286,
2060,
10714,
10297,
9007,
2389,
3904,
1507,
50970,
286,
1077,
5043,
284,
12256,
8941,
486,
1499,
25592,
20703,
703,
486,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_i32_littleendian() {
let mut storage = vec![0; 1024];
type Field1 = PrimitiveField<i32, LittleEndian, 5>;
type Field2 = PrimitiveField<i32, LittleEndian, 20>;
Field1::write(&mut storage, 10i32.pow(8));
Field2::write(&mut storage, -(10i32.pow(7)));
... | rust_cleaned_test_functions.jsonl/35721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
18,
17,
907,
2377,
408,
1103,
368,
341,
286,
1077,
5206,
5819,
284,
7486,
20703,
15,
26,
220,
16,
15,
17,
19,
4821,
286,
943,
8601,
16,
284,
51460,
1877,
21897,
18,
17,
11,
14671,
4323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sequence_iter_is_stable() {
let data = [0; 32];
for data_size in 0..32 {
let event = LV2AtomEventBuilder::<32>::new(0, 0, &data[..data_size]).unwrap();
for capacity in 0..1024 {
let mut sequence = LV2AtomSequence::new(&test_features(), capa... | rust_cleaned_test_functions.jsonl/80318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23735,
11723,
6892,
1261,
480,
368,
341,
286,
1077,
821,
284,
508,
15,
26,
220,
18,
17,
935,
286,
369,
821,
2368,
304,
220,
15,
496,
18,
17,
341,
310,
1077,
1538,
284,
39169,
17,
35836,
1556... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_integer() {
assert_eq!(integer("0"), Ok(("", 0)));
assert_eq!(integer("0123456789"), Ok(("", 123456789)));
assert_eq!(integer("0123_456_789"), Ok(("", 123456789)));
assert_eq!(integer("0123_456_789_"), Ok(("", 123456789)));
assert_eq!(integer("+0123456789"... | rust_cleaned_test_functions.jsonl/116070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
368,
341,
286,
2060,
10714,
10297,
11662,
445,
15,
3975,
7622,
7,
19814,
220,
15,
4945,
286,
2060,
10714,
10297,
11662,
445,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
3975,
7622,
7,
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... | 1 |
#[test]
fn test_parse_error_autoscaling_delete_policy() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"autoscaling-delete-policy.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
... | rust_cleaned_test_functions.jsonl/8935 | {
"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,
21039,
4096,
32808,
436,
81552,
11353,
22773,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
41737,
756,
310,
330,
79301,
81552,
40904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_custom_with_preceding_whitespace() {
let s = "1d{ 1,\t1, \t0,\t \t0,\t -1, -1}";
let roll: Roll = s.parse().expect("Bad parse");
assert_eq!(roll.sides, 6);
assert_eq!(roll.values, vec![1, 1, 0, 0, -1, -1]);
} | rust_cleaned_test_functions.jsonl/52852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15875,
6615,
10442,
1998,
287,
86175,
368,
341,
286,
1077,
274,
284,
330,
16,
67,
90,
220,
16,
26266,
83,
16,
11,
1124,
83,
15,
26266,
83,
1124,
83,
15,
26266,
83,
481,
16,
11,
256,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dir_path() {
t!(s: Path::new("hi\\there").dir_path(), "hi");
t!(s: Path::new("hi").dir_path(), ".");
t!(s: Path::new("\\hi").dir_path(), "\\");
t!(s: Path::new("\\").dir_path(), "\\");
t!(s: Path::new("..").dir_path(), "..");
t!(s: Path::new("..\\.... | rust_cleaned_test_functions.jsonl/102779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4334,
2638,
368,
341,
286,
259,
10297,
82,
25,
7933,
486,
931,
445,
6023,
3422,
18532,
1827,
3741,
2638,
1507,
330,
6023,
797,
286,
259,
10297,
82,
25,
7933,
486,
931,
445,
6023,
1827,
3741,
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_virtio_pmem() {
test_block!(tb, "", {
let mut clear = ClearDiskConfig::new();
let guest = Guest::new(&mut clear);
let mut workload_path = dirs::home_dir().unwrap();
workload_path.push("workloads");
let mut kernel_path = worklo... | rust_cleaned_test_functions.jsonl/55948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1463
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
620,
10536,
368,
341,
286,
1273,
7113,
10297,
18387,
11,
7342,
341,
310,
1077,
5206,
2797,
284,
12023,
47583,
2648,
486,
931,
543,
310,
1077,
8640,
284,
26215,
486,
931,
2099,
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... | 2 |
#[test]
fn test_process_fame() {
crate::grit_test::set_test_logging(LOG_LEVEL);
let td: TempDir = crate::grit_test::init_repo();
let path = td.path().to_str().unwrap();
let args = FameArgs::new(
String::from(path),
Some("loc".to_string()),
No... | rust_cleaned_test_functions.jsonl/5819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
761,
373,
368,
341,
286,
17717,
486,
901,
275,
4452,
486,
746,
4452,
59982,
24850,
17415,
626,
286,
1077,
17941,
25,
19944,
6184,
284,
17717,
486,
901,
275,
4452,
486,
2327,
37784,
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... | 2 |
#[test]
fn test_slice_to() {
let vec: &[int] = &[1, 2, 3, 4];
assert_eq!(vec[..4], vec);
let b: &[int] = &[1, 2];
assert_eq!(vec[..2], b);
let b: &[int] = &[];
assert_eq!(vec[..0], b);
} | rust_cleaned_test_functions.jsonl/31830 | {
"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,
26488,
2346,
368,
341,
286,
1077,
7486,
25,
44590,
396,
60,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
2060,
10714,
10297,
4083,
95874,
19,
1125,
7486,
317,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_runnables_impl_mod() {
check(
r#"
//- /lib.rs
mod foo;
//- /foo.rs
struct Foo;$0
impl Foo {
/// ```
/// let x = 5;
/// ```
fn foo() {}
}
"#,
&[DocTest],
expect![[r#"
[
Runnable {
... | rust_cleaned_test_functions.jsonl/22198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 706
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
14007,
77,
4788,
21007,
7480,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
2593,
15229,
280,
61463,
608,
7975,
25638,
198,
1235,
33428,
25675,
15,
198,
6383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stack_zero_copy_bufs() {
let (mut isolate, dispatch_count) = setup(Mode::AsyncZeroCopy(2));
js_check(isolate.execute(
"filename.js",
r#"
let zero_copy_a = new Uint8Array([0]);
let zero_copy_b = new Uint8Array([1]);
Deno.core.send(1, zero_copy_... | rust_cleaned_test_functions.jsonl/23801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
15528,
19359,
16096,
10363,
82,
368,
341,
262,
1077,
320,
6984,
42123,
11,
6845,
3180,
8,
284,
6505,
3189,
534,
486,
6525,
17999,
12106,
7,
17,
1106,
262,
6994,
7200,
82669,
7769,
1006,
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_op_logic() {
let lexer = Lexer::new("a && b || c && !d");
let actual: Vec<TokType> = lexer.map(|t| t.0).collect();
let expected = vec![
TokType::Iden("a".to_string()),
TokType::And,
TokType::Iden("b".to_string()),
TokType::O... | rust_cleaned_test_functions.jsonl/24698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
54335,
368,
341,
286,
1077,
53259,
284,
85082,
486,
931,
445,
64,
1009,
293,
1369,
272,
1009,
753,
67,
797,
286,
1077,
5042,
25,
11312,
3125,
562,
929,
29,
284,
53259,
4770,
22428,
83,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_selection_sort() {
let mut arr1: [i64; 4] = [21, -4, 6, 12];
let arr1_sorted: [i64; 4] = [-4, 6, 12, 21];
assert_eq!(sorting::selection_sort(&mut arr1), arr1_sorted);
} | rust_cleaned_test_functions.jsonl/130156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23672,
18435,
368,
341,
262,
1077,
5206,
2890,
16,
25,
508,
72,
21,
19,
26,
220,
19,
60,
284,
508,
17,
16,
11,
481,
19,
11,
220,
21,
11,
220,
16,
17,
935,
262,
1077,
2890,
16,
41277,
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_read_i64_positive() -> IonResult<()> {
let mut cursor = ion_cursor_for(&[0x21, 0x01]);
assert_eq!(cursor.next()?, Some(Value(IonType::Integer, false)));
assert_eq!(cursor.read_i64()?, Some(1i64));
Ok(())
} | rust_cleaned_test_functions.jsonl/82734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5318,
21,
19,
54160,
368,
1464,
44805,
2077,
71698,
341,
286,
1077,
5206,
8128,
284,
27672,
28601,
5478,
2099,
58,
15,
87,
17,
16,
11,
220,
15,
87,
15,
16,
2558,
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... | 3 |
#[test]
fn test_attachment() {
let value = Attachment {
filename: "a.png".to_owned(),
height: Some(184),
id: AttachmentId(700_000_000_000_000_000),
proxy_url: "https://cdn.example.com/1.png".to_owned(),
size: 13_593,
url: "https://e... | rust_cleaned_test_functions.jsonl/21424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 837
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40868,
368,
341,
286,
1077,
897,
284,
55748,
341,
310,
3899,
25,
330,
64,
3508,
3263,
983,
51973,
3148,
310,
2608,
25,
4329,
7,
16,
23,
19,
1326,
310,
877,
25,
55748,
764,
7,
22,
15,
15,
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_prepare() {
let expr = SuffixExpr::new("key", "Rust").prepare();
let expected = SuffixExpr::<Escaped> {
column: Cow::Borrowed("key"),
target: Cow::Borrowed("Rust"),
_marker: PhantomData,
};
assert_eq!(expected, expr)
} | rust_cleaned_test_functions.jsonl/122491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
368,
341,
286,
1077,
15169,
284,
328,
13554,
16041,
486,
931,
445,
792,
497,
330,
49,
590,
1827,
13609,
543,
286,
1077,
3601,
284,
328,
13554,
16041,
27638,
36121,
10185,
29,
341,
310,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fill_rpool_r1_ok() {
let result = fill_rpool(
"[\"312a8e55996f72a708929e68c7c0f4dcdcdcddb35d512f9ded388bcd7dce8633\"]".to_string(),
"[\"0260b63daf0f1576b1275f4713c2393dd0de89abbc14e70c7b1e209f5a9fbb69f0\"]".to_string(),
Curve::Secp256r1,
"{... | rust_cleaned_test_functions.jsonl/49756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
1710,
10285,
1710,
16,
19817,
368,
341,
286,
1077,
1102,
284,
5155,
1710,
10285,
1006,
310,
10545,
2105,
18,
16,
17,
64,
23,
68,
20,
20,
24,
24,
21,
69,
22,
17,
64,
22,
15,
23,
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_point_regular_points() {
// Conversion to/from degrees has a little more variability than the default EPSILON.
const EPSILON: f64 = 1e-13;
let center = Point::from(LatLng::new(Deg(80.).into(), Deg(135.).into()));
let radius = Angle::from(Deg(20.));
let pts... | rust_cleaned_test_functions.jsonl/70562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 868
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6085,
49443,
12928,
368,
341,
286,
442,
42509,
311,
91106,
12348,
702,
264,
2632,
803,
53609,
1091,
279,
1638,
40607,
55016,
624,
286,
733,
40607,
55016,
25,
282,
21,
19,
284,
220,
16,
68,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_fastq_reader() {
// try different initial capacities to test
// buffer growing feature
for cap in 3..100 {
let mut exp_iter = EXPECTED.iter();
let mut reader = Reader::with_capacity(FASTQ, cap);
while let Some(&(id, desc, head, seq, qual)) = exp_iter.next() {
... | rust_cleaned_test_functions.jsonl/40330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35743,
80,
22306,
368,
341,
262,
442,
1430,
2155,
2856,
58439,
311,
1273,
198,
262,
442,
4147,
7826,
4565,
198,
262,
369,
2062,
304,
220,
18,
496,
16,
15,
15,
341,
286,
1077,
5206,
1343,
11723... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_look_at_lh_no_displacement_or_rotation() {
let eye = Point3::new(0.0, 0.0, 0.0);
let target = Point3::new(0.0, 0.0, 1.0);
let up = Vector3::unit_y();
let look_at = Matrix4x4::look_at_lh(&eye, &target, &up);
let direction = target - Point3::origin();
... | rust_cleaned_test_functions.jsonl/129139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24271,
3752,
907,
71,
6536,
9932,
16101,
8734,
44813,
368,
341,
286,
1077,
7912,
284,
5126,
18,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
317,
286,
1077,
2169,
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_buf_writer_seek() {
let mut buf = [0 as u8, ..8];
{
let mut writer = BufWriter::new(&mut buf);
assert_eq!(writer.tell(), Ok(0));
writer.write(&[1]).unwrap();
assert_eq!(writer.tell(), Ok(1));
writer.seek(2, SeekSet).unw... | rust_cleaned_test_functions.jsonl/7086 | {
"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,
10363,
28908,
74473,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
438,
575,
23,
11,
5241,
23,
935,
286,
341,
310,
1077,
5206,
6916,
284,
69013,
6492,
486,
931,
2099,
6984,
6607,
317,
310,
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_block_id_includes_content_hash() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let mut block = get_block(&mut rng);
let mut bytes = [0u8; 32];
rng.fill_bytes(&mut bytes);
let wrong_content_hash = BlockContentsHash(bytes);
block.conte... | rust_cleaned_test_functions.jsonl/4206 | {
"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,
7113,
842,
1243,
7396,
7495,
8950,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_var_call() {
assert_eq!(
super::parse("{{ function(\"123\", 3) }}", &Syntax::default()).unwrap(),
vec![Node::Expr(
Ws(false, false),
Expr::VarCall("function", vec![Expr::StrLit("123"), Expr::NumLit("3")]),
)],
... | rust_cleaned_test_functions.jsonl/50224 | {
"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,
21039,
4612,
13429,
368,
341,
286,
2060,
10714,
33673,
310,
2256,
486,
6400,
445,
2979,
729,
36014,
16,
17,
18,
16215,
220,
18,
8,
3869,
497,
609,
33890,
486,
2258,
6011,
15454,
3148,
310,
7486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rle_decode_bool() {
// RLE test data: 50 1s followed by 50 0s
let data1 = ByteBufferPtr::new(vec![0x64, 0x01, 0x64, 0x00]);
// 100 / 8 = 13 groups
let data2 = ByteBufferPtr::new(vec![
0x1B, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA... | rust_cleaned_test_functions.jsonl/72788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 709
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
273,
15227,
22159,
368,
341,
286,
442,
431,
867,
1273,
821,
25,
220,
20,
15,
220,
16,
82,
8110,
553,
220,
20,
15,
220,
15,
82,
8945,
286,
1077,
821,
16,
284,
50299,
5348,
486,
931,
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_link_signal() {
assert_eq!(
GiDocgen::from_str("[signal@Gtk.RecentManager::changed]"),
Ok(GiDocgen::Signal {
namespace: Some("Gtk".to_string()),
type_: "RecentManager".to_string(),
name: "changed".to_string(),
... | rust_cleaned_test_functions.jsonl/78475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
21137,
368,
341,
286,
2060,
10714,
33673,
310,
15392,
9550,
4370,
486,
1499,
2895,
10937,
26622,
31,
45103,
2817,
1168,
2043,
486,
17353,
60,
4461,
310,
7622,
6699,
72,
9550,
4370,
486,
2681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ldx() {
let mut r = Register::new();
let mut b = MockBus::new();
b.memory[0xA5] = 0xFF;
ldx(0xA5, &mut r, &mut b);
assert_eq!(r.get_X(),0xFF)
} | rust_cleaned_test_functions.jsonl/14182 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50573,
87,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
1077,
5206,
293,
284,
14563,
15073,
486,
931,
543,
262,
293,
36611,
58,
15,
14673,
20,
60,
284,
220,
15,
9264,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_quit() {
let mut s = Stack::new();
let res = s.eval(Op::Quit);
assert!(res.is_err());
if let Err(Error::Quit) = res {
} else {
assert!(false);
}
} | rust_cleaned_test_functions.jsonl/34528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
72424,
368,
341,
286,
1077,
5206,
274,
284,
14284,
486,
931,
1428,
286,
1077,
592,
284,
274,
31710,
54494,
486,
42856,
317,
286,
2060,
10297,
416,
2079,
9266,
1423,
286,
421,
1077,
15495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_requests() {
let root_id = uuid::Uuid::parse_str("00000000-0000-0000-0000-000000000000");
let root_id = root_id.expect("Couldn't parse uuid.");
let main = Path { root_id, segments: vec!["Main.txt".into()] };
let target = Path { root_id, segments: vec!["Target.txt".into()] };... | rust_cleaned_test_functions.jsonl/32827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
37216,
368,
341,
262,
1077,
3704,
842,
284,
16040,
486,
38431,
486,
6400,
2895,
445,
15,
15,
15,
15,
15,
15,
15,
15,
12,
15,
15,
15,
15,
12,
15,
15,
15,
15,
12,
15,
15,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_resource_2() {
let url = url::Url::parse(
"http://myaccount.blob.core.windows.\
net/mycontainer?restype=container&comp=list&include=snapshots&\
include=metadata&include=uncommittedblobs",
)
.unwrap();
assert_eq!(
... | rust_cleaned_test_functions.jsonl/5200 | {
"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,
27421,
22391,
551,
17962,
62,
17,
368,
341,
286,
1077,
2515,
284,
2515,
486,
2864,
486,
6400,
1006,
310,
330,
1254,
1110,
2408,
4608,
96281,
4871,
68113,
13,
5661,
1797,
4179,
34198,
3586,
30,
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_filter_union_array_sparse() {
let mut builder = UnionBuilder::new_sparse(3);
builder.append::<Int32Type>("A", 1).unwrap();
builder.append::<Float64Type>("B", 3.2).unwrap();
builder.append::<Int32Type>("A", 34).unwrap();
let array = builder.build().unwrap()... | rust_cleaned_test_functions.jsonl/75318 | {
"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,
8727,
51621,
3858,
71123,
368,
341,
286,
1077,
5206,
7363,
284,
9145,
3297,
486,
931,
71123,
7,
18,
317,
286,
7363,
2057,
27638,
1072,
18,
17,
929,
13211,
32,
497,
220,
16,
568,
15454,
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_parse_cfi_instruction_restore_extended() {
let expected_rest = [1, 2, 3, 4];
let expected_reg = 7;
let section = Section::with_endian(Endian::Little)
.D8(constants::DW_CFA_restore_extended.0)
.uleb(expected_reg.into())
.append_bytes(&ex... | rust_cleaned_test_functions.jsonl/9323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
666,
9983,
54923,
62677,
61678,
368,
341,
286,
1077,
3601,
32231,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
3601,
4920,
284,
220,
22,
280,
286,
1077,
3772,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_predefined_numbers() {
assert_eq!((2, vec![0x00_u8]), serialize_uper(PredefinedNumbers::Abc));
assert_eq!((2, vec![0x40_u8]), serialize_uper(PredefinedNumbers::Def));
assert_eq!((8, vec![0x80_u8]), serialize_uper(PredefinedNumbers::Ghi));
assert_eq!((8, vec![0x81_u8]), serialize_... | rust_cleaned_test_functions.jsonl/29172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
9711,
32964,
368,
341,
262,
2060,
10714,
0,
1188,
17,
11,
7486,
20703,
15,
87,
15,
15,
7300,
23,
9719,
24235,
62,
3466,
7,
4703,
9711,
27237,
486,
5830,
66,
1106,
262,
2060,
10714,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_method() {
assert_eq!(parse_method("POST"), Ok(("", Method::Post)));
assert_eq!(parse_method("GET"), Ok(("", Method::Get)));
} | rust_cleaned_test_functions.jsonl/50866 | {
"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,
21039,
9032,
368,
341,
286,
2060,
10714,
10297,
6400,
9032,
445,
2946,
3975,
7622,
7,
19814,
6730,
486,
4133,
4945,
286,
2060,
10714,
10297,
6400,
9032,
445,
3806,
3975,
7622,
7,
19814,
6730,
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 |
#[test]
fn test_combine_pairs_of_lines() {
for &s in &["-s", "--serial"] {
for &d in &["-d", "--delimiters"] {
new_ucmd!()
.args(&[s, d, "\t\n", "html_colors.txt"])
.run()
.stdout_is_fixture("html_colors.expected");
}
}
} | rust_cleaned_test_functions.jsonl/75402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72374,
36430,
3575,
18323,
368,
341,
262,
369,
609,
82,
304,
609,
1183,
12,
82,
497,
14482,
10182,
1341,
341,
286,
369,
609,
67,
304,
609,
1183,
12,
67,
497,
14482,
9588,
67645,
1341,
341,
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... | 3 |
#[test]
fn test_volumecreateoptionsbuilder_driver_opts() {
let opts: HashMap<&str, &str> = [("option", "value")].iter().cloned().collect();
let volume = VolumeCreateOptions::builder()
.driver("my_driver", Some(&opts))
.build();
let serialized = volume.serialize()... | rust_cleaned_test_functions.jsonl/73126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
1132,
757,
964,
2875,
17850,
20602,
32354,
368,
341,
286,
1077,
12185,
25,
10528,
52244,
495,
11,
609,
495,
29,
284,
84019,
2047,
497,
330,
957,
899,
936,
2015,
1005,
564,
19684,
1005,
173... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_style() {
let original_environment_variable = env::var("COLORTERM");
let mut style = Style::default();
assert_eq!(style.ansi.foreground, None);
assert_eq!(style.css, None);
// darkcyan is an ANSI color and is preserved
env::set_var("COLORTE... | rust_cleaned_test_functions.jsonl/53972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15117,
368,
341,
286,
1077,
4024,
51774,
14635,
284,
6105,
486,
947,
445,
19363,
2868,
38720,
3071,
286,
1077,
5206,
1707,
284,
11913,
486,
2258,
543,
286,
2060,
10714,
10297,
3528,
13,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_leader_validator_basic() {
logger::setup();
let leader_rotation_interval = 10;
// Account that will be the sink for all the test's transactions
let bob_pubkey = Keypair::new().pubkey();
// Create the leader node information
let leader_keypair = Arc::new(Keypair::new());... | rust_cleaned_test_functions.jsonl/36559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2002
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
64959,
34729,
368,
341,
262,
5925,
486,
15188,
543,
262,
1077,
7653,
44813,
20541,
284,
220,
16,
15,
401,
262,
442,
8615,
429,
686,
387,
279,
19309,
369,
678,
279,
1273,
594,
14131,
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... | 7 |
#[test]
fn test_for_in() {
test(
"for (var i in j) { var c = i; }",
"for (var i in j) { var c = i; }",
);
test_same("var i = 0; for (i in j) ;");
test_same("var i = 0; for (i in j) { var c = i; }");
test_same("i = 0; for (var i in j) { var c = i; }");
test_same("var j = {... | rust_cleaned_test_functions.jsonl/27633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
1243,
368,
341,
262,
1273,
1006,
286,
330,
1958,
320,
947,
600,
304,
502,
8,
314,
762,
272,
284,
600,
26,
335,
756,
286,
330,
1958,
320,
947,
600,
304,
502,
8,
314,
762,
272,
284,
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_build_drafts_rel() {
let mut collection = CollectionBuilder::default();
collection.source = Some(path::PathBuf::from("/"));
collection.title = Some("title".to_owned());
collection.drafts_dir = Some("rel".to_owned());
collection.include_drafts = true;
... | rust_cleaned_test_functions.jsonl/116420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
91339,
82,
13557,
368,
341,
286,
1077,
5206,
4426,
284,
11101,
3297,
486,
2258,
543,
286,
4426,
14698,
284,
4329,
5581,
486,
1820,
15064,
486,
1499,
4283,
4010,
286,
4426,
6067,
284,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_release_track_from() {
assert_eq!(ReleaseTrack::Stable, 1u8.into());
assert_eq!(ReleaseTrack::Nightly, 2u8.into());
assert_eq!(ReleaseTrack::Unknown, 0u8.into());
} | rust_cleaned_test_functions.jsonl/108911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24577,
28545,
5673,
368,
341,
197,
6948,
10714,
10297,
16077,
15667,
486,
623,
480,
11,
220,
16,
84,
23,
39860,
1423,
197,
6948,
10714,
10297,
16077,
15667,
486,
50437,
398,
11,
220,
17,
84,
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 |
#[test]
fn test_read_improper_lists() {
let input = "(1 . 2) (3 . ()) (4 . (5 . 6)) (1 2 . 3)";
let heap = &mut Heap::new();
let results : Vec<Value> = read_from_str(input, heap, "test_read_improper_lists")
.map(|(_, r)| *r.ok().expect("Should not get a read error"))
... | rust_cleaned_test_functions.jsonl/62118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 990
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
17895,
80668,
37288,
368,
341,
286,
1077,
1946,
284,
11993,
16,
659,
220,
17,
8,
320,
18,
659,
44481,
320,
19,
659,
320,
20,
659,
220,
21,
593,
320,
16,
220,
17,
659,
220,
18,
24023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_small() {
let x = ApInt::from_u64(0xFEDC_BA98_7654_3210);
let expected = &[
Token::Tuple { len: 2 },
Token::U64(64),
Token::Seq { len: Some(1) },
Token::U64(0xFEDC_BA98_7654_3210),
Token::SeqE... | rust_cleaned_test_functions.jsonl/82725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31966,
368,
341,
310,
1077,
856,
284,
5232,
1072,
486,
1499,
7300,
21,
19,
7,
15,
9770,
1479,
34,
1668,
32,
24,
23,
62,
22,
21,
20,
19,
62,
18,
17,
16,
15,
317,
310,
1077,
3601,
284,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice() {
let val: InlineDyn<[u8], U4> = InlineDyn::try_new([1, 2, 3, 4]).unwrap();
assert_eq!(val.get_ref(), [1, 2, 3, 4]);
} | rust_cleaned_test_functions.jsonl/83894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
286,
1077,
1044,
25,
54235,
95709,
66746,
84,
23,
1125,
547,
19,
29,
284,
54235,
95709,
486,
1539,
5921,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
10697,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scans_echo_short_tags() {
let mut scanner = Scanner::new("<?= $var; ?>");
scanner.scan().unwrap();
assert_eq!(token_list!(scanner.tokens), "<?= $var ; ?>");
} | rust_cleaned_test_functions.jsonl/52959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
596,
68628,
16673,
16333,
368,
341,
286,
1077,
5206,
20775,
284,
17170,
486,
931,
445,
25557,
400,
947,
26,
3370,
3071,
286,
20775,
47949,
1005,
15454,
1428,
286,
2060,
10714,
10297,
5839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_timestamp_str() {
assert_de_tokens(
&UnixTimestamp::from_secs(123),
&[Token::Str("1970-01-01T00:02:03Z")],
);
} | rust_cleaned_test_functions.jsonl/13694 | {
"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,
21039,
23073,
2895,
368,
341,
286,
2060,
2259,
28838,
1006,
310,
609,
55832,
20812,
486,
1499,
68718,
7,
16,
17,
18,
1326,
310,
44590,
3323,
486,
2580,
445,
16,
24,
22,
15,
12,
15,
16,
12,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_random() {
// not sure how to test this aside from just getting some values
let _n : uint = random();
let _f : f32 = random();
let _o : Option<Option<i8>> = random();
let _many : ((),
(uint,
int,
... | rust_cleaned_test_functions.jsonl/23766 | {
"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,
22644,
368,
341,
286,
442,
537,
2704,
1246,
311,
1273,
419,
15663,
504,
1101,
3709,
1045,
2750,
198,
286,
1077,
716,
77,
549,
2622,
284,
4194,
543,
286,
1077,
716,
69,
549,
282,
18,
17,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_affine_jacobian_conversion() {
let rng = &mut ::rand::thread_rng();
assert!(G1::zero().to_affine().is_none());
assert!(G2::zero().to_affine().is_none());
for _ in 0..1000 {
let a = G1::one() * Fr::random(rng);
let b = a.to_affine().unwrap();
let c = b.to... | rust_cleaned_test_functions.jsonl/6619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48914,
482,
5374,
62518,
64132,
368,
341,
262,
1077,
28422,
284,
609,
6984,
3504,
11335,
486,
4528,
66849,
1428,
262,
2060,
10297,
38,
16,
486,
14154,
1005,
983,
48914,
482,
1005,
285,
31488,
1423... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_rand_with_seed_first_gen() {
let tests: Vec<(i64, f64)> = vec![
(0, 0.15522042769493574),
(1, 0.40540353712197724),
(-1, 0.9050373219931845),
(622337, 0.3608469249315997),
(10000000009, 0.3472714008272359),
(-1845798... | rust_cleaned_test_functions.jsonl/37501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 658
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33864,
6615,
33809,
12978,
16322,
368,
341,
286,
1077,
7032,
25,
11312,
28706,
72,
21,
19,
11,
282,
21,
19,
16018,
284,
7486,
90515,
310,
320,
15,
11,
220,
15,
13,
16,
20,
20,
17,
17,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_verkey_is_b58_and_valid_length() {
let verkey = "EkVTa7SCJ5SntpYyX7CSb2pcBhiVGT9kWSagA8a9T69A";
match validate_verkey(&verkey) {
Err(_) => panic!("Should be valid verkey"),
Ok(x) => assert_eq!(x, verkey)
}
} | rust_cleaned_test_functions.jsonl/17830 | {
"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,
26042,
792,
6892,
880,
20,
23,
8378,
8337,
5118,
368,
341,
286,
1077,
2739,
792,
284,
330,
41917,
20457,
64,
22,
3540,
41,
20,
50,
89340,
56,
88,
55,
22,
6412,
65,
17,
3992,
33,
6023,
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... | 2 |
#[test]
fn test_valid_file_handles() {
assert_file_handle!("CLOSE #1", 1);
assert_file_handle!("CLOSE #2", 2);
assert_file_handle!("CLOSE #255", 255); // max value
} | rust_cleaned_test_functions.jsonl/102664 | {
"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,
8337,
2458,
68017,
368,
341,
310,
2060,
2458,
10630,
17223,
47887,
671,
16,
497,
220,
16,
317,
310,
2060,
2458,
10630,
17223,
47887,
671,
17,
497,
220,
17,
317,
310,
2060,
2458,
10630,
17223,
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 |
#[test]
fn test_create_collection_fails_on_existing() {
let mut collection = setup_collection();
// Create
collection.create().unwrap();
// Tries to create again
collection.create().unwrap_err();
} | rust_cleaned_test_functions.jsonl/63497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
25019,
761,
6209,
4470,
62630,
368,
341,
286,
1077,
5206,
4426,
284,
6505,
25019,
1428,
286,
442,
4230,
198,
286,
4426,
2520,
1005,
15454,
1428,
286,
442,
350,
4019,
311,
1855,
1549,
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 |
#[test]
fn test_purge_all_incremental_snapshot_archives_when_no_full_snapshot_archives() {
let snapshot_archives_dir = tempfile::TempDir::new().unwrap();
for snapshot_filenames in [
format!("incremental-snapshot-100-120-{}.tar", Hash::default()),
format!("incremental-sna... | rust_cleaned_test_functions.jsonl/67613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
5705,
51482,
278,
53265,
34330,
1886,
47636,
6536,
16372,
53265,
34330,
1886,
368,
341,
286,
1077,
16295,
34330,
1886,
4334,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
1428,
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... | 2 |
#[test]
fn test_sync_fs() {
let temporary_directory = tempdir().unwrap();
let temporary_path = fs::canonicalize(temporary_directory.path()).unwrap();
new_ucmd!()
.arg("--file-system")
.arg(&temporary_path)
.succeeds();
} | rust_cleaned_test_functions.jsonl/14251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23008,
34470,
368,
341,
262,
1077,
13340,
14846,
284,
2730,
3741,
1005,
15454,
543,
262,
1077,
13340,
2638,
284,
8619,
486,
77942,
551,
9758,
7592,
14846,
3875,
6011,
15454,
543,
262,
501,
68887,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verify_aggregated_signatures_1() {
// Message
let msg = hex::decode("73616d706c65").unwrap();
// Signature 1
let secret_key1 =
hex::decode("1ab1126ff2e37c6e6eddea943ccb3a48f83b380b856424ee552e113595525565")
.unwrap();
let publi... | rust_cleaned_test_functions.jsonl/65100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 769
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
20587,
93040,
11172,
2789,
62,
16,
368,
341,
286,
442,
4856,
198,
286,
1077,
3750,
284,
12371,
486,
18196,
445,
22,
18,
21,
16,
21,
67,
22,
15,
21,
66,
21,
20,
1827,
15454,
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 |
#[test]
fn test_max_value() {
let available_bytes = (core::mem::size_of::<usize>() - 1) as u32;
let max_value = 2usize.pow(available_bytes * 8) - 2;
#[cfg(target_pointer_width = "64")]
assert_eq!(max_value, 72057594037927934);
#[cfg(target_pointer_width = "32")]
... | rust_cleaned_test_functions.jsonl/86251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
3142,
368,
341,
286,
1077,
2500,
12524,
284,
320,
2153,
486,
10536,
486,
2141,
3575,
27638,
51878,
13555,
481,
220,
16,
8,
438,
575,
18,
17,
280,
286,
1077,
1932,
3142,
284,
220,
17,
518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.