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_encrypt_ledger() {
solana_logger::setup();
let ledger_dir = "chacha_test_encrypt_file";
let ledger_path = get_tmp_ledger_path(ledger_dir);
let ticks_per_slot = 16;
let slots_per_segment = 32;
let blocktree = Arc::new(Blocktree::open(&ledger_path).u... | rust_cleaned_test_functions.jsonl/57846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 914
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
38367,
1389,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
46933,
4334,
284,
330,
331,
51576,
4452,
66593,
2458,
876,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
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_not_invoke_committed_cb_when_fail_to_commit() {
let mut cluster = new_node_cluster(0, 3);
cluster.pd_client.disable_default_operator();
cluster.run();
cluster.must_transfer_leader(1, new_peer(1, 1));
cluster.must_put(b"k", b"v");
// Partiton the leader and followers to l... | rust_cleaned_test_functions.jsonl/50883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 631
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
79779,
2965,
5483,
16450,
47636,
22121,
2346,
36346,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
10652,
556,
67,
8179,
42628,
9993,
40594,
543,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_native_program_id() {
assert!(bpf_loader::id().is_native_program_id());
assert!(bpf_loader_deprecated::id().is_native_program_id());
assert!(config::program::id().is_native_program_id());
assert!(feature::id().is_native_program_id());
assert!(secp256k1_... | rust_cleaned_test_functions.jsonl/61817 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
44494,
25096,
842,
368,
341,
286,
2060,
10297,
65,
15897,
22139,
486,
307,
1005,
285,
44494,
25096,
842,
1423,
286,
2060,
10297,
65,
15897,
22139,
2259,
19889,
486,
307,
1005,
285,
44494,
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_sbc_imm() {
let mut r = Register::new();
r.set_A(0x03);
r.set_status_carry(true);
sbc_imm(0x02, &mut r);
assert_eq!(r.get_A(),0x01);
assert_eq!(r.get_status_overflow(), false);
r.set_A(0x04);
r.set_status_carry(false);
sbc_imm(0x03, &mut r);
assert_eq!(r.... | rust_cleaned_test_functions.jsonl/14223 | {
"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,
643,
8904,
71370,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
435,
980,
1566,
7,
15,
87,
15,
18,
317,
262,
435,
980,
4773,
666,
11433,
3715,
317,
262,
7898,
66,
71370,
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_generate_pull_responses() {
let mut node_crds = Crds::default();
let entry = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::new_rand(),
0,
)));
let node_pubkey = entry.label().pubkey();
let node =... | rust_cleaned_test_functions.jsonl/45199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
65693,
81292,
368,
341,
286,
1077,
5206,
2436,
32331,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
4343,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sort() {
let a = Int32Chunked::new(
"a",
&[
Some(1),
Some(5),
None,
Some(1),
None,
Some(4),
Some(3),
Some(1),
],
);
... | rust_cleaned_test_functions.jsonl/16390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 821
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
28304,
291,
486,
931,
1006,
310,
330,
64,
756,
310,
609,
9640,
394,
4329,
7,
16,
1326,
394,
4329,
7,
20,
1326,
394,
2240,
345,
394,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_straight() {
let test_str = "123456789m78p22z 9p";
let test = Hand::from(test_str);
let test_analyzer = HandAnalyzer::new(&test).unwrap();
let mut status = Status::new();
let settings = Settings::new();
status.has_claimed_open = false;
asse... | rust_cleaned_test_functions.jsonl/5174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
7386,
368,
341,
286,
1077,
1273,
2895,
284,
330,
16,
17,
18,
19,
20,
21,
22,
23,
24,
76,
22,
23,
79,
17,
17,
89,
220,
24,
79,
876,
286,
1077,
1273,
284,
8536,
486,
1499,
8623,
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... | 1 |
#[test]
fn test_unknown_fields_fixed32() {
let mut message = TestUnknownFields::new();
message.set_a(150);
message.mut_unknown_fields().add_fixed32(4, 0x01020304);
message.mut_unknown_fields().add_fixed32(4, 0xA1A2A3A4);
test_serialize_deserialize_with_dynamic("08 96 01 25 04 03 02 01 25 A4 ... | rust_cleaned_test_functions.jsonl/2710 | {
"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,
57507,
12132,
37839,
18,
17,
368,
341,
262,
1077,
5206,
1943,
284,
3393,
13790,
8941,
486,
931,
543,
262,
1943,
980,
4306,
7,
16,
20,
15,
317,
262,
1943,
744,
332,
57507,
12132,
1005,
718,
378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_failed_name_server() {
let options = ResolverOpts {
timeout: Duration::from_millis(1),
..Default::default()
};
let config = NameServerConfig {
socket_addr: SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 252)), 252),
pr... | rust_cleaned_test_functions.jsonl/18438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 635
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35060,
1269,
12015,
368,
341,
286,
1077,
2606,
284,
81854,
43451,
341,
310,
9632,
25,
21045,
486,
1499,
717,
56212,
7,
16,
701,
715,
310,
5241,
3675,
486,
2258,
741,
286,
2605,
286,
1077,
2193,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut val = Vec::new();
val.insert(0, 0x00);
val.insert(1, 0x11);
val.insert(2, 0x22);
val.insert(3, 0x33);
wrap_in_sequence(&mut val);
assert_eq!(vec![0x30, 0x04, 0x00, 0x11, 0x22, 0x33], val);
} | rust_cleaned_test_functions.jsonl/89555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31966,
368,
341,
262,
1077,
5206,
1044,
284,
11312,
486,
931,
543,
262,
1044,
7030,
7,
15,
11,
220,
15,
87,
15,
15,
317,
262,
1044,
7030,
7,
16,
11,
220,
15,
87,
16,
16,
317,
262,
1044,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compact_options() {
let path = tempdir_with_prefix("_rust_rocksdb_compact_options");
let db = DB::open_default(path.path().to_str().unwrap()).unwrap();
db.put(b"k1", b"v1").unwrap();
db.put(b"k2", b"v2").unwrap();
db.flush(true).unwrap();
let mut compact_opts = CompactOp... | rust_cleaned_test_functions.jsonl/34111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
531,
8743,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
18177,
531,
8743,
797,
262,
1077,
2927,
284,
5952,
486,
2508,
9993,
5581,
3875,
1005,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
assert_eq!(_05_05i + _05_05i, _1_1i);
assert_eq!(_0_1i + _1_0i, _1_1i);
assert_eq!(_1_0i + _neg1_1i, _0_1i);
for &c in all_consts.iter() {
assert_eq!(_0_0i + c, c);
assert_eq!(c + _0_0i, c);
}
... | rust_cleaned_test_functions.jsonl/108413 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
310,
2060,
10714,
0,
2490,
15,
20,
62,
15,
20,
72,
488,
716,
15,
20,
62,
15,
20,
72,
11,
716,
16,
62,
16,
72,
317,
310,
2060,
10714,
0,
2490,
15,
62,
16,
72,
488,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_message_size() {
let batch_msg = Track {
user: User::UserId {
user_id: String::from_utf8(vec![b'a'; 1024 * 33]).unwrap(),
},
..Default::default()
};
let mut batcher = Batcher::new(None);
let result = batcher... | rust_cleaned_test_functions.jsonl/35280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
6462,
2368,
368,
341,
286,
1077,
7162,
6483,
284,
19785,
341,
310,
1196,
25,
2657,
486,
13504,
341,
394,
1196,
842,
25,
923,
486,
1499,
39453,
23,
25592,
20703,
65,
25184,
6967,
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_three_dot_two() -> Result<()> {
let idt = id("3.2");
assert_eq!(idt.to_string(), "n3_2");
Ok(())
} | rust_cleaned_test_functions.jsonl/2017 | {
"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,
50016,
30941,
23241,
368,
1464,
5714,
71698,
341,
286,
1077,
877,
83,
284,
877,
445,
18,
13,
17,
797,
286,
2060,
10714,
10297,
307,
83,
2389,
3904,
1507,
330,
77,
18,
62,
17,
797,
286,
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 |
#[test]
fn test_find() {
let bytes: &[u8; 13] = b"abcacrgbabsjl";
let i = find(&bytes[..], b"ac");
assert_eq!(i.unwrap(), 3);
let i = find(&bytes[..], b"rgb");
assert_eq!(i.unwrap(), 5);
let i = find(&bytes[..], b"ab");
assert_eq!(i.unwrap(), 0);
... | rust_cleaned_test_functions.jsonl/41853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
368,
341,
286,
1077,
5820,
25,
44590,
84,
23,
26,
220,
16,
18,
60,
284,
293,
1,
13683,
580,
16509,
3435,
43870,
876,
286,
1077,
600,
284,
1477,
2099,
9651,
95874,
1125,
293,
1,
580,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_complete_msg_sequence() {
init_tracing();
let mut decoder = MongoProtocolDecoder::new();
let mut buf = Vec::new();
// Write the first message
let msg_buf = create_message("insert", "foo");
let hdr = create_header(1234, 5678, msg_buf.len());... | rust_cleaned_test_functions.jsonl/84747 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
27675,
6483,
23735,
368,
341,
286,
2930,
3547,
4527,
1428,
286,
1077,
5206,
24551,
284,
24415,
20689,
20732,
486,
931,
543,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
1428,
286,
442,
9645... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple() {
let (_td, repo) = repo_init().unwrap();
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
create_branch(repo_path, "test").unwrap();
assert_eq!(
get_branches_info(repo_path)
... | rust_cleaned_test_functions.jsonl/96504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
368,
341,
286,
1077,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
1005,
15454,
543,
286,
1077,
3704,
284,
15867,
3875,
1005,
3765,
1005,
15454,
543,
286,
1077,
15867,
2638,
284,
3704,
5357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_edge_with_weights_undirected() {
let mut g = MatrixGraph::new_undirected();
let a = g.add_node('a');
let b = g.add_node('b');
let c = g.add_node('c');
let d = g.add_node('d');
g.add_edge(a, b, "ab");
g.add_edge(a, a, "aa");
g.ad... | rust_cleaned_test_functions.jsonl/81961 | {
"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,
2891,
17932,
6615,
21114,
62,
1241,
74612,
368,
341,
286,
1077,
5206,
342,
284,
11631,
11212,
486,
931,
62,
1241,
74612,
543,
286,
1077,
264,
284,
342,
1364,
5084,
492,
64,
1157,
286,
1077,
293,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_element_to_octets() {
let x = Bignum::new_from_slice(&TEST_PWE_X[..]).unwrap();
let y = Bignum::new_from_slice(&TEST_PWE_Y[..]).unwrap();
let group = make_group();
let element = EcPoint::new_from_affine_coords(x, y, &group.group, &group.bn_ctx).unwrap();
... | rust_cleaned_test_functions.jsonl/48495 | {
"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,
7894,
2346,
70135,
1415,
368,
341,
286,
1077,
856,
284,
425,
92160,
486,
931,
5673,
26488,
2099,
10033,
1088,
12457,
6859,
95874,
10697,
15454,
543,
286,
1077,
379,
284,
425,
92160,
486,
931,
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,
1,
1,
1,
1... | 1 |
#[test]
fn test_fixed_size_binary_null() {
let a = create_fixed_size_binary_array(&[Some(b"hello"), None, Some(b"world")]);
let b = create_fixed_size_binary_array(&[Some(b"hello"), None, Some(b"world")]);
test_equal(&a, &b, true);
let b = create_fixed_size_binary_array(&[Some(b"... | rust_cleaned_test_functions.jsonl/24220 | {
"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,
37839,
2368,
31761,
15162,
368,
341,
286,
1077,
264,
284,
1855,
37839,
2368,
31761,
3858,
2099,
58,
8373,
1883,
1,
14990,
3975,
2240,
11,
4329,
1883,
1,
14615,
899,
2558,
286,
1077,
293,
284,
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_indexed_i64() {
let mut schema_builder = Schema::builder();
let value_field = schema_builder.add_i64_field("value", INDEXED);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let mut index_writer = index.writer_with_num_threa... | rust_cleaned_test_functions.jsonl/41947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
291,
5318,
21,
19,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
897,
5013,
284,
10802,
28532,
1364,
5318,
21,
19,
5013,
445,
957,
497,
39300,
1479,
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_too_many_requested() {
let tmp_dir = TempPath::new();
let db = LibraDB::new_for_test(&tmp_dir);
assert!(db.get_transactions(0, 1001 /* limit */, 0, true).is_err());
} | rust_cleaned_test_functions.jsonl/7143 | {
"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,
2346,
78,
22101,
72709,
368,
341,
262,
1077,
4174,
4334,
284,
19944,
1820,
486,
931,
543,
262,
1077,
2927,
284,
5688,
956,
3506,
486,
931,
5478,
4452,
2099,
5173,
4334,
626,
262,
2060,
10297,
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_convert_monotype_int() {
let b = ast::BaseNode::default();
let monotype = ast::MonoType::Basic(ast::NamedType {
base: b.clone(),
name: ast::Identifier {
base: b.clone(),
name: "int".to_string(),
},
});
... | rust_cleaned_test_functions.jsonl/30460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
20737,
4156,
4042,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
1615,
4156,
284,
11763,
486,
58946,
929,
486,
15944,
52574,
486,
15810,
929,
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_majority() {
let (_, peer) = new_cluster(1).into_iter().next().unwrap();
assert_eq!(1, peer.majority());
let (_, peer) = new_cluster(2).into_iter().next().unwrap();
assert_eq!(2, peer.majority());
let (_, peer) = new_cluster(3).into_iter().next().unwrap(... | rust_cleaned_test_functions.jsonl/117882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47916,
487,
368,
341,
286,
1077,
39464,
14397,
8,
284,
501,
28441,
7,
16,
568,
18122,
11723,
1005,
3600,
1005,
15454,
543,
286,
2060,
10714,
10297,
16,
11,
14397,
75412,
487,
5231,
286,
1077,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_graph_query() {
let data_dir = "data/large_data";
let root_dir = "data/large_data";
let schema_file = "data/schema.json";
let mut loader =
GraphLoader::<DefaultId, u32>::new(data_dir, root_dir, schema_file, 20, 0, 1);
// load whole graph
... | rust_cleaned_test_functions.jsonl/22816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14738,
5738,
368,
341,
286,
1077,
821,
4334,
284,
330,
691,
13328,
2744,
1769,
876,
286,
1077,
3704,
4334,
284,
330,
691,
13328,
2744,
1769,
876,
286,
1077,
10802,
2458,
284,
330,
691,
61142,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_dictionary_overflow() {
let key_builder = PrimitiveBuilder::<UInt8Type>::new(257);
let value_builder = PrimitiveBuilder::<UInt32Type>::new(257);
let mut builder = PrimitiveDictionaryBuilder::new(key_builder, value_builder);
// 256 unique keys.
fo... | rust_cleaned_test_functions.jsonl/31004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
42605,
79073,
368,
341,
286,
1077,
1376,
28532,
284,
51460,
3297,
27638,
18777,
23,
929,
6831,
931,
7,
17,
20,
22,
317,
286,
1077,
897,
28532,
284,
51460,
3297,
27638,
18777,
18,
17,
929,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_iterator() {
let first_tag = SyntaxNode::Tag(Tag {
name: "h2".to_string(),
self_closed: false,
attributes: vec![],
children: vec![],
});
let child_plain = SyntaxNode::Plain(Plain {
plain: "hello world... | rust_cleaned_test_functions.jsonl/62787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78894,
5084,
13491,
368,
341,
286,
1077,
1156,
9372,
284,
32117,
1955,
486,
5668,
69161,
341,
310,
829,
25,
330,
71,
17,
3263,
983,
3904,
3148,
310,
656,
44697,
25,
895,
345,
310,
8201,
25,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exception() {
let code = String::from(system_header) + "\
; write 0x01, trigger trap, write 0x02, terminate
(j RESET_HANDLER)
(nop)
(nop)
(nop)
(: TRAP_VECTOR)
; write 0x02
(li t1 0x02)
(sw t3 t1 0)
; done
(lui t4 end_pc_target)
(addi t4 t4 end_pc_target)
(jalr zero t4 0)
(: RESET_HANDLER)... | rust_cleaned_test_functions.jsonl/125912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17499,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
46006,
8757,
8,
488,
93317,
26,
3270,
220,
15,
87,
15,
16,
11,
8183,
22862,
11,
3270,
220,
15,
87,
15,
17,
11,
29654,
198,
3325,
53215,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flags_from_vec_10() {
// notice that flags passed after double dash will not
// be parsed to DenoFlags but instead forwarded to
// script args as Deno.args
let (flags, subcommand, argv) = flags_from_vec(svec![
"deno",
"run",
"--allow-write",
"script.ts",
... | rust_cleaned_test_functions.jsonl/112839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14130,
5673,
13251,
62,
16,
15,
368,
341,
262,
442,
5293,
429,
8042,
5823,
1283,
1990,
23911,
686,
537,
198,
262,
442,
387,
15676,
311,
9774,
78,
9195,
714,
4518,
52246,
311,
198,
262,
442,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compare() {
assert!(Angle::<f32>::n_pi(1.5) > Angle::<f32>::n_pi(0.5));
assert!(Angle::<f32>::n_pi(1.0) < Angle::<f32>::n_pi(2.0));
assert!(Angle::<f32>::degrees(90.0) > Angle::<f32>::degrees(45.0));
assert!(Angle::<f32>::degrees(30.0) < Angle::<f32>::degrees(60.0... | rust_cleaned_test_functions.jsonl/7223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
368,
341,
286,
2060,
10297,
15939,
27638,
69,
18,
17,
6831,
77,
47771,
7,
16,
13,
20,
8,
861,
36237,
27638,
69,
18,
17,
6831,
77,
47771,
7,
15,
13,
20,
1106,
286,
2060,
10297,
15939,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitv_set_difference() {
let mut a = BitvSet::new();
let mut b = BitvSet::new();
assert!(a.insert(1));
assert!(a.insert(3));
assert!(a.insert(5));
assert!(a.insert(200));
assert!(a.insert(500));
assert!(b.insert(3));
assert... | rust_cleaned_test_functions.jsonl/12157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
85,
2602,
47525,
368,
341,
286,
1077,
5206,
264,
284,
6495,
85,
1649,
486,
931,
543,
286,
1077,
5206,
293,
284,
6495,
85,
1649,
486,
931,
1428,
286,
2060,
10297,
64,
7030,
7,
16,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_metadata_compressor_none() {
let temp = TempFile::new().unwrap();
let mut w = OpenOptions::new()
.read(true)
.write(true)
.open(temp.as_path())
.unwrap();
let r = OpenOptions::new()
.read(true)
.... | rust_cleaned_test_functions.jsonl/37904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1044
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
22220,
2965,
56220,
31488,
368,
341,
286,
1077,
2730,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
289,
284,
5264,
3798,
486,
931,
741,
310,
659,
878,
3715,
340,
310,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_append_permutations() {
fn construct_vec_deque(
push_back: usize,
pop_back: usize,
push_front: usize,
pop_front: usize,
) -> VecDeque<usize> {
let mut out = VecDeque::new();
for a in 0..push_back {
out.push_back(a);
}
... | rust_cleaned_test_functions.jsonl/124917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1892
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
31961,
82141,
368,
341,
262,
5168,
9245,
13251,
2259,
591,
1006,
286,
4484,
3895,
25,
22301,
345,
286,
2420,
3895,
25,
22301,
345,
286,
4484,
22926,
25,
22301,
345,
286,
2420,
22926,
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... | 5 |
#[test]
fn test_header_encode_correctness() {
use serialize;
let correct = [
0x24, 0x0, 0x0, 0x34, 0x29, 0xb9, 0x36, 0xa9, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x2, 0x0, 0x0, 0x0,
];
let header: Header = Hea... | rust_cleaned_test_functions.jsonl/52296 | {
"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,
8757,
11224,
31550,
2090,
368,
341,
220,
990,
24235,
401,
220,
1077,
4396,
284,
2278,
262,
220,
15,
87,
17,
19,
11,
220,
15,
87,
15,
11,
220,
15,
87,
15,
11,
220,
15,
87,
18,
19,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prepare_job() {
let dir = TempDir::new("test_import_prepare_job").unwrap();
let uuid = Uuid::new_v4();
let db_cfg = DbConfig::default();
let security_cfg = SecurityConfig::default();
let engine = Arc::new(Engine::new(dir.path(), uuid, db_cfg, security_cfg)... | rust_cleaned_test_functions.jsonl/101455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
20298,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
1944,
18434,
47460,
20298,
1827,
15454,
543,
286,
1077,
16040,
284,
547,
2423,
486,
931,
2273,
19,
543,
286,
1077,
2927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_seckey_from_bytes_zero() {
// Zero is not a valid exponent for a secret key.
let bytes = [0; 32];
let sk = SecKey::from_bytes(&bytes);
assert!(sk.is_none());
} | rust_cleaned_test_functions.jsonl/81720 | {
"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,
3453,
377,
1195,
5673,
12524,
19359,
368,
341,
286,
442,
18306,
374,
537,
264,
2697,
27690,
369,
264,
6234,
1376,
624,
286,
1077,
5820,
284,
508,
15,
26,
220,
18,
17,
935,
286,
1077,
1901,
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 |
#[test]
fn test_pool_subaccount() {
let sub_account: AccountId32 =
pool_sub_account(1, &WorkerPublicKey::from_raw([0u8; 32]));
let expected = AccountId32::new(hex!(
"73706d2f02ab4d74c86ec3b3997a4fadf33e55e8279650c8539ea67e053c02dc"
));
assert_eq!(sub_account, expected, "Incorrect sub account... | rust_cleaned_test_functions.jsonl/60457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15709,
5228,
4608,
368,
341,
298,
10217,
1186,
13500,
25,
8615,
764,
18,
17,
4035,
571,
85273,
5228,
13500,
7,
16,
11,
609,
21936,
61822,
486,
1499,
16067,
2561,
15,
84,
23,
26,
220,
18,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_maybe_prompted_string_confirm_mismatch() {
let (ctx, is, os) = create_normal_test_context("foo\nbar\nfoo\nfoo\n");
let mps = MaybePromptedString::new(
/*provided=*/ None,
is,
os,
TEST_PROMPT,
/*is_sensitive=*/ false,
/*confirm=*/ true,
... | rust_cleaned_test_functions.jsonl/110987 | {
"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,
717,
49791,
61421,
291,
3904,
23800,
717,
24976,
368,
341,
262,
1077,
320,
3773,
11,
374,
11,
2643,
8,
284,
1855,
13973,
4452,
8467,
445,
7975,
1699,
2257,
1699,
7975,
1699,
7975,
1699,
797,
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_calculate_fee_compute_units() {
let fee_structure = FeeStructure::default();
let max_fee = fee_structure.compute_fee_bins.last().unwrap().fee;
let lamports_per_signature = fee_structure.lamports_per_signature;
let message =
SanitizedMessage:... | rust_cleaned_test_functions.jsonl/71095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
34305,
57028,
28345,
368,
341,
286,
1077,
11060,
38283,
284,
40458,
22952,
486,
2258,
543,
286,
1077,
1932,
34305,
284,
11060,
38283,
35347,
34305,
44912,
9110,
1005,
15454,
1005,
30017,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_non_loader_key() {
let key0 = Pubkey::new_unique();
let key1 = Pubkey::new_unique();
let loader2 = Pubkey::new_unique();
let instructions = vec![CompiledInstruction::new(2, &(), vec![0, 1])];
let message = Message::new_with_compiled_instructions(
... | rust_cleaned_test_functions.jsonl/116736 | {
"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,
6892,
21637,
22139,
3097,
368,
341,
286,
1077,
1376,
15,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
1376,
16,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
16047,
17,
284,
22611,
792,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gamepad_disconnected_event() {
let event: GamepadDisconnectedEvent = js!(
return new GamepadEvent("gamepaddisconnected");
).try_into().unwrap();
assert_eq!(event.event_type(), "gamepaddisconnected");
} | rust_cleaned_test_functions.jsonl/83266 | {
"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,
18547,
13242,
9932,
15288,
6748,
368,
1476,
286,
1077,
1538,
25,
4050,
13242,
77021,
1556,
284,
6994,
33673,
310,
470,
501,
4050,
13242,
1556,
445,
5804,
79,
718,
285,
15288,
797,
286,
7457,
1539,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_implicit_tag() {
for i in 0..16 {
assert!(is_implicit_tag(i as u64))
}
assert!(!is_implicit_tag(16))
} | rust_cleaned_test_functions.jsonl/25678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62,
30940,
9372,
368,
341,
262,
369,
600,
304,
220,
15,
496,
16,
21,
341,
286,
2060,
10297,
285,
62,
30940,
9372,
1956,
438,
575,
21,
19,
1171,
262,
456,
262,
2060,
0,
3471,
285,
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
] | 2 |
#[test]
fn test_initialize_vote_account() {
let vote_account_pubkey = solana_sdk::pubkey::new_rand();
let vote_account = AccountSharedData::new_ref(100, VoteState::size_of(), &id());
let vote_account = KeyedAccount::new(&vote_account_pubkey, false, &vote_account);
let node_pubke... | rust_cleaned_test_functions.jsonl/75705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
54360,
13500,
368,
341,
286,
1077,
6910,
13500,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
6910,
13500,
284,
8615,
16997,
1043,
486,
931,
7793,
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_display_indent_schema() {
let plan = display_plan();
let expected = "Projection: #employee_csv.id [id:Int32]\
\n Filter: #employee_csv.state = Utf8(\"CO\") [id:Int32, state:Utf8]\
\n TableScan: employee_csv projection=Some([0, ... | rust_cleaned_test_functions.jsonl/29894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
69045,
25371,
368,
341,
286,
1077,
3119,
284,
3037,
26564,
1428,
286,
1077,
3601,
284,
330,
46321,
25,
671,
12946,
14020,
1764,
508,
307,
43979,
18,
17,
60,
5661,
664,
1124,
77,
220,
1233... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_up_to_date() {
let previous_ents = vec![new_entry(1, 1), new_entry(2, 2), new_entry(3, 3)];
let store = MemStorage::new();
let mut raft_log = RaftLog::new(store, default_logger());
raft_log.append(&previous_ents);
let tests = vec![
... | rust_cleaned_test_functions.jsonl/48406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 607
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8237,
2346,
4164,
368,
341,
286,
1077,
3681,
62,
805,
284,
7486,
20703,
931,
9078,
7,
16,
11,
220,
16,
701,
501,
9078,
7,
17,
11,
220,
17,
701,
501,
9078,
7,
18,
11,
220,
18,
12587,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cache_manipulation() -> anyhow::Result<()> {
env_logger::try_init().ok();
let tmp_dir = TempDir::new("AS_CACHE_TEST")?;
let test_data_dir_orig = Path::new("../../test_data");
let test_data_dir = tmp_dir.path().join("test_data");
copy(&test_data_dir_orig, t... | rust_cleaned_test_functions.jsonl/13250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 646
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11529,
17062,
573,
2914,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
6105,
27413,
486,
1539,
6137,
1005,
562,
543,
286,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
445,
1911,
29138,
11641,
899... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_sst() {
let mut meta = SstMeta::default();
meta.set_uuid(Uuid::new_v4().as_bytes().to_vec());
let importer_dir = tempfile::tempdir().unwrap();
let importer = SSTImporter::new(&importer_dir, None).unwrap();
let db_path = importer_dir.path().join("db"... | rust_cleaned_test_functions.jsonl/4972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 694
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
643,
267,
368,
341,
286,
1077,
5206,
8823,
284,
328,
267,
12175,
486,
2258,
543,
286,
8823,
980,
25540,
12317,
2423,
486,
931,
2273,
19,
1005,
300,
12524,
1005,
983,
13251,
5231,
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_optimize_switch3() {
test(
concat!(
"switch (1) {",
" case 1:",
" case 2:",
" case 3: {",
" break;",
" }",
" case 4:",
" case 5:",
" case 6:",
" default:... | rust_cleaned_test_functions.jsonl/395 | {
"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,
15032,
11853,
27652,
18,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
330,
17338,
320,
16,
8,
314,
756,
310,
330,
220,
1142,
220,
16,
55120,
310,
330,
220,
1142,
220,
17,
55120,
310,
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_compile_failure() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("jj")?;
let assert = cmd.arg("}").assert();
assert.failure().code(3).stdout("");
Ok(())
} | rust_cleaned_test_functions.jsonl/43235 | {
"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,
74170,
43618,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
445,
38811,
899,
37445,
262,
1077,
2060,
284,
5439,
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
] | 2 |
#[test]
fn test_bank_forks_new_from_banks() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let bank = Arc::new(Bank::new(&genesis_config));
let child_bank = Arc::new(Bank::new_from_parent(&bank, &Pubkey::default(), 1));
let bank_forks = BankForks... | rust_cleaned_test_functions.jsonl/30576 | {
"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,
35733,
761,
73302,
5921,
5673,
880,
4039,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
607... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_x2_plus_y2() {
let mut register = GearRegister::init();
let squared = squared_gear_template(&mut register);
let mut compound = GearCompound::new(&mut register, 1, 1);
let squared_x = register.instantiate(squared);
let squared_y = register.instantiate(squa... | rust_cleaned_test_functions.jsonl/98618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 741
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3212,
17,
28043,
4178,
17,
368,
341,
286,
1077,
5206,
4161,
284,
27503,
8690,
486,
2327,
543,
286,
1077,
52263,
284,
52263,
1889,
682,
8693,
2099,
6984,
4161,
626,
286,
1077,
5206,
23628,
284,
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_dir_type() {
let tmp_dir = tempdir().expect("failed to create temp dir");
let meta =
Meta::from_path(&tmp_dir.path().to_path_buf()).expect("failed to get tempdir path");
let metadata = tmp_dir.path().metadata().expect("failed to get metas");
let color... | rust_cleaned_test_functions.jsonl/63557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4334,
1819,
368,
341,
286,
1077,
4174,
4334,
284,
2730,
3741,
1005,
17119,
445,
16091,
311,
1855,
2730,
5419,
797,
286,
1077,
8823,
4035,
310,
15819,
486,
1499,
2638,
2099,
5173,
4334,
3875,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_program_upgradeable_locks() {
fn setup_program_upgradeable_locks(
payer_keypair: &Keypair,
buffer_keypair: &Keypair,
program_keypair: &Keypair,
) -> (Arc<Bank>, Transaction, Transaction) {
solana_logger::setup();
let GenesisConfigInfo {
... | rust_cleaned_test_functions.jsonl/8842 | {
"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,
25096,
67794,
480,
9818,
82,
368,
341,
262,
5168,
6505,
25096,
67794,
480,
9818,
82,
1006,
286,
69275,
3097,
12670,
25,
609,
6608,
1082,
1310,
345,
286,
4147,
3097,
12670,
25,
609,
6608,
1082,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reader_error() {
let empty: &[u8] = &[];
let res = create_reader(1024, empty);
assert!(res.is_err());
if let Err(err) = res {
assert_eq!(err, PcapError::Eof);
} else {
unreachable!();
}
} | rust_cleaned_test_functions.jsonl/7712 | {
"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,
15124,
22306,
4096,
368,
341,
262,
1077,
4287,
25,
44590,
84,
23,
60,
284,
609,
15078,
262,
1077,
592,
284,
1855,
22306,
7,
16,
15,
17,
19,
11,
4287,
317,
262,
2060,
10297,
416,
2079,
9266,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_deployment_synced() {
let block_0 = BlockPtr::try_from((
"bd34884280958002c51d3f7b5f853e6febeba33de0f40d15b0363006533c924f",
0,
))
.unwrap();
let block_1 = BlockPtr::try_from((
"8511fa04b64657581e3f00e14543c1d522d5d7e771b54aa3060b662ade47da13",
... | rust_cleaned_test_functions.jsonl/2775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
2259,
52799,
23008,
291,
368,
341,
262,
1077,
2504,
62,
15,
284,
8362,
5348,
486,
1539,
5673,
94702,
286,
330,
8940,
18,
19,
23,
23,
19,
17,
23,
15,
24,
20,
23,
15,
15,
17,
66,
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_with_capacity() {
let v: SmallVec<[u8; 3]> = SmallVec::with_capacity(1);
assert!(v.is_empty());
assert!(!v.spilled());
assert_eq!(v.capacity(), 3);
let v: SmallVec<[u8; 3]> = SmallVec::with_capacity(10);
assert!(v.is_empty());
assert!(v.sp... | rust_cleaned_test_functions.jsonl/88145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
35603,
368,
341,
286,
1077,
348,
25,
14994,
10050,
66746,
84,
23,
26,
220,
18,
25669,
284,
14994,
10050,
486,
4197,
35603,
7,
16,
317,
286,
2060,
10297,
85,
2079,
15124,
1423,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_ldrh() {
match decode_16(0x8f00) {
Instruction::LDRH_imm { params, thumb32 } => {
assert!(params.rn == Reg::R0);
assert!(params.rt == Reg::R0);
assert!(params.imm32 == 0x38);
assert!(params.index);
assert!(params... | rust_cleaned_test_functions.jsonl/64775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
50573,
40096,
368,
341,
1066,
262,
2432,
16895,
62,
16,
21,
7,
15,
87,
23,
69,
15,
15,
8,
341,
286,
29051,
486,
43,
7687,
39,
71370,
314,
3628,
11,
24050,
18,
17,
335,
589,
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... | 2 |
#[test]
fn test_occur_leaf() {
let ((occur, ast), _) = super::occur_leaf().parse("+abc").unwrap();
assert_eq!(occur, Some(Occur::Must));
assert_eq!(format!("{:?}", ast), "\"abc\"");
} | rust_cleaned_test_functions.jsonl/64409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49648,
2352,
38909,
368,
341,
286,
1077,
1781,
509,
2352,
11,
11763,
701,
27439,
284,
2256,
486,
509,
2352,
38909,
1005,
6400,
34973,
13683,
1827,
15454,
543,
286,
2060,
10714,
10297,
509,
2352,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_gen_cluster_nodes() {
let m = HashMap::new();
let slot_ranges = gen_testing_slot_ranges("127.0.0.1:5299");
let output = gen_cluster_nodes_helper(
&ClusterName::try_from("testcluster").unwrap(),
233,
&slot_ranges,
&m,
... | rust_cleaned_test_functions.jsonl/79228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
28441,
14896,
368,
341,
286,
1077,
296,
284,
10528,
486,
931,
543,
286,
1077,
9446,
58748,
284,
4081,
70962,
27563,
58748,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
20,
17,
24,
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_json_option_statement() {
let n = OptionStmt {
base: BaseNode::default(),
assignment: Assignment::Variable(Box::new(VariableAssgn {
base: BaseNode::default(),
id: Identifier {
base: BaseNode::default(),
name: "task".to_s... | rust_cleaned_test_functions.jsonl/40420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
9672,
37404,
368,
341,
262,
1077,
308,
284,
6959,
31063,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
16319,
25,
34427,
486,
7827,
67758,
486,
931,
7,
7827,
5615,
4905,
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_drop() {
let local = ThreadLocal::new();
struct Dropped(Arc<AtomicUsize>);
impl Drop for Dropped {
fn drop(&mut self) {
self.0.fetch_add(1, Relaxed);
}
}
let dropped = Arc::new(AtomicUsize::new(0));
local.ge... | rust_cleaned_test_functions.jsonl/47815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
368,
341,
286,
1077,
2205,
284,
8752,
7319,
486,
931,
543,
286,
2036,
422,
41716,
4346,
1287,
27,
65857,
52,
2141,
42013,
286,
11605,
15733,
369,
422,
41716,
341,
310,
5168,
5943,
2099,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_head() {
let mut ll = LinkedList::<u8>::new();
let node = ll.push_head(11);
assert_node!(ll, node, ONLY, 11, 1);
//now push a second head
let second = ll.push_head(12);
assert_node!(ll, second, FIRST, 12, 2);
assert_node!(ll, node, LAS... | rust_cleaned_test_functions.jsonl/59882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
13138,
368,
341,
286,
1077,
5206,
9323,
284,
22917,
27638,
84,
23,
6831,
931,
543,
286,
1077,
2436,
284,
9323,
2552,
13138,
7,
16,
16,
317,
286,
2060,
5084,
10297,
654,
11,
2436,
11,
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_minute() {
assert_eq!(minute("minutes"), Ok(("", "minutes")));
assert_eq!(minute("minute"), Ok(("", "minute")));
assert_eq!(minute("mins"), Ok(("", "mins")));
assert_eq!(minute("min"), Ok(("", "min")));
} | rust_cleaned_test_functions.jsonl/71143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76944,
368,
341,
310,
2060,
10714,
10297,
42557,
445,
37037,
3975,
7622,
7,
19814,
330,
37037,
17621,
310,
2060,
10714,
10297,
42557,
445,
42557,
3975,
7622,
7,
19814,
330,
42557,
17621,
310,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_0232() {
let mut queue = MyQueue::new();
queue.push(1);
queue.push(2);
assert_eq!(1, queue.peek());
assert_eq!(1, queue.pop());
assert!(!queue.empty());
assert_eq!(2, queue.peek());
assert_eq!(2, queue.pop());
assert!(queue.... | rust_cleaned_test_functions.jsonl/16467 | {
"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,
62,
15,
17,
18,
17,
368,
341,
286,
1077,
5206,
7177,
284,
3017,
7554,
486,
931,
543,
286,
7177,
2552,
7,
16,
317,
286,
7177,
2552,
7,
17,
317,
286,
2060,
10714,
10297,
16,
11,
7177,
41249,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_guild_widget() {
let route = Route::UpdateGuildWidget { guild_id: GUILD_ID };
assert_eq!(
route.to_string(),
format!("guilds/{guild_id}/widget", guild_id = GUILD_ID)
);
} | rust_cleaned_test_functions.jsonl/119943 | {
"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,
8882,
1889,
1498,
13585,
368,
341,
286,
1077,
6021,
284,
9572,
486,
4289,
72574,
4548,
314,
26411,
842,
25,
479,
18023,
3450,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
310,
3561,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_append_raw() {
let mut headers = Headers::new();
headers.set(ContentLength(10));
headers.append_raw("content-LENGTH", b"20".to_vec());
assert_eq!(headers.get_raw("Content-length").unwrap(), &[b"10".to_vec(), b"20".to_vec()][..]);
headers.append_raw("x-foo"... | rust_cleaned_test_functions.jsonl/108103 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
16067,
368,
341,
286,
1077,
5206,
7102,
284,
21426,
486,
931,
543,
286,
7102,
980,
79352,
4373,
7,
16,
15,
1106,
286,
7102,
2057,
16067,
445,
1796,
12,
65981,
497,
293,
1,
17,
15,
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_pub_sub_2_clients() {
env_logger::init();
let server = NatsTestServer::build().spawn();
let conn1 = nats - aflowt::connect(&server.address().to_string()).unwrap();
let conn2 = nats - aflowt::connect(&server.address().to_string()).unwrap();
let sub = conn1.subscribe("*").unw... | rust_cleaned_test_functions.jsonl/102469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
5228,
62,
17,
56899,
368,
341,
262,
6105,
27413,
486,
2327,
543,
262,
1077,
3538,
284,
451,
1862,
2271,
5475,
486,
5834,
1005,
46087,
1428,
262,
1077,
4534,
16,
284,
308,
1862,
481,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lowest_index_const() {
for i in 1..255 {
let input = (i as ValueType + 56.0) / 16.3251;
let mut method = LowestIndex::new(i, &input).unwrap();
let output = method.next(&input);
test_const(&mut method, &input, &output);
}
} | rust_cleaned_test_functions.jsonl/15553 | {
"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,
23767,
477,
3560,
13610,
368,
341,
197,
2023,
600,
304,
220,
16,
496,
17,
20,
20,
341,
298,
10217,
1946,
284,
320,
72,
438,
55545,
488,
220,
20,
21,
13,
15,
8,
608,
220,
16,
21,
13,
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_type_inference() {
expr_type!(expr!(Int 12), types!(Int));
expr_type!(expr!(Let n [Int 12] [Var n]), types!(Int));
expr_type!(
expr!(Let f [Abs x [Var x]] [Var f]),
types!(Fun, types!(Var, a1), types!(Var, a1))
);
expr_type!(
... | rust_cleaned_test_functions.jsonl/125817 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
1243,
2202,
368,
341,
286,
15169,
1819,
10297,
9413,
10297,
1072,
220,
16,
17,
701,
4494,
10297,
1072,
3237,
286,
15169,
1819,
10297,
9413,
10297,
10061,
308,
508,
1072,
220,
16,
17,
60,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_row_is_empty() {
let table = Table::find_first(TABLE_TD).unwrap();
assert_eq!(
vec![false],
table.iter().map(|r| r.is_empty()).collect::<Vec<_>>()
);
let table = Table::find_first(TABLE_COMPLEX).unwrap();
assert_eq!(
ve... | rust_cleaned_test_functions.jsonl/47590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
6892,
15124,
368,
341,
286,
1077,
1965,
284,
6633,
486,
3903,
12978,
83006,
95862,
568,
15454,
543,
286,
2060,
10714,
33673,
310,
7486,
20703,
3849,
1259,
310,
1965,
19471,
1005,
2186,
22428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_with_dups() {
let program_id0 = Pubkey::new_unique();
let program_id1 = Pubkey::new_unique();
let program_id2 = Pubkey::new_unique();
let program_id3 = Pubkey::new_unique();
let id0 = Pubkey::new_unique();
let id1 = Pubkey::new_unique();
... | rust_cleaned_test_functions.jsonl/52061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
6615,
814,
8602,
368,
341,
286,
1077,
2025,
842,
15,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
2025,
842,
16,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
2025,
842,
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_partial_order() {
// Small test
assert_order(&[1], &[1], Some(Ordering::Equal));
assert_order(&[1], &[2], Some(Ordering::Less));
assert_order(&[2], &[1], Some(Ordering::Greater));
assert_order(&[1], &[1, 2], Some(Ordering::Less));
assert_order(&[2]... | rust_cleaned_test_functions.jsonl/36463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 916
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
7869,
368,
341,
286,
442,
14994,
1273,
198,
286,
2060,
7869,
2099,
58,
16,
1125,
44590,
16,
1125,
4329,
39692,
287,
486,
2993,
1106,
286,
2060,
7869,
2099,
58,
16,
1125,
44590,
17,
1125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_shader_macro() {
let map = load_shaders!(vec!["foo", "bar"], Test);
assert_eq!(&map["foo"].key, "foo");
assert_eq!(&map["bar"].key, "bar");
} | rust_cleaned_test_functions.jsonl/91740 | {
"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,
12411,
35485,
58810,
368,
341,
286,
1077,
2415,
284,
2795,
3712,
6393,
10297,
4083,
0,
1183,
7975,
497,
330,
2257,
7914,
3393,
317,
286,
2060,
10714,
0,
2099,
2186,
1183,
7975,
5521,
792,
11,
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 |
#[test]
fn test_payload_incorrect_deserialize() {
// Payload from old anchoring transaction
let payload_script = Script::from_hex(
"6a2a0128f0b31a00000000008fb4879f1b7f332be1aee197f99f\
7333c915570c6ad5c6eed641f33fe0199129",
);
assert_eq!(Payload::from_sc... | rust_cleaned_test_functions.jsonl/119539 | {
"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,
32813,
1243,
19928,
15768,
9050,
368,
341,
286,
442,
52916,
504,
2310,
33230,
5503,
7745,
198,
286,
1077,
7729,
14660,
284,
13710,
486,
1499,
32655,
1006,
310,
330,
21,
64,
17,
64,
15,
16,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_file_to_string() -> Result<(), String> {
let buffer = read_file_to_string("test.md");
assert_eq!(buffer, "This file is just for test purposes");
Ok(())
} | rust_cleaned_test_functions.jsonl/116430 | {
"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,
6443,
2458,
2346,
3904,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
4147,
284,
1349,
2458,
2346,
3904,
445,
1944,
21324,
3071,
286,
2060,
10714,
10297,
7573,
11,
330,
1986,
1034,
374,
1101,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_storage_cache_update() {
let ents = vec![new_entry(3, 3), new_entry(4, 4), new_entry(5, 5)];
let td = Builder::new().prefix("tikv-store-test").tempdir().unwrap();
let worker = Worker::new("snap-manager");
let sched = worker.scheduler();
let mut store = new... | rust_cleaned_test_functions.jsonl/3773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1496
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
11529,
8882,
368,
341,
286,
1077,
36852,
284,
7486,
20703,
931,
9078,
7,
18,
11,
220,
18,
701,
501,
9078,
7,
19,
11,
220,
19,
701,
501,
9078,
7,
20,
11,
220,
20,
12587,
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... | 1 |
#[test]
fn test_intersects_with() {
let mut file1 = new_file("9-19\n");
let mut set1 = parse_cpus_from_sysfile(&mut file1).expect("Failed to file");
assert_eq!(set1, (9..=19).collect());
let mut file2 = new_file("16-24\n");
let set2 = parse_cpus_from_sysfile(&mut file2).... | rust_cleaned_test_functions.jsonl/109214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15318,
54429,
6615,
368,
341,
286,
1077,
5206,
1034,
16,
284,
501,
2458,
445,
24,
12,
16,
24,
1699,
797,
286,
1077,
5206,
738,
16,
284,
4715,
90673,
5673,
20344,
1192,
2099,
6984,
1034,
16,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_columns() {
// the doctest
let text = [
"I am aligned to the left.",
"I am aligned to the right and take two times more space.",
];
let layout = Layout::from_pattern("<- >--").unwrap();
let expected_none = String::from("I am I am aligned to the\naligne... | rust_cleaned_test_functions.jsonl/42143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22590,
368,
341,
262,
442,
279,
653,
67880,
198,
262,
1077,
1467,
284,
2278,
286,
330,
40,
1079,
26118,
311,
279,
2115,
10346,
286,
330,
40,
1079,
26118,
311,
279,
1290,
323,
1896,
1378,
3039,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negative_rand_range() {
let mut rng = task_rng();
let l = FromPrimitive::from_uint(2352).unwrap();
let u = FromPrimitive::from_uint(3513).unwrap();
// Switching u and l should fail:
let _n: BigUint = rng.gen_biguint_range(&u, &l);
} | rust_cleaned_test_functions.jsonl/96917 | {
"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,
53865,
33864,
9698,
368,
341,
286,
1077,
5206,
28422,
284,
3383,
66849,
543,
286,
1077,
326,
284,
5542,
33313,
486,
1499,
15807,
7,
17,
18,
20,
17,
568,
15454,
543,
286,
1077,
575,
284,
5542,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reverse() {
let mut ys = [1, 2, 3, 4, 5];
ys.mut_iter().reverse_();
assert!(ys == [5, 4, 3, 2, 1]);
} | rust_cleaned_test_functions.jsonl/33842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43277,
368,
341,
286,
1077,
5206,
31810,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
31810,
744,
332,
11723,
1005,
25903,
96060,
286,
2060,
10297,
1047,
621,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_append_and_delete() {
let mut read_buf: [u8; 1024] = [0; 1024];
let mut hash_function = DefaultHasher::new();
MAIN_KEY.hash(&mut hash_function);
let tickv =
AsyncTicKV::<FlashCtrl, 1024>::new(FlashCtrl::new(), &mut read_buf, 0x1000... | rust_cleaned_test_functions.jsonl/2690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
8378,
11353,
368,
341,
310,
1077,
5206,
1349,
10363,
25,
508,
84,
23,
26,
220,
16,
15,
17,
19,
60,
284,
508,
15,
26,
220,
16,
15,
17,
19,
935,
310,
1077,
5206,
5175,
9174,
284,
7899... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_section_property_default() {
let c = SectionProperty::new();
let b = c.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:sectPr><w:pgSz w:w="11906" w:h="16838" /><w:pgMar w:top="1985" w:right="1701" w:bottom="1701" w:left="1701" w:header="851... | rust_cleaned_test_functions.jsonl/31177 | {
"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,
16221,
16638,
9993,
368,
341,
286,
1077,
272,
284,
11113,
3052,
486,
931,
543,
286,
1077,
293,
284,
272,
13239,
543,
286,
2060,
10714,
33673,
310,
607,
486,
1499,
39453,
23,
2099,
65,
568,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_static_spendable_outputs_justice_tx_revoked_commitment_tx() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
//... | rust_cleaned_test_functions.jsonl/16904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 631
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
643,
3740,
480,
35189,
62,
38768,
17805,
38082,
10823,
36346,
478,
17805,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
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_load_initrd_no_memory() {
let gm = create_guest_mem_with_size(79);
let image = make_test_bin();
let res = load_initrd(&gm, &mut Cursor::new(&image));
assert!(res.is_err());
assert_eq!(
StartMicrovmError::InitrdLoad.to_string(),
res.... | rust_cleaned_test_functions.jsonl/4348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
6137,
6498,
6536,
19195,
368,
341,
286,
1077,
37879,
284,
1855,
62739,
12976,
6615,
2368,
7,
22,
24,
317,
286,
1077,
2168,
284,
1281,
4452,
21816,
543,
286,
1077,
592,
284,
2795,
6137,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_many_with_many_reads() {
let mut mmapped_buf = MMappedBuf {
data: [0; PAGE_SIZE * 2],
};
fake_mmap(&mut mmapped_buf);
let mut buf = PerfBuffer::open(1, PAGE_SIZE, 1).unwrap();
let next = write_sample(&mut mmapped_buf, 0, 0xCAFEBABEu32);
... | rust_cleaned_test_functions.jsonl/118764 | {
"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,
6443,
22101,
6615,
22101,
66628,
368,
341,
286,
1077,
5206,
9465,
5677,
10363,
284,
21665,
5677,
15064,
341,
310,
821,
25,
508,
15,
26,
25040,
4098,
353,
220,
17,
1259,
286,
2605,
286,
12418,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_erc20_approval_and_transfer_from() {
// Init virtual machine.
let mut builder = TestBuilder::default();
builder.run_genesis(&DEFAULT_GENESIS_CONFIG).commit();
transfer_motes(&mut builder, ACCOUNT_1, ACCOUNT_2, 100_000_000);
// Deploy token.
let init_balance = U512::from(... | rust_cleaned_test_functions.jsonl/116114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1068
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2962,
17,
15,
95613,
8378,
35403,
5673,
368,
341,
262,
442,
15690,
4108,
5662,
624,
262,
1077,
5206,
7363,
284,
3393,
3297,
486,
2258,
543,
262,
7363,
7634,
16322,
13774,
2099,
17285,
42362,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chunk5() {
let index = vec![
0_usize, 0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60,
63, 66, 69,
];
for i in 0..69 {
assert_eq!(find_chunk(&index, i), 1 + i / 3);
}
} | rust_cleaned_test_functions.jsonl/64638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
30539,
20,
368,
341,
262,
1077,
1922,
284,
7486,
90515,
286,
220,
15,
11306,
551,
11,
220,
15,
11,
220,
18,
11,
220,
21,
11,
220,
24,
11,
220,
16,
17,
11,
220,
16,
20,
11,
220,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_file_list() {
crate::test::init_logger();
let files = get_file_list(env::current_dir().unwrap());
assert!(files.is_ok());
assert!(!files.unwrap().is_empty());
let files = get_file_list(env::current_dir().unwrap().join("Cargo.toml")).unwrap();
... | rust_cleaned_test_functions.jsonl/21744 | {
"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,
3062,
2458,
2019,
368,
341,
286,
17717,
486,
1944,
486,
2327,
27413,
543,
286,
1077,
3542,
284,
633,
2458,
2019,
16978,
486,
3231,
4334,
1005,
15454,
1423,
286,
2060,
10297,
7198,
2079,
19817,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signed_int_as_signed_real() {
test_none_with_nothing(cast_signed_int_as_signed_real);
let cs: Vec<(i64, f64)> = vec![
(i64::MIN, i64::MIN as f64),
(0, 0f64),
(i64::MAX, i64::MAX as f64),
];
for (input, expect) in ... | rust_cleaned_test_functions.jsonl/1957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55617,
4042,
11898,
55617,
15266,
368,
341,
286,
1273,
31488,
6615,
6536,
1596,
1337,
559,
55617,
4042,
11898,
55617,
15266,
626,
286,
1077,
10532,
25,
11312,
28706,
72,
21,
19,
11,
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... | 2 |
#[test]
fn test_pop_schema_all_attributes() {
let mut conn = TestConn::default();
conn.sanitized_partition_map();
let t = r#"
[{
:db/id "e"
:db/ident :test/one
:db/valueType :db.type/string
:db/cardinality :db.c... | rust_cleaned_test_functions.jsonl/93664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
25371,
5705,
18240,
368,
341,
286,
1077,
5206,
4534,
284,
3393,
9701,
486,
2258,
543,
286,
4534,
514,
276,
83443,
43840,
5376,
1428,
286,
1077,
259,
284,
435,
2,
698,
310,
18396,
394,
549... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shared_buffer_2_errors() {
paychains_logger::setup();
let (sender, receiver) = unbounded();
let file = SimpleReader::new(receiver);
let shared_buffer = SharedBuffer::new(file);
let mut reader = SharedBufferReader::new(&shared_buffer);
let mut reade... | rust_cleaned_test_functions.jsonl/84069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20405,
7776,
62,
17,
20196,
368,
341,
286,
2291,
58358,
27413,
486,
15188,
543,
286,
1077,
320,
11644,
11,
13964,
8,
284,
650,
65686,
543,
286,
1077,
1034,
284,
8993,
5062,
486,
931,
78126,
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_deserialize_unknown_root_module() {
let value = toml::toml! {
[rust]
disabled = true
};
let deserializer = ValueDeserializer::new(&value);
let result = StarshipRootConfig::deserialize(deserializer);
assert!(result.is_ok())
} | rust_cleaned_test_functions.jsonl/67387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
57507,
12993,
10750,
368,
341,
286,
1077,
897,
284,
311,
1014,
486,
37401,
75,
0,
341,
310,
508,
35788,
921,
310,
8386,
284,
830,
198,
286,
2605,
286,
1077,
939,
41939,
284,
5162,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_genotype_field_values_with_float_values() -> io::Result<()> {
let data = [
0x15,
0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x80, 0x3f,
0x01, 0x00, 0x80, 0x7f, // None
];
let mut reader = &data[..];
let actual = re... | rust_cleaned_test_functions.jsonl/52816 | {
"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,
6443,
16322,
4156,
5013,
9146,
6615,
17586,
9146,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
87,
16,
20,
11,
715,
310,
220,
15,
87,
15,
15,
11,
220,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_module_doc_hidden() {
#[doc(hidden)]
#[pymodule]
fn my_module(_py: Python, _m: &PyModule) -> PyResult<()> {
Ok(())
}
Python::with_gil(|py| {
let m = pyo3::wrap_pymodule!(my_module)(py);
py_assert!(py, m, "m.__doc__ == ''");
})
} | rust_cleaned_test_functions.jsonl/120904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
18869,
26739,
368,
341,
262,
11506,
5236,
57214,
5563,
262,
11506,
79,
1600,
1756,
921,
262,
5168,
847,
10750,
2490,
3288,
25,
13027,
11,
716,
76,
25,
609,
13828,
3332,
8,
1464,
5355,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dey() {
let mut r = Register::new();
r.set_Y(0x02);
dey(&mut r);
assert_eq!(r.get_Y(), 0x01)
} | rust_cleaned_test_functions.jsonl/14209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
88,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
435,
980,
10626,
7,
15,
87,
15,
17,
317,
262,
409,
88,
2099,
6984,
435,
317,
262,
2060,
10714,
10297,
81,
670,
10626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_progress_resume_by_heartbeat_resp() {
setup_for_test();
let mut raft = new_test_raft(1, vec![1, 2], 5, 1, new_storage());
raft.become_candidate();
raft.become_leader();
raft.mut_prs().get_mut(2).unwrap().paused = true;
raft.step(new_message(1, 1, MessageType::MsgBeat, 0)... | rust_cleaned_test_functions.jsonl/107090 | {
"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,
27200,
58132,
3710,
62,
72471,
35160,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5206,
52455,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
20,
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_dsa_accessor() {
let dsa = Dsa::generate(2048).unwrap();
let pkey = PKey::from_dsa(dsa).unwrap();
pkey.dsa().unwrap();
assert_eq!(pkey.id(), Id::DSA);
assert!(pkey.rsa().is_err());
} | rust_cleaned_test_functions.jsonl/18716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
9081,
33901,
368,
341,
286,
1077,
294,
9081,
284,
422,
9081,
486,
19366,
7,
17,
15,
19,
23,
568,
15454,
543,
286,
1077,
281,
792,
284,
393,
1592,
486,
1499,
814,
9081,
1500,
9081,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sample_with_binxml_as_substitution_tokens_and_pi_target() {
// TODO: PI Target still cannot be parsed
test_full_sample(
sample_with_binxml_as_substitution_tokens_and_pi_target(),
335,
5,
)
} | rust_cleaned_test_functions.jsonl/64586 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
6615,
21816,
6455,
11898,
5228,
10446,
28838,
8378,
47771,
11123,
368,
341,
262,
442,
5343,
25,
22578,
13483,
2058,
4157,
387,
15676,
198,
262,
1273,
16372,
17491,
1006,
286,
6077,
6615,
2181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
assert_eq!(trim_length_left("👍foo", 3), "foo");
assert_eq!(trim_length_left("👍foo", 4), "foo");
} | rust_cleaned_test_functions.jsonl/65642 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70025,
368,
341,
197,
6948,
10714,
10297,
10666,
5118,
9579,
445,
144349,
7975,
497,
220,
18,
701,
330,
7975,
797,
197,
6948,
10714,
10297,
10666,
5118,
9579,
445,
144349,
7975,
497,
220,
19,
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 |
#[test]
fn test_compute_bank_stats_confirmed() {
let vote_keypairs = ValidatorVoteKeypairs::new_rand();
let my_node_pubkey = vote_keypairs.node_keypair.pubkey();
let my_vote_pubkey = vote_keypairs.vote_keypair.pubkey();
let keypairs: HashMap<_, _> = vec![(my_node_pubkey, vote_key... | rust_cleaned_test_functions.jsonl/11055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
35733,
15381,
16059,
8434,
368,
341,
286,
1077,
6910,
3097,
77256,
284,
32566,
41412,
6608,
1082,
4720,
486,
931,
33864,
543,
286,
1077,
847,
5084,
34014,
792,
284,
6910,
3097,
77256,
12097,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.