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_process_store_with_bad_additional_signer() {
solana_logger::setup();
let signer0_pubkey = Pubkey::new_unique();
let signer1_pubkey = Pubkey::new_unique();
let signer0_account = AccountSharedData::new_ref(0, 0, &Pubkey::new_unique());
let signer1_account = ... | rust_cleaned_test_functions.jsonl/36697 | {
"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,
11305,
14809,
6615,
34199,
81742,
11172,
261,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
70039,
15,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
70039,
16,
3401... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_check_option() {
let m = UciMessage::Option(UciOptionConfig::Check {
name: "Nullmove".to_string(),
default: Some(false),
});
assert_eq!(m.serialize(), "option name Nullmove type check default false");
} | rust_cleaned_test_functions.jsonl/19050 | {
"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,
88686,
7200,
9672,
368,
341,
286,
1077,
296,
284,
547,
5855,
2052,
486,
5341,
12317,
5855,
5341,
2648,
486,
3973,
341,
310,
829,
25,
330,
3280,
3397,
3263,
983,
3904,
3148,
310,
1638,
25,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_noto_serif() {
run_test(
&TEST_DATA,
"harfbuzz/good-noto-serif.te",
"noto/NotoSerifTelugu-Regular.ttf",
&[JOINER_GLYPH_INDEX],
14,
);
} | rust_cleaned_test_functions.jsonl/91179 | {
"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,
1089,
2072,
75861,
333,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
29169,
78,
27566,
31853,
756,
503,
330,
1921,
78,
20290,
2072,
31745,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_missing_field() {
#[derive(Deserialize, Debug)]
struct Basic {
v: bool,
w: bool,
}
let yaml = indoc! {"
---
v: true
"};
let expected = "missing field `w` at line 2 column 2";
test_error::<Basic>(yaml, expected);
} | rust_cleaned_test_functions.jsonl/45564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
5013,
368,
341,
262,
11506,
27098,
7,
64465,
11,
11091,
5563,
262,
2036,
14625,
341,
286,
348,
25,
1807,
345,
286,
289,
25,
1807,
345,
262,
456,
262,
1077,
32246,
284,
1257,
509,
0,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_field_expr() {
check_assist(
inline_local_variable,
r"
struct Bar {
foo: usize
}
fn foo() {
let bar = Bar { foo: 1 };
let a$0 = bar.foo;
let b = a * 10;
let c = a as usize;
}",
r"
struct Bar {
foo: usize
}
fn foo() {
let b... | rust_cleaned_test_functions.jsonl/3232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
435,
698,
1235,
4716,
341,
262,
15229,
25,
22301,
198,
630,
8822,
15229,
368,
341,
262,
1077,
3619,
284,
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... | 1 |
#[test]
fn test_add_a() {
let mut state = State8080::empty_state();
state.memory = vec![0x87];
state.a = 0x04;
emulate_8080_op(&mut state);
assert_eq!(state.a, 0x08);
} | rust_cleaned_test_functions.jsonl/7780 | {
"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,
2891,
4306,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
23,
22,
935,
286,
1584,
5849,
284,
220,
15,
87,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_derive_struct() {
#[derive(Debug, Encodable, Decodable, Eq, PartialEq)]
struct TestStruct {
vec: Vec<u8>,
num: u32,
}
let reference = TestStruct {
vec: vec![1, 2, 3],
num: 42,
};
let bytes = [3, 0, 0... | rust_cleaned_test_functions.jsonl/78900 | {
"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,
35345,
533,
15126,
368,
341,
286,
11506,
27098,
42618,
11,
10751,
69129,
11,
3714,
69129,
11,
33122,
11,
55039,
5563,
286,
2036,
3393,
9422,
341,
310,
7486,
25,
11312,
34837,
23,
12520,
310,
1629,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hex_function_path() {
assert_eq!(
HexOpt { number: 5 },
HexOpt::try_parse_from(&["test", "-n", "5"]).unwrap()
);
assert_eq!(
HexOpt {
number: 0x00ab_cdef
},
HexOpt::try_parse_from(&["test", "-n", "abcdef"]).unwrap()
);
... | rust_cleaned_test_functions.jsonl/18743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
32655,
9174,
2638,
368,
341,
262,
2060,
10714,
33673,
286,
27228,
21367,
314,
1372,
25,
220,
20,
1153,
286,
27228,
21367,
486,
1539,
21039,
5673,
2099,
1183,
1944,
497,
6523,
77,
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 |
#[test]
fn test_create1() {
CLASS_RESULT.with(|result| {
*result.borrow_mut() = 0;
});
let mut vm = VirtualMachine::new();
vm.add_external_function(
FunctionDeclaration::with_external(
"print_point".to_owned(), vec![TypeId::Class("Point".to_owned())], TypeId::Void,
... | rust_cleaned_test_functions.jsonl/17391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
16,
368,
341,
262,
27939,
21181,
18164,
22428,
1382,
91,
341,
286,
353,
1382,
83640,
29523,
368,
284,
220,
15,
280,
262,
3011,
262,
1077,
5206,
10995,
284,
20721,
21605,
486,
931,
1428,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dynaerrorkind_as_str_success() {
assert_eq!(
DynaErrorKind::UnhandledError.as_str(),
"unhandled internal error"
);
assert_eq!(DynaErrorKind::ProviderError.as_str(), "provider error");
assert_eq!(
DynaErrorKind::LockAlreadyAcquir... | rust_cleaned_test_functions.jsonl/133081 | {
"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,
814,
52344,
615,
669,
484,
11898,
2895,
18632,
368,
341,
286,
2060,
10714,
33673,
310,
43938,
64,
1454,
10629,
486,
95539,
1454,
5357,
2895,
3148,
310,
330,
359,
38821,
5306,
1465,
698,
286,
1439,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_segment_postings_skip() {
for i in 0..4 {
let mut block_postings = build_block_postings(&[3]);
assert_eq!(
block_postings.skip_to(i),
BlockSegmentPostingsSkipResult::Success(0u32)
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
28061,
6333,
819,
44830,
368,
341,
286,
369,
600,
304,
220,
15,
496,
19,
341,
310,
1077,
5206,
2504,
6333,
819,
284,
1936,
7113,
6333,
819,
2099,
58,
18,
2558,
310,
2060,
10714,
33673,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_arrow_single_right() {
let text = "-> not";
let text: Vec<_> = text.split_whitespace().collect();
let (a, b) = parse_arrow(&text).unwrap();
assert!(a.is_empty());
assert_eq!(b, &["not"]);
} | rust_cleaned_test_functions.jsonl/65982 | {
"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,
21039,
46566,
19487,
10539,
368,
341,
286,
1077,
1467,
284,
88720,
537,
876,
286,
1077,
1467,
25,
11312,
32399,
29,
284,
1467,
5289,
86175,
1005,
17384,
543,
286,
1077,
320,
64,
11,
293,
8,
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_remove_function() {
let db = Connection::open_in_memory().unwrap();
db.create_scalar_function("half", 1, true, half).unwrap();
let result: Result<f64> = db.query_row("SELECT half(6)", NO_PARAMS, |r| r.get(0));
assert!((3f64 - result.unwrap()).abs() < EPSILON);
... | rust_cleaned_test_functions.jsonl/41667 | {
"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,
18193,
9174,
368,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
2927,
2520,
41652,
9174,
445,
37006,
497,
220,
16,
11,
830,
11,
4279,
568,
15454,
543,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_op_ne() {
let filter = filter();
let mut op = Operator::Neq(schema_id_tag(), unencrypted_target(SCHEMA_ID.to_string()));
assert!(Verifier::_process_operator("zip", &op, &filter).is_err());
op = Operator::Neq(schema_id_tag(), unencrypted_target("NOT HERE".... | rust_cleaned_test_functions.jsonl/71867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
10287,
13925,
368,
341,
286,
1077,
4051,
284,
4051,
543,
286,
1077,
5206,
1179,
284,
28498,
486,
8813,
80,
42735,
842,
9372,
1507,
650,
36444,
11123,
59461,
35839,
3450,
2389,
3904,
7392,
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_cmd_with_json_output() {
let output = launch_command_line(vec![
"-i",
"./tests/data/luxembourg_filtered.osm.pbf",
"-o",
concat!(env!("OUT_DIR"), "/test_cosmogony.json"),
]);
assert!(output.status.success());
} | rust_cleaned_test_functions.jsonl/22516 | {
"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,
11684,
6615,
9455,
7645,
368,
341,
262,
1077,
2550,
284,
7050,
10811,
6528,
25592,
90515,
286,
6523,
72,
756,
286,
5924,
23841,
13167,
13328,
2200,
55018,
51429,
9291,
76,
556,
13233,
756,
286,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cli_program_show() {
solana_logger::setup();
let mut noop_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
noop_path.push("tests");
noop_path.push("fixtures");
noop_path.push("noop");
noop_path.set_extension("so");
let mint_keypair = Keypair::new();
let mint_pu... | rust_cleaned_test_functions.jsonl/703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2629
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47147,
25096,
15267,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
5206,
60829,
2638,
284,
7933,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
4010,
262,
60829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_malicious_v1_message() {
// 10 byte snappy stream identifier
let stream_identifier: &'static [u8] = b"\xFF\x06\x00\x00sNaPpY";
assert_eq!(stream_identifier.len(), 10);
let malicious_padding: &'static [u8] = b"\xFE\x00\x00\x00";
... | rust_cleaned_test_functions.jsonl/57908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 823
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
717,
278,
9627,
2273,
16,
6462,
368,
341,
286,
442,
220,
16,
15,
4922,
4131,
11144,
4269,
12816,
198,
286,
1077,
4269,
33176,
25,
30136,
1978,
508,
84,
23,
60,
284,
293,
11934,
9264,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_branch_truncate_to() {
let hdr: VecxVs<String> = VecxVs::new();
let vn = VersionName(b"manster0");
pnk!(hdr.version_create(vn));
let mval = String::from("value1");
hdr.push(mval.clone());
pnk!(hdr.version_create(VersionName(b"manster1")));
let tval = String::from("... | rust_cleaned_test_functions.jsonl/92144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28031,
3547,
26900,
2346,
368,
341,
262,
1077,
36615,
25,
11312,
87,
51737,
3464,
29,
284,
11312,
87,
51737,
486,
931,
543,
262,
1077,
51017,
284,
6079,
675,
1883,
1,
1515,
3667,
15,
797,
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_short_vec_u8() {
let vec = ShortVec(vec![4u8; 32]);
let bytes = serialize(&vec).unwrap();
assert_eq!(bytes.len(), vec.0.len() + 1);
let vec1: ShortVec<u8> = deserialize(&bytes).unwrap();
assert_eq!(vec.0, vec1.0);
} | rust_cleaned_test_functions.jsonl/91792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
13251,
7300,
23,
368,
341,
286,
1077,
7486,
284,
10698,
10050,
25592,
20703,
19,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
5820,
284,
24235,
2099,
4083,
568,
15454,
543,
286,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic() {
let (crypto_provider, _) = get_test_db_crypto_provider();
// We start un-encrypted and unlocked.
assert!(!crypto_provider.is_db_encrypted());
assert!(crypto_provider.is_unlocked());
// check_and_store_password should only accept an empty passwo... | rust_cleaned_test_functions.jsonl/33083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
286,
1077,
320,
35772,
29518,
11,
27439,
284,
633,
4452,
8685,
78298,
29518,
1428,
286,
442,
1205,
1191,
650,
12,
36444,
323,
35618,
624,
286,
2060,
0,
3471,
35772,
29518,
2079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_big_args() {
const FILE: &str = "single_big_args.txt";
const EXPECTED_FILE: &str = "single_big_args_expected.txt";
const LINES: usize = 1_000_000;
const N_ARG: usize = 100_000;
let (at, mut ucmd) = at_and_ucmd!();
let mut big_input = at.make_file(FILE);
for i... | rust_cleaned_test_functions.jsonl/39291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
36386,
8384,
368,
341,
262,
733,
11837,
25,
609,
495,
284,
330,
15338,
36386,
8384,
3909,
876,
262,
733,
8921,
1479,
8087,
25,
609,
495,
284,
330,
15338,
36386,
8384,
32190,
3909,
876,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_tanh_derivative() {
fn f(x: f32) -> f32 {
1.0 - x.tanh().powf(2.0)
}
let activation = Activation::Tanh;
assert_eq!(
activation.calculate_derivative(&array![[0.0]]).unwrap(),
&array![[f(0.0)]]
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/65373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
27924,
95930,
368,
341,
286,
5168,
282,
2075,
25,
282,
18,
17,
8,
1464,
282,
18,
17,
341,
310,
220,
16,
13,
15,
481,
856,
734,
27924,
1005,
21743,
69,
7,
17,
13,
15,
340,
286,
555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hover_shadowing_pat() {
check(
r#"
fn x() {}
fn y() {
let x = 0i32;
x$0;
}
"#,
expect![[r#"
*x*
```rust
let x: i32
```
"#]],
)
} | rust_cleaned_test_functions.jsonl/66639 | {
"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,
53445,
53120,
287,
55824,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
8822,
856,
368,
10086,
8822,
379,
368,
341,
262,
1077,
856,
284,
220,
15,
72,
18,
17,
280,
262,
856,
3,
15,
280,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_phy_payload_is_none_when_too_few_bytes() {
let bytes = &vec![
0x80, 0x04, 0x03, 0x02, 0x01, 0x00, 0xff, 0x01, 0x02, 0x03, 0x04
];
let phy = PhyPayload::new(bytes);
assert!(phy.is_err());
} | rust_cleaned_test_functions.jsonl/81588 | {
"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,
50266,
32813,
6892,
31488,
47636,
2346,
78,
761,
365,
12524,
368,
341,
262,
1077,
5820,
284,
609,
4083,
90515,
286,
220,
15,
87,
23,
15,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
15,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_identifiers_streaming() {
assert_eq!(Parser::new("null".chars()).next(), Some(NullValue));
assert_eq!(Parser::new("true".chars()).next(), Some(BooleanValue(true)));
assert_eq!(Parser::new("false".chars()).next(), Some(BooleanValue(false)));
assert_eq!(last_e... | rust_cleaned_test_functions.jsonl/6587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
38399,
11836,
12673,
287,
368,
341,
286,
2060,
10714,
10297,
6570,
486,
931,
445,
2921,
3263,
19255,
6011,
3600,
1507,
4329,
7,
3280,
1130,
1106,
286,
2060,
10714,
10297,
6570,
486,
931,
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_string() {
let col_index = LineIndex::new(
"
const C: char = \"メ メ\";
",
);
assert_eq!(col_index.utf16_lines.len(), 1);
assert_eq!(col_index.utf16_lines[&1].len(), 2);
assert_eq!(col_index.utf16_lines[&1][0], Utf16Char { start: 17.into(), end:... | rust_cleaned_test_functions.jsonl/76438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
368,
341,
286,
1077,
1375,
3560,
284,
7083,
1552,
486,
931,
1006,
310,
6228,
1024,
356,
25,
1161,
284,
7245,
38750,
20711,
94,
59,
876,
756,
286,
3475,
286,
2060,
10714,
10297,
2074,
3560,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ao_issue() {
use leaky_bucket_lite::sync::LeakyBucket;
use std::time::{Duration, Instant};
let mut rate_limiter = LeakyBucket::builder()
.refill_amount(1.0)
.refill_interval(Duration::from_secs(2))
.max(5.0)
.tokens(5.0)
.build();
let beg... | rust_cleaned_test_functions.jsonl/25012 | {
"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,
62,
3441,
53340,
368,
341,
262,
990,
23352,
88,
38749,
89191,
486,
12996,
486,
2304,
28100,
36018,
280,
262,
990,
1460,
486,
1678,
22964,
12945,
11,
18058,
2315,
262,
1077,
5206,
4379,
907,
17700,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert() {
let inputs = vec!["key1", "key3", "key5", "key7", "key9"];
let skl = new_test_skl();
for key in inputs.clone() {
skl.insert(key.as_bytes());
}
let mut node = skl.head;
for input_key in inputs {
unsafe {
... | rust_cleaned_test_functions.jsonl/15461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
368,
341,
286,
1077,
11127,
284,
7486,
0,
1183,
792,
16,
497,
330,
792,
18,
497,
330,
792,
20,
497,
330,
792,
22,
497,
330,
792,
24,
6332,
286,
1077,
82542,
284,
501,
4452,
643,
10561... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_finalized_transaction_finalized() {
// Don't wait once the transaction has been finalized.
let mut db =
PickleDb::new_yaml(NamedTempFile::new().unwrap(), PickleDbDumpPolicy::NeverDump);
let signature = Signature::default();
let transaction_info ... | rust_cleaned_test_functions.jsonl/73564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
20676,
1506,
28884,
20676,
1506,
368,
341,
286,
442,
4320,
944,
3783,
3055,
279,
7745,
702,
1012,
60387,
624,
286,
1077,
5206,
2927,
4035,
310,
19725,
89506,
486,
931,
64380,
8204,
3606,
121... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set() {
assert_eq!(
set("key", "value", None, None),
"set key 0 0 5\r\nvalue\r\n"
);
} | rust_cleaned_test_functions.jsonl/26807 | {
"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,
2602,
368,
341,
286,
2060,
10714,
33673,
310,
738,
445,
792,
497,
330,
957,
497,
2240,
11,
2240,
1326,
310,
330,
746,
1376,
220,
15,
220,
15,
220,
20,
12016,
1699,
957,
12016,
1699,
698,
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 |
#[test]
fn test_array_element_function_call_as_dimension() {
assert_expression!(
"cards(lbound(cards) + 1).Value",
Expression::Property(
Box::new(Expression::func(
"cards",
vec![Expression::BinaryExpr... | rust_cleaned_test_functions.jsonl/102645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
7894,
9174,
13429,
11898,
49619,
368,
341,
310,
2060,
28068,
33673,
394,
330,
25024,
2333,
10891,
73863,
8,
488,
220,
16,
568,
1130,
756,
394,
16378,
486,
3052,
1006,
503,
8261,
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_filter_binary_array_with_null() {
let data: Vec<Option<&[u8]>> = vec![Some(b"hello"), None, Some(b"world"), None];
let a = BinaryArray::from(data);
let b = BooleanArray::from(vec![true, false, false, true]);
let c = filter(&a, &b).unwrap();
let d = c.as_re... | rust_cleaned_test_functions.jsonl/28231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
31761,
3858,
6615,
15162,
368,
341,
286,
1077,
821,
25,
11312,
94150,
52244,
58,
84,
23,
60,
2452,
284,
7486,
20703,
8373,
1883,
1,
14990,
3975,
2240,
11,
4329,
1883,
1,
14615,
3975,
2240,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single() {
struct Foo;
impl fmt::Debug for Foo {
fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result {
fmt.debug_struct("Foo")
.field("bar", &true)
.finish()
}
}
assert_eq!("F... | rust_cleaned_test_functions.jsonl/69308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
368,
341,
286,
2036,
33428,
401,
286,
11605,
8879,
486,
7939,
369,
33428,
341,
310,
5168,
8879,
2099,
721,
11,
8879,
25,
609,
6984,
8879,
486,
14183,
18291,
62,
9231,
1464,
8879,
486,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_server_received_push_stream() {
let (mut hconn, mut peer_conn) = connect();
// create a push stream.
let push_stream_id = peer_conn.stream_create(StreamType::UniDi).unwrap();
let _ = peer_conn.stream_send(push_stream_id, &[0x1]);
let out = peer_conn.proce... | rust_cleaned_test_functions.jsonl/52187 | {
"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,
12015,
40783,
14218,
12673,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
8,
284,
4564,
1428,
286,
442,
1855,
264,
4484,
4269,
624,
286,
1077,
4484,
12673,
842,
284,
14397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_parse_absolute_uri() {
let mut hyper_request = HttpRequest::new(Body::empty());
*hyper_request.method_mut() = Method::GET;
*hyper_request.uri_mut() = "http://my-host/path".parse().unwrap();
let iron_request = Request::from_http(hyper_request, None, &Proto... | rust_cleaned_test_functions.jsonl/73131 | {
"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,
7893,
21039,
50874,
15572,
368,
341,
286,
1077,
5206,
17071,
7893,
284,
44049,
486,
931,
5349,
1076,
486,
3194,
1423,
286,
353,
68192,
7893,
12908,
29523,
368,
284,
6730,
486,
3806,
280,
286,
353,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inspect_pulse_persist() {
let _executor = fuchsia_async::TestExecutor::new();
let inspector = finspect::Inspector::new();
let sme_root_node = inspector.root().create_child("sme");
let (persistence_req_sender, mut persistence_receiver) =
test_utils::cre... | rust_cleaned_test_functions.jsonl/33067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 852
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34386,
987,
83645,
620,
4975,
368,
341,
286,
1077,
716,
80787,
284,
282,
73391,
28346,
486,
2271,
25255,
486,
931,
543,
286,
1077,
44725,
284,
64979,
987,
486,
46230,
486,
931,
543,
286,
1077,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_bin_too_few_args() {
let args = [String::from("command"), String::from("too few arguments")];
let config = parse_config(&args);
assert!(config.is_err());
} | rust_cleaned_test_functions.jsonl/19379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21816,
2346,
78,
761,
365,
8384,
368,
341,
262,
1077,
2827,
284,
508,
703,
486,
1499,
445,
5631,
3975,
923,
486,
1499,
445,
36127,
2421,
5977,
899,
935,
262,
1077,
2193,
284,
4715,
5332,
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 |
#[test]
fn test_generic_struct() {
assert_tokens(
&GenericStruct { x: 5u32 },
&[
Token::Struct {
name: "GenericStruct",
len: 1,
},
Token::Str("x"),
Token::U32(5),
Token::StructEnd,
],
);
} | rust_cleaned_test_functions.jsonl/56424 | {
"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,
41232,
15126,
368,
341,
262,
2060,
28838,
1006,
286,
609,
19964,
9422,
314,
856,
25,
220,
20,
84,
18,
17,
1153,
286,
609,
9640,
310,
9660,
486,
9422,
341,
394,
829,
25,
330,
19964,
9422,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new() {
let m: Map<u8, MVReg<u8, _>, u8> = Map::new();
assert_eq!(m.len().val, 0);
assert!(m.is_empty().val);
} | rust_cleaned_test_functions.jsonl/61620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
262,
1077,
296,
25,
5027,
34837,
23,
11,
42271,
3477,
34837,
23,
11,
716,
8066,
575,
23,
29,
284,
5027,
486,
931,
543,
262,
2060,
10714,
10297,
76,
19406,
1005,
831,
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 |
#[test]
fn test_disable_ime() {
let mut interrupts = Interrupts::new();
// Count down.
interrupts.disable_ime();
assert_eq!(interrupts.disable_ime_counter, 2);
interrupts.tick_ime_timer();
assert_eq!(interrupts.disable_ime_counter, 1);
interrupts.tick_ime... | rust_cleaned_test_functions.jsonl/17897 | {
"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,
33842,
62,
545,
368,
341,
286,
1077,
5206,
43437,
284,
22145,
82,
486,
931,
1428,
286,
442,
4504,
1495,
624,
286,
43437,
42628,
62,
545,
543,
286,
2060,
10714,
10297,
54805,
82,
42628,
62,
545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut bb = BollingerBands::new(5, 2.0_f64).unwrap();
let out = bb.nexta(3.0);
assert_eq!(out.average, 3.0);
assert_eq!(out.upper, 3.0);
assert_eq!(out.lower, 3.0);
bb.nexta(2.5);
bb.nexta(3.5);
bb.nexta(4.0);
... | rust_cleaned_test_functions.jsonl/99260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18983,
368,
341,
286,
1077,
5206,
16520,
284,
425,
965,
5137,
33,
2844,
486,
931,
7,
20,
11,
220,
17,
13,
15,
761,
21,
19,
568,
15454,
1428,
286,
1077,
700,
284,
16520,
4529,
64,
7,
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_do_not_remove_set_setter_to_getter() {
test_same(concat!(
"var a = {",
" get property() {},",
" set property(x) {}",
"};",
"a.property = a.property;",
));
} | rust_cleaned_test_functions.jsonl/496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26309,
7913,
18193,
2602,
2602,
465,
2346,
3062,
465,
368,
341,
262,
1273,
33574,
96360,
33673,
286,
330,
947,
264,
284,
314,
497,
715,
286,
330,
220,
633,
3343,
368,
16452,
756,
286,
330,
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 |
#[test]
fn test_force_install_no_reboot() {
let update =
Update::from_args(&["update"], &["force-install", "--reboot", "false", "url"]).unwrap();
assert_eq!(
update,
Update {
cmd: Command::ForceInstall(ForceInstall {
update_... | rust_cleaned_test_functions.jsonl/50083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40739,
34245,
6536,
1288,
4619,
368,
341,
286,
1077,
2647,
4035,
310,
5549,
486,
1499,
8384,
2099,
1183,
2386,
7914,
609,
1183,
8833,
57899,
497,
14482,
265,
4619,
497,
330,
3849,
497,
330,
1085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_recursive_tuple() {
assert_eq!(
&("one", ("two", 42)).to_vec(),
&[2, 111, 110, 101, 0, 5, 2, 116, 119, 111, 0, 21, 42, 0]
);
assert_eq!(
&("one", ("two", 42, ("three", 33))).to_vec(),
&[
2, 111, 110, 1... | rust_cleaned_test_functions.jsonl/127223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
66242,
21773,
368,
341,
286,
2060,
10714,
33673,
310,
609,
445,
603,
497,
3489,
19789,
497,
220,
19,
17,
4579,
983,
13251,
3148,
310,
44590,
17,
11,
220,
16,
16,
16,
11,
220,
16,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shuffle_unshuffle() {
let shuffles = DATA.parse().unwrap();
let deck = shuffle(10_007, &shuffles);
let card = deck.into_iter().position(|c| c == 2019).unwrap();
assert_eq!(
shuffle_index(10_007, 2019, &shuffles),
card as u128,
)
} | rust_cleaned_test_functions.jsonl/104852 | {
"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,
73484,
4907,
65355,
368,
341,
10217,
557,
77453,
284,
14112,
4632,
1005,
15454,
543,
1572,
10217,
9530,
284,
25947,
7,
16,
15,
62,
15,
15,
22,
11,
609,
927,
77453,
317,
10217,
3701,
284,
9530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deletable_not_readonly() {
with_object(0, |activation, object| {
object.as_script_object().unwrap().define_value(
activation.context.gc_context,
"test",
"initial".into(),
DontDelete.into(),
);
... | rust_cleaned_test_functions.jsonl/66740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
1149,
480,
7913,
6443,
3243,
368,
341,
286,
448,
5314,
7,
15,
11,
760,
23002,
11,
1633,
91,
341,
310,
1633,
5357,
14660,
5314,
1005,
15454,
1005,
1289,
3142,
1006,
394,
15099,
8681,
65554,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_data_with_decorator() {
let mut handlebars = Registry::new();
handlebars
.register_template_string("t0", "{{hello}}{{*foo}}{{hello}}".to_string())
.unwrap();
let data = btreemap! {
"hello".to_string() => "world".to_string()
... | rust_cleaned_test_functions.jsonl/50779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1622
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
1769,
6615,
87252,
368,
341,
286,
1077,
5206,
3705,
24950,
284,
32112,
486,
931,
543,
286,
3705,
24950,
198,
310,
659,
6343,
8693,
3904,
445,
83,
15,
497,
47219,
14990,
77286,
9,
7975,
772... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arguments_non_rlib_crate() {
parses!(
"--crate-type",
"rlib",
"--emit",
"link",
"foo.rs",
"--out-dir",
"out",
"--crate-name",
"foo"
);
parses!(
"-... | rust_cleaned_test_functions.jsonl/8161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1066
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
21637,
1710,
2740,
666,
7698,
368,
341,
286,
70835,
33673,
310,
14482,
61711,
10604,
756,
310,
330,
2381,
579,
756,
310,
14482,
18712,
756,
310,
330,
2080,
756,
310,
330,
7975,
25638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select_compound_identifiers() {
let query_plan = convert_select_to_query_plan(
"SELECT MEASURE(`KibanaSampleDataEcommerce`.`maxPrice`) AS maxPrice, MEASURE(`KibanaSampleDataEcommerce`.`minPrice`) AS minPrice FROM KibanaSampleDataEcommerce".to_string(), DatabaseProtocol::MySQL... | rust_cleaned_test_functions.jsonl/59240 | {
"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,
13051,
18177,
795,
38399,
11836,
368,
341,
286,
1077,
3239,
26564,
284,
5508,
13051,
2346,
5738,
26564,
1006,
310,
330,
4858,
16292,
72169,
5809,
42,
579,
3362,
17571,
1043,
36,
43194,
28905,
2810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fix_sort_query_parameters() {
let sort = fix_sort_query_parameters("_geoPoint(12, 13):asc");
assert_eq!(sort, vec!["_geoPoint(12,13):asc".to_string()]);
let sort = fix_sort_query_parameters("doggo:asc,_geoPoint(12.45,13.56):desc");
assert_eq!(
sort,
... | rust_cleaned_test_functions.jsonl/53316 | {
"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,
36060,
18435,
5738,
18263,
368,
341,
286,
1077,
3378,
284,
5046,
18435,
5738,
18263,
16975,
13052,
2609,
7,
16,
17,
11,
220,
16,
18,
1648,
5061,
797,
286,
2060,
10714,
10297,
6860,
11,
7486,
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_includes() {
assert_eq!(document(json!({})).includes(), Vec::<String>::new());
assert_eq!(document(json!({ "include": []})).includes(), Vec::<String>::new());
assert_eq!(
document(json!({ "include": [ "foo.cml", "bar.cml" ]})).includes(),
vec!["foo... | rust_cleaned_test_functions.jsonl/34909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
7396,
368,
341,
286,
2060,
10714,
10297,
6062,
9304,
0,
2306,
92,
4579,
14526,
1507,
11312,
27638,
703,
6831,
931,
1423,
286,
2060,
10714,
10297,
6062,
9304,
0,
2306,
330,
997,
788,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check() {
let mut t = init();
t.least_cost_method();
t.replenish();
assert_eq!(t.check(), Some((3, 3, -2)));
} | rust_cleaned_test_functions.jsonl/26613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
368,
341,
262,
1077,
5206,
259,
284,
2930,
543,
262,
259,
30502,
559,
15890,
9032,
543,
262,
259,
1327,
86535,
812,
543,
262,
2060,
10714,
10297,
83,
9093,
1507,
4329,
1188,
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 |
#[test]
fn test_node_multiple_rollback_merge() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
cluster.cfg.raft_store.right_derive_when_split = true;
cluster.cfg.raft_store.merge_check_tick_interval = ReadableDuration::millis(20);
let pd_client = Arc::clone(&cl... | rust_cleaned_test_functions.jsonl/56288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
45233,
62,
33559,
20888,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
10652,
30481,
13,
2944,
148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compute_comm_d_empty() {
let comm_d = compute_comm_d(SectorSize(2048), &[]).unwrap();
assert_eq!(
comm_d,
[
252, 126, 146, 130, 150, 229, 22, 250, 173, 233, 134, 178, 143, 146, 212, 74, 79,
36, 185, 53, 72, 82, 35, 55, 106, ... | rust_cleaned_test_functions.jsonl/55451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
25149,
814,
15124,
368,
341,
286,
1077,
1063,
814,
284,
12564,
25149,
814,
3759,
1256,
1695,
7,
17,
15,
19,
23,
701,
609,
1294,
568,
15454,
543,
286,
2060,
10714,
33673,
310,
1063,
814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str_to_type() {
assert_eq!(
tvm_str_to_type("float24").unwrap().1,
DataType::float(24, 1)
);
assert_eq!(
tvm_str_to_type("uint111x44").unwrap().1,
DataType::uint(111, 44)
);
} | rust_cleaned_test_functions.jsonl/56100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
2346,
1819,
368,
341,
286,
2060,
10714,
33673,
310,
259,
7338,
2895,
2346,
1819,
445,
3649,
17,
19,
1827,
15454,
1005,
16,
345,
310,
33172,
486,
3649,
7,
17,
19,
11,
220,
16,
340,
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_try_from_patch_balloon() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
let body = "{ \"amount_mib\": 1 }";
sender
.write_all(http_request("PATCH", "/balloon", Some(&body)).as_bytes())
... | rust_cleaned_test_functions.jsonl/106590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
39643,
56441,
31335,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_groupnum() {
assert_eq!("12,379,821,234", group_num("12379821234"));
assert_eq!("21,234", group_num("21234"));
assert_eq!("821,234", group_num("821234"));
assert_eq!("1,821,234", group_num("1821234"));
assert_eq!("1,234", group_num("1234"));
assert_eq!("234", group_num("2... | rust_cleaned_test_functions.jsonl/36715 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
2413,
368,
341,
262,
2060,
10714,
17223,
16,
17,
11,
18,
22,
24,
11,
23,
17,
16,
11,
17,
18,
19,
497,
1874,
4273,
445,
16,
17,
18,
22,
24,
23,
17,
16,
17,
18,
19,
4010,
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_empty_string_output() {
let mut processor = processor_stub();
processor.json = r#"["",""]"#.to_owned();
processor.program = ".[]".to_owned();
processor.pretty_output = true;
let context = Context::new().unwrap();
let output... | rust_cleaned_test_functions.jsonl/90635 | {
"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,
15124,
3904,
7645,
368,
341,
310,
1077,
5206,
17654,
284,
17654,
62781,
543,
310,
17654,
4323,
284,
435,
55543,
1183,
2198,
1341,
57676,
13,
983,
51973,
543,
310,
17654,
45082,
284,
5933,
1294,
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_lazy_groupby_sort() {
let df = df! {
"a" => ["a", "b", "a", "b", "b", "c"],
"b" => [1, 2, 3, 4, 5, 6]
}
.unwrap();
let out = df
.clone()
.lazy()
.groupby(vec![col("a")])
.agg(vec![col("b").sort(false).first()])
.collect()
... | rust_cleaned_test_functions.jsonl/22387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
6288,
1694,
18435,
368,
341,
262,
1077,
6764,
284,
6764,
0,
341,
286,
330,
64,
1,
589,
4383,
64,
497,
330,
65,
497,
330,
64,
497,
330,
65,
497,
330,
65,
497,
330,
66,
8097,
286,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_stream() {
use crate::stream::Streamer;
use ark_bls12_381::Fr;
use ark_std::UniformRand;
for _ in 0..100 {
let rng = &mut ark_std::test_rng();
let size = 1000;
let mut a = Vec::new();
for _ in 0..size {
a.push(Fr::rand(rng));
... | rust_cleaned_test_functions.jsonl/88511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
12673,
368,
341,
262,
990,
17717,
486,
4027,
486,
80063,
280,
262,
990,
55217,
880,
4730,
16,
17,
62,
18,
23,
16,
486,
22560,
280,
262,
990,
55217,
15656,
486,
20152,
56124,
401,
262,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_rand_encrypt_decrypt() {
let mut rand_seed: [u8; 1072] = [0; 1072];
rand::random(&mut rand_seed).unwrap();
let mut key = [0u8; 32];
key.copy_from_slice(&rand_seed[..32]);
let mut iv: [u8; 12] = [0; 12];
iv.clone_from_slice(&rand_seed[32..44]);
... | rust_cleaned_test_functions.jsonl/45466 | {
"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,
33864,
66593,
80764,
368,
341,
286,
1077,
5206,
10382,
33809,
25,
508,
84,
23,
26,
220,
16,
15,
22,
17,
60,
284,
508,
15,
26,
220,
16,
15,
22,
17,
935,
286,
10382,
486,
11463,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example_1() {
let contents = get_contents("src/days/day_16/example_01.txt");
let packets = parse_packets(contents);
assert_eq!(packets.len(), 4);
assert!(packets.get(&1).unwrap().length_type == LengthType::Subpackets(1, 1));
assert!(packets.get(&2).unwrap(... | rust_cleaned_test_functions.jsonl/905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
62,
16,
368,
341,
286,
1077,
8794,
284,
633,
16682,
445,
3548,
3446,
942,
44739,
62,
16,
21,
65182,
62,
15,
16,
3909,
797,
286,
1077,
27035,
284,
4715,
63569,
46964,
317,
286,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_array(){
let json_value = from_str("[1, 2, 3]").unwrap();
let json_array = json_value.as_array();
let expected_length = 3;
assert!(json_array.is_some() && json_array.unwrap().len() == expected_length);
} | rust_cleaned_test_functions.jsonl/6568 | {
"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,
11898,
3858,
3032,
286,
1077,
2951,
3142,
284,
504,
2895,
10937,
16,
11,
220,
17,
11,
220,
18,
44891,
15454,
543,
286,
1077,
2951,
3858,
284,
2951,
3142,
5357,
3858,
543,
286,
1077,
3601,
5118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fdt_addr() {
let regions = arch_memory_regions(layout::FDT_MAX_SIZE - 0x1000);
let mem = vm_memory::test_utils::create_anon_guest_memory(®ions, false)
.expect("Cannot initialize memory");
assert_eq!(get_fdt_addr(&mem), layout::DRAM_MEM_START);
... | rust_cleaned_test_functions.jsonl/75934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
761,
8047,
7387,
368,
341,
286,
1077,
13604,
284,
5325,
19195,
58035,
19930,
486,
37,
10599,
6806,
4098,
481,
220,
15,
87,
16,
15,
15,
15,
317,
286,
1077,
1833,
284,
10995,
19195,
486,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_sparse_merkle_proof_malformed_leaf() {
let sibling0 = b"0".test_only_hash().to_vec();
let mut compressed_proof = crate::proto::proof::SparseMerkleProof::new();
compressed_proof.set_leaf(vec![1, 2, 3]);
compressed_proof.mut_bitmap().push(0b1000_0000);
compressed_proof... | rust_cleaned_test_functions.jsonl/103134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
71123,
717,
16754,
273,
86757,
717,
278,
10155,
38909,
368,
341,
262,
1077,
44223,
15,
284,
293,
1,
15,
3263,
1944,
18410,
8950,
1005,
983,
13251,
1428,
262,
1077,
5206,
30649,
86757,
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_node_merge_prerequisites_check() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
let pd_client = Arc::clone(&cluster.pd_client);
cluster.run();
cluster.must_put(b"k1", b"v1");
cluster.must_put(b"k3", b"v3");
let region = pd_client.get... | rust_cleaned_test_functions.jsonl/27245 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
5294,
82301,
7200,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
1077,
7744,
8179,
284,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rgb() -> Result<(), Box<dyn std::error::Error>> {
use crate::parser::code_span;
use crate::parser::formalargs::call_args;
use crate::value::Rgba;
let scope = ScopeRef::new_global(Default::default());
assert_eq!(
FUNCTIONS.get(&name!(rgb)).unwrap().call(
sc... | rust_cleaned_test_functions.jsonl/108178 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37407,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
990,
17717,
486,
9657,
486,
1851,
37382,
280,
262,
990,
17717,
486,
9657,
486,
627,
278,
2116,
486,
6659,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_sample() {
let min_val = 1;
let max_val = 100;
let mut r = thread_rng();
let vals = (min_val..max_val).collect::<Vec<int>>();
let small_sample = sample(&mut r, vals.iter(), 5);
let large_sample = sample(&mut r, vals.iter(), vals.len() + 5);
... | rust_cleaned_test_functions.jsonl/76082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
368,
341,
286,
1077,
1308,
6189,
284,
220,
16,
280,
286,
1077,
1932,
6189,
284,
220,
16,
15,
15,
401,
286,
1077,
5206,
435,
284,
4516,
66849,
543,
286,
1077,
28356,
284,
320,
1065,
6189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_noatime_does_not_update_ofile_atime() {
// NOTE: Not all environments support tracking access time. If this
// is not working and the systems that pass it simply don't update file access time.
let fname = "this-ofile-exists-noatime.txt";
assert_fixture_exists!(&fname);
... | rust_cleaned_test_functions.jsonl/59387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
266,
545,
96374,
7913,
8882,
3575,
457,
3752,
545,
368,
341,
262,
442,
16743,
25,
2806,
678,
21737,
1824,
14849,
2615,
882,
13,
1416,
419,
7213,
262,
442,
374,
537,
3238,
323,
279,
5942,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prehashed() {
let mut rng = Hc128Rng::seed_from_u64(0);
let pair = Ed25519Pair::from_random(&mut rng);
let data = YoloStruct {
a: 12345,
b: vec![0x31, 0x33, 0x70],
c: 54321,
};
let mut hasher = PseudoMerlin(Sha512::defa... | rust_cleaned_test_functions.jsonl/55260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
95647,
368,
341,
286,
1077,
5206,
28422,
284,
472,
66,
16,
17,
23,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
15,
317,
286,
1077,
6716,
284,
3199,
17,
20,
20,
16,
24,
12443,
486,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_string_to_writer() {
let mut cursor = Cursor::new(vec![]);
let position = cursor.position();
DictionaryBuilder::write_string_to_writer(&mut cursor, "").unwrap();
assert_eq!(0, cursor.get_ref()[0]);
assert_eq!(position + 1, cursor.position());
let position = cursor... | rust_cleaned_test_functions.jsonl/134079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 634
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3904,
2346,
28908,
368,
341,
262,
1077,
5206,
8128,
284,
28067,
486,
931,
25592,
0,
1294,
626,
262,
1077,
2309,
284,
8128,
6187,
543,
262,
10466,
3297,
486,
4934,
3904,
2346,
28908,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_link() {
assert_eq!(
parse_line("LINK -1\nok"),
Ok(("ok", Instruction::Link(Target::Literal(-1))))
);
assert_eq!(
parse_line("LINK #NRV\nok"),
Ok((
"ok",
Instruction::Link(Target::Register(Str... | rust_cleaned_test_functions.jsonl/989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
6528,
445,
35956,
481,
16,
1699,
562,
4461,
310,
7622,
30873,
562,
497,
29051,
486,
3939,
80613,
486,
17350,
4080,
16,
22788,
286,
1439,
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_hash_many_avx2() {
if !crate::avx2_detected() {
return;
}
test_hash_many_fn(crate::ffi::x86::blake3_hash_many_avx2);
} | rust_cleaned_test_functions.jsonl/79365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
22101,
26173,
87,
17,
368,
341,
262,
421,
753,
61711,
486,
402,
87,
17,
98876,
368,
341,
286,
470,
280,
262,
456,
262,
1273,
8950,
22101,
15246,
54907,
486,
53799,
486,
87,
23,
21,
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
] | 2 |
#[test]
fn test_clone() {
let lua_string = String::new("burritos").unwrap();
let clone = lua_string.clone();
assert_eq!(clone.as_c_str(), lua_string.as_c_str());
// read after copy
assert_eq!(lua_string.size, 8);
let cstring = CString::try_from(lua_string).unwrap... | rust_cleaned_test_functions.jsonl/101287 | {
"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,
54742,
368,
341,
286,
1077,
20357,
3904,
284,
923,
486,
931,
445,
11240,
94012,
1827,
15454,
543,
286,
1077,
14715,
284,
20357,
3904,
15997,
543,
286,
2060,
10714,
10297,
19982,
5357,
666,
2895,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expect_document() {
let test = |value| expect_document(&mut json_token_iter(value).peekable()).unwrap();
assert_eq!(Document::Null, test(b"null"));
assert_eq!(Document::Bool(true), test(b"true"));
assert_eq!(Document::Number(Number::Float(3.2)), test(b"3.2"));
... | rust_cleaned_test_functions.jsonl/58158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68918,
26231,
368,
341,
286,
1077,
1273,
284,
760,
957,
91,
1720,
26231,
2099,
6984,
2951,
6458,
11723,
3679,
568,
29107,
480,
6011,
15454,
543,
286,
2060,
10714,
10297,
7524,
486,
3280,
11,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast1() {
let mut octants = octree::Octants::default();
let points = vec![
Point3i::new(0, 0, 0),
Point3i::new(0, 11, 11),
Point3i::new(15, 15, 15),
];
// let points = [
... | rust_cleaned_test_functions.jsonl/66112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
16,
368,
341,
262,
1077,
5206,
18491,
1783,
284,
18491,
765,
486,
18053,
1783,
486,
2258,
1428,
80719,
41693,
14808,
262,
1077,
3501,
284,
7486,
90515,
286,
5126,
18,
72,
486,
931,
7,
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_get_txs_to_rebroadcast_reorged() {
let responder = init_responder(MockedServerQuery::Regular);
let current_height = 100;
let user_id = get_random_user_id();
responder
.dbm
.lock()
.unwrap()
.store_user(user... | rust_cleaned_test_functions.jsonl/55480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1085
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
17805,
82,
2346,
1288,
54162,
1288,
1775,
291,
368,
341,
1789,
286,
1077,
64034,
284,
2930,
4918,
20328,
66436,
291,
5475,
2859,
486,
30404,
317,
286,
1077,
1482,
9561,
284,
220,
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... | 3 |
#[test]
fn test_compatible_wpa3_rsne() {
let mut a_rsne = make_rsne(Some(cipher::CCMP_128), vec![cipher::CCMP_128], vec![akm::SAE]);
a_rsne.rsn_capabilities = Some(
RsnCapabilities(0)
.with_mgmt_frame_protection_cap(true)
.with_mgmt_frame_protection_re... | rust_cleaned_test_functions.jsonl/113749 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
37079,
1670,
6595,
18,
47115,
811,
368,
341,
286,
1077,
5206,
264,
47115,
811,
284,
1281,
47115,
811,
65405,
1337,
10558,
486,
3706,
5781,
62,
16,
17,
23,
701,
7486,
20703,
67586,
486,
370... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_del_errors() {
check_load_save_common_errors("DEL");
Tester::default().run("DEL").expect_err("DEL requires a filename").check();
check_stmt_err("Entry not found", r#"DEL "missing-file""#);
Tester::default()
.write_file("mismatched-extension.bat", ""... | rust_cleaned_test_functions.jsonl/112738 | {
"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,
18029,
20196,
368,
341,
286,
1779,
12411,
15376,
21107,
20196,
445,
38332,
3071,
286,
76816,
486,
2258,
1005,
6108,
445,
38332,
1827,
17119,
9266,
445,
38332,
7460,
264,
3899,
1827,
2028,
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_padded_frame_copy() {
let (frame, fi) = create_frame();
let tile = frame.as_tile();
let sbo = TileSuperBlockOffset(SuperBlockOffset { x: 1, y: 2 });
let pad = 2;
let padded_frame = cdef_sb_padded_frame_copy(&fi, sbo, 1, 1, &tile, pad);
assert_eq!(padd... | rust_cleaned_test_functions.jsonl/77072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
16828,
8929,
16096,
368,
341,
262,
1077,
320,
6763,
11,
9136,
8,
284,
1855,
8929,
543,
262,
1077,
10023,
284,
4034,
5357,
29844,
543,
1066,
262,
1077,
274,
749,
284,
20744,
19284,
4713,
644... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_longest_common_prefix() {
assert_eq!(
Z2::longest_common_prefix(&[u64::max_value(), u64::max_value() - 15]).prefix,
u64::max_value() - 15
);
assert_eq!(Z2::longest_common_prefix(&[15, 13]).prefix, 12);
assert_eq!(Z2::longest_common_prefix(... | rust_cleaned_test_functions.jsonl/85854 | {
"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,
17799,
477,
21107,
13974,
368,
341,
286,
2060,
10714,
33673,
310,
1863,
17,
486,
4825,
477,
21107,
13974,
2099,
58,
84,
21,
19,
486,
2810,
3142,
1507,
575,
21,
19,
486,
2810,
3142,
368,
481,
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_parse_simple_query() {
let did: DID = DID::parse("did:example:123456?query=true").unwrap();
assert_eq!(did.method(), "example");
assert_eq!(did.method_id(), "123456");
assert_eq!(did.path(), "");
assert_eq!(did.query(), Some("query=true"));
assert_eq!(did.fragment(), None);
} | rust_cleaned_test_functions.jsonl/93405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
30015,
5738,
368,
341,
220,
1077,
1521,
25,
59119,
284,
59119,
486,
6400,
445,
22920,
25,
8687,
25,
16,
17,
18,
19,
20,
21,
30,
1631,
11265,
1827,
15454,
543,
220,
2060,
10714,
10297,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_switch_threshold_uses_gossip_votes() {
solana_logger::setup_with_default(RUST_LOG_FILTER);
let total_stake = 100;
// Minimum stake needed to generate a switching proof
let minimum_switch_stake = (SWITCH_FORK_THRESHOLD as f64 * total_stake as f64) as u64;
// Make the heavier... | rust_cleaned_test_functions.jsonl/31759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4939
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27652,
21858,
62,
4776,
1889,
41473,
65116,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
6615,
9993,
2785,
8553,
8419,
23728,
317,
262,
1077,
2790,
1261,
726,
284,
220,
16,
15,
15,
401,
262,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_to_ascii() {
let test_cases = vec![
("abc", "abc"),
("abc ", "abc "),
("abc\x01", "abc\\0x01"),
("abc\\x01", "abc\\\\x01"),
("\raaaa\tbbb\nccc", "\\raaaa\\tbbb\\nccc"),
("\nabc\u{7f}", "\\nabc\\0x7f"),
("... | rust_cleaned_test_functions.jsonl/88825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
50238,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
3489,
13683,
497,
330,
13683,
4461,
310,
3489,
13683,
3670,
330,
13683,
84119,
310,
3489,
13683,
3462,
15,
16,
497,
330,
13683... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ext() {
assert_eq!(get_last("file.e", '.'), ("file", "e"));
assert_eq!(get_last("file.beans.e", '.'), ("file.beans", "e"));
} | rust_cleaned_test_functions.jsonl/15090 | {
"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,
17052,
9927,
368,
972,
286,
2060,
10714,
10297,
455,
12195,
445,
1192,
1734,
497,
24361,
701,
3489,
1192,
497,
330,
68,
15397,
286,
2060,
10714,
10297,
455,
12195,
445,
1192,
14196,
1734,
497,
243... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_triggered_by_compact() {
let dir = tempfile::Builder::new()
.prefix("test_purge_triggered_by_compact")
.tempdir()
.unwrap();
let cfg = Config {
dir: dir.path().to_str().unwrap().to_owned(),
target_file_size: Readab... | rust_cleaned_test_functions.jsonl/91525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1060
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
78678,
3710,
18177,
531,
368,
341,
286,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
310,
659,
11849,
445,
1944,
620,
39823,
78678,
3710,
18177,
531,
1138,
310,
659,
3888,
3741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_query_conversion_no_pagination() {
let sr = meta_search::SearchRequest {
key: Some("key".to_string()),
resource_type: Some(meta_search::ResourceType::Dataset as i32),
conditions: vec![meta_search::FieldQuery {
key: "fancy_key".to_owned(... | rust_cleaned_test_functions.jsonl/113859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
64132,
6536,
82231,
368,
341,
286,
1077,
18962,
284,
8823,
10716,
486,
5890,
1900,
341,
310,
1376,
25,
4329,
445,
792,
3263,
983,
3904,
14702,
310,
5101,
1819,
25,
4329,
45119,
10716,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_java_version_zulu() {
let java_8 = "OpenJDK 64-Bit Server VM (25.222-b10) for linux-amd64 JRE (Zulu 8.40.0.25-CA-linux64) (1.8.0_222-b10), built on Jul 11 2019 11:36:39 by \"zulu_re\" with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)";
let java_11 = "OpenJDK 64-Bit Server VM (11.0... | rust_cleaned_test_functions.jsonl/113479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
77323,
9438,
6415,
24411,
368,
341,
286,
1077,
1642,
62,
23,
284,
330,
5002,
41,
18301,
220,
21,
19,
7671,
275,
8422,
17792,
320,
17,
20,
13,
17,
17,
17,
1455,
16,
15,
8,
369,
36245,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_populate_pool() {
assert_eq!(populate_pool(&[3, 1, 2]), [0, 0, 0, 1, 2, 2]);
} | rust_cleaned_test_functions.jsonl/115262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 63
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
6334,
15709,
368,
341,
286,
2060,
10714,
10297,
47721,
15709,
2099,
58,
18,
11,
220,
16,
11,
220,
17,
9719,
508,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
11,
220,
17,
11,
220,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_primary_expression_literal() {
assert_parse_success!(
primary_expression(false, false),
"null",
Expression::Literal {
value: Literal::NullLiteral(NullLiteral),
loc: Some(((1, 0), (1, 4)).into())
}
);
assert_parse_success!(
... | rust_cleaned_test_functions.jsonl/66470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 843
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45314,
28068,
34100,
368,
341,
262,
2060,
21039,
18632,
33673,
286,
6028,
28068,
3576,
11,
895,
1326,
286,
330,
2921,
756,
286,
16378,
486,
17350,
341,
310,
897,
25,
49674,
486,
3280,
17350,
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_parse_font_weight() {
assert_eq!(parse_font_weight("lighter"), Some(100));
assert_eq!(parse_font_weight("normal"), Some(400));
assert_eq!(parse_font_weight("bold"), Some(700));
assert_eq!(parse_font_weight("bolder"), Some(700));
assert_eq!(parse_font_weight("100"), Some(100));
assert... | rust_cleaned_test_functions.jsonl/15470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
17451,
15876,
368,
341,
220,
2060,
10714,
10297,
6400,
17451,
15876,
445,
4145,
261,
3975,
4329,
7,
16,
15,
15,
1106,
220,
2060,
10714,
10297,
6400,
17451,
15876,
445,
8252,
3975,
4329,
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_fields() -> Result<()> {
#[bitcoin_code(crate = "crate")]
#[derive(PartialEq, Debug, BitcoinCode)]
struct TestPack {
a: u8,
b: u16,
c: u32,
d: u64,
e: i8,
f: i16,
g: i32,
h: i6... | rust_cleaned_test_functions.jsonl/77194 | {
"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,
12132,
368,
1464,
5714,
71698,
341,
286,
11506,
83910,
4136,
54907,
284,
330,
61711,
5422,
286,
11506,
27098,
5304,
20894,
27312,
11,
11091,
11,
13127,
2078,
5563,
286,
2036,
3393,
30684,
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... | 4 |
#[test]
fn test_intersection_skip() {
let left = VecDocSet::from(vec![0, 1, 2, 4]);
let right = VecDocSet::from(vec![2, 5]);
let mut intersection = Intersection::new(vec![left, right]);
assert_eq!(intersection.seek(2), 2);
assert_eq!(intersection.doc(), 2);
} | rust_cleaned_test_functions.jsonl/13258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82558,
44830,
368,
341,
286,
1077,
2115,
284,
11312,
9550,
1649,
486,
1499,
25592,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
19,
2558,
286,
1077,
1290,
284,
11312,
9550,
1649,
486,
1499,
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_debug() {
assert_eq!(
format!("{:?}", Scalar::zero()),
"Scalar(0x0000000000000000000000000000000000000000000000000000000000000000)"
);
assert_eq!(
format!("{:?}", Scalar::one()),
"Scalar(0x00000000000000000000000000000000000... | rust_cleaned_test_functions.jsonl/54650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
88928,
25,
52652,
35176,
486,
14154,
14702,
310,
330,
20639,
7,
15,
87,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tcpds_query_8() {
assert_eq!(parse_sql("
SELECT s_store_name,
Sum(ss_net_profit)
FROM store_sales,
date_dim,
store,
(SELECT ca_zip
FROM (SELECT Substr(ca_zip, 1, 5) ca_zip
... | rust_cleaned_test_functions.jsonl/50107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2001
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
5356,
5738,
62,
23,
368,
341,
262,
2060,
10714,
10297,
6400,
18063,
70576,
286,
19094,
274,
14809,
1269,
345,
5180,
8116,
30678,
19722,
72042,
340,
286,
4295,
256,
3553,
47067,
345,
2290,
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_inflation_and_slashing_with_activating_and_deactivating_stake() {
// some really boring delegation and stake_history setup
let (delegated_stake, mut stake, stake_history) = {
let cluster_stake = 1_000;
let delegated_stake = 700;
let stake = De... | rust_cleaned_test_functions.jsonl/15287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
64149,
8378,
11886,
19049,
6615,
71684,
1095,
8378,
2259,
8859,
1095,
1261,
726,
368,
341,
286,
442,
1045,
2167,
27759,
45261,
323,
18279,
19802,
6505,
198,
286,
1077,
320,
450,
1937,
657,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_iter() {
let keys = vec![1, 2, 3];
let sgs = SgSet::<_, 3>::from_iter(keys.into_iter());
let mut sgs_iter = sgs.iter();
assert_eq!(sgs_iter.next(), Some(&1));
assert_eq!(sgs_iter.next(), Some(&2));
assert_eq!(sgs_iter.next(), Some(&3));
assert_eq!(sgs_iter.next()... | rust_cleaned_test_functions.jsonl/68242 | {
"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,
2602,
11723,
368,
341,
262,
1077,
6894,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
935,
262,
1077,
274,
5857,
284,
328,
70,
1649,
27638,
6878,
220,
18,
6831,
1499,
11723,
36131,
39860,
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_rans_decode_with_order_0() -> io::Result<()> {
let expected = b"noodles";
let data = vec![
0x00, 0x25, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x64, 0x82, 0x49, 0x65, 0x00,
0x82, 0x49, 0x6c, 0x82, 0x49, 0x6e, 0x82, 0x49, 0x6f, 0x00, 0x84, 0x92, 0x73, 0x... | rust_cleaned_test_functions.jsonl/121773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
596,
15227,
6615,
7869,
62,
15,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
3601,
284,
293,
1,
77,
97121,
3302,
286,
1077,
821,
284,
7486,
90515,
310,
220,
15,
87,
15,
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... | 2 |
#[test]
fn test_adding_jobs_to_runner() {
let some_job = SomeJob;
let another_job = AnotherJob;
let runner = Runner::new()
.add(Box::new(some_job))
.add(Box::new(another_job));
assert_eq!(runner.jobs_to_run(), 2);
} | rust_cleaned_test_functions.jsonl/45095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
287,
37247,
2346,
54828,
368,
341,
286,
1077,
1045,
20298,
284,
4329,
12245,
280,
286,
1077,
2441,
20298,
284,
13293,
12245,
401,
286,
1077,
22259,
284,
44946,
486,
931,
741,
310,
659,
718,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_estimate_equal() {
let mut p = build_problem();
p.k = 1;
let s = find_optimal_sequence(&p);
let n = new_node(&p);
let e = estimate(&n, &s, &p);
assert_eq!(e, 3f64);
} | rust_cleaned_test_functions.jsonl/69079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78718,
11478,
368,
341,
310,
1077,
5206,
281,
284,
1936,
60139,
543,
310,
281,
5202,
284,
220,
16,
280,
310,
1077,
274,
284,
1477,
15032,
2861,
23735,
2099,
79,
317,
310,
1077,
308,
284,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.