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_write_array() {
assert_eq!(Array(vec![]).to_string(), "[]");
assert_eq!(Array(vec![]).to_pretty_str(), "[]");
assert_eq!(Array(vec![Boolean(true)]).to_string(), "[true]");
assert_eq!(
Array(vec![Boolean(true)]).to_pretty_str(),
"\
... | rust_cleaned_test_functions.jsonl/6535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3858,
368,
341,
286,
2060,
10714,
10297,
1857,
25592,
0,
1294,
568,
983,
3904,
1507,
330,
1294,
797,
286,
2060,
10714,
10297,
1857,
25592,
0,
1294,
568,
983,
620,
21322,
2895,
1507,
330,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_val() {
let mut vm = ShrekVM::new(Vec::new());
vm.push(3);
double_val(&mut vm).unwrap();
assert_eq!(6, vm.peek().unwrap());
// Value on stack should be replaced with result.
assert_eq!(1, vm.count());
} | rust_cleaned_test_functions.jsonl/71704 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
6189,
368,
341,
286,
1077,
5206,
10995,
284,
1417,
41861,
11187,
486,
931,
49923,
486,
931,
5231,
286,
10995,
2552,
7,
18,
626,
286,
1990,
6189,
2099,
6984,
10995,
568,
15454,
1428,
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_downcast_box_stream() {
// FIXME: Use Type ascription
let stream: Box<NetworkStream + Send> = Box::new(MockStream::new());
let mock = stream.downcast::<MockStream>().ok().unwrap();
assert_eq!(mock, Box::new(MockStream::new()));
} | rust_cleaned_test_functions.jsonl/118984 | {
"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,
13998,
3829,
10194,
12673,
368,
341,
286,
442,
27475,
25,
5443,
3990,
438,
1453,
198,
286,
1077,
4269,
25,
8261,
27,
12320,
3027,
488,
11000,
29,
284,
8261,
486,
931,
66436,
3027,
486,
931,
5231... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_capacity() {
let g = MatrixGraph::<i32, i32>::with_capacity(10);
assert_eq!(g.node_count(), 0);
assert_eq!(g.edge_count(), 0);
} | rust_cleaned_test_functions.jsonl/81955 | {
"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,
6615,
35603,
368,
341,
286,
1077,
342,
284,
11631,
11212,
27638,
72,
18,
17,
11,
600,
18,
17,
6831,
4197,
35603,
7,
16,
15,
317,
286,
2060,
10714,
10297,
70,
12097,
3180,
1507,
220,
15,
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 |
#[test]
fn test_chr() {
context!(ctx, dev);
execute_str!(ctx, b"*CHR? CHRDATA" => result, response {
assert_eq!(result, Ok(()));
assert_eq!(response, b"CHRDATA\n");
});
execute_str!(ctx, b"*CHR? 'CHRDATA'" => result, _response {
assert_eq!(resu... | rust_cleaned_test_functions.jsonl/82172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68993,
368,
341,
286,
2266,
10297,
3773,
11,
3483,
317,
286,
9026,
2895,
10297,
3773,
11,
293,
61593,
67196,
30,
61576,
17777,
1,
589,
1102,
11,
2033,
341,
310,
2060,
10714,
10297,
1382,
11,
762... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_set_intersect_with() {
// Explicitly 0'ed bits
let mut a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b10100010]));
let mut b = BitSet::from_bit_vec(BitVec::from_bytes(&[0b00000000]));
let c = a.clone();
a.intersect_with(&b);
b.intersect_with(&... | rust_cleaned_test_functions.jsonl/76233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
2602,
72747,
6615,
368,
341,
286,
442,
31330,
398,
220,
15,
6,
291,
9472,
198,
286,
1077,
5206,
264,
284,
57227,
486,
1499,
13996,
13251,
68653,
10050,
486,
1499,
12524,
2099,
58,
15,
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_conn_default_1_0() {
let mut buf = BytesMut::from("GET /test HTTP/1.0\r\n\r\n");
let req = parse_ready!(&mut buf);
assert!(!req.keep_alive());
} | rust_cleaned_test_functions.jsonl/110387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17241,
9993,
62,
16,
62,
15,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
445,
3806,
608,
1944,
10130,
14,
16,
13,
15,
12016,
1699,
12016,
1699,
797,
286,
1077,
4232,
284,
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 |
#[test]
fn test_from_arg_matches_format_invalid() {
let argv = vec!["lsd", "--date", "+%J"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
DateFlag::from_arg_matches(&matches);
} | rust_cleaned_test_functions.jsonl/1303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6057,
38344,
8955,
31433,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
1028,
497,
6630,
4,
41,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
1005,
455,
38344,
5673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_full_node_to_validator() {
let mut testkit = TestKitBuilder::auditor()
.with_validators(3)
.with_service(ConfigurationService {
config: ConfigurationServiceConfig::default(),
})
.create();
let cfg_change_height = Height(5);
let new_cfg = {... | rust_cleaned_test_functions.jsonl/106405 | {
"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,
16372,
5084,
2346,
64959,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
3393,
7695,
3297,
486,
7880,
1919,
741,
286,
659,
4197,
8337,
2973,
7,
18,
340,
286,
659,
4197,
12267,
45443,
1860,
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_mark_valid_invalid_forks() {
let mut heaviest_subtree_fork_choice = setup_forks();
let stake = 100;
let (bank, vote_pubkeys) = bank_utils::setup_bank_and_vote_pubkeys_for_tests(3, stake);
let pubkey_votes: Vec<(Pubkey, SlotHashKey)> = vec![
(vote_pubk... | rust_cleaned_test_functions.jsonl/70827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2077
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
8337,
31433,
761,
73302,
368,
341,
286,
1077,
5206,
566,
98362,
5228,
9344,
761,
669,
31936,
284,
6505,
761,
73302,
543,
286,
1077,
18279,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
17033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version() {
assert!(Version {
major: 32,
minor: 25,
patch: 10,
}
.is_compatible_with(&Version {
major: 32,
minor: 10,
patch: 100,
}),);
let v = Version {
major: 17,
... | rust_cleaned_test_functions.jsonl/38174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
368,
341,
286,
2060,
10297,
5637,
341,
310,
3598,
25,
220,
18,
17,
345,
310,
8922,
25,
220,
17,
20,
345,
310,
10900,
25,
220,
16,
15,
345,
286,
456,
286,
659,
285,
2965,
37079,
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_bench_tps_fund_keys() {
let (genesis_block, id) = create_genesis_block(10_000);
let bank = Bank::new(&genesis_block);
let client = BankClient::new(bank);
let tx_count = 10;
let lamports = 20;
let (keypairs, _keypair_balance) =
generate... | rust_cleaned_test_functions.jsonl/1528 | {
"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,
880,
19762,
528,
1690,
761,
1241,
12631,
368,
341,
286,
1077,
320,
77894,
7113,
11,
877,
8,
284,
1855,
16322,
13774,
7113,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iterator_with_no_filter() {
let reader = BufReader::new(r#"
name, age, birth date
"Douglas Adams", "42", "1952-03-11"
"Gen Z. Person", "20", "2000-01-01"
"Ada Lovelace", "36", "1815-12-10"
"#.trim().as_bytes());
let mut csv = Csv::new(reader).unwrap();
let filtered_names = csv.m... | rust_cleaned_test_functions.jsonl/44013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
6615,
6536,
8727,
368,
341,
1149,
6604,
284,
69013,
5062,
486,
931,
2601,
2,
698,
262,
829,
11,
4231,
11,
7194,
2400,
198,
262,
330,
91641,
26383,
26234,
497,
330,
19,
17,
497,
330,
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_parse_mode() {
assert_eq!(
parse_mode("123", Modes::Lines),
Ok((Modes::Lines(123), false))
);
assert_eq!(
parse_mode("-456", Modes::Bytes),
Ok((Modes::Bytes(456), true))
);
assert!(parse_mode("Nonsensical Non... | rust_cleaned_test_functions.jsonl/72117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
7302,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
7302,
445,
16,
17,
18,
497,
81689,
486,
16794,
1326,
310,
7622,
1188,
70035,
486,
16794,
7,
16,
17,
18,
701,
895,
1171,
286,
1439,
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_aggregation_integer_integral() {
let spec =
"input in: UInt8\n output out: UInt8 @5Hz := in.aggregate(over_exactly: 3s, using: integral).defaults(to: 5)";
assert_eq!(1, num_type_errors(spec));
let spec =
"input in: Int8\n output out: Int8 @5Hz := i... | rust_cleaned_test_functions.jsonl/110698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
34442,
31725,
64076,
368,
341,
286,
1077,
1398,
4035,
310,
330,
1355,
304,
25,
22275,
23,
1699,
2550,
700,
25,
22275,
23,
569,
20,
11475,
1669,
304,
88534,
7,
1975,
2702,
32739,
25,
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_find_circle_num() {
assert_eq!(
Solution::find_circle_num(vec![vec![1, 1, 0], vec![1, 1, 0], vec![0, 0, 1]]),
2
);
assert_eq!(
Solution::find_circle_num(vec![vec![1, 0, 0], vec![0, 1, 0], vec![0, 0, 1]]),
3
);
} | rust_cleaned_test_functions.jsonl/57106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
42222,
4273,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
3903,
42222,
4273,
25592,
20703,
4083,
20703,
16,
11,
220,
16,
11,
220,
15,
1125,
7486,
20703,
16,
11,
220,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recognize_utf8_boundary_half_debt_one_four() {
let buf: &[u8] = &[0x61, 0xF0, 0x90, 0x86, 0x92, 0x0d, 0x0a, 0x0d, 0x0a];
let mut full = buffer_from(buf);
let result = block_on(async { recognize(&mut full).await });
assert_eq!(result.unwrap().find_header("Complex"), Some("a𐆒".to_string()... | rust_cleaned_test_functions.jsonl/48193 | {
"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,
7080,
3934,
551,
39453,
23,
54004,
40626,
2259,
12755,
11667,
56142,
368,
341,
220,
1077,
6607,
25,
44590,
84,
23,
60,
284,
44590,
15,
87,
21,
16,
11,
220,
15,
9770,
15,
11,
220,
15,
87,
24,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_touch_no_args() {
let mut ucmd = new_ucmd!();
ucmd.fails().stderr_only(
r##"touch: missing file operand
Try 'touch --help' for more information."##,
);
} | rust_cleaned_test_functions.jsonl/96656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60840,
6536,
8384,
368,
341,
262,
1077,
5206,
575,
8710,
284,
501,
68887,
2277,
0,
543,
262,
575,
8710,
833,
6209,
1005,
36422,
18410,
1006,
286,
435,
565,
1,
22020,
25,
7402,
1034,
27213,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_set_correct() {
let mut hbitset = HBitSet::new();
let mut set = HashSet::new();
for _ in 0..1000_000 {
let j = fastrand::usize(0..SIZE);
set.insert(j);
hbitset.set(j);
assert!(hbitset.test(j), "{}", j);
... | rust_cleaned_test_functions.jsonl/81807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
31550,
368,
341,
286,
1077,
5206,
305,
77615,
284,
472,
8344,
1649,
486,
931,
543,
286,
1077,
5206,
738,
284,
18931,
486,
931,
543,
286,
369,
716,
304,
220,
15,
496,
16,
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_dns_uds() {
let eve_config = || eve::EveConfiguration::uds(PathBuf::from("test.socket"));
let outputs: Vec<Box<dyn output::Output + Send + Sync>> =
vec![Box::new(output::Dns::new(eve_config()))];
let mut cfg = Config::default();
cfg.outputs = outputs;
... | rust_cleaned_test_functions.jsonl/28115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71125,
62,
27988,
368,
341,
286,
1077,
48896,
5332,
284,
1369,
48896,
486,
36,
586,
7688,
486,
27988,
33030,
15064,
486,
1499,
445,
1944,
25926,
4010,
286,
1077,
16275,
25,
11312,
79852,
92846,
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... | 2 |
#[test]
fn test_extract_integer() {
assert_eq!(extract_integer(cbor_int!(123)), Ok(123));
assert_eq!(extract_integer(cbor_int!(-123)), Ok(-123));
assert_eq!(
extract_integer(cbor_bool!(true)),
Err(CTAP2_ERR_CBOR_UNEXPECTED_TYPE)
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/48992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
31725,
368,
341,
286,
2060,
10714,
10297,
23493,
31725,
1337,
9368,
4042,
10297,
16,
17,
18,
5731,
7622,
7,
16,
17,
18,
1106,
286,
2060,
10714,
10297,
23493,
31725,
1337,
9368,
4042,
0,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rwlock_secondary_index_same_slot_and_forks() {
let (key_start, key_end, account_index) = create_rwlock_secondary_index_state();
let index = AccountsIndex::<bool>::default_for_tests();
for token_id in [inline_spl_token::id(), inline_spl_token_2022::id()] {
run_... | rust_cleaned_test_functions.jsonl/71352 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98850,
77759,
3560,
33574,
27563,
8378,
761,
73302,
368,
341,
286,
1077,
320,
792,
4906,
11,
1376,
6213,
11,
2692,
3560,
8,
284,
1855,
98850,
77759,
3560,
4387,
543,
286,
1077,
1922,
284,
40655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fn_application() {
let tests = vec![
(
"let identity = fn(x) { x; }; identity(5);",
Some(Object::Int(5)),
),
(
"let identity = fn(x) { return x; }; identity(5);",
Some(Object::Int(5)),
... | rust_cleaned_test_functions.jsonl/51924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
38721,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
2399,
394,
330,
1149,
9569,
284,
5168,
2075,
8,
314,
856,
26,
20066,
9569,
7,
20,
1215,
756,
394,
4329,
12526,
486,
1072,
7,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_mkdir_dup_dir_parent() {
let scene = TestScenario::new(util_name!());
scene.ucmd().arg(TEST_DIR6).succeeds();
scene.ucmd().arg("-p").arg(TEST_DIR6).succeeds();
} | rust_cleaned_test_functions.jsonl/61306 | {
"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,
717,
12438,
51932,
4334,
15960,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
6109,
56334,
2277,
1005,
858,
50320,
8291,
21,
568,
82,
29264,
82,
543,
262,
610... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
create_case(10.0);
create_case(-5.0);
create_case(10.0);
create_case(100.0);
create_case(f64::INFINITY);
} | rust_cleaned_test_functions.jsonl/66856 | {
"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,
8657,
368,
341,
286,
1855,
19096,
7,
16,
15,
13,
15,
317,
286,
1855,
19096,
4080,
20,
13,
15,
317,
286,
1855,
19096,
7,
16,
15,
13,
15,
317,
286,
1855,
19096,
7,
16,
15,
15,
13,
15,
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 |
#[test]
fn test_legal_moves_banmen_with_fu_nari_7_squares_gote() {
test_legal_moves_banmen_with_kin_7_squares_gote_impl(GFuN)
} | rust_cleaned_test_functions.jsonl/81261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
36467,
1089,
2780,
62,
22,
643,
40856,
1889,
1272,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
1889,
1272,
21007,
6699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_raw_ctx() {
let ctx_full = Secp256k1::new();
let ctx_sign = Secp256k1::signing_only();
let ctx_vrfy = Secp256k1::verification_only();
let full = unsafe {Secp256k1::from_raw_all(ctx_full.ctx)};
let sign = unsafe {Secp256k1::from_raw_signining_only(ctx_sign... | rust_cleaned_test_functions.jsonl/12674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
15147,
368,
341,
286,
1077,
5635,
16372,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
1077,
5635,
11172,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
7752,
287,
18410,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_nft_disallow_to_be_claimed_error() {
let (mut context, tx) = create_test_context(
Action::Update(UpdateCase::Claim),
NftError::NFTDisallowClaimed,
);
let tx = context.complete_tx(tx);
// run
let err = context.verify_tx(&tx, MAX_CYCLES).unwrap_err();
... | rust_cleaned_test_functions.jsonl/33595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
1089,
723,
9932,
7183,
2346,
21263,
84969,
291,
4096,
368,
341,
262,
1077,
320,
6984,
2266,
11,
9854,
8,
284,
1855,
4452,
8467,
1006,
286,
5586,
486,
4289,
7,
4289,
4207,
486,
45544,
1326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rotation_between_axis_vectors_vector1() {
let vector = Vector2::new(f64::sqrt(3_f64) / 2_f64, 1_f64 / 2_f64);
let vector1 = Unit::from_value(Vector2::unit_y());
let vector2 = Unit::from_value(Vector2::unit_x());
let rotation = Rotation2::rotation_between_axis(&vec... | rust_cleaned_test_functions.jsonl/70473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44813,
48302,
23567,
49158,
12247,
16,
368,
341,
286,
1077,
4621,
284,
4196,
17,
486,
931,
955,
21,
19,
486,
26888,
7,
18,
761,
21,
19,
8,
608,
220,
17,
761,
21,
19,
11,
220,
16,
761,
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_resource_leak() {
let res = panic_hook::recover_safe(|| {
let mut v = MustConsumeVec::new("test");
v.push(2);
});
res.unwrap_err();
} | rust_cleaned_test_functions.jsonl/20431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17962,
11751,
585,
368,
341,
286,
1077,
592,
284,
21975,
32005,
486,
74283,
34067,
79453,
341,
310,
1077,
5206,
348,
284,
15465,
1109,
31323,
10050,
486,
931,
445,
1944,
797,
310,
348,
2552,
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
] | 2 |
#[test]
fn test_alt_shift() {
assert_eq!(
parse_event(b"\x1BH", false).unwrap(),
Some(InternalEvent::Event(Event::Key(KeyEvent::new(
KeyCode::Char('H'),
KeyModifiers::ALT | KeyModifiers::SHIFT
)))),
);
} | rust_cleaned_test_functions.jsonl/21321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32105,
22230,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
6748,
1883,
11934,
87,
16,
97151,
497,
895,
568,
15454,
3148,
310,
4329,
7,
11569,
1556,
486,
1556,
30469,
486,
1592,
67108,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execute_cost_table_prune_weighted_table() {
solana_logger::setup();
let capacity: usize = 3;
let mut testee = ExecuteCostTable::new(capacity);
let key1 = Pubkey::new_unique();
let key2 = Pubkey::new_unique();
let key3 = Pubkey::new_unique();
... | rust_cleaned_test_functions.jsonl/75384 | {
"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,
44329,
15890,
5237,
5294,
2886,
15876,
291,
5237,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
8654,
25,
22301,
284,
220,
18,
280,
286,
1077,
5206,
1273,
2127,
284,
20848,
14940,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iter() {
let dir = tempfile::tempdir().unwrap();
let rocksfs = RocksFs::new(dir.path()).unwrap();
for i in 0..10 {
rocksfs.put(&format!("foo{i}"), [i; 128]).unwrap();
}
assert_eq!(rocksfs.number_of_keys().unwrap(), 10);
... | rust_cleaned_test_functions.jsonl/3267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
368,
341,
286,
1077,
5419,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
23035,
3848,
284,
68031,
48300,
486,
931,
14161,
3875,
6011,
15454,
1428,
286,
369,
600,
304,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_decode_orn_reg_t2() {
assert_eq!(
decode_32(0xea620205),
Instruction::ORN_reg {
params: Reg3ShiftParams {
rd: Reg::R2,
rn: Reg::R2,
rm: Reg::R5,
setflags: SetFlags::False,
shift_... | rust_cleaned_test_functions.jsonl/64870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
62,
1512,
4920,
528,
17,
368,
341,
14808,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
56570,
21,
17,
15,
17,
15,
20,
1326,
286,
29051,
486,
45952,
4920,
341,
310,
3628,
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_pp_types() {
let string = "[ 1 2 ( 3.14 ) #{ 4N } { foo/bar 42 :baz/boz 43 } [ ] :five :six/seven eight nine/ten true false nil #f NaN #f -Infinity #f +Infinity ]";
let data = parse::value(string).unwrap().without_spans();
assert_eq!(
data.to_pretty(40).unwra... | rust_cleaned_test_functions.jsonl/97801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31600,
9763,
368,
341,
286,
1077,
914,
284,
10545,
220,
16,
220,
17,
320,
220,
18,
13,
16,
19,
873,
11273,
220,
19,
45,
335,
314,
15229,
49513,
220,
19,
17,
549,
42573,
14,
749,
89,
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_gga_invalid() {
let mut nmea = Nmea::new();
nmea.parse("$GPGGA,092750.000,5321.6802,S,00630.3372,E,0,8,1.03,61.7,M,55.2,M,,*7B")
.unwrap_err();
assert_eq!(nmea.fix_type(), None);
} | rust_cleaned_test_functions.jsonl/65855 | {
"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,
1889,
6743,
31433,
368,
341,
286,
1077,
5206,
308,
2660,
64,
284,
451,
2660,
64,
486,
931,
543,
286,
308,
2660,
64,
4632,
20912,
38,
11383,
16128,
11,
15,
24,
17,
22,
20,
15,
13,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_maximum_invalid_limit() {
// paging response to include the DEFAULT_LIMIT.
// Also uses the DEFAULT_OFFSET and a total of 1000.
let max_limit: usize = 1001;
let test_paging_response =
get_response_paging_info(max_limit, DEFAULT_OFFSET, TEST_LI... | rust_cleaned_test_functions.jsonl/20752 | {
"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,
93581,
31433,
14763,
368,
341,
1789,
286,
442,
56287,
2033,
311,
2924,
279,
11955,
29194,
624,
286,
442,
7281,
5711,
279,
11955,
17626,
323,
264,
2790,
315,
220,
16,
15,
15,
15,
624,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exchange_bank_client() {
solana_logger::setup();
let (genesis_config, identity) = create_genesis_config(100_000_000_000_000);
let mut bank = Bank::new(&genesis_config);
bank.add_builtin("exchange_program", id(), process_instruction);
let clients = vec![BankClient::new(bank)];... | rust_cleaned_test_functions.jsonl/4502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
35733,
8179,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1077,
320,
77894,
5332,
11,
9569,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_all_false_data_block() -> Result<()> {
let schema = DataSchemaRefExt::create(vec![
DataField::new("a", DataType::Int8, false),
DataField::new("b", DataType::String, false),
]);
let block = DataBlock::create_by_array(schema, vec![
Series::new(vec![1i8, ... | rust_cleaned_test_functions.jsonl/120757 | {
"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,
8727,
5705,
36015,
1769,
7113,
368,
1464,
5714,
71698,
341,
262,
1077,
10802,
284,
2885,
8632,
3945,
6756,
486,
3182,
25592,
90515,
286,
2885,
1877,
486,
931,
445,
64,
497,
33172,
486,
1072,
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... | 2 |
#[test]
fn test_user_satisfaction() {
let json = r#"
{
"type": "transaction",
"transaction": "foo",
"start_timestamp": "2021-04-26T08:00:00+0100",
"timestamp": "2021-04-26T08:00:01+0100",
"user": {
"id": "user123"
... | rust_cleaned_test_functions.jsonl/21931 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 722
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
643,
51270,
368,
341,
286,
1077,
2951,
284,
435,
2,
698,
286,
341,
310,
330,
1313,
788,
330,
13528,
756,
310,
330,
13528,
788,
330,
7975,
756,
310,
330,
2468,
23073,
788,
330,
17,
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_read_raster_as_array() {
let band_index = 1;
let (left, top) = (19, 5);
let (window_size_x, window_size_y) = (3, 4);
let (array_size_x, array_size_y) = (3, 4);
let dataset = Dataset::open(fixture!("tinymarble.png")).unwrap();
let values = dataset
.read_as_array::<... | rust_cleaned_test_functions.jsonl/83444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
1710,
2300,
11898,
3858,
368,
341,
262,
1077,
7055,
3560,
284,
220,
16,
280,
262,
1077,
320,
2359,
11,
1909,
8,
284,
320,
16,
24,
11,
220,
20,
317,
262,
1077,
320,
5507,
2368,
3212,
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_hover_self() {
check(
r#"
struct Thing { x: u32 }
impl Thing {
fn new() -> Self { Self<|> { x: 0 } }
}
"#,
expect![[r#"
*Self*
```rust
test
```
```rust
struct Thi... | rust_cleaned_test_functions.jsonl/105932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 982
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
25637,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
1235,
37200,
314,
856,
25,
575,
18,
17,
456,
6383,
37200,
341,
262,
5168,
501,
368,
1464,
10115,
314,
10115,
27,
91,
29,
314,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_existing_destination_with_source_dir() {
let tmp_dir = TempDir::new().expect("failed to make tempdir");
let err = Exporter::new(
PathBuf::from("tests/testdata/input/main-samples/"),
tmp_dir.path().to_path_buf().join("does-not-exist"),
)
.run()
.unwrap_err... | rust_cleaned_test_functions.jsonl/116599 | {
"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,
7913,
62630,
56344,
6615,
10347,
4334,
368,
341,
262,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
1005,
17119,
445,
16091,
311,
1281,
2730,
3741,
3071,
262,
1077,
1848,
284,
22191,
261,
486,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_array_literal() {
let input = "[1, 2 * 2, 3 + 3]";
assert_eq!(
Some(Object::Array(vec![
Object::Int(1),
Object::Int(4),
Object::Int(6),
])),
eval(input),
);
} | rust_cleaned_test_functions.jsonl/12291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
34100,
368,
341,
286,
1077,
1946,
284,
10545,
16,
11,
220,
17,
353,
220,
17,
11,
220,
18,
488,
220,
18,
60,
3302,
286,
2060,
10714,
33673,
310,
4329,
12526,
486,
1857,
25592,
90515,
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... | 1 |
#[test]
fn test_h16() -> Result<()> {
init();
let mut counter = 0;
let prop = prop::for_all(
|| h16_gen(),
move |s| {
counter += 1;
log::debug!("{:>03}, h16 = {}", counter, s);
let (_, r) = h16(Elms::new(s.as_bytes())).ok().unwrap();
assert_eq!(r, s);
... | rust_cleaned_test_functions.jsonl/76906 | {
"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,
1523,
16,
21,
368,
1464,
5714,
71698,
341,
262,
2930,
543,
262,
1077,
5206,
5546,
284,
220,
15,
280,
262,
1077,
2004,
284,
2004,
486,
1958,
5705,
1006,
414,
1369,
305,
16,
21,
16322,
3148,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_readme() {
let expression = "0 30 9,12,15 1,15 May-Aug Mon,Wed,Fri 2018/2";
let schedule = Schedule::from_str(expression).unwrap();
println!("README: Upcoming fire times for '{}':", expression);
for datetime in schedule.upcoming(Utc).take(10) {
... | rust_cleaned_test_functions.jsonl/50801 | {
"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,
6443,
2660,
368,
341,
286,
1077,
7493,
284,
330,
15,
256,
220,
18,
15,
256,
220,
24,
11,
16,
17,
11,
16,
20,
257,
220,
16,
11,
16,
20,
981,
3217,
61635,
220,
3128,
11,
26503,
27229,
461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_eh_frame_fde_no_augmentation() {
let instrs = [1, 2, 3, 4];
let cie_offset = 1;
let mut cie = make_test_cie();
cie.format = Format::Dwarf32;
cie.version = 1;
let mut fde = FrameDescriptionEntry {
offset: 0,
length: 0,
... | rust_cleaned_test_functions.jsonl/9395 | {
"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,
2204,
71,
8929,
761,
450,
6536,
60411,
31099,
368,
341,
286,
1077,
9491,
82,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
272,
645,
6917,
284,
220,
16,
401,
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... | 1 |
#[test]
fn test_parse_timestamptz_errors() {
run_test_parse_timestamptz_errors(
"1999-01-01 01:23:34.555 +25:45",
"invalid input syntax for timestamptz: Invalid timezone string \
(+25:45): timezone hour invalid 25: \"1999-01-01 01:23:34.555 +25:45\"",
);
run_test_parse_times... | rust_cleaned_test_functions.jsonl/55841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 463
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
528,
4255,
309,
417,
89,
20196,
368,
341,
262,
1598,
4452,
21039,
528,
4255,
309,
417,
89,
20196,
1006,
286,
330,
16,
24,
24,
24,
12,
15,
16,
12,
15,
16,
220,
15,
16,
25,
17,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_signature_format() {
let context = get_context(alice());
testing_env!(context);
let mut contract = BafWalletPK::new();
let sk = secp256k1::SecretKey::default();
let pk = secp256k1::PublicKey::from_secret_key(&sk);
let nonce = 0;
let... | rust_cleaned_test_functions.jsonl/112204 | {
"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,
31433,
39859,
8955,
368,
341,
286,
1077,
2266,
284,
633,
8467,
17643,
558,
1423,
286,
7497,
15879,
10297,
2147,
317,
286,
1077,
5206,
5116,
284,
425,
2577,
38259,
22242,
486,
931,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_builder() {
let mut d = Vec::with_capacity(512);
let mut opt = Options::default();
opt.block_restart_interval = 3;
opt.compression_type = CompressionType::CompressionSnappy;
let mut b = TableBuilder::new(opt, &mut d);
let data = vec![
... | rust_cleaned_test_functions.jsonl/107472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 602
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
28532,
368,
341,
286,
1077,
5206,
294,
284,
11312,
486,
4197,
35603,
7,
20,
16,
17,
317,
286,
1077,
5206,
3387,
284,
14566,
486,
2258,
543,
286,
3387,
15697,
69392,
20541,
284,
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... | 2 |
#[test]
fn test_solid_onig_invert() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-s", "-Gog", "\\d+", "-v", "tr", "[:upper:]", "[:lower:]"])
.write_stdin("ABC123EFG\nHIJKLM456")
.assert()
.stdout("abc123efg\nhijk... | rust_cleaned_test_functions.jsonl/7907 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
5192,
4470,
343,
1243,
1621,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_throttled() {
let bit_pat_isize = throttled("throttled=0x50000").unwrap();
assert_eq!(bit_pat_isize, 327680isize);
assert_eq!(format!("{:b}", &bit_pat_isize), "1010000000000000000");
} | rust_cleaned_test_functions.jsonl/21812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5854,
46689,
832,
368,
341,
286,
1077,
2699,
55824,
6892,
551,
284,
79972,
832,
445,
339,
46689,
832,
28,
15,
87,
20,
15,
15,
15,
15,
1827,
15454,
543,
286,
2060,
10714,
10297,
4489,
55824,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cohort() {
let json = br#"
{"response":{
"server":"prod",
"protocol":"3.0",
"app":[
{
"appid":"{00000000-0000-0000-0000-000000000001}",
"cohort":"1:3:",
"status":"ok",
"cohortname":"stable",
"updatecheck":{"status":"noupdate"},
"ping":{"status":"ok"}
}
]
}}"#;
... | rust_cleaned_test_functions.jsonl/14135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 516
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
666,
2267,
371,
368,
341,
262,
1077,
2951,
284,
1411,
2,
698,
4913,
2322,
12602,
330,
4030,
3252,
19748,
756,
330,
17014,
3252,
18,
13,
15,
756,
330,
676,
8899,
198,
220,
341,
256,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bracket_syntax_success() {
let scenario = TestScenario::new("[");
let mut ucmd = scenario.ucmd();
ucmd.args(&["1", "-eq", "1", "]"]).succeeds();
} | rust_cleaned_test_functions.jsonl/11037 | {
"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,
17682,
5709,
78894,
18632,
368,
341,
262,
1077,
15048,
284,
3393,
54031,
486,
931,
10937,
797,
262,
1077,
5206,
575,
8710,
284,
15048,
56334,
2277,
1428,
262,
575,
8710,
16365,
2099,
1183,
16,
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 |
#[test]
fn test_meta_item_list_lit() {
run_test(
"#[foo(5)]",
MetaList {
ident: ident("foo").into(),
paren_token: Default::default(),
nested: punctuated![NestedMeta::Literal(lit(Literal::i32_unsuffixed(5)))],
},
)
} | rust_cleaned_test_functions.jsonl/63942 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13381,
5634,
2019,
98399,
368,
341,
262,
1598,
4452,
1006,
286,
5869,
58,
7975,
7,
20,
7252,
756,
286,
15819,
852,
341,
310,
3524,
25,
3524,
445,
7975,
1827,
18122,
3148,
310,
37940,
6458,
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_deserialize_uint() {
let request =
TestInterfaceRequest::from_args(0 /* opcode */, vec![Arg::Uint(UINT_VALUE)]).unwrap();
assert_match!(request, TestInterfaceRequest::Uint{arg} => assert_eq!(arg, UINT_VALUE));
} | rust_cleaned_test_functions.jsonl/55792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
15807,
368,
341,
286,
1077,
1681,
4035,
310,
3393,
5051,
1900,
486,
1499,
8384,
7,
15,
1391,
30028,
36572,
7486,
20703,
2735,
486,
21570,
50075,
7476,
7252,
568,
15454,
1428,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_param() {
for multiple_param in vec!["-a", "--multiple"] {
let path = "/foo/bar/baz";
new_ucmd!()
.args(&[multiple_param, path, path])
.succeeds()
.stdout_only("baz\nbaz\n");
}
} | rust_cleaned_test_functions.jsonl/82223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
4090,
368,
341,
262,
369,
5248,
4090,
304,
7486,
0,
1183,
12,
64,
497,
14482,
35673,
1341,
341,
286,
1077,
1815,
284,
3521,
7975,
49513,
3470,
1370,
876,
286,
501,
68887,
2277,
0,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_servername_1() {
// IRC standard
let prefix = Some(Pfx::Server("card.freenode.net".to_string()));
let params = vec![
"nickname".to_string(),
"Your host is card.freenode.net[38.229.70.22/6697], running version ircd-seven-1.1.9"
... | rust_cleaned_test_functions.jsonl/84772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
12015,
606,
62,
16,
368,
341,
286,
442,
59328,
5297,
198,
286,
1077,
9252,
284,
4329,
5304,
8298,
486,
5475,
445,
4951,
833,
4442,
534,
5071,
3263,
983,
3904,
7392,
286,
1077,
3628,
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_apply_auth_bearer_token() -> Result<(), anyhow::Error> {
use hmac::{Hmac, NewMac};
use jwt::SignWithKey;
use sha2::Sha256;
let mut client = Client::default();
let header = jwt::header::Header {
algorithm: jwt::algorithm::AlgorithmType::Hs256,
... | rust_cleaned_test_functions.jsonl/109367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 736
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
14014,
880,
20786,
6458,
368,
1464,
5714,
68843,
88964,
486,
1454,
29,
341,
286,
990,
83356,
22964,
39,
11948,
11,
1532,
19552,
2440,
286,
990,
24589,
486,
7264,
2354,
1592,
280,
286,
990,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_string() {
fn test(c: Complex64, s: String) {
assert_eq!(c.to_string(), s);
}
test(_0_0i, "0+0i".to_string());
test(_1_0i, "1+0i".to_string());
test(_0_1i, "0+1i".to_string());
test(_1_1i, "1+1i".to_string());
test(_neg1_1i, ... | rust_cleaned_test_functions.jsonl/105660 | {
"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,
2346,
3904,
368,
341,
286,
5168,
1273,
1337,
25,
22096,
21,
19,
11,
274,
25,
923,
8,
341,
310,
2060,
10714,
10297,
66,
2389,
3904,
1507,
274,
317,
286,
456,
286,
1273,
2490,
15,
62,
15,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_octet() {
check([] as [u8; 0], Some(0));
check([0u8, 1, 2], Some(3));
} | rust_cleaned_test_functions.jsonl/79668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 58
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
70135,
295,
368,
341,
262,
1779,
10556,
438,
508,
84,
23,
26,
220,
15,
1125,
4329,
7,
15,
1106,
262,
1779,
2561,
15,
84,
23,
11,
220,
16,
11,
220,
17,
1125,
4329,
7,
18,
1106,
92
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_50offset_paging_response() {
let test_paging_response = get_response_paging_info(DEFAULT_LIMIT, 50, TEST_LINK, 1000);
let generated_paging_response = create_test_paging_response(DEFAULT_LIMIT, 50, 150, 0, 900);
assert_eq!(test_paging_response, generated_paging_re... | rust_cleaned_test_functions.jsonl/18444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
20,
15,
3176,
620,
4118,
9655,
368,
341,
1789,
286,
1077,
1273,
620,
4118,
9655,
284,
633,
9655,
620,
4118,
3109,
43175,
29194,
11,
220,
20,
15,
11,
13602,
26147,
11,
220,
16,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_datapoint() {
macro_rules! matches {
($e:expr, $p:pat) => {
match $e {
$p => true,
_ => false,
}
};
}
datapoint!("name", ("field name", "test".to_string(), String));
d... | rust_cleaned_test_functions.jsonl/36630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15353,
391,
781,
368,
341,
286,
18072,
21407,
0,
9071,
341,
310,
1711,
68,
96011,
11,
400,
79,
25,
4676,
8,
589,
341,
394,
2432,
400,
68,
341,
503,
400,
79,
589,
830,
345,
503,
716,
589,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_move_selection_left() {
// check left bounds
let selection = TextSelection::new(0, 0);
let result = move_selection_left(selection);
assert_eq!(result.start(), 0);
assert_eq!(result.end(), 0);
// start == end
let selection = TextSelection:... | rust_cleaned_test_functions.jsonl/61661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
23672,
9579,
368,
341,
286,
442,
220,
1779,
2115,
14262,
198,
286,
1077,
6589,
284,
2918,
11177,
486,
931,
7,
15,
11,
220,
15,
317,
286,
1077,
1102,
284,
3271,
23672,
9579,
56361,
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_eq_0() {
let test_res = string_to_ts("foo");
let test_eqs = string_to_ts("foo");
assert_eq!(test_res, test_eqs)
} | rust_cleaned_test_functions.jsonl/47171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
62,
15,
368,
341,
286,
1077,
1273,
4918,
284,
914,
2346,
25023,
445,
7975,
797,
286,
1077,
1273,
10714,
82,
284,
914,
2346,
25023,
445,
7975,
797,
286,
2060,
10714,
10297,
1944,
4918,
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_depool_3() -> Result<(), Box<dyn std::error::Error>> {
let giver_addr = "0:841288ed3b55d9cdafa806807f02a0ae0c169aa5edfe88a789a6482429756a94";
let depool_abi = "tests/samples/fakeDepool.abi.json";
let seed_phrase = "blanket time net universe ketchup maid way poem scatter blur limit dr... | rust_cleaned_test_functions.jsonl/118336 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
10285,
62,
18,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
94515,
7387,
284,
330,
15,
25,
23,
19,
16,
17,
23,
23,
291,
18,
65,
20,
20,
67,
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... | 9 |
#[test]
fn test_aggregate_partition_bad_sum() {
let metrics = ExecutionPlanMetricsSet::new();
let count = MetricBuilder::new(&metrics).counter("my_metric", 1);
count.add(1);
let time = MetricBuilder::new(&metrics).subset_time("my_metric", 1);
time.add_duration(Duration:... | rust_cleaned_test_functions.jsonl/28187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
14240,
43840,
34199,
10160,
368,
341,
286,
1077,
16734,
284,
30928,
20485,
27328,
1649,
486,
931,
1428,
286,
1077,
1760,
284,
52458,
3297,
486,
931,
2099,
43262,
568,
8292,
445,
2408,
41294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_to_dir() {
let tmp_dir = TempDir::new().expect("failed to make tempdir");
Exporter::new(
PathBuf::from("tests/testdata/input/single-file/note.md"),
tmp_dir.path().to_path_buf(),
)
.run()
.unwrap();
assert_eq!(
read_to_string("tests/tes... | rust_cleaned_test_functions.jsonl/116596 | {
"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,
19487,
2458,
2346,
4334,
368,
341,
262,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
1005,
17119,
445,
16091,
311,
1281,
2730,
3741,
797,
262,
22191,
261,
486,
931,
1006,
286,
7933,
15064,
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_timestamp_order() {
let mut qb = QueuedBatches::default();
// Add an event at time 1
qb.add_event(InputLogEvent {
message: "".to_string(),
timestamp: 1,
})
.unwrap();
assert_eq!(qb.batches.len(), 1);
qb.ad... | rust_cleaned_test_functions.jsonl/96497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
7869,
368,
341,
286,
1077,
5206,
75807,
284,
9418,
3260,
33,
9118,
486,
2258,
1428,
286,
442,
2691,
458,
1538,
518,
882,
220,
16,
198,
286,
75807,
1364,
6748,
29773,
2201,
1556,
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_dump_items_serialize_hex() {
let result_a = DumpItems::default();
let res = result_a.to_hex();
assert!(res.is_ok());
let hex = res.unwrap();
let res = DumpItems::from_hex(&hex);
assert!(res.is_ok());
let result_b = res.unwrap();
assert_eq!(result_a, result_... | rust_cleaned_test_functions.jsonl/126651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18296,
12134,
88686,
32655,
368,
341,
262,
1077,
1102,
4306,
284,
29693,
4353,
486,
2258,
543,
1066,
262,
1077,
592,
284,
1102,
4306,
2389,
32655,
543,
262,
2060,
10297,
416,
2079,
19817,
1423,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_sparse_merkle_proof_wrong_number_of_siblings() {
let sibling0 = b"0".test_only_hash();
let sibling1 = b"1".test_only_hash();
let mut compressed_proof = crate::proto::proof::SparseMerkleProof::new();
compressed_proof.mut_bitmap().push(0b1000_0000);
compressed_proof
... | rust_cleaned_test_functions.jsonl/103132 | {
"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,
34910,
71123,
717,
16754,
273,
86757,
75198,
5500,
3575,
643,
24229,
368,
341,
262,
1077,
44223,
15,
284,
293,
1,
15,
3263,
1944,
18410,
8950,
543,
262,
1077,
44223,
16,
284,
293,
1,
16,
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_trim_3_args() {
let tests = vec![
("xxxbarxxx", "x", TrimDirection::Leading as i64, "barxxx"),
("barxxyz", "xyz", TrimDirection::Trailing as i64, "barx"),
("xxxbarxxx", "x", TrimDirection::Both as i64, "bar"),
];
for (s, pat, direction,... | rust_cleaned_test_functions.jsonl/9111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 898
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70025,
62,
18,
8384,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
24048,
2257,
24048,
497,
330,
87,
497,
44376,
9268,
486,
69750,
438,
600,
21,
19,
11,
330,
2257,
24048,
4461,
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... | 3 |
#[test]
fn test_placeholder_regex() {
let regex = make_placeholder_regex(&["placeholder"]);
assert_eq!(
parse_line_number_format("prefix {placeholder:<15.14} suffix", ®ex, false),
vec![FormatStringPlaceholderData {
prefix: "prefix ".into(),
... | rust_cleaned_test_functions.jsonl/106279 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60383,
41832,
368,
341,
286,
1077,
20180,
284,
1281,
60383,
41832,
2099,
1183,
12384,
15049,
286,
2060,
10714,
33673,
310,
4715,
6528,
5500,
8955,
445,
11849,
314,
12384,
31252,
16,
20,
13,
16,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_blockstore_with_incomplete_slot() {
solana_logger::setup();
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let ticks_per_slot = genesis_config.ticks_per_slot;
// Create a new ledger with slot 0 full of ticks
... | rust_cleaned_test_functions.jsonl/70843 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
7113,
4314,
6615,
1243,
14737,
27563,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or() {
assert_eq!(false, or(false, false));
assert_eq!(true, or(true, false));
assert_eq!(true, or(false, true));
assert_eq!(true, or(true, true));
} | rust_cleaned_test_functions.jsonl/90314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
368,
341,
220,
2060,
10714,
10297,
3849,
11,
476,
3576,
11,
895,
1106,
220,
2060,
10714,
10297,
1866,
11,
476,
3715,
11,
895,
1106,
220,
2060,
10714,
10297,
1866,
11,
476,
3576,
11,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_data_from_helpers() {
let mut nonce_account = nonce_account::create_account(1).into_inner();
let state = state_from_account(&nonce_account).unwrap();
assert_eq!(
data_from_state(&state),
Err(Error::InvalidStateForOperation)
);
asser... | rust_cleaned_test_functions.jsonl/18822 | {
"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,
1769,
5673,
54473,
368,
341,
286,
1077,
5206,
39676,
13500,
284,
39676,
13500,
486,
3182,
13500,
7,
16,
568,
18122,
34345,
543,
286,
1077,
1584,
284,
1584,
5673,
13500,
2099,
39593,
13500,
568,
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_tree() {
let mut tree = Tree::new(&[
String::from("│"),
String::from("─"),
String::from("┬"),
String::from("├"),
String::from("└"),
]);
let p0 = ProcessInfo {
pid: 0,
ppid: 0,
... | rust_cleaned_test_functions.jsonl/27873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
368,
341,
286,
1077,
5206,
4916,
284,
8942,
486,
931,
2099,
9640,
310,
923,
486,
1499,
445,
72887,
4461,
310,
923,
486,
1499,
445,
14555,
4461,
310,
923,
486,
1499,
445,
146206,
4461,
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_one_leaf() {
let hash = HashValue::random();
let mut store = MockHashStore::new();
let (root_hash, writes) = TestAccumulator::append(&store, 0, &[hash]).unwrap();
store.put_many(&writes);
verify(&store, 1, root_hash, &[hash], 0)
} | rust_cleaned_test_functions.jsonl/52439 | {
"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,
11667,
38909,
368,
341,
262,
1077,
5175,
284,
6531,
1130,
486,
11463,
543,
262,
1077,
5206,
3553,
284,
14563,
6370,
6093,
486,
931,
543,
262,
1077,
320,
2888,
8950,
11,
13914,
8,
284,
3393,
1460... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_small_needle() {
let haystack = "111 a 111b";
rsearch_test!(haystack, "a", Some(4));
rsearch_test!(haystack, "a 111", Some(4));
} | rust_cleaned_test_functions.jsonl/19418 | {
"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,
31966,
71506,
273,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
876,
286,
435,
1836,
4452,
10297,
67312,
7693,
11,
330,
64,
497,
4329,
7,
19,
1106,
286,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_process_completedblock_with_submit_block_failure() {
let block = get_block(0);
let mut rpc = MockRpc::new();
rpc.should_call_submitblock(Err(Error::JsonRpc(jsonrpc::error::Error::Rpc(
jsonrpc::error::RpcError {
code: -25,
messag... | rust_cleaned_test_functions.jsonl/63310 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
49068,
4574,
6615,
31674,
7113,
43618,
368,
341,
286,
1077,
2504,
284,
633,
7113,
7,
15,
317,
286,
1077,
5206,
35596,
284,
14563,
60248,
486,
931,
543,
286,
35596,
15507,
13429,
31674,
4574... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_around_0_ok() {
let env = env_1!();
let in_w = super::IN_DAT_TARGET_LIST.to_string();
let (r, sioe) = do_execute!(
&env,
&["-e", "musl", "--color", "always", "--around", "0"],
in_w.as_str(),
);
assert_eq!(buff!(sioe, ser... | rust_cleaned_test_functions.jsonl/62182 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 785
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
19454,
62,
15,
19817,
368,
341,
286,
1077,
6105,
284,
6105,
62,
16,
0,
543,
286,
1077,
304,
1670,
284,
2256,
486,
687,
36347,
29299,
11899,
2389,
3904,
543,
286,
1077,
320,
81,
11,
274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_len() {
let gil = Python::acquire_gil();
let py = gil.python();
let ob = (1, 2, 3).to_object(py);
let tuple = <PyTuple as PyTryFrom>::try_from(ob.as_ref(py)).unwrap();
assert_eq!(3, tuple.len());
let ob: &PyAny = tuple.into();
assert_eq!((1... | rust_cleaned_test_functions.jsonl/4177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6043,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
1508,
284,
320,
16,
11,
220,
17,
11,
220,
18,
568,
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_rsqrt() {
let nan: f64 = Float::nan();
let inf: f64 = Float::infinity();
let neg_inf: f64 = Float::neg_infinity();
assert!(nan.rsqrt().is_nan());
assert_eq!(inf.rsqrt(), 0.0);
assert!(neg_inf.rsqrt().is_nan());
assert!((-1.0f64).rsqrt().is_... | rust_cleaned_test_functions.jsonl/7446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
26888,
368,
341,
286,
1077,
20021,
25,
282,
21,
19,
284,
13001,
486,
18759,
543,
286,
1077,
4132,
25,
282,
21,
19,
284,
13001,
486,
80016,
543,
286,
1077,
4184,
26051,
25,
282,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_pretty_hex() {
assert_eq!(to_pretty_hex(0x0), "0x0");
assert_eq!(to_pretty_hex(0x12), "0x12");
assert_eq!(to_pretty_hex(0x123), "0x123");
assert_eq!(to_pretty_hex(0x1234), "0x1234");
assert_eq!(to_pretty_hex(0x12345), "0x1_... | rust_cleaned_test_functions.jsonl/17922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
620,
21322,
32655,
368,
341,
286,
2060,
10714,
10297,
983,
620,
21322,
32655,
7,
15,
87,
15,
701,
260,
330,
15,
87,
15,
797,
286,
2060,
10714,
10297,
983,
620,
21322,
32655,
7,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fullscreen() {
let client = setup_vlc();
let is_fullscreen = client.root.fullscreen().unwrap().unwrap();
client.root.set_fullscreen(!is_fullscreen).unwrap();
std::thread::sleep(std::time::Duration::from_millis(200));
let is_fullscreen2 = client.root.fullscreen().unwrap().unwr... | rust_cleaned_test_functions.jsonl/86480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
8174,
368,
341,
262,
1077,
2943,
284,
6505,
2273,
17257,
543,
262,
1077,
374,
16372,
8174,
284,
2943,
12576,
21534,
8174,
1005,
15454,
1005,
15454,
543,
262,
2943,
12576,
980,
16372,
8174,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cfi_entry_on_cie_32_ok() {
let expected_rest = [1, 2, 3, 4, 5, 6, 7, 8, 9];
let expected_instrs: Vec<_> = (0..4).map(|_| constants::DW_CFA_nop.0).collect();
let mut cie = CommonInformationEntry {
offset: 0,
length: 0,
format: For... | rust_cleaned_test_functions.jsonl/9309 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 634
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
666,
9983,
9078,
4470,
666,
645,
62,
18,
17,
19817,
368,
341,
286,
1077,
3601,
32231,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_str_ref() {
assert_eq!("beacon_block", BeaconBlock.as_ref());
assert_eq!(
"beacon_aggregate_and_proof",
BeaconAggregateAndProof.as_ref()
);
assert_eq!(
"beacon_attestation",
Attestation(SubnetId::new(42)).as_ref()... | rust_cleaned_test_functions.jsonl/131038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
2895,
7793,
368,
341,
286,
2060,
10714,
17223,
1371,
22379,
7113,
497,
58620,
4713,
5357,
7793,
1423,
286,
2060,
10714,
33673,
310,
330,
1371,
22379,
20587,
14240,
8378,
86757,
756,
310,
5862... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_docs_handles_non_rust() {
let comment = "```sh\nsupposedly shell code\n```";
assert_eq!(format_docs(comment), "```sh\nsupposedly shell code\n```");
} | rust_cleaned_test_functions.jsonl/57084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
49692,
68017,
21637,
1710,
590,
368,
341,
286,
1077,
3980,
284,
330,
73594,
927,
1699,
12776,
3865,
398,
12528,
2038,
1699,
73594,
876,
286,
2060,
10714,
10297,
2243,
49692,
39327,
701,
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 |
#[test]
fn test_entities_crud() {
let mut world = World::default();
// Create
let e0 = world.create_entity(());
assert!(world.contains_entity(e0));
assert_eq!(world.entities(), &[e0]);
// Destroy
assert!(world.destroy_entity(e0));
assert!(!world.destroy_entity(e0));
assert!... | rust_cleaned_test_functions.jsonl/32641 | {
"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,
47377,
32331,
661,
368,
341,
262,
1077,
5206,
1879,
284,
4337,
486,
2258,
1428,
262,
442,
4230,
198,
262,
1077,
384,
15,
284,
1879,
2520,
19169,
7,
1423,
262,
2060,
10297,
14615,
8786,
19169,
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_kernel_cmdline_err_to_startuvm_err() {
let err = StartMicrovmError::from(linux_loader::cmdline::Error::HasSpace);
let _ = format!("{}{:?}", err, err);
} | rust_cleaned_test_functions.jsonl/4359 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26876,
11684,
1056,
9266,
2346,
4906,
84,
7338,
9266,
368,
341,
286,
1077,
1848,
284,
5145,
34609,
7338,
1454,
486,
1499,
2333,
19559,
22139,
486,
8710,
1056,
486,
1454,
486,
10281,
9914,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_vec4mask_fmt() {
let a = Vec4Mask::new(true, false, true, false);
assert_eq!(format!("{}", a), "[true, false, true, false]");
assert_eq!(
format!("{:?}", a),
"Vec4Mask(0xffffffff, 0x0, 0xffffffff, 0x0)"
);
} | rust_cleaned_test_functions.jsonl/68880 | {
"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,
13251,
19,
11258,
38128,
368,
341,
262,
1077,
264,
284,
11312,
19,
12686,
486,
931,
3715,
11,
895,
11,
830,
11,
895,
626,
262,
2060,
10714,
10297,
2243,
79878,
264,
701,
10545,
1866,
11,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_req_route_query_collisions() {
assert!(req_route_path_collide("/a/b?a=b", "/a/b?<c>"));
assert!(req_route_path_collide("/a/b?a=b", "/<a>/b?<c>"));
assert!(req_route_path_collide("/a/b?a=b", "/<a>/<b>?<c>"));
assert!(req_route_path_collide("/a/b?a=b", "/a/<b>?<c>")... | rust_cleaned_test_functions.jsonl/67669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17644,
28109,
5738,
43597,
6805,
368,
341,
286,
2060,
10297,
2958,
28109,
2638,
43597,
577,
4283,
64,
3470,
98461,
22086,
497,
3521,
64,
3470,
75414,
66,
29,
4010,
286,
2060,
10297,
2958,
28109,
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_string_json_equal() {
// Test the equal case
let arrow_array =
StringArray::from(vec![Some("hello"), None, None, Some("world"), None, None]);
let json_array: Value = serde_json::from_str(
r#"
[
"hello",
n... | rust_cleaned_test_functions.jsonl/897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
9455,
11478,
368,
341,
286,
442,
3393,
279,
6144,
1142,
198,
286,
1077,
17921,
3858,
4035,
310,
923,
1857,
486,
1499,
25592,
20703,
8373,
445,
14990,
3975,
2240,
11,
2240,
11,
4329,
445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_saturating_sub_int() {
use isize::{MIN,MAX};
assert_eq!(3.saturating_sub(5), -2);
assert_eq!(MIN.saturating_sub(1), MIN);
assert_eq!((-2).saturating_sub(MAX), MIN);
assert_eq!(3.saturating_sub(-5), 8);
assert_eq!(3.saturating_sub(-(MAX-1)), MAX);
... | rust_cleaned_test_functions.jsonl/25374 | {
"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,
643,
2628,
1095,
5228,
4042,
368,
341,
286,
990,
91373,
22964,
16413,
11,
10586,
2440,
286,
2060,
10714,
10297,
18,
514,
2628,
1095,
5228,
7,
20,
701,
481,
17,
317,
286,
2060,
10714,
10297,
1641... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_context_with_one_parent() {
let parent = Context::top_level();
let context = Context::new(Some(&parent));
assert_eq!(context.get("red"), Expr::String("red".to_owned()));
} | rust_cleaned_test_functions.jsonl/1906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8467,
6615,
11667,
15960,
368,
341,
286,
1077,
2681,
284,
9608,
486,
3481,
8274,
543,
286,
1077,
2266,
284,
9608,
486,
931,
65405,
2099,
3765,
3237,
286,
2060,
10714,
10297,
2147,
670,
445,
1151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bool_character() {
context!(ctx, dev);
execute_str!(ctx, b"*BOOL? ON;*BOOL? OFF" => result, response {
assert_eq!(result, Ok(()));
assert_eq!(response, b"1;0\n");
});
execute_str!(ctx, b"*BOOL? POTATO" => result, _response {
... | rust_cleaned_test_functions.jsonl/82176 | {
"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,
22159,
40988,
368,
341,
286,
2266,
10297,
3773,
11,
3483,
317,
1789,
286,
9026,
2895,
10297,
3773,
11,
293,
61593,
10395,
30,
6197,
26,
9,
10395,
30,
17611,
1,
589,
1102,
11,
2033,
341,
310,
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_size_cap() {
let str_pool : Pool<String> = Pool::with_size_and_max(1, 1);
{
assert_eq!(1, str_pool.size());
let _rstring = str_pool.new_from("dog");
let _rstring2 = str_pool.new_from("cat");
assert_eq!(0, str_pool.size());
}
assert_eq!(1, s... | rust_cleaned_test_functions.jsonl/121195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2368,
16388,
368,
341,
414,
1077,
607,
15709,
549,
22728,
3464,
29,
284,
22728,
486,
4197,
2368,
8378,
6345,
7,
16,
11,
220,
16,
317,
414,
341,
286,
2060,
10714,
10297,
16,
11,
607,
15709,
248... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deletion_due_to_rent_upon_rent_for_sysvar_activation() {
solana_logger::setup();
let (mut genesis_config, _mint_keypair) = create_genesis_config(0);
let feature_balance =
std::cmp::max(genesis_config.rent.minimum_balance(Feature::size_of()), 1);
/... | rust_cleaned_test_functions.jsonl/2657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
2259,
52625,
75728,
2346,
83127,
8237,
263,
83127,
5478,
20344,
947,
52404,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
320,
6984,
59366,
5332,
11,
716,
67791,
3097,
12670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_participant_parse() {
let string = r#"{
"participant": {
"active": true,
"checked_in_at": null,
"created_at": "2015-01-19T16:54:40-05:00",
"final_rank": null,
"group_id": null,
"icon": null,
"id... | rust_cleaned_test_functions.jsonl/107046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
21757,
21039,
368,
341,
286,
1077,
914,
284,
435,
55543,
515,
688,
330,
58513,
788,
341,
310,
330,
3028,
788,
830,
345,
310,
330,
7549,
1243,
3752,
788,
845,
345,
310,
330,
7120,
3752,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_process_record() {
let cls = FastText::new_lid().unwrap();
// let oscar_metadata =
let record: Record<EmptyBody> = Record::default();
let body = "english test that is longer than one hundred characters. english test that is longer than one hundred chara... | rust_cleaned_test_functions.jsonl/3957 | {
"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,
11305,
14192,
368,
341,
286,
1077,
12790,
284,
17288,
1178,
486,
931,
907,
307,
1005,
15454,
1428,
286,
442,
1077,
297,
24513,
22220,
4035,
23459,
286,
1077,
3255,
25,
13583,
27,
3522,
5444,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.