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_strings() {
assert_parses("f(\"\",\"\")");
assert_parses("f(\"\")");
assert_parses("(\"\")");
assert_parses("f('','')");
assert_parses("f('')");
assert_parses("('')");
} | rust_cleaned_test_functions.jsonl/7972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33500,
368,
341,
262,
2060,
77113,
288,
445,
69,
36014,
16215,
22245,
899,
797,
262,
2060,
77113,
288,
445,
69,
7,
22245,
899,
797,
262,
2060,
77113,
288,
31732,
22245,
899,
797,
262,
2060,
7711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_capacity() {
let mut ll = LinkedList::<u8>::with_capacity(2);
assert_eq!(ll.len(), 0);
assert_eq!(ll.capacity(), 2);
for _ in 0..5 {
ll.push_head(11);
}
assert_eq!(ll.len(), 5);
assert_eq!(ll.capacity(), 8);
//now add an... | rust_cleaned_test_functions.jsonl/59887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 534
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35603,
368,
341,
286,
1077,
5206,
9323,
284,
22917,
27638,
84,
23,
6831,
4197,
35603,
7,
17,
317,
286,
2060,
10714,
10297,
654,
19406,
1507,
220,
15,
317,
286,
2060,
10714,
10297,
654,
59168,
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... | 5 |
#[test]
fn test_functionality() -> Result<()> {
use p256::NistP256;
#[cfg(feature = "ristretto255")]
{
use crate::Ristretto255;
verifiable_retrieval::<Ristretto255>();
verifiable_bad_public_key::<Ristretto255>();
zeroize_verifiable_clien... | rust_cleaned_test_functions.jsonl/78626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
2719,
368,
1464,
5714,
71698,
341,
286,
990,
281,
17,
20,
21,
486,
45,
380,
47,
17,
20,
21,
401,
286,
11506,
14072,
27062,
284,
330,
2819,
2122,
983,
17,
20,
20,
5422,
286,
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... | 1 |
#[test]
fn test_chacha() {
let cipher = botan::Cipher::new("ChaCha20", botan::CipherDirection::Encrypt).unwrap();
assert_eq!(cipher.tag_length(), 0);
let key_spec = cipher.key_spec().unwrap();
assert!(key_spec.is_valid_keylength(0) == false);
assert!(key_spec.is_valid_keylength(16));
... | rust_cleaned_test_functions.jsonl/95291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
51576,
368,
341,
262,
1077,
31088,
284,
10924,
276,
486,
79460,
486,
931,
445,
95971,
95971,
17,
15,
497,
10924,
276,
486,
79460,
9268,
486,
61520,
568,
15454,
1428,
262,
2060,
10714,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ipv4_fragment_not_multiple_of_offset_unit() {
let mut ctx = DummyContext::default();
let fragment_id = 0;
assert_eq!(ctx.get_state_mut().cache_size, 0);
// Test that fragment bodies must be a multiple of
// Process fragment #0
process_ip... | rust_cleaned_test_functions.jsonl/22027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
19,
43012,
7913,
45233,
3575,
6917,
14832,
368,
341,
286,
1077,
5206,
5635,
284,
50567,
1972,
486,
2258,
543,
286,
1077,
12289,
842,
284,
220,
15,
401,
286,
2060,
10714,
10297,
3773,
670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_if_let_with_match_available_range_left() {
check_assist_not_applicable(
replace_if_let_with_match,
r#"
impl VariantData {
pub fn foo(&self) {
$0 if let VariantData::Struct(..) = *self {
self.foo();
}
}
}
"#,
)
} | rust_cleaned_test_functions.jsonl/32541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
62,
1149,
6615,
10708,
26962,
9698,
9579,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
8290,
11119,
62,
1149,
6615,
10708,
345,
310,
435,
2,
698,
6383,
39292,
1043,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mixed_mode() {
let a_rsne = make_rsne(
Some(cipher::CCMP_128),
vec![cipher::CCMP_128, cipher::TKIP],
vec![akm::PSK, akm::FT_PSK],
);
assert_eq!(is_rsn_compatible(&a_rsne), true);
let s_rsne = derive_s_rsne(&a_rsne).unwrap();
... | rust_cleaned_test_functions.jsonl/113754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
3286,
7302,
368,
341,
286,
1077,
264,
47115,
811,
284,
1281,
47115,
811,
1006,
310,
4329,
1337,
10558,
486,
3706,
5781,
62,
16,
17,
23,
1326,
310,
7486,
20703,
67586,
486,
3706,
5781,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_for_destructoring_ref_tuple() {
let v = [
((('a',), NotClonable('b')), &'c'),
((('d',), NotClonable('e')), &'f'),
((('g',), NotClonable('h')), &'i'),
];
let t = ForDestructoringRefTupleTemplate { v: &v };
assert_eq!(t.render().unwrap(), "abc-def-ghi-");
} | rust_cleaned_test_functions.jsonl/24302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
2259,
3086,
287,
7793,
21773,
368,
341,
262,
1077,
348,
284,
2278,
286,
1781,
492,
64,
516,
701,
2806,
5066,
263,
480,
492,
65,
46259,
30136,
66,
3299,
286,
1781,
492,
67,
516,
701,
2806... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
assert_eq!(
Variant::VSingle(1.1).plus(Variant::VSingle(2.4)).unwrap(),
Variant::VSingle(3.5)
);
} | rust_cleaned_test_functions.jsonl/84528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
368,
341,
394,
2060,
10714,
33673,
503,
39292,
486,
53,
10888,
7,
16,
13,
16,
568,
7138,
12410,
15341,
486,
53,
10888,
7,
17,
13,
19,
4579,
15454,
3148,
503,
39292,
486,
53,
10888,
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 |
#[test]
fn test_3XNN() {
// 0x3XNN - Skip the following instruction if the value of register VX equals NN
let opcode = 0x3456;
let mut vm = get_vm();
//not equal
vm.program_counter = 0x0;
vm.execute_instruction(decode_opcode(opcode), opcode);
assert_eq!(vm.program_counter, 0x0);
... | rust_cleaned_test_functions.jsonl/243 | {
"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,
62,
18,
55,
9745,
368,
341,
262,
442,
220,
15,
87,
18,
55,
9745,
481,
25784,
279,
2701,
7600,
421,
279,
897,
315,
4161,
78177,
16819,
44678,
271,
262,
1077,
30028,
284,
220,
15,
87,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatch_with_inform_returns_ack() {
let inform = new_test_inform();
let mut server = new_test_server(|| 42);
let got = server.dispatch(inform).unwrap();
let want = new_test_inform_ack();
assert_eq!(got, want, "expected: {:?}\ngot: {:?}", want, got);
... | rust_cleaned_test_functions.jsonl/61739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6615,
1243,
627,
58900,
48447,
368,
341,
286,
1077,
6051,
284,
501,
4452,
1243,
627,
543,
286,
1077,
5206,
3538,
284,
501,
4452,
12015,
79453,
220,
19,
17,
626,
286,
1077,
2684,
284,
3538... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_burn_one() {
let mut contract = TestContract::new();
let ali_pk = PublicKey::ed25519_from_bytes([3u8; 32]).unwrap();
let ali: Key = ali_pk.to_account_hash().into();
let token_to_burn = "a".to_string();
let tokens_to_remain = vec!["c".to_string(), "d".to_string(), "e".to_strin... | rust_cleaned_test_functions.jsonl/122726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
399,
11667,
368,
341,
262,
1077,
5206,
5116,
284,
3393,
14067,
486,
931,
543,
262,
1077,
18991,
33321,
284,
70280,
486,
291,
17,
20,
20,
16,
24,
5673,
12524,
2561,
18,
84,
23,
26,
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... | 2 |
#[test]
fn test_max_kdf_size() {
let max_kdf_size = ScryptKDF::max_kdf_size();
assert_eq!(max_kdf_size, MAX_KDF_SIZE);
} | rust_cleaned_test_functions.jsonl/31979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
4698,
2940,
2368,
368,
341,
286,
1077,
1932,
4698,
2940,
2368,
284,
2463,
3571,
42,
5262,
486,
2810,
4698,
2940,
2368,
543,
286,
2060,
10714,
10297,
2810,
4698,
2940,
2368,
11,
8334,
10102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_saturating() {
let a = PrimitiveArray::from([Some(11111i128), Some(11100i128), None, Some(22200i128)])
.to(DataType::Decimal(5, 2));
let b = PrimitiveArray::from([Some(22222i128), Some(22200i128), None, Some(11100i128)])
.to(DataType::Decimal(5, 2));
... | rust_cleaned_test_functions.jsonl/6876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
643,
2628,
1095,
368,
341,
286,
1077,
264,
284,
51460,
1857,
486,
1499,
2561,
8373,
7,
16,
16,
16,
16,
16,
72,
16,
17,
23,
701,
4329,
7,
16,
16,
16,
15,
15,
72,
16,
17,
23,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assign() {
let mut puzzle = Puzzle::new();
let v0 = puzzle.new_var_with_candidates(&[1]);
let v1 = puzzle.new_var_with_candidates(&[1,2,3]);
puzzle.equals(v0 + v1, 4);
let search = puzzle.step().expect("contradiction");
assert_eq!(search[v0], 1);... | rust_cleaned_test_functions.jsonl/73198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
368,
341,
286,
1077,
5206,
24626,
284,
60012,
486,
931,
543,
286,
1077,
348,
15,
284,
24626,
4618,
4612,
6615,
73553,
2099,
58,
16,
2558,
286,
1077,
348,
16,
284,
24626,
4618,
4612,
6615,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int_to_ipv6() {
let a = Ipv6Addr::new(0x1122, 0x3344, 0x5566, 0x7788, 0x99aa, 0xbbcc, 0xddee, 0xff11);
assert_eq!(Ipv6Addr::from(0x112233445566778899aabbccddeeff11u128), a);
} | rust_cleaned_test_functions.jsonl/8038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
2346,
49378,
21,
368,
341,
262,
1077,
264,
284,
358,
30168,
21,
13986,
486,
931,
7,
15,
87,
16,
16,
17,
17,
11,
220,
15,
87,
18,
18,
19,
19,
11,
220,
15,
87,
20,
20,
21,
21,
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_handle_batch_burn_from() {
let (init_result, mut deps) = init_helper_with_config(
vec![
InitialBalance {
address: HumanAddr("bob".to_string()),
amount: Uint128(10000),
},
InitialBalance {
... | rust_cleaned_test_functions.jsonl/69610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
14534,
880,
399,
5673,
368,
341,
286,
1077,
320,
2327,
5287,
11,
5206,
48178,
8,
284,
2930,
10418,
6615,
5332,
1006,
310,
7486,
90515,
394,
4127,
21190,
341,
503,
2621,
25,
11097,
13986,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sgx() {
let mut focal = UbuntuDiskConfig::new(FOCAL_SGX_IMAGE_NAME.to_string());
let guest = Guest::new(&mut focal);
let mut workload_path = dirs::home_dir().unwrap();
workload_path.push("workloads");
let mut kernel_path = workload_pat... | rust_cleaned_test_functions.jsonl/23995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
59957,
368,
341,
310,
1077,
5206,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
1098,
84432,
19121,
4708,
2389,
3904,
1423,
310,
1077,
8640,
284,
26215,
486,
931,
2099,
6984,
4109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_last() {
let mut m = list_from(&[0,1,2,3,4,5]);
assert_eq!(m.last().unwrap(), &5);
m = ImmutSList::new();
assert_eq!(m.last(), None);
} | rust_cleaned_test_functions.jsonl/64460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12195,
368,
341,
286,
1077,
5206,
296,
284,
1140,
5673,
2099,
58,
15,
11,
16,
11,
17,
11,
18,
11,
19,
11,
20,
2558,
286,
2060,
10714,
10297,
76,
9110,
1005,
15454,
1507,
609,
20,
626,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ecdsa_adaptor_signature_recover_from_high_s_signature() {
let encryption_key = "02042537e913ad74c4bbd8da9607ad3b9cb297d08e014afc51133083f1bd687a62"
.parse()
.unwrap();
let adaptor_sig: EcdsaAdaptorSignature = "032c637cd797dd8c2ce261907ed43e82d6d1a48cbabbbe... | rust_cleaned_test_functions.jsonl/62237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
10027,
32657,
39859,
1288,
3688,
5673,
22680,
643,
39859,
368,
341,
286,
1077,
25463,
3097,
284,
330,
15,
17,
15,
19,
17,
20,
18,
22,
68,
24,
16,
18,
329,
22,
19,
66,
19,
6066,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_text() {
assert!(matches!(
EmbedBuilder::new().footer(EmbedFooterBuilder::new("")).build().unwrap_err().kind(),
EmbedErrorType::FooterTextEmpty { text }
if text.is_empty()
));
let too_long_len = EmbedBuilder::FOOTER_TEXT_LENGTH_LIMIT + ... | rust_cleaned_test_functions.jsonl/25441 | {
"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,
4326,
368,
341,
286,
2060,
10297,
19914,
33673,
310,
37068,
3297,
486,
931,
1005,
6956,
7,
25486,
19445,
3297,
486,
931,
445,
15197,
5834,
1005,
15454,
9266,
1005,
15314,
3148,
310,
37068,
1454,
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_rpc_request() {
// \"0x68687474703a2f2f3134312e3136342e35382e3234313a35353636\"]}"
// Try title : Vec<u8> encode 746172652d6f63773a3a70726963655f726571756573745f646f6d61696e
// Try body : Vec<u8> encode 68687474703a2f2f3134312e3136342e35382e3234313a35353636
// ... | rust_cleaned_test_functions.jsonl/35135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
7893,
368,
341,
11120,
197,
322,
7245,
15,
87,
21,
23,
21,
23,
22,
19,
22,
19,
22,
15,
18,
64,
17,
69,
17,
69,
18,
16,
18,
19,
18,
16,
17,
68,
18,
16,
18,
21,
18,
19,
17,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_array_get_value_index_out_of_bound() {
let values: [u8; 12] = [
b'h', b'e', b'l', b'l', b'o', b'p', b'a', b'r', b'q', b'u', b'e', b't',
];
let offsets: [i32; 4] = [0, 5, 5, 12];
let array_data = ArrayData::builder(DataType::Utf8)
.le... | rust_cleaned_test_functions.jsonl/19355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
3858,
3062,
3142,
3560,
6068,
3575,
19447,
368,
341,
286,
1077,
2750,
25,
508,
84,
23,
26,
220,
16,
17,
60,
284,
2278,
310,
293,
38882,
516,
293,
47868,
516,
293,
63866,
516,
293,
63866... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_srv_encode() {
let srv_bin = vec![
0x00, 0x0a, 0x00, 0x01, 0x1f, 0x90, 0x03, 0x66, 0x74, 0x70, 0x0c, 0x7a, 0x68, 0x61,
0x6e, 0x67, 0x6d, 0x69, 0x6e, 0x67, 0x6b, 0x61, 0x69, 0x02, 0x63, 0x6e, 0x00,
];
let srv_record = DnsTypeSRV::from_str("10 1 8080... | rust_cleaned_test_functions.jsonl/63629 | {
"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,
63921,
11224,
368,
341,
286,
1077,
43578,
21816,
284,
7486,
90515,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
64,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_config() {
let f = File::open("testdata/basic-parse.conf").unwrap();
let config = Config::from_toml_read(f).unwrap();
assert_eq!(*BASIC_PARSER_CHECK, config);
} | rust_cleaned_test_functions.jsonl/15730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5332,
368,
341,
262,
1077,
282,
284,
2887,
486,
2508,
445,
92425,
77909,
85382,
13937,
1827,
15454,
543,
262,
1077,
2193,
284,
5532,
486,
1499,
528,
316,
75,
6443,
955,
568,
15454,
543,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_mut_exact_chunks() {
let mut v = [0, 1, 2, 3, 4, 5, 6];
assert_eq!(v.exact_chunks_mut(2).len(), 3);
for (i, chunk) in v.exact_chunks_mut(3).enumerate() {
for x in chunk {
*x = i as u8;
}
}
let result = [0, 0, 0, 1, 1, 1, 6];
assert_eq!(v, resul... | rust_cleaned_test_functions.jsonl/73394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
71084,
65470,
368,
341,
262,
1077,
5206,
348,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
262,
2060,
10714,
10297,
85,
2223,
531... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wpa2_get_auth_method() {
let bss = fake_bss!(Wpa2);
let credential = fidl_sme::Credential::Psk(vec![0xAA; 32]);
let protection = get_wpa2_rsna(&fake_device_info(CLIENT_ADDR), &credential, &bss)
.expect("expected successful RSNA with valid PSK");
assert... | rust_cleaned_test_functions.jsonl/6067 | {
"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,
1670,
6595,
17,
3062,
14014,
9032,
368,
341,
286,
1077,
293,
778,
284,
12418,
880,
778,
10297,
54,
6595,
17,
317,
286,
1077,
40207,
284,
32104,
75,
643,
2660,
486,
48265,
486,
47,
4886,
25592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_claim_neuron_without_minimum_stake_fails() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
let memo = 1234u64;
let stake = Tokens::from_e8s(50000000u64);
let (_, mut gov, _) = governance_with_staked_unclaimed_neuron(&owner, memo, stake);
let manage_neuron_response = gov
... | rust_cleaned_test_functions.jsonl/1146 | {
"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,
84969,
13925,
36090,
39904,
84855,
1261,
726,
761,
6209,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
1077,
21438,
284,
220,
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_from_ipv4() {
let ip = IpAddr::V4(Ipv4Addr::new(26, 3, 0, 103));
let name = Name::from_str("103.0.3.26.in-addr.arpa").unwrap();
assert_eq!(Into::<Name>::into(ip), name);
} | rust_cleaned_test_functions.jsonl/38215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
49378,
19,
368,
341,
286,
1077,
5997,
284,
35033,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
17,
21,
11,
220,
18,
11,
220,
15,
11,
220,
16,
15,
18,
1106,
286,
1077,
829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deep_clone_array() {
let mut builder = UInt32Array::builder(1000);
builder.append_slice(&[1, 2, 3, 4, 5, 6]).unwrap();
let array: ArrayRef = Arc::new(builder.finish());
assert_eq!(array.len(), 6);
let sliced = array.slice(0, 2);
assert_eq!(sliced.... | rust_cleaned_test_functions.jsonl/30626 | {
"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,
87044,
54742,
3858,
368,
341,
286,
1077,
5206,
7363,
284,
22275,
18,
17,
1857,
486,
17850,
7,
16,
15,
15,
15,
317,
286,
7363,
2057,
26488,
2099,
58,
16,
11,
220,
17,
11,
220,
18,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repo_clone() {
let tmpdir = setup("git_repo_clone");
let repo1 = tmpdir.mash("repo1");
let repo2 = tmpdir.mash("repo2");
let repo1file = repo1.mash("README.md");
let repo2file = repo2.mash("README.md");
assert!(sys::remove_all(&tmpdir).is_ok());
... | rust_cleaned_test_functions.jsonl/114246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37784,
54742,
368,
341,
286,
1077,
4174,
3741,
284,
6505,
445,
12882,
37784,
54742,
797,
286,
1077,
15867,
16,
284,
4174,
3741,
744,
988,
445,
23476,
16,
797,
286,
1077,
15867,
17,
284,
4174,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exclude_mail() {
let filter = Filter {
exclude_mail: true,
..Filter::default()
};
assert!(filter.is_excluded(&mail("mail@example.org")));
assert!(filter.is_excluded(&mail("foo@bar.dev")));
assert!(!filter.is_excluded(&website("http... | rust_cleaned_test_functions.jsonl/65566 | {
"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,
88668,
25176,
368,
341,
286,
1077,
4051,
284,
12339,
341,
310,
21687,
25176,
25,
830,
345,
310,
5241,
5632,
486,
2258,
741,
286,
3634,
286,
2060,
10297,
5315,
2079,
2702,
10181,
2099,
3711,
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_find_index_of_next_word() {
let test_cases: Vec<(usize, usize)> = vec![
// const STATUS_FG_COLOR
(0, 6),
// const STATUS_FG_COLOR: color::Rgb
(6, 21),
// const STATUS_FG_COLOR: color::Rgb
(21, 23),
// const ST... | rust_cleaned_test_functions.jsonl/52835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
3560,
3575,
11257,
13533,
368,
341,
262,
1077,
1273,
41427,
25,
11312,
28706,
51878,
11,
22301,
16018,
284,
7486,
90515,
286,
442,
733,
24014,
1400,
38,
14471,
8945,
286,
320,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_set_flags_3() {
let (flags, rest) =
set_flags(svec!["deno", "-r", "--deps", "script.ts", "--allow-write"])
.unwrap();
assert_eq!(rest, svec!["deno", "script.ts"]);
assert_eq!(
flags,
DenoFlags {
reload: true,
allow_write: true,
deps_flag: true,
..D... | rust_cleaned_test_functions.jsonl/110198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
14130,
62,
18,
368,
341,
220,
1077,
320,
11161,
11,
2732,
8,
4035,
262,
738,
14130,
1141,
4083,
0,
1183,
5183,
78,
497,
6523,
81,
497,
14482,
72587,
497,
330,
2282,
21288,
497,
14482,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_realtime_stream_integer_offset_sample_and_hold() {
let spec = "
output a @3Hz := 0
output a_offset := a[-1].defaults(to: 0)
output b @2Hz := b[-1].defaults(to: 0) + a_offset.hold().defaults(to: 0)
";
// workaround using sample and hold
... | rust_cleaned_test_functions.jsonl/110728 | {
"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,
15266,
1678,
12673,
31725,
6917,
17491,
8378,
65824,
368,
341,
286,
1077,
1398,
284,
6228,
310,
2550,
264,
569,
18,
11475,
1669,
220,
15,
198,
310,
2550,
264,
6917,
1669,
264,
7609,
16,
936,
267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut buf = BytesMut::from("GET /test HTTP/1.1\r\n\r\n");
let settings = WorkerSettings::<HttpApplication>::new(Vec::new(), KeepAlive::Os);
let mut reader = H1Decoder::new();
match reader.decode(&mut buf, &settings) {
Ok(Some(msg)) => {
... | rust_cleaned_test_functions.jsonl/110379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
445,
3806,
608,
1944,
10130,
14,
16,
13,
16,
12016,
1699,
12016,
1699,
797,
286,
1077,
5003,
284,
33086,
6086,
27638,
2905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_base_for_char() {
assert_eq!(char::from(Base::A), 'A');
assert_eq!(char::from(Base::C), 'C');
assert_eq!(char::from(Base::G), 'G');
assert_eq!(char::from(Base::T), 'T');
assert_eq!(char::from(Base::N), 'N');
} | rust_cleaned_test_functions.jsonl/26312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
7651,
5478,
9232,
368,
341,
286,
2060,
10714,
10297,
1762,
486,
1499,
22225,
486,
32,
701,
364,
32,
1157,
286,
2060,
10714,
10297,
1762,
486,
1499,
22225,
486,
34,
701,
364,
34,
1157,
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_is_dot_dir() {
let dirname = ".";
assert!(FileUtil::is_dot_dir(dirname));
let dirname = "./";
assert!(FileUtil::is_dot_dir(dirname));
let dirname = "..";
assert!(FileUtil::is_dot_dir(dirname));
let dirname = "../";
assert!(FileUtil:... | rust_cleaned_test_functions.jsonl/94431 | {
"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,
6892,
30941,
4334,
368,
341,
286,
1077,
29908,
284,
91223,
286,
2060,
10297,
1703,
2742,
486,
285,
30941,
4334,
38802,
1106,
286,
1077,
29908,
284,
5924,
876,
286,
2060,
10297,
1703,
2742,
486,
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_write_response() {
let mut response = Response::new(Version::Http10, StatusCode::OK);
let body = "This is a test";
response.set_body(Body::new(body));
response.set_content_type(MediaType::PlainText);
assert!(response.status() == StatusCode::OK);
a... | rust_cleaned_test_functions.jsonl/33879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 832
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
9655,
368,
341,
286,
1077,
5206,
2033,
284,
5949,
486,
931,
7,
5637,
486,
2905,
16,
15,
11,
53403,
486,
3925,
317,
286,
1077,
2487,
284,
330,
1986,
374,
264,
1273,
876,
286,
2033,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exact_chunks_remainder() {
let v: &[i32] = &[0, 1, 2, 3, 4];
let c = v.exact_chunks(2);
assert_eq!(c.remainder(), &[4]);
} | rust_cleaned_test_functions.jsonl/8452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71084,
65470,
86607,
1107,
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,
935,
262,
1077,
272,
284,
348,
2223,
531... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_range_from_take_collect() {
let v: Vec<_> = (0..).take(3).collect();
assert_eq!(v, vec![0, 1, 2]);
} | rust_cleaned_test_functions.jsonl/54154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
5673,
73261,
68140,
368,
341,
262,
1077,
348,
25,
11312,
32399,
29,
284,
320,
15,
496,
568,
22769,
7,
18,
568,
17384,
543,
262,
2060,
10714,
10297,
85,
11,
7486,
20703,
15,
11,
220,
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 |
#[test]
fn test_multi_packet() {
let (mut encoder, mut decoder) =
new_optional_multi_packet_codec::<Vec<BinSafeStr>, RespVec>();
let mut buf = BytesMut::new();
let cmd = OptionalMulti::Multi(vec![vec![b"PING1".to_vec()], vec![b"PING2".to_vec()]]);
encoder
... | rust_cleaned_test_functions.jsonl/42453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
21078,
368,
341,
286,
1077,
320,
6984,
23668,
11,
5206,
24551,
8,
4035,
310,
501,
74644,
25133,
21078,
51084,
27638,
10050,
27,
28794,
25663,
2580,
8066,
79786,
10050,
3913,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_completed_data_ranges() {
let completed_data_end_indexes = [2, 4, 9, 11].iter().copied().collect();
let start_index = 0;
let consumed = 1;
assert_eq!(
Blockstore::get_completed_data_ranges(
start_index,
&co... | rust_cleaned_test_functions.jsonl/11705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
49068,
1769,
58748,
368,
341,
286,
1077,
8145,
1769,
6213,
50161,
284,
508,
17,
11,
220,
19,
11,
220,
24,
11,
220,
16,
16,
936,
2015,
1005,
37728,
1122,
1005,
17384,
1428,
1789,
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... | 3 |
#[test]
fn test_overload_method_in_super_class() {
errors(
"open class A { fun f() {} }
class B: A { fun f(a: int) {} }",
&[
(pos(2, 26), Msg::MissingOverride("f".into())),
(pos(2, 26), Msg::MethodNotOverridable("f".into())),
... | rust_cleaned_test_functions.jsonl/75950 | {
"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,
15431,
1078,
9032,
1243,
38886,
4790,
368,
341,
286,
5975,
1006,
310,
330,
2508,
536,
362,
314,
2464,
282,
368,
4687,
456,
310,
536,
425,
25,
362,
314,
2464,
282,
2877,
25,
526,
8,
4687,
335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is() {
let mut ctx = EvalPtr::new("123");
assert!(ctx.next_is('1'));
assert!(!ctx.next_is('2'));
let mut ctx = EvalPtr::new("");
assert!(!ctx.next_is('1'));
} | rust_cleaned_test_functions.jsonl/58899 | {
"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,
11257,
6892,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
5348,
486,
931,
445,
16,
17,
18,
797,
286,
2060,
10297,
3773,
4529,
6892,
492,
16,
6336,
286,
2060,
0,
3471,
3773,
4529,
6892,
492,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_matches_within_byte_range() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(language, "(identifier) @element").unwrap();
let source = "[a, b, c, d, e, f, g]";
let mut parser = Parser::new();
parser.s... | rust_cleaned_test_functions.jsonl/25177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
72385,
19737,
9698,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
60740,
11,
11993,
15909,
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... | 2 |
#[test]
fn test_uri_parse_error() {
fn err(s: &str) {
Uri::from_str(s).unwrap_err();
}
err("http://");
err("htt:p//host");
err("hyper.rs/");
err("hyper.rs?key=val");
err("?key=val");
err("localhost/");
err("localhost?key=val");
err("\0");
err("http://[::1");
... | rust_cleaned_test_functions.jsonl/29064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15572,
21039,
4096,
368,
341,
262,
5168,
1848,
1141,
25,
609,
495,
8,
341,
286,
17226,
486,
1499,
2895,
1141,
568,
15454,
9266,
543,
262,
555,
262,
1848,
445,
1254,
1110,
797,
262,
1848,
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_strip_ci_prefix() {
assert_eq!(
strip_ci_prefix("Topic:hello", "topic:"),
Some(String::from("hello"))
);
assert_eq!(
strip_ci_prefix("Topic: hello", "topic:"),
Some(String::from("hello"))
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/31456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66130,
43514,
13974,
368,
341,
286,
2060,
10714,
33673,
310,
13316,
43514,
13974,
445,
26406,
25,
14990,
497,
330,
16411,
25,
4461,
310,
4329,
2242,
486,
1499,
445,
14990,
5455,
286,
1439,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_uuid4_hex() {
let src_uuid = UUID4::random();
let uuid_hex = src_uuid.hex();
let uuid_parsed =
UUID4::parse(uuid_hex.as_str()).expect("should parse generated uuid correctly");
assert_eq!(src_uuid, uuid_parsed);
let uuid_parsed_hex = uuid... | rust_cleaned_test_functions.jsonl/7583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
25540,
19,
32655,
368,
341,
286,
1077,
2286,
25540,
284,
23698,
19,
486,
11463,
543,
286,
1077,
16040,
32655,
284,
2286,
25540,
45639,
543,
286,
1077,
16040,
75788,
4035,
310,
23698,
19,
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_benchmarks() {
new_test_ext().execute_with(|| {
assert_ok!(test_benchmark_remark::<Test>());
assert_ok!(test_benchmark_set_heap_pages::<Test>());
assert_ok!(test_benchmark_set_code_without_checks::<Test>());
assert_ok!(test_benchmark_set_changes_trie_config::<Test>());
assert_ok... | rust_cleaned_test_functions.jsonl/24682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
15544,
368,
341,
197,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
298,
6948,
19817,
10297,
1944,
880,
39381,
1288,
3987,
27638,
2271,
32872,
298,
6948,
19817,
10297,
1944,
880,
3938... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bpf_loader_upgradeable_set_upgrade_authority() {
let instruction = bincode::serialize(&UpgradeableLoaderInstruction::SetAuthority).unwrap();
let loader_id = bpf_loader_upgradeable::id();
let slot = 0;
let upgrade_authority_address = Pubkey::new_unique();
l... | rust_cleaned_test_functions.jsonl/3079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
15897,
22139,
67794,
480,
2602,
67794,
22938,
487,
368,
341,
286,
1077,
7600,
284,
9544,
1851,
486,
24166,
2099,
43861,
480,
9181,
16664,
486,
1649,
45532,
568,
15454,
543,
286,
1077,
16047,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_notification() {
let exit = Arc::new(AtomicBool::new(false));
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(100);
let bank = Bank::new_for_tests(&genesis_config);
let bank_forks = Arc::new(RwLock::new(BankForks::new(bank)));
... | rust_cleaned_test_functions.jsonl/55635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
34296,
368,
341,
286,
1077,
4869,
284,
19689,
486,
931,
7,
65857,
11233,
486,
931,
3576,
1106,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sonar_sweep_window() {
let file = read_file("input/day1.txt");
let input = clean_input(file.as_str());
let vec = input
.map(|l| l.parse::<u64>().unwrap())
.collect::<Vec<u64>>();
assert_eq!(sonar_sweep_window(vec), 1724);
} | rust_cleaned_test_functions.jsonl/16466 | {
"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,
643,
263,
277,
643,
48542,
12571,
368,
341,
286,
1077,
1034,
284,
1349,
2458,
445,
1355,
44739,
16,
3909,
797,
286,
1077,
1946,
284,
4240,
5898,
4866,
5357,
2895,
1423,
286,
1077,
7486,
284,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_t10() {
// Truncate
let (r, sioe) = do_execute!(&["-s", ".!"], super::IN_DAT_10);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(buff!(sioe, sout), "{\"foo\":{}}\n",);
assert_eq!(r.is_ok(), true);
let (r, sioe) = do_execute!(&["-s", "\"foo\... | rust_cleaned_test_functions.jsonl/118365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
16,
15,
368,
341,
286,
442,
1163,
26900,
198,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
12,
82,
497,
5933,
0,
7914,
2256,
486,
687,
36347,
62,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_compares() {
let x = "225.33543601344182".parse::<Decimal>().unwrap();
let y = Decimal::min_value();
assert!(x > y);
assert!(y < x);
assert_ne!(y, x);
} | rust_cleaned_test_functions.jsonl/35139 | {
"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,
7260,
18177,
5403,
368,
341,
262,
1077,
856,
284,
330,
17,
17,
20,
13,
18,
18,
20,
19,
18,
21,
15,
16,
18,
19,
19,
16,
23,
17,
3263,
6400,
27638,
11269,
10483,
15454,
543,
262,
1077,
379,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bootstrap_failed_if_jsonprc_and_api_configured_same_port_and_different_host() {
let runtime = tokio::runtime::Runtime::new().unwrap();
let context = runtime.block_on(new_test_context_async());
let mut cfg = NodeConfig::default();
cfg.randomize_ports();
// ... | rust_cleaned_test_functions.jsonl/659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88424,
35060,
11119,
9455,
649,
66,
8378,
11697,
5332,
3073,
33574,
8716,
8378,
82741,
12848,
368,
341,
286,
1077,
15592,
284,
9628,
815,
486,
22255,
486,
15123,
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,
1... | 1 |
#[test]
fn test_internal_key_encode_decode() {
let test_keys = ["", "k", "hello", "longggggggggggggggggggggg"];
let test_seqs = [
1,
2,
3,
(1u64 << 8) - 1,
1u64 << 8,
(1u64 << 8) + 1,
(1u64 << 16) - 1,
... | rust_cleaned_test_functions.jsonl/69364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23472,
3097,
11224,
15227,
368,
341,
286,
1077,
1273,
12631,
284,
4383,
497,
330,
74,
497,
330,
14990,
497,
330,
4825,
14398,
14398,
14398,
14398,
14398,
14398,
14398,
14398,
14398,
14398,
70,
6332,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_skip_serializing_tuple_struct() {
let a = 1;
assert_ser_tokens(
&SkipSerializingTupleStruct(&a, 2, 3),
&[
Token::TupleStruct {
name: "SkipSerializingTupleStruct",
len: 2,
},
Token::I8(1),
Toke... | rust_cleaned_test_functions.jsonl/59142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
25602,
4849,
21773,
15126,
368,
341,
262,
1077,
264,
284,
220,
16,
280,
262,
2060,
75861,
28838,
1006,
286,
609,
35134,
5915,
4849,
28681,
9422,
2099,
64,
11,
220,
17,
11,
220,
18,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_length() {
let cases = vec![
("", 0i64),
("你好", 6i64),
("TiKV", 4i64),
("あなたのことが好きです", 33i64),
("분산 데이터베이스", 25i64),
("россия в мире кубок", 38i64),
("قاعدة البيانات", 27i64),
];
let mut... | rust_cleaned_test_functions.jsonl/9082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5118,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
497,
220,
15,
72,
21,
19,
1326,
310,
3489,
108386,
497,
220,
21,
72,
21,
19,
1326,
310,
3489,
45351,
82707,
497,
220,
19,
72,
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... | 2 |
#[test]
fn test_ncomponents_err() {
let input = DatasetBase::from(Array::random((4, 4), Uniform::new(0.0, 1.0)));
let ica = FastIca::params().ncomponents(100);
let ica = ica.fit(&input);
assert!(ica.is_err());
} | rust_cleaned_test_functions.jsonl/5319 | {
"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,
1089,
5149,
9266,
368,
341,
286,
1077,
1946,
284,
39183,
3978,
486,
1499,
38192,
486,
11463,
1188,
19,
11,
220,
19,
701,
47889,
486,
931,
7,
15,
13,
15,
11,
220,
16,
13,
15,
4945,
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_phantom_data() {
struct Bar;
#[derive(PeekPoke)]
struct Foo {
x: u32,
y: u32,
_marker: PhantomData<Bar>,
}
assert_eq!(Foo::max_size(), 2 * size_of::<u32>())
} | rust_cleaned_test_functions.jsonl/24562 | {
"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,
9782,
30002,
1769,
368,
341,
262,
2036,
4716,
280,
262,
11506,
27098,
5304,
68,
1225,
47,
4740,
5563,
262,
2036,
33428,
341,
286,
856,
25,
575,
18,
17,
345,
286,
379,
25,
575,
18,
17,
345,
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_atom() {
let input = vec![Token::Integer(1)];
let stmt = parse(&input).unwrap();
assert_eq!(stmt, Stmt::Eval(integer_expr(1)));
} | rust_cleaned_test_functions.jsonl/55665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
42292,
368,
341,
1789,
286,
1077,
1946,
284,
7486,
20703,
3323,
486,
3486,
7,
16,
12587,
286,
1077,
20020,
284,
4715,
2099,
1355,
568,
15454,
543,
286,
2060,
10714,
10297,
9215,
11,
97023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_reflection_matrix() {
let root = to_ratio(array![[1, -1, 0, 0]]);
let expected = to_ratio(array![
[0, 1, 0, 0],
[1, 0, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]
]);
assert_eq!(reflection_matrix(&root), expected);
} | rust_cleaned_test_functions.jsonl/12043 | {
"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,
7793,
1170,
10193,
368,
341,
286,
1077,
3704,
284,
311,
19917,
6110,
0,
15505,
16,
11,
481,
16,
11,
220,
15,
11,
220,
15,
49854,
286,
1077,
3601,
284,
311,
19917,
6110,
90515,
310,
508,
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_u32_value() {
with_key!(key, "U32Value" => {
let name = "RustU32Val";
let val1 = 1_234_567_890u32;
key.set_value(name, &val1).unwrap();
let val2: u32 = key.get_value(name).unwrap();
assert_eq!(val1, val2);
});
} | rust_cleaned_test_functions.jsonl/128092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
18,
17,
3142,
368,
341,
262,
448,
3097,
10297,
792,
11,
330,
52,
18,
17,
1130,
1,
589,
341,
286,
1077,
829,
284,
330,
49,
590,
52,
18,
17,
2208,
876,
286,
1077,
1044,
16,
284,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_functions() {
let mut game = Game::new();
game.create_piece(1, 5, 0);
game.create_piece(0, 5, 16);
game.create_piece(0, 3, 7);
game.set_moves();
assert!(game.in_check(1));
assert!(game.in_checkmate(1));
} | rust_cleaned_test_functions.jsonl/120651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
31708,
368,
341,
286,
1077,
5206,
1809,
284,
4050,
486,
931,
543,
286,
1809,
2520,
48470,
7,
16,
11,
220,
20,
11,
220,
15,
317,
286,
1809,
2520,
48470,
7,
15,
11,
220,
20,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_provision_agent() {
init!("true");
let json_string = r#"{"agency_url":"https://enym-eagency.pdev.evernym.com","agency_did":"Ab8TvZa3Q19VNkQVzAWVL7","agency_verkey":"5LXaR43B1aQyeh94VBP8LG1Sgvjk7aNfqiksBCSjwqbf","wallet_name":"test_provision_agent","agent_seed":null,"enterprise_s... | rust_cleaned_test_functions.jsonl/112442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
13013,
25730,
368,
341,
286,
2930,
17223,
1866,
3071,
286,
1077,
2951,
3904,
284,
435,
55543,
4913,
55565,
2903,
3252,
2428,
1110,
268,
1600,
5655,
55565,
556,
3583,
1734,
423,
48121,
905,
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_mask2() {
let s = "000000000000000000000000000000X1001X";
let (mask, keep, mut addrs) = mask_part2(s);
let addr = 42;
for f in addrs.iter_mut() {
*f |= addr & mask | keep;
}
addrs.sort_unstable();
assert_eq!(addrs, vec![26, 27, ... | rust_cleaned_test_functions.jsonl/104566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9999,
17,
368,
341,
286,
1077,
274,
284,
330,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
55,
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... | 2 |
#[test]
fn test_halving_epoch_reward() {
let cellbase = TransactionBuilder::default()
.witness(Bytes::default())
.build();
let epoch_ext = build_genesis_epoch_ext(
capacity_bytes!(100),
DIFF_TWO,
GENESIS_EPOCH_LENGTH,
DEFAUL... | rust_cleaned_test_functions.jsonl/73438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52580,
4405,
20682,
38260,
368,
341,
286,
1077,
2779,
3152,
284,
17869,
3297,
486,
2258,
741,
310,
659,
86,
8091,
76423,
486,
2258,
2398,
310,
659,
5834,
543,
286,
1077,
16342,
9927,
284,
1936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_structs() {
let mut db = MerkleTree::new();
db.push(Person {
age: 3,
name: "Bob".to_string(),
});
db.push(Person {
age: 4,
name: "Bobb".to_string(),
});
db.push(Person {
a... | rust_cleaned_test_functions.jsonl/98837 | {
"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,
6615,
15126,
82,
368,
341,
262,
1077,
5206,
2927,
284,
8755,
23089,
6533,
486,
931,
543,
262,
2927,
2552,
58174,
341,
394,
4231,
25,
220,
18,
345,
394,
829,
25,
330,
32388,
3263,
983,
3904,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_changelog_mentions_version() {
version_sync::assert_contains_regex!("CHANGELOG.md", r"^## \[{version}] - \d{4}-\d{2}-\d{2}");
} | rust_cleaned_test_functions.jsonl/98155 | {
"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,
4138,
61873,
30063,
9438,
368,
341,
262,
2319,
23008,
486,
2207,
63598,
41832,
17223,
40873,
7243,
21324,
497,
435,
86490,
565,
1124,
52108,
4366,
25439,
481,
1124,
67,
90,
19,
19732,
59,
67,
90,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_invalid_early_claim() {
with_rewards_default(|_, accounts| {
assert_ok!(CrowdloanRewards::initialize(Origin::root()));
for (picasso_account, remote_account) in accounts.into_iter() {
assert_ok!(remote_account.associate(picasso_account.clone()));
assert_noop!(remote_account.claim(picas... | rust_cleaned_test_functions.jsonl/41091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
62,
22140,
84969,
368,
341,
46948,
77997,
9993,
22428,
6878,
9618,
91,
341,
197,
6948,
19817,
10297,
93926,
67,
38329,
58465,
2347,
486,
21641,
7,
13298,
486,
2888,
7392,
197,
2023,
320,
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_query_and_then_fails() {
let db = checked_memory_handle();
let sql = "BEGIN;
CREATE TABLE foo(x INTEGER, y TEXT);
INSERT INTO foo VALUES(4, \"hello\");
INSERT INTO foo VALUES(3, \", \");
... | rust_cleaned_test_functions.jsonl/25526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 724
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
8378,
68367,
761,
6209,
368,
341,
310,
1077,
2927,
284,
10067,
19195,
10630,
543,
310,
1077,
5704,
284,
330,
37588,
280,
5180,
30776,
14363,
15229,
2075,
30381,
11,
379,
15762,
317,
5180,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_into_iter_drops() {
let key = AtomicUsize::new(0);
let value = AtomicUsize::new(0);
let hm = {
let mut hm = HashMap::new();
assert_eq!(key.load(Ordering::Relaxed), 0);
assert_eq!(value.load(Ordering::Relaxed), 0);
for i i... | rust_cleaned_test_functions.jsonl/45210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
814,
3702,
368,
341,
286,
1077,
1376,
284,
30316,
52,
2141,
486,
931,
7,
15,
317,
286,
1077,
897,
284,
30316,
52,
2141,
486,
931,
7,
15,
626,
286,
1077,
49362,
284,
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,
1... | 2 |
#[test]
fn test_missing_second_field() {
let reader_schema = Schema::parse_str(
r#"
{"type":"record", "name":"Record", "fields":[
{"name":"oldfield2", "type":"string"}
]}
"#,
)
.unwrap();
assert!(SchemaCompatibility::can_read(
&wr... | rust_cleaned_test_functions.jsonl/21770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
29644,
5013,
368,
341,
286,
1077,
6604,
25371,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
2,
698,
286,
5212,
1313,
3252,
8548,
497,
330,
606,
3252,
6471,
497,
330,
9007,
8899,
198,
688,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cgroup_sys() {
let temp_dir = TempDir::new().unwrap();
let path1 = temp_dir.path().join("cgroup");
let mut f1 = File::create(path1.clone()).unwrap();
f1.write_all(b"4:memory:/kubepods/burstable/poda2ebe2cd-64c7-11ea-8799-eeeeeeeeeeee/a026c487f1168b7f5442444ac8e351... | rust_cleaned_test_functions.jsonl/45106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
4074,
20344,
368,
341,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
1815,
16,
284,
2730,
4334,
3875,
1005,
5987,
445,
66,
4074,
797,
286,
1077,
5206,
282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize_variable_with_float_value() {
#[derive(serde_derive::Serialize)]
struct Map {
num: f64,
};
let map = Map { num: 41.0 };
let var = Variable::from_serializable(&map).unwrap();
let json_string = serde_json::to_string(&var).unwr... | rust_cleaned_test_functions.jsonl/108398 | {
"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,
88686,
14635,
6615,
17586,
3142,
368,
341,
286,
11506,
27098,
7,
47024,
35345,
533,
486,
15680,
5563,
286,
2036,
5027,
341,
310,
1629,
25,
282,
21,
19,
345,
286,
3634,
286,
1077,
2415,
284,
5027... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_log_basic() {
let (inspector, mut node) = inspector_and_list_node();
// Logging string and full-size numeric type
inspect_log!(node, k1: "1".to_string(), meaning_of_life: 42u64, k3: 3i64, k4: 4f64);
inspect_log!(node, small_uint: 1u8, small_int:... | rust_cleaned_test_functions.jsonl/96856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34386,
987,
5224,
34729,
368,
341,
286,
1077,
320,
1330,
18997,
11,
5206,
2436,
8,
284,
44725,
8378,
2019,
5084,
1428,
286,
442,
41706,
914,
323,
2480,
7174,
24064,
943,
198,
286,
24085,
5224,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_i32_f32() {
binary_cast_test(
DataType::Int32,
DataType::Float32,
"CAST(#0 AS Float32) Plus #1",
);
binary_cast_test(
DataType::Float32,
DataType::Int32,
"#0 Plus CAST(#1 AS Float32)",
);
... | rust_cleaned_test_functions.jsonl/16559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5318,
18,
17,
761,
18,
17,
368,
341,
286,
7868,
5303,
4452,
1006,
310,
33172,
486,
1072,
18,
17,
345,
310,
33172,
486,
5442,
18,
17,
345,
310,
330,
34163,
32735,
15,
5752,
13001,
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_field_auth_status_not_logged_in() {
let context_builder = ContextBuilder::new();
let runner = QueryRunner::new(context_builder);
assert_eq!(
runner.query(QUERY, hashmap! {}),
(
json!({
"authStatus": {
"authenticated": f... | rust_cleaned_test_functions.jsonl/129722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
14014,
4773,
7913,
47333,
1243,
368,
341,
262,
1077,
2266,
28532,
284,
9608,
3297,
486,
931,
543,
262,
1077,
22259,
284,
11361,
19486,
486,
931,
5378,
28532,
626,
262,
2060,
10714,
33673,
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_did_doc_from_invitation_works() {
let mut did_doc = DidDoc::default();
did_doc.set_id(MessageId::id().0);
did_doc.set_service_endpoint(_service_endpoint());
did_doc.set_keys(_recipient_keys(), _routing_keys());
assert_eq!(did_doc, DidDoc::from(_invitation... | rust_cleaned_test_functions.jsonl/21969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
307,
18869,
5673,
19996,
7556,
11498,
82,
368,
341,
286,
1077,
5206,
1521,
18869,
284,
14568,
9550,
486,
2258,
543,
286,
1521,
18869,
980,
842,
29359,
764,
486,
307,
1005,
15,
317,
286,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_operator() {
let storage_helper = StorageHelper::new();
let local_owner_ns = "local";
let remote_owner_ns = "owner";
storage_helper.initialize(local_owner_ns.into());
// Upload an operator key to the remote storage
let operator_name = "operato... | rust_cleaned_test_functions.jsonl/8046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
40594,
368,
341,
286,
1077,
5819,
10418,
284,
14693,
5511,
486,
931,
543,
286,
1077,
2205,
29027,
34728,
284,
330,
2438,
876,
286,
1077,
8699,
29027,
34728,
284,
330,
8118,
876,
286,
5819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rot13() {
assert_eq!(rot13("hello"), "uryyb");
assert_eq!(rot13("uryyb"), "hello");
assert_eq!(
rot13("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"),
"NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm"
);
assert_eq!(rot13("peter"), "crgre");
} | rust_cleaned_test_functions.jsonl/51111 | {
"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,
38256,
16,
18,
368,
341,
262,
2060,
10714,
10297,
4640,
16,
18,
445,
14990,
3975,
330,
3350,
84307,
797,
262,
2060,
10714,
10297,
4640,
16,
18,
445,
3350,
84307,
3975,
330,
14990,
3071,
262,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chrome_trace_deserialization() {
use xi_trace::*;
let trace = Trace::enabled(Config::with_limit_count(10));
trace.instant("sample1", &["test", "chrome"]);
trace.instant_payload("sample2", &["test", "chrome"], to_payload("payload 2"));
trace.instant_payloa... | rust_cleaned_test_functions.jsonl/132308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
6648,
23575,
15768,
50563,
368,
341,
286,
990,
37590,
23575,
79304,
286,
1077,
11655,
284,
27163,
486,
15868,
33687,
486,
4197,
14763,
3180,
7,
16,
15,
1106,
286,
11655,
89108,
445,
13611,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wait_ptrace() {
require_capability!("test_wait_ptrace", CAP_SYS_PTRACE);
let _m = crate::FORK_MTX.lock().expect("Mutex got poisoned by another test");
match unsafe{fork()}.expect("Error: Fork Failed") {
Child => ptrace_child(),
Parent { child } =>... | rust_cleaned_test_functions.jsonl/102295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
4348,
578,
368,
341,
286,
1373,
89686,
17223,
1944,
18760,
4348,
578,
497,
26101,
26783,
20657,
5576,
317,
286,
1077,
716,
76,
284,
17717,
486,
37,
10647,
1245,
22867,
21003,
1005,
17119,
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_apply_TextEdit() {
let lines: Vec<String> = r#"fn main() {
0;
}
"#
.lines()
.map(|l| l.to_owned())
.collect();
let expect: Vec<String> = r#"fn main() {
0;
}
"#
.lines()
.map(|l| l.to_owned())
.collect();
let edit = TextEdit {
range: Range {
... | rust_cleaned_test_functions.jsonl/86858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
20550,
4036,
368,
341,
262,
1077,
5128,
25,
11312,
3464,
29,
284,
435,
55543,
8822,
1887,
368,
341,
15,
280,
532,
1,
4956,
262,
659,
7969,
741,
262,
659,
2186,
22428,
75,
91,
326,
2389,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_angle_translation() {
let angle = Degrees(70_f64);
let distance = Vector2::new(12_f64, 5_f64);
let rotation = Rotation2::from_angle(angle);
let translation = Translation2::from_vector(&distance);
let expected = Isometry2::from_parts(&translation, &rot... | rust_cleaned_test_functions.jsonl/77213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
49273,
368,
341,
286,
1077,
9210,
284,
92901,
7,
22,
15,
761,
21,
19,
317,
286,
1077,
6010,
284,
4196,
17,
486,
931,
7,
16,
17,
761,
21,
19,
11,
220,
20,
761,
21,
19,
317,
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_normalize_path() {
for test in NORMALIZE_PATH_TESTS.iter() {
let path = Path::new(test.path);
let normalized = normalize_path(path);
assert_eq!(
test.test
.replace("/", std::path::MAIN_SEPARATOR.to_string().as_str())... | rust_cleaned_test_functions.jsonl/92487 | {
"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,
80807,
2638,
368,
341,
286,
369,
1273,
304,
52431,
3282,
7944,
80312,
19471,
368,
341,
310,
1077,
1815,
284,
7933,
486,
931,
8623,
3875,
317,
310,
1077,
29410,
284,
21694,
2638,
5581,
317,
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... | 2 |
#[test]
fn test_short_from_u16() {
let x: Bits<12> = 14323_u16.into();
let y: u16 = x.into();
assert_eq!(y, 14323 & (0x0FFF));
} | rust_cleaned_test_functions.jsonl/75132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
5673,
7300,
16,
21,
368,
341,
286,
1077,
856,
25,
49457,
27,
16,
17,
29,
284,
220,
16,
19,
18,
17,
18,
7300,
16,
21,
39860,
543,
286,
1077,
379,
25,
575,
16,
21,
284,
856,
39860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contact_dont_panic() {
unsafe {
let mut error = 0;
let error_ptr = &mut error as *mut c_int;
let test_contact_private_key = private_key_generate();
let test_contact_public_key = public_key_from_private_key(test_contact_private_key, error_pt... | rust_cleaned_test_functions.jsonl/66630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20597,
814,
544,
620,
31270,
368,
341,
286,
19860,
341,
310,
1077,
5206,
1465,
284,
220,
15,
280,
310,
1077,
1465,
4348,
284,
609,
6984,
1465,
438,
353,
6984,
272,
4042,
280,
310,
1077,
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_bf_ofb() {
let pt = "37363534333231204E6F77206973207468652074696D6520666F722000";
let ct = "E73214A2822139CA62B343CC5B65587310DD908D0C241B2263C2CF80DA";
let key = "0123456789ABCDEFF0E1D2C3B4A59687";
let iv = "FEDCBA9876543210";
cipher_test_nopad(super::Ci... | rust_cleaned_test_functions.jsonl/110552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
69,
3575,
65,
368,
341,
286,
1077,
10817,
284,
330,
18,
22,
18,
21,
18,
20,
18,
19,
18,
18,
18,
17,
18,
16,
17,
15,
19,
36,
21,
37,
22,
22,
17,
15,
21,
24,
22,
18,
17,
15,
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 |
#[test]
fn test_from_str() {
assert_eq!("AD".parse(), Ok(Key::ReadDepths));
assert_eq!("ADF".parse(), Ok(Key::ForwardStrandReadDepths));
assert_eq!("ADR".parse(), Ok(Key::ReverseStrandReadDepths));
assert_eq!("DP".parse(), Ok(Key::ReadDepth));
assert_eq!("EC".parse(), Ok(... | rust_cleaned_test_functions.jsonl/19791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 855
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
341,
286,
2060,
10714,
17223,
1808,
3263,
6400,
1507,
7622,
21358,
486,
4418,
7839,
16896,
1106,
286,
2060,
10714,
17223,
91263,
3263,
6400,
1507,
7622,
21358,
486,
25925,
2580,
437... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_named_enum() {
let x = TestEnum::Named{foo: 1.0, bar: 2.0};
let y = TestEnum::Named{foo: 1.000001, bar: 2.0000001};
assert_abs_diff_eq!(x, y, epsilon=1e-5);
} | rust_cleaned_test_functions.jsonl/45664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71834,
31054,
368,
341,
262,
1077,
856,
284,
3393,
10766,
486,
15810,
90,
7975,
25,
220,
16,
13,
15,
11,
3619,
25,
220,
17,
13,
15,
2440,
262,
1077,
379,
284,
3393,
10766,
486,
15810,
90,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reduce() {
let mut reduce0 = Number::new("[[[[[4,3],4],4],[7,[[8,4],9]]],[1,1]]");
reduce0.reduce();
assert_eq!(reduce0, Number::new("[[[[0,7],4],[[7,8],[6,0]]],[8,1]]"));
} | rust_cleaned_test_functions.jsonl/100422 | {
"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,
64596,
368,
341,
286,
1077,
5206,
7949,
15,
284,
5624,
486,
931,
10937,
15505,
15505,
19,
11,
18,
1125,
19,
1125,
19,
14955,
22,
11,
15505,
23,
11,
19,
1125,
24,
5053,
14955,
16,
11,
16,
505... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prevote_migration_can_complete_election() {
let l = default_logger();
// n1 is leader with term 2
// n2 is follower with term 2
let mut nt = new_prevote_migration_cluster(&l);
// simulate leader down
nt.isolate(1);
// Call for elections from both n2 and n3.
... | rust_cleaned_test_functions.jsonl/19184 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25566,
1272,
90373,
27421,
27675,
2204,
1170,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
442,
308,
16,
374,
7653,
448,
4647,
220,
17,
198,
262,
442,
308,
17,
374,
48207,
448,
4647,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_criteria() {
assert_eq!(calculate_matches(5_000_000, (65, 8921), Some((4, 8))), 309);
} | rust_cleaned_test_functions.jsonl/27444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 57
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80990,
368,
341,
262,
2060,
10714,
10297,
35597,
38344,
7,
20,
62,
15,
15,
15,
62,
15,
15,
15,
11,
320,
21,
20,
11,
220,
23,
24,
17,
16,
701,
4329,
1188,
19,
11,
220,
23,
36363,
220,
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 |
#[test]
fn test_from_int_node() {
let node = IntNode::new(666);
let clone = node;
assert_eq!(ExpressionNode::from(node), ExpressionNode::Int(clone));
} | rust_cleaned_test_functions.jsonl/89512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
4042,
5084,
368,
341,
286,
1077,
2436,
284,
1333,
1955,
486,
931,
7,
21,
21,
21,
626,
286,
1077,
14715,
284,
2436,
401,
286,
2060,
10714,
10297,
9595,
1955,
486,
1499,
6958,
701,
16378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_same() {
// Operator 5: Same
produces("[[1 1] 5 0 1]", "0");
produces("[[1 2] 5 0 1]", "1");
// Various bignum combinations.
produces("[[18446744073709551615 18446744073709551615] 5 0 1]", "0");
produces("[[18446744073709551615 18446744073709551616... | rust_cleaned_test_functions.jsonl/29737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
368,
341,
286,
442,
28498,
220,
20,
25,
25739,
198,
286,
18644,
10937,
58,
16,
220,
16,
60,
220,
20,
220,
15,
220,
16,
19076,
330,
15,
797,
286,
18644,
10937,
58,
16,
220,
17,
60,
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_job_description_serialization() {
let servant = JobDescription::Servant;
assert_eq!(r#""Servant""#, encode(&servant));
let pony = JobDescription::Pony;
assert_eq!(r#""Pony""#, encode(&pony));
let scholar = JobDescription::Scholar;
assert_eq!(r... | rust_cleaned_test_functions.jsonl/36142 | {
"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,
20298,
11448,
25602,
2022,
368,
1476,
286,
1077,
40464,
284,
12011,
5009,
486,
39159,
517,
280,
286,
2060,
10714,
10297,
81,
2,
3014,
39159,
517,
3014,
60778,
16164,
2099,
30775,
517,
41843,
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_solution_2() {
assert_eq!(3, solution_2(&mut parse("C200B40A82")));
assert_eq!(7, solution_2(&mut parse("880086C3E88112")));
assert_eq!(1, solution_2(&mut parse("9C0141080250320F1802104A08")));
} | rust_cleaned_test_functions.jsonl/20584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50274,
62,
17,
368,
341,
286,
2060,
10714,
10297,
18,
11,
6291,
62,
17,
2099,
6984,
4715,
445,
34,
17,
15,
15,
33,
19,
15,
32,
23,
17,
17621,
286,
2060,
10714,
10297,
22,
11,
6291,
62,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fold_block_with_declaration() {
test_same("{let x}");
test_same("function f() {let x}");
test_same("{const x = 1}");
test_same("{x = 2; y = 4; let z;}");
test("{'hi'; let x;}", "{let x}");
test("{x = 4; {let y}}", "x = 4; {let y}");
test_same("{class C {}} {class C {}... | rust_cleaned_test_functions.jsonl/368 | {
"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,
61187,
7113,
6615,
77926,
368,
341,
262,
1273,
33574,
13976,
1149,
856,
20305,
262,
1273,
33574,
445,
1688,
282,
368,
314,
1149,
856,
20305,
262,
1273,
33574,
13976,
1024,
856,
284,
220,
16,
20305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.