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_file_reader_rows_projection_map() {
let _schema = "
message spark_schema {
OPTIONAL group a (MAP) {
REPEATED group key_value {
REQUIRED BYTE_ARRAY key (UTF8);
OPTIONAL group value (MAP) {
REPEATED group key_value {
REQUIRED INT32 ... | rust_cleaned_test_functions.jsonl/92464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1032
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
10949,
72738,
5376,
368,
341,
197,
10217,
716,
17349,
284,
6228,
7847,
1943,
15186,
25371,
341,
6449,
76232,
1874,
264,
320,
17617,
8,
341,
21497,
3596,
1740,
9005,
1874,
1376,
3142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_largest_register() {
let inputs = to_string_vector("test_inputs/day_8_part_1.txt").unwrap();
let mut test_registers = Registers::new(&inputs);
assert_eq!(test_registers.largest_register(), 0);
test_registers.run_instructions();
assert_eq!(test_registers... | rust_cleaned_test_functions.jsonl/113414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
32381,
14000,
368,
341,
286,
1077,
11127,
284,
311,
3904,
12247,
445,
1944,
28557,
44739,
62,
23,
10495,
62,
16,
3909,
1827,
15454,
543,
286,
1077,
5206,
1273,
78360,
284,
54774,
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_change_flow_control() {
let (mut cfg, _dir) = TiKvConfig::with_tmp().unwrap();
cfg.validate().unwrap();
let (db, cfg_controller, _, flow_controller) = new_engines(cfg);
assert_eq!(
db.get_options_cf(CF_DEFAULT)
.unwrap()
... | rust_cleaned_test_functions.jsonl/31098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
27441,
13436,
368,
341,
286,
1077,
320,
6984,
13286,
11,
716,
3741,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
286,
13286,
19520,
1005,
15454,
543,
286,
1077,
320,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_status() {
let error: TokenManagerError = TEST_STATUS.into();
assert_eq!(error.status, TEST_STATUS);
assert!(!error.fatal);
assert!(error.cause.is_none());
} | rust_cleaned_test_functions.jsonl/7173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
4773,
368,
341,
286,
1077,
1465,
25,
9660,
2043,
1454,
284,
13602,
9348,
39860,
543,
286,
2060,
10714,
10297,
841,
4299,
11,
13602,
9348,
317,
286,
2060,
0,
3471,
841,
833,
4212,
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 |
#[test]
fn test_null_equal() {
let a = NullArray::new(12);
let b = NullArray::new(12);
assert!(a.equals(&b));
assert!(b.equals(&a));
let b = NullArray::new(10);
assert!(!a.equals(&b));
assert!(!b.equals(&a));
// Test the case where offset != 0
... | rust_cleaned_test_functions.jsonl/893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
11478,
368,
341,
286,
1077,
264,
284,
18084,
1857,
486,
931,
7,
16,
17,
317,
286,
1077,
293,
284,
18084,
1857,
486,
931,
7,
16,
17,
317,
286,
2060,
10297,
64,
6488,
2099,
65,
1106,
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_activate_epoch() {
let mut stakes = Stakes::default();
let ((vote_pubkey, vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
stakes.store(&vote_pubkey, &vote_account, true);
stakes.store(&stake_pubkey, &stake_account, tr... | rust_cleaned_test_functions.jsonl/94748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67894,
20682,
368,
341,
286,
1077,
5206,
44425,
284,
794,
2050,
486,
2258,
1428,
286,
1077,
1781,
29358,
34014,
792,
11,
6910,
13500,
701,
320,
267,
726,
34014,
792,
11,
18279,
13500,
593,
4035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_page_data() {
let main = dummy_team("main");
let mut subteam = dummy_team("subteam");
subteam.subteam_of = Some("main".into());
let mut wg = dummy_team("wg");
wg.subteam_of = Some("main".into());
wg.kind = TeamKind::WorkingGroup;
wg.website... | rust_cleaned_test_functions.jsonl/33047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6129,
1769,
368,
341,
286,
1077,
1887,
284,
17292,
26532,
445,
3817,
797,
286,
1077,
5206,
1186,
9196,
284,
17292,
26532,
445,
1966,
9196,
797,
286,
1186,
9196,
4309,
9196,
3575,
284,
4329,
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_new() {
// Supported
let uuid1 = Uuid::new(Version4Random).unwrap();
let s = uuid1.to_simple_str();
assert!(s.len() == 32);
assert!(uuid1.get_version().unwrap() == Version4Random);
// Test unsupported versions
assert!(Uuid::new(Version1Ma... | rust_cleaned_test_functions.jsonl/58265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
442,
48980,
198,
286,
1077,
16040,
16,
284,
547,
2423,
486,
931,
7,
5637,
19,
13999,
568,
15454,
543,
286,
1077,
274,
284,
16040,
16,
2389,
30015,
2895,
1428,
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... | 1 |
#[test]
fn test_le() {
assert!(Version::parse("0.0.0") <= Version::parse("1.2.3-alpha2"));
assert!(Version::parse("1.0.0") <= Version::parse("1.2.3-alpha2"));
assert!(Version::parse("1.2.0") <= Version::parse("1.2.3-alpha2"));
assert!(Version::parse("1.2.3-alpha1") <= Version::pa... | rust_cleaned_test_functions.jsonl/43106 | {
"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,
11751,
368,
341,
286,
2060,
10297,
5637,
486,
6400,
445,
15,
13,
15,
13,
15,
899,
2651,
6079,
486,
6400,
445,
16,
13,
17,
13,
18,
64538,
17,
4010,
286,
2060,
10297,
5637,
486,
6400,
445,
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_hash() {
let mut x = ImmutSList::new();
let mut y = ImmutSList::new();
assert!(hash::hash::<_, hash::SipHasher>(&x) == hash::hash::<_, hash::SipHasher>(&y));
x = x.append(1).append(2).append(3);
y = y.append(1).append(4).tail().append(2).append(3);
assert!(... | rust_cleaned_test_functions.jsonl/64465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
414,
1077,
5206,
856,
284,
2362,
6984,
50,
852,
486,
931,
543,
414,
1077,
5206,
379,
284,
2362,
6984,
50,
852,
486,
931,
1428,
414,
2060,
10297,
8296,
486,
8296,
27638,
6878,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_categories() {
assert_eq!(parse_categories(&"a"), Ok(vec!["a".to_string()]));
assert_eq!(
parse_categories(&"a,b,c:d"),
Ok(vec!["a".to_string(), "b".to_string(), "c:d".to_string()])
);
assert_eq!(parse_categories(&""), Err("no categ... | rust_cleaned_test_functions.jsonl/15125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
27542,
368,
341,
286,
2060,
10714,
10297,
6400,
27542,
2099,
1,
64,
3975,
7622,
25592,
0,
1183,
64,
3263,
983,
3904,
26556,
3237,
286,
2060,
10714,
33673,
310,
4715,
27542,
2099,
1,
64,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip_1() {
#[derive(PackedStruct, Debug, PartialEq)]
#[packed_struct(bit_numbering="msb0")]
pub struct RoundtripAligned {
#[packed_field(bits="0..")]
f1: u8,
f2: i8,
#[packed_field(endian="msb")]
f3: u16,
#[packed_field(e... | rust_cleaned_test_functions.jsonl/67775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
62,
16,
368,
1476,
262,
11506,
27098,
5304,
11191,
9422,
11,
11091,
11,
55039,
5563,
262,
11506,
50321,
15126,
54672,
5500,
287,
428,
1011,
65,
15,
5422,
262,
6675,
2036,
17097,
3298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_flamegraph() {
let tempdir = TempDir::new("flamegraph").unwrap();
let stacks_file = tempdir.path().join("stacks.txt");
let mut file = std::fs::File::create(&stacks_file).expect("couldn't create file");
for _ in 1..10 { file.write(b"a;a;a;a 1").unwrap(); }
write_flamegra... | rust_cleaned_test_functions.jsonl/113300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
5081,
373,
4439,
368,
341,
262,
1077,
2730,
3741,
284,
19944,
6184,
486,
931,
445,
1489,
373,
4439,
1827,
15454,
543,
262,
1077,
39950,
2458,
284,
2730,
3741,
3875,
1005,
5987,
445,
7693,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_union_not_null() {
let schema = Schema::parse_str(UNION_SCHEMA).unwrap();
let union = Value::Union(1, Box::new(Value::Long(3)));
let mut expected = Vec::new();
zig_i64(1, &mut expected);
zig_i64(3, &mut expected);
assert_eq!(to_avro_datum(&schema... | rust_cleaned_test_functions.jsonl/37657 | {
"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,
51621,
7913,
15162,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
7,
1861,
1271,
46220,
568,
15454,
543,
286,
1077,
11300,
284,
5162,
486,
32658,
7,
16,
11,
8261,
486,
931,
25346,
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_primitive_type() {
let source = "float";
let arena = Arena::new();
let mut p = Parser::new(source, &arena);
let res = p.type_node().unwrap();
assert_debug_snapshot!(res);
} | rust_cleaned_test_functions.jsonl/94261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
1819,
368,
341,
286,
1077,
2530,
284,
330,
3649,
876,
286,
1077,
24902,
284,
27047,
486,
931,
543,
286,
1077,
5206,
281,
284,
21102,
486,
931,
12437,
11,
609,
30527,
317,
286,
1077,
592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_aessafe_128() {
let tests = tests128();
for t in tests.iter() {
let mut enc = aessafe::AesSafe128Encryptor::new(&t.key[..]);
let mut dec = aessafe::AesSafe128Decryptor::new(&t.key[..]);
run_test(&mut enc, &mut dec, t);
}
} | rust_cleaned_test_functions.jsonl/60753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
433,
5645,
62,
16,
17,
23,
368,
341,
286,
1077,
7032,
284,
7032,
16,
17,
23,
543,
286,
369,
259,
304,
7032,
19471,
368,
341,
310,
1077,
5206,
3209,
284,
264,
433,
5645,
486,
32,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_meta_line() {
assert_eq!(
parse_file_meta_line("--- src/delta.rs", false, None),
("src/delta.rs".to_string(), FileEvent::Change)
);
assert_eq!(
parse_file_meta_line("+++ src/delta.rs", false, None),
("src/delta.rs... | rust_cleaned_test_functions.jsonl/108159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2458,
13381,
6528,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
2458,
13381,
6528,
74083,
2286,
3446,
5964,
25638,
497,
895,
11,
2240,
1326,
310,
3489,
3548,
3446,
5964,
25638,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_increase_file_size_kb() {
let expected = 5 * 1000;
let (at, mut ucmd) = at_and_ucmd!();
let mut file = at.make_file(FILE1);
ucmd.args(&["-s", "+5KB", FILE1]).succeeds();
file.seek(SeekFrom::End(0)).unwrap();
let actual = file.seek(SeekFrom::Current(0)).unwrap();
asse... | rust_cleaned_test_functions.jsonl/77079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73807,
2458,
2368,
95638,
368,
341,
262,
1077,
3601,
284,
220,
20,
353,
220,
16,
15,
15,
15,
280,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_move_items_reverse() {
let vec = vec![1, 2, 3];
let mut vec2 = vec![];
for i in vec.into_iter().rev() {
vec2.push(i);
}
assert_eq!(vec2, [3, 2, 1]);
} | rust_cleaned_test_functions.jsonl/24417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
12134,
43277,
368,
341,
262,
1077,
7486,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
935,
262,
1077,
5206,
7486,
17,
284,
7486,
0,
15078,
262,
369,
600,
304,
7486,
39860,
11723,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_no_origin_response() {
let mut cors = Cors::new().disable_preflight().finish(test::ok_service());
let req = TestRequest::default().method(Method::GET).to_srv_request();
let resp = test::call_service(&mut cors, req);
assert!(resp
.headers()
... | rust_cleaned_test_functions.jsonl/914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
34043,
9655,
368,
341,
286,
1077,
5206,
43911,
284,
52518,
486,
931,
1005,
18015,
43331,
4145,
1005,
30150,
8623,
486,
562,
12267,
5231,
286,
1077,
4232,
284,
3393,
1900,
486,
2258,
1005,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compact_codec() {
let tests = vec!["", "hello", "世界"];
for &s in &tests {
let max_size = s.len() + number::MAX_VAR_I64_LEN;
let mut buf = Vec::with_capacity(max_size);
buf.encode_compact_bytes(s.as_bytes()).unwrap();
assert!(buf.len... | rust_cleaned_test_functions.jsonl/55213 | {
"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,
18177,
531,
51084,
368,
341,
286,
1077,
7032,
284,
7486,
0,
1183,
497,
330,
14990,
497,
330,
99489,
6332,
286,
369,
609,
82,
304,
609,
23841,
341,
310,
1077,
1932,
2368,
284,
274,
19406,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_special_idents_is_tmp_var() {
assert!(!is_tmp_var("_tmp$Blah"));
assert!(!is_tmp_var("__tmp$"));
assert!(!is_tmp_var("О БОЖЕ"));
assert!(is_tmp_var("__tmp$Blah"));
} | rust_cleaned_test_functions.jsonl/5043 | {
"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,
41629,
842,
805,
6892,
16125,
4612,
368,
341,
286,
2060,
0,
3471,
285,
16125,
4612,
16975,
5173,
3,
4923,
1466,
4010,
286,
2060,
0,
3471,
285,
16125,
4612,
58406,
5173,
3,
4010,
286,
2060,
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_bpf_upgradeable_loader_close_ix() {
let close_address = Pubkey::new_unique();
let recipient_address = Pubkey::new_unique();
let authority_address = Pubkey::new_unique();
let instruction =
bpf_loader_upgradeable::close(&close_address, &recipient_a... | rust_cleaned_test_functions.jsonl/23421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
880,
15897,
67794,
480,
22139,
12704,
62686,
368,
341,
286,
1077,
3265,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
21713,
6744,
284,
22611,
792,
486,
931,
21218,
543,
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_count() {
assert_count("", &[]);
assert_count(",", &[]);
assert_count("a", &[(" a ", 1)]);
assert_count("-a-", &[(" a ", 1)]);
assert_count("yes", &[(" ye", 1), ("yes", 1), ("es ", 1)]);
assert_count(
"Give - IT...",
&[
... | rust_cleaned_test_functions.jsonl/73150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3180,
368,
341,
286,
2060,
3180,
19814,
609,
56703,
286,
2060,
3180,
42732,
609,
56703,
286,
2060,
3180,
445,
64,
497,
44590,
445,
264,
3670,
220,
16,
41958,
286,
2060,
3180,
13645,
64,
73918,
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_t01() {
// Root selection
let (r, sioe) = do_execute!(&["-s", "."], super::IN_DAT_01);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(
buff!(sioe, sout),
"\"This is a valid JSON text with one value\"\n",
);
assert_eq!(r.is_ok... | rust_cleaned_test_functions.jsonl/118356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
15,
16,
368,
341,
286,
442,
18854,
6589,
198,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
12,
82,
497,
22760,
1125,
2256,
486,
687,
36347,
62,
15,
16,
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_optflagmulti_short2b() {
let args = vec!("-vv".to_string());
let opts = vec!(optflagmulti("v", "verbose", "verbosity"));
let rs = getopts(args.as_slice(), opts.as_slice());
match rs {
Ok(ref m) => {
assert_eq!(m.opt_count("v"), 2);
... | rust_cleaned_test_functions.jsonl/11190 | {
"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,
15032,
9903,
26268,
16673,
17,
65,
368,
341,
286,
1077,
2827,
284,
7486,
0,
13645,
33075,
3263,
983,
3904,
1423,
286,
1077,
12185,
284,
7486,
10297,
2912,
9903,
26268,
445,
85,
497,
330,
14883,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_least_cost_method() {
let mut t = init();
let result = vec![Some(170), None, None, Some(130), None, None, Some(250), None, None,
Some(150), None, Some(50), Some(50), None, None, None];
t.least_cost_method();
assert_eq!(t.trans.data, result);
} | rust_cleaned_test_functions.jsonl/26609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88716,
15890,
9032,
368,
341,
262,
1077,
5206,
259,
284,
2930,
543,
262,
1077,
1102,
284,
7486,
20703,
8373,
7,
16,
22,
15,
701,
2240,
11,
2240,
11,
4329,
7,
16,
18,
15,
701,
2240,
11,
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_case_macro() {
let h = kebab_case!(HelloWorld);
assert_eq!(h, "hello-world");
let h = kebab_case!(WelcomeToMyHouse);
assert_eq!(h, "welcome-to-my-house");
let h = snake_case!(HelloWorld);
assert_eq!(h, "hello_world");
let h = snake_case!... | rust_cleaned_test_functions.jsonl/2144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
58810,
368,
341,
286,
1077,
305,
284,
1962,
47722,
19096,
10297,
9707,
10134,
317,
286,
2060,
10714,
10297,
71,
11,
330,
14990,
30084,
3071,
286,
1077,
305,
284,
1962,
47722,
19096,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_files() {
new_ucmd!()
.arg("-n")
.arg("multiple_files1.txt")
.arg("multiple_files2.txt")
.succeeds()
.stdout_only_fixture("multiple_files.expected");
} | rust_cleaned_test_functions.jsonl/20520 | {
"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,
45233,
10931,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
77,
1138,
286,
659,
858,
445,
35673,
10931,
16,
3909,
1138,
286,
659,
858,
445,
35673,
10931,
17,
3909,
1138,
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 |
#[test]
fn test_masked_move_gen() {
let board =
Board::from_str("r1bqkb1r/pp3ppp/5n2/2ppn1N1/4pP2/1BN1P3/PPPP2PP/R1BQ1RK1 w kq - 0 9")
.unwrap();
let mut capture_moves = MoveGen::new_legal(&board);
let targets = *board.color_combined(!board.side_to_move());
capture_moves.set... | rust_cleaned_test_functions.jsonl/49233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9999,
291,
17134,
16322,
368,
341,
262,
1077,
4479,
4035,
286,
8751,
486,
1499,
2895,
445,
81,
16,
65,
80,
21310,
16,
81,
87146,
18,
602,
79,
14,
20,
77,
17,
14,
17,
602,
77,
16,
45,
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_cheats() {
let mut runner = runner();
let suite_result = runner.test(&Filter::new(".*", ".*", ".*cheats"), None, true).unwrap();
for (_, SuiteResult { test_results, .. }) in suite_result {
for (test_name, result) in test_results {
let logs = d... | rust_cleaned_test_functions.jsonl/48980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83527,
1862,
368,
341,
286,
1077,
5206,
22259,
284,
22259,
543,
286,
1077,
16182,
5287,
284,
22259,
5958,
2099,
5632,
486,
931,
445,
4908,
497,
330,
4908,
497,
330,
4908,
1528,
1862,
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... | 3 |
#[test]
fn test_assembler_hardware_ops() {
test_case(&["HWN A"], &[0x0200]);
test_case(&["HWQ A"], &[0x0220]);
test_case(&["HWI A"], &[0x0240]);
test_case(&["HWI 1"], &[0x8a40]);
} | rust_cleaned_test_functions.jsonl/44764 | {
"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,
11898,
35401,
1523,
37750,
21959,
368,
341,
262,
1273,
19096,
2099,
1183,
39,
36919,
362,
7914,
44590,
15,
87,
15,
17,
15,
15,
2558,
262,
1273,
19096,
2099,
1183,
38252,
48,
362,
7914,
44590,
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_off() {
let point = FailPoint::new();
point.set_actions("", vec![Action::new(Task::Off, 1.0, None)]);
assert!(point.eval("test_fail_point_off").is_none());
} | rust_cleaned_test_functions.jsonl/18295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13651,
368,
341,
286,
1077,
1459,
284,
39645,
2609,
486,
931,
543,
286,
1459,
980,
25368,
19814,
7486,
20703,
2512,
486,
931,
47531,
486,
4596,
11,
220,
16,
13,
15,
11,
2240,
41958,
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 |
#[test]
fn test_tls_reconnect_ok() {
let (receiver, dail_addr) = server_node(
"tests/certificates/node0/".to_string(),
Multiaddr::from_str("/ip4/127.0.0.1/tcp/0/tls/0x09cbaa785348dabd54c61f5f9964474f7bfad7df")
.unwrap(),
);
for _ in 0..2 {
clint_node_connect("tes... | rust_cleaned_test_functions.jsonl/100669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71262,
1288,
6459,
19817,
368,
341,
262,
1077,
320,
37553,
11,
294,
604,
7387,
8,
284,
3538,
5084,
1006,
286,
330,
23841,
2899,
529,
24405,
37211,
15,
14,
3263,
983,
3904,
3148,
286,
17439,
6214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_check_exception() {
let gil = Python::acquire_gil();
let py = gil.python();
let err: PyErr = gaierror::new_err(());
let socket = py
.import("socket")
.map_err(|e| e.print(py))
.expect("could not import socket");
let d ... | rust_cleaned_test_functions.jsonl/22186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
17499,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
1428,
286,
1077,
1848,
25,
75667,
284,
342,
2143,
841,
486,
931,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_guild_command() {
let route = Route::CreateGuildCommand {
application_id: APPLICATION_ID,
guild_id: GUILD_ID,
};
assert_eq!(
route.to_string(),
format!(
"applications/{application_id}/guilds/{guild_id}... | rust_cleaned_test_functions.jsonl/119851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1889,
1498,
10811,
368,
341,
286,
1077,
6021,
284,
9572,
486,
4021,
72574,
4062,
341,
310,
3766,
842,
25,
59237,
3450,
345,
310,
26411,
842,
25,
479,
18023,
3450,
345,
286,
2605,
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_prefix_seek_skip_tombstone() {
let engine = TestEngineBuilder::new().build().unwrap();
engine
.put_cf(
&Context::default(),
"write",
Key::from_raw(b"aoo").append_ts(TimeStamp::zero()),
b"ba".to_vec(),
... | rust_cleaned_test_functions.jsonl/105173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1962
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
74473,
44830,
528,
2855,
10812,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
4712,
198,
310,
659,
628,
71143,
1006,
394,
609,
1972,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_chunks_exact_nth_back() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let mut c = v.chunks_exact(2);
assert_eq!(c.nth_back(1).unwrap(), &[2, 3]);
assert_eq!(c.next().unwrap(), &[0, 1]);
assert_eq!(c.next(), None);
let v2: &[i32] = &[0, 1, 2, 3, 4];
let mut c2 = v2.chunks_ex... | rust_cleaned_test_functions.jsonl/9632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65470,
71084,
78342,
3895,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
5206,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nearest_neighbors_empty() {
let tree: RTree<[f32; 2]> = RTree::new();
assert!(tree.nearest_neighbors(&[0.0, 213.0]).is_empty());
} | rust_cleaned_test_functions.jsonl/70396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
15432,
55925,
15124,
368,
341,
286,
1077,
4916,
25,
431,
6533,
66746,
69,
18,
17,
26,
220,
17,
25669,
284,
431,
6533,
486,
931,
543,
286,
2060,
10297,
9344,
22631,
15432,
55925,
2099,
58,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_merge_incompatible_data_types() {
// same field name with different type
let schema1 = SchemaBuilder::new()
.field("the_field", ArrowDataType::Int16)
.build()
.unwrap();
// same field name with different type
let schema2 = Sche... | rust_cleaned_test_functions.jsonl/44079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
1243,
34842,
1769,
9763,
368,
341,
286,
442,
1852,
2070,
829,
448,
2155,
943,
198,
286,
1077,
10802,
16,
284,
12539,
3297,
486,
931,
741,
310,
659,
2566,
445,
1782,
5013,
497,
33712,
2265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_eq_with_slice() {
let a = Int32Array::from(vec![6, 7, 8, 8, 10]);
let b = Int32Array::from(vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
let b_slice = b.slice(5, 5);
let c = b_slice.as_any().downcast_ref().unwrap();
let d = eq(&c, &a).unwrap();
... | rust_cleaned_test_functions.jsonl/3122 | {
"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,
84087,
3858,
10714,
6615,
26488,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
21,
11,
220,
22,
11,
220,
23,
11,
220,
23,
11,
220,
16,
15,
2558,
286,
1077,
293,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next_with_data_item() {
let mut kc = KeltnerChannel::new(3, 2.0_f64).unwrap();
let dt1 = Bar::new().low(1.2).high(1.7).close(1.3); // typical_price = 1.4
let o1 = kc.next(&dt1);
assert_eq!(round(o1.average), 1.4);
assert_eq!(round(o1.lower), 0.4);
... | rust_cleaned_test_functions.jsonl/130307 | {
"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,
11257,
6615,
1769,
5634,
368,
341,
286,
1077,
5206,
87518,
284,
730,
3818,
1194,
9629,
486,
931,
7,
18,
11,
220,
17,
13,
15,
761,
21,
19,
568,
15454,
1428,
286,
1077,
7594,
16,
284,
4716,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_options_set_auto_bind_uniforms_false() {
let mut c = Compiler::new().unwrap();
let mut options = CompileOptions::new().unwrap();
options.set_auto_bind_uniforms(false);
let result = c.compile_into_spirv_assembly(
UNIFORMS_NO_BINDINGS,
... | rust_cleaned_test_functions.jsonl/41066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
8743,
2602,
27740,
27461,
45066,
82,
36015,
368,
341,
286,
1077,
5206,
272,
284,
45631,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
2606,
284,
54467,
3798,
486,
931,
1005,
15454,
543,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_attr_differs_from_fn_with_same_name() {
check(
r#"
#[test]
fn test$0() {
test();
}
"#,
expect![[r#"
test Function FileId(0) 0..33 11..15
FileId(0) 24..28
"#]],
);
} | rust_cleaned_test_functions.jsonl/60676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10422,
15850,
388,
5673,
15246,
6615,
33574,
1269,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
13353,
1944,
921,
8822,
1273,
3,
15,
368,
341,
262,
1273,
543,
532,
57676,
345,
310,
1720,
0,
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_delete_guild_command() {
let route = Route::DeleteGuildCommand {
application_id: APPLICATION_ID,
command_id: COMMAND_ID,
guild_id: GUILD_ID,
};
assert_eq!(
route.to_string(),
format!(
"application... | rust_cleaned_test_functions.jsonl/119892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
1889,
1498,
10811,
368,
341,
286,
1077,
6021,
284,
9572,
486,
6435,
72574,
4062,
341,
310,
3766,
842,
25,
59237,
3450,
345,
310,
3210,
842,
25,
40218,
3450,
345,
310,
26411,
842,
25,
479,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_small() {
let mut map = BTreeMap::new();
assert_eq!(map.pop(&1), None);
assert_eq!(map.find(&1), None);
assert_eq!(map.swap(1u, 1u), None);
assert_eq!(map.find(&1), Some(&1));
assert_eq!(map.swap(1, 2), Some(1));
assert_eq!(map.find(&... | rust_cleaned_test_functions.jsonl/106534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
31966,
368,
341,
286,
1077,
5206,
2415,
284,
425,
6533,
2227,
486,
931,
543,
286,
2060,
10714,
10297,
2186,
8288,
2099,
16,
701,
2240,
317,
286,
2060,
10714,
10297,
2186,
2658,
2099,
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_load_config_default() {
let config = load_config(None).unwrap();
let first = config.commit_types.get(0).unwrap();
assert_eq!(first.description, "A new feature");
} | rust_cleaned_test_functions.jsonl/91369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
5332,
9993,
368,
341,
286,
1077,
2193,
284,
2795,
5332,
26717,
568,
15454,
543,
286,
1077,
1156,
284,
2193,
15728,
9763,
670,
7,
15,
568,
15454,
1428,
286,
2060,
10714,
10297,
3896,
13178,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_diff_so_fancy_obeys_feature_precedence_rules() {
let git_config_contents = b"
[color \"diff\"]
meta = 11
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[delta \"decorations\"]
commit-decoration-style = bold b... | rust_cleaned_test_functions.jsonl/91074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
39833,
761,
6572,
62,
15422,
1047,
17069,
10442,
1998,
763,
21407,
368,
341,
286,
1077,
16345,
5332,
16682,
284,
293,
698,
84111,
7245,
13490,
2105,
921,
262,
8823,
284,
220,
16,
16,
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_split_default_with_io_blksize() {
let (at, mut ucmd) = at_and_ucmd!();
let name = "split_default_with_io_blksize";
RandomFile::new(&at, name).add_lines(2000);
ucmd.args(&[name, "---io-blksize", "2M"]).succeeds();
let glob = Glob::new(&at, ".", r"x[[:alpha:]][[:alpha:]]$");
... | rust_cleaned_test_functions.jsonl/25873 | {
"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,
17052,
9993,
6615,
16939,
51969,
2141,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
829,
284,
330,
6960,
9993,
6615,
16939,
51969,
2141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_frame_with_information_length_invalid_buf_size() {
let role = Role::Responder;
let frame_type = FrameTypeMarker::UnnumberedInfoHeaderCheck;
let mut buf = vec![
0b00001111,
0b11101111, // Control Field - UIH command with P/F = 0.
... | rust_cleaned_test_functions.jsonl/87866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8929,
6615,
35212,
5118,
31433,
10363,
2368,
368,
341,
286,
1077,
3476,
284,
15404,
486,
30884,
280,
286,
1077,
4034,
1819,
284,
16321,
929,
20613,
486,
1806,
4082,
291,
1731,
4047,
3973,
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_reshaped_labelled_generic_conversion() {
let n_u = NormalUser {
first_name: "Moe",
last_name: "Ali",
age: 30,
};
// Convert to labelled-generic representation
let n_gen = into_labelled_generic(n_u);
// Reshape the labelled generic to fit the JumbledUse... | rust_cleaned_test_functions.jsonl/32221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2488,
10185,
6106,
832,
41232,
64132,
368,
341,
262,
1077,
308,
7300,
284,
18437,
1474,
341,
286,
1156,
1269,
25,
330,
44,
4644,
756,
286,
1537,
1269,
25,
330,
17662,
756,
286,
4231,
25,
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_two_rule_bodies_nested() -> TestResult {
let mut p = Polar::new();
p.load_str(
r#"f(x) if a(x);
f(1);
a(x) if g(x);"#,
)?;
qvar(&mut p, "f(x)", "x", values![1]);
Ok(())
} | rust_cleaned_test_functions.jsonl/97626 | {
"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,
23241,
21124,
880,
10028,
66279,
368,
1464,
3393,
2077,
341,
262,
1077,
5206,
281,
284,
55896,
486,
931,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
2075,
8,
421,
264,
2075,
317,
1843,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_text_4() {
let s = "a\x031,2b";
let mut parser = parse_irc_formatting(s);
assert_eq!(parser.next(), Some(IrcFormatEvent::Text("a")));
assert_eq!(
parser.next(),
Some(IrcFormatEvent::Color {
fg: Color::Black,
bg: Some(Color::Blue)
... | rust_cleaned_test_functions.jsonl/6840 | {
"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,
21039,
4326,
62,
19,
368,
341,
262,
1077,
274,
284,
330,
64,
3462,
15,
18,
16,
11,
17,
65,
876,
262,
1077,
5206,
6729,
284,
4715,
62,
2437,
8955,
1280,
1141,
317,
262,
2060,
10714,
10297,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_storage_count_and_alive_bytes_2_accounts() {
let accounts = AccountsDb::new_single();
let keys = [
solana_sdk::pubkey::Pubkey::new(&[0; 32]),
solana_sdk::pubkey::Pubkey::new(&[255; 32]),
];
// make sure accounts are in 2 different... | rust_cleaned_test_functions.jsonl/1442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
23310,
3180,
8378,
58850,
12524,
62,
17,
55665,
368,
341,
286,
1077,
9618,
284,
40655,
7994,
486,
931,
19487,
543,
286,
1077,
6894,
284,
2278,
310,
2048,
3362,
61783,
486,
9585,
792,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_increment_2_to_the_power_of_255() {
// This one was failing with ethereum_types::U256
let mut value: Uint256 = "0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
.parse()
.unwrap();
assert_eq!(value.bits(), 255);
value += 1u8.into();
assert_e... | rust_cleaned_test_functions.jsonl/118547 | {
"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,
51482,
62,
17,
2346,
16068,
20421,
3575,
62,
17,
20,
20,
368,
341,
262,
442,
1096,
825,
572,
21394,
448,
84522,
9763,
486,
52,
17,
20,
21,
198,
262,
1077,
5206,
897,
25,
27883,
17,
20,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_move_right() {
let (saved_x, saved_y) = position().unwrap();
execute!(io::stdout(), MoveRight(1)).unwrap();
assert_eq!(position().unwrap(), (saved_x + 1, saved_y));
} | rust_cleaned_test_functions.jsonl/13972 | {
"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,
17134,
10539,
368,
341,
286,
1077,
320,
32702,
3212,
11,
6781,
4178,
8,
284,
2309,
1005,
15454,
543,
286,
9026,
10297,
815,
486,
36358,
1507,
14561,
5979,
7,
16,
4579,
15454,
543,
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 |
#[test]
fn test_create_tx_version_1_csv() {
let (wallet, _, _) = get_funded_wallet(get_test_single_sig_csv());
let addr = wallet.get_new_address().unwrap();
wallet
.create_tx(TxBuilder::with_recipients(vec![(addr.script_pubkey(), 25_000)]).version(1))
.unwrap();
... | rust_cleaned_test_functions.jsonl/11310 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
9438,
62,
16,
14020,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
19487,
29252,
14020,
1423,
286,
1077,
10789,
284,
15085,
670,
5921,
674... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_enable() {
let mut sandbox = timestamping_sandbox();
let sandbox_state = SandboxState::new();
sandbox.assert_state(HEIGHT_ONE, ROUND_ONE);
try_add_one_height(&sandbox, &sandbox_state).unwrap();
sandbox.assert_state(HEIGHT_TWO, ROUND_ONE);
// Disable the node... | rust_cleaned_test_functions.jsonl/8874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33842,
8378,
18988,
368,
341,
262,
1077,
5206,
42754,
284,
11441,
287,
643,
31536,
543,
262,
1077,
42754,
4387,
284,
96860,
1397,
486,
931,
1428,
262,
42754,
3713,
4387,
7,
50272,
34727,
11,
76138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mmap_region_build_raw() {
let addr = 0;
let size = unsafe { libc::sysconf(libc::_SC_PAGESIZE) as usize };
let prot = libc::PROT_READ | libc::PROT_WRITE;
let flags = libc::MAP_NORESERVE | libc::MAP_PRIVATE;
let r = unsafe { MmapRegion::build_raw((addr + 1)... | rust_cleaned_test_functions.jsonl/103807 | {
"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,
717,
2186,
20627,
20801,
16067,
368,
341,
286,
1077,
10789,
284,
220,
15,
280,
286,
1077,
1379,
284,
19860,
314,
42142,
486,
7791,
6135,
44828,
66,
13541,
3540,
79873,
3282,
8,
438,
22301,
2605,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_blocks_by_parent() {
let consensus = ConsensusBuilder::default().build();
let block_number = 200;
let mut blocks = Vec::new();
let mut parent = consensus.genesis_block().header();
let pool = OrphanBlockPool::with_capacity(200);
for _ in 1..b... | rust_cleaned_test_functions.jsonl/65991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
25201,
3710,
15960,
368,
341,
286,
1077,
23869,
284,
7292,
13626,
3297,
486,
2258,
1005,
5834,
543,
286,
1077,
2504,
5500,
284,
220,
17,
15,
15,
280,
286,
1077,
5206,
10010,
284,
11312,
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... | 2 |
#[test]
fn test_sub_scalar_checked() {
let a = Int32Array::from(&[None, Some(6), None, Some(6)]);
let result = checked_sub_scalar(&a, &1i32);
let expected = Int32Array::from(&[None, Some(5), None, Some(5)]);
assert_eq!(result, expected);
let a = Int8Array::from(&[None, S... | rust_cleaned_test_functions.jsonl/23359 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
41652,
56456,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
2099,
58,
4064,
11,
4329,
7,
21,
701,
2240,
11,
4329,
7,
21,
41958,
286,
1077,
1102,
284,
10067,
5228,
41652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_boolean_literal() {
let n = BooleanLit {
base: BaseNode::default(),
value: true,
};
let serialized = serde_json::to_string(&n).unwrap();
assert_eq!(serialized, r#"{"type":"BooleanLiteral","value":true}"#);
let deserialized: BooleanLit = serde_json::from_s... | rust_cleaned_test_functions.jsonl/40443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
46642,
34100,
368,
341,
262,
1077,
308,
284,
6992,
68954,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
897,
25,
830,
345,
262,
2605,
262,
1077,
32916,
284,
61570,
9455,
486,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_change_resolved_ts_config() {
use crossbeam::channel;
pub struct TestConfigManager(channel::Sender<ConfigChange>);
impl ConfigManager for TestConfigManager {
fn dispatch(&mut self, change: ConfigChange) -> online_config::Result<()> {
self.0.se... | rust_cleaned_test_functions.jsonl/2155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
4918,
8731,
25023,
5332,
368,
341,
286,
990,
5312,
53871,
486,
10119,
401,
286,
6675,
2036,
3393,
2648,
2043,
25923,
486,
20381,
27,
2648,
4072,
42013,
286,
11605,
5532,
2043,
369,
3393,
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_from_value_optional() {
use glib::ToValue;
crate::init().unwrap();
let a = None::<CapsFeatures>.to_value();
assert!(a.get::<Option<CapsFeatures>>().unwrap().is_none());
let b = glib::value::Value::from(&CapsFeatures::new_empty());
assert!(b.get::... | rust_cleaned_test_functions.jsonl/49950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3142,
74644,
368,
341,
286,
990,
342,
2740,
486,
1249,
1130,
401,
286,
17717,
486,
2327,
1005,
15454,
1428,
286,
1077,
264,
284,
2240,
27638,
60741,
21336,
14276,
983,
3142,
543,
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_deref_panic() {
let w = SendWrapper::new(Rc::new(42));
let t = thread::spawn(move || {
let _x = w.deref();
});
let join_result = t.join();
assert!(join_result.is_err());
} | rust_cleaned_test_functions.jsonl/30488 | {
"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,
814,
43970,
620,
31270,
368,
341,
197,
10217,
289,
284,
11000,
11542,
486,
931,
2785,
66,
486,
931,
7,
19,
17,
1106,
197,
10217,
259,
284,
4516,
486,
46087,
34081,
1369,
341,
298,
10217,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ff() {
test(b"\x0c", " \n");
test(b"\x0chello\x0cworld\x0c", " hello world \n");
} | rust_cleaned_test_functions.jsonl/36860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58708,
368,
341,
262,
1273,
1883,
11934,
87,
15,
66,
497,
330,
1124,
77,
797,
262,
1273,
1883,
11934,
87,
15,
331,
4791,
3462,
15,
66,
14615,
3462,
15,
66,
497,
330,
23811,
1879,
1124,
77,
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 |
#[test]
fn test_start() {
fn check(args: &[&str]) {
assert_eq!(
Fdb::from_args(CMD_NAME, args),
Ok(Fdb { subcommand: Subcommand::Start(StartCommand {}) })
)
}
check(&["start"]);
} | rust_cleaned_test_functions.jsonl/124664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
368,
341,
286,
5168,
1779,
7356,
25,
44590,
5,
495,
2467,
341,
310,
2060,
10714,
33673,
394,
434,
1999,
486,
1499,
8384,
3025,
6076,
4708,
11,
2827,
1326,
394,
7622,
7832,
1999,
314,
1186,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rewards_protobuf_backward_compatability() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
let rewards: Rewards = (0..100)
.map(|i| Reward {
pubkey: solana_sdk::pubkey::new... | rust_cleaned_test_functions.jsonl/9580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77997,
22357,
18464,
70477,
18177,
2096,
1403,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
7,
507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reserve() {
let mut b = UInt8BufferBuilder::new(2);
assert_eq!(64, b.capacity());
b.reserve(64);
assert_eq!(64, b.capacity());
b.reserve(65);
assert_eq!(128, b.capacity());
let mut b = Int32BufferBuilder::new(2);
assert_eq!(16, b.c... | rust_cleaned_test_functions.jsonl/30964 | {
"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,
89591,
368,
341,
286,
1077,
5206,
293,
284,
22275,
23,
4095,
3297,
486,
931,
7,
17,
317,
286,
2060,
10714,
10297,
21,
19,
11,
293,
59168,
1423,
286,
293,
48520,
7,
21,
19,
317,
286,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_runtime_get_function_info_invalid_fn_name() {
let driver = TestDriver::new(
r#"
pub fn main() -> i32 { 3 }
"#,
);
let handle = unsafe {
mun_runtime_get_function_definition(
driver.runtime,
ptr::null(),
ptr::null_mut(),
... | rust_cleaned_test_functions.jsonl/120552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33232,
3062,
9174,
3109,
31433,
15246,
1269,
368,
341,
262,
1077,
5579,
284,
3393,
11349,
486,
931,
1006,
286,
435,
2,
698,
286,
6675,
5168,
1887,
368,
1464,
600,
18,
17,
314,
220,
18,
456,
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_mul() {
let p = Affine::new(
FieldElement::from(u256h!(
"01ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca"
)),
FieldElement::from(u256h!(
"005668060aa49730b7be4801df46ec62de53ecd11abe43a32873000c36e8dc1f"... | rust_cleaned_test_functions.jsonl/42021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
341,
286,
1077,
281,
284,
9748,
482,
486,
931,
1006,
310,
8601,
1691,
486,
1499,
8154,
17,
20,
21,
71,
33673,
394,
330,
15,
16,
823,
16,
20,
66,
16,
23,
20,
24,
24,
24,
22,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_none_or_up_to_42_zero() {
let occurence: Occurences<u32> = Occurences::NoneOrUpTo(Some(42));
occurence.check_count(0).unwrap();
} | rust_cleaned_test_functions.jsonl/4443 | {
"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,
31488,
8734,
8237,
2346,
62,
19,
17,
19359,
368,
341,
286,
1077,
2983,
86937,
25,
19927,
552,
98162,
34837,
18,
17,
29,
284,
19927,
552,
98162,
486,
4064,
2195,
2324,
1249,
65405,
7,
19,
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 |
#[test]
fn test_basic_def() {
let test_cases = vec![
(
"(def! a 3)",
var_with_value(Number(3), DEFAULT_NAMESPACE, "a"),
),
("(def! a 3) (+ a 1)", Number(4)),
("(def! a (+ 1 7)) (+ a 1)", Number(9)),
(
... | rust_cleaned_test_functions.jsonl/114209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
7844,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
2399,
394,
11993,
750,
0,
264,
220,
18,
15752,
394,
762,
6615,
3142,
42999,
7,
18,
701,
11955,
34552,
11,
330,
64,
4461,
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_vectors() {
let test_vectors = crate::test_vectors::note_encryption::make_test_vectors();
macro_rules! read_bls12_381_scalar {
($field:expr) => {{
bls12_381::Scalar::from_repr($field[..].try_into().unwrap()).unwrap()
}};
}
... | rust_cleaned_test_functions.jsonl/104761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49158,
368,
341,
286,
1077,
1273,
49158,
284,
17717,
486,
1944,
49158,
486,
9974,
13781,
15597,
486,
6927,
4452,
49158,
1428,
286,
18072,
21407,
0,
1349,
880,
4730,
16,
17,
62,
18,
23,
16,
41652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_printablestring() {
assert_eq!(
ber_read_content_printablestring(b"AZaz09 '()+,-./:=?", 18),
Ok((
[].as_ref(),
BerObjectContent::PrintableString("AZaz09 '()+,-./:=?")
)),
);
assert_eq!(
ber_read_content_printablestring(b"", 0),
... | rust_cleaned_test_functions.jsonl/55462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
480,
917,
368,
341,
262,
2060,
10714,
33673,
286,
10207,
6443,
7495,
10064,
480,
917,
1883,
1,
23563,
1370,
15,
24,
364,
17140,
4999,
1725,
14209,
31011,
220,
16,
23,
1326,
286,
7622,
947... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_partition2() {
assert_eq!(
Seat::from_partition("BFFFBBFRRR".to_string()),
Seat::new(70, 7)
)
} | rust_cleaned_test_functions.jsonl/118184 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
43840,
17,
368,
341,
286,
2060,
10714,
33673,
310,
39223,
486,
1499,
43840,
445,
33,
31203,
10098,
37,
8106,
49,
3263,
983,
3904,
14702,
310,
39223,
486,
931,
7,
22,
15,
11,
220,
22,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_one_line() {
assert_eq!(Position { x: 1, y: -1 }, parse_one_line(&"esew"));
assert_eq!(Position { x: 0, y: 0 }, parse_one_line(&"nwwswee"));
assert_eq!(Position { x: -4, y: -2 }, parse_one_line(
&"sesenwnenenewseeswwswswwnenewsewsw")
);
... | rust_cleaned_test_functions.jsonl/35368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
11667,
6528,
368,
341,
286,
2060,
10714,
10297,
3812,
314,
856,
25,
220,
16,
11,
379,
25,
481,
16,
2470,
4715,
11667,
6528,
2099,
1,
288,
365,
4010,
286,
2060,
10714,
10297,
3812,
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_validate_contains_hashmap_key_can_fail() {
let mut map = HashMap::new();
map.insert("hey".to_string(), 1);
assert_eq!(validate_contains(map, "bob"), false);
} | rust_cleaned_test_functions.jsonl/21188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
63598,
8950,
2186,
3097,
27421,
22121,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
2415,
7030,
445,
35561,
3263,
983,
3904,
1507,
220,
16,
317,
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 |
#[test]
fn test_sourcemap_nofiles() {
let input: &[_] = b"{
\"version\":3,
\"sources\":[null],
\"names\":[\"x\",\"alert\"],
\"mappings\":\"AAAA,GAAIA,GAAI,EACR,IAAIA,GAAK,EAAG,CACVC,MAAM\"
}";
let sm = SourceMap::from_reader(input).unwrap();
let mut iter = sm.toke... | rust_cleaned_test_functions.jsonl/79094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
413,
66,
42040,
1089,
1055,
3658,
368,
341,
262,
1077,
1946,
25,
609,
13496,
60,
284,
293,
1,
515,
286,
7245,
4366,
11693,
18,
345,
286,
7245,
39651,
59,
8899,
2921,
1259,
286,
7245,
1140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_null() {
let yason = Scalar::null().unwrap();
assert_eq!(yason.data_type().unwrap(), DataType::Null);
assert!(yason.is_null().unwrap());
// test from vec
let mut bytes: Vec<u8> = Vec::with_capacity(128);
let yason = Scalar::null_with_vec(&mut bytes).unwrap();
assert_... | rust_cleaned_test_functions.jsonl/61288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
368,
341,
262,
1077,
379,
1497,
284,
35176,
486,
2921,
1005,
15454,
543,
262,
2060,
10714,
10297,
88,
1497,
2196,
1819,
1005,
15454,
1507,
33172,
486,
3280,
317,
262,
2060,
10297,
88,
1497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_sig_without_ancestor_fork() {
let sig = Signature::default();
let mut status_cache = BankStatusCache::default();
let blockhash = hash(Hash::default().as_ref());
let ancestors = HashMap::new();
status_cache.insert(&blockhash, &sig, 1, ());
asse... | rust_cleaned_test_functions.jsonl/23940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
29252,
39904,
62,
66878,
761,
669,
368,
341,
286,
1077,
8366,
284,
32232,
486,
2258,
543,
286,
1077,
5206,
2639,
11529,
284,
8547,
2522,
8233,
486,
2258,
543,
286,
1077,
2504,
8296,
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_command() {
let mut context = create_ctx_without_session();
let (_capabs, _more) = context
.get_capability(CapabilityType::Command, 0, 80)
.unwrap();
} | rust_cleaned_test_functions.jsonl/49680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
368,
341,
286,
1077,
5206,
2266,
284,
1855,
15147,
39904,
12316,
1428,
286,
1077,
5453,
11346,
3435,
11,
716,
6384,
8,
284,
2266,
198,
310,
659,
455,
89686,
3025,
391,
2897,
929,
486,
406... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fullname_name_and_namespace_specified() {
init();
let name: Name =
serde_json::from_str(r#"{"name": "a", "namespace": "o.a.h", "aliases": null}"#).unwrap();
let fullname = name.fullname(None);
assert_eq!("o.a.h.a", fullname);
} | rust_cleaned_test_functions.jsonl/69032 | {
"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,
16372,
606,
1269,
8378,
41571,
13594,
1870,
368,
341,
262,
2930,
543,
262,
1077,
829,
25,
3988,
4035,
286,
61570,
9455,
486,
1499,
2895,
2601,
55543,
4913,
606,
788,
330,
64,
497,
330,
2231,
788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_rc() {
assert_ne!(crate::Type::INVALID, MySharedRc::type_());
let b = MySharedRc::from_refcounted(std::rc::Rc::new(MySharedInner {
foo: String::from("abc"),
}));
let v = b.to_value();
let b2 = v.get_some::<MySharedRc>().unwrap();
... | rust_cleaned_test_functions.jsonl/49618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
30299,
368,
341,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
49,
66,
486,
1313,
62,
5231,
286,
1077,
293,
284,
3017,
16997,
49,
66,
486,
1499,
7793,
1830,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_relative_path_fork() {
assert_eq!(
calculate_relative_path(
"/a1/a2/a3/a4/a5/a6/a7/c",
"/a1/a2/a3/b1/a5/a6/a7/c"
), "../../../../a4/a5/a6/a7/c".to_string()
);
} | rust_cleaned_test_functions.jsonl/19997 | {
"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,
24005,
11207,
29286,
2638,
761,
669,
368,
341,
286,
2060,
10714,
33673,
310,
11047,
29286,
2638,
1006,
394,
3521,
64,
16,
14186,
17,
14186,
18,
14186,
19,
14186,
20,
14186,
21,
14186,
22,
2899,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_method() {
#[derive(Debug, Template)]
#[template_inline = "x: {{ self.x() }}"]
struct MyTemplate;
impl MyTemplate {
fn x(&self) -> i32 {
12
}
}
assert_render!(MyTemplate, "x: 12");
} | rust_cleaned_test_functions.jsonl/110463 | {
"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,
9032,
368,
341,
262,
11506,
27098,
42618,
11,
14355,
5563,
262,
11506,
4214,
41871,
284,
330,
87,
25,
5867,
656,
1993,
368,
3869,
7026,
262,
2036,
3017,
7275,
401,
262,
11605,
3017,
7275,
341,
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_deploy() -> Result<(), Box<dyn std::error::Error>> {
let giver_abi_name = "tests/samples/giver.abi.json";
let wallet_tvc = "tests/samples/wallet.tvc";
let wallet_abi = "tests/samples/wallet.abi.json";
let key_path = "tests/deploy_test.key";
let mut cmd = Command::cargo_bin(B... | rust_cleaned_test_functions.jsonl/118319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1029
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91890,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
94515,
22885,
72,
1269,
284,
330,
23841,
2687,
4023,
4846,
1524,
22048,
72,
4323,
876,
262,
1077,
15085... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create() {
// Check this fixed: <https://github.com/Phala-Network/phala-blockchain/issues/285>
new_test_ext().execute_with(|| {
set_block_1();
assert_ok!(PhalaStakePool::create(Origin::signed(1)));
assert_ok!(PhalaStakePool::create(Origin::signed(1)));
PhalaStakePool::on_fi... | rust_cleaned_test_functions.jsonl/60458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
368,
341,
298,
197,
322,
4248,
419,
8356,
25,
366,
2428,
1110,
5204,
905,
14,
3357,
6053,
11250,
2349,
89021,
6053,
9425,
8819,
38745,
14,
17,
23,
20,
397,
298,
8638,
4452,
9927,
1005,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_or_update() {
let mutation = insert_or_update(
"Guild",
&["GuildId", "UserId", "UpdatedAt"],
&[&"1", &"2", &CommitTimestamp::new()],
);
match mutation.operation.unwrap() {
v1::mutation::Operation::InsertOrUpdate(mut w... | rust_cleaned_test_functions.jsonl/132334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
8734,
8882,
368,
341,
286,
1077,
26374,
284,
5656,
8734,
8882,
1006,
310,
330,
72574,
756,
310,
609,
1183,
72574,
764,
497,
330,
13504,
497,
330,
72279,
8097,
310,
44590,
5,
1,
16,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ulong_method() {
let hdr = indoc! {"
class A {
public:
A() {};
unsigned long daft(unsigned long a) const { return a; }
};
"};
let rs = quote! {
let a = ffi::A::make_unique();
assert_eq!(a.as_ref().unwrap().daft(autocxx::c_ulong(34)), au... | rust_cleaned_test_functions.jsonl/9847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72288,
9032,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
536,
362,
341,
286,
584,
510,
286,
362,
368,
9321,
286,
3774,
1293,
2994,
723,
12266,
1293,
264,
8,
733,
314,
470,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_geojson_from_reader() {
let json_str = r#"{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [102.0, 0.5]
},
"properties": null
}"#;
let g1 = GeoJson::from_reader(json... | rust_cleaned_test_functions.jsonl/95319 | {
"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,
60308,
2236,
5673,
22306,
368,
341,
286,
1077,
2951,
2895,
284,
435,
55543,
515,
310,
330,
1313,
788,
330,
13859,
756,
310,
330,
15281,
788,
341,
503,
330,
1313,
788,
330,
2609,
756,
503,
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_constructor() {
let _ = PluginParameter::new(
Default::default(),
"".to_string(),
"".to_string(),
false,
(0.0, 0.0),
Default::default(),
0,
);
} | rust_cleaned_test_functions.jsonl/130976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66210,
368,
341,
286,
1077,
716,
284,
21245,
4971,
486,
931,
1006,
310,
7899,
486,
2258,
3148,
310,
44907,
983,
3904,
3148,
310,
44907,
983,
3904,
3148,
310,
895,
345,
310,
320,
15,
13,
15,
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_namespace_transforms_cycle() {
let vw_map_string = r#"
A,featureA
B,featureB,f32
C,featureC,f32
"#;
let vw = VwNamespaceMap::new(vw_map_string).unwrap();
{
// Now create a cycle
let mut nstp = NamespaceTransformsParser::new();
let re... | rust_cleaned_test_functions.jsonl/76591 | {
"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,
41571,
18449,
82,
39079,
368,
341,
286,
1077,
74086,
5376,
3904,
284,
435,
2,
698,
32,
11,
12753,
32,
198,
33,
11,
12753,
33,
17077,
18,
17,
198,
34,
11,
12753,
34,
17077,
18,
17,
198,
57676... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consensus_outbound_rpc() {
let (network_reqs_tx, mut network_reqs_rx) = channel::new_test(8);
let mut sender = ConsensusNetworkSender::new(network_reqs_tx);
// send get_block rpc request
let peer_id = PeerId::random();
let req_msg = RequestBlock::default(... | rust_cleaned_test_functions.jsonl/41811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 888
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
13626,
6068,
10891,
60799,
368,
341,
286,
1077,
320,
17511,
17644,
82,
17805,
11,
5206,
3922,
17644,
82,
24330,
8,
284,
5496,
486,
931,
4452,
7,
23,
317,
286,
1077,
5206,
4646,
284,
7292,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_close_always_ok() -> Result<()> {
let db = checked_memory_handle();
// TODO: prepare a query but not execute it
db.close().unwrap();
Ok(())
} | rust_cleaned_test_functions.jsonl/113048 | {
"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,
12704,
8418,
2284,
19817,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
1428,
286,
442,
5343,
25,
10549,
264,
3239,
714,
537,
9026,
432,
271,
286,
2927,
4653,
1005,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_get_bookmarks_from_html() {
let testdata: Vec<Bookmark> = vec![
(Bookmark {
id: 1,
title: "GitHub".to_string(),
url: "https://github.com".to_string(),
tags: vec!["Git".to_string(), "Hosting Service".to_string(), ... | rust_cleaned_test_functions.jsonl/108582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 704
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
26421,
15544,
5673,
9564,
368,
341,
286,
1077,
1273,
691,
25,
11312,
58037,
3987,
29,
284,
7486,
90515,
310,
320,
72228,
341,
394,
877,
25,
220,
16,
345,
394,
2265,
25,
330,
75615,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encode_decode_assigned_topic_spec() {
let partition_map: PartitionMaps = vec![PartitionMap {
id: 0,
replicas: vec![5001, 5002],
}]
.into();
let topic_spec = ReplicaSpec::Assigned(partition_map);
let mut dest = vec![];
// te... | rust_cleaned_test_functions.jsonl/79998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 817
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
15227,
85515,
31414,
13594,
368,
341,
286,
1077,
16658,
5376,
25,
54626,
36562,
284,
7486,
20703,
49978,
2227,
341,
310,
877,
25,
220,
15,
345,
310,
80801,
25,
7486,
20703,
20,
15,
15,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bytes_reflow_works_for_this_real_case() {
let s = vec![
99, 112, 117, 32, 48, 32, 112, 108, 97, 121, 101, 100, 32, 97, 110, 32, 65, 99, 101,
32, 111, 102, 32, 104, 101, 97, 114, 116, 115,
];
let width = 28;
let reflowed = bytes_refl... | rust_cleaned_test_functions.jsonl/61824 | {
"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,
12524,
7793,
10303,
11498,
82,
5478,
24868,
15266,
19096,
368,
972,
286,
1077,
274,
284,
7486,
20703,
319,
310,
220,
24,
24,
11,
220,
16,
16,
17,
11,
220,
16,
16,
22,
11,
220,
18,
17,
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_mul() {
assert_eq!(
parse("Mul RX1 RX4").unwrap().body,
vec![Node(
Statement::Operator(Node(
Operator::Mul(
Node(RegisterRef::User(1), span(1, 5, 1, 8)),
Node(
... | rust_cleaned_test_functions.jsonl/118220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 522
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
445,
59155,
28170,
16,
28170,
19,
1827,
15454,
1005,
2599,
345,
310,
7486,
20703,
1955,
1006,
394,
21756,
486,
18461,
22078,
1006,
503,
28498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_known_release() {
let release = new_test_release();
let mut server = new_test_server(|| 42);
let client_ip = Ipv4Addr::new(192, 168, 1, 2);
server.pool.allocate_addr(client_ip);
let client_mac = [0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF];
l... | rust_cleaned_test_functions.jsonl/61737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6615,
71690,
24577,
368,
341,
286,
1077,
4879,
284,
501,
4452,
24577,
543,
286,
1077,
5206,
3538,
284,
501,
4452,
12015,
79453,
220,
19,
17,
317,
286,
1077,
2943,
10385,
284,
358,
30168,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.