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_unpack_tarball() {
let file = get_test_tar();
let mut archive = Archive::new(file.as_slice());
let mut lines = Vec::new();
let tmp_dir = tempfile::TempDir::new().unwrap();
unpack_tarball_impl(
&mut archive,
Path::new("myArchive.t... | rust_cleaned_test_functions.jsonl/66598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54889,
66608,
3959,
368,
341,
286,
1077,
1034,
284,
633,
4452,
66608,
543,
286,
1077,
5206,
18132,
284,
29702,
486,
931,
4866,
5357,
26488,
5231,
286,
1077,
5206,
5128,
284,
11312,
486,
931,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_non_existence() {
let db = MockTreeStore::default();
let tree = JellyfishMerkleTree::new(&db);
// ```text
// internal 2
// internal
// Total: 7 nodes
let key1 = HashValue::new([0x00u8; HashValue::LENGTH]... | rust_cleaned_test_functions.jsonl/9456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1010
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
35906,
763,
368,
341,
262,
1077,
2927,
284,
14563,
6533,
6093,
486,
2258,
543,
262,
1077,
4916,
284,
73139,
18170,
44,
16754,
273,
6533,
486,
931,
2099,
1999,
317,
262,
442,
54275,
1318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 a = BigUint::new(vec!());
let b = BigUint::new(vec!(0));
let c = BigUint::new(vec!(1));
let d = BigUint::new(vec!(1,0,0,0,0,0));
let e = BigUint::new(vec!(0,0,0,0,0,1));
assert!(::hash(&a) == ::hash(&b));
assert!(::hash(&b) != ... | rust_cleaned_test_functions.jsonl/90115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
1077,
264,
284,
6164,
21570,
486,
931,
25592,
0,
1423,
286,
1077,
293,
284,
6164,
21570,
486,
931,
25592,
10297,
15,
1106,
286,
1077,
272,
284,
6164,
21570,
486,
931,
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_validate_transaction_fee() {
{
// Zero fees gets rejected
let (tx, _ledger) = create_test_tx_with_amount(INITIALIZE_LEDGER_AMOUNT, 0);
assert_eq!(
validate_transaction_fee(&tx),
Err(TransactionValidationError::TxFeeError... | rust_cleaned_test_functions.jsonl/33280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 649
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
28884,
34305,
368,
341,
286,
341,
310,
442,
18306,
12436,
5221,
17551,
198,
310,
1077,
320,
3998,
11,
716,
50704,
8,
284,
1855,
4452,
17805,
6615,
13471,
23515,
952,
6208,
3282,
37604,
8738... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_column_convert_mut() {
let mut a: Matrix<i64> = matrix![1, 2, 3, 4;
5, 6, 7, 8;
9, 10, 11, 12];
let row = a.col_mut(1);
let v: Vector<i64> = row.into();
assert_eq!(v, vector![2, 6, ... | rust_cleaned_test_functions.jsonl/43653 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
34910,
29523,
368,
341,
286,
1077,
5206,
264,
25,
11631,
21897,
21,
19,
29,
284,
6172,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
280,
12841,
220,
20,
11,
220,
21,
11,
220,
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_simple_grammar() {
let g = wrap_grammar_with_start(examples::make_simple()).unwrap();
let nullables = calculate_nullables(&g).unwrap();
assert!(nullables.get_nullable_set().is_empty());
} | rust_cleaned_test_functions.jsonl/27890 | {
"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,
30015,
62,
41094,
368,
341,
262,
1077,
342,
284,
15061,
62,
41094,
6615,
4906,
5463,
4023,
486,
6927,
30015,
6011,
15454,
543,
262,
1077,
845,
4788,
284,
11047,
15162,
4788,
2099,
70,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_temporary_nodes_are_used_to_calculate_hashes_first() {
let mut rng = CustomRng;
let mut tree = MerkleTree::new(create(3), POOL_PARAMS.clone());
let hash0: Hash<_> = rng.gen();
let hash1: Hash<_> = rng.gen();
// add hash for index 0
tree.add_hash(... | rust_cleaned_test_functions.jsonl/23753 | {
"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,
11771,
7592,
14896,
56855,
27803,
2346,
24005,
11207,
91616,
12978,
368,
341,
286,
1077,
5206,
28422,
284,
8406,
49,
968,
280,
286,
1077,
5206,
4916,
284,
8755,
23089,
6533,
486,
931,
32602,
7,
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 |
#[test]
fn test_fq12_mul_by_014() {
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06, 0xbc, 0xe5,
]);
for _ in 0..1000 {
let c0 = Fq2::random(&mut rng);
let c1 = Fq2::random(&mut rng);
let c5 = ... | rust_cleaned_test_functions.jsonl/12965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
16,
17,
24944,
3710,
62,
15,
16,
19,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
8956,
286,
220,
15,
87,
20,
24,
11,
220,
15,
87,
21,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_set_root_key() {
let mut tree = Tree::new();
// Should fail because node does not exist in the map yet
assert!(tree.set_root_key("root").is_err());
// Should pass because node exists
let root_node = Node::new("root", "Anode.");
tree.nodes.insert("root".to_owned(), root_... | rust_cleaned_test_functions.jsonl/110232 | {
"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,
2602,
12993,
3097,
368,
341,
262,
1077,
5206,
4916,
284,
8942,
486,
931,
1428,
262,
442,
12260,
3690,
1576,
2436,
1558,
537,
3000,
304,
279,
2415,
3602,
198,
262,
2060,
10297,
9344,
980,
12993,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_isize() {
check_round_trip(vec![-1, 2, -3, ::std::isize::MIN, 0, 1, ::std::isize::MAX, 2, 1]);
} | rust_cleaned_test_functions.jsonl/24190 | {
"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,
6892,
551,
368,
341,
262,
1779,
29896,
63883,
25592,
0,
7609,
16,
11,
220,
17,
11,
481,
18,
11,
3504,
1834,
486,
285,
551,
486,
16413,
11,
220,
15,
11,
220,
16,
11,
3504,
1834,
486,
285,
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 |
#[test]
fn test_aes256_cfb8() {
let pt = "6bc1bee22e409f96e93d7e117393172aae2d";
let ct = "dc1f1a8520a64db55fcc8ac554844e889700";
let key = "603deb1015ca71be2b73aef0857d77811f352c073b6108d72d9810a30914dff4";
let iv = "000102030405060708090a0b0c0d0e0f";
cipher_test(super:... | rust_cleaned_test_functions.jsonl/110547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
17,
20,
21,
666,
10798,
23,
368,
341,
286,
1077,
10817,
284,
330,
21,
8904,
16,
32031,
17,
17,
68,
19,
15,
24,
69,
24,
21,
68,
24,
18,
67,
22,
68,
16,
16,
22,
18,
24,
18,
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_test_mathfuncptr() {
assert_emscripten_output!(
"../../emtests/test_mathfuncptr.wasm",
"test_mathfuncptr",
vec![],
"../../emtests/test_mathfuncptr.out"
);
} | rust_cleaned_test_functions.jsonl/117947 | {
"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,
4452,
65561,
2830,
3505,
368,
341,
262,
2060,
22504,
2282,
268,
7645,
33673,
286,
10208,
336,
23841,
12697,
65561,
2830,
3505,
1418,
10530,
756,
286,
330,
1944,
65561,
2830,
3505,
756,
286,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_documents_ensure_no_duplicates() {
// but we'll guard against it anyway
let (mut documents, documents_path) = setup();
let file_path = documents_path.join("file.ts");
let file_specifier = ModuleSpecifier::from_file_path(&file_path).unwrap();
fs::create_dir_all(&documents... | rust_cleaned_test_functions.jsonl/53617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75927,
62,
27289,
6536,
75051,
368,
341,
1066,
262,
442,
714,
582,
3278,
7616,
2348,
432,
13657,
198,
262,
1077,
320,
6984,
9293,
11,
9293,
2638,
8,
284,
6505,
543,
262,
1077,
1034,
2638,
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_ints() {
let b = Builder::new();
let mut set = HashSet::new();
for _ in 0..1000 {
let a = b.alloc::<u32>();
let addr: usize = a as *const u32 as usize;
assert!(!set.contains(&addr));
set.insert(addr);
}
} | rust_cleaned_test_functions.jsonl/134744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
82,
368,
341,
286,
1077,
293,
284,
20626,
486,
931,
543,
286,
1077,
5206,
738,
284,
18931,
486,
931,
1428,
286,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
341,
310,
1077,
264,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_merge_with_hashmap() {
let mut instant_effects1 = Vec::new();
let attacker_pos = PosHex { q: 0, r: 0 };
let effect_kill: Effect = effect::Kill {
attacker_pos: Some(attacker_pos),
}
.into();
instant_effects1.push((Id(0), vec![effect_kill... | rust_cleaned_test_functions.jsonl/8685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
6615,
8950,
2186,
368,
341,
286,
1077,
5206,
9690,
83171,
16,
284,
11312,
486,
931,
543,
286,
1077,
30710,
6479,
284,
18876,
20335,
314,
2804,
25,
220,
15,
11,
435,
25,
220,
15,
2605,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_med() {
let mut buf = [Hexbit::default(); 24];
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
.iter()
.map(|&b| Hexbit::new(b))
.collect_slice(&mut buf[..]);
medium::encode(&mut buf);
buf[0] = Hexbit::new(0o00);
... | rust_cleaned_test_functions.jsonl/39697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
44085,
368,
341,
286,
1077,
5206,
6607,
284,
508,
20335,
4489,
486,
2258,
2129,
220,
17,
19,
935,
286,
508,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
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,
1,
1... | 1 |
#[test]
fn test_iter_multiple_ids() {
let buf = "one <@123>two<#456><@789> ----";
let mut iter = Id::<UserMarker>::iter(buf);
assert_eq!(Id::new(123), iter.next().unwrap().0);
let (mention, start, end) = iter.next().unwrap();
assert_eq!(Id::new(789), mention);
ass... | rust_cleaned_test_functions.jsonl/99683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
45233,
8077,
368,
341,
286,
1077,
6607,
284,
330,
603,
366,
31,
16,
17,
18,
29,
19789,
27,
2,
19,
20,
21,
1784,
31,
22,
23,
24,
29,
11304,
876,
286,
1077,
5206,
5367,
284,
5223,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compilation_multi() {
let mut names: Vec<*const i8> = Vec::new();
let mut texts: Vec<*const i8> = Vec::new();
let name1 = CString::new("test1.sv").unwrap();
let name2 = CString::new("test2.sv").unwrap();
let name3 = CString::new("test3.sv").unwrap();
... | rust_cleaned_test_functions.jsonl/96203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
13455,
25133,
368,
341,
286,
1077,
5206,
5036,
25,
11312,
78822,
1024,
600,
23,
29,
284,
11312,
486,
931,
543,
286,
1077,
5206,
21984,
25,
11312,
78822,
1024,
600,
23,
29,
284,
11312,
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_pathify() {
let db = DB::new("./wiki/");
assert_eq!(
"./wiki/keyboard_shortcuts.md",
db.pathify("keyboard shortcuts")
);
assert_eq!("./wiki/Coool.md", db.pathify("Coool!!"));
} | rust_cleaned_test_functions.jsonl/73780 | {
"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,
2638,
1437,
368,
341,
286,
1077,
2927,
284,
5952,
486,
931,
13988,
29707,
49897,
286,
2060,
10714,
33673,
310,
5924,
29707,
14,
41713,
16673,
22497,
21324,
756,
310,
2927,
3875,
1437,
445,
41713,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_round_real() {
let test_cases = vec![
(Some(Real::from(-3.12_f64)), Some(Real::from(-3f64))),
(Some(Real::from(f64::MAX)), Some(Real::from(f64::MAX))),
(Some(Real::from(f64::MIN)), Some(Real::from(f64::MIN))),
(None, None),
];
... | rust_cleaned_test_functions.jsonl/37507 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
15266,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
8373,
7,
12768,
486,
1499,
4080,
18,
13,
16,
17,
761,
21,
19,
5731,
4329,
7,
12768,
486,
1499,
4080,
18,
69,
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... | 2 |
#[test]
fn test_merge_includes() {
let input1 = r#"
<eww>
<definitions>
<def name="test1">
<box orientation="v">
{{var1}}
</box>
</def>
</definitions>
<variables>... | rust_cleaned_test_functions.jsonl/18855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
1243,
7396,
368,
341,
286,
1077,
1946,
16,
284,
435,
2,
698,
1843,
366,
365,
86,
397,
1060,
366,
48563,
397,
394,
366,
750,
829,
428,
1944,
16,
881,
1698,
366,
2011,
16725,
428,
85,
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_new() {
let gil = Python::acquire_gil();
let py = gil.python();
let ob = PyTuple::new(py, &[1, 2, 3]);
assert_eq!(3, ob.len());
let ob: &PyAny = ob.into();
assert_eq!((1, 2, 3), ob.extract().unwrap());
let mut map = HashSet::new();
... | rust_cleaned_test_functions.jsonl/4176 | {
"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,
5921,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
1508,
284,
80824,
486,
931,
46827,
11,
44590,
16,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_not_hl() {
let compiled = bitwise::compile_not("HL".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b11011011);
} | rust_cleaned_test_functions.jsonl/100598 | {
"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,
74170,
7913,
1523,
75,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
7913,
445,
13485,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_csv_record_to_query() {
let inp = CsvRecord {
id: "1".to_string(),
origin_lat: "-37.820189".to_string(),
origin_lon: "145.149954".to_string(),
destination_lat: "-37.819681".to_string(),
destination_lon: "144.952302".to_string(),... | rust_cleaned_test_functions.jsonl/75495 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14020,
14192,
2346,
5738,
368,
341,
286,
1077,
32344,
284,
91671,
6471,
341,
310,
877,
25,
330,
16,
3263,
983,
3904,
3148,
310,
6238,
26174,
25,
6523,
18,
22,
13,
23,
17,
15,
16,
23,
24,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hw22() {
// our hw doesn't need to be updated
assert_eq!(
compute_hw(
&OffsetInfo { hw: 0, leo: 10 },
2,
&offsets_maps(vec![(5001, OffsetInfo::default())])
),
None
);
... | rust_cleaned_test_functions.jsonl/1567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28792,
17,
17,
368,
341,
23459,
1789,
286,
442,
1039,
31256,
3171,
944,
1184,
311,
387,
6049,
198,
286,
2060,
10714,
33673,
310,
12564,
28792,
1006,
394,
609,
6446,
1731,
314,
31256,
25,
220,
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_chain_genesis_hashes() {
assert_eq!(
GENESIS_HASH_MAINNET,
&[
0x6f, 0xe2, 0x8c, 0x0a, 0xb6, 0xf1, 0xb3, 0x72, 0xc1, 0xa6,
0xa2, 0x46, 0xae, 0x63, 0xf7, 0x4f, 0x93, 0x1e, 0x83, 0x65,
0xe1, 0x5a, 0x08, 0x9c, 0x68, 0xd6... | rust_cleaned_test_functions.jsonl/115622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2917
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
16322,
13774,
91616,
368,
341,
286,
2060,
10714,
33673,
310,
42674,
83366,
32309,
32276,
15373,
345,
310,
609,
9640,
394,
220,
15,
87,
21,
69,
11,
220,
15,
8371,
17,
11,
220,
15,
87,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_public_key_to_pem_pkcs1() {
let keypair = super::Rsa::generate(512).unwrap();
let pubkey_pem = keypair.public_key_to_pem_pkcs1().unwrap();
super::Rsa::public_key_from_pem_pkcs1(&pubkey_pem).unwrap();
} | rust_cleaned_test_functions.jsonl/28565 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
3097,
2346,
620,
336,
33321,
4837,
16,
368,
341,
286,
1077,
1376,
12670,
284,
2256,
486,
49,
9081,
486,
19366,
7,
20,
16,
17,
568,
15454,
543,
286,
1077,
95116,
620,
336,
284,
1376,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_input_mouse_scroll() {
use super::super::Motion;
let e: Event = Motion::MouseScroll([0.0, 0.0]).into();
let a: Option<Event> = MouseScrollEvent::from_pos([1.0, 0.0], &e);
let b: Option<Event> = a
.clone()
.unwrap()
.mouse_scrol... | rust_cleaned_test_functions.jsonl/54698 | {
"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,
5898,
39203,
41407,
368,
341,
286,
990,
2256,
486,
9522,
486,
40338,
401,
286,
1077,
384,
25,
3665,
284,
26562,
486,
10493,
8425,
2561,
15,
13,
15,
11,
220,
15,
13,
15,
10697,
18122,
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 |
#[test]
fn test_run_functions_args() -> Result<()> {
let query = parse(
r#"
func count x -> s"count({x})"
from employees
aggregate [
count salary
]
"#,
)?;
assert_yaml_snapshot!(query.nodes, @r###"
---
- FuncD... | rust_cleaned_test_functions.jsonl/90557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
31708,
8384,
368,
1464,
5714,
71698,
341,
286,
1077,
3239,
284,
4715,
1006,
310,
435,
2,
698,
286,
2915,
1760,
856,
1464,
220,
274,
1,
1830,
2306,
87,
5410,
1837,
286,
504,
8256,
198,
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... | 6 |
#[test]
fn test_pcapng_iter_section_interfaces() {
let (_, section) = parse_section(TEST001_LE).expect("could not parse section");
assert_eq!(section.iter_interfaces().count(), 1);
for (idx, interface) in section.iter_interfaces().enumerate() {
println!("found interface {}", idx);
pr... | rust_cleaned_test_functions.jsonl/132436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
11346,
968,
11723,
16221,
72960,
368,
341,
262,
1077,
39464,
3772,
8,
284,
4715,
16221,
50320,
15,
15,
16,
5280,
568,
17119,
445,
28077,
537,
4715,
3772,
797,
262,
2060,
10714,
10297,
2809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_basic_args_linter_top_level() {
let genesis_objs = clone_genesis_packages();
let framework_pkg = genesis_objs
.iter()
.find(|q| q.id() == ObjectID::from(SUI_FRAMEWORK_ADDRESS))
.expect("Unable to find framework object");
let module = Identifier::new("Geniteam... | rust_cleaned_test_functions.jsonl/95867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1938
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
8384,
907,
2245,
10426,
8274,
368,
341,
262,
1077,
59366,
62673,
284,
14715,
16322,
13774,
41874,
543,
262,
1077,
12626,
64739,
284,
59366,
62673,
198,
286,
659,
2015,
741,
286,
659,
3903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ranges() {
let mut wrapper = TableScanTestWrapper::default();
// prepare range
let r1 = get_range(TABLE_ID, i64::MIN, 0);
let r2 = get_range(TABLE_ID, 0, (KEY_NUMBER / 2) as i64);
// prepare point get
let handle = KEY_NUMBER / 2;
... | rust_cleaned_test_functions.jsonl/35049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 639
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
58748,
368,
341,
286,
1077,
5206,
13261,
284,
6633,
26570,
2271,
11542,
486,
2258,
543,
286,
442,
10549,
2088,
198,
286,
1077,
435,
16,
284,
633,
9698,
83006,
3450,
11,
600,
21,
19,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_part2_samples() {
assert_eq!(count_ways(&[16, 10, 15, 5, 1, 11, 7, 19, 6, 12, 4]), 8);
assert_eq!(
count_ways(&[
28, 33, 18, 42, 31, 14, 46, 20, 48, 47, 24, 23, 49, 45, 19, 38, 39, 11, 1, 32, 25,
35, 8, 17, 7, 9, 4, 2, 34, 10, 3
... | rust_cleaned_test_functions.jsonl/71902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
17,
18297,
368,
341,
286,
2060,
10714,
10297,
1830,
1670,
942,
2099,
58,
16,
21,
11,
220,
16,
15,
11,
220,
16,
20,
11,
220,
20,
11,
220,
16,
11,
220,
16,
16,
11,
220,
22,
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_pbkdf2_simple() {
let password = "password";
let out1 = pbkdf2_simple(password, 1024).unwrap();
let out2 = pbkdf2_simple(password, 1024).unwrap();
// This just makes sure that a salt is being applied. It doesn't verify that that salt is
assert!(... | rust_cleaned_test_functions.jsonl/98903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31409,
74,
2940,
17,
30015,
368,
341,
286,
1077,
3552,
284,
330,
3833,
3302,
286,
1077,
700,
16,
284,
17310,
74,
2940,
17,
30015,
22768,
11,
220,
16,
15,
17,
19,
568,
15454,
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... | 5 |
#[test]
fn test_stacked_porep_extract_all_blake2s_sub_8_8() {
test_extract_all::<DiskTree<Blake2sHasher, U8, U8, U0>>();
} | rust_cleaned_test_functions.jsonl/56517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
11191,
620,
460,
79,
39123,
5705,
13141,
726,
17,
82,
5228,
62,
23,
62,
23,
368,
341,
262,
1273,
39123,
5705,
27638,
47583,
6533,
27,
91038,
17,
82,
6370,
261,
11,
547,
23,
11,
547,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_get_confirmed_transaction() {
let slot = 2;
let entries = make_slot_entries_with_transactions(5);
let shreds = entries_to_test_shreds(entries.clone(), slot, slot - 1, true, 0);
let ledger_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&le... | rust_cleaned_test_functions.jsonl/72823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1848
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
16059,
8434,
28884,
368,
341,
286,
1077,
9446,
284,
220,
17,
280,
286,
1077,
10695,
284,
1281,
27563,
26092,
6615,
68182,
7,
20,
317,
286,
1077,
557,
53369,
284,
10695,
2346,
4452,
3712,
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... | 4 |
#[test]
fn test_display_fmt_many_characters() {
let two_length_location = SourceFileLocation::new("test_file.s", 2, 3, 2);
assert_eq!(format!("{}", two_length_location), "test_file.s:2:3-4");
let five_length_location = SourceFileLocation::new("test_file.s", 2, 3, 5);
assert_eq!(format!("{}", fiv... | rust_cleaned_test_functions.jsonl/46048 | {
"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,
14825,
38128,
22101,
79060,
368,
341,
262,
1077,
1378,
5118,
13126,
284,
8748,
1703,
4707,
486,
931,
445,
1944,
2458,
514,
497,
220,
17,
11,
220,
18,
11,
220,
17,
317,
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_mul_pow10() {
let mut prevpow10 = Big::from_small(1);
for i in 1..340 {
let mut curpow10 = Big::from_small(1);
mul_pow10(&mut curpow10, i);
assert_eq!(curpow10, *prevpow10.clone().mul_small(10));
prevpow10 = curpow10;
}
} | rust_cleaned_test_functions.jsonl/12038 | {
"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,
24944,
56183,
16,
15,
368,
341,
262,
1077,
5206,
7872,
21743,
16,
15,
284,
6164,
486,
1499,
31966,
7,
16,
317,
262,
369,
600,
304,
220,
16,
496,
18,
19,
15,
341,
286,
1077,
5206,
2847,
21743... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_option() {
START.call_once(|| {
magick_wand_genesis();
});
let mut wand = MagickWand::new();
assert!(wand.read_image("tests/data/IMG_5745.JPG").is_ok());
// The jpeg:size option is just a hint.
wand.set_option("jpeg:size", "128x128").unwrap();
let blob = w... | rust_cleaned_test_functions.jsonl/57701 | {
"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,
2602,
9672,
368,
341,
262,
20998,
8524,
7630,
79453,
341,
286,
4878,
865,
1670,
437,
16322,
13774,
543,
262,
1625,
262,
1077,
5206,
28710,
284,
87154,
54,
437,
486,
931,
543,
262,
2060,
10297,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_line_wrap() {
let mut out = PosixRenderer::new(OutputStreamType::Stdout, 4, true, BellStyle::default());
let prompt = Prompt {
text: "> ",
is_default: true,
size: out.calculate_position("> ", Position::default(), 0),
has_continuatio... | rust_cleaned_test_functions.jsonl/10660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
38550,
368,
341,
286,
1077,
5206,
700,
284,
18876,
941,
11541,
486,
931,
7,
12795,
929,
486,
22748,
411,
11,
220,
19,
11,
830,
11,
17884,
2323,
486,
2258,
1423,
286,
1077,
9934,
284,
595... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or() -> TestResult {
let p = polar();
p.load_str(
r#"f(x) if a(x) or b(x);
a(1);
b(3);"#,
)?;
qvar(&p, "f(x)", "x", values![1, 3]);
qeval(&p, "f(1)");
qnull(&p, "f(2)");
qeval(&p, "f(3)");
p.clear_rules();
p.load_str(
r#... | rust_cleaned_test_functions.jsonl/68112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
2075,
8,
421,
264,
2075,
8,
476,
293,
2075,
317,
1843,
264,
7,
16,
317,
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... | 3 |
#[test]
fn test_priority_update_request_on_push_stream() {
test_wrong_frame_on_push_stream(&[0x80, 0x0f, 0x07, 0x00, 0x01, 0x03]);
} | rust_cleaned_test_functions.jsonl/101889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38161,
8882,
7893,
4470,
14218,
12673,
368,
341,
286,
1273,
75198,
8929,
4470,
14218,
12673,
2099,
58,
15,
87,
23,
15,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
15,
22,
11,
220,
15,
87,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parsing_with_included_range_containing_mismatched_positions() {
let source_code = "<div>test</div>{_ignore_this_part_}";
let mut parser = Parser::new();
parser.set_language(get_language("html")).unwrap();
let end_byte = source_code.find("{_ignore_this_part_").unwrap();
let... | rust_cleaned_test_functions.jsonl/73175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
6615,
1243,
10181,
9698,
10260,
2056,
717,
24976,
291,
37219,
368,
341,
262,
1077,
2530,
4136,
284,
4055,
611,
29,
1944,
522,
611,
7309,
62,
13130,
24868,
10495,
62,
71612,
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_long_os_string_value() {
with_key!(key, "LongOsStringValue" => {
let name = "RustLongOsStringVal";
let mut val1 = rand::thread_rng().gen_ascii_chars().take(7000).collect::<String>();
val1.push('\u{0}');
let val1 = OsStr::new(&val1);
key.set_value(name,... | rust_cleaned_test_functions.jsonl/128091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
29387,
3904,
3142,
368,
341,
262,
448,
3097,
10297,
792,
11,
330,
6583,
28867,
82696,
1,
589,
341,
286,
1077,
829,
284,
330,
49,
590,
6583,
28867,
703,
2208,
876,
286,
1077,
5206,
1044,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_register_response() {
let repair_type = ShredRepairType::Orphan(9);
let mut outstanding_requests = OutstandingRequests::default();
let nonce = outstanding_requests.add_request(repair_type, timestamp());
let shred = Shred::new_from_data(0, 0, 0, &[], false, false,... | rust_cleaned_test_functions.jsonl/50414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
9655,
368,
341,
286,
1077,
12733,
1819,
284,
1417,
1151,
98386,
929,
486,
2195,
9943,
7,
24,
317,
286,
1077,
5206,
18781,
37216,
284,
75341,
35295,
486,
2258,
543,
286,
1077,
39676,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_rotate_nearest_rgba() {
fn rotate_nearest_about_center(image: &RgbaImage) -> RgbaImage {
rotate_about_center(
image,
std::f32::consts::PI / 4f32,
Interpolation::Nearest,
Rgba::black(),
)
}
compare_to_truth(
"elep... | rust_cleaned_test_functions.jsonl/81460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
13925,
15432,
95229,
368,
341,
262,
5168,
16919,
13925,
15432,
57975,
21087,
10075,
25,
609,
49,
56380,
1906,
8,
1464,
431,
56380,
1906,
341,
286,
16919,
57975,
21087,
1006,
310,
2168,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_json_path_expr() {
let mut test_cases = vec![
(
"$",
true,
Some(PathExpression {
legs: vec![],
flags: PathExpressionFlag::default(),
}),
),
(
... | rust_cleaned_test_functions.jsonl/43061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9455,
2638,
21915,
368,
341,
286,
1077,
5206,
1273,
41427,
284,
7486,
90515,
310,
2399,
394,
5201,
756,
394,
830,
345,
394,
4329,
33030,
9595,
341,
503,
14201,
25,
7486,
20703,
1259,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_primitive_array_builder_finish() {
let mut builder = Int32Builder::new(5);
builder.append_slice(&[2, 4, 6, 8]).unwrap();
let mut arr = builder.finish();
assert_eq!(4, arr.len());
assert_eq!(0, builder.len());
builder.append_slice(&[1, 3, 5, 7, 9])... | rust_cleaned_test_functions.jsonl/30978 | {
"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,
84087,
3858,
28532,
42980,
368,
341,
286,
1077,
5206,
7363,
284,
1333,
18,
17,
3297,
486,
931,
7,
20,
317,
286,
7363,
2057,
26488,
2099,
58,
17,
11,
220,
19,
11,
220,
21,
11,
220,
23,
10697,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_range() {
let conn = Connection::connect("postgres://postgres@localhost:5433", TlsMode::None).unwrap();
let stmt = conn.prepare("SELECT $1::INT8RANGE").unwrap();
let err = stmt.query(&[&&[1i64][..]]).unwrap_err();
match err.as_conversion() {
Some(e) if e.is::<Wrong... | rust_cleaned_test_functions.jsonl/120864 | {
"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,
26488,
9698,
368,
341,
262,
1077,
4534,
284,
11032,
486,
6459,
445,
43070,
1110,
43070,
31,
8301,
25,
20,
19,
18,
18,
497,
350,
4730,
3636,
486,
4064,
568,
15454,
1428,
262,
1077,
20020,
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... | 4 |
#[test]
fn test_load_state() {
let name = setup_env();
{
let _ = State::new(&name).unwrap();
}
let mut s = State::load(&name).unwrap();
test_state(&mut s);
} | rust_cleaned_test_functions.jsonl/55500 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
4387,
368,
341,
10217,
829,
284,
6505,
15879,
543,
197,
515,
197,
10217,
716,
284,
3234,
486,
931,
2099,
606,
568,
15454,
543,
197,
532,
10217,
5206,
274,
284,
3234,
486,
1078,
2099,
606,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_transform_all_roles_to_config() {
let role_1 = "role_1";
let role_2 = "role_2";
let role_group_1 = "role_group_1";
let role_group_2 = "role_group_2";
let file_name = "foo.bar";
let roles: HashMap<String, (Vec<PropertyNameKind>, Role<Box<TestConfig... | rust_cleaned_test_functions.jsonl/90571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1904
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18449,
5705,
43061,
2346,
5332,
368,
341,
286,
1077,
3476,
62,
16,
284,
330,
5778,
62,
16,
876,
286,
1077,
3476,
62,
17,
284,
330,
5778,
62,
17,
876,
286,
1077,
3476,
6288,
62,
16,
284,
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_no_unknown() {
let (relayer, always_success_out_point) = build_chain(5);
let peer_index: PeerIndex = 100.into();
let transaction = new_transaction(&relayer, 1, &always_success_out_point);
let transactions = vec![transaction.clone()];
// known tx
{
relayer
... | rust_cleaned_test_functions.jsonl/30800 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
57507,
368,
341,
262,
1077,
320,
3748,
1135,
11,
2677,
18632,
6068,
6085,
8,
284,
1936,
30583,
7,
20,
317,
262,
1077,
14397,
3560,
25,
45147,
1552,
284,
220,
16,
15,
15,
39860,
1428,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_reader_rows_nonnullable() {
let rows = test_file_reader_rows::<Group>("nonnullable.impala.parquet", None).unwrap();
let expected_rows = vec![row![
("ID".to_string(), Value::I64(8)),
("Int_Array".to_string(), listv![Value::I32(-1)]),
(
"int_array_array".to_string(),
lis... | rust_cleaned_test_functions.jsonl/92459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 602
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
10949,
21637,
12902,
368,
341,
197,
10217,
6978,
284,
1273,
2458,
22306,
10949,
27638,
2808,
13211,
6280,
12902,
80454,
6053,
33277,
23300,
497,
2240,
568,
15454,
1428,
197,
10217,
3601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_18() {
let key = "1bf32e7c679a3187e22a635d301ce98ad000ca301049f2e891e403250c3358fc";
let nonce = "2030b227bb96e93b88f419afe9f9d660";
let expected_output =
"d0ed414a875a81db1e4cff7609afdbb2ffcdd575ebc17543fb92de53c6487efb";
hcha... | rust_cleaned_test_functions.jsonl/44680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
16,
23,
368,
341,
310,
1077,
1376,
284,
330,
16,
13233,
18,
17,
68,
22,
66,
21,
22,
24,
64,
18,
16,
23,
22,
68,
17,
17,
64,
21,
18,
20,
67,
18,
15,
16,
346,
24,
23,
329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submission_part2() {
let input = input_to_grid(SUBMISSION_PATH);
let mut res = part2(input);
assert_eq!(res, 1092012);
} | rust_cleaned_test_functions.jsonl/84161 | {
"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,
75866,
10495,
17,
368,
341,
286,
1077,
1946,
284,
1946,
2346,
15604,
3759,
4493,
25245,
7944,
317,
286,
1077,
5206,
592,
284,
949,
17,
5384,
317,
286,
2060,
10714,
10297,
416,
11,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_cp_backup_numbered_with_t() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.arg("--backup=t")
.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_HOW_ARE_YOU_SOURCE)
.succeeds()
.no_stderr();
assert_eq!(at.read(TEST_HOW_ARE_YOU_SOURCE), "Hello, World!\n");
asser... | rust_cleaned_test_functions.jsonl/21252 | {
"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,
39811,
44710,
5500,
291,
6615,
528,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
575,
8710,
21186,
21549,
31371,
24000,
1138,
286,
659,
858,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mark_valid_invalid_forks_duplicate() {
let (
mut heaviest_subtree_fork_choice,
duplicate_leaves_descended_from_4,
duplicate_leaves_descended_from_5,
) = setup_duplicate_forks();
let stake = 100;
let (bank, vote_pubkeys) = bank_u... | rust_cleaned_test_functions.jsonl/85884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
8337,
31433,
761,
73302,
70434,
368,
341,
286,
1077,
2399,
310,
5206,
566,
98362,
5228,
9344,
761,
669,
31936,
345,
310,
22513,
11751,
4693,
10986,
2883,
5673,
62,
19,
345,
310,
22513,
1175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_Hlist_macro() {
let h1: Hlist!(i32, &str, i32) = hlist![1, "2", 3];
let h2: Hlist!(i32, &str, i32,) = hlist![1, "2", 3];
let h3: Hlist!(i32) = hlist![1];
let h4: Hlist!(i32,) = hlist![1,];
assert_eq!(h1, h2);
assert_eq!(h3, h4);
} | rust_cleaned_test_functions.jsonl/24750 | {
"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,
2039,
1607,
58810,
368,
341,
286,
1077,
305,
16,
25,
472,
1607,
10297,
72,
18,
17,
11,
609,
495,
11,
600,
18,
17,
8,
284,
305,
1607,
20703,
16,
11,
330,
17,
497,
220,
18,
935,
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_inode_store_get_by_path() {
let store = build_basic_store();
assert_eq!(store.get_by_path("/").unwrap().attr.ino, 1);
assert_eq!(store.get_by_path("/data").unwrap().attr.ino, 2);
assert_eq!(store.get_by_path("/data/foo.txt").unwrap().attr.ino, 3);
assert_e... | rust_cleaned_test_functions.jsonl/35694 | {
"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,
46748,
14809,
3062,
3710,
2638,
368,
341,
286,
1077,
3553,
284,
1936,
34729,
14809,
543,
286,
2060,
10714,
10297,
4314,
670,
3710,
2638,
4283,
1827,
15454,
1005,
2991,
1858,
78,
11,
220,
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_getcwd() {
// chdir changes the process's cwd
#[allow(unused_variables)]
let m = ::CWD_MTX.lock().expect("Mutex got poisoned by another test");
let tmpdir = TempDir::new("test_getcwd").unwrap();
let tmpdir_path = tmpdir.path().canonicalize().unwrap();
assert!(chdir(&tmpd... | rust_cleaned_test_functions.jsonl/8993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
32165,
368,
341,
262,
442,
521,
3741,
4344,
279,
1882,
594,
46938,
198,
262,
11506,
7183,
18364,
2591,
28182,
5563,
262,
1077,
296,
284,
3504,
34,
17563,
1245,
22867,
21003,
1005,
17119,
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... | 2 |
#[test]
fn test_from_config_true() {
let mut c = Config::with_none();
c.indicators = Some(true);
assert_eq!(Some(Indicators(true)), Indicators::from_config(&c));
} | rust_cleaned_test_functions.jsonl/80247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5332,
16082,
368,
341,
286,
1077,
5206,
272,
284,
5532,
486,
4197,
31488,
543,
286,
272,
28473,
42052,
284,
4329,
3715,
317,
286,
2060,
10714,
10297,
8373,
7,
1425,
42052,
3715,
5731,
2263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_path_with_path() {
check(
r#"
macro_rules! m {
($p:path) => { fn foo() { let a = $p::bar; } }
}
m! { foo }
"#,
expect![[r#"
macro_rules! m {
($p:path) => { fn foo() { let a = $p::bar; } }
}
fn foo() {
let a = foo::bar;
}
"#]],
);
} | rust_cleaned_test_functions.jsonl/85223 | {
"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,
2638,
6615,
2638,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
79,
71796,
8,
589,
314,
5168,
15229,
368,
314,
1077,
264,
284,
400,
79,
486,
2257,
26,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fees_to_request_valid() {
let (wallet, input_address) = init_wallet_with_address();
let fake_request = json!({
"operation": {
"type": "3"
}
});
let txo = TXO { address: input_address, seq_no: 1 };
let inputs = json!([txo.to_libindy_string().unw... | rust_cleaned_test_functions.jsonl/90660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 821
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
761,
5516,
2346,
7893,
8337,
368,
341,
262,
1077,
320,
35735,
11,
1946,
6744,
8,
284,
2930,
62308,
6615,
6744,
1428,
262,
1077,
12418,
7893,
284,
2951,
0,
2262,
981,
330,
9262,
788,
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_gpio_set_low() {
let mut mem = DirectMemory::get().unwrap();
let mut gpio_iface = mem.gpio().unwrap();
gpio_iface.pin_low( 26 );
} | rust_cleaned_test_functions.jsonl/32913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32001,
2602,
23767,
368,
341,
286,
1077,
5206,
1833,
284,
7139,
10642,
486,
455,
1005,
15454,
543,
286,
1077,
5206,
31622,
67666,
284,
1833,
1302,
11917,
1005,
15454,
543,
286,
31622,
67666,
50642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_xclip_prefix_custom() {
let x = b"GGGGGGATG";
let y = b"ATG";
let score = |a: u8, b: u8| if a == b { 1i32 } else { -1i32 };
let scoring = Scoring::new(-5, -1, &score).xclip(-5);
let mut aligner = banded::Aligner::with_scoring(scoring, 10, 10);
le... | rust_cleaned_test_functions.jsonl/126759 | {
"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,
3212,
7974,
13974,
15875,
368,
341,
286,
1077,
856,
284,
293,
1,
22254,
22254,
22254,
828,
38,
876,
286,
1077,
379,
284,
293,
1,
828,
38,
3302,
286,
1077,
5456,
284,
760,
64,
25,
575,
23,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extract_struct_several_fields_tuple() {
check_assist(
extract_struct_from_enum_variant,
"enum A { $0One(u32, u32) }",
r#"struct One(u32, u32);
enum A { One(One) }"#,
);
} | rust_cleaned_test_functions.jsonl/36290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
15126,
3453,
17539,
12132,
21773,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
15126,
5673,
31054,
46112,
345,
310,
330,
9018,
362,
314,
400,
15,
3966,
8154,
18,
17,
11,
575,
18,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compound_rollback() {
let mut sqlite = db::new_connection("").unwrap();
let mut conn = Conn::connect(&mut sqlite).unwrap();
let tempid_offset = get_next_entid(&conn);
// Nothing in the store => USER0 should be our starting point.
assert_eq!(tempid_offset... | rust_cleaned_test_functions.jsonl/76421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
795,
62,
33559,
368,
341,
286,
1077,
5206,
22003,
284,
2927,
486,
931,
15866,
80821,
15454,
543,
286,
1077,
5206,
4534,
284,
18213,
486,
6459,
2099,
6984,
22003,
568,
15454,
1428,
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... | 3 |
#[test]
fn test_canonicalize_resource_3() {
let url = url::Url::parse(
"https://myaccount-secondary.blob.core.windows.\
net/mycontainer/myblob",
)
.unwrap();
assert_eq!(
super::canonicalized_resource(
&MockClientEndpoint {
... | rust_cleaned_test_functions.jsonl/5201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
17962,
62,
18,
368,
341,
286,
1077,
2515,
284,
2515,
486,
2864,
486,
6400,
1006,
310,
330,
2428,
1110,
2408,
4608,
29383,
96281,
4871,
68113,
13,
5661,
1797,
4179,
34198,
3586,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signs_and_verifies_empty_message() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let mut jscontext = JavaScript::new(format!("{}/xpring.js", out_dir))?;
let signed_message = sign(
&mut jscontext,
"".to_owned(),
"000974B4CFE004A2E6C... | rust_cleaned_test_functions.jsonl/118751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
82,
8378,
26042,
9606,
15124,
6462,
368,
341,
286,
1077,
700,
4334,
284,
1460,
486,
3160,
486,
947,
445,
3656,
8291,
1827,
15454,
543,
286,
1077,
5206,
6994,
2147,
284,
12914,
486,
931,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_progress_leader() {
setup_for_test();
let mut raft = new_test_raft(1, vec![1, 2], 5, 1, new_storage());
raft.become_candidate();
raft.become_leader();
raft.mut_prs().get_mut(2).unwrap().become_replicate();
let prop_msg = new_message(1, 1, MessageType::MsgPropose, 1);
... | rust_cleaned_test_functions.jsonl/107089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27200,
79991,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5206,
52455,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
20,
11,
220,
16,
11,
501,
23310,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dir_locking() {
let name = setup_env();
let mut state = match State::load_else_create(&name) {
Ok(state) => state,
Err(_e) => return,
};
if let Err(_e) = state.set("var", String::from("some value")) {
return;
}
let state2 = State::load_else_create(&name).unwrap();
println!("foo: {... | rust_cleaned_test_functions.jsonl/55494 | {
"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,
4334,
9818,
287,
368,
341,
10217,
829,
284,
6505,
15879,
543,
10217,
5206,
1584,
284,
2432,
3234,
486,
1078,
62628,
8657,
2099,
606,
8,
341,
197,
197,
11578,
8390,
8,
589,
1584,
345,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_on_nonzero_integer_u8() {
let bytes = &[0];
assert_eq!(
std::num::NonZeroU8::try_from_slice(bytes)
.unwrap_err()
.to_string(),
ERROR_INVALID_ZERO_VALUE
);
} | rust_cleaned_test_functions.jsonl/103722 | {
"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,
19359,
4470,
21637,
14154,
31725,
7300,
23,
368,
341,
262,
1077,
5820,
284,
44590,
15,
935,
262,
2060,
10714,
33673,
286,
1460,
486,
2413,
486,
8121,
17999,
52,
23,
486,
1539,
5673,
26488,
23158,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_revocation() {
let test_config = KeylimeConfig::default();
let sig_path = Path::new(env!("CARGO_MANIFEST_DIR"))
.join("test-data/revocation.sig");
let signature = fs::read_to_string(sig_path).unwrap(); //#[allow_ci]
let message_path = Path::n... | rust_cleaned_test_functions.jsonl/120975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 634
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
38082,
2276,
368,
341,
286,
1077,
1273,
5332,
284,
5309,
38943,
2648,
486,
2258,
1428,
286,
1077,
8366,
2638,
284,
7933,
486,
931,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
5455,
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_transfer_charging_gas_success() {
let (mut runner, mut source_account, dest_address) = initialize_transfer();
let source_address = test_utils::address_from_secret_key(&source_account.secret_key);
let transaction = |nonce| {
let mut tx = test_utils::transfer(dest_address, TRAN... | rust_cleaned_test_functions.jsonl/131048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 737
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
4138,
74716,
82116,
18632,
368,
341,
262,
1077,
320,
6984,
22259,
11,
5206,
2530,
13500,
11,
3201,
6744,
8,
284,
9468,
35403,
543,
262,
1077,
2530,
6744,
284,
1273,
17309,
486,
4995,
5673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_attribute_view_from_per_attribute() {
let reference_points = vec![
TestPointType {
intensity: 42,
gps_time: 0.123,
},
TestPointType {
intensity: 43,
gps_time: 0.456,
},
... | rust_cleaned_test_functions.jsonl/73944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
16791,
7122,
5673,
5678,
16791,
368,
341,
286,
1077,
5785,
12928,
284,
7486,
90515,
310,
3393,
2609,
929,
341,
394,
20612,
25,
220,
19,
17,
345,
394,
45567,
3009,
25,
220,
15,
13,
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... | 1 |
#[test]
fn test_bytes_set_memory() {
use slice::bytes::MutableByteVector;
let mut values = [1u8,2,3,4,5];
values.mut_slice(0,5).set_memory(0xAB);
assert!(values == [0xAB, 0xAB, 0xAB, 0xAB, 0xAB]);
values.mut_slice(2,4).set_memory(0xFF);
assert!(values == [0xAB, 0x... | rust_cleaned_test_functions.jsonl/33158 | {
"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,
12524,
2602,
19195,
368,
341,
286,
990,
15983,
486,
9651,
486,
11217,
7153,
3781,
280,
286,
1077,
5206,
2750,
284,
508,
16,
84,
23,
11,
17,
11,
18,
11,
19,
11,
20,
935,
286,
2750,
744,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fill_profile_map() -> Result<(), StsClientError> {
let prof_map = AwsProfileInfo::fill_profile_map()?;
for (k, v) in &prof_map {
println!("{} {:?}", k, v);
}
assert!(prof_map.len() > 0);
assert!(prof_map.contains_key("default"));
Ok(())... | rust_cleaned_test_functions.jsonl/7880 | {
"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,
30728,
13789,
5376,
368,
1464,
5714,
68843,
794,
82,
2959,
1454,
29,
341,
286,
1077,
2778,
5376,
284,
40083,
8526,
1731,
486,
7559,
13789,
5376,
94136,
286,
369,
320,
74,
11,
348,
8,
304,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_log2() {
let tests = vec![
(Datum::F64(16_f64), 4_f64),
(Datum::F64(5_f64), 2.321928094887362_f64),
];
let tests_invalid_f64 = vec![
(Datum::F64(-1.234_f64), Datum::Null),
(Datum::F64(0_f64), Datum::Null),
(Datu... | rust_cleaned_test_functions.jsonl/13164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
17,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
68036,
486,
37,
21,
19,
7,
16,
21,
761,
21,
19,
701,
220,
19,
761,
21,
19,
1326,
310,
320,
68036,
486,
37,
21,
19,
7,
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... | 3 |
#[test]
fn test_call_reg() {
let prog = &mut [
0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // r0 = 0
0xb7, 0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // r8 = 1
0x67, 0x08, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00,
0x47, 0x08, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00,
0x8D, 0... | rust_cleaned_test_functions.jsonl/15542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
4920,
368,
341,
262,
1077,
29271,
284,
609,
6984,
2278,
286,
220,
15,
7929,
22,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merge_empty() {
let mut vector_in:Vec<i32> = vec![];
merge_sort(&mut vector_in);
debug_assert_eq!(vector_in, &[]);
} | rust_cleaned_test_functions.jsonl/25081 | {
"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,
20888,
15124,
368,
341,
286,
1077,
5206,
4621,
1243,
25,
10050,
21897,
18,
17,
29,
284,
7486,
0,
15078,
286,
10880,
18435,
2099,
6984,
4621,
1243,
317,
286,
7390,
16553,
10714,
10297,
3215,
1243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bool_array_and_sliced_same_offset_mod8() {
let a = BooleanArray::from(vec![
false, false, true, true, false, false, false, false, false, false, false,
false,
]);
let b = BooleanArray::from(vec![
false, false, false, false, false, false,... | rust_cleaned_test_functions.jsonl/118981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
3858,
8378,
643,
74630,
33574,
6917,
7480,
23,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
25592,
90515,
310,
895,
11,
895,
11,
830,
11,
830,
11,
895,
11,
895,
11,
895,
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_string_stack() {
test_interpreter_and_jit_asm!(
"
mov r1, 0x78636261
stxw [r10-8], r1
mov r6, 0x0
stxb [r10-4], r6
stxb [r10-12], r6
mov r1, 0x79636261
stxw [r10-16], r1
mov r1, r10
add r1, -8
mov r2, r1
... | rust_cleaned_test_functions.jsonl/59032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 604
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
15528,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
16,
11,
220,
15,
87,
22,
23,
21,
18,
21,
17,
21,
16,
198,
286,
357,
87,
86,
508,
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_heikin_ashi() {
let mut candles = RandomCandles::default();
let first = candles.first();
let mut heikin_ashi = HeikinAshi::new((), &first).unwrap();
let prev = candles.first();
candles
.take(100)
.map(|candle| {
let open = (prev.open() + prev.close()) / 2.0;
let close ... | rust_cleaned_test_functions.jsonl/24547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41876,
1579,
258,
62,
30378,
368,
341,
197,
10217,
5206,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
197,
10217,
1156,
284,
51205,
7389,
543,
197,
10217,
5206,
566,
1579,
258,
62,
30378,
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_edgengram_tokenizer_right() {
let tokenizer = NGramTokenizer::new("hello world", 2, 3, Edge::Right);
let tokens = tokenizer.collect::<Vec<Token>>();
assert_eq!(tokens, vec![
Token { term: Term::from_string("lo"), position: 1 },
Token { term: Term:... | rust_cleaned_test_functions.jsonl/50145 | {
"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,
32370,
70,
826,
2396,
6458,
3135,
10539,
368,
341,
286,
1077,
45958,
284,
20018,
2396,
37434,
486,
931,
445,
14990,
1879,
497,
220,
17,
11,
220,
18,
11,
10349,
486,
5979,
317,
286,
1077,
11211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dialects() -> Result<()> {
// Generic
let query: Query = parse(
r###"
prql dialect:generic
from Employees
select [FirstName]
take 3
"###,
)?;
assert_display_snapshot!((resolve_and_translate(query)?), @r###"
... | rust_cleaned_test_functions.jsonl/62563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
55056,
82,
368,
1464,
5714,
71698,
341,
286,
442,
21281,
198,
286,
1077,
3239,
25,
11361,
284,
4715,
1006,
310,
435,
14374,
698,
286,
548,
1470,
42279,
25,
35787,
198,
286,
504,
43641,
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... | 5 |
#[test]
fn test_install_mode_numeric() {
let (at, mut ucmd) = at_and_ucmd!();
let dir = "test_install_target_dir_dir_e";
let file = "test_install_target_dir_file_e";
let mode_arg = "--mode=333";
at.touch(file);
at.mkdir(dir);
ucmd.arg(file).arg(dir).arg(mode_arg).succeeds().no_stder... | rust_cleaned_test_functions.jsonl/124409 | {
"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,
34245,
7302,
29418,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
5419,
284,
330,
1944,
34245,
11123,
4334,
4334,
2204,
876,
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_key_type() {
let table_create = TableCreateCommand::new("Test".to_string())
.key_type(DataType::TokyoGeoPoint);
let mut arg: HashMap<String, String> = HashMap::new();
arg.insert("key_type".to_string(), "TokyoGeoPoint".to_string());
let expected = Table... | rust_cleaned_test_functions.jsonl/74221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
1819,
368,
341,
286,
1077,
1965,
8657,
284,
6633,
4021,
4062,
486,
931,
445,
2271,
3263,
983,
3904,
2398,
310,
659,
792,
1819,
63941,
486,
52854,
16032,
37344,
2609,
317,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compact_bools() {
let bools = &[
false, false, true, true, false, false, true, false, true, false,
];
let collected = compact_bools(bools);
let indexes: Vec<_> = iter_set_bools(bools).collect();
assert_eq!(collected.as_slice(), &[0b01001100, 0b... | rust_cleaned_test_functions.jsonl/29075 | {
"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,
18177,
531,
22159,
82,
368,
341,
286,
1077,
1807,
82,
284,
609,
9640,
310,
895,
11,
895,
11,
830,
11,
830,
11,
895,
11,
895,
11,
830,
11,
895,
11,
830,
11,
895,
345,
286,
9747,
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_receive_echo() {
crate::testutil::set_logger_for_test();
let req = IcmpEchoRequest::new(0, 0);
let req_body = &[1, 2, 3, 4];
let mut buffer = BufferSerializer::new_vec(Buf::new(req_body.to_vec(), ..))
.encapsulate(IcmpPacketBuilder::<Ipv4, &[u8], _>::... | rust_cleaned_test_functions.jsonl/55690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38557,
68628,
368,
341,
286,
17717,
486,
1944,
1314,
486,
746,
27413,
5478,
4452,
1428,
286,
1077,
4232,
284,
358,
7293,
74994,
1900,
486,
931,
7,
15,
11,
220,
15,
317,
286,
1077,
4232,
14114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_divu_pair() {
for d in 1..1024 {
for x in 0..1000 {
let ab = divu_gen(d as u32);
assert_eq!(x / d, divu_pair(x, ab));
}
}
} | rust_cleaned_test_functions.jsonl/46711 | {
"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,
16237,
84,
14445,
368,
341,
262,
369,
294,
304,
220,
16,
496,
16,
15,
17,
19,
341,
414,
369,
856,
304,
220,
15,
496,
16,
15,
15,
15,
341,
286,
1077,
668,
284,
3429,
84,
16322,
1500,
438,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_real_as_signed_real() {
test_none_with_nothing(cast_real_as_signed_real);
let cs = vec![
(f64::from(f32::MIN), f64::from(f32::MIN)),
(f64::from(f32::MAX), f64::from(f32::MAX)),
(f64::MIN, f64::MIN),
(0f64, 0f64),
... | rust_cleaned_test_functions.jsonl/1960 | {
"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,
15266,
11898,
55617,
15266,
368,
341,
286,
1273,
31488,
6615,
6536,
1596,
1337,
559,
15266,
11898,
55617,
15266,
626,
286,
1077,
10532,
284,
7486,
90515,
3374,
310,
320,
69,
21,
19,
486,
1499,
955... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decrypt_handle_bytes() {
let handle = DecryptHandle(RistrettoPoint::default());
let encoded = handle.to_bytes();
let decoded = DecryptHandle::from_bytes(&encoded).unwrap();
assert_eq!(handle, decoded);
} | rust_cleaned_test_functions.jsonl/36661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80764,
10630,
12524,
368,
341,
286,
1077,
3705,
284,
89146,
6999,
2785,
380,
2122,
983,
2609,
486,
2258,
5231,
286,
1077,
20498,
284,
3705,
2389,
12524,
543,
286,
1077,
29213,
284,
89146,
6999,
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 |
#[test]
fn test_case_1() {
let input = vec![16, 1, 2, 0, 4, 2, 7, 1, 2, 14];
assert_eq!(37, align_cheapest(&input));
} | rust_cleaned_test_functions.jsonl/27454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
16,
368,
341,
286,
1077,
1946,
284,
7486,
20703,
16,
21,
11,
220,
16,
11,
220,
17,
11,
220,
15,
11,
220,
19,
11,
220,
17,
11,
220,
22,
11,
220,
16,
11,
220,
17,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_invalid_requests() {
solana_logger::setup();
let alice = Keypair::new();
let test_validator = TestValidator::with_no_fees(alice.pubkey(), None);
let rpc_url = test_validator.rpc_url();
let bob_pubkey = solana_sdk::pubkey::new_rand();
// test invalid get_balance req... | rust_cleaned_test_functions.jsonl/64563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
31433,
37216,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
70433,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
1273,
64959,
284,
3393,
14256,
486,
4197,
6536,
761,
551... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_watch_devices_remove_existing_phy() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let test_values = test_setup();
let watcher_fut = test_values.watcher_fut;
pin_mut!(watcher_fut);
let service_fut = serve_monitor_requ... | rust_cleaned_test_functions.jsonl/20591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1030
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58562,
41334,
18193,
62630,
50266,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
1273,
9146,
284,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter() {
let bv = BitVec::from_bytes(&[0b1101_0000]);
assert_eq!(
(&bv).into_iter().collect::<Vec<bool>>(),
vec![true, true, false, true, false, false, false, false],
);
assert_eq!(
bv.into_iter().collect::<Vec<bool>>(),
... | rust_cleaned_test_functions.jsonl/128608 | {
"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,
11723,
368,
341,
286,
1077,
56937,
284,
6495,
10050,
486,
1499,
12524,
2099,
58,
15,
65,
16,
16,
15,
16,
62,
15,
15,
15,
15,
10149,
286,
2060,
10714,
33673,
310,
15899,
54929,
568,
18122,
1172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drain_sorted_leak() {
static DROPS: AtomicU32 = AtomicU32::new(0);
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord)]
struct D(u32, bool);
impl Drop for D {
fn drop(&mut self) {
DROPS.fetch_add(1, Ordering::SeqCst);
if self.1 {
pan... | rust_cleaned_test_functions.jsonl/62368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
41277,
11751,
585,
368,
341,
262,
1099,
422,
1285,
5012,
25,
30316,
52,
18,
17,
284,
30316,
52,
18,
17,
486,
931,
7,
15,
626,
262,
11506,
27098,
65297,
11,
55039,
11,
33122,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_no_builder_double_free2() {
let builder = {
let context = Context::create();
context.create_builder()
// Original Context drops fine
};
// Builder continues to function with different context
let context = Context::create();
let module = context.cre... | rust_cleaned_test_functions.jsonl/39118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
28532,
24598,
8905,
17,
368,
341,
262,
1077,
7363,
284,
341,
286,
1077,
2266,
284,
9608,
486,
3182,
1428,
286,
2266,
2520,
28532,
2822,
286,
442,
17230,
9608,
21025,
6915,
198,
262,
3634,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_message() {
let msg1 = b"content-length: 12\r\n\r\nhello world";
let mut reader1 = std::io::Cursor::new(msg1);
read_message(&mut reader1).unwrap();
} | rust_cleaned_test_functions.jsonl/70778 | {
"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,
31433,
6443,
6462,
368,
341,
262,
1077,
3750,
16,
284,
293,
1,
1796,
29325,
25,
220,
16,
17,
12016,
1699,
12016,
1699,
14990,
1879,
876,
262,
1077,
5206,
6604,
16,
284,
1460,
486,
815,
486,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rebase_descendants_basic_branch_update() {
let settings = testutils::user_settings();
let test_repo = testutils::init_repo(&settings, false);
let repo = &test_repo.repo;
// be updated to point to B2.
// B main B2 main
// A A
let mu... | rust_cleaned_test_functions.jsonl/130809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 499
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
3152,
10986,
28310,
34729,
28031,
8882,
368,
341,
262,
1077,
5003,
284,
1273,
6031,
486,
872,
10853,
543,
262,
1077,
1273,
37784,
284,
1273,
6031,
486,
2327,
37784,
2099,
6511,
11,
895,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.