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_milliliters() {
let expected = vec![
("330ml bottle".to_string(), 1),
("Twelve ounce bottle".to_string(), 1),
("Groish bottle".to_string(), 1),
("Half liter bottle".to_string(), 1),
("Pint".to_string(), 1),
("Graft b... | rust_cleaned_test_functions.jsonl/81448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
483,
3664,
388,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
3489,
18,
18,
15,
1014,
16486,
3263,
983,
3904,
1507,
220,
16,
1326,
310,
3489,
22816,
21210,
53708,
16486,
3263,
983,
3904... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dsu() {
let mut d = DisjointSetUnion::new(4);
d.unite(0, 1);
assert!(d.is_same(0, 1));
d.unite(1, 2);
assert!(d.is_same(0, 2));
assert_eq!(d.size(0), 3);
assert!(!d.is_same(0, 3));
} | rust_cleaned_test_functions.jsonl/57492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
27051,
368,
341,
286,
1077,
5206,
294,
284,
4093,
32850,
1649,
32658,
486,
931,
7,
19,
317,
286,
294,
6307,
632,
7,
15,
11,
220,
16,
317,
286,
2060,
10297,
67,
2079,
33574,
7,
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_advent_of_code_2020_day_17() {
// https://adventofcode.com/2020/day/17
let example_pattern = "
.#.
..#
###
";
let puzzle_pattern = "
#.#..###
.#....##
.###...#
..####..
....###.
##.#.#.#
..#..##.
... | rust_cleaned_test_functions.jsonl/106038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10027,
684,
3575,
4136,
62,
17,
15,
17,
15,
16763,
62,
16,
22,
368,
341,
262,
442,
3703,
1110,
329,
684,
1055,
1851,
905,
14,
17,
15,
17,
15,
44739,
14,
16,
22,
271,
262,
1077,
3110,
21260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_random_wallet_testnet_no_entropy() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let mut jscontext = JavaScript::new(format!("{}/xpring.js", out_dir))?;
let wallet = generate_random(&mut jscontext, None, true).unwrap();
assert!(!wallet.mnemonic.is_em... | rust_cleaned_test_functions.jsonl/118733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
22644,
62308,
4452,
4711,
6536,
50374,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_fail_fast() {
let r = flags_from_vec(svec!["deno", "test", "--fail-fast=3"]);
assert_eq!(
r.unwrap(),
Flags {
subcommand: DenoSubcommand::Test {
no_run: false,
doc: false,
fail_fast: Some(3),
filter: None,
allow_n... | rust_cleaned_test_functions.jsonl/2031 | {
"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,
6615,
22121,
35743,
368,
341,
262,
1077,
435,
284,
8042,
5673,
13251,
1141,
4083,
0,
1183,
5183,
78,
497,
330,
1944,
497,
14482,
18403,
73668,
28,
18,
15049,
262,
2060,
10714,
33673,
414,
435,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fold_cmp_non_null() {
// i64
assert_eq_fold_eq(I64(1), I64(1), Bool(true));
assert_eq_fold_eq(I64(1), I64(-1), Bool(false));
assert_eq_fold_gt(I64(1), I64(1), Bool(false));
assert_eq_fold_gt(I64(1), I64(-1), Bool(true));
assert_eq_fold_ge(I64(1), I... | rust_cleaned_test_functions.jsonl/23349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
35193,
21637,
15162,
368,
341,
286,
442,
600,
21,
19,
198,
286,
2060,
10714,
61187,
10714,
8972,
21,
19,
7,
16,
701,
358,
21,
19,
7,
16,
701,
12608,
3715,
1106,
286,
2060,
10714,
61187,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_missing_data_indexes() {
let slot = 0;
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
// Write entries
let gap: u64 = 10;
assert!(gap > 3);
// Create enough entrie... | rust_cleaned_test_functions.jsonl/9545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
40447,
1769,
50161,
368,
341,
286,
1077,
9446,
284,
220,
15,
280,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_assert_dir() {
let tmpdir = assert_setup!();
let temp_dir = tmpdir.mash("foo");
assert_no_dir!(&temp_dir);
assert!(!sys::is_dir(&temp_dir));
sys::mkdir(&temp_dir).unwrap();
assert_dir!(&temp_dir);
assert!(sys::is_dir(&temp_dir));
... | rust_cleaned_test_functions.jsonl/92821 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
4334,
368,
341,
286,
1077,
4174,
3741,
284,
2060,
21363,
0,
1428,
286,
1077,
2730,
4334,
284,
4174,
3741,
744,
988,
445,
7975,
797,
286,
2060,
6536,
4334,
0,
2099,
3888,
4334,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_large_num_coding() {
solana_logger::setup();
let slot = 1;
let (_data_shreds, mut coding_shreds, leader_schedule_cache) =
setup_erasure_shreds(slot, 0, 100);
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::op... | rust_cleaned_test_functions.jsonl/9583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
4273,
666,
3700,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
9446,
284,
220,
16,
280,
286,
1077,
5453,
691,
3712,
53369,
11,
5206,
10822,
3712,
53369,
11,
7653,
34530,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mandali() {
run_test(
&TEST_DATA,
"directwrite/good-mandali.te",
"telugu/Mandali-Regular.ttf",
&[JOINER_GLYPH_INDEX],
0,
);
} | rust_cleaned_test_functions.jsonl/91214 | {
"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,
717,
437,
7956,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
19798,
4934,
4846,
1386,
1448,
437,
7956,
31853,
756,
503,
330,
22924,
29785,
10270,
437,
7956,
87591,
45192,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_macro_empty() {
let array: Vec<u8> = vec![];
let bytes: Vec<u8> = to_bytes![array].unwrap();
assert_eq!(&bytes, &[]);
assert_eq!(bytes.len(), 0);
} | rust_cleaned_test_functions.jsonl/64713 | {
"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,
58810,
15124,
368,
341,
286,
1077,
1334,
25,
11312,
34837,
23,
29,
284,
7486,
0,
15078,
286,
1077,
5820,
25,
11312,
34837,
23,
29,
284,
311,
12524,
20703,
1653,
936,
15454,
543,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_partial_eq() {
let s: ByteString = ByteString::from_static("test");
assert_eq!(s, "test");
assert_eq!(s, *"test");
assert_eq!(s, "test".to_string());
} | rust_cleaned_test_functions.jsonl/129999 | {
"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,
52068,
10714,
368,
341,
286,
1077,
274,
25,
95302,
284,
95302,
486,
1499,
25360,
445,
1944,
797,
286,
2060,
10714,
10297,
82,
11,
330,
1944,
797,
286,
2060,
10714,
10297,
82,
11,
91204,
1944,
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 |
#[test]
fn test_doc_as_description() {
let attrs: ParamAttrs = syn::parse_quote!(
/// DOC-DESC-1
#[param(name = "NAME")]
);
assert_eq!(attrs.desc, Some("DOC-DESC-1".to_string()));
let attrs: ParamAttrs = syn::parse_quote!(
/// DOC-DESC-2
... | rust_cleaned_test_functions.jsonl/22303 | {
"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,
18869,
11898,
11448,
368,
341,
286,
1077,
16204,
25,
6991,
53671,
284,
6782,
486,
6400,
45236,
33673,
310,
1048,
60355,
12,
30910,
12,
16,
198,
310,
11506,
903,
3153,
284,
330,
7535,
5422,
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_wpubkey_hash() {
let pk = PublicKey::from_str("032e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd1af").unwrap();
let upk = PublicKey::from_str("042e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd1af191923a2964c177f5b5923ae500fca49e99492d534aa3759d6b25a8bc... | rust_cleaned_test_functions.jsonl/41456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
9585,
792,
8950,
368,
341,
286,
1077,
22458,
284,
70280,
486,
1499,
2895,
445,
15,
18,
17,
68,
20,
23,
5645,
20,
16,
69,
24,
291,
23,
329,
18,
638,
22,
23,
24,
22,
69,
21,
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_write_info_field_value_with_string_array_value() -> io::Result<()> {
use vcf::record::info::field;
fn t(buf: &mut Vec<u8>, value: Option<&field::Value>, expected: &[u8]) -> io::Result<()> {
buf.clear();
write_info_field_value(buf, value)?;
ass... | rust_cleaned_test_functions.jsonl/6253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3109,
5013,
3142,
6615,
3904,
3858,
3142,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
990,
348,
9792,
486,
8548,
486,
2733,
486,
2566,
401,
286,
5168,
259,
10731,
25,
609,
6984,
11312,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_epoch_hash_rate_dampening() {
let cellbase = TransactionBuilder::default()
.witness(Script::default().into_witness())
.input(CellInput::new(OutPoint::null(), 0))
.build();
let dao = genesis_dao_data(vec![&cellbase]).unwrap();
let genesis_block = BlockBuilder::... | rust_cleaned_test_functions.jsonl/105199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20682,
8950,
9246,
814,
1121,
6019,
368,
341,
262,
1077,
2779,
3152,
284,
17869,
3297,
486,
2258,
741,
286,
659,
86,
8091,
3759,
1228,
486,
2258,
1005,
18122,
1670,
8091,
2398,
286,
659,
1355,
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_eval_def_cfa_register_invalid_context() {
let cie = make_test_cie();
let mut ctx = UnwindContext::new();
ctx.set_cfa(CfaRule::Expression(Expression(EndianSlice::new(
&[],
LittleEndian,
))));
let expected = ctx.clone();
let i... | rust_cleaned_test_functions.jsonl/9350 | {
"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,
21296,
7844,
666,
3632,
14000,
31433,
8467,
368,
341,
286,
1077,
272,
645,
284,
1281,
4452,
666,
645,
543,
286,
1077,
5206,
5635,
284,
1230,
19154,
1972,
486,
931,
543,
286,
5635,
980,
666,
3632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rwlock() {
use crate::sync::RwLock;
use crate::wait::Waiter;
async fn test_share_read() {
let lock = Arc::new(RwLock::new(1));
let c_lock = lock.clone();
let n = lock.read().await;
assert_eq!(*n, 1);
crate::ta... | rust_cleaned_test_functions.jsonl/22989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1516
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98850,
368,
341,
286,
990,
17717,
486,
12996,
486,
49,
86,
11989,
280,
286,
990,
17717,
486,
11489,
486,
14190,
261,
401,
286,
3312,
5168,
1273,
38272,
6443,
368,
341,
310,
1077,
5296,
284,
1968... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ip_address() {
let mut test_config = create_test_config_no_paths();
test_config.device_config = Some(build_full_config());
let intfs = build_full_config().device.interfaces.unwrap();
let subif = &intfs[0].interface.subinterfaces.as_ref().unwrap()[0];
l... | rust_cleaned_test_functions.jsonl/83817 | {
"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,
3062,
10385,
6744,
368,
341,
286,
1077,
5206,
1273,
5332,
284,
1855,
4452,
5332,
6536,
24152,
543,
286,
1273,
5332,
18355,
5332,
284,
4329,
43333,
16372,
5332,
1423,
286,
1077,
526,
3848,
284,
193... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_to_end_capacity() -> io::Result<()> {
let input = &b"foo"[..];
// and so that it can distinguish EOF. Assert that this is the case
// implementation of read_to_end. Even though vec1 is allocated with
// space here.
let mut ... | rust_cleaned_test_functions.jsonl/8687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2346,
6213,
35603,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
1946,
284,
609,
65,
1,
7975,
36864,
496,
4821,
1789,
286,
442,
323,
773,
429,
432,
646,
32037,
29457,
13,
5319,
429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_array_builder_from_schema_unsupported_type() {
let mut fields = vec![Field::new("f1", DataType::Int16, false)];
let list_type =
DataType::List(Box::new(Field::new("item", DataType::Int64, true)));
fields.push(Field::new("f2", list_type, false));
... | rust_cleaned_test_functions.jsonl/87818 | {
"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,
15126,
3858,
28532,
5673,
25371,
4907,
18216,
1819,
368,
341,
286,
1077,
5206,
5043,
284,
7486,
20703,
1877,
486,
931,
445,
69,
16,
497,
33172,
486,
1072,
16,
21,
11,
895,
12587,
286,
1077,
1140... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_legal_moves_banmen_with_kyou_nari_7_squares_gote() {
test_legal_moves_banmen_with_kin_7_squares_gote_impl(GKyouN)
} | rust_cleaned_test_functions.jsonl/81275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
4698,
9330,
1089,
2780,
62,
22,
643,
40856,
1889,
1272,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
1889,
1272,
21007,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unsupported_expression() {
let expr = datafusion::logical_plan::Expr::Not(Box::new(
datafusion::logical_plan::Expr::BinaryExpr {
left: Box::new(datafusion::logical_plan::Expr::Column(
datafusion::logical_plan::Column {
... | rust_cleaned_test_functions.jsonl/106782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
18216,
28068,
368,
341,
286,
1077,
15169,
284,
821,
54565,
486,
30256,
26564,
486,
16041,
486,
2623,
67758,
486,
931,
1006,
310,
821,
54565,
486,
30256,
26564,
486,
16041,
486,
21338,
16041,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_0xaa_tax_move_a_to_x() {
let bus = Bus::new();
let mut cpu = CPU::new(bus);
cpu.register_a = 10;
cpu.load(vec![0xa9, 0x0A, 0xaa, 0x00]);
cpu.reset();
cpu.program_counter = 0x0600;
cpu.run();
assert_eq!(cpu.register_x, 10)
} | rust_cleaned_test_functions.jsonl/56541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
43300,
24579,
17134,
4306,
2346,
3212,
368,
341,
286,
1077,
5828,
284,
18598,
486,
931,
543,
286,
1077,
5206,
17319,
284,
13940,
486,
931,
60872,
317,
286,
17319,
9929,
4306,
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... | 1 |
#[test]
fn test_tt_group() {
check(
r#"
macro_rules! m { ($($tt:tt)*) => { $($tt)* } }
m! { fn foo() {} }"
"#,
expect![[r#"
macro_rules! m { ($($tt:tt)*) => { $($tt)* } }
fn foo() {}"
"#]],
);
} | rust_cleaned_test_functions.jsonl/85240 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66740,
6288,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
314,
1711,
699,
5566,
25,
5566,
8,
3764,
589,
314,
93977,
5566,
4806,
335,
456,
76,
0,
314,
5168,
15229,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_full_example() {
let ref a = LpInteger::new("a").lower_bound(1.0);
let ref b = LpInteger::new("b").upper_bound(10.0);
let ref c = LpInteger::new("c").lower_bound(2.0).upper_bound(8.5);
let ref d = LpBinary::new("d");
let ref e = LpContinuous::new("e");
let mut problem = ... | rust_cleaned_test_functions.jsonl/19664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
39304,
368,
341,
262,
1077,
2053,
264,
284,
444,
79,
3486,
486,
931,
445,
64,
1827,
14772,
19447,
7,
16,
13,
15,
317,
262,
1077,
2053,
293,
284,
444,
79,
3486,
486,
931,
445,
65,
1827... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_split_lines_number() {
// Test if stdout/stderr for '--lines' option is correct
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch("file");
scene
.ucmd()
.args(&["--lines", "2", "file"])
.succeeds()
.no_stderr()
... | rust_cleaned_test_functions.jsonl/25862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
18323,
5500,
368,
341,
262,
442,
3393,
421,
20075,
21546,
615,
369,
17304,
7969,
6,
2999,
374,
4396,
198,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fill_bytes_default() {
let mut r = StepRng::new(0x11_22_33_44_55_66_77_88, 0);
let lengths = [0, 1, 2, 3, 4, 5, 6, 7, 80, 81, 82, 83, 84, 85, 86, 87];
for &n in lengths.iter() {
let mut buffer = [0u8; 87];
let v = &mut buffer[0..n];
... | rust_cleaned_test_functions.jsonl/10494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
12524,
9993,
368,
341,
286,
1077,
5206,
435,
284,
14822,
49,
968,
486,
931,
7,
15,
87,
16,
16,
62,
17,
17,
62,
18,
18,
62,
19,
19,
62,
20,
20,
62,
21,
21,
62,
22,
22,
62,
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... | 4 |
#[test]
fn test_fork_merge_true() {
let mut ds = DataStack::new();
let cs = TestConstraintSystem::<Bn256>::new();
let value = Scalar::new_constant_usize(42, zinc_types::ScalarType::Field);
ds.set(4, Cell::Value(value))
.expect(zinc_const::panic::TEST_DATA_VALID);
ds.fork();
ass... | rust_cleaned_test_functions.jsonl/106057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
669,
20888,
16082,
368,
341,
262,
1077,
5206,
11472,
284,
2885,
4336,
486,
931,
543,
262,
1077,
10532,
284,
3393,
17890,
2320,
27638,
33,
77,
17,
20,
21,
6831,
931,
543,
262,
1077,
897,
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_inet6_ntoa() {
let test_cases = vec![
(Some(hex("00000000")), Some(b"0.0.0.0".to_vec())),
(Some(hex("0A000509")), Some(b"10.0.5.9".to_vec())),
(
Some(hex("00000000000000000000000001020304")),
Some(b"::1.2.3.4".to_vec()),... | rust_cleaned_test_functions.jsonl/59414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 935
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
295,
21,
38945,
19533,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
8373,
44660,
445,
15,
15,
15,
15,
15,
15,
15,
15,
35674,
4329,
1883,
1,
15,
13,
15,
13,
15,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_panic() {
let mut rng = SmallRng::seed_from_u64(0);
Totro::generate(5, 3, &mut rng);
} | rust_cleaned_test_functions.jsonl/65543 | {
"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,
620,
31270,
368,
341,
286,
1077,
5206,
28422,
284,
14994,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
15,
317,
286,
38020,
299,
486,
19366,
7,
20,
11,
220,
18,
11,
609,
6984,
28422,
317,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_which_extension() {
let f = TestFixture::new();
let b = Path::new(&BIN_NAME).with_extension("");
assert_eq!(_which(&f, &b).unwrap(), f.bins[0])
} | rust_cleaned_test_functions.jsonl/13397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
8206,
31035,
368,
341,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
293,
284,
7933,
486,
931,
2099,
58531,
4708,
568,
4197,
31035,
13056,
262,
2060,
10714,
0,
2490,
8206,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_lookup_line() {
let lines = &[BytePos(3), BytePos(17), BytePos(28)];
assert_eq!(lookup_line(lines, BytePos(0)), -1);
assert_eq!(lookup_line(lines, BytePos(3)), 0);
assert_eq!(lookup_line(lines, BytePos(4)), 0);
assert_eq!(lookup_line(lines, BytePos(16)),... | rust_cleaned_test_functions.jsonl/4489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
6528,
368,
341,
286,
1077,
5128,
284,
44590,
7153,
4859,
7,
18,
701,
10906,
4859,
7,
16,
22,
701,
10906,
4859,
7,
17,
23,
73663,
286,
2060,
10714,
10297,
21020,
6528,
33152,
11,
10906,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json() {
assert_eq!(json(&true).unwrap().unsafe_string(), "true");
assert_eq!(json(&"foo").unwrap().unsafe_string(), r#""foo""#);
assert_eq!(
json(&vec!["foo", "bar"]).unwrap().unsafe_string(),
r#"[
"foo",
"bar"
]"#
);
} | rust_cleaned_test_functions.jsonl/23109 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
368,
341,
286,
2060,
10714,
10297,
2236,
2099,
1866,
568,
15454,
1005,
38157,
3904,
1507,
330,
1866,
797,
286,
2060,
10714,
10297,
2236,
2099,
1,
7975,
1827,
15454,
1005,
38157,
3904,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_local_msg() {
let tests = vec![
(MessageType::MsgHup, true),
(MessageType::MsgBeat, true),
(MessageType::MsgUnreachable, true),
(MessageType::MsgSnapStatus, true),
(MessageType::MsgCheckQuorum, true),
(MessageType... | rust_cleaned_test_functions.jsonl/8381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
13564,
6483,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
82107,
486,
6611,
39,
454,
11,
830,
1326,
310,
320,
82107,
486,
6611,
43658,
11,
830,
1326,
310,
320,
82107,
486,
6611,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vdpa_kern_new_device() {
let m = GuestMemoryMmap::<()>::from_ranges(&[(GuestAddress(0), 0x10_0000)]).unwrap();
let vdpa = unwrap_not_found!(VhostKernVdpa::new(VHOST_VDPA_PATH, &m));
assert!(vdpa.as_raw_fd() >= 0);
assert!(vdpa.mem().find_region(GuestAddress(0x100... | rust_cleaned_test_functions.jsonl/127247 | {
"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,
2273,
67,
6595,
4698,
932,
5921,
9204,
368,
341,
286,
1077,
296,
284,
26215,
10642,
44,
2186,
27638,
368,
6831,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
62,
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_stream_to_rank() {
let rank = vec![6.0,3.0,4.0].to_rank();
assert!(rank == vec![2,0,1]);
} | rust_cleaned_test_functions.jsonl/132707 | {
"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,
12673,
2346,
20417,
368,
341,
286,
1077,
7077,
284,
7486,
20703,
21,
13,
15,
11,
18,
13,
15,
11,
19,
13,
15,
936,
983,
20417,
543,
286,
2060,
10297,
13129,
621,
7486,
20703,
17,
11,
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 |
#[test]
fn test_select_repositories_by_name() {
assert_eq!("SELECT * FROM repositories WHERE name='rejasupotaro/cref'",
select_repositories_by_name(&"rejasupotaro/cref".to_string()));
} | rust_cleaned_test_functions.jsonl/33811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
1288,
17286,
3710,
1269,
368,
341,
286,
2060,
10714,
17223,
4858,
353,
4295,
49657,
5288,
829,
1131,
265,
29726,
454,
354,
17165,
14,
837,
69,
38330,
310,
3293,
1288,
17286,
3710,
1269,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_empty_ledger_dir() {
// copied
let origin_block_path = TempDir::new("origin").unwrap();
// This will create the ledger path
let ledger_path = TempDir::new("ledger").unwrap();
assert!(ledger_path.path().exists());
let data_path = origin_b... | rust_cleaned_test_functions.jsonl/108814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
38367,
1389,
4334,
368,
341,
1789,
286,
442,
21774,
198,
286,
1077,
6238,
7113,
2638,
284,
19944,
6184,
486,
931,
445,
8611,
1827,
15454,
1428,
286,
442,
1096,
686,
1855,
279,
46933,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_command_latches() {
let mut temp_map = HashMap::default();
temp_map.insert(10.into(), 20.into());
let readonly_cmds: Vec<Command> = vec![
commands::ResolveLockReadPhase::new(temp_map.clone(), None, Context::default()).into(),
commands::MvccByKey::n... | rust_cleaned_test_functions.jsonl/36480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
907,
9118,
368,
341,
286,
1077,
5206,
2730,
5376,
284,
10528,
486,
2258,
543,
286,
2730,
5376,
7030,
7,
16,
15,
39860,
1507,
220,
17,
15,
39860,
1423,
286,
1077,
5762,
89472,
25,
11312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_iter() {
let xs: Vec<(uint, char)> = vec![(1u, 'a'), (2, 'b'), (3, 'c'), (4, 'd'), (5, 'e')];
let map: VecMap<char> = xs.iter().map(|&x| x).collect();
for &(k, v) in xs.iter() {
assert_eq!(map.get(&k), Some(&v));
}
} | rust_cleaned_test_functions.jsonl/108802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
11723,
368,
341,
286,
1077,
11943,
25,
11312,
28706,
2496,
11,
1161,
16018,
284,
7486,
0,
9697,
16,
84,
11,
364,
64,
4567,
320,
17,
11,
364,
65,
4567,
320,
18,
11,
364,
66,
4567,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_rsa_pkcs1_sign_parsing() {
for test in wycheproof::rsa_pkcs1_sign::TestName::all() {
let _kat = wycheproof::rsa_pkcs1_sign::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5842 | {
"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,
82522,
33321,
4837,
16,
11172,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
60869,
33321,
4837,
16,
11172,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_eh_frame_resolve_cie_offset_out_of_bounds() {
let buf = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
assert_eq!(
resolve_cie_offset(&buf, buf.len() + 4 + 2),
Err(Error::OffsetOutOfBounds)
);
} | rust_cleaned_test_functions.jsonl/9383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
77291,
666,
645,
6917,
6068,
3575,
36878,
368,
341,
286,
1077,
6607,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
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_type_08() {
let ast = check_parse("type nat = u8;");
check_name(ast.get(0),"nat");
assert_eq!(ast.get(1),&Node::IntType(false,8));
} | rust_cleaned_test_functions.jsonl/96538 | {
"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,
1819,
62,
15,
23,
368,
341,
262,
1077,
11763,
284,
1779,
21039,
445,
1313,
17588,
284,
575,
23,
34649,
262,
1779,
1269,
52574,
670,
7,
15,
35393,
33297,
797,
262,
2060,
10714,
10297,
559,
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 |
#[test]
fn test_escape() {
assert_eq!(escape("--aaa=bbb-ccc".into()), "--aaa=bbb-ccc");
assert_eq!(
escape("linker=gcc -L/foo -Wl,bar".into()),
r#""linker=gcc -L/foo -Wl,bar""#
);
assert_eq!(
escape(r#"--features="default""#.into()),
... | rust_cleaned_test_functions.jsonl/36438 | {
"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,
21832,
368,
341,
286,
2060,
10714,
10297,
12998,
21549,
32646,
28,
53151,
12,
37054,
3263,
18122,
11858,
14482,
32646,
28,
53151,
12,
37054,
797,
286,
2060,
10714,
33673,
310,
12449,
445,
2080,
261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_replace() {
let mutation = replace(
"Guild",
&["GuildId", "UserId", "UpdatedAt"],
&[&"1", &"2", &CommitTimestamp::new()],
);
match mutation.operation.unwrap() {
v1::mutation::Operation::Replace(mut w) => {
as... | rust_cleaned_test_functions.jsonl/132332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
368,
341,
286,
1077,
26374,
284,
8290,
1006,
310,
330,
72574,
756,
310,
609,
1183,
72574,
764,
497,
330,
13504,
497,
330,
72279,
8097,
310,
44590,
5,
1,
16,
497,
609,
1,
17,
497,
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... | 2 |
#[test]
fn test_import_struct_typedef_from_different_decl_context() {
let ir = ir_from_cc(
"struct MyStruct {}; namespace test_namespace_bindings { typedef MyStruct MyStruct; }",
)
.unwrap();
assert_ir_matches!(ir, quote! { Record { ... cc_name: "MyStruct" ...}});
assert_ir_matches!(... | rust_cleaned_test_functions.jsonl/37188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
15126,
42111,
4219,
5673,
82741,
35814,
8467,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
330,
1235,
3017,
9422,
52166,
4473,
1273,
41571,
94516,
314,
13501,
3017,
9422,
301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_translate_linestring() {
let linestring = LineString::from(vec![(0.0, 0.0), (5.0, 1.0), (10.0, 0.0)]);
let translated = linestring.translate(17.0, 18.0);
let mut correct = Vec::new();
correct.push((17.0, 18.0));
correct.push((22.0, 19.0));
correct.... | rust_cleaned_test_functions.jsonl/94516 | {
"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,
66381,
24606,
65040,
368,
341,
286,
1077,
9805,
65040,
284,
7083,
703,
486,
1499,
25592,
0,
9697,
15,
13,
15,
11,
220,
15,
13,
15,
701,
320,
20,
13,
15,
11,
220,
16,
13,
15,
701,
320,
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_authorize_override() {
let withdrawer_pubkey = Pubkey::new_rand();
let stake_lamports = 42;
let stake_account = Account::new_ref_data_with_space(
stake_lamports,
&StakeState::Initialized(Meta::auto(&withdrawer_pubkey)),
std::mem::size_o... | rust_cleaned_test_functions.jsonl/39450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 906
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22938,
551,
48576,
368,
341,
286,
1077,
14798,
261,
34014,
792,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
18279,
907,
309,
3394,
284,
220,
19,
17,
280,
286,
1077,
18279,
13500,
284,
8615... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint_from_div_assign_no_panic() {
assert_eq!(Uint256::from(6).div(Uint256::from(2)), Uint256::from(3));
} | rust_cleaned_test_functions.jsonl/47739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
5673,
16237,
20688,
6536,
620,
31270,
368,
341,
286,
2060,
10714,
10297,
21570,
17,
20,
21,
486,
1499,
7,
21,
568,
611,
12317,
396,
17,
20,
21,
486,
1499,
7,
17,
5731,
27883,
17,
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 |
#[test]
fn test_move_d_e() {
let mut cpu: CPU = CPU::new();
cpu = cpu.set_d(Register { value: 0 });
cpu = cpu.set_e(Register { value: 10 });
cpu = execute_move(cpu, 0b011, 0b100);
assert_eq!(cpu.pc.value, 0);
assert_eq!(cpu.f.value, 0);
assert_eq!(cpu.d... | rust_cleaned_test_functions.jsonl/123579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
814,
2204,
368,
341,
286,
1077,
5206,
17319,
25,
13940,
284,
13940,
486,
931,
1428,
286,
17319,
284,
17319,
980,
814,
79203,
314,
897,
25,
220,
15,
1625,
286,
17319,
284,
17319,
980,
2204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ortho_32x32() {
let size = 32;
let angles = (0..(size - 1)).into_iter().map( |x| x as f32 / (size as f32) * 3.1415 );
let ys = ortho( angles );
let a: Vec< _ > = (0..32).into_iter().map( |n| 0.123 * n as f32 ).collect();
let b = mul_matvec( &ys, &a );
assert_f32_eq( norm... | rust_cleaned_test_functions.jsonl/84264 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
90824,
62,
18,
17,
87,
18,
17,
368,
341,
262,
1077,
1379,
284,
220,
18,
17,
280,
262,
1077,
25941,
284,
320,
15,
496,
7,
2141,
481,
220,
16,
4579,
18122,
11723,
1005,
2186,
7,
760,
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_find_iter_ch1() {
let needle = b"a";
let mut f = File::open("data/pride-and-prejudice.txt")
.expect("test file not found");
let mut buf = Vec::with_capacity(1000000);
f.read_to_end(&mut buf).unwrap();
f.seek(SeekFrom::Start(0)).expect("I/O operation failed");
le... | rust_cleaned_test_functions.jsonl/126030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
11723,
4138,
16,
368,
341,
262,
1077,
30309,
284,
293,
56693,
3302,
262,
1077,
5206,
282,
284,
2887,
486,
2508,
445,
691,
44672,
577,
9777,
21334,
18138,
558,
3909,
1138,
286,
659,
17119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sequence_like_types() {
#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct S1(#[serde_as(as = "Box<[Same]>")] Box<[u32]>);
is_equal(
S1(vec![1, 2, 3, 99].into()),
expect![[r#"
[
1,
2,
3,
... | rust_cleaned_test_functions.jsonl/45730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1086
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23735,
25535,
9763,
368,
341,
262,
11506,
47024,
11898,
921,
262,
11506,
27098,
42618,
11,
39900,
11,
48440,
11,
55039,
5563,
262,
2036,
328,
16,
7,
13353,
47024,
11898,
36951,
284,
330,
1611,
667... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_time_utc_value() {
use time::{date, time};
let timestamp = date!(2022 - 01 - 02).with_time(time!(3:04:05)).assume_utc();
let value: Value = timestamp.into();
let out: OffsetDateTime = value.unwrap();
assert_eq!(out, timestamp);
} | rust_cleaned_test_functions.jsonl/12491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
84259,
3142,
368,
341,
286,
990,
882,
22964,
1028,
11,
882,
2440,
286,
1077,
11441,
284,
2400,
10297,
17,
15,
17,
17,
481,
220,
15,
16,
481,
220,
15,
17,
568,
4197,
3009,
9730,
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_vcpu_pause_resume() {
let (vcpu_handle, vcpu_exit_evt) = vcpu_configured_for_boot();
queue_event_expect_response(&vcpu_handle, VcpuEvent::Resume, VcpuResponse::Resumed);
queue_event_expect_response(&vcpu_handle, VcpuEvent::Pause, VcpuResponse::Paused);... | rust_cleaned_test_functions.jsonl/99251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
16475,
59989,
58132,
368,
341,
286,
1077,
320,
85,
16475,
10630,
11,
348,
16475,
16880,
60019,
8,
284,
348,
16475,
5332,
3073,
5478,
52062,
1428,
1789,
286,
7177,
6748,
68918,
9655,
2099,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_string() {
let (bytes, handles) = TestInterfaceEvent::String { arg: STRING_VALUE.to_string() }
.into_message(SENDER_ID)
.unwrap()
.take();
assert!(handles.is_empty());
assert_eq!(bytes, STRING_MESSAGE_BYTES);
} | rust_cleaned_test_functions.jsonl/55797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
3904,
368,
341,
286,
1077,
320,
9651,
11,
13469,
8,
284,
3393,
5051,
1556,
486,
703,
314,
1392,
25,
35255,
7476,
2389,
3904,
368,
456,
310,
659,
18122,
6462,
51048,
35689,
3450,
340,
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_biosnoop() {
init_io_snooper().unwrap();
test_thread_idx_allocation();
test_io_context();
unsafe {
BPF_CONTEXT.take();
}
} | rust_cleaned_test_functions.jsonl/32622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
3530,
40162,
368,
341,
286,
2930,
16939,
643,
2152,
3296,
1005,
15454,
543,
16885,
286,
1273,
10814,
7258,
81267,
543,
286,
1273,
16939,
8467,
543,
286,
19860,
341,
310,
425,
19701,
29577,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_weighted_shuffle_compare() {
let shuffle = weighted_shuffle(vec![50, 10, 2, 1, 1, 1], ChaChaRng::from_seed([0x5a; 32]));
let shuffle1 = weighted_shuffle(vec![50, 10, 2, 1, 1, 1], ChaChaRng::from_seed([0x5a; 32]));
shuffle1
.into_iter()
.zip(shuffl... | rust_cleaned_test_functions.jsonl/52099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
73484,
32235,
368,
341,
286,
1077,
25947,
284,
36824,
73484,
25592,
20703,
20,
15,
11,
220,
16,
15,
11,
220,
17,
11,
220,
16,
11,
220,
16,
11,
220,
16,
1125,
27721,
95971,
49,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kdtree_untrained() {
let tree = KDTree::default();
let e = tree.search_leaf(&vec![3., 4.9], 1);
assert!(e.is_err());
let e = tree.search(&vec![3., 4.9], 1);
assert!(e.is_err());
} | rust_cleaned_test_functions.jsonl/114543 | {
"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,
4698,
8047,
765,
4907,
35722,
368,
341,
286,
1077,
4916,
284,
62990,
6533,
486,
2258,
1428,
286,
1077,
384,
284,
4916,
9288,
38909,
2099,
4083,
20703,
18,
2572,
220,
19,
13,
24,
1125,
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_unterminated_extended_string() {
{
let code = r#"""""#;
let tokenization_result = tokenize(code);
match tokenization_result {
Err(syntax_error) => match syntax_error {
SyntaxError::ParsingError(parsing_error) => ass... | rust_cleaned_test_functions.jsonl/116463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
68659,
61678,
3904,
368,
341,
286,
341,
310,
1077,
2038,
284,
435,
2,
3014,
12599,
2,
280,
310,
1077,
3950,
2022,
5287,
284,
77651,
15842,
626,
310,
2432,
3950,
2022,
5287,
341,
394,
15495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_is_compaction_filter_allowed() {
let cluster_version = ClusterVersion::new(semver::Version::new(4, 1, 0));
let mut cfg_value = GcConfig::default();
assert!(!is_compaction_filter_allowd(&cfg_value, &cluster_version));
cfg_value.enable_compaction_filter = true;
... | rust_cleaned_test_functions.jsonl/115664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
18177,
1311,
8727,
42155,
368,
341,
286,
1077,
10652,
9438,
284,
35380,
5637,
486,
931,
83058,
423,
486,
5637,
486,
931,
7,
19,
11,
220,
16,
11,
220,
15,
1106,
286,
1077,
5206,
13286,
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_remove_dim_error_dim_already_used() {
const VAR_NAME: &str = "var_1";
const DIM_NAME: &str = "dim_1";
const DIM_SIZE: usize = 10;
let mut data_set = DataSet::new();
assert_eq!(0, data_set.num_vars());
assert_eq!(false, data_set.has_var(VAR_NAME));
assert_eq!... | rust_cleaned_test_functions.jsonl/40517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2032
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
10791,
4096,
10791,
80772,
27803,
368,
341,
262,
733,
43508,
4708,
25,
609,
495,
284,
330,
947,
62,
16,
876,
262,
733,
50859,
4708,
25,
609,
495,
284,
330,
12927,
62,
16,
876,
262,
733,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peek() {
init();
let input = "aname".chars().collect::<Vec<char>>();
let p = elm('a').peek() + tag("aname");
let result = p.parse_as_result(&input).unwrap();
log::debug!("result = {:?}", result);
assert_eq!(result.0, 'a');
assert_eq!(result.1, "aname");
} | rust_cleaned_test_functions.jsonl/16786 | {
"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,
62,
29107,
368,
341,
262,
2930,
1428,
262,
1077,
1946,
284,
330,
93694,
3263,
19255,
1005,
17384,
27638,
10050,
21919,
37038,
262,
1077,
281,
284,
42205,
492,
64,
1823,
29107,
368,
488,
4772,
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_inner_hello() {
let client = Client::tracked(rocket()).unwrap();
let response = client.get("/").dispatch();
assert_eq!(response.into_string(), Some("Hello! Try /Rust%202018.".into()));
} | rust_cleaned_test_functions.jsonl/92417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34345,
96724,
368,
341,
286,
1077,
2943,
284,
8423,
486,
58381,
7,
46790,
6011,
15454,
543,
286,
1077,
2033,
284,
2943,
670,
4283,
1827,
18274,
543,
286,
2060,
10714,
10297,
2322,
39860,
3904,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reference() {
let policy_name = "sgx_reference_test";
let references = r#"
{
"mrEnclave" : [
"2343545",
"5465767",
"79gfgfvf"
],
"mrSigner" : [
"323232",
... | rust_cleaned_test_functions.jsonl/84002 | {
"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,
2602,
25433,
368,
341,
286,
1077,
4842,
1269,
284,
330,
1991,
87,
25433,
4452,
876,
286,
1077,
15057,
284,
435,
2,
698,
286,
341,
310,
330,
20946,
1702,
40533,
1,
549,
2278,
394,
330,
17,
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_from_str_invalid_value() {
let errval = Err(Error::Sys(Errno::EINVAL));
assert_eq!("NOSIGNAL".parse::<Signal>(), errval);
assert_eq!("kill".parse::<Signal>(), errval);
assert_eq!("9".parse::<Signal>(), errval);
} | rust_cleaned_test_functions.jsonl/10338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
31433,
3142,
368,
341,
286,
1077,
1848,
831,
284,
15495,
37396,
486,
32792,
7,
7747,
2152,
486,
35191,
1106,
286,
2060,
10714,
17223,
45,
3126,
17754,
3263,
6400,
27638,
26810,
39019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_java_integers() {
let jvm = Jvm::new(&["-Xcheck:jni"]);
// Attach the current native thread to the JVM.
let jvm_attachment = JvmAttachment::new(jvm.jvm()).unwrap();
let jvm_integer_class = JvmClass::get_class(&jvm_attachment, "java/lang/Integer").unwrap();
let parse_int_me... | rust_cleaned_test_functions.jsonl/28534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77323,
4042,
67592,
368,
341,
262,
1077,
502,
7338,
284,
619,
7338,
486,
931,
2099,
1183,
12,
55,
2028,
57558,
7751,
55919,
262,
442,
48384,
279,
1482,
9867,
4516,
311,
279,
72379,
624,
262,
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... | 2 |
#[test]
fn test_specified() {
// LinkLocalAddress::is_link_local all imply
// SpecifiedAddress::is_specified. Test that that's true for both IPv4
// and IPv6.
assert!(!Ipv6::UNSPECIFIED_ADDRESS.is_specified());
assert!(!Ipv4::UNSPECIFIED_ADDRESS.is_spec... | rust_cleaned_test_functions.jsonl/31861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 914
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13594,
1870,
368,
341,
16885,
286,
442,
5948,
7319,
4286,
486,
285,
7233,
13564,
678,
33508,
198,
286,
442,
10956,
1870,
4286,
486,
285,
13594,
1870,
13,
3393,
429,
429,
594,
830,
369,
2176,
315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kat() {
for kat in HKDF_KAT.iter() {
let prk = extract(&ByteSeq::from_hex(kat.salt), &ByteSeq::from_hex(kat.ikm));
assert_eq!(kat.prk, prk.to_hex());
let okm = expand(
&ByteSeq::from_seq(&prk),
&ByteSeq::from_hex(kat.info),
kat.l,
... | rust_cleaned_test_functions.jsonl/105090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
266,
368,
341,
262,
369,
44256,
304,
42217,
5262,
10102,
828,
19471,
368,
341,
286,
1077,
548,
74,
284,
8649,
2099,
7153,
20183,
486,
1499,
32655,
5969,
266,
514,
3145,
701,
609,
7153,
201... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_process_blockstore_with_dead_slot() {
solana_logger::setup();
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let ticks_per_slot = genesis_config.ticks_per_slot;
let (ledger_path, blockhash) = create_new_tmp_ledger_auto_delete!(&gene... | rust_cleaned_test_functions.jsonl/46796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 640
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
7113,
4314,
6615,
53427,
27563,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
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_chacha_clone_streams() {
let seed = [0,0,0,0, 1,0,0,0, 2,0,0,0, 3,0,0,0, 4,0,0,0, 5,0,0,0, 6,0,0,0, 7,0,0,0];
let mut rng = ChaChaRng::from_seed(seed);
let mut clone = rng.clone();
for _ in 0..16 {
assert_eq!(rng.next_u64(), clone.next_u64());
... | rust_cleaned_test_functions.jsonl/113005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
51576,
54742,
74872,
368,
341,
286,
1077,
10320,
284,
508,
15,
11,
15,
11,
15,
11,
15,
11,
220,
16,
11,
15,
11,
15,
11,
15,
11,
220,
17,
11,
15,
11,
15,
11,
15,
11,
220,
18,
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... | 4 |
#[test]
fn test_document_cache_contains() {
let mut document_cache = DocumentCache::default();
let specifier = resolve_url("file:///a/b.ts").unwrap();
let missing_specifier = resolve_url("file:///a/c.ts").unwrap();
document_cache.open(
specifier.clone(),
1,
LanguageId::TypeScri... | rust_cleaned_test_functions.jsonl/89759 | {
"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,
26231,
11529,
63598,
368,
341,
262,
1077,
5206,
2197,
11529,
284,
11789,
8233,
486,
2258,
543,
262,
1077,
97616,
284,
8830,
2903,
445,
1192,
60896,
64,
3470,
21288,
1827,
15454,
543,
262,
1077,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_cookie_options_are_correct() {
let default_cookie = CookieOptions::default();
assert_eq!(default_cookie.cookie_name, "");
assert_eq!(default_cookie.cookie_value, None);
assert_eq!(default_cookie.max_age, None);
assert_eq!(default_cookie.domain, Non... | rust_cleaned_test_functions.jsonl/101592 | {
"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,
9993,
38663,
8743,
56855,
31550,
368,
341,
286,
1077,
1638,
38663,
284,
24356,
3798,
486,
2258,
543,
286,
2060,
10714,
10297,
2258,
38663,
39827,
1269,
11,
14498,
286,
2060,
10714,
10297,
2258,
3866... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tuple() {
test_encode_ok(&[((5,), "[5]")]);
test_pretty_encode_ok(&[((5,), pretty_str!([5]))]);
test_encode_ok(&[((5, (6, "abc")), "[5,[6,\"abc\"]]")]);
test_pretty_encode_ok(&[((5, (6, "abc")), pretty_str!([5, [6, "abc"]]))]);
} | rust_cleaned_test_functions.jsonl/29822 | {
"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,
9165,
21773,
368,
341,
262,
1273,
11224,
19817,
2099,
46519,
20,
59564,
10545,
20,
87282,
10149,
262,
1273,
620,
21322,
11224,
19817,
2099,
46519,
20,
59564,
5020,
2895,
0,
2561,
20,
9365,
10149,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let technically_okay = "Da\u{0300}\u{0301}\u{0302}\u{0303}\u{0304}\u{0305}\u{0306}\u{0307}\u{0308}\u{0309}\u{030a}\u{030b}\u{030c}\u{030d}\u{030e}\u{030f}\u{0310}\u{0311}\u{0312}\u{0313}\u{0314}\u{0315}\u{0316}\u{0317}\u{0318}\u{0319}\u{031a}\u{031b}\u{031c}\u{031d}ngerzone";
... | rust_cleaned_test_functions.jsonl/92064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
286,
1077,
31554,
19817,
352,
284,
330,
30416,
3770,
90,
15,
18,
15,
15,
11035,
84,
90,
15,
18,
15,
16,
11035,
84,
90,
15,
18,
15,
17,
11035,
84,
90,
15,
18,
15,
18,
110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_rate_limits() {
let scoping = Scoping {
organization_id: 42,
project_id: ProjectId::new(21),
project_key: ProjectKey::parse("a94ae32be2584e0bbd7a4cbb95971fee").unwrap(),
key_id: Some(17),
};
assert!(parse_rate... | rust_cleaned_test_functions.jsonl/101157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31433,
9246,
31820,
368,
341,
286,
1077,
1136,
33707,
284,
2463,
33707,
341,
310,
7321,
842,
25,
220,
19,
17,
345,
310,
2390,
842,
25,
5787,
764,
486,
931,
7,
17,
16,
1326,
310,
2390,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_save_restore_core_regs() {
let hv = hypervisor::new().unwrap();
let vm = hv.create_vm().unwrap();
let vcpu = vm.create_vcpu(0, None).unwrap();
let mut kvi: kvm_vcpu_init = kvm_vcpu_init::default();
vm.get_preferred_target(&mut kvi).unwrap();
// Mu... | rust_cleaned_test_functions.jsonl/38430 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15376,
62677,
15467,
36910,
368,
341,
286,
1077,
22747,
284,
9751,
31396,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
22747,
2520,
39008,
1005,
15454,
543,
286,
1077,
348,
16475,
284,
10995,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_message() {
let mut message = RequestMessage::new_request(ApiVersionRequest {});
message
.get_mut_header()
.set_client_id("consumer-1".to_owned())
.set_correlation_id(5);
let mut out = vec![];
message.encode(&mut out, 0)... | rust_cleaned_test_functions.jsonl/29671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
6462,
368,
341,
286,
1077,
5206,
1943,
284,
6145,
2052,
486,
931,
7893,
65830,
5637,
1900,
35311,
286,
1943,
198,
310,
659,
455,
29523,
8757,
741,
310,
659,
746,
8179,
842,
445,
46764,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_address() {
let add_str = "muta14e0lmgck835vm2dfm0w3ckv6svmez8fdgdl705";
let (_, data) = bech32::decode(add_str).unwrap();
let bytes = Bytes::from(Vec::<u8>::from_base32(&data).unwrap());
let address = Address::from_bytes(bytes).unwrap();
assert_eq!(add_s... | rust_cleaned_test_functions.jsonl/58376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6744,
368,
341,
286,
1077,
912,
2895,
284,
330,
6984,
64,
16,
19,
68,
15,
75,
12311,
377,
23,
18,
20,
7338,
17,
2940,
76,
15,
86,
18,
377,
85,
21,
3492,
82156,
23,
6902,
70,
8736,
22,
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_copy_within_panics_src_too_long() {
let mut bytes = *b"Hello, World!";
bytes.copy_within(10..14, 0);
} | rust_cleaned_test_functions.jsonl/9707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16096,
72385,
71099,
1211,
16274,
2346,
78,
17799,
368,
341,
262,
1077,
5206,
5820,
284,
353,
65,
1,
9707,
11,
4337,
26782,
1066,
262,
5820,
12232,
72385,
7,
16,
15,
496,
16,
19,
11,
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 |
#[test]
fn test_encoding_simple_trie() {
for prefix in
[LEAF_PREFIX_MASK_NO_EXT, BRANCH_WITHOUT_MASK_NO_EXT, BRANCH_WITH_MASK_NO_EXT].iter()
{
for i in (0..1000).chain(NIBBLE_SIZE_BOUND_NO_EXT - 2..NIBBLE_SIZE_BOUND_NO_EXT + 2) {
let mut output = Vec::new();
encode_size_and_prefix(i, *prefix, ... | rust_cleaned_test_functions.jsonl/96748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
30015,
3547,
645,
368,
341,
197,
2023,
9252,
304,
198,
298,
197,
58,
867,
8276,
18519,
11720,
9100,
16066,
11,
18803,
41933,
23929,
3656,
11720,
9100,
16066,
11,
18803,
41933,
23929,
11720,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_single_base() {
let dna = b"A";
let a = encode(dna);
assert_eq!(a.len(), 2);
let dnb = b"T";
let b = encode(dnb);
assert_ne!(a, b)
} | rust_cleaned_test_functions.jsonl/89620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
7651,
368,
341,
286,
1077,
75334,
284,
293,
29133,
876,
286,
1077,
264,
284,
16164,
1500,
3376,
317,
286,
2060,
10714,
10297,
64,
19406,
1507,
220,
17,
317,
286,
1077,
294,
18080,
284,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_refund_tx_lock() {
set_test_mode(true);
global::set_local_chain_type(global::ChainTypes::Floonet);
swap::set_testing_cur_time(1567632152);
let kc_sell = keychain(1);
let ctx_sell = context_sell(&kc_sell);
let secondary_redeem_address = btc_address(&kc_sell);
let height = 100_000;
... | rust_cleaned_test_functions.jsonl/22238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7793,
1241,
17805,
9818,
368,
341,
197,
8196,
4452,
7302,
3715,
317,
197,
18842,
486,
746,
13564,
30583,
1819,
31951,
486,
18837,
4173,
486,
37,
31335,
295,
317,
197,
71755,
486,
746,
70962,
18956... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_in_fn_name() {
assert!(in_fn_name("fn foo"));
assert!(in_fn_name(" fn foo"));
assert!(in_fn_name("fn "));
assert!(!in_fn_name("fn foo(b"));
assert!(!in_fn_name("fn"));
} | rust_cleaned_test_functions.jsonl/126178 | {
"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,
1243,
15246,
1269,
368,
341,
262,
2060,
10297,
258,
15246,
1269,
445,
8822,
15229,
4010,
262,
2060,
10297,
258,
15246,
1269,
445,
5168,
220,
15229,
4010,
262,
2060,
10297,
258,
15246,
1269,
445,
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_suggestion_different_case() {
assert_eq!(
suggestion_list("verylongstring".intern(), &["VERYLONGSTRING".intern()], 5),
vec!["VERYLONGSTRING".intern()]
);
assert_eq!(
suggestion_list("VERYLONGSTRING".intern(), &["verylongstring".intern()... | rust_cleaned_test_functions.jsonl/83029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
42116,
82741,
19096,
368,
341,
286,
2060,
10714,
33673,
310,
23776,
2019,
445,
1204,
4825,
917,
3263,
55444,
1507,
609,
1183,
30519,
51306,
16468,
3263,
55444,
79558,
220,
20,
1326,
310,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_start_access_point_with_iface_fails() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let test_values = test_setup();
let serve_fut = test_values.ap.serve_provider_requests(test_values.requests);
pin_mut!(serve_fut);
... | rust_cleaned_test_functions.jsonl/59826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
12759,
6085,
6615,
67666,
761,
6209,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bufs_vec_mut() {
let mut buf = BytesMut::from(&b"hello world"[..]);
let b1: &mut [u8] = &mut [];
let b2: &mut [u8] = &mut [];
let mut dst = [IoSliceMut::new(b1), IoSliceMut::new(b2)];
unsafe {
assert_eq!(1, buf.bytes_vectored_mut(&mut dst[..]));
}
} | rust_cleaned_test_functions.jsonl/51223 | {
"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,
10363,
82,
13251,
29523,
368,
341,
262,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
2099,
65,
1,
14990,
1879,
36864,
496,
2558,
262,
1077,
293,
16,
25,
609,
6984,
508,
84,
23,
60,
284,
609... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_point_subtraction_defined() {
fn _curve<E: Curve>() {
assert_operator_defined_for! {
assert_fn = assert_point_subtraction_defined,
lhs = {Point<E>, &Point<E>, Generator<E>},
rhs = {Point<E>, &Point<E>, Generator<E>},
... | rust_cleaned_test_functions.jsonl/101948 | {
"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,
6085,
5228,
26425,
52870,
368,
341,
286,
5168,
716,
50051,
23835,
25,
53677,
13555,
341,
310,
2060,
40594,
52870,
5478,
0,
341,
394,
2060,
15246,
284,
2060,
6085,
5228,
26425,
52870,
345,
394,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_noto_sans() {
run_test(
&TEST_DATA,
"directwrite/good-noto-sans.or",
"noto/NotoSansOriya-Regular.ttf",
&[JOINER_GLYPH_INDEX],
206,
);
} | rust_cleaned_test_functions.jsonl/91209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
2072,
643,
596,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
19798,
4934,
4846,
1386,
29169,
78,
1331,
596,
24282,
756,
503,
330,
1921,
78,
20290,
2072,
46882,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple() {
test_serialize(());
test_serialize((123u64, Dummy));
test_serialize((123u64, 234u32, Dummy));
} | rust_cleaned_test_functions.jsonl/88746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
368,
341,
286,
1273,
88686,
7,
1423,
286,
1273,
88686,
1188,
16,
17,
18,
84,
21,
19,
11,
50567,
1106,
286,
1273,
88686,
1188,
16,
17,
18,
84,
21,
19,
11,
220,
17,
18,
19,
84,
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 |
#[test]
fn test_nzint() {
let mut rng = crate::new();
// Any failures manifest as an infinite loop
for _ in 0..9000 {
let _: core::num::NonZeroU32 = Standard.sample(&mut rng);
}
} | rust_cleaned_test_functions.jsonl/85582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
89,
396,
368,
341,
10217,
5206,
28422,
284,
17717,
486,
931,
1428,
197,
322,
5765,
27850,
14455,
438,
458,
23809,
6337,
198,
2023,
716,
304,
220,
15,
496,
24,
15,
15,
15,
341,
197,
10217... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lenient_release() {
let input = r#"{"release":42}"#;
let output = r#"{"release":"42"}"#;
let event = Annotated::new(Event {
release: Annotated::new("42".to_string().into()),
..Default::default()
});
assert_eq_dbg!(event, Annotated::from_json(input).unwrap());... | rust_cleaned_test_functions.jsonl/87707 | {
"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,
6043,
1167,
24577,
368,
341,
262,
1077,
1946,
284,
435,
55543,
4913,
22998,
788,
19,
17,
9863,
2,
280,
262,
1077,
2550,
284,
435,
55543,
4913,
22998,
3252,
19,
17,
9207,
57676,
280,
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_initialize_vote_account() {
let vote_account_pubkey = Pubkey::new_rand();
let mut vote_account = Account::new(100, VoteState::size_of(), &id());
let node_pubkey = Pubkey::new_rand();
//init should pass
let mut vote_account = KeyedAccount::new(&vote_accou... | rust_cleaned_test_functions.jsonl/69959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
54360,
13500,
368,
341,
286,
1077,
6910,
13500,
34014,
792,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
5206,
6910,
13500,
284,
8615,
486,
931,
7,
16,
15,
15,
11,
34034,
1397,
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_range_formatting_indentation() {
let input = "
function() {
const veryLongIdentifierToCauseALineBreak = { veryLongKeyToCauseALineBreak: 'veryLongValueToCauseALineBreak' }
}
";
let range_start = TextSize::try_from(input.find("const").unwrap()).unwrap();
let range... | rust_cleaned_test_functions.jsonl/786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
8955,
1280,
69045,
367,
368,
341,
286,
1077,
1946,
284,
6228,
1688,
368,
341,
260,
733,
1602,
6583,
8714,
1249,
60912,
969,
482,
22524,
284,
314,
1602,
6583,
1592,
1249,
60912,
969,
482,
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_is_media_filename() {
// test false cases
assert!(!is_media_filename(Path::new("/home/naftuli/Music/Directory")));
assert!(!is_media_filename(Path::new("/home/naftuli/Music/Directory/Folder.jpg")));
// test true cases
assert!(is_media_filename(Path::new("/home/naftuli/Music/... | rust_cleaned_test_functions.jsonl/77635 | {
"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,
6892,
29173,
13323,
368,
341,
262,
442,
1273,
895,
5048,
198,
262,
2060,
0,
3471,
285,
29173,
13323,
33030,
486,
931,
4283,
5117,
14,
3376,
723,
23602,
10270,
11524,
14,
9310,
17621,
262,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate() {
let mut buffer = [0; MTU];
let eh = ExtensionHeader::new();
let pos = eh.generate(&mut buffer);
assert_eq!(buffer[..pos], [0x01, 0xFF, 0xFF, ExtensionHeaderType::NoMore as u8]);
} | rust_cleaned_test_functions.jsonl/127867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
368,
341,
286,
1077,
5206,
4147,
284,
508,
15,
26,
19087,
52,
4821,
286,
1077,
35246,
284,
26473,
4047,
486,
931,
1428,
286,
1077,
1133,
284,
35246,
22019,
2099,
6984,
4147,
626,
286,
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_i32() {
Int32Type::test(Encoding::PLAIN, TEST_SET_SIZE, -1);
Int32Type::test(Encoding::PLAIN_DICTIONARY, TEST_SET_SIZE, -1);
Int32Type::test(Encoding::DELTA_BINARY_PACKED, TEST_SET_SIZE, -1);
} | rust_cleaned_test_functions.jsonl/45121 | {
"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,
5318,
18,
17,
368,
341,
262,
1333,
18,
17,
929,
486,
1944,
85177,
486,
90889,
11,
13602,
8481,
4098,
11,
481,
16,
317,
262,
1333,
18,
17,
929,
486,
1944,
85177,
486,
90889,
44663,
3580,
8642,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_in_submodules_of_annotated_module() {
let mock = new_mock!(TestTrait);
given! {
<mock as TestTrait>::func |_| true then_return 12 always;
}
assert_eq!(mock.func(1), 12);
} | rust_cleaned_test_functions.jsonl/90516 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
5228,
11525,
3575,
62,
3401,
657,
10750,
368,
341,
394,
1077,
7860,
284,
501,
34134,
10297,
2271,
49257,
626,
394,
2661,
0,
341,
503,
366,
16712,
438,
3393,
49257,
6831,
2830,
66091,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unsafe_recovery_during_merge() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
cluster.run();
cluster.must_put(b"k1", b"v1");
cluster.must_put(b"k3", b"v3");
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_ope... | rust_cleaned_test_functions.jsonl/6013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
18675,
91475,
814,
1677,
20888,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
626,
262,
10652,
7634,
1428,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.