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_correct_collection() {
let file_name: &str = "data/collection_ok_test.txt";
remove_file(file_name.to_string());
let mut all_collections = Vec::<Collection>::new();
all_collections = fetch_all_collections(file_name.to_string(), &String::new());
if !Collection::exist(&all_col... | rust_cleaned_test_functions.jsonl/50014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31550,
25019,
368,
341,
262,
1077,
1034,
1269,
25,
609,
495,
284,
330,
691,
2899,
1908,
19817,
4452,
3909,
876,
262,
4057,
2458,
4866,
1269,
2389,
3904,
5231,
262,
1077,
5206,
678,
89742,
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... | 3 |
#[test]
fn test_del_item() {
let gil = Python::acquire_gil();
let py = gil.python();
let mut v = HashMap::new();
v.insert(7, 32);
let ob = v.to_object(py);
let dict = <PyDict as PyTryFrom>::try_from(ob.as_ref(py)).unwrap();
assert!(dict.del_item(7i32).is_o... | rust_cleaned_test_functions.jsonl/87939 | {
"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,
18029,
5634,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
5206,
348,
284,
10528,
486,
931,
543,
286,
348,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_offsetdatetime() {
let mut buf = PgRawBuffer::default();
Encode::<Postgres>::encode(&POSTGRES_EPOCH.assume_utc(), &mut buf);
assert_eq!(&**buf, [0; 8]);
buf.clear();
let date = (POSTGRES_EPOCH + 1.hours()).assume_offset(offset!(+3));
Encode::<Postgres>::enco... | rust_cleaned_test_functions.jsonl/21438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
6917,
15450,
368,
341,
262,
1077,
5206,
6607,
284,
97265,
20015,
4095,
486,
2258,
1428,
262,
56562,
27638,
4133,
17818,
6831,
6180,
2099,
2946,
91891,
2089,
69945,
13,
45051,
84259,
1507,
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_zip_unzip() {
let z1 = vec![(1, 4), (2, 5), (3, 6)];
let (left, right): (Vec<_>, Vec<_>) = z1.iter().cloned().unzip();
assert_eq!((1, 4), (left[0], right[0]));
assert_eq!((2, 5), (left[1], right[1]));
assert_eq!((3, 6), (left[2], right[2]));
} | rust_cleaned_test_functions.jsonl/24405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
4907,
9964,
368,
341,
262,
1077,
1147,
16,
284,
7486,
0,
9697,
16,
11,
220,
19,
701,
320,
17,
11,
220,
20,
701,
320,
18,
11,
220,
21,
73663,
262,
1077,
320,
2359,
11,
1290,
1648,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_whitespace() {
assert_eq!(
parse("LBL:\n\n\n").unwrap().body,
vec![Node(
Statement::Label(Node(
LabelDecl("LBL".into()),
span(1, 1, 1, 5)
)),
span(1, 1, 1, 5)
)]
... | rust_cleaned_test_functions.jsonl/118211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 841
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86175,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
445,
21233,
7190,
77,
1699,
1699,
1827,
15454,
1005,
2599,
345,
310,
7486,
20703,
1955,
1006,
394,
21756,
486,
2476,
22078,
1006,
503,
9402,
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_secondary_pow_scale() {
let window = DIFFICULTY_ADJUST_WINDOW;
let mut hi = HeaderInfo::from_diff_scaling(Difficulty::from_num(10), 100);
// testnet4 testing
{
global::set_mining_mode(global::ChainTypes::Testnet4);
assert_eq!(global::is_mainnet(), false);
// difficulty block
hi.... | rust_cleaned_test_functions.jsonl/86313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77759,
56183,
16727,
368,
341,
10217,
3241,
284,
68549,
1317,
3532,
56,
22510,
48002,
24780,
280,
10217,
5206,
15588,
284,
12104,
1731,
486,
1499,
15850,
79216,
5432,
3092,
25990,
486,
1499,
4273,
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_empty_log() {
let ethabi_event = ethabi::Event { name: "hello".into(), inputs: vec![], anonymous: false };
let e = Event::from(ðabi_event);
let expected = quote! {
#[derive(Debug, Clone, PartialEq)]
pub struct Hello {}
};
assert_eq!(expected.to_string(), e.generate_log().to... | rust_cleaned_test_functions.jsonl/22233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
5224,
368,
341,
197,
10217,
8372,
25084,
6748,
284,
8372,
25084,
486,
1556,
314,
829,
25,
330,
14990,
3263,
18122,
1507,
11127,
25,
7486,
0,
12995,
22151,
25,
895,
3634,
197,
10217,
384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xo() {
#[derive(OptionLike)]
enum XOption<T> {
Some(T),
None,
}
let xo = XOption::Some(1);
assert!(xo.unwrap() == 1);
let op = xo.into_option();
assert!(op == Some(1));
} | rust_cleaned_test_functions.jsonl/129336 | {
"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,
3212,
78,
368,
341,
262,
11506,
27098,
7,
5341,
12949,
5563,
262,
7618,
1599,
5341,
3125,
29,
341,
286,
4329,
4140,
1326,
286,
2240,
345,
262,
555,
262,
1077,
97021,
284,
1599,
5341,
486,
8373,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interface_names() {
assert_eq!(
"wg-01".parse::<InterfaceName>().unwrap().as_str_lossy(),
"wg-01"
);
assert!("longer-nul\0".parse::<InterfaceName>().is_err());
let invalid_names = &[
("", InvalidInterfaceName::Empty), ... | rust_cleaned_test_functions.jsonl/98612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20546,
9187,
368,
341,
286,
2060,
10714,
33673,
310,
330,
45540,
12,
15,
16,
3263,
6400,
27638,
5051,
675,
10483,
15454,
1005,
300,
2895,
11193,
88,
3148,
310,
330,
45540,
12,
15,
16,
698,
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_deserialization() {
let encoded = vec![
78, 243, 244, 18, 4, 10, 72, 8, 1, 16, 185, 96, 24, 2, 34, 24, 10, 4, 104, 97, 115,
104, 18, 16, 8, 192, 132, 61, 18, 10, 112, 97, 114, 116, 115, 95, 104, 97, 115, 104,
42, 11, 8, 177, 211, 129, 210, 5, 16, 128, ... | rust_cleaned_test_functions.jsonl/13373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 964
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
50563,
368,
341,
286,
1077,
20498,
284,
7486,
90515,
310,
220,
22,
23,
11,
220,
17,
19,
18,
11,
220,
17,
19,
19,
11,
220,
16,
23,
11,
220,
19,
11,
220,
16,
15,
11,
220,
22,
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_uint8_from_bits() {
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
for _ in 0..1000 {
let v = (0..8)
.map(|_| Boolean::constant(rng.gen()))
.collect::<Vec<_>>();
let b = UInt8::from_bits_le(&v);
for ... | rust_cleaned_test_functions.jsonl/51697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
23,
5673,
20034,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
16,
17,
18,
16,
17,
22,
20,
22,
23,
24,
84,
21,
19,
626,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_vec_list_contains() {
let mut list = VecList::new();
assert!(!list.contains(&0));
let index = list.push_back(0);
assert!(list.contains(&0));
list.remove(index);
assert!(!list.contains(&0));
} | rust_cleaned_test_functions.jsonl/11516 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
63598,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
2060,
0,
3471,
1607,
8786,
2099,
15,
3237,
286,
1077,
1922,
284,
1140,
2552,
3895,
7,
15,
317,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_credit_update_to_peer() {
let mut ctx = CsmTestContext::new_established();
ctx.conn.last_fwd_cnt_to_peer = Wrapping(0);
ctx.conn.fwd_cnt = Wrapping(csm_defs::CONN_CREDIT_UPDATE_THRESHOLD as u32);
let data = &[1, 2, 3, 4];
ctx.init_data_... | rust_cleaned_test_functions.jsonl/83293 | {
"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,
51569,
8882,
2346,
45159,
368,
341,
286,
1077,
5206,
5635,
284,
356,
3563,
2271,
1972,
486,
931,
18583,
5102,
291,
1428,
1789,
286,
5635,
22810,
9110,
81083,
15982,
2346,
45159,
284,
31630,
3629,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_replace() {
let mut args = HashMap::new();
args.insert("from".to_string(), to_value(&"Hello").unwrap());
args.insert("to".to_string(), to_value(&"Goodbye").unwrap());
let result = replace(to_value(&"Hello world!").unwrap(), args);
assert!(result.is_ok());
... | rust_cleaned_test_functions.jsonl/49417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
368,
341,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
1499,
3263,
983,
3904,
1507,
311,
3142,
2099,
1,
9707,
1827,
15454,
1423,
286,
2827,
7030,
445,
983,
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_create_stake_account_from_seed() {
let vote_keypair = Keypair::new();
let vote_pubkey = vote_keypair.pubkey();
let identity_keypair = Keypair::new();
let identity_pubkey = identity_keypair.pubkey();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
... | rust_cleaned_test_functions.jsonl/68174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1261,
726,
13500,
5673,
33809,
368,
341,
262,
1077,
6910,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
6910,
34014,
792,
284,
6910,
3097,
12670,
47773,
792,
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... | 2 |
#[test]
fn test_assign_assign_exprs() {
let out: (i64, (), ()) = rune_s! {
r#"
pub fn main() {
let a = #{b: #{c: #{d: 1}}};
let b = 2;
let c = 3;
c = b = a.b.c = 4;
(a.b.c, b, c)
}
"#
};
assert_eq!(out, (4, ... | rust_cleaned_test_functions.jsonl/94543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
20688,
21915,
82,
368,
341,
262,
1077,
700,
25,
320,
72,
21,
19,
11,
38104,
44481,
284,
63499,
643,
0,
341,
286,
435,
2,
698,
286,
6675,
5168,
1887,
368,
341,
310,
1077,
264,
284,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_level_from_str() {
let tests = [
("OFF", Err(ParseLevelError(()))),
("error", Ok(Level::Error)),
("warn", Ok(Level::Warn)),
("info", Ok(Level::Info)),
("debug", Ok(Level::Debug)),
("trace", Ok(Level::Trace)),
... | rust_cleaned_test_functions.jsonl/71727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8274,
5673,
2895,
368,
341,
286,
1077,
7032,
284,
2278,
310,
3489,
27068,
497,
15495,
71812,
4449,
1454,
5065,
41749,
310,
3489,
841,
497,
7622,
30263,
486,
1454,
6965,
310,
3489,
33481,
497,
7622... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_syntax_tree_inside_string() {
let (analysis, range) = analysis_and_range(
r#"fn test() {
assert!("
<|>fn foo() {
}<|>
fn bar() {
}
", "");
}"#
.trim(),
);
let syn = analysis.syntax_tree(range.file_id, Some(range.range)).unwrap();
as... | rust_cleaned_test_functions.jsonl/516 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78894,
11663,
72860,
3904,
368,
341,
286,
1077,
320,
34484,
11,
2088,
8,
284,
6358,
8378,
9698,
1006,
310,
435,
55543,
8822,
1273,
368,
341,
262,
2060,
17223,
198,
27,
91,
29,
8822,
15229,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reindent_multiline_single_line() {
assert_eq!("", reindent_multiline("".into(), false, None));
assert_eq!("...", reindent_multiline("...".into(), false, None));
assert_eq!("...", reindent_multiline(" ...".into(), false, None));
assert_eq!("...", reindent_multil... | rust_cleaned_test_functions.jsonl/6179 | {
"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,
1288,
32840,
26290,
26560,
19487,
6528,
368,
341,
286,
2060,
10714,
17223,
497,
312,
32840,
26290,
26560,
445,
3263,
18122,
1507,
895,
11,
2240,
1106,
286,
2060,
10714,
17223,
46844,
312,
32840,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_cpu_request() {
assert_eq!(parse_cpu_request("all").unwrap(), CpuRequest::All);
assert_eq!(parse_cpu_request("10").unwrap(), CpuRequest::Compact(10));
assert_eq!(
parse_cpu_request("5 compact").unwrap(),
CpuRequest::Compact(5)
);
... | rust_cleaned_test_functions.jsonl/107800 | {
"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,
21039,
21795,
7893,
368,
341,
286,
2060,
10714,
10297,
6400,
21795,
7893,
445,
541,
1827,
15454,
1507,
356,
5584,
1900,
486,
2403,
317,
286,
2060,
10714,
10297,
6400,
21795,
7893,
445,
16,
15,
182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lin_reg() {
#![allow(clippy::similar_names)]
#![allow(clippy::all)]
let candles = RandomCandles::default();
let src: Vec<ValueType> = candles.take(300).map(|x| x.close).collect();
[
2, 3, 4, 5, 6, 7, 10, 11, 13, 17, 20, 21, 22, 25, 70, 77, 100, 125, 128, 173, 254,
]
.iter()
... | rust_cleaned_test_functions.jsonl/69753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24606,
4920,
368,
341,
197,
197,
85366,
7183,
9849,
45749,
486,
64287,
9187,
5563,
197,
197,
85366,
7183,
9849,
45749,
486,
541,
27771,
197,
10217,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_currency() {
assert_eq!(Currency::Dollar(Dollar), Money::dollar(1).currency());
assert_eq!(Currency::Franc(Franc), Money::franc(1).currency());
} | rust_cleaned_test_functions.jsonl/115299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34710,
368,
341,
286,
2060,
10714,
10297,
26321,
486,
35,
21295,
5432,
21295,
701,
17633,
486,
67,
21295,
7,
16,
568,
15973,
1423,
286,
2060,
10714,
10297,
26321,
486,
80328,
7832,
81,
1129,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_banking_stage_tick() {
let (genesis_block, _mint_keypair) = GenesisBlock::new(2);
let bank = Arc::new(Bank::new(&genesis_block));
let start_hash = bank.last_id();
let (verified_sender, verified_receiver) = channel();
let (to_validator_sender, _) = channel(... | rust_cleaned_test_functions.jsonl/124964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
32334,
35238,
43612,
368,
341,
286,
1077,
320,
77894,
7113,
11,
716,
67791,
3097,
12670,
8,
284,
40788,
4713,
486,
931,
7,
17,
317,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
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_null_support() {
let codec = create_test_codec();
let encoder = create_encoder(&codec);
let decoder = create_decoder(&codec);
let data = test_data();
let mut buf = Vec::new();
for (prop_id, _v) in &data {
let mut real_data = data.clone... | rust_cleaned_test_functions.jsonl/72470 | {
"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,
15162,
25827,
368,
341,
286,
1077,
34647,
284,
1855,
4452,
51084,
543,
286,
1077,
23668,
284,
1855,
39068,
2099,
34607,
317,
286,
1077,
24551,
284,
1855,
49843,
2099,
34607,
317,
286,
1077,
821,
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... | 2 |
#[test]
fn test_put_empty() {
let tmp_dir = tempdir().unwrap();
let db = LibraDB::new(&tmp_dir);
let store = &db.event_store;
let mut cs = ChangeSet::new();
assert_eq!(
store.put_events(0, &[], &mut cs).unwrap(),
*ACCUMULATOR_PLACEHOLDER_HASH
);
} | rust_cleaned_test_functions.jsonl/92846 | {
"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,
15557,
15124,
368,
341,
262,
1077,
4174,
4334,
284,
2730,
3741,
1005,
15454,
543,
262,
1077,
2927,
284,
5688,
956,
3506,
486,
931,
2099,
5173,
4334,
317,
262,
1077,
3553,
284,
609,
1999,
5773,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_field() {
let mut table = build_table_with_size(0);
insert_fields(
&mut table,
vec![HeaderField::new("", ""), HeaderField::new("", "")],
);
let mut buf = vec![];
Duplicate(1).encode(&mut buf);
let mut en... | rust_cleaned_test_functions.jsonl/37417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
5013,
368,
341,
1789,
286,
1077,
5206,
1965,
284,
1936,
5237,
6615,
2368,
7,
15,
317,
286,
5656,
12132,
1006,
310,
609,
6984,
1965,
345,
310,
7486,
20703,
4047,
1877,
486,
931,
19814,
771... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fuzz_hasher() {
const INPUT_MAX: usize = 4 * CHUNK_LEN;
let mut input_buf = [0; 3 * INPUT_MAX];
paint_test_input(&mut input_buf);
// environment variable for specifying a larger number of fuzz iterations.
let num_tests = if cfg!(debug_assertions) { 100 } else { 10_... | rust_cleaned_test_functions.jsonl/39149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
8889,
8950,
261,
368,
341,
262,
733,
26149,
6806,
25,
22301,
284,
220,
19,
353,
98617,
15536,
280,
262,
1077,
5206,
1946,
10363,
284,
508,
15,
26,
220,
18,
353,
26149,
6806,
935,
262,
617... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dedicated() -> () {
let system = KompactConfig::default().build().expect("System");
let tc = system.create_dedicated(TestComponent::new);
let rc = system.create_dedicated(RecvComponent::new);
let rctp: RequiredRef<TestPort> = rc.required_ref();
let tctp: ... | rust_cleaned_test_functions.jsonl/36829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 636
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
291,
10089,
368,
1464,
1719,
341,
286,
1077,
1849,
284,
730,
14435,
531,
2648,
486,
2258,
1005,
5834,
1005,
17119,
445,
2320,
3071,
286,
1077,
17130,
284,
1849,
2520,
814,
291,
10089,
31159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_finalize_some_value_3() {
assert_eq!(finalize(0xDEADBEEFDEADBEEF), 0x2152411021524110);
} | rust_cleaned_test_functions.jsonl/54039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70616,
61855,
3142,
62,
18,
368,
341,
286,
2060,
10714,
10297,
94405,
7,
15,
78979,
94373,
7099,
37,
1150,
94373,
7099,
37,
701,
220,
15,
87,
17,
16,
20,
17,
19,
16,
16,
15,
17,
16,
20,
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 |
#[test]
fn test_geometry() {
let (line_string, expected_coords) = create_line_string();
let actual_coords = Geometry::LineString(line_string)
.coords_iter()
.collect::<Vec<_>>();
assert_eq!(expected_coords, actual_coords);
} | rust_cleaned_test_functions.jsonl/21577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57022,
368,
341,
286,
1077,
320,
1056,
3904,
11,
3601,
32576,
8,
284,
1855,
6528,
3904,
1428,
286,
1077,
5042,
32576,
284,
38918,
486,
2460,
703,
8797,
3904,
340,
310,
659,
35030,
11723,
741,
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 |
#[test]
fn test_memcmp_try_decode_first() {
use super::MEMCMP_GROUP_SIZE as N;
fn do_test(
is_desc: bool,
payload_len: usize,
prefix_len: usize,
suffix_len: usize,
encoded_prefix_len: usize,
encoded_suffi... | rust_cleaned_test_functions.jsonl/26697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12976,
7293,
53283,
15227,
12978,
368,
341,
286,
990,
2256,
486,
31970,
93158,
20130,
4098,
438,
451,
401,
1789,
23459,
286,
5168,
653,
4452,
1006,
310,
374,
10986,
25,
1807,
345,
310,
7729,
6043,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eval_measurement() {
let s = expr("1.0 ± 2.0");
assert_eq!(s.to_string(), "(± 1.0 2.0)");
let val = eval_expr(&s);
match val {
Value::Measurement(m) => assert_eq!(m, Measurement::new(1.0, 2.0)),
_ => panic!("Error")
}
} | rust_cleaned_test_functions.jsonl/99662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
87342,
368,
341,
286,
1077,
274,
284,
15169,
445,
16,
13,
15,
20287,
220,
17,
13,
15,
797,
286,
2060,
10714,
10297,
82,
2389,
3904,
1507,
11993,
37021,
220,
16,
13,
15,
220,
17,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bad_sig_target() {
verify_signature("I am attesting that this Twitter handle @BihelSimon is linked to the Tezos account tz1giDGsifWB9q9siekCKQaJKrmC9da5M43J.", &jwk_from_tezos_key("edpkvRWhuk5cLe5vwR7TGfSJxVLmVDk5og45WAhsAAvfqQXmYKNPve").unwrap(), "edsigtvJYvymTLaGPwbwcmtcfNNGcrSFtGNUWuXgwHX... | rust_cleaned_test_functions.jsonl/76523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
29252,
11123,
368,
341,
262,
10146,
39859,
445,
40,
1079,
1619,
59855,
429,
419,
6271,
3705,
569,
33,
6996,
301,
68781,
374,
10592,
311,
279,
2655,
53701,
2692,
42528,
16,
8212,
53725,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_host() {
TermLogger::new(log::LevelFilter::Debug, Config::default()).unwrap();
let info = super::MyHost::new().unwrap();
println!("{:#?}", info);
} | rust_cleaned_test_functions.jsonl/126605 | {
"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,
5921,
12848,
368,
341,
286,
17519,
7395,
486,
931,
12531,
486,
4449,
5632,
486,
7939,
11,
5532,
486,
2258,
6011,
15454,
543,
286,
1077,
3546,
284,
2256,
486,
5050,
9296,
486,
931,
1005,
15454,
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 |
#[test]
fn test_parse_encoded_pointer_sleb128() {
let encoding =
constants::DwEhPe(constants::DW_EH_PE_textrel.0 | constants::DW_EH_PE_sleb128.0);
let expected_rest = [1, 2, 3, 4];
let input = Section::with_endian(Endian::Little)
.sleb(-0x1111)
.appen... | rust_cleaned_test_functions.jsonl/9415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
73069,
21425,
643,
273,
65,
16,
17,
23,
368,
341,
286,
1077,
11170,
4035,
310,
18021,
486,
35,
86,
36,
71,
10197,
80368,
486,
54219,
2089,
39,
45784,
4326,
3748,
13,
15,
760,
18021,
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_invalid_parent_offset() {
let shred = Shred::new_from_data(10, 0, 1000, Some(&[1, 2, 3]), false, false, 0, 1, 0);
let mut packet = Packet::default();
shred.copy_to_packet(&mut packet);
let shred_res = Shred::new_from_serialized_shred(packet.data.to_vec());
... | rust_cleaned_test_functions.jsonl/28201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
15960,
6917,
368,
341,
286,
1077,
97762,
284,
1417,
1151,
486,
931,
5673,
1769,
7,
16,
15,
11,
220,
15,
11,
220,
16,
15,
15,
15,
11,
4329,
2099,
58,
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_single_char() {
let col_index = LineIndex::new(
"
const C: char = 'メ';
",
);
assert_eq!(col_index.utf16_lines.len(), 1);
assert_eq!(col_index.utf16_lines[&1].len(), 1);
assert_eq!(
col_index.utf16_lines[&1][0],
Utf16Char {
start: 17.into(),
... | rust_cleaned_test_functions.jsonl/47464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
9232,
368,
341,
262,
1077,
1375,
3560,
284,
7083,
1552,
486,
931,
1006,
414,
6228,
1024,
356,
25,
1161,
284,
364,
38750,
1010,
756,
262,
3475,
262,
2060,
10714,
10297,
2074,
3560,
89905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_users() {
run_test(|url, client| {
let login =
create_and_authorize_user(url, &client, "test_get_users@gmail.com", "Admin2193!");
let users_response = client
.get(&format!("{}/biome/users", url))
.header("Author... | rust_cleaned_test_functions.jsonl/32288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
16348,
368,
341,
286,
1598,
4452,
22428,
1085,
11,
2943,
91,
341,
310,
1077,
5858,
4035,
394,
1855,
8378,
22938,
551,
3317,
6522,
11,
609,
2972,
11,
330,
1944,
3062,
16348,
10375,
905,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vec3_fmt() {
let a = Vec3::new(1.0, 2.0, 3.0);
#[cfg(all(
target_feature = "sse2",
not(feature = "packed-vec3"),
not(feature = "scalar-math")
))]
assert_eq!(format!("{:?}", a), "Vec3(__m128(1.0, 2.0, 3.0, 3.0))");
#[cfg(any(
not(target_feature ... | rust_cleaned_test_functions.jsonl/84428 | {
"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,
13251,
18,
38128,
368,
341,
262,
1077,
264,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
11506,
14072,
20388,
1006,
286,
2169,
17069,
284,
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_split_check() {
let path = Builder::new().prefix("test-raftstore").tempdir().unwrap();
let path_str = path.path().to_str().unwrap();
let db_opts = DBOptions::new();
let cfs_opts = ALL_CFS
.iter()
.map(|cf| {
let cf_opts = Co... | rust_cleaned_test_functions.jsonl/17496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 948
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
7200,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
1005,
11849,
445,
1944,
12,
2944,
4314,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
2895,
284,
1815,
3875,
1005,
983,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fixed_len_byte_array_statistics() {
let input = vec!["aawaa", "zz ", "aaw ", "m ", "qrs "]
.iter()
.map(|&s| {
let b: ByteArray = s.into();
b.into()
})
.collect::<Vec<FixedLenByteArray>>();
le... | rust_cleaned_test_functions.jsonl/85670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
6043,
19737,
3858,
49569,
368,
341,
286,
1077,
1946,
284,
7486,
0,
1183,
64,
672,
5305,
497,
330,
10400,
256,
3670,
330,
64,
672,
220,
3670,
330,
76,
262,
3670,
330,
80,
5428,
220,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_match_message_call() {
let mut state = State {
quit: false,
position: Point { x: 0, y: 0 },
color: (0, 0, 0),
};
state.process(Message::ChangeColor((255, 0, 255)));
state.process(Message::Echo(String::from("hello world")));
... | rust_cleaned_test_functions.jsonl/340 | {
"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,
10708,
6462,
13429,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
341,
310,
16835,
25,
895,
345,
310,
2309,
25,
5126,
314,
856,
25,
220,
15,
11,
379,
25,
220,
15,
1153,
310,
1894,
25,
320,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_named_type() {
let want = NamedType {
base: BaseNode::default(),
name: Identifier {
base: BaseNode::default(),
name: "int".to_string(),
},
};
let mut builder = flatbuffers::FlatBufferBuilder::new();
... | rust_cleaned_test_functions.jsonl/112504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71834,
1819,
368,
341,
286,
1077,
1366,
284,
40459,
929,
341,
310,
2331,
25,
5351,
1955,
486,
2258,
3148,
310,
829,
25,
34621,
341,
394,
2331,
25,
5351,
1955,
486,
2258,
3148,
394,
829,
25,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_virtio_console() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let kernel_path = direct_kernel_boot_path();
let mut child = GuestCommand::new(&guest)
.args(&["--cpus", "boot=1"])
... | rust_cleaned_test_functions.jsonl/26153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 743
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
51724,
368,
341,
286,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
286,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_script_concat() {
let mut script1 = Script::new(32);
script1.op(1);
let mut script2 = Script::new(32);
script2.op(2);
let mut script3 = Script::new(32);
script3.op(3);
script3.concat(&script2);
script1.concat(&script3);
assert_eq!(3, script1.len())
} | rust_cleaned_test_functions.jsonl/78512 | {
"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,
14660,
57478,
368,
341,
262,
1077,
5206,
5316,
16,
284,
13710,
486,
931,
7,
18,
17,
317,
262,
5316,
16,
12029,
7,
16,
317,
262,
1077,
5206,
5316,
17,
284,
13710,
486,
931,
7,
18,
17,
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_copy_file_range() {
const CONTENTS: &[u8] = b"foobarbaz";
let mut tmp1 = tempfile().unwrap();
let mut tmp2 = tempfile().unwrap();
tmp1.write_all(CONTENTS).unwrap();
tmp1.flush().unwrap();
let mut from_offset: i64 = 3;
copy_file_range(
... | rust_cleaned_test_functions.jsonl/91357 | {
"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,
16096,
2458,
9698,
368,
341,
286,
733,
35768,
50,
25,
44590,
84,
23,
60,
284,
293,
1,
50267,
42573,
3302,
286,
1077,
5206,
4174,
16,
284,
54819,
1005,
15454,
543,
286,
1077,
5206,
4174,
17,
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_capacity_left() {
let mut vec: ArrayVec<[usize; 4]> = ArrayVec::new();
assert_eq!(vec.remaining_capacity(), 4);
vec.push(1);
assert_eq!(vec.remaining_capacity(), 3);
vec.push(2);
assert_eq!(vec.remaining_capacity(), 2);
vec.push(3);
assert_eq!(vec.remaining_capaci... | rust_cleaned_test_functions.jsonl/36759 | {
"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,
35603,
9579,
368,
341,
262,
1077,
5206,
7486,
25,
2910,
10050,
66746,
51878,
26,
220,
19,
25669,
284,
2910,
10050,
486,
931,
543,
262,
2060,
10714,
10297,
4083,
92005,
35603,
1507,
220,
19,
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_hover_mod_with_same_name_as_function() {
check(
r#"
use self::m<|>y::Bar;
mod my { pub struct Bar; }
fn my() {}
"#,
expect![[r#"
*my*
```rust
test
```
```rust
mod my... | rust_cleaned_test_functions.jsonl/66134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
7480,
6615,
33574,
1269,
11898,
9174,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
810,
656,
486,
76,
27,
91,
29,
88,
486,
3428,
280,
2593,
847,
314,
6675,
2036,
4716,
26,
555,
8822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_twitter() {
let mut obj = Twitter::new();
obj.post_tweet(1,5);
assert_eq!(vec![5], obj.get_news_feed(1));
obj.follow(1,2);
obj.post_tweet(2,6);
assert_eq!(vec![6,5], obj.get_news_feed(1));
obj.unfollow(1,2);
assert_eq!(vec![5], obj.... | rust_cleaned_test_functions.jsonl/30677 | {
"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,
83338,
368,
341,
286,
1077,
5206,
2839,
284,
6271,
486,
931,
543,
286,
2839,
6542,
75419,
7,
16,
11,
20,
317,
286,
2060,
10714,
10297,
4083,
20703,
20,
1125,
2839,
670,
32485,
42390,
7,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_operator_is_literal_after_bang() {
let scenario = TestScenario::new(util_name!());
let tests = [
["!", "="],
["!", "!="],
["!", "-eq"],
["!", "-ne"],
["!", "-lt"],
["!", "-le"],
["!", "-gt"],
["!", "-ge"],
["!... | rust_cleaned_test_functions.jsonl/10994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
40594,
6892,
34100,
19844,
880,
524,
368,
341,
262,
1077,
15048,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
7032,
284,
2278,
286,
4383,
18789,
36234,
1259,
286,
4383,
18789... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shrink_to_fit() {
let mut tester = RingBuf::with_capacity(15);
// this test isn't covering what it wants to
let cap = tester.capacity();
tester.reserve(63);
let max_cap = tester.capacity();
for len in range(0, ... | rust_cleaned_test_functions.jsonl/46467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
34365,
2346,
32416,
368,
341,
1789,
23459,
286,
1077,
5206,
37111,
284,
21525,
15064,
486,
4197,
35603,
7,
16,
20,
317,
16885,
286,
442,
419,
1273,
4436,
944,
18202,
1128,
432,
6801,
311,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_proto_full_transaction() {
let (keypair, sig_ptx) = new_dummy_signed_ptx();
let dummy_hash = "ed76641c68a1c641aee09a94b3b471f4dc0316efe5ac19cf488e2674cf8d05b5";
let block_hash = H256::from_str(dummy_hash).unwrap();
let mut full_tx = ProtoFullTransaction::new... | rust_cleaned_test_functions.jsonl/122970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 496
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
37689,
16372,
28884,
368,
341,
286,
1077,
320,
792,
12670,
11,
8366,
20124,
87,
8,
284,
501,
60321,
55617,
20124,
87,
543,
286,
1077,
17292,
8950,
284,
330,
291,
22,
21,
21,
19,
16,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stdin_zero_terminated() {
new_ucmd!()
.args(&["-z"]).pipe_in_fixture(SORTED_ZERO_TERMINATED)
.run().stdout_is_fixture("sorted-zero-terminated.expected");
} | rust_cleaned_test_functions.jsonl/23107 | {
"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,
15656,
258,
19359,
62,
68659,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
89,
45014,
13768,
1243,
74409,
3759,
2868,
1479,
39370,
79902,
9005,
340,
286,
659,
6108,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rem_carry_binary()
{
let d = BinaryDigit(0_u8);
let rem = d.rem_carry(BinaryDigit(0x23), BinaryDigit(0x21));
assert_eq!(rem, BinaryDigit(0x0d));
let d = BinaryDigit(0x24f5_u16);
let rem = d.rem_carry(BinaryDigit(0x1341), BinaryDigit(0x0785));
... | rust_cleaned_test_functions.jsonl/26399 | {
"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,
19194,
666,
11433,
31761,
741,
262,
341,
286,
1077,
294,
284,
17718,
36420,
7,
15,
7300,
23,
317,
286,
1077,
1299,
284,
294,
24072,
666,
11433,
77833,
36420,
7,
15,
87,
17,
18,
701,
17718,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_established_retransmit_for_dup_ack() {
let mut s = socket_established();
// Duplicate ACKs do not replace the retransmission timer
s.send_slice(b"abc").unwrap();
recv!(s, time 1000, Ok(TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(R... | rust_cleaned_test_functions.jsonl/1765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
1288,
1458,
1763,
5478,
51932,
48447,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
442,
71071,
53763,
82,
653,
537,
8290,
279,
312,
1458,
2728,
9021,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_frame_max_size() {
let mut buf = BytesMut::from(&[0b0000_0001u8, 0b0000_0010u8][..]);
buf.extend(&[1u8, 1u8]);
assert!(Parser::parse(&mut buf, true, 1).is_err());
if let Err(ProtocolError::Overflow) = Parser::parse(&mut buf, false, 0) {
} else {
... | rust_cleaned_test_functions.jsonl/86809 | {
"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,
21039,
8929,
6345,
2368,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
2099,
58,
15,
65,
15,
15,
15,
15,
62,
15,
15,
15,
16,
84,
23,
11,
220,
15,
65,
15,
15,
15,
15,
62,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_to_hyphenated_string() {
let yyid = Yyid::new();
let ystr = yyid.to_hyphenated_ref().to_string();
assert!(ystr.len() == 36);
assert!(ystr.chars().all(|c| c.is_digit(16) || c == '-'));
} | rust_cleaned_test_functions.jsonl/134732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
1523,
88,
14769,
657,
3904,
368,
341,
286,
1077,
13197,
307,
284,
809,
88,
307,
486,
931,
543,
286,
1077,
379,
495,
284,
13197,
307,
2389,
1523,
88,
14769,
657,
7793,
1005,
983,
3904,
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... | 2 |
#[test]
fn test_unsafe_recovery_already_in_joint_state() {
let mut cluster = new_server_cluster(0, 3);
cluster.run();
let nodes = Vec::from_iter(cluster.get_node_ids());
assert_eq!(nodes.len(), 3);
let pd_client = Arc::clone(&cluster.pd_client);
// Disable default max peer number check.... | rust_cleaned_test_functions.jsonl/5998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
18675,
91475,
80772,
1243,
53158,
4387,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
18,
317,
262,
10652,
7634,
543,
262,
1077,
7798,
284,
11312,
486,
1499,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_reinit_output_stream_by_unplugging_a_default_output_device() {
test_unplug_a_device_on_an_active_stream(StreamType::OUTPUT, Scope::Output, true, 500);
} | rust_cleaned_test_functions.jsonl/23863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
2327,
7645,
12673,
3710,
4907,
500,
35268,
4306,
9993,
7645,
9204,
368,
341,
262,
1273,
4907,
47474,
4306,
9204,
4470,
12008,
12930,
12673,
52011,
929,
486,
30301,
11,
34920,
486,
5097,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_acl_entry_deserialize() {
let valid_config = r#"{
"device": {
"acls": {
"acl_entries": [
{
"config": {
"forwarding_action": "DROP",
... | rust_cleaned_test_functions.jsonl/83830 | {
"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,
63692,
9078,
15768,
9050,
368,
341,
286,
1077,
2697,
5332,
284,
435,
55543,
515,
310,
330,
6111,
788,
341,
394,
330,
64,
18074,
788,
341,
503,
330,
47736,
26092,
788,
2278,
664,
341,
999,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_input_handler_clear_input_on_ctrl_l() {
let mut app = App::default();
app.input = str_to_vec_char("My text");
handler(Key::Ctrl('l'), &mut app);
assert_eq!(app.input, str_to_vec_char(""));
} | rust_cleaned_test_functions.jsonl/5094 | {
"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,
5898,
10183,
21811,
5898,
4470,
22667,
907,
368,
341,
262,
1077,
5206,
906,
284,
1845,
486,
2258,
1428,
262,
906,
10046,
284,
607,
2346,
13251,
9232,
445,
5050,
1467,
3071,
262,
7013,
21358,
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 |
#[test]
fn test_map_opt() {
let input: &[u8] = &[50][..];
assert_parse!(
map_opt(be_u8, |u| if u < 20 { Some(u) } else { None })(input),
Err(Err::Error((&[50][..], ErrorKind::MapOpt)))
);
assert_parse!(
map_opt(be_u8, |u| if u > 20 { Some(u) } else { None })(input),
Ok((&... | rust_cleaned_test_functions.jsonl/120440 | {
"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,
5376,
15032,
368,
341,
262,
1077,
1946,
25,
44590,
84,
23,
60,
284,
44590,
20,
15,
1457,
496,
935,
262,
2060,
21039,
33673,
414,
2415,
15032,
66606,
7300,
23,
11,
760,
84,
91,
421,
575,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_spaces_are_reorganized() {
test("abet", "ae bt");
test("a bet", "ae bt");
test(" a b e t ", "ae bt");
} | rust_cleaned_test_functions.jsonl/27429 | {
"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,
67883,
56855,
1288,
62216,
368,
341,
262,
1273,
445,
10237,
497,
330,
5918,
19592,
797,
262,
1273,
445,
64,
1274,
497,
330,
5918,
19592,
797,
262,
1273,
445,
257,
264,
220,
293,
257,
384,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_grab_ws_sep_token() {
assert_eq!(grab_whitespace_sep_token(" \t hello world ", 3, 18), ("hello", 10));
assert_eq!(grab_whitespace_sep_token(" \t ", 1, 7), ("", 7));
assert_eq!(grab_whitespace_sep_token("", 0, 0), ("", 0));
assert_eq!(grab_whitespace_sep_token(" test;comme... | rust_cleaned_test_functions.jsonl/88984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15682,
370,
50211,
54775,
6458,
368,
341,
262,
2060,
10714,
10297,
58212,
86175,
54775,
6458,
445,
256,
1124,
83,
23811,
1879,
220,
3670,
220,
18,
11,
220,
16,
23,
701,
3489,
14990,
497,
220,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_constrain_range() {
let constraint: Box<dyn SinglePartConstraint> = Box::new(ConstrainRange(10));
assert!(!constraint.is_active(&vec![], 10));
run_scale_free_test(&constraint, &[0, 0], 9, true);
run_scale_free_test(&constraint, &[0, 20], 9, false);
run_sca... | rust_cleaned_test_functions.jsonl/74364 | {
"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,
3382,
77626,
9698,
368,
341,
286,
1077,
21568,
25,
8261,
92846,
11327,
5800,
17890,
29,
284,
8261,
486,
931,
7,
1109,
77626,
6046,
7,
16,
15,
1106,
286,
2060,
0,
3471,
48057,
2079,
12930,
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_feeler_behavior() {
let node1 = net_service_start("/test/1".to_string());
let node2 = net_service_start("/test/1".to_string());
node1.dial(
&node2,
TargetProtocol::Single(SupportProtocols::Identify.protocol_id()),
);
wait_connect_state(&node1, 1);
wait_c... | rust_cleaned_test_functions.jsonl/71177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7642,
7865,
74540,
368,
341,
262,
1077,
2436,
16,
284,
4179,
12267,
4906,
4283,
1944,
14,
16,
3263,
983,
3904,
1423,
262,
1077,
2436,
17,
284,
4179,
12267,
4906,
4283,
1944,
14,
16,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_anyhow_py_function_err_result() {
use pyo3::{pyfunction, types::PyDict, wrap_pyfunction, Python};
#[pyfunction]
fn produce_err_result() -> anyhow::Result<String> {
anyhow::bail!("error time")
}
Python::with_gil(|py| {
let func = wrap_pyfunction!(produce_err_... | rust_cleaned_test_functions.jsonl/46317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37248,
5158,
40291,
9174,
9266,
5287,
368,
341,
262,
990,
4510,
78,
18,
22964,
3288,
1688,
11,
4494,
486,
13828,
13448,
11,
15061,
40291,
1688,
11,
13027,
2315,
262,
11506,
3288,
1688,
921,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expression_less_square_main() {
let jack_code = r#"// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/10/ExpressionLessSquare/Main.jack
/** Expressionless version of projects/10/Square/Main... | rust_cleaned_test_functions.jsonl/29131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2094
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28068,
50747,
39794,
11027,
368,
341,
10217,
25072,
4136,
284,
435,
55543,
322,
1096,
1034,
374,
949,
315,
8438,
1253,
437,
17,
72442,
5963,
2659,
198,
322,
323,
279,
2311,
330,
785,
34157,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_snippet_named_struct() {
#[derive(Debug, Diagnostic, Error)]
#[error("welp")]
#[diagnostic(code(foo::bar::baz))]
struct Foo {
// The actual "source code" our contexts will be using. This can be
// miette::Source!
src: String,
// The "snip... | rust_cleaned_test_functions.jsonl/110952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 697
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28022,
21581,
71834,
15126,
368,
341,
262,
11506,
27098,
42618,
11,
49988,
11,
4600,
5563,
262,
11506,
841,
445,
86,
1267,
5422,
262,
11506,
8579,
11953,
15842,
71880,
486,
2257,
486,
42573,
22297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_perspective() {
let left = -4.0;
let right = 4.0;
let bottom = -2.0;
let top = 3.0;
let near = 1.0;
let far = 100.0;
let expected = Matrix4x4::new(
1.0 / 4.0, 0.0, 0.0, 0.0,
0.0, 2.0 / 5... | rust_cleaned_test_functions.jsonl/129135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
620,
85091,
368,
341,
286,
1077,
2115,
284,
481,
19,
13,
15,
280,
286,
1077,
1290,
284,
220,
19,
13,
15,
280,
286,
1077,
5622,
284,
481,
17,
13,
15,
280,
286,
1077,
1909,
284,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_focus_bottom_newline_delimited_json() {
let nd_json = r#"
0
1
2
{
"a": 4
}
"#;
let fj = parse_top_level_json(nd_json.to_owned()).unwrap();
let mut viewer = JsonViewer::new(fj, Mode::Line)... | rust_cleaned_test_functions.jsonl/41776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47492,
25473,
5921,
1056,
18029,
31511,
9455,
368,
341,
286,
1077,
15581,
9455,
284,
435,
2,
698,
310,
220,
15,
198,
310,
220,
16,
198,
310,
220,
17,
198,
310,
341,
394,
330,
64,
788,
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_hash() {
let mut encodings = ::alloc::collections::btree_set::BTreeSet::new();
encodings.insert(UTF_8);
encodings.insert(ISO_2022_JP);
assert!(encodings.contains(UTF_8));
assert!(encodings.contains(ISO_2022_JP));
assert!(!encodings.contains(WINDOWS... | rust_cleaned_test_functions.jsonl/90280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
1077,
5206,
3209,
58335,
284,
3504,
4742,
486,
51137,
486,
65,
9344,
2602,
486,
33,
6533,
1649,
486,
931,
543,
286,
3209,
58335,
7030,
7,
8561,
62,
23,
317,
286,
3209,
583... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partial_eq_array() {
let d = VecDeque::<char>::new();
assert!(d == []);
let mut d = VecDeque::new();
d.push_front('a');
assert!(d == ['a']);
let mut d = VecDeque::new();
d.push_back('a');
assert!(d == ['a']);
let mut d = VecDeque::new();
d.push_back('a'... | rust_cleaned_test_functions.jsonl/73712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
10714,
3858,
368,
341,
262,
1077,
294,
284,
11312,
73891,
27638,
1762,
6831,
931,
543,
262,
2060,
10297,
67,
621,
41401,
262,
1077,
5206,
294,
284,
11312,
73891,
486,
931,
543,
262,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inclusive() {
let size = 500;
let map: BTreeMap<_, _> = (0..=size).map(|i| (i, i)).collect();
fn check<'a, L, R>(lhs: L, rhs: R)
where L: IntoIterator<Item=(&'a i32, &'a i32)>,
R: IntoIterator<Item=(&'a i32, &'a i32)>,
{
let lhs: Vec<_> = lhs... | rust_cleaned_test_functions.jsonl/49382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
1243,
8336,
368,
341,
262,
1077,
1379,
284,
220,
20,
15,
15,
401,
262,
1077,
2415,
25,
425,
6533,
2227,
27,
6878,
716,
29,
284,
320,
15,
496,
28,
2141,
568,
2186,
22428,
72,
91,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zigzag() {
let mut a = Vec::new();
let mut b = Vec::new();
zig_i32(42i32, &mut a);
zig_i64(42i64, &mut b);
assert_eq!(a, b);
} | rust_cleaned_test_functions.jsonl/84115 | {
"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,
6415,
343,
92674,
368,
341,
286,
1077,
5206,
264,
284,
11312,
486,
931,
543,
286,
1077,
5206,
293,
284,
11312,
486,
931,
543,
286,
85812,
5318,
18,
17,
7,
19,
17,
72,
18,
17,
11,
609,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_by_id_some() {
assert!(Table::find_by_id(HTML_TWO_TABLES, "first").is_some());
assert!(Table::find_by_id(HTML_TWO_TABLES, "second").is_some());
} | rust_cleaned_test_functions.jsonl/47581 | {
"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,
21814,
3710,
842,
61855,
368,
341,
286,
2060,
10297,
2556,
486,
3903,
3710,
842,
7,
5835,
73892,
16039,
50,
11,
330,
3896,
1827,
285,
61855,
1423,
286,
2060,
10297,
2556,
486,
3903,
3710,
842,
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 |
#[test]
fn test_diff() {
let x = array![[1, 3, 6, 10], [0, 5, 6, 8]];
let y = diff(&x, None);
assert_eq!(y, array![[2, 3, 4], [5, 1, 2]]);
} | rust_cleaned_test_functions.jsonl/74999 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
368,
341,
197,
10217,
856,
284,
1334,
0,
15505,
16,
11,
220,
18,
11,
220,
21,
11,
220,
16,
15,
1125,
508,
15,
11,
220,
20,
11,
220,
21,
11,
220,
23,
13204,
197,
10217,
379,
284,
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_add_to_next_hour() {
let clock = Clock::new(0, 45).add_minutes(40);
assert_eq!(clock.to_string(), "01:25");
} | rust_cleaned_test_functions.jsonl/5363 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
2346,
11257,
32292,
368,
341,
262,
1077,
8866,
284,
26142,
486,
931,
7,
15,
11,
220,
19,
20,
568,
718,
67655,
7,
19,
15,
317,
262,
2060,
10714,
10297,
20666,
2389,
3904,
1507,
330,
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_add_entry_new_id() {
// Should create a second BatchEntry
let mut batch = Batch::new();
batch
.add_entry(Entry::from_email(&Email::from_str(TEST_COOL_STR).unwrap()).unwrap())
.unwrap();
batch
.add_entry(Entry::from_email(&Email:... | rust_cleaned_test_functions.jsonl/68292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
9078,
5921,
842,
368,
341,
286,
442,
12260,
1855,
264,
2086,
33904,
5874,
198,
286,
1077,
5206,
7162,
284,
33904,
486,
931,
543,
286,
7162,
198,
310,
659,
718,
9078,
7,
5874,
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_const_multi_decl() {
compare_stderr_output(
r#"
package main
const (
a, b int8 = 1 - 9, int8(21)
c, d, e = "string1", "string2", "string3"
)
const f, g = 8, 9 + 3
func main() {
println(a,b,c,d,e)
const (
a, b int8 = 11 * 9, int8(0)
c, d, e = "strin... | rust_cleaned_test_functions.jsonl/20935 | {
"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,
13610,
25133,
35814,
368,
341,
262,
9429,
93033,
7645,
1006,
286,
435,
2,
698,
1722,
1887,
271,
1024,
2399,
262,
264,
11,
293,
526,
23,
284,
220,
16,
481,
220,
24,
11,
526,
23,
7,
17,
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_split_off() {
let mut tester = VecDeque::with_capacity(15);
// this test isn't covering what it wants to
let cap = tester.capacity();
// len is the length *before* splitting
for len in 0..cap {
// index to ... | rust_cleaned_test_functions.jsonl/111491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
13651,
368,
341,
1789,
23459,
286,
1077,
5206,
37111,
284,
11312,
73891,
486,
4197,
35603,
7,
16,
20,
317,
16885,
286,
442,
419,
1273,
4436,
944,
18202,
1128,
432,
6801,
311,
198,
286,
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... | 5 |
#[test]
fn test_security_status_service_with_cn() {
let mut allowed_cn = HashSet::default();
allowed_cn.insert("tikv-server".to_owned());
do_test_security_status_service(allowed_cn, true);
} | rust_cleaned_test_functions.jsonl/6913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48726,
4773,
12267,
6615,
52177,
368,
341,
286,
1077,
5206,
5420,
52177,
284,
18931,
486,
2258,
543,
286,
5420,
52177,
7030,
445,
83,
1579,
85,
26300,
3263,
983,
51973,
1423,
286,
653,
4452,
48726... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_crds_value_indices() {
let mut rng = thread_rng();
let keypairs: Vec<_> = repeat_with(Keypair::new).take(128).collect();
let mut crds = Crds::default();
let mut num_inserts = 0;
let mut num_overrides = 0;
for k in 0..4096 {
let keypair ... | rust_cleaned_test_functions.jsonl/105603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1073
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32331,
5356,
3142,
18333,
368,
341,
286,
1077,
5206,
28422,
284,
4516,
66849,
543,
286,
1077,
1376,
77256,
25,
11312,
32399,
29,
284,
13153,
6615,
7,
6608,
1082,
1310,
486,
931,
568,
22769,
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... | 6 |
#[test]
fn test_hex_to_bits() {
assert_eq!(
hex_to_bits("D2FE28"),
vec![1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0],
);
} | rust_cleaned_test_functions.jsonl/133803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
2346,
20034,
368,
341,
286,
2060,
10714,
33673,
310,
12371,
2346,
20034,
445,
35,
17,
11419,
17,
23,
4461,
310,
7486,
20703,
16,
11,
220,
16,
11,
220,
15,
11,
220,
16,
11,
220,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_args_minn() {
let mut args = Args::new();
assert_eq!(3, args.minn());
args.set_minn(10);
assert_eq!(10, args.minn());
} | rust_cleaned_test_functions.jsonl/118622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
717,
6130,
368,
341,
286,
1077,
5206,
2827,
284,
17693,
486,
931,
543,
286,
2060,
10714,
10297,
18,
11,
2827,
4358,
77,
5231,
286,
2827,
980,
717,
6130,
7,
16,
15,
317,
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 |
#[test]
fn test_crypto_stream_xchacha20_noncebytes() {
assert!(
unsafe { crypto_stream_xchacha20_noncebytes() }
== crypto_stream_xchacha20_NONCEBYTES as usize
)
} | rust_cleaned_test_functions.jsonl/68184 | {
"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,
78298,
12673,
3212,
331,
51576,
17,
15,
48508,
9651,
368,
341,
262,
2060,
33673,
286,
19860,
314,
19028,
12673,
3212,
331,
51576,
17,
15,
48508,
9651,
368,
456,
310,
621,
19028,
12673,
3212,
331,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_event_serde() {
let obv = StdMapObserver::new("test", unsafe { &mut MAP });
let map = tuple_list!(obv);
let observers_buf = postcard::to_allocvec(&map).unwrap();
let i = BytesInput::new(vec![0]);
let e = Event::NewTestcase {
input: i,
... | rust_cleaned_test_functions.jsonl/64490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 679
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6748,
75861,
450,
368,
341,
286,
1077,
1508,
85,
284,
42517,
2227,
17151,
486,
931,
445,
1944,
497,
19860,
314,
609,
6984,
27223,
1625,
286,
1077,
2415,
284,
14405,
2019,
10297,
674,
85,
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... | 2 |
#[test]
fn test_add_push_request_mention() {
let endpoint = "https://example.com/push/endpoint";
let keys = Keys::new("anetohias===", "oeatssah=");
let mut req = AddPushRequest::new(endpoint, &keys);
req.mention();
assert_eq!(
req,
AddPushRequest {... | rust_cleaned_test_functions.jsonl/116576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
14218,
7893,
26985,
290,
368,
341,
286,
1077,
14887,
284,
330,
2428,
1110,
8687,
905,
4322,
1116,
14,
32540,
876,
286,
1077,
6894,
284,
24133,
486,
931,
445,
276,
295,
2267,
3473,
418,
213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sized_lru_cache_hit_and_miss() {
let counter = CounterVec::new(prometheus::Opts::new("name", "help"), &["type"]).unwrap();
let usage = IntGauge::new("usage", "help").unwrap();
let mut cache = SizedLruCache::<i8, i32>::new(100, counter.clone(), usage.clone());
asse... | rust_cleaned_test_functions.jsonl/58476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 970
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
1506,
907,
2672,
11529,
37697,
8378,
67722,
368,
341,
286,
1077,
5546,
284,
19735,
10050,
486,
931,
83332,
39705,
486,
43451,
486,
931,
445,
606,
497,
330,
8653,
3975,
609,
1183,
1313,
45014,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_atoe_and_lcase_conv_spec_test() {
new_ucmd!()
.args(&["conv=ebcdic,lcase"])
.pipe_in_fixture("seq-byte-values-b632a992d3aed5d8d1a59cc5a5a455ba.test")
.succeeds()
.stdout_is_fixture_bytes("lcase-ebcdic.test");
} | rust_cleaned_test_functions.jsonl/99853 | {
"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,
3752,
4644,
8378,
907,
5638,
22716,
13594,
4452,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12027,
28,
3065,
4385,
292,
22206,
5638,
14108,
286,
659,
13768,
1243,
74409,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inverse_lt() {
let m = arr2(&[
[4.0, 12.0, -16.0],
[12.0, 37.0, -43.0],
[-16.0, -43.0, 98.0],
]);
let lt = unsafe { cholesky(&m) };
let lt_inv = unsafe { inverse_lt(<) };
let expected = arr2(&[
[1.0 / 2.0, ... | rust_cleaned_test_functions.jsonl/38555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63333,
39164,
368,
341,
286,
1077,
296,
284,
2890,
17,
2099,
9640,
310,
508,
19,
13,
15,
11,
220,
16,
17,
13,
15,
11,
481,
16,
21,
13,
15,
1259,
310,
508,
16,
17,
13,
15,
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_from_bytes() {
let bv = BitVec::from_bytes(&[0b1101_0000]);
assert_eq!(
bv.iter().collect::<Vec<bool>>(),
vec![true, true, false, true, false, false, false, false],
);
assert_eq!(bv.count_ones(), 3);
assert_eq!(bv.count_zeros(), 5);... | rust_cleaned_test_functions.jsonl/128589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
368,
341,
286,
1077,
56937,
284,
6495,
10050,
486,
1499,
12524,
2099,
58,
15,
65,
16,
16,
15,
16,
62,
15,
15,
15,
15,
2558,
286,
2060,
10714,
33673,
310,
56937,
19471,
1005,
17384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_batch_get() {
let store = AssertionStorage::default();
store.put_ok(b"x", b"x1", 5, 10);
store.put_ok(b"y", b"y1", 15, 20);
store.put_ok(b"z", b"z1", 25, 30);
store.batch_get_ok(&[b"x", b"y", b"z", b"w"], 15, vec![b"x1"]);
store.batch_get_ok(&[b"x", b"y", b"z", ... | rust_cleaned_test_functions.jsonl/37871 | {
"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,
92299,
14809,
14534,
3062,
368,
341,
262,
1077,
3553,
284,
46730,
5793,
486,
2258,
543,
262,
3553,
3597,
19817,
1883,
65438,
497,
293,
65438,
16,
497,
220,
20,
11,
220,
16,
15,
317,
262,
3553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_capture() {
let mut reader = Reader::init("url: header \"Location\"");
let capture0 = capture(&mut reader).unwrap();
assert_eq!(
capture0.name,
EncodedString {
quotes: false,
value: String::from("url"),
... | rust_cleaned_test_functions.jsonl/17072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55148,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
2327,
445,
1085,
25,
4247,
7245,
4707,
88385,
286,
1077,
12322,
15,
284,
12322,
2099,
6984,
6604,
568,
15454,
1428,
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_translate() {
let p = Rect(Point2D(0, 0), Size2D(50, 40));
let pp = p.translate(&Point2D(10,15));
assert!(pp.size.width == 50);
assert!(pp.size.height == 40);
assert!(pp.origin.x == 10);
assert!(pp.origin.y == 15);
let r = Rect(Point2D(-10, -5), Size2D(50, 40));
... | rust_cleaned_test_functions.jsonl/67410 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66381,
368,
341,
262,
1077,
281,
284,
11920,
32737,
17,
35,
7,
15,
11,
220,
15,
701,
8478,
17,
35,
7,
20,
15,
11,
220,
19,
15,
1106,
262,
1077,
11823,
284,
281,
25909,
2099,
2609,
17,
35,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_batch_inversion() {
let mut random_coeffs = Vec::<Fr>::new();
let vec_size = 1000;
for _ in 0..=vec_size {
random_coeffs.push(Fr::rand(&mut test_rng()));
}
let mut random_coeffs_inv = random_coeffs.clone();
batch_inversion::<Fr>(&mut ... | rust_cleaned_test_functions.jsonl/76971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
1243,
4366,
368,
341,
286,
1077,
5206,
4194,
85950,
284,
11312,
27638,
22560,
6831,
931,
543,
286,
1077,
7486,
2368,
284,
220,
16,
15,
15,
15,
401,
286,
369,
716,
304,
220,
15,
496,
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... | 4 |
#[test]
fn test_execute_error() {
let uri = Uri::new(helpers::mongodb_test_connection_string()).unwrap();
let pool = ClientPool::new(uri, None);
let client = pool.pop();
let mut collection = client.get_collection("rust_driver_test", "bulk_operation_error");
c... | rust_cleaned_test_functions.jsonl/3253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
4096,
368,
341,
262,
1077,
13071,
310,
284,
17226,
486,
931,
3203,
17527,
486,
37197,
4452,
15866,
3904,
6011,
15454,
543,
262,
1077,
7314,
1843,
284,
8423,
10551,
486,
931,
25797,
11,
2240... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes() {
let mut a = Fp([
0xdc90_6d9b_e3f9_5dc8,
0x8755_caf7_4596_91a1,
0xcff1_a7f4_e958_3ab3,
0x9b43_821f_849e_2284,
0xf575_54f3_a297_4f3f,
0x085d_bea8_4ed4_7f79,
]);
for _ in 0..100 {
a = a.square();
let tmp = a... | rust_cleaned_test_functions.jsonl/23234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 687
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
368,
341,
262,
1077,
5206,
264,
284,
434,
79,
8956,
286,
220,
15,
48361,
24,
15,
62,
21,
67,
24,
65,
2204,
18,
69,
24,
62,
20,
7628,
23,
345,
286,
220,
15,
87,
23,
22,
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... | 2 |
#[test]
fn test_clone() {
let sgs_1 = SgSet::from([3, 4, 1, 2, 5, 6]);
let sgs_2 = sgs_1.clone();
assert_eq!(sgs_1, sgs_2);
} | rust_cleaned_test_functions.jsonl/68238 | {
"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,
54742,
368,
341,
262,
1077,
274,
5857,
62,
16,
284,
328,
70,
1649,
486,
1499,
2561,
18,
11,
220,
19,
11,
220,
16,
11,
220,
17,
11,
220,
20,
11,
220,
21,
2558,
262,
1077,
274,
5857,
62,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_script_type() {
let mut script = Script::new(32);
script.set_type(SCRIPT_TYPE_IN);
let mut exector = Exector::new();
exector.exec(&script, &TestEnv {}).unwrap();
assert_eq!(exector.len(), 0);
assert_eq!(exector.get_type(), [SCRIPT_TYPE_IN]);
} | rust_cleaned_test_functions.jsonl/78504 | {
"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,
14660,
1819,
368,
341,
262,
1077,
5206,
5316,
284,
13710,
486,
931,
7,
18,
17,
317,
262,
5316,
980,
1819,
7,
24787,
4189,
2158,
317,
262,
1077,
5206,
505,
1256,
284,
1374,
1256,
486,
931,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.