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_hget_hset_str() {
if let Ok(mut conn) = connection::get_connection(None) {
let key = "redis_hash_test_key_4";
let field = "field";
let value = "value";
self::hset(&mut conn, key, field, value).expect("Error h-setting value");
le... | rust_cleaned_test_functions.jsonl/111550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
455,
1523,
746,
2895,
368,
341,
286,
421,
1077,
7622,
70305,
4534,
8,
284,
3633,
486,
455,
15866,
26717,
8,
341,
310,
1077,
1376,
284,
330,
21748,
8950,
4452,
3097,
62,
19,
876,
310,
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_set_writeampbasedratelimiter_with_auto_tuned() {
let path =
tempdir_with_prefix("_rust_rocksdb_test_set_write_amp_based_rate_limiter_with_auto_tuned");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
opts.set_writeampbasedratelimiter_with_auto_tuned(
... | rust_cleaned_test_functions.jsonl/34090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
9165,
1121,
29939,
17606,
301,
17700,
6615,
27740,
528,
48883,
368,
341,
262,
1077,
1815,
4035,
286,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
4452,
2602,
9165,
60281,
66679,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_and_or_warning() -> TestResult {
let p = polar();
// free-standing OR is fine
p.load_str("f(x) if x > 1 or x < 3;")?;
p.clear_rules();
p.load_str("f(x) if x = 1 and (x > 1 or x < 3);")?;
p.clear_rules();
p.load_str("f(x) if (x = 1 and x > 1) or x < 3;")... | rust_cleaned_test_functions.jsonl/68133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 868
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
8734,
38395,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
1428,
262,
442,
1910,
55603,
2726,
374,
6915,
198,
262,
281,
5104,
2895,
445,
69,
2075,
8,
421,
856,
861,
220,
16,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_index_to_param_eos() {
if let Ok(r) = IndexToParamEos::from_file("src/index_sizes.bin") {
assert_eq!(r.qty, 3);
assert_eq!(r.sizes[0], 1);
assert_eq!(r.sizes[1], 8);
assert_eq!(r.sizes[2], 4);
assert_eq!(r.blocks[0].buf, "A");
assert_eq!(r.bloc... | rust_cleaned_test_functions.jsonl/770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
2346,
4090,
2204,
436,
368,
341,
262,
421,
1077,
7622,
2601,
8,
284,
8008,
1249,
2001,
36,
436,
486,
1499,
2458,
445,
3548,
9022,
32159,
29394,
899,
341,
286,
2060,
10714,
10297,
81,
81410... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_uri_hotp() {
let auth = otpauth::HOTP::new("python");
let expect = "otpauth://hotp/python?secret=OB4XI2DPNY&issuer=python&counter=4";
assert_eq!(expect, auth.to_uri("python", "python", 4));
} | rust_cleaned_test_functions.jsonl/93463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
15572,
33433,
79,
368,
341,
262,
1077,
4166,
284,
83431,
3242,
486,
39,
90146,
486,
931,
445,
12669,
797,
262,
1077,
1720,
284,
330,
48708,
3242,
1110,
10622,
79,
23266,
30,
20474,
28,
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_duplicate_duplicate_confirmed() {
let slot = 0;
let correct_hash = Hash::new_unique();
let cluster_duplicate_confirmed_hash = Some(&correct_hash);
let is_dead = false;
// Bank is not frozen yet
let bank_frozen_hash = Hash::default();
... | rust_cleaned_test_functions.jsonl/48610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
70434,
16059,
8434,
368,
341,
286,
1077,
9446,
284,
220,
15,
280,
286,
1077,
4396,
8950,
284,
6531,
486,
931,
21218,
543,
286,
1077,
10652,
70434,
16059,
8434,
8950,
284,
4329,
2099,
19928,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_counter_vec_local() {
let vec = CounterVec::new(
Opts::new("test_vec_local", "test counter vec help"),
&["l1", "l2"],
)
.unwrap();
let mut local_vec_1 = vec.local();
let mut local_vec_2 = local_vec_1.clone();
assert!(local_... | rust_cleaned_test_functions.jsonl/46522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15730,
13251,
13564,
368,
341,
286,
1077,
7486,
284,
19735,
10050,
486,
931,
1006,
310,
506,
12754,
486,
931,
445,
1944,
13251,
13564,
497,
330,
1944,
5546,
7486,
1492,
4461,
310,
609,
1183,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accept_and_pay() {
new_test_ext().execute_with(|| {
let creator_initial_balance = 100;
let payment_amount = 20;
let expected_incentive_amount = 0;
assert_ok!(Payment::request_payment(
Origin::signed(PAYMENT_RECIPENT),
PAYMENT_CREATOR,
CURRENCY_ID,
payment_amount,
));
a... | rust_cleaned_test_functions.jsonl/111995 | {
"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,
35728,
8378,
28925,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
19919,
15809,
29396,
284,
220,
16,
15,
15,
280,
197,
10217,
8160,
13471,
284,
220,
17,
15,
280,
197,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_txn_store_rawkv_causet() {
let store = AssertionStorage::default();
store.raw_put_ok(Causet_DEFAULT.to_string(), b"k1".to_vec(), b"v1".to_vec());
store.raw_get_ok(Causet_DEFAULT.to_string(), b"k1".to_vec(), Some(b"v1".to_vec()));
store.raw_get_ok("".to_string(), b"k1".to_vec(), S... | rust_cleaned_test_functions.jsonl/120738 | {
"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,
92299,
14809,
16067,
43408,
666,
11855,
295,
368,
341,
262,
1077,
3553,
284,
46730,
5793,
486,
2258,
543,
262,
3553,
18152,
15557,
19817,
3025,
11855,
295,
13811,
2389,
3904,
1507,
293,
62911,
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_decode() {
let frame_data = vec![0x15, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0x03, 0x00, 0x04, 0x00, 0x01];
let frame = Frame::decode(&frame_data).unwrap();
assert_eq!(frame.transaction_id, 0x1501);
assert_eq!(frame.unit_id, 0xFF);
assert_eq!(frame.pdu, &fr... | rust_cleaned_test_functions.jsonl/132689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
368,
341,
286,
1077,
4034,
1769,
284,
7486,
20703,
15,
87,
16,
20,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_confirmed_block_config() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let RpcHandler {
io,
meta,
confirmed_block_signatures,
..
} = start_rpc_handler_with_tx(&bob_pubkey);
let req = format!(
r#... | rust_cleaned_test_functions.jsonl/3053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1037
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
16059,
8434,
7113,
5332,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
341,
310,
6399,
345,
310,
8823,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_bytes_to_bits_tuple_ok2() {
assert!(add_bytes_to_bits_tuple((5, std::u64::MAX), 1) == (6, 7));
} | rust_cleaned_test_functions.jsonl/51480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
12524,
2346,
20034,
21773,
19817,
17,
368,
341,
286,
2060,
10297,
718,
12524,
2346,
20034,
21773,
1188,
20,
11,
1460,
486,
84,
21,
19,
486,
10586,
701,
220,
16,
8,
621,
320,
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 |
#[test]
fn test_extend() {
let mut deq = FixedVecDeque::<[u32; 4]>::new();
deq.extend(vec![1, 2, 3, 4, 5, 6, 7, 8].into_iter());
assert!(!deq.is_empty());
assert!(deq.is_full());
assert_eq!(deq.iter().collect::<Vec<_>>(), vec![&5, &6, &7, &8]);
} | rust_cleaned_test_functions.jsonl/3287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
368,
341,
286,
1077,
5206,
409,
80,
284,
20149,
10050,
73891,
27638,
58,
84,
18,
17,
26,
220,
19,
60,
6831,
931,
543,
286,
409,
80,
15831,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_replog() {
let mut server = Server::new(&Conf);
let random_bytes = |size: usize| -> Vec<u8> {
(0..size).map(|_|thread_rng_n(26) + 48).map(|x| x as u8).collect()
};
... | rust_cleaned_test_functions.jsonl/6021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25533,
839,
368,
341,
286,
1077,
5206,
3538,
284,
8422,
486,
931,
2099,
15578,
317,
286,
1077,
4194,
12524,
284,
760,
2141,
25,
22301,
91,
1464,
11312,
34837,
23,
29,
341,
310,
320,
15,
496,
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_ko_simple() {
// TODO: need to build dictionary
let orig = "한글형태소분석기 테스트 중 입니다.";
let processed = ProcessedText {
original: orig,
processed: Cow::Borrowed(orig),
};
let ko_tokens = Lindera { normal_mode: true, dict: "" }.tokenize(&p... | rust_cleaned_test_functions.jsonl/24092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
78,
30015,
368,
341,
286,
442,
5343,
25,
1184,
311,
1936,
10997,
198,
286,
1077,
2713,
284,
330,
23573,
83291,
128909,
86372,
43590,
79716,
129150,
20487,
10764,
72509,
53189,
70943,
38150,
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_config_validate() {
let mut cfg = Config::default();
cfg.validate().unwrap();
cfg = Config::default();
cfg.region_max_size = Some(ReadableSize(10));
cfg.region_split_size = ReadableSize(20);
assert!(cfg.validate().is_err());
cfg = Config:... | rust_cleaned_test_functions.jsonl/4792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
42681,
368,
341,
286,
1077,
5206,
13286,
284,
5532,
486,
2258,
543,
286,
13286,
19520,
1005,
15454,
1428,
286,
13286,
284,
5532,
486,
2258,
543,
286,
13286,
42976,
6345,
2368,
284,
4329,
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... | 1 |
#[test]
fn test_clear_region() {
let fb = &mut new_fr_buf();
clear_region(fb, ClipRect::full_screen());
let seed = 0;
assert_eq!(m3hash::frame_buffer(fb, seed), 0x3A25F08C);
} | rust_cleaned_test_functions.jsonl/73859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
20627,
368,
341,
286,
1077,
25469,
284,
609,
6984,
501,
41537,
10363,
543,
286,
2797,
20627,
94034,
11,
29692,
4415,
486,
8878,
17649,
1423,
286,
1077,
10320,
284,
220,
15,
280,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_checksum_even_returns_sum_of_evenly_divisible() {
let x = checksum_even("5 9 2 8\n9 4 7 3\n3 8 6 5");
assert_eq!(9, x);
} | rust_cleaned_test_functions.jsonl/103470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64038,
68347,
58900,
10160,
3575,
68347,
398,
16237,
23066,
368,
341,
286,
1077,
856,
284,
32529,
68347,
445,
20,
220,
24,
220,
17,
220,
23,
1699,
24,
220,
19,
220,
22,
220,
18,
1699,
18,
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 |
#[test]
fn test_map() {
let mut map = std::collections::HashMap::new();
map.insert("Foo".to_string(), 4);
let x = Cc::new(map);
assert_eq!(x.get("Foo"), Some(&4));
} | rust_cleaned_test_functions.jsonl/110856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
368,
341,
286,
1077,
5206,
2415,
284,
1460,
486,
51137,
486,
18497,
486,
931,
1428,
286,
2415,
7030,
445,
40923,
3263,
983,
3904,
1507,
220,
19,
626,
286,
1077,
856,
284,
356,
66,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_doc_comment_preserves_indents() {
let file = SourceFile::parse(
r#"
/// doc1
/// ```
/// fn foo() {
/// // ...
/// }
/// ```
mod foo {}
"#,
)
.ok()
.unwrap();
let module = file.syntax().descendants().... | rust_cleaned_test_functions.jsonl/60279 | {
"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,
18869,
17638,
32116,
13280,
9122,
805,
368,
341,
262,
1077,
1034,
284,
8748,
1703,
486,
6400,
1006,
286,
435,
2,
698,
286,
1048,
4629,
16,
198,
286,
1048,
41233,
286,
1048,
5168,
15229,
368,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_type() {
let mut a = "/ip4/127.0.0.1/tcp/1337/ws".parse().unwrap();
assert_eq!(find_type(&a), TransportType::Ws);
a.pop();
a.push(Protocol::Wss);
assert_eq!(find_type(&a), TransportType::Wss);
a.pop();
assert_eq!(find_type(&a), Tr... | rust_cleaned_test_functions.jsonl/18293 | {
"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,
21814,
1819,
368,
341,
286,
1077,
5206,
264,
284,
3521,
573,
19,
14,
16,
17,
22,
13,
15,
13,
15,
13,
16,
95958,
14,
16,
18,
18,
22,
91021,
3263,
6400,
1005,
15454,
1428,
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,
1,
1,
1... | 1 |
#[test]
fn test_ldtk_int_cell_registrations() {
let mut app = App::new();
app.register_ldtk_int_cell_for_layer::<LdtkIntCellBundle>("layer", 1)
.register_ldtk_int_cell::<LdtkIntCellBundle>(2)
.register_default_ldtk_int_cell_for_layer::<LdtkIntCellBundle>(
... | rust_cleaned_test_functions.jsonl/4638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50573,
6242,
4042,
16648,
4920,
3758,
804,
368,
341,
286,
1077,
5206,
906,
284,
1845,
486,
931,
543,
286,
906,
9929,
50573,
6242,
4042,
16648,
5478,
12680,
27638,
43,
67,
6242,
1072,
3599,
8409,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enable_statistics() {
let mut opts = DBOptions::new();
opts.enable_statistics(true);
opts.set_stats_dump_period_sec(60);
assert!(opts.get_statistics().is_some());
assert!(opts
.get_statistics_histogram(HistogramType::DbSeek)
.is_some());
assert!(opts
... | rust_cleaned_test_functions.jsonl/34085 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18988,
49569,
368,
341,
262,
1077,
5206,
12185,
284,
5952,
3798,
486,
931,
543,
262,
12185,
28697,
49569,
3715,
317,
262,
12185,
980,
15381,
18296,
20818,
17242,
7,
21,
15,
317,
262,
2060,
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_undefined_default_object_patterns() {
test(
"const {a = undefined} = obj;",
"const {a} = obj;",
);
test(
"const {a = void 0} = obj;",
"const {a} = obj;",
);
} | rust_cleaned_test_functions.jsonl/490 | {
"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,
62,
9614,
9993,
5314,
64923,
368,
341,
262,
1273,
1006,
286,
330,
1024,
314,
64,
284,
5614,
92,
284,
2839,
32503,
715,
286,
330,
1024,
314,
64,
92,
284,
2839,
64497,
262,
1439,
262,
1273,
1006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_list_clear() {
let mut list = VecList::new();
let index = list.push_back(0);
list.clear();
assert!(list.is_empty());
assert_eq!(list.get(index), None);
} | rust_cleaned_test_functions.jsonl/11515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
21811,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1077,
1922,
284,
1140,
2552,
3895,
7,
15,
317,
286,
1140,
7426,
543,
286,
2060,
10297,
1607,
2079,
15124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_vim_cmd_args_to_value() {
let cmdargs = ["rootPath=/tmp".to_owned()];
assert_eq!(
vim_cmd_args_to_value(&cmdargs).unwrap(),
json!({
"rootPath": "/tmp"
})
);
} | rust_cleaned_test_functions.jsonl/86861 | {
"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,
2273,
318,
11684,
8384,
2346,
3142,
368,
341,
262,
1077,
5439,
2116,
284,
4383,
2888,
1820,
23286,
5173,
3263,
983,
51973,
33800,
262,
2060,
10714,
33673,
286,
36157,
11684,
8384,
2346,
3142,
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,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_client_optimizer() {
solana_logger::setup();
const NUM_CLIENTS: usize = 5;
let optimizer = ClientOptimizer::new(NUM_CLIENTS);
(0..NUM_CLIENTS).into_par_iter().for_each(|_| {
let index = optimizer.experiment();
optimizer.report(index, (NUM_... | rust_cleaned_test_functions.jsonl/13646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8179,
68168,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
733,
15943,
22521,
50,
25,
22301,
284,
220,
20,
280,
286,
1077,
25632,
284,
8423,
80637,
486,
931,
78928,
22521,
50,
317,
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_parse_input() {
let expected_called_numbers = vec![7, 4, 9, 5, 11, 17, 23, 2, 0, 14, 21, 24, 10, 16, 13, 6,
15, 25, 12, 22, 18, 20, 8, 19, 3, 26, 1
];
let (called_numbers, boards) = parse_input(&TEST_INPUT);
assert_eq!(called_numbers, expected_called... | rust_cleaned_test_functions.jsonl/92172 | {
"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,
21039,
5898,
368,
341,
286,
1077,
3601,
27859,
32964,
284,
7486,
20703,
22,
11,
220,
19,
11,
220,
24,
11,
220,
20,
11,
220,
16,
16,
11,
220,
16,
22,
11,
220,
17,
18,
11,
220,
17,
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_missing_resource_hint() -> TestResult {
let p = polar();
let repo_instance = ExternalInstance {
instance_id: 1,
constructor: None,
repr: None,
class_repr: None,
};
let repo_term = term!(Value::ExternalInstance(repo_instance.clone()));
let repo... | rust_cleaned_test_functions.jsonl/68132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 718
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
17962,
45825,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
1428,
262,
1077,
15867,
11904,
284,
30936,
2523,
341,
286,
2867,
842,
25,
220,
16,
345,
286,
4692,
25,
2240,
345,
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... | 7 |
#[test]
fn test_dual_vec_atan() {
let res = DualVec64::<2>::new(0.2, StaticVec::new_vec([1.0, 1.0])).atan();
assert!((res.re - 0.197395559849881).abs() < 1e-12);
assert!((res.eps[0] - 0.961538461538462).abs() < 1e-12);
assert!((res.eps[1] - 0.961538461538462).abs() < 1e-12);
} | rust_cleaned_test_functions.jsonl/28621 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96772,
13251,
3752,
276,
368,
341,
262,
1077,
592,
284,
33659,
10050,
21,
19,
27638,
17,
6831,
931,
7,
15,
13,
17,
11,
23105,
10050,
486,
931,
13251,
2561,
16,
13,
15,
11,
220,
16,
13,
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_range_step() {
assert!(range_step(0i, 20, 5).collect::<Vec<int>>() ==
vec![0, 5, 10, 15]);
assert!(range_step(20i, 0, -5).collect::<Vec<int>>() ==
vec![20, 15, 10, 5]);
assert!(range_step(20i, 0, -6).collect::<Vec<int>>() ==
vec![20, 14, 8, 2]);
... | rust_cleaned_test_functions.jsonl/7955 | {
"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,
9698,
11946,
368,
341,
262,
2060,
10297,
9669,
11946,
7,
15,
72,
11,
220,
17,
15,
11,
220,
20,
568,
17384,
27638,
10050,
4159,
61586,
47761,
310,
7486,
20703,
15,
11,
220,
20,
11,
220,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_backlog_is_completed_with_none() {
let height = 9;
let path = "test-rocksdb/backlog_is_completed_with_none";
{
let backlog = Backlog {
priority: Some(Priority::BlockWithProof),
open_block: None,
proof: Some(gene... | rust_cleaned_test_functions.jsonl/62107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3895,
839,
6892,
49068,
6615,
31488,
368,
341,
286,
1077,
2608,
284,
220,
24,
280,
286,
1077,
1815,
284,
330,
1944,
51934,
14553,
1999,
59948,
839,
6892,
49068,
6615,
31488,
3302,
286,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug_error() {
let code = 6;
let msg = error_string(code);
let kind = decode_error_kind(code);
let err = Error {
repr: Repr::Custom(Box::new(Custom {
kind: ErrorKind::InvalidInput,
error: Box::new(Error {
repr: super::Repr::Os(code),
}),
})),
};
let expected =... | rust_cleaned_test_functions.jsonl/68168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
4096,
368,
341,
197,
10217,
2038,
284,
220,
21,
280,
197,
10217,
3750,
284,
1465,
3904,
15842,
317,
197,
10217,
3093,
284,
16895,
4096,
33162,
15842,
317,
197,
10217,
1848,
284,
4600,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_qjsonvalue() {
let test_str = QJsonValue::from(QVariant::from(QString::from("test")));
let test_str2 = QJsonValue::from(QString::from("test"));
assert!(test_str == test_str2);
assert_eq!(<QJsonValue as Into<QString>>::into(test_str), QString::from("test"));
let test_bool = Q... | rust_cleaned_test_functions.jsonl/56765 | {
"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,
8976,
2236,
957,
368,
341,
262,
1077,
1273,
2895,
284,
1207,
93412,
486,
1499,
6253,
20746,
486,
1499,
20749,
486,
1499,
445,
1944,
17621,
262,
1077,
1273,
2895,
17,
284,
1207,
93412,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_session_sampled_errors() {
let mut envelopes = crate::test::with_captured_envelopes_options(
|| {
sentry::start_session();
for _ in 0..100 {
let err = "NaN".parse::<usize>().unwrap_err();
sentry::capture... | rust_cleaned_test_functions.jsonl/115612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 535
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12316,
17491,
67,
20196,
368,
341,
286,
1077,
5206,
86606,
284,
17717,
486,
1944,
486,
4197,
666,
80228,
6205,
1813,
288,
8743,
1006,
310,
1369,
341,
394,
3208,
884,
486,
2468,
12316,
1428,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_1() {
let words = vec![
"gin".to_string(),
"zen".to_string(),
"gig".to_string(),
"msg".to_string(),
];
assert_eq!(Solution::unique_morse_representations(words), 2);
} | rust_cleaned_test_functions.jsonl/24265 | {
"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,
62,
16,
368,
341,
262,
1077,
4244,
284,
7486,
90515,
414,
330,
8163,
3263,
983,
3904,
3148,
414,
330,
5679,
3263,
983,
3904,
3148,
414,
330,
70,
343,
3263,
983,
3904,
3148,
414,
330,
3236,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jgt_reg() {
test_interpreter_and_jit_asm!(
"
mov r0, 0
mov r1, 5
mov r2, 6
mov r3, 4
jgt r1, r2, +2
jgt r1, r1, +1
jgt r1, r3, +1
exit
mov r0, 1
exit",
[],
(),
{ |_vm, res: Result|... | rust_cleaned_test_functions.jsonl/59015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5374,
5178,
4920,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
220,
15,
198,
286,
1974,
435,
16,
11,
220,
20,
198,
286,
1974,
435,
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_bank_hash_stats() {
solana_logger::setup();
let db = AccountsDb::new(Vec::new(), &ClusterType::Development);
let key = Pubkey::default();
let some_data_len = 5;
let some_slot: Slot = 0;
let account = AccountSharedData::new(1, some_data_len, &key);... | rust_cleaned_test_functions.jsonl/1376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 527
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
8950,
15381,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2927,
284,
40655,
7994,
486,
931,
49923,
486,
931,
1507,
609,
28678,
929,
486,
39419,
626,
286,
1077,
1376,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_good() {
let res = "Munich,2015,23.1".parse::<Climate>();
assert_eq!(
res,
Ok(Climate {
city: "Munich".to_string(),
year: 2015,
temp: 23.1,
})
);
} | rust_cleaned_test_functions.jsonl/10209 | {
"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,
21039,
44781,
368,
341,
286,
1077,
592,
284,
330,
44,
359,
713,
11,
17,
15,
16,
20,
11,
17,
18,
13,
16,
3263,
6400,
27638,
82046,
3913,
286,
2060,
10714,
33673,
310,
592,
345,
310,
7622,
436... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_message_from_buffer_returns_correct_message() {
use std::string::ToString;
let mut buf = Vec::new();
buf.push(1u8);
buf.push(1u8);
buf.push(6u8);
buf.push(0u8);
buf.extend_from_slice(b"\x00\x00\x00\x2A");
buf.extend_from_slice(b"\x... | rust_cleaned_test_functions.jsonl/93669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
5673,
7776,
58900,
31550,
6462,
368,
341,
286,
990,
1460,
486,
917,
486,
5870,
401,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
543,
286,
6607,
2552,
7,
16,
84,
23,
317,
286,
6607,
2552... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_txn_store_gc2_with_long_key_prefix() {
test_txn_store_gc_multiple_tuplespaceInstanton(1024, MAX_TXN_WRITE_SIZE / 1024 * 3);
} | rust_cleaned_test_functions.jsonl/120735 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92299,
14809,
49423,
17,
6615,
17799,
3097,
13974,
368,
341,
262,
1273,
92299,
14809,
49423,
45233,
89269,
1306,
30340,
263,
7,
16,
15,
17,
19,
11,
8334,
18819,
45,
17475,
4098,
608,
220,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_quat_identity() {
let identity = Quat::identity();
assert!(identity.is_near_identity());
assert!(identity.is_normalized());
assert_eq!(identity, Quat::from_xyzw(0.0, 0.0, 0.0, 1.0));
assert_eq!(identity, identity * identity);
let q = Quat::from_rotation_ypr(deg(10.0), deg... | rust_cleaned_test_functions.jsonl/73794 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
266,
46244,
368,
341,
262,
1077,
9569,
284,
3406,
266,
486,
16912,
543,
262,
2060,
10297,
16912,
2079,
76340,
46244,
1423,
262,
2060,
10297,
16912,
2079,
80006,
1423,
262,
2060,
10714,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_superimpose() {
let x = (*SYNTAX_STYLE, 'a');
let pairs = vec![(&x, (*SYNTAX_HIGHLIGHTED_STYLE, 'a'))];
assert_eq!(
superimpose(pairs),
vec![((*SYNTAX_STYLE, *SYNTAX_HIGHLIGHTED_STYLE), 'a')]
);
} | rust_cleaned_test_functions.jsonl/13392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38886,
318,
2900,
368,
341,
310,
1077,
856,
284,
4609,
18416,
78221,
41775,
11,
364,
64,
1157,
310,
1077,
13530,
284,
7486,
20703,
2099,
87,
11,
4609,
18416,
78221,
2039,
90031,
1479,
41775,
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_print_debug() -> Result<(), Box<EvalAltResult>> {
let logbook = Arc::new(RwLock::new(Vec::<String>::new()));
// Redirect print/debug output to 'log'
let log1 = logbook.clone();
let log2 = logbook.clone();
let mut engine = Engine::new();
engine
.on_print(move |s... | rust_cleaned_test_functions.jsonl/52271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 560
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
15446,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
1487,
2190,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
49923,
27638,
703,
6831,
931,
25138,
262,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strip() {
let segwit_tx = "020000000001019c644affd9c62cef3a13c4d2facc4284bcce3f1769d4aeda062413ece120ffc80100000000ffffffff029b660900000000001600147a5d9c9672cb9c788c2b7f217a8b35af6e3f7e8bdee60300000000001976a914228e6b93d66a870fabb41dd064dedbd14804431388ac024730440220453ca5656c155e63bea0a... | rust_cleaned_test_functions.jsonl/116945 | {
"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,
66130,
368,
341,
286,
1077,
4810,
88519,
17805,
284,
330,
15,
17,
15,
15,
15,
15,
15,
15,
15,
15,
15,
16,
15,
16,
24,
66,
21,
19,
19,
2649,
67,
24,
66,
21,
17,
65041,
18,
64,
16,
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_set_all() {
let mut bv = BitVec::new(3);
bv.set_all(true);
assert_eq!(bv.iter().collect::<Vec<bool>>(), vec![true, true, true]);
bv.set_all(false);
assert_eq!(bv.iter().collect::<Vec<bool>>(), vec![false, false, false]);
} | rust_cleaned_test_functions.jsonl/128593 | {
"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,
2602,
5705,
368,
341,
286,
1077,
5206,
56937,
284,
6495,
10050,
486,
931,
7,
18,
626,
286,
56937,
980,
5705,
3715,
317,
286,
2060,
10714,
10297,
54929,
19471,
1005,
17384,
27638,
10050,
17028,
245... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_option() {
test_parse_ok(vec![
("null", None::<String>),
("\"jodhpurs\"", Some("jodhpurs".to_string())),
]);
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
struct Foo {
x: Option<isize>,
}
let value: Foo = from_str("{}").unwrap(... | rust_cleaned_test_functions.jsonl/29842 | {
"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,
9672,
368,
341,
262,
1273,
21039,
19817,
25592,
90515,
286,
3489,
2921,
497,
2240,
27638,
703,
29,
1326,
286,
3489,
2105,
73,
347,
21197,
1723,
55853,
4329,
445,
73,
347,
21197,
1723,
3263,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_thread_signal_set_mask() {
let prev_mask = SigSet::thread_get_mask().expect("Failed to get existing signal mask!");
let mut test_mask = prev_mask;
test_mask.add(SIGUSR1);
assert!(test_mask.thread_set_mask().is_ok());
let new_mask = SigSet::thread_get_mas... | rust_cleaned_test_functions.jsonl/8927 | {
"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,
10814,
21137,
2602,
9999,
368,
341,
286,
1077,
7872,
9999,
284,
41560,
1649,
486,
4528,
3062,
9999,
1005,
17119,
445,
9408,
311,
633,
6350,
8286,
6911,
57073,
286,
1077,
5206,
1273,
9999,
284,
787... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_panic_on_missing_kind() {
wrapper(|env| {
let db = env.db();
let id = env
.fake_release()
.name("strum")
.version("0.13.0")
.create()?;
// https://stackoverflow.com/questions/18209625/h... | rust_cleaned_test_functions.jsonl/13870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
620,
31270,
4470,
40447,
33162,
368,
341,
286,
13261,
22428,
3160,
91,
341,
310,
1077,
2927,
284,
6105,
7076,
543,
310,
1077,
877,
284,
6105,
198,
394,
659,
30570,
24577,
741,
394,
659,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_process_entries_2nd_entry_collision_with_self_and_error() {
solana_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(1000);
let bank = Arc::new(Bank::new(&genesis_config));
... | rust_cleaned_test_functions.jsonl/47536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1770
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
26092,
62,
17,
303,
9078,
70375,
6615,
25637,
8378,
4096,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_bit() {
let mut fb = FooBar(0);
fb.set_foo1(1);
assert_eq!(0x1, fb.0);
assert_eq!(0x1, fb.foo1());
assert_eq!(0x0, fb.foo2());
assert_eq!(false, fb.single_bit());
assert_eq!(-1, fb.signed_single_bit());
fb.set_foo2(1);
assert_eq!(0x8000_0001, fb.0);
... | rust_cleaned_test_functions.jsonl/2261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 589
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
13996,
368,
341,
262,
1077,
5206,
25469,
284,
33428,
3428,
7,
15,
626,
262,
25469,
980,
761,
2624,
16,
7,
16,
317,
262,
2060,
10714,
10297,
15,
87,
16,
11,
25469,
13,
15,
317,
262,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_base_directory() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(
&["--base-directory", "one"],
"b.foo
two
two/c.foo
two/C.Foo2
two/three
two/three/d.foo
two/three/directory_foo",
);
te.asser... | rust_cleaned_test_functions.jsonl/10898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7651,
14846,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
1013,
3713,
7645,
1006,
286,
609,
1183,
313,
3152,
53634,
497,
330,
603,
8097,
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_tcp_sack_nomatch() {
test_interpreter_and_jit_asm!(
TCP_SACK_ASM,
TCP_SACK_NOMATCH,
(),
{ |_vm, res: Result| res.unwrap() == 0x0 },
55
);
} | rust_cleaned_test_functions.jsonl/59078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
643,
473,
53475,
754,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
26656,
1098,
4032,
86906,
345,
286,
26656,
1098,
4032,
1604,
1898,
8884,
345,
286,
84201,
286,
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_has_startfn() {
let wasm: Vec<u8> = vec![
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60, 0x00, 0x00,
0x03, 0x02, 0x01, 0x00, 0x07, 0x08, 0x01, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00,
0x08, 0x01, 0x00, 0x0a, 0x04, 0x01, 0x02, ... | rust_cleaned_test_functions.jsonl/10748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
4906,
8822,
368,
341,
286,
1077,
98263,
25,
11312,
34837,
23,
29,
284,
7486,
90515,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
22,
18,
11,
220,
15,
87,
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_parse_const() {
let s = Syntax::default();
assert_eq!(
super::parse("{{ FOO }}", &s).unwrap(),
vec![Node::Expr(Ws(false, false), Expr::Path(vec!["FOO"]))],
);
assert_eq!(
super::parse("{{ FOO_BAR }}", &s).unwrap(),
... | rust_cleaned_test_functions.jsonl/50222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
13610,
368,
341,
286,
1077,
274,
284,
32117,
486,
2258,
1428,
286,
2060,
10714,
33673,
310,
2256,
486,
6400,
445,
2979,
434,
19499,
3869,
497,
609,
82,
568,
15454,
3148,
310,
7486,
20703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unassigned_planes() {
assert_eq!(DT::of('\u{30000}'), None);
assert_eq!(DT::of('\u{40000}'), None);
assert_eq!(DT::of('\u{50000}'), None);
assert_eq!(DT::of('\u{60000}'), None);
assert_eq!(DT::of('\u{70000}'), None);
assert_eq!(DT::of('\u{80000}'),... | rust_cleaned_test_functions.jsonl/109929 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
39021,
75340,
368,
341,
286,
2060,
10714,
10297,
10599,
486,
1055,
11024,
84,
90,
18,
15,
15,
15,
15,
92,
4567,
2240,
317,
286,
2060,
10714,
10297,
10599,
486,
1055,
11024,
84,
90,
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... | 1 |
#[test]
fn test_owned() {
let gil = Python::acquire_gil();
let py = gil.python();
let obj = get_object(py);
let obj_ptr = obj.as_ptr();
// Ensure that obj does not get freed
let _ref = obj.clone_ref(py);
unsafe {
{
let pool = p... | rust_cleaned_test_functions.jsonl/25425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51973,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
2839,
284,
633,
5314,
46827,
317,
286,
1077,
2839,
4348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_limbs_less_than_limb_constant_time() {
static LESSER: &[(&[Limb], Limb)] = &[
(&[0], 1),
(&[0, 0], 1),
(&[1, 0], 2),
(&[2, 0], 3),
(&[2, 0], 3),
(&[MAX - 1], MAX),
(&[MAX - 1, 0], MAX),
];
... | rust_cleaned_test_functions.jsonl/10664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 691
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58191,
1279,
50747,
51613,
907,
20828,
34967,
3009,
368,
341,
286,
1099,
74948,
640,
25,
44590,
2099,
58,
43,
20828,
1125,
13589,
65,
7252,
284,
609,
9640,
310,
15899,
58,
15,
1125,
220,
16,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mac_spoofing_detection() {
let mut net = Net::default_net(TestMutators::default());
let guest_mac = MacAddr::parse_str("11:11:11:11:11:11").unwrap();
let not_guest_mac = MacAddr::parse_str("33:33:33:33:33:33").unwrap();
let guest_ip = Ipv4Addr::new(10, 1, 2, 3);
... | rust_cleaned_test_functions.jsonl/63425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22802,
643,
5368,
1055,
287,
57505,
368,
341,
286,
1077,
5206,
4179,
284,
9374,
486,
2258,
19722,
31159,
51440,
2973,
486,
2258,
5231,
286,
1077,
8640,
22802,
284,
7401,
13986,
486,
6400,
2895,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_uncle_hash_case2() {
let (shared, chain1, chain2) = prepare();
let dummy_context = dummy_context(&shared);
let uncles: UncleBlockVec = vec![chain2.last().cloned().unwrap().data().as_uncle()].pack();
let uncles_hash = uncles.calc_uncles_hash();
let block = chain1... | rust_cleaned_test_functions.jsonl/118899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
76576,
273,
8950,
19096,
17,
368,
341,
262,
1077,
320,
6100,
11,
8781,
16,
11,
8781,
17,
8,
284,
10549,
543,
262,
1077,
17292,
8467,
284,
17292,
8467,
2099,
6100,
626,
1066,
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_error_from_ffi_error() {
let ffi_err = FfiError {
variant: "FailedFunction".to_char_p(),
message: "Eat my shorts!".to_char_p(),
backtrace: "".to_char_p(),
};
let err: Error = ffi_err.into();
assert_eq!(err, err!(FailedFunction, ... | rust_cleaned_test_functions.jsonl/31441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
5673,
62,
53799,
4096,
368,
341,
286,
1077,
76956,
9266,
284,
434,
9983,
1454,
341,
310,
11424,
25,
330,
9408,
5152,
3263,
983,
9232,
620,
3148,
310,
1943,
25,
330,
88611,
847,
35776,
9299... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_word() {
expect_mapping!("hello" => Token::word("hello"));
expect_mapping!("ab cd" => Token::word("ab"),
Token::word("cd"),
Token::new_line());
expect_mapping!("a b c d" => Token::word("a"),
... | rust_cleaned_test_functions.jsonl/39346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13533,
368,
341,
286,
1720,
26930,
17223,
14990,
1,
589,
9660,
486,
1158,
445,
14990,
14929,
286,
1720,
26930,
17223,
370,
15307,
1,
589,
9660,
486,
1158,
445,
370,
4461,
9699,
9660,
486,
1158,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cycle() {
{
let mut gcs = vec![Gc::new(Cyclic {
prev: GcCell::new(None),
name: 0,
})];
for i in 1..4 {
let prev = gcs[i - 1].clone();
gcs.push(Gc::new(Cyclic {
... | rust_cleaned_test_functions.jsonl/12372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39079,
368,
341,
262,
341,
286,
1077,
5206,
342,
4837,
284,
7486,
20703,
38,
66,
486,
931,
3025,
65304,
341,
7561,
7872,
25,
479,
66,
3599,
486,
931,
26717,
1326,
7561,
829,
25,
220,
15,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_aes128_ecb_dec() {
let key = hex::decode("2b7e151628aed2a6abf7158809cf4f3c").unwrap();
let mut cipher = Aes128Ecb::new(&key);
let ciphertext = hex::decode("\
3ad77bb40d7a3660a89ecaf32466ef97\
f5d3d58503b9699de785895a96fdbaaf\
43b1cd7f598ece23881b00e3ed030688\
7b0c785e27... | rust_cleaned_test_functions.jsonl/49283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
16,
17,
23,
36844,
65,
13783,
368,
341,
9401,
262,
1077,
1376,
256,
284,
12371,
486,
18196,
445,
17,
65,
22,
68,
16,
20,
16,
21,
17,
23,
61454,
17,
64,
21,
370,
69,
22,
16,
20,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_executor_one_block() {
let executor = TestExecutor::new();
let parent_block_id = *GENESIS_BLOCK_ID;
let block_id = gen_block_id(1);
let version = 100;
let txns = (0..version)
.map(|i| wrap_user_txn(encode_mint_transaction(gen_address(i), 100)))
.collect::<Ve... | rust_cleaned_test_functions.jsonl/73894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81207,
11667,
7113,
368,
341,
262,
1077,
31558,
284,
3393,
25255,
486,
931,
1428,
262,
1077,
2681,
7113,
842,
284,
353,
11085,
83366,
18756,
3450,
280,
262,
1077,
2504,
842,
284,
4081,
7113,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_internally_b_roundtrip() {
let v = EnumStructInternally::VariantB {
foo: 1,
bar: 2,
};
test_roundtrip(v);
} | rust_cleaned_test_functions.jsonl/110486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
932,
745,
880,
29896,
32981,
368,
341,
262,
1077,
348,
284,
14086,
9422,
67916,
745,
486,
20746,
33,
341,
286,
15229,
25,
220,
16,
345,
286,
3619,
25,
220,
17,
345,
262,
2605,
262,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_valid_cloudfront_get_streaming_distribution() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"cloudfront-get-streaming-distribution.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_b... | rust_cleaned_test_functions.jsonl/44881 | {
"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,
21039,
8337,
37356,
6951,
3062,
12673,
287,
41465,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
12361,
6951... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer_into() {
let v0 = vec![0u8, 1, 2, 3, 4, 5];
let v1 = v0.clone();
let buf = Buffer::<u16>::from_vec(v0);
let v2: Vec<u8> = buf.into();
assert_eq!(v1, v2);
} | rust_cleaned_test_functions.jsonl/26913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
45514,
368,
341,
262,
1077,
348,
15,
284,
7486,
20703,
15,
84,
23,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
348,
16,
284,
348,
15,
15997,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arpa_name() {
assert!(Name::from_ascii("168.192.in-addr.arpa")
.unwrap()
.parse_arpa_name()
.is_err());
assert!(Name::from_ascii("host.example.com.")
.unwrap()
.parse_arpa_name()
.is_err());
ass... | rust_cleaned_test_functions.jsonl/38226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1964
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25842,
6595,
1269,
368,
341,
286,
2060,
10297,
675,
486,
1499,
50238,
445,
16,
21,
23,
13,
16,
24,
17,
1858,
12,
6214,
16711,
6595,
1138,
310,
659,
15454,
741,
310,
659,
6400,
25842,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_option() {
let (inspector, mut node) = inspector_and_list_node();
inspect_log!(node, some?: Some("a"));
inspect_log!(node, none?: None as Option<String>);
assert_data_tree!(inspector, root: {
list_node: {
"0": { "@time": AnyProper... | rust_cleaned_test_functions.jsonl/96862 | {
"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,
5224,
9672,
368,
341,
286,
1077,
320,
1330,
18997,
11,
5206,
2436,
8,
284,
44725,
8378,
2019,
5084,
1428,
286,
24085,
5224,
10297,
3509,
11,
1045,
4820,
4329,
445,
64,
4010,
286,
24085,
5224,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_last_match() {
let haystack = "111 a 111b".to_string();
search_test!(&haystack, "b", Some(9));
} | rust_cleaned_test_functions.jsonl/19403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12195,
10708,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
3263,
983,
3904,
543,
286,
2711,
4452,
0,
2099,
67312,
7693,
11,
330,
65,
497,
4329,
7,
24,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_account_shared_data_deserialize() {
let key = Pubkey::new_unique();
let (_account1, account2) = make_two_accounts(&key);
account2.deserialize_data::<String>().unwrap();
} | rust_cleaned_test_functions.jsonl/48201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
20405,
1769,
15768,
9050,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5453,
4608,
16,
11,
2692,
17,
8,
284,
1281,
23241,
55665,
2099,
792,
317,
286,
2692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_guild_status() {
let value = GuildStatus::Offline(UnavailableGuild {
id: GuildId::new(1).expect("non zero"),
unavailable: true,
});
serde_test::assert_tokens(
&value,
&[
Token::Struct {
n... | rust_cleaned_test_functions.jsonl/80061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
1498,
4773,
368,
341,
286,
1077,
897,
284,
32492,
2522,
486,
52563,
49289,
10334,
72574,
341,
310,
877,
25,
32492,
764,
486,
931,
7,
16,
568,
17119,
445,
6280,
7168,
4461,
310,
34987,
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_slicing() {
let s = TinyString::<[u8; 16]>::from("foobar");
assert_eq!("foobar", &s[..]);
assert_eq!("foo", &s[..3]);
assert_eq!("bar", &s[3..]);
assert_eq!("oob", &s[1..4]);
} | rust_cleaned_test_functions.jsonl/3639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
89114,
368,
341,
10217,
274,
284,
47974,
703,
27638,
58,
84,
23,
26,
220,
16,
21,
60,
6831,
1499,
445,
50267,
797,
6948,
10714,
17223,
50267,
497,
609,
82,
95874,
2558,
6948,
10714,
17223,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_guild_sticker() {
let route = Route::DeleteGuildSticker {
guild_id: GUILD_ID,
sticker_id: STICKER_ID,
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/stickers/{sticker_id}",
... | rust_cleaned_test_functions.jsonl/119935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
1889,
1498,
1261,
5215,
368,
341,
286,
1077,
6021,
284,
9572,
486,
6435,
72574,
623,
5215,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
46177,
842,
25,
3928,
10685,
640,
3450,
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... | 1 |
#[test]
fn test_header_samples() {
let vcf = Reader::from_path(&"test/test_string.vcf").expect("Error opening file.");
let header = &vcf.header();
assert_eq!(header.id_to_sample(Id(0)), b"one");
assert_eq!(header.id_to_sample(Id(1)), b"two");
assert_eq!(header.sample_to_... | rust_cleaned_test_functions.jsonl/8768 | {
"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,
8757,
18297,
368,
341,
286,
1077,
348,
9792,
284,
25166,
486,
1499,
2638,
2099,
1,
1944,
12697,
3904,
3133,
9792,
1827,
17119,
445,
1454,
8568,
1034,
7320,
286,
1077,
4247,
284,
609,
7362,
69,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_non_genesis_write_set() {
let vm_validator = TestValidator::new();
// Confirm that a correct transaction is validated successfully.
let address = account_config::aptos_root_address();
let transaction = transaction_test_helpers::get_write_set_txn(
address,
... | rust_cleaned_test_functions.jsonl/35414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
21637,
16322,
13774,
9165,
2602,
368,
341,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
1428,
262,
442,
33563,
429,
264,
4396,
7745,
374,
32332,
7790,
624,
262,
1077,
2621,
284,
269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_insensitivity() {
let mut hm = HashMap::new();
hm.insert('a', 2);
assert_eq!(frequency::frequency(&["aA"], 4), hm);
} | rust_cleaned_test_functions.jsonl/13545 | {
"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,
19096,
34386,
47837,
368,
341,
262,
1077,
5206,
49362,
284,
10528,
486,
931,
543,
262,
49362,
7030,
492,
64,
516,
220,
17,
317,
262,
2060,
10714,
10297,
46521,
486,
46521,
2099,
1183,
64,
32,
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 |
#[test]
fn test_introduce_var_last_expr() {
covers!(test_introduce_var_last_expr);
check_assist_range(
introduce_variable,
"
fn foo() {
bar(<|>1 + 1<|>)
}",
"
fn foo() {
let <|>var_name = 1 + 1;
bar(var_name)
}",
);
check_assist_ran... | rust_cleaned_test_functions.jsonl/5711 | {
"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,
4042,
47845,
4612,
12195,
21915,
368,
341,
286,
14521,
10297,
1944,
4042,
47845,
4612,
12195,
21915,
317,
286,
1779,
12083,
380,
9698,
1006,
310,
19131,
14635,
345,
310,
6228,
8822,
15229,
368,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_quote() {
assert_eq!(quote(" ", &[]).ok().unwrap(), "%20");
assert_eq!(quote(" ".to_string(), &[]).ok().unwrap(), "%20");
assert_eq!(quote("test@example.com", &[]).ok().unwrap(), "test%40example.com");
assert_eq!(quote("123!'#$%&()", &[]).ok().unwrap(), "123%21%27%23%24%25%26%28%... | rust_cleaned_test_functions.jsonl/21616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45236,
368,
341,
262,
2060,
10714,
10297,
2949,
445,
3670,
609,
1294,
568,
562,
1005,
15454,
1507,
5962,
17,
15,
797,
262,
2060,
10714,
10297,
2949,
445,
5933,
983,
3904,
1507,
609,
1294,
568,
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_dashmap_secondary_index() {
let (key_start, key_end, account_index) = create_dashmap_secondary_index_state();
let index = AccountsIndex::<bool>::default();
run_test_secondary_indexes(
&index,
&index.spl_token_mint_index,
key_start,
... | rust_cleaned_test_functions.jsonl/2242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84585,
2186,
77759,
3560,
368,
341,
286,
1077,
320,
792,
4906,
11,
1376,
6213,
11,
2692,
3560,
8,
284,
1855,
84585,
2186,
77759,
3560,
4387,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repeating() {
let mut tfd = TimerFd::new().expect("failed to create timerfd");
let dur = Duration::from_millis(200);
let interval = Duration::from_millis(100);
tfd.reset(dur, Some(interval)).expect("failed to arm timer");
sleep(dur * 3);
let cou... | rust_cleaned_test_functions.jsonl/66518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
64877,
368,
341,
286,
1077,
5206,
6409,
67,
284,
17759,
74476,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
9021,
6902,
3071,
286,
1077,
10651,
284,
21045,
486,
1499,
717,
56212,
7,
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... | 1 |
#[test]
fn test_low_level_pbkdf2() {
let django = Django {
version: DjangoVersion::V1_9,
};
let encoded = django.make_password_with_settings("lètmein", "seasalt2", Algorithm::PBKDF2);
assert!(
encoded
== "pbkdf2_sha256$24000$seasalt2$TUDkfilKHVC7BkaKSZgIKhm0aTtXlmcw/5... | rust_cleaned_test_functions.jsonl/104136 | {
"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,
23767,
8274,
31409,
74,
2940,
17,
368,
341,
262,
1077,
8262,
284,
52604,
341,
286,
2319,
25,
52604,
5637,
486,
53,
16,
62,
24,
345,
262,
2605,
262,
1077,
20498,
284,
8262,
10117,
10122,
6615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_spawn_avrcp_client_target() -> Result<(), Error> {
let mut exec = fasync::TestExecutor::new().expect("TestExecutor should be created");
let (peer_manager_proxy, peer_manager_requests) =
create_proxy_and_stream::<PeerManagerMarker>()?;
let (client_sender, mut ... | rust_cleaned_test_functions.jsonl/75838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 809
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76026,
26173,
1287,
79,
8179,
11123,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
2271,
25255,
1265,
387,
3465,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_execute_update_msg_caller() {
with_hypervisor(|hypervisor, tmp_path| {
let id = user_test_id(12);
assert_eq!(
execute_update_on(
&hypervisor,
MSG_CALLER_WAT,
"update_test",
EMPTY_PAYLOAD,
... | rust_cleaned_test_functions.jsonl/123307 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
8882,
6483,
13429,
261,
368,
341,
262,
448,
1523,
1082,
31396,
22428,
78243,
31396,
11,
4174,
2638,
91,
341,
286,
1077,
877,
284,
1196,
4452,
842,
7,
16,
17,
317,
286,
2060,
10714,
33673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_predict_bhepred() {
let expected: Vec<u8> = vec![5, 0, 0, 0, 0,
4, 4, 4, 4, 4,
3, 3, 3, 3, 3,
2, 2, 2, 2, 2,
1, 1, 1, 1, 1];
let mut im = vec![5, 0, 0, 0, 0,
4, 0, 0, 0, 0,
3, 0, ... | rust_cleaned_test_functions.jsonl/66061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26815,
880,
383,
23464,
368,
341,
286,
1077,
3601,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
20,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
345,
1060,
220,
19,
11,
220,
19,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_glob() {
let (_tmp, path) = tmpdir("test-glob");
touch(path.clone() + "/a");
touch(path.clone() + "/b");
touch(path.clone() + "/c");
assert!(glob(path.clone() + "/*").len() == 3);
} | rust_cleaned_test_functions.jsonl/74389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95133,
368,
341,
220,
1077,
5453,
5173,
11,
1815,
8,
284,
4174,
3741,
445,
1944,
2371,
1684,
797,
220,
5796,
5581,
15997,
368,
488,
3521,
64,
797,
220,
5796,
5581,
15997,
368,
488,
3521,
65,
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... | 1 |
#[test]
fn test_parse_param() {
assert_eq!(HumanReadableParser::parse_type("address").unwrap(), ParamType::Address);
assert_eq!(HumanReadableParser::parse_type("bytes").unwrap(), ParamType::Bytes);
assert_eq!(HumanReadableParser::parse_type("bytes32").unwrap(), ParamType::FixedBytes(32))... | rust_cleaned_test_functions.jsonl/77863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4090,
368,
341,
286,
2060,
10714,
10297,
33975,
57938,
6570,
486,
6400,
1819,
445,
4995,
1827,
15454,
1507,
6991,
929,
486,
4286,
317,
286,
2060,
10714,
10297,
33975,
57938,
6570,
486,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zip321_parse_simple() {
let uri = "zcash:ytestsapling1qqqqqqqqqqqqqqqqqrjq05nyfku05msvu49mawhg6kr0wwljahypwyk2h88z6975u563j9k7cxg?amount=3768769.02796286&message=";
let parse_result = TransactionRequest::from_uri(&TEST_NETWORK, &uri).unwrap();
let expected = TransactionR... | rust_cleaned_test_functions.jsonl/81782 | {
"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,
42131,
18,
17,
16,
21039,
30015,
368,
341,
286,
1077,
13071,
284,
330,
34968,
988,
69203,
23841,
391,
2718,
16,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
23004,
43915,
15,
20,
3834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_record_literal_field() {
check(
r#"
struct A { the_field: u32 }
fn foo() {
A { the$0 }
}
"#,
expect![[r#"
fd the_field u32
"#]],
);
} | rust_cleaned_test_functions.jsonl/39747 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
34100,
5013,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
1235,
362,
314,
279,
5013,
25,
575,
18,
17,
456,
8822,
15229,
368,
341,
256,
362,
314,
279,
3,
15,
456,
532,
57676,
345,
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_localize_child_peer_overlap() {
let (_, layer_indices) = ClusterInfo::describe_data_plane(500_000, 200);
let last_ix = layer_indices.len() - 1;
// sample every 33 pairs to reduce test time
for x in (0..*layer_indices.get(last_ix - 2).unwrap()).step_by(33) {
... | rust_cleaned_test_functions.jsonl/12815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
551,
17268,
45159,
65794,
368,
341,
286,
1077,
39464,
6193,
18333,
8,
284,
35380,
1731,
486,
12332,
1769,
46023,
7,
20,
15,
15,
62,
15,
15,
15,
11,
220,
17,
15,
15,
317,
286,
1077,
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_try_finish_snapshot() {
let td = Builder::new().prefix("tikv-store-test").tempdir().unwrap();
let worker = LazyWorker::new("snap-manager");
let sched = worker.scheduler();
let mut s = new_storage(sched, &td);
// PENDING can be finished.
let mut sn... | rust_cleaned_test_functions.jsonl/12751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
42980,
53265,
368,
341,
286,
1077,
17941,
284,
20626,
486,
931,
1005,
11849,
445,
83,
1579,
85,
33252,
16839,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
11864,
284,
44263,
21936,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_reset_escape_function() {
let no_escape: super::EscapeFn = |input| input.to_string();
let mut tera = Tera::default();
tera.add_raw_template("foo", "{{ content }}").unwrap();
tera.autoescape_on(vec!["foo"]);
tera.set_escape_fn(no_escape);
tera.reset... | rust_cleaned_test_functions.jsonl/87549 | {
"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,
18983,
21832,
9174,
368,
341,
286,
1077,
902,
21832,
25,
2256,
486,
48124,
24911,
284,
760,
1355,
91,
1946,
2389,
3904,
543,
286,
1077,
5206,
1982,
64,
284,
350,
2416,
486,
2258,
543,
286,
1982,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nth_bit() {
assert_eq!(nth_bit(0b10000000, 0), 1);
for i in 1..8 {
assert_eq!(nth_bit(0b10000000, i), 0);
}
assert_eq!(nth_bit(0b01000000, 1), 1);
assert_eq!(nth_bit(0b00100000, 2), 1);
assert_eq!(nth_bit(0b00010000, 3), 1);
assert_eq!(nth_bit(0b00001000, 4), ... | rust_cleaned_test_functions.jsonl/99211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78342,
13996,
368,
341,
262,
2060,
10714,
10297,
51738,
13996,
7,
15,
65,
16,
15,
15,
15,
15,
15,
15,
15,
11,
220,
15,
701,
220,
16,
317,
262,
369,
600,
304,
220,
16,
496,
23,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add() {
let v1 = Vec4::new(1.0, 2.0, 3.0, 4.0);
let v2 = Vec4::new(1.0, 2.0, 3.0, 4.0);
assert_eq!(v1 + v2, Vec4::new(2.0, 4.0, 6.0, 8.0));
} | rust_cleaned_test_functions.jsonl/38321 | {
"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,
2891,
368,
341,
286,
1077,
348,
16,
284,
11312,
19,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
317,
286,
1077,
348,
17,
284,
11312,
19,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_revoke_transfer_claim() {
new_test_ext().execute_with(|| {
let claim = vec![1,2,3];
// create
assert_ok!(PoeModule::create_claim(Origin::signed(1), claim.clone()));
// transfer
assert_ok!(PoeModule::transfer_claim(Origin::signed(1), 2, claim.clone()));
// revoke
assert_o... | rust_cleaned_test_functions.jsonl/12046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1288,
7621,
35403,
84969,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
3717,
284,
7486,
20703,
16,
11,
17,
11,
18,
4821,
197,
197,
322,
1855,
198,
197,
6948,
1981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_snippet_with_no_terms() {
let text = "a b c d";
let terms = BTreeMap::new();
let fragments = search_fragments(&From::from(SimpleTokenizer), &text, &terms, 3);
assert_eq!(fragments.len(), 0);
let snippet = select_best_fragment_combination(&fragments[..], ... | rust_cleaned_test_functions.jsonl/609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28022,
21581,
6615,
6536,
37498,
368,
341,
286,
1077,
1467,
284,
330,
64,
293,
272,
294,
3302,
286,
1077,
3793,
284,
425,
6533,
2227,
486,
931,
543,
286,
1077,
34503,
284,
2711,
761,
41956,
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,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_t511() {
init();
let result = t511(vec![
"tenpay.com",
"openmobile.qq.com",
"docs.qq.com",
"connect.qq.com",
"qzone.qq.com",
"vip.qq.com",
"gamecenter.qq.com",
"qun.qq.com",
... | rust_cleaned_test_functions.jsonl/104752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
20,
16,
16,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
20,
16,
16,
25592,
90515,
310,
330,
1960,
13890,
905,
756,
310,
330,
2508,
14933,
60239,
905,
756,
310,
330,
14120,
60239,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uses_positive_min_ttl() {
let now = Instant::now();
let name = Name::from_str("www.example.com.").unwrap();
let query = Query::query(name.clone(), RecordType::A);
// record should have TTL of 1 second.
let ips_ttl = vec![(
Record::from_... | rust_cleaned_test_functions.jsonl/2127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 699
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
62,
4776,
54160,
7260,
87157,
368,
341,
286,
1077,
1431,
284,
18058,
486,
3328,
1428,
286,
1077,
829,
284,
3988,
486,
1499,
2895,
445,
2136,
7724,
905,
98401,
15454,
543,
286,
1077,
3239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hmac_sha2_256() {
let key = b"key";
let data = b"The quick brown fox jumps over the lazy dog";
let result = "f7bc83f430538424b13298e6aa6fb143ef4d59a14946175997479dbc2d1a3cd8";
assert_eq!(&hex::encode(&HmacSha256::oneshot(key, data)), result);
} | rust_cleaned_test_functions.jsonl/12664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
11948,
48836,
17,
62,
17,
20,
21,
368,
341,
262,
1077,
1376,
284,
293,
1,
792,
876,
262,
1077,
821,
284,
293,
10022,
3974,
13876,
38835,
34208,
916,
279,
15678,
5562,
876,
262,
1077,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.