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_t194() {
init();
let result = t194(*IMEI_MD5);
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104746 | {
"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,
528,
16,
24,
19,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
16,
24,
19,
4071,
5660,
40,
46497,
20,
317,
286,
13751,
79878,
1102,
19406,
1423,
286,
13751,
88928,
25,
52652,
1102,
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 |
#[test]
fn test_var_u64_codec() {
for &v in U64_TESTS {
let mut buf = vec![];
let mut p_buf = vec![];
{
let mut writer = CodedOutputStream::new(&mut p_buf);
writer.write_uint64_no_tag(v).unwrap();
writer.flush().unwrap()... | rust_cleaned_test_functions.jsonl/45060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
7300,
21,
19,
51084,
368,
341,
286,
369,
609,
85,
304,
547,
21,
19,
80312,
341,
310,
1077,
5206,
6607,
284,
7486,
0,
15078,
310,
1077,
5206,
281,
10363,
284,
7486,
0,
15078,
310,
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... | 2 |
#[test]
fn test_signature_rsa_pss_sign() {
test::run(
test_file!("rsa_pss_sign_tests.txt"),
|section, test_case| {
assert_eq!(section, "");
let digest_name = test_case.consume_string("Digest");
let alg = match digest_name.as_ref() {
"SHA25... | rust_cleaned_test_functions.jsonl/17912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 720
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
82522,
620,
778,
11172,
368,
341,
262,
1273,
486,
6108,
1006,
286,
1273,
2458,
17223,
60869,
620,
778,
11172,
32509,
3909,
4461,
286,
760,
2809,
11,
1273,
19096,
91,
341,
310,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_string_as_json() {
test_none_with_extra(cast_string_as_json);
let mut jo1: BTreeMap<String, Json> = BTreeMap::new();
jo1.insert(
String::from("a"),
Json::from_string(String::from("b")).unwrap(),
);
// HasParseToJSONFlag
let... | rust_cleaned_test_functions.jsonl/2001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1776
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
11898,
9455,
368,
341,
286,
1273,
31488,
6615,
31858,
1337,
559,
3904,
11898,
9455,
626,
286,
1077,
5206,
7647,
16,
25,
425,
6533,
2227,
3464,
11,
8308,
29,
284,
425,
6533,
2227,
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... | 3 |
#[test]
fn test_get_tips_single_row_success() {
let (mut db, _dir) = create_test_db();
let contract_address = [7u8; 32].into();
let key_type = Stype::Delta(23);
let dk = DeltaKey { contract_address, key_type };
let v = b"Enigma";
db.create(&dk, &v[..]).unwrap();... | rust_cleaned_test_functions.jsonl/48694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
528,
3077,
19487,
8530,
18632,
368,
341,
286,
1077,
320,
6984,
2927,
11,
716,
3741,
8,
284,
1855,
4452,
8685,
1428,
286,
1077,
5116,
6744,
284,
508,
22,
84,
23,
26,
220,
18,
17,
936,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validator_decryption() {
let (_env, op_tool, backend, mut storage) = launch_swarm_with_op_tool_and_backend(1, 0);
// Fetch the validator config and validator info for this operator's owner
let owner_account = storage.get::<AccountAddress>(OWNER_ACCOUNT).unwrap().value;
let valid... | rust_cleaned_test_functions.jsonl/98870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64959,
13783,
15597,
368,
341,
262,
1077,
5453,
3160,
11,
1179,
22785,
11,
19163,
11,
5206,
5819,
8,
284,
7050,
32581,
2178,
6615,
10287,
22785,
8378,
40011,
7,
16,
11,
220,
15,
626,
262,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_loading_rust_analyzer() {
let path = Path::new(env!("CARGO_MANIFEST_DIR")).parent().unwrap().parent().unwrap();
let cargo_config = CargoConfig::default();
let load_cargo_config = LoadCargoConfig {
load_out_dirs_from_check: false,
with_proc_macro: f... | rust_cleaned_test_functions.jsonl/34379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57726,
1710,
590,
12008,
27165,
368,
341,
286,
1077,
1815,
284,
7933,
486,
931,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
15197,
3765,
1005,
15454,
1005,
3765,
1005,
15454,
543,
286,
1077,
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_drop_panic() {
static mut DROPS: i32 = 0;
struct D(bool);
impl Drop for D {
fn drop(&mut self) {
unsafe {
DROPS += 1;
}
if self.0 {
panic!("panic in `drop`");
}
}
}
let mut q =... | rust_cleaned_test_functions.jsonl/73721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
620,
31270,
368,
341,
262,
1099,
5206,
422,
1285,
5012,
25,
600,
18,
17,
284,
220,
15,
401,
262,
2036,
422,
9764,
626,
262,
11605,
15733,
369,
422,
341,
286,
5168,
5943,
2099,
6984,
656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_two_paths() {
let rules = create_rules(
r#"
macro_rules! foo {
($ i:path, $ j:path) => {
fn foo() { let a = $ i; let b = $j; }
}
}
"#,
);
assert_expansion(
MacroKind::Items,
&rules,
"foo! { foo, b... | rust_cleaned_test_functions.jsonl/14709 | {
"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,
23241,
24152,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
600,
71796,
11,
400,
502,
71796,
8,
589,
341,
394,
5168,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recursion() {
Logger::with_str("info")
.format(detailed_format)
.log_to_file()
.start()
.unwrap_or_else(|e| panic!("Logger initialization failed because: {}", e));
let dummy = Dummy();
for _ in 0..10 {
error!("This is an error message for {}"... | rust_cleaned_test_functions.jsonl/78215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
34280,
368,
341,
262,
9514,
486,
4197,
2895,
445,
2733,
1138,
286,
659,
2243,
1500,
10111,
8955,
340,
286,
659,
839,
2346,
2458,
741,
286,
659,
2468,
741,
286,
659,
15454,
8734,
62628,
224... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multi_with_iter_lower_bound() {
let engine = TestEngineBuilder::new().build().unwrap();
must_prewrite_put(&engine, b"foo", b"bar", b"foo", 10);
must_commit(&engine, b"foo", 10, 20);
let snapshot = engine.snapshot(Default::default()).unwrap();
let write_cu... | rust_cleaned_test_functions.jsonl/45606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
6615,
11723,
30425,
19447,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1969,
620,
52473,
15557,
2099,
8512,
11,
293,
1,
7975,
497,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_selected_fields() {
new_ucmd!()
.args(&["--from=auto", "--field", "1,4,3", "1K 2K 3K 4K 5K 6K"])
.succeeds()
.stdout_only("1000 2K 3000 4000 5K 6K\n");
} | rust_cleaned_test_functions.jsonl/46017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
23755,
12132,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
1499,
28,
3902,
497,
14482,
2566,
497,
330,
16,
11,
19,
11,
18,
497,
330,
16,
42,
220,
17,
42,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clear_caches() {
let keypair = Keypair::new();
let mut faucet = Faucet::new(keypair, None, None, None);
let ip = socketaddr!([127, 0, 0, 1], 0).ip();
assert_eq!(faucet.ip_cache.len(), 0);
faucet.check_time_request_limit(1, ip).unwrap();
assert_eq!(... | rust_cleaned_test_functions.jsonl/1267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
666,
14242,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
71453,
284,
96362,
295,
486,
931,
4857,
12670,
11,
2240,
11,
2240,
11,
2240,
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_bad_regions() {
let debugger = new_debugger();
let kv_engine = debugger.engines.kv.as_ref();
let raft_engine = debugger.engines.raft.as_ref();
let store_id = 1; // It's a fake id.
let wb1 = WriteBatch::default();
let handle1 = get_cf_handle(raft_e... | rust_cleaned_test_functions.jsonl/60239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
58035,
368,
341,
286,
1077,
44473,
284,
501,
15446,
1389,
543,
286,
1077,
16178,
24823,
284,
44473,
90413,
1543,
5202,
85,
5357,
7793,
543,
286,
1077,
52455,
24823,
284,
44473,
90413,
1543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trailing_comma_doesnt_include_selector() {
let selector_str = "\"as\",\n\"*\",\n\"&\",";
let expected = vec![
SelectorRaw {
node_selectors: vec![NodeSelectorRaw {
node_kind: "as".into(),
nth_child: None,
... | rust_cleaned_test_functions.jsonl/56568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
14277,
2965,
1728,
96374,
406,
37878,
28890,
368,
341,
286,
1077,
9367,
2895,
284,
15898,
300,
65290,
77,
2105,
9,
65290,
77,
2105,
5,
16215,
876,
286,
1077,
3601,
284,
7486,
90515,
310,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_literals() {
let input = "
let two = \"two\";
{
\"one\": 10 - 9,
two: 1 + 1,
\"thr\" + \"ee\": 6/ 2,
4: 4,
true: 5,
false: 6
}
";
assert_eq!(
eval(input),
Object::Has... | rust_cleaned_test_functions.jsonl/84238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
49643,
368,
341,
262,
1077,
1946,
284,
6228,
286,
1077,
1378,
284,
7245,
19789,
59,
876,
286,
341,
310,
7245,
603,
11693,
220,
16,
15,
481,
220,
24,
345,
310,
1378,
25,
220,
16,
488,
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_process_authorize_bad_account_data_fail() {
assert_eq!(
process_nonce_instruction(&system_instruction::authorize_nonce_account(
&Pubkey::default(),
&Pubkey::default(),
&Pubkey::default(),
)),
Err(Instruct... | rust_cleaned_test_functions.jsonl/73076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
22938,
551,
34199,
13500,
1769,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
1882,
48508,
54923,
2099,
8948,
54923,
486,
52022,
48508,
13500,
1006,
394,
609,
29162,
792,
486,
2258,
3148,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lt() {
let mut a = TreeMap::new();
let mut b = TreeMap::new();
assert!(!(a < b) && !(b < a));
assert!(b.insert(0i, 5i));
assert!(a < b);
assert!(a.insert(0, 7));
assert!(!(a < b) && b < a);
assert!(b.insert(-2, 0));
assert!... | rust_cleaned_test_functions.jsonl/66371 | {
"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,
39164,
368,
341,
286,
1077,
5206,
264,
284,
76883,
486,
931,
543,
286,
1077,
5206,
293,
284,
76883,
486,
931,
1428,
286,
2060,
0,
33660,
64,
366,
293,
8,
1009,
18208,
65,
366,
264,
1106,
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... | 4 |
#[test]
fn test_value() {
let res = parse_cfg::<(_, nom::error::ErrorKind)>("cfg(feature = \"bloop\")");
println!("res = {:?}", res);
assert_eq!(
res,
Ok((
"",
Value {
key: "featur... | rust_cleaned_test_functions.jsonl/50602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
368,
341,
310,
1077,
592,
284,
4715,
18343,
27638,
41117,
9662,
486,
841,
486,
1454,
10629,
8,
13211,
14072,
27062,
284,
7245,
65,
10498,
62705,
797,
310,
13751,
17223,
416,
284,
71964,
592,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_implicit_absolute_path() {
let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(
&["foo", &abs_path],
&format!(
"{abs_path}/a.foo
{abs_path}/one/b.foo
{abs_path}/one/two/c.foo
{abs_... | rust_cleaned_test_functions.jsonl/10878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
30940,
50874,
2638,
368,
341,
262,
1077,
320,
665,
11,
3647,
2638,
8,
284,
633,
4452,
15879,
6615,
31170,
2638,
43175,
90560,
11,
11955,
48010,
626,
262,
1013,
3713,
7645,
1006,
286,
609,
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_auth_to_json() {
let mut cont = HashMap::new();
cont.insert("sentry_version", "7");
cont.insert("sentry_client", "raven-js/3.23.3");
cont.insert("sentry_key", "4bb5d94de752a36b8b87851a3f82726a");
let auth = Auth::from_pairs(cont.into_iter()).unwrap();
assert_eq!(
... | rust_cleaned_test_functions.jsonl/119265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14014,
2346,
9455,
368,
341,
262,
1077,
5206,
683,
284,
10528,
486,
931,
543,
262,
683,
7030,
445,
82,
4085,
9438,
497,
330,
22,
797,
262,
683,
7030,
445,
82,
4085,
8179,
497,
330,
81,
5276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fmt_extended_value_with_encoding_and_language_tag() {
let extended_value = ExtendedValue {
charset: Charset::Iso_8859_1,
language_tag: Some("en".parse().expect("Could not parse language tag")),
value: vec![163, b' ', b'r', b'a', b't', b'e', b's'],
... | rust_cleaned_test_functions.jsonl/24913 | {
"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,
38128,
61678,
3142,
6615,
37613,
8378,
29021,
9372,
368,
341,
286,
1077,
11577,
3142,
284,
40565,
1130,
341,
310,
11617,
25,
87871,
486,
76275,
62,
23,
23,
20,
24,
62,
16,
345,
310,
4128,
9372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_writer_default_encoding_support_int32() {
check_encoding_write_support::<Int32Type>(
WriterVersion::PARQUET_1_0,
true,
&[1, 2],
Some(0),
&[Encoding::PLAIN, Encoding::RLE_DICTIONARY, Encoding::RLE],
);
chec... | rust_cleaned_test_functions.jsonl/30524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
28908,
9993,
37613,
25827,
4042,
18,
17,
368,
341,
286,
1779,
37613,
9165,
25827,
27638,
1072,
18,
17,
929,
17055,
310,
29404,
5637,
486,
16567,
5757,
1348,
62,
16,
62,
15,
345,
310,
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_slot_sanity_checks() {
let mmio_base = 0xd000_0000;
let device_manager = MMIODeviceManager::new(mmio_base, (arch::IRQ_BASE, arch::IRQ_MAX));
// Valid slot.
let slot = MMIODeviceInfo {
addr: mmio_base,
len: MMIO_LEN,
irqs: vec![... | rust_cleaned_test_functions.jsonl/34964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 810
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27563,
643,
38270,
75797,
368,
341,
286,
1077,
9465,
815,
7651,
284,
220,
15,
9703,
15,
15,
15,
62,
15,
15,
15,
15,
280,
286,
1077,
3671,
12144,
284,
21665,
72425,
2043,
486,
931,
67083,
815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_time_64_nanosecond() {
let expected = vec![
"+--------------------+",
"| f |",
"+--------------------+",
"| 00:00:00.011111111 |",
"| |",
"+--------------------+",
];... | rust_cleaned_test_functions.jsonl/39723 | {
"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,
9165,
3009,
62,
21,
19,
73936,
960,
1297,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
6630,
97704,
10,
756,
310,
25203,
282,
1698,
760,
756,
310,
6630,
97704,
10,
756,
310,
25203,
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_op_none() {
assert_eq!(io!(b'q', 10), 0x0000710A);
assert_eq!(io!(b'a', 255), 0x000061FF);
} | rust_cleaned_test_functions.jsonl/85179 | {
"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,
10287,
31488,
368,
341,
286,
2060,
10714,
10297,
815,
10297,
65,
6,
80,
516,
220,
16,
15,
701,
220,
15,
87,
15,
15,
15,
15,
22,
16,
15,
32,
317,
286,
2060,
10714,
10297,
815,
10297,
65,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_url_for_static() {
let mut rdef = ResourceDef::new("/index.html");
rdef.set_name("index");
let mut rmap = ResourceMap::new(ResourceDef::prefix(""));
rmap.add(&mut rdef, None);
assert!(rmap.has_resource("/index.html"));
let req = TestRequest::wit... | rust_cleaned_test_functions.jsonl/39764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
5478,
25360,
368,
341,
286,
1077,
5206,
435,
750,
284,
11765,
2620,
486,
931,
4283,
1252,
2564,
797,
286,
435,
750,
980,
1269,
445,
1252,
3071,
286,
1077,
5206,
435,
2186,
284,
11765,
2227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double() {
let mut rt = Runtime::new().unwrap();
let client = init_client();
let server = httptest::Server::run();
server.expect(
Expectation::matching(request::method_path("GET", "/facts/random"))
.respond_with(
json_encode... | rust_cleaned_test_functions.jsonl/35910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
368,
341,
286,
1077,
5206,
16677,
284,
10954,
486,
931,
1005,
15454,
543,
286,
1077,
2943,
284,
2930,
8179,
543,
286,
1077,
3538,
284,
54320,
70334,
486,
5475,
486,
6108,
543,
286,
3538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_issue_period_only_root() {
run_test(|| {
assert_noop!(
Issue::set_issue_period(Origin::signed(USER), 1),
DispatchError::BadOrigin
);
assert_ok!(Issue::set_issue_period(Origin::root(), 1));
})
} | rust_cleaned_test_functions.jsonl/104090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
53340,
20818,
18410,
12993,
368,
341,
262,
1598,
4452,
79453,
341,
286,
2060,
6536,
453,
33673,
310,
25226,
486,
746,
53340,
20818,
7,
13298,
486,
2215,
71389,
701,
220,
16,
1326,
310,
21133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_first_invalid_number() {
let list = vec![
35, 20, 15, 25, 47, 40, 62, 55, 65, 95, 102, 117, 150, 182, 127, 219, 299, 277, 309, 576,
];
assert_eq!(find_first_invalid_number(&list, 5), Ok((127, 14)));
} | rust_cleaned_test_functions.jsonl/54491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
12978,
31433,
5500,
368,
341,
262,
1077,
1140,
284,
7486,
90515,
414,
220,
18,
20,
11,
220,
17,
15,
11,
220,
16,
20,
11,
220,
17,
20,
11,
220,
19,
22,
11,
220,
19,
15,
11,
220,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_sync_add_used() {
let m = &GuestMemoryMmap::<()>::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap();
let mut q = QueueStateSync::new(0x100);
q.set_desc_table_address(Some(0x1000), None);
q.set_avail_ring_address(Some(0x2000), None);
q.set_used_rin... | rust_cleaned_test_functions.jsonl/103664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 756
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
23008,
2891,
27803,
368,
341,
286,
1077,
296,
284,
609,
37804,
10642,
44,
2186,
27638,
368,
6831,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_refresh_neuron_by_subaccount_by_controller() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
refresh_neuron_by_id_or_subaccount(owner, owner, RefreshBy::Subaccount);
} | rust_cleaned_test_functions.jsonl/1154 | {
"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,
42076,
13925,
36090,
3710,
5228,
4608,
3710,
21600,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
10408,
13925,
36090,
3710,
842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_resample_tree() {
let (test_tree, _) = spatial_tree();
print_tree(&test_tree, "PRE-SAMPLE");
resample_tree_points(&test_tree, 0.3);
} | rust_cleaned_test_functions.jsonl/2843 | {
"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,
4918,
1516,
11663,
368,
341,
286,
1077,
320,
1944,
11663,
11,
27439,
284,
27979,
11663,
543,
286,
1173,
11663,
2099,
1944,
11663,
11,
330,
17357,
6222,
18918,
797,
286,
592,
1516,
11663,
12928,
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_TRANS_TABLE_SIZE() {
use crate::types::*;
use std::mem;
let c = 2 * mem::size_of::<SymbolNumber>()
+ mem::size_of::<TransitionTableIndex>()
+ mem::size_of::<Weight>();
assert!(TRANS_TABLE_SIZE == c);
} | rust_cleaned_test_functions.jsonl/84134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28953,
16039,
4098,
368,
341,
286,
990,
17717,
486,
9242,
56162,
286,
990,
1460,
486,
10536,
401,
286,
1077,
272,
284,
220,
17,
353,
1833,
486,
2141,
3575,
27638,
15090,
2833,
18949,
310,
488,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_metadata_corrupt_footer() {
let test_file = get_temp_file("corrupt-2.parquet", &[1, 2, 3, 4, 5, 6, 7, 8]);
let reader_result = parse_metadata(&test_file);
assert!(reader_result.is_err());
assert_eq!(
reader_result.err().unwrap(),
gene... | rust_cleaned_test_functions.jsonl/38492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
22220,
14734,
6585,
25966,
368,
341,
286,
1077,
1273,
2458,
284,
633,
11771,
2458,
445,
6005,
6585,
12,
17,
33277,
23300,
497,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
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_t154() {
init();
let seq = (0x3635 + 1) & 0x7FFF;
println!("{}", seq);
let result = t154(seq);
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104738 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
16,
20,
19,
368,
341,
286,
2930,
543,
286,
1077,
12981,
284,
320,
15,
87,
18,
21,
18,
20,
488,
220,
16,
8,
609,
220,
15,
87,
22,
31203,
280,
286,
13751,
79878,
12981,
317,
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_add() {
test_op!(_4_2i + 0.5, Complex::new(4.5, 2.0));
assert_eq!(0.5 + _4_2i, Complex::new(4.5, 2.0));
} | rust_cleaned_test_functions.jsonl/105715 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
310,
1273,
10287,
0,
2490,
19,
62,
17,
72,
488,
220,
15,
13,
20,
11,
22096,
486,
931,
7,
19,
13,
20,
11,
220,
17,
13,
15,
1106,
310,
2060,
10714,
10297,
15,
13,
20,
488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_btreeset_repetition() {
let mut set = BTreeSet::new();
set.insert("a".to_owned());
set.insert("b".to_owned());
let tokens = quote! {
#(#set: #set),*
};
let expected = r#""a" : "a" , "b" : "b""#;
assert_eq!(expected, tokens.to_string());
} | rust_cleaned_test_functions.jsonl/53408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48626,
7858,
295,
1288,
55767,
368,
341,
262,
1077,
5206,
738,
284,
425,
6533,
1649,
486,
931,
543,
262,
738,
7030,
445,
64,
3263,
983,
51973,
1423,
262,
738,
7030,
445,
65,
3263,
983,
51973,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_the_anonymous_user_cannot_update_unassigned_nodes_config() {
local_test_on_nns_subnet(|runtime| async move {
let registry = set_up_registry_canister(
&runtime,
RegistryCanisterInitPayloadBuilder::new()
.push_init_mutate_request(invariant_compli... | rust_cleaned_test_functions.jsonl/22188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 700
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16068,
12008,
9757,
3317,
666,
3401,
8882,
4907,
39021,
14896,
5332,
368,
341,
262,
2205,
4452,
4470,
1089,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
19424,
284,
738,
8237,
50650,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stdin_success() {
let mut cmd = Command::cargo_bin("typos").unwrap();
cmd.arg("-").write_stdin("Hello world");
cmd.assert().success();
} | rust_cleaned_test_functions.jsonl/78637 | {
"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,
15656,
258,
18632,
368,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
445,
1881,
966,
1827,
15454,
543,
262,
5439,
21186,
13645,
1827,
4934,
15656,
258,
445,
9707,
1879,
797,
262,
5439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_deps() {
let build_path = tempdir().unwrap().into_path();
let artifact_path_buf = build_path.join("artifacts");
let artifact_path = artifact_path_buf.as_path();
create_dir(&artifact_path).unwrap();
let mut loader = FileArtifactReader::new(&build_path, arti... | rust_cleaned_test_functions.jsonl/62916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76489,
368,
341,
286,
1077,
1936,
2638,
284,
2730,
3741,
1005,
15454,
1005,
18122,
2638,
543,
286,
1077,
36639,
2638,
10363,
284,
1936,
2638,
5446,
445,
471,
26401,
797,
286,
1077,
36639,
2638,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_blake3hash_function() -> Result<()> {
let tests = vec![ScalarFunctionTest {
name: "valid input",
columns: vec![Series::from_data(["testing"])],
expect: Series::from_data([
"61cc98e42ded96807806bf1620e13c4e6a1b85068cad93382a2e3107c269aefe",
]),
... | rust_cleaned_test_functions.jsonl/130773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13141,
726,
18,
8296,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
20703,
20639,
5152,
2271,
341,
286,
829,
25,
330,
1891,
1946,
756,
286,
8147,
25,
7486,
20703,
25544,
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,
1,
1,
1... | 1 |
#[test]
fn test_mangal() {
run_test(
&TEST_DATA,
"harfbuzz/good-mangal.hi",
"devanagari/mangal.ttf",
&[JOINER_GLYPH_INDEX],
89,
);
} | rust_cleaned_test_functions.jsonl/91143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
524,
278,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
1448,
524,
278,
860,
72,
756,
503,
330,
3583,
276,
351,
2780,
3183,
524,
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 |
#[test]
fn test_destroy_nft_cell_with_class_input_success() {
let (mut context, tx) =
create_test_context(Action::Destroy(DestroyCase::ClassInput), NftError::NoError);
let tx = context.complete_tx(tx);
// run
let cycles = context
.verify_tx(&tx, MAX_CYCLES)
.expect("pass... | rust_cleaned_test_functions.jsonl/33584 | {
"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,
18066,
1089,
723,
16648,
6615,
4790,
5898,
18632,
368,
341,
262,
1077,
320,
6984,
2266,
11,
9854,
8,
4035,
286,
1855,
4452,
8467,
21905,
486,
14245,
5432,
9478,
4207,
486,
1957,
2505,
701,
451,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_general_cosine() {
assert_close(
general_cosine(5, &[0.5, 0.3, 0.2], true)
.as_slice()
.unwrap(),
&[0.4, 0.3, 1.0, 0.3, 0.4],
1e-12,
);
assert_close(
general_cosine(4, &[0.5, 0.3, 0.2], false)... | rust_cleaned_test_functions.jsonl/116499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39177,
61192,
482,
368,
341,
286,
2060,
12704,
1006,
310,
4586,
61192,
482,
7,
20,
11,
44590,
15,
13,
20,
11,
220,
15,
13,
18,
11,
220,
15,
13,
17,
1125,
830,
340,
394,
659,
300,
26488,
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_loader_one_module() {
// This test tests the linking of function within a single module: We have a module that defines
// link the function handle with the right function definition within the same module.
let module = test_module("module");
let mod_id = module.self_id();
... | rust_cleaned_test_functions.jsonl/22990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22139,
11667,
10750,
368,
341,
262,
442,
1096,
1273,
7032,
279,
30699,
315,
729,
2878,
264,
3175,
4688,
25,
1205,
614,
264,
4688,
429,
18653,
7213,
262,
442,
2656,
279,
729,
3705,
448,
279,
1290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transaction_submission() {
let (mp_sender, mut mp_events) = channel(1);
let mock_db = mock_db();
let port = utils::get_available_port();
let address = format!("0.0.0.0:{}", port);
let runtime = test_bootstrap(address.parse().unwrap(), Arc::new(mock_db), mp_sender);
let cl... | rust_cleaned_test_functions.jsonl/102704 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 748
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
75866,
368,
341,
262,
1077,
320,
1307,
54356,
11,
5206,
10490,
19691,
8,
284,
5496,
7,
16,
317,
262,
1077,
7860,
8685,
284,
7860,
8685,
543,
262,
1077,
2635,
284,
12439,
486,
455,
26962,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_logic_op() {
let tests = vec![
(
ScalarFuncSig::LogicalAnd,
Datum::I64(1),
Datum::I64(1),
Some(1),
),
(
ScalarFuncSig::LogicalAnd,
Datum::I64(1),
... | rust_cleaned_test_functions.jsonl/16150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54335,
10287,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
2399,
394,
35176,
9626,
47246,
486,
64312,
3036,
345,
394,
68459,
486,
40,
21,
19,
7,
16,
1326,
394,
68459,
486,
40,
21,
19,
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_coordinates_into() {
let cf = CoordinateFormat::new(2, 4);
let c1 = Coordinates::new(CoordinateNumber::from(1), CoordinateNumber::from(2), cf);
let c2 = Coordinates::new(1, 2, cf);
assert_eq!(c1, c2);
} | rust_cleaned_test_functions.jsonl/16460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50084,
45514,
368,
341,
286,
1077,
24111,
284,
41035,
4061,
486,
931,
7,
17,
11,
220,
19,
317,
286,
1077,
272,
16,
284,
62501,
486,
931,
3025,
78,
8730,
2833,
486,
1499,
7,
16,
701,
41035,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_boot_source_req() {
let boot_source_path = "/boot-source";
let boot_source_json = r#"{
"kernel_image_path": "/foo/bar",
"boot_args": "baz"
}"#;
let body: Chunk = Chunk::from(boot_source_json);
// PUT
// ... | rust_cleaned_test_functions.jsonl/14370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 878
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
52062,
10347,
17644,
368,
341,
286,
1077,
10459,
10347,
2638,
284,
3521,
4619,
30774,
876,
286,
1077,
10459,
10347,
9455,
284,
435,
55543,
515,
394,
330,
23248,
4954,
2638,
788,
3521,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_encode() {
let mut buf = [0; 512];
assert_eq!(encode(100, &mut buf), 1);
assert_eq!(buf[0], 100);
assert_eq!(encode(1000, &mut buf), 2);
assert_eq!(buf[0], 232);
assert_eq!(buf[1], 7);
} | rust_cleaned_test_functions.jsonl/86793 | {
"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,
11224,
368,
341,
220,
1077,
5206,
6607,
284,
508,
15,
26,
220,
20,
16,
17,
935,
220,
2060,
10714,
10297,
6180,
7,
16,
15,
15,
11,
609,
6984,
6607,
701,
220,
16,
317,
220,
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_reverse() {
let mut ys = [1, 2, 3, 4, 5];
ys.mut_iter().reverse_();
assert_eq!(ys, [5, 4, 3, 2, 1]);
} | rust_cleaned_test_functions.jsonl/1034 | {
"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,
43277,
368,
341,
286,
1077,
5206,
31810,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
31810,
744,
332,
11723,
1005,
25903,
96060,
286,
2060,
10714,
10297,
1047,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_decoder_valid_partial_bmp() {
let mut d = UTF_16BE.decoder();
assert_feed_ok!(d, [], [0x12], "");
assert_feed_ok!(d, [0x34], [], "\u1234");
assert_feed_ok!(d, [], [0x56], "");
assert_feed_ok!(d, [0x78], [], "\u5678");
assert_finish_ok!(d, "");
... | rust_cleaned_test_functions.jsonl/15677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
8337,
52068,
880,
1307,
368,
341,
286,
1077,
5206,
294,
284,
20076,
62,
16,
21,
11594,
74047,
543,
286,
2060,
42390,
19817,
10297,
67,
11,
10071,
508,
15,
87,
16,
17,
1125,
14498,
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_own_objects_creation() {
parse_code(
"own_objects_creation",
r#"
foreigner_class!(class Foo {
self_type Foo;
constructor Foo::new(_: i32) -> Foo;
method Foo::f(&self, _: i32, _: i32) -> i32;
});
foreigner_class!(class Boo {
self_type Boo;
constructor Boo... | rust_cleaned_test_functions.jsonl/71610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82100,
24873,
46163,
368,
341,
262,
4715,
4136,
1006,
286,
330,
779,
24873,
46163,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
33428,
341,
262,
656,
1819,
33428,
280,
262,
4692,
33428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all() {
assert_eq!(
Graphemes::new("a\u{310}e\u{301}o\u{308}\u{332}").collect::<Vec<&str>>(),
&["a\u{310}", "e\u{301}", "o\u{308}\u{332}"]
);
assert_eq!(
Graphemes::new("a\r\nb🇺🇳🇮🇨").collect::<Vec<&str>>(),
&["a", "\r\n", "b", "🇺🇳", "🇮🇨"]
... | rust_cleaned_test_functions.jsonl/30876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 801
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
368,
341,
262,
2060,
10714,
33673,
286,
12165,
15660,
486,
931,
445,
64,
3770,
90,
18,
16,
15,
92,
68,
3770,
90,
18,
15,
16,
92,
78,
3770,
90,
18,
15,
23,
11035,
84,
90,
18,
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... | 2 |
#[test]
fn test_some_arrow() {
let labels: Trivial = SomeNodesLabelled(vec![Some("A"), None]);
let styles = Some(vec![Style::None, Style::Dotted]);
let start = Arrow::default();
let end = Arrow::from_arrow(ArrowShape::crow());
let result = test_input(LabelledGraph::ne... | rust_cleaned_test_functions.jsonl/54685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61855,
46566,
368,
341,
286,
1077,
9201,
25,
1163,
26658,
284,
4329,
12288,
2476,
832,
25592,
20703,
8373,
445,
32,
3975,
2240,
2558,
286,
1077,
9222,
284,
4329,
25592,
20703,
2323,
486,
4064,
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_open_union_void() {
let json = r#"{
".tag": "some other variant",
"some field": "some value"
}"#;
let x = serde_json::from_str::<dropbox_sdk::files::ListFolderLongpollError>(json).unwrap();
if let dropbox_sdk::files::ListFolderLongpollError::Other = x {
//... | rust_cleaned_test_functions.jsonl/12417 | {
"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,
11311,
51621,
37775,
368,
341,
262,
1077,
2951,
284,
435,
55543,
515,
286,
5933,
4578,
788,
330,
14689,
1008,
11424,
756,
286,
330,
14689,
2070,
788,
330,
14689,
897,
698,
262,
335,
57676,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slp_header_read_from() {
use std::io;
let data = "2.0N\x04\0\0\0test\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0".as_bytes();
let result = SlpHeader::read_from(&mut io::Cursor::new(data));
match result {
Ok(slp_header) => assert_eq!(4u32, slp_header.shape_... | rust_cleaned_test_functions.jsonl/110181 | {
"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,
11886,
79,
8757,
6443,
5673,
368,
341,
286,
990,
1460,
486,
815,
280,
286,
1077,
821,
284,
330,
17,
13,
15,
45,
3462,
15,
19,
59,
15,
59,
15,
59,
15,
1944,
59,
15,
59,
15,
59,
15,
59,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_domain() {
let domain = Domain {
domain: "domain".to_string(),
annotation: Default::default(),
commands: Default::default(),
dependencies: Default::default(),
events: Default::default(),
types: Default::default(),
};
let prog = Context:... | rust_cleaned_test_functions.jsonl/26898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
368,
341,
262,
1077,
7947,
284,
21070,
341,
286,
7947,
25,
330,
12204,
3263,
983,
3904,
3148,
286,
21223,
25,
7899,
486,
2258,
3148,
286,
11293,
25,
7899,
486,
2258,
3148,
286,
19543,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_linkat_file() {
let tempdir = tempfile::tempdir().unwrap();
let oldfilename = "foo.txt";
let oldfilepath = tempdir.path().join(oldfilename);
let newfilename = "bar.txt";
let newfilepath = tempdir.path().join(newfilename);
// Create file
File::create(&oldfilepath).un... | rust_cleaned_test_functions.jsonl/30614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
266,
2458,
368,
341,
262,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
2310,
8404,
284,
330,
7975,
3909,
876,
262,
1077,
2310,
44157,
284,
2730,
3741,
3875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_size() {
// No suffix.
assert_eq!(Ok(1234), parse_size("1234"));
// kB is 1000
assert_eq!(Ok(9 * 1000), parse_size("9kB"));
// K is 1024
assert_eq!(Ok(2 * 1024), parse_size("2K"));
let suffixes = [
('M', 2u32),
('G', 3u32),
('T', 4u32)... | rust_cleaned_test_functions.jsonl/31130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2368,
368,
341,
262,
442,
2308,
20525,
624,
262,
2060,
10714,
10297,
11578,
7,
16,
17,
18,
19,
701,
4715,
2368,
445,
16,
17,
18,
19,
14929,
262,
442,
84435,
374,
220,
16,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_count_bytes_cmp_vbuf() {
use impls::ROIobuf;
let bs = [
ROIobuf::from_str("1234"),
ROIobuf::from_str("5678"),
ROIobuf::from_str("9"),
];
assert_eq!(count_bytes_cmp_vbuf(&bs, 0 ), Ordering::Greater);
assert_eq!(count_bytes_cmp_vbuf(&bs, 10), Ordering::Less);
assert_eq!(c... | rust_cleaned_test_functions.jsonl/5461 | {
"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,
3180,
12524,
35193,
2273,
5909,
368,
341,
220,
990,
11605,
82,
486,
71270,
18464,
401,
220,
1077,
17065,
284,
2278,
262,
50652,
18464,
486,
1499,
2895,
445,
16,
17,
18,
19,
4461,
262,
50652,
184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filters() {
let images = get_testimages("f", "", false);
for path in images.iter() {
assert!(match load_image(path) {
Ok(_) => true,
Err(err) => { println!("file {:?}, failed with {:?}", path.display(), err); false }
})
... | rust_cleaned_test_functions.jsonl/26480 | {
"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,
22481,
368,
341,
286,
1077,
5335,
284,
633,
4452,
3642,
445,
69,
497,
7342,
895,
626,
286,
369,
1815,
304,
5335,
19471,
368,
341,
310,
2060,
10297,
6347,
2795,
4954,
5581,
8,
341,
394,
7622,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_quaternion_conversion() {
use cgmath::Quaternion as CgQuaternion;
// cgmath quaternion
let q1 = CgQuaternion::new(1.0, 2.0, 3.0, 4.0);
let q2 = Quaternion::from(q1);
let q3: CgQuaternion<c_float> = q2.into();
assert_eq!(q1, q3);
} | rust_cleaned_test_functions.jsonl/28250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
16351,
64132,
368,
341,
262,
990,
35740,
10374,
486,
45093,
438,
356,
70,
45093,
401,
262,
442,
35740,
10374,
66775,
198,
262,
1077,
2804,
16,
284,
356,
70,
45093,
486,
931,
7,
16,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_https_url_path() {
let url = "https://github.com/user/repo.git";
let expected_path = "user/repo.git";
assert_eq!(Repo::parse(url).get_sub_path(), expected_path);
} | rust_cleaned_test_functions.jsonl/31149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26817,
2903,
2638,
368,
341,
286,
1077,
2515,
284,
330,
2428,
1110,
5204,
905,
11739,
10758,
5368,
32799,
876,
286,
1077,
3601,
2638,
284,
330,
872,
10758,
5368,
32799,
876,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_numbers() {
check("0", "00", "00");
check("127", "ff00", "7f");
check("-1", "7f", "");
check("-123456", "c0bb78", "");
check("624485", "e58e26", "e58e26");
check("2000000", "8089fa00", "80897a");
check(
"60000000000000000",
"808098f4e9b5caea00",
... | rust_cleaned_test_functions.jsonl/86632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32964,
368,
341,
262,
1779,
445,
15,
497,
330,
15,
15,
497,
330,
15,
15,
797,
262,
1779,
445,
16,
17,
22,
497,
330,
542,
15,
15,
497,
330,
22,
69,
797,
262,
1779,
13645,
16,
497,
330,
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_error_into_status() {
let status = zx::Status::from(Error::Status("foo".to_string(), zx::Status::OK));
assert_eq!(status, zx::Status::OK);
let status = zx::Status::from(Error::Status("foo".to_string(), zx::Status::NOT_SUPPORTED));
assert_eq!(status, zx::Status::N... | rust_cleaned_test_functions.jsonl/101291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
45514,
4773,
368,
341,
286,
1077,
2639,
284,
71322,
486,
2522,
486,
1499,
37396,
486,
2522,
445,
7975,
3263,
983,
3904,
1507,
71322,
486,
2522,
486,
3925,
1106,
286,
2060,
10714,
10297,
2829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_last_insert_rowid() {
let db = checked_memory_handle();
db.execute_batch("CREATE TABLE foo(x INTEGER PRIMARY KEY)")
.unwrap();
db.execute_batch("INSERT INTO foo DEFAULT VALUES").unwrap();
assert_eq!(db.last_insert_rowid(), 1);
let mut stmt = ... | rust_cleaned_test_functions.jsonl/25515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12195,
17678,
8530,
307,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
2927,
7769,
14534,
445,
22599,
14363,
15229,
2075,
30381,
37467,
12013,
19107,
310,
659,
15454,
543,
286,
2927... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_second_2() {
let input = vec!(
String::from("1"),
String::from("17,x,13,19"),
);
let input = parse(&input).unwrap();
let result = second(&input).unwrap();
assert_eq!(result, 3417);
} | rust_cleaned_test_functions.jsonl/103172 | {
"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,
29644,
62,
17,
368,
341,
286,
1077,
1946,
284,
7486,
33673,
310,
923,
486,
1499,
445,
16,
4461,
310,
923,
486,
1499,
445,
16,
22,
12803,
11,
16,
18,
11,
16,
24,
4461,
286,
1439,
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_abort_without_panic_3157() {
let rt = tokio::runtime::Builder::new_multi_thread()
.enable_time()
.worker_threads(1)
.build()
.unwrap();
rt.block_on(async move {
let handle = tokio::spawn(async move {
println!("task started");
... | rust_cleaned_test_functions.jsonl/38858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70907,
39904,
620,
31270,
62,
18,
16,
20,
22,
368,
341,
262,
1077,
16677,
284,
9628,
815,
486,
22255,
486,
3297,
486,
931,
25133,
10814,
741,
286,
659,
12552,
3009,
741,
286,
659,
21462,
29725,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
assert_eq!(Vector2::from([1, 2]), VECTOR2);
{
let v = &[1, 2];
let v: &Vector2<_> = From::from(v);
assert_eq!(v, &VECTOR2);
}
{
let v = &mut [1, 2];
let v: &mu... | rust_cleaned_test_functions.jsonl/39578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
368,
341,
310,
2060,
10714,
10297,
3781,
17,
486,
1499,
2561,
16,
11,
220,
17,
9719,
71459,
17,
317,
310,
341,
394,
1077,
348,
284,
44590,
16,
11,
220,
17,
935,
394,
1077,
348,
25,
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_check_propagation_for_start_leader() {
let mut progress_map = ProgressMap::default();
let poh_slot = 5;
let parent_slot = poh_slot - NUM_CONSECUTIVE_LEADER_SLOTS;
// should succeed
progress_map.insert(
parent_slot,
ForkPro... | rust_cleaned_test_functions.jsonl/11064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
21663,
27137,
5478,
4906,
79991,
368,
341,
286,
1077,
5206,
5098,
5376,
284,
16033,
2227,
486,
2258,
543,
286,
1077,
281,
2267,
27563,
284,
220,
20,
280,
286,
1077,
2681,
27563,
284,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kakun_all_position_gote() {
let blank_banmen = Banmen([[Blank; 9]; 9]);
for x in 0..9 {
for y in 0..9 {
let mut banmen = blank_banmen.clone();
banmen.0[8-y][8-x] = GKakuN;
assert_eq!(legal_moves_from_banmen(&Teban::Gote,&banmen),
Rule::legal_... | rust_cleaned_test_functions.jsonl/81124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
4698,
585,
359,
5705,
9661,
1889,
1272,
368,
972,
10217,
10113,
880,
276,
5676,
284,
22730,
5676,
27119,
22770,
26,
220,
24,
5265,
220,
24,
55531,
2023,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mash_tuples_containing_vars()
{
let mut inferences = HashMap::new();
let oldt = Type::Tuple(Struple(vec![
(None, Type::Var(Lstr::Sref("A"))),
(None, Type::Var(Lstr::Sref("B"))),
]));
let newt =
Type::Tuple(Struple(vec![(None... | rust_cleaned_test_functions.jsonl/15077 | {
"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,
717,
988,
89269,
10260,
2056,
11168,
741,
262,
341,
286,
1077,
5206,
304,
4901,
284,
10528,
486,
931,
543,
286,
1077,
2310,
83,
284,
3990,
486,
28681,
92084,
6061,
25592,
90515,
310,
320,
4064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trivial_drain() {
let mut s = HashSet::<int>::new();
for _ in s.drain() {}
assert!(s.is_empty());
drop(s);
let mut s = HashSet::<int>::new();
drop(s.drain());
assert!(s.is_empty());
} | rust_cleaned_test_functions.jsonl/76100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
26658,
26680,
466,
368,
341,
286,
1077,
5206,
274,
284,
18931,
27638,
396,
6831,
931,
543,
286,
369,
716,
304,
274,
950,
29093,
368,
5613,
286,
2060,
10297,
82,
2079,
15124,
1423,
286,
594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cost_tracker_ok_add_two_same_accounts() {
let (mint_keypair, start_hash) = test_setup();
// build two transactions with same signed account
let (_tx1, keys1, cost1) = build_simple_transaction(&mint_keypair, &start_hash);
let (_tx2, keys2, cost2) = build_simple_tra... | rust_cleaned_test_functions.jsonl/67928 | {
"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,
15890,
50264,
19817,
2891,
23241,
33574,
55665,
368,
341,
286,
1077,
320,
67791,
3097,
12670,
11,
1191,
8950,
8,
284,
1273,
21363,
543,
286,
442,
1936,
1378,
14131,
448,
1852,
8499,
2692,
198,
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_parse_expr() {
assert_eq!(parse_expr("a + b"), Ok(("", "a + b")));
assert_eq!(parse_expr("((a + b))"), Ok(("", "(a + b)")));
assert_eq!(parse_expr("(a + b)"), Ok(("", "a + b")));
assert_eq!(
parse_expr(
"(a
+ b)"
),
Ok((
""... | rust_cleaned_test_functions.jsonl/104935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
21915,
368,
341,
262,
2060,
10714,
10297,
6400,
21915,
445,
64,
488,
293,
3975,
7622,
7,
19814,
330,
64,
488,
293,
17621,
262,
2060,
10714,
10297,
6400,
21915,
445,
1188,
64,
488,
293,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hkdf_parsing() {
for test in wycheproof::hkdf::TestName::all() {
let _kat = wycheproof::hkdf::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5835 | {
"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,
1523,
74,
2940,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
85511,
2940,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
284,
289,
5641,
747,
75636,
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
] | 2 |
#[test]
fn test_poll_future_notify_with_slow_source() {
let (tx, rx) = oneshot::channel::<usize>();
let (signal_tx, signal_rx) = oneshot::channel();
thread::Builder::new()
.name("source".to_owned())
.spawn(move || {
block_on(signal_rx).unwrap();
... | rust_cleaned_test_functions.jsonl/58726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40002,
59740,
36654,
6615,
82447,
10347,
368,
341,
286,
1077,
320,
3998,
11,
19111,
8,
284,
389,
4288,
354,
486,
10119,
27638,
51878,
3913,
286,
1077,
320,
26622,
17805,
11,
8286,
24330,
8,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_build_payload_with_failure_with_mismatches() {
let result = TestResult::Failed(vec![
(Some("1234abc".to_string()), Some(MismatchResult::Mismatches {
mismatches: vec![
MethodMismatch { expected: "PUT".to_string(), actual: "POST".to_string() }
],
expecte... | rust_cleaned_test_functions.jsonl/19552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
32813,
6615,
43618,
6615,
717,
2142,
9118,
368,
341,
262,
1077,
1102,
284,
3393,
2077,
486,
9408,
25592,
90515,
414,
320,
8373,
445,
16,
17,
18,
19,
13683,
3263,
983,
3904,
11858,
4329,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_block_dimension() {
let band_index = 1;
let block = (0, 0);
let dataset = Dataset::open(fixture!("tinymarble.png")).unwrap();
let rasterband = dataset.rasterband(band_index).unwrap();
let array = rasterband.read_block::<u8>(block).unwrap();
let dimension = (1, 100);
... | rust_cleaned_test_functions.jsonl/83447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
7113,
49619,
368,
341,
262,
1077,
7055,
3560,
284,
220,
16,
280,
262,
1077,
2504,
284,
320,
15,
11,
220,
15,
317,
262,
1077,
10337,
284,
39183,
486,
2508,
94886,
17223,
55971,
1600,
277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_payload_from_json() {
let data1 = r#"
{
"invalid_data"
}"#;
let data2 = r#"
{
"array": [1, "hello"],
}"#;
let dir = TempDir::new("payload_dir").unwrap();
let dim = 2;
let config = Segment... | rust_cleaned_test_functions.jsonl/82022 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
31433,
32813,
5673,
9455,
368,
341,
286,
1077,
821,
16,
284,
435,
2,
698,
286,
341,
310,
330,
11808,
1769,
698,
286,
335,
57676,
280,
286,
1077,
821,
17,
284,
435,
2,
698,
286,
341,
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... | 3 |
#[test]
fn test_machine_configuration() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
// test the default values of machine config
// vcpu_count = 1
assert_eq!(vmm.vm_config.vcpu_count, Some(1));
// mem_size = 128
assert_eq!(vmm.vm_config.mem_s... | rust_cleaned_test_functions.jsonl/28143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1906
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38695,
35726,
368,
341,
286,
1077,
5206,
348,
3821,
284,
1855,
2273,
3821,
5314,
7,
8846,
486,
1806,
36161,
626,
286,
442,
1273,
279,
1638,
2750,
315,
5662,
2193,
198,
286,
442,
348,
16475,
3180... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rle() {
let a: &'static [u8] = b"welcometochina";
let mut buf1 = Vec::with_capacity(1024);
unsafe { buf1.set_len(1024); }
let mut buf2 = buf1.clone();
let val1 = a.compress(&mut buf1).unwrap();
let val2 = buf1[..val1].decompress(&mut buf2).unwrap();
asse... | rust_cleaned_test_functions.jsonl/61582 | {
"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,
1710,
273,
368,
341,
262,
1077,
264,
25,
30136,
1978,
508,
84,
23,
60,
284,
293,
80377,
301,
874,
295,
4953,
2210,
3302,
262,
1077,
5206,
6607,
16,
284,
11312,
486,
4197,
35603,
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... | 1 |
#[test]
fn test_map() {
assert::pass(
r#"
def double(x):
return x + x
assert_eq([], map(int, []))
assert_eq([1,2,3], map(int, ["1","2","3"]))
assert_eq(["0","1","2"], map(str, range(3)))
assert_eq(["11",8], map(double, ["1",4]))
"#,
);
} | rust_cleaned_test_functions.jsonl/37705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
368,
341,
286,
2060,
486,
6385,
1006,
310,
435,
2,
698,
750,
1990,
2075,
982,
262,
470,
856,
488,
856,
271,
2207,
10714,
40056,
2415,
1548,
11,
3056,
1171,
2207,
10714,
2561,
16,
11,
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_read_keys_coprocessor() {
// Start resource metering.
let mut cfg = resource_metering::Config::default();
cfg.enabled = true;
cfg.precision = ReadableDuration::millis(100);
cfg.report_receiver_interval = ReadableDuration::millis(400);
let (_, collector_reg_handle, resour... | rust_cleaned_test_functions.jsonl/121522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 654
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
12631,
666,
453,
40848,
269,
368,
341,
262,
442,
5145,
5101,
22962,
287,
624,
262,
1077,
5206,
13286,
284,
5101,
79338,
287,
486,
2648,
486,
2258,
543,
262,
13286,
22141,
284,
830,
280,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fut_timeout() {
let timeout = Arc::new(AtomicBool::new(false));
let timeout2 = Arc::clone(&timeout);
let sys = System::new();
sys.block_on(async {
let _addr = MyActor { timeout: timeout2 }.start();
});
sys.run().unwrap();
assert!(timeout.load(Ordering::Rela... | rust_cleaned_test_functions.jsonl/82645 | {
"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,
761,
332,
20537,
368,
341,
262,
1077,
9632,
284,
19689,
486,
931,
7,
65857,
11233,
486,
931,
3576,
1106,
262,
1077,
9632,
17,
284,
19689,
486,
19982,
2099,
14150,
626,
262,
1077,
5708,
284,
739,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_small_needle() {
let haystack = "111 a 111b";
search_test!(haystack, "a", Some(4));
search_test!(haystack, "a 111", Some(4));
} | rust_cleaned_test_functions.jsonl/19390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31966,
71506,
273,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
876,
286,
2711,
4452,
10297,
67312,
7693,
11,
330,
64,
497,
4329,
7,
19,
1106,
286,
2711,
4452,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_async_wait_timeout() {
let runner = SingleTaskRunner::default();
let rt = runner.startup().unwrap();
thread::spawn(move || {
loop {
if let Err(e) = runner.run() {
println!("!!!!!!run failed, reason: {:?}", e);
break;
... | rust_cleaned_test_functions.jsonl/62460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
18760,
20537,
368,
972,
262,
1077,
22259,
284,
11327,
6262,
19486,
486,
2258,
1647,
262,
1077,
16677,
284,
22259,
4962,
454,
1005,
15454,
7317,
262,
4516,
486,
46087,
34081,
1369,
972,
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... | 5 |
#[test]
fn test_rpc_wallet_setup() {
env_logger::try_init().unwrap();
let bitcoind = create_bitcoind(vec![]);
let node_address = bitcoind.client.get_new_address(None, None).unwrap();
let blockchain = create_rpc(&bitcoind, DESCRIPTOR_PUB, Network::Regtest).unwrap();
let db... | rust_cleaned_test_functions.jsonl/108187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1051
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
62308,
21363,
368,
341,
286,
6105,
27413,
486,
1539,
6137,
1005,
15454,
543,
286,
1077,
2699,
1015,
484,
284,
1855,
13996,
1015,
484,
25592,
0,
56703,
286,
1077,
2436,
6744,
284,
2699,
1015... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_raftstore_config() {
let (mut config, _dir) = TiKvConfig::with_tmp().unwrap();
config.validate().unwrap();
let (cfg_controller, router, _, mut system) = start_raftstore(config.clone(), &_dir);
// dispatch updated config
let change = {
let mut m = std::collecti... | rust_cleaned_test_functions.jsonl/22172 | {
"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,
8882,
62,
2944,
4314,
5332,
368,
341,
262,
1077,
320,
6984,
2193,
11,
716,
3741,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
262,
2193,
19520,
1005,
15454,
543,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_lines_use_tree() {
check_join_lines(
r"
use ra_syntax::{
algo::<|>{
find_leaf_at_offset,
},
ast,
};",
r"
use ra_syntax::{
algo::<|>find_leaf_at_offset,
ast,
};",
);
} | rust_cleaned_test_functions.jsonl/79941 | {
"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,
31017,
18323,
15951,
11663,
368,
341,
286,
1779,
31017,
18323,
1006,
310,
435,
698,
810,
15122,
78894,
74843,
262,
27928,
27638,
91,
41446,
286,
1477,
38909,
3752,
6917,
345,
262,
1153,
262,
11763,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pod_alloc() {
let mut lin = LinearAllocator::new(10_000);
let mut sc = ScopeStack::new(&mut lin);
let _a = sc.alloc_pod::<TestPod>().unwrap();
let _b = sc.alloc_pod::<TestPod>().unwrap();
let _c = sc.alloc_pod::<TestPod>().unwrap();
let _d = sc.al... | rust_cleaned_test_functions.jsonl/107398 | {
"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,
85337,
14802,
368,
341,
286,
1077,
5206,
9805,
284,
28263,
42730,
486,
931,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
5206,
1136,
284,
34920,
4336,
486,
931,
2099,
6984,
9805,
626,
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_flags_from_vec_6() {
let (flags, subcommand, argv) = flags_from_vec(svec![
"deno",
"run",
"--allow-net",
"gist.ts",
"--title",
"X"
]);
assert_eq!(
flags,
DenoFlags {
allow_net: true,
..DenoFlags::default()
}
);... | rust_cleaned_test_functions.jsonl/112835 | {
"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,
14130,
5673,
13251,
62,
21,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
284,
8042,
5673,
13251,
1141,
4083,
90515,
414,
330,
5183,
78,
756,
414,
330,
6108,
756,
414,
14482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_copied() {
let val = 1;
let val_ref = &val;
let opt_none: Option<&'static u32> = None;
let opt_ref = Some(&val);
let opt_ref_ref = Some(&val_ref);
// None works
assert_eq!(opt_none.clone(), None);
assert_eq!(opt_none.copied(), None);
// Immutable ref works
... | rust_cleaned_test_functions.jsonl/20247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
453,
1122,
368,
341,
262,
1077,
1044,
284,
220,
16,
280,
262,
1077,
1044,
7793,
284,
609,
831,
280,
262,
1077,
3387,
31488,
25,
6959,
52244,
6,
1978,
575,
18,
17,
29,
284,
2240,
280,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_interval() {
let text = b"ACGT$TGCA$";
let alphabet = dna::n_alphabet();
let sa = suffix_array(text);
let bwt = bwt(text, &sa);
let less = less(&bwt, &alphabet);
let occ = Occ::new(&bwt, 3, &alphabet);
let fmindex = FMIndex::new(&bwt... | rust_cleaned_test_functions.jsonl/18361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
20541,
368,
341,
286,
1077,
1467,
284,
293,
1,
1706,
25388,
3,
76787,
5049,
3,
3302,
286,
1077,
27790,
284,
75334,
486,
77,
8418,
18485,
543,
286,
1077,
822,
284,
20525,
3858,
7235,
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_simple_edge_traversal_id_v2() {
let client = graph_serializer(GraphSON::V2);
let v = create_vertex(&client, "Traversal");
let v1 = create_vertex(&client, "Traversal");
let e = create_edge(&client, &v, &v1, "TraversalEdge");
let g = traversal().with_remote(client);
let... | rust_cleaned_test_functions.jsonl/26274 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
17932,
3547,
45545,
842,
2273,
17,
368,
341,
262,
1077,
2943,
284,
4771,
67441,
63779,
2703,
486,
53,
17,
626,
262,
1077,
348,
284,
1855,
26611,
2099,
2972,
11,
330,
76276,
797,
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_parse_author_with_non_chinese() {
let documents = load_document("../tests/Soft_Job_M.1181803258.A.666.html");
assert_eq!(
parse_author(&documents).unwrap(),
("eggimage".to_owned(), Some("雞蛋非人哉啊....".to_owned()))
);
} | rust_cleaned_test_functions.jsonl/87146 | {
"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,
21039,
22938,
6615,
21637,
4138,
7346,
368,
341,
286,
1077,
9293,
284,
2795,
26231,
17409,
23841,
14,
30531,
10598,
674,
1245,
13,
16,
16,
23,
16,
23,
15,
18,
17,
20,
23,
875,
13,
21,
21,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dotnet_native() {
let mut runtime = RuntimeContext {
raw_description: ".NET Native 2.0".to_string().into(),
..RuntimeContext::default()
};
normalize_runtime_context(&mut runtime);
assert_eq_dbg!(Some(".NET Native"), runtime.name.as_str());
assert_eq_dbg!(Some... | rust_cleaned_test_functions.jsonl/68950 | {
"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,
30941,
4711,
44494,
368,
341,
262,
1077,
5206,
15592,
284,
10954,
1972,
341,
286,
7112,
11448,
25,
5933,
15373,
16703,
220,
17,
13,
15,
3263,
983,
3904,
1005,
18122,
3148,
286,
5241,
15123,
1972,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cost_model_instruction_cost() {
let mut testee = CostModel::default();
let known_key = Pubkey::from_str("known11111111111111111111111111111111111111").unwrap();
testee.upsert_instruction_cost(&known_key, 100);
// find cost for known programs
assert_eq!(10... | rust_cleaned_test_functions.jsonl/10423 | {
"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,
15890,
5047,
54923,
15890,
368,
341,
286,
1077,
5206,
1273,
2127,
284,
11194,
1712,
486,
2258,
1428,
286,
1077,
3881,
3097,
284,
22611,
792,
486,
1499,
2895,
445,
5278,
16,
16,
16,
16,
16,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.