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_between_first_is_shorter() {
let uid1 = Uid{position: big(0b1_11111000000000000000), site_id: 1, counter: 1};
let uid2 = Uid{position: big(0b1_11111000000000000000_001101010010101010101), site_id: 2, counter: 1};
let uid = Uid::between(&uid1, &uid2, DOT);
assert!... | rust_cleaned_test_functions.jsonl/58319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48302,
12978,
6892,
16673,
261,
368,
341,
286,
1077,
14617,
16,
284,
547,
307,
90,
3487,
25,
2409,
7,
15,
65,
16,
62,
16,
16,
16,
16,
16,
15,
15,
15,
15,
15,
15,
15,
15,
15,
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_fr_add() {
let f1 = Fr::from(BigInteger([
0xc81265fb4130fe0c,
0xb308836c14e22279,
0x699e887f96bff372,
0x84ecc7e76c11ad,
]));
let f2 = Fr::from(BigInteger([
0x71875719b422efb8,
0x43658e68a93612,
0x9fa756be2011e833,
0xaa2b... | rust_cleaned_test_functions.jsonl/81832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
2891,
368,
341,
262,
1077,
282,
16,
284,
2869,
486,
1499,
91756,
8956,
286,
220,
15,
8148,
23,
16,
17,
21,
20,
10798,
19,
16,
18,
15,
1859,
15,
66,
345,
286,
220,
15,
7929,
18,
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_f32x4_concatenations() {
let a = F32x4::new(4.0, 2.0, 6.0, -1.0);
let b = F32x4::new(10.0, -3.0, 15.0, 41.0);
assert_eq!(a.concat_xy_xy(b), F32x4::new(4.0, 2.0, 10.0, -3.0));
assert_eq!(a.concat_xy_zw(b), F32x4::new(4.0, 2.0, 15.0, 41.0));
assert_eq!(a.concat_zw_zw(b), F32x4:... | rust_cleaned_test_functions.jsonl/66186 | {
"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,
761,
18,
17,
87,
19,
57478,
268,
804,
368,
341,
262,
1077,
264,
284,
434,
18,
17,
87,
19,
486,
931,
7,
19,
13,
15,
11,
220,
17,
13,
15,
11,
220,
21,
13,
15,
11,
481,
16,
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,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proof_random() {
let mut memdb = MemoryDB::new(true);
let mut trie = PatriciaTrieMut::new(&mut memdb);
let mut rng = rand::thread_rng();
let mut keys = vec![];
for _ in 0..100 {
let random_bytes: Vec<u8> = (0..rng.gen_range(2, 30))
.map(|_| rand::random::<... | rust_cleaned_test_functions.jsonl/37145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
22644,
368,
341,
262,
1077,
5206,
1833,
1999,
284,
13850,
3506,
486,
931,
3715,
317,
262,
1077,
5206,
59067,
284,
53934,
51,
7231,
51440,
486,
931,
2099,
6984,
1833,
1999,
317,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_simple_style() {
let style = SimpleNamingStyle {
first_case: Case::Lower,
other_case: Case::Title,
upper_acronyms: true,
separator: "_".into(),
};
let tokens = vec![
Token {
value: "protocol".to_owned(),
is_acronym: fals... | rust_cleaned_test_functions.jsonl/103093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
15117,
368,
341,
262,
1077,
1707,
284,
8993,
85410,
2323,
341,
286,
1156,
19096,
25,
11538,
486,
9053,
345,
286,
1008,
19096,
25,
11538,
486,
3851,
345,
286,
8416,
14718,
2248,
75025,
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_multifastfield_reader() {
let mut schema_builder = Schema::builder();
let facet_field = schema_builder.add_facet_field("facets");
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let mut index_writer = index
.write... | rust_cleaned_test_functions.jsonl/94100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1027
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
333,
559,
2566,
22306,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
44507,
5013,
284,
10802,
28532,
1364,
41589,
295,
5013,
445,
22185,
1415,
797,
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... | 1 |
#[test]
fn test_add_used() {
let m = &GuestMemoryMmap::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap();
let vq = VirtQueue::new(GuestAddress(0), m, 16);
let mut q = vq.create_queue();
assert_eq!(vq.used.idx.get(), 0);
//Valid queue addresses configuration
{
... | rust_cleaned_test_functions.jsonl/134252 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 792
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
27803,
368,
341,
286,
1077,
296,
284,
609,
37804,
10642,
44,
2186,
486,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
15454,
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... | 4 |
#[test]
fn test_iter_columns_in_row() {
let r = row![
("c".to_string(), Field::Double(1.0)),
("b".to_string(), Field::Int(1))
];
let mut result = Vec::new();
for (name, record) in r.get_column_iter() {
result.push((name, record));
}
... | rust_cleaned_test_functions.jsonl/69589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
22590,
1243,
8530,
368,
341,
286,
1077,
435,
284,
2802,
90515,
310,
3489,
66,
3263,
983,
3904,
1507,
8601,
486,
7378,
7,
16,
13,
15,
6965,
310,
3489,
65,
3263,
983,
3904,
1507,
8601,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_local_uris_with_pubkey() {
let config = Config {
peer_responder_id: ResponderId::from_str("localhost:8081").unwrap(),
client_responder_id: ResponderId::from_str("localhost:3223").unwrap(),
msg_signer_key: keypair_from_base64(
"MC4CAQAwB... | rust_cleaned_test_functions.jsonl/3952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
64879,
285,
6615,
34014,
792,
368,
341,
286,
1077,
2193,
284,
5532,
341,
310,
14397,
4918,
20328,
842,
25,
1800,
20328,
764,
486,
1499,
2895,
445,
8301,
25,
23,
15,
23,
16,
1827,
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_primitive_array_gt_scalar_nulls() {
let a = Int32Array::from(vec![None, Some(1), Some(2)]);
let c = gt_scalar(&a, 1).unwrap();
assert_eq!(false, c.value(0));
assert_eq!(false, c.value(1));
assert_eq!(true, c.value(2));
} | rust_cleaned_test_functions.jsonl/3136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
37479,
41652,
15162,
82,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
4064,
11,
4329,
7,
16,
701,
4329,
7,
17,
41958,
286,
1077,
272,
284,
25161,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handler() {
let db = CheckpointDb::new(MemoryDB::new());
let handler = db.handler();
handler.checkpoint();
let mut fork = db.fork();
fork.put("foo", vec![], vec![2]);
db.merge(fork.into_patch()).unwrap();
let snapshot = db.snapshot();
... | rust_cleaned_test_functions.jsonl/69291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10183,
368,
341,
286,
1077,
2927,
284,
4248,
2768,
7994,
486,
931,
3189,
4731,
3506,
486,
931,
1423,
286,
1077,
7013,
284,
2927,
31171,
1428,
286,
7013,
9093,
2768,
543,
286,
1077,
5206,
22435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_store_account_and_update_capitalization_increased() {
let old_lamports = 400;
let (genesis_config, mint_keypair) = create_genesis_config(old_lamports);
let bank = Bank::new(&genesis_config);
let pubkey = mint_keypair.pubkey();
let new_lamports = 500;
... | rust_cleaned_test_functions.jsonl/2529 | {
"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,
14809,
13500,
8378,
8882,
16388,
2174,
2022,
1243,
837,
1475,
368,
341,
286,
1077,
2310,
907,
309,
3394,
284,
220,
19,
15,
15,
280,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_log2_floor() {
assert_eq!(log2_floor(1), 0);
assert_eq!(log2_floor(2), 1);
assert_eq!(log2_floor(3), 1);
assert_eq!(log2_floor(4), 2);
assert_eq!(log2_floor(5), 2);
assert_eq!(log2_floor(6), 2);
assert_eq!(log2_floor(7), 2);
assert_... | rust_cleaned_test_functions.jsonl/41458 | {
"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,
5224,
17,
60044,
368,
341,
286,
2060,
10714,
10297,
839,
17,
60044,
7,
16,
701,
220,
15,
317,
286,
2060,
10714,
10297,
839,
17,
60044,
7,
17,
701,
220,
16,
317,
286,
2060,
10714,
10297,
839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_attachments_matching() {
let event_state = ProcessingState::new_root(None, None);
let attachments_state = event_state.enter_static("", None, Some(ValueType::Attachments));
let txt_state = attachments_state.enter_static("file.txt", None, Some(ValueType::Binary));
... | rust_cleaned_test_functions.jsonl/40854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98581,
70763,
368,
341,
286,
1077,
1538,
4387,
284,
28125,
1397,
486,
931,
12993,
26717,
11,
2240,
317,
286,
1077,
33679,
4387,
284,
1538,
4387,
35690,
25360,
19814,
2240,
11,
4329,
25346,
929,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_paint_str_glyphstyle_small_abc() {
let fb = &mut new_fr_buf();
let clip = ClipRect::full_screen();
clear_region(fb, clip);
let cursor = &mut Cursor::from_top_left_of(clip);
paint_str(fb, clip, cursor, GlyphStyle::Small, "abc", true, xor_char);
... | rust_cleaned_test_functions.jsonl/73860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92284,
2895,
88703,
3528,
31966,
62,
13683,
368,
341,
286,
1077,
25469,
284,
609,
6984,
501,
41537,
10363,
543,
286,
1077,
12327,
284,
29692,
4415,
486,
8878,
17649,
543,
286,
2797,
20627,
94034,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_links_enum_variant() {
check(
r#"
enum E {
/// [E]
V$0 { field: i32 }
}
"#,
expect![[r#"
*V*
```rust
test::E
```
```rust
V { field: i32 }
... | rust_cleaned_test_functions.jsonl/117777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
25258,
31054,
46112,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9018,
468,
341,
262,
1048,
508,
36,
921,
262,
647,
3,
15,
314,
2070,
25,
600,
18,
17,
456,
532,
57676,
345,
310,
1720... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fees_and_tip_split() {
new_test_ext().execute_with(|| {
let fee = Balances::issue(10);
let tip = Balances::issue(20);
assert_eq!(Balances::free_balance(AccountId::default()), 0);
DealWithFees::on_unbalanceds(vec![fee, tip].into_iter());
assert_eq!(Balances::free_balance(C... | rust_cleaned_test_functions.jsonl/24493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
5516,
8378,
48014,
17052,
368,
341,
197,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
298,
10217,
11060,
284,
19420,
3020,
486,
11159,
7,
16,
15,
317,
298,
10217,
11552,
284,
19420,
3020,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_list_almost_all_populated_directory() {
let dir = tempdir();
dir.child("one").touch().unwrap();
dir.child("two").touch().unwrap();
cmd()
.arg("--almost-all")
.arg("--ignore-config")
.arg(dir.path())
.assert()
.stdout(predicate::str::is_matc... | rust_cleaned_test_functions.jsonl/625 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
94418,
5705,
17061,
7757,
14846,
368,
341,
262,
1077,
5419,
284,
2730,
3741,
543,
262,
5419,
17531,
445,
603,
1827,
22020,
1005,
15454,
543,
262,
5419,
17531,
445,
19789,
1827,
22020,
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_convert_member_with_call_expression() {
let b = ast::BaseNode::default();
let pkg =
Parser::new("a.b().c").parse_single_package("path".to_string(), "foo.flux".to_string());
let got = test_convert(pkg).unwrap();
let symbols = collect_symbols(&got);
... | rust_cleaned_test_functions.jsonl/131385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
19388,
6615,
13429,
28068,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
4035,
310,
21102,
486,
931,
445,
64,
948,
1005,
66,
1827,
6400,
19487,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cache_index_and_filter_blocks_with_high_priority() {
let path = tempdir_with_prefix("_rust_rocksdb_set_cache_and_index_with_high_priority");
let mut opts = DBOptions::new();
let mut cf_opts = ColumnFamilyOptions::new();
opts.create_if_missing(true);
let mut block_opts = B... | rust_cleaned_test_functions.jsonl/34101 | {
"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,
2602,
11529,
3560,
8378,
8727,
25201,
6615,
22680,
38161,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
2602,
11529,
8378,
3560,
6615,
22680,
38161,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct_variant() {
#[derive(Deserialize, Debug, PartialEq)]
enum A {
A { x: u32, y: u16 },
}
let a = A::A { x: 54, y: 720 };
let x = crate::from_str::<A>(r#"{"A": {"x":54,"y":720 } }"#);
assert_eq!(x, Ok((a, 25)));
} | rust_cleaned_test_functions.jsonl/53510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
46112,
368,
341,
286,
11506,
27098,
7,
64465,
11,
11091,
11,
55039,
5563,
286,
7618,
362,
341,
310,
362,
314,
856,
25,
575,
18,
17,
11,
379,
25,
575,
16,
21,
1153,
286,
456,
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_flush() {
let mut block = default_block();
let mem = block.mem.clone();
let vq = VirtQueue::new(GuestAddress(0), &mem, 16);
block.set_queue(0, vq.create_queue());
block.activate().unwrap();
initialize_virtqueue(&vq);
let request_type_addr ... | rust_cleaned_test_functions.jsonl/76940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39213,
368,
341,
286,
1077,
5206,
2504,
284,
1638,
7113,
543,
286,
1077,
1833,
284,
2504,
41493,
15997,
543,
286,
1077,
348,
80,
284,
47775,
7554,
486,
931,
6699,
3045,
4286,
7,
15,
701,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_associative() {
for _ in 0..10 {
let r0 = Fp::random(&mut OsRng);
let r1 = Fp::random(&mut OsRng);
assert_eq!((r0 + r1) * g0(), r0 * g0() + r1 * g0());
}
} | rust_cleaned_test_functions.jsonl/98392 | {
"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,
41652,
58665,
1388,
368,
341,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
1077,
435,
15,
284,
434,
79,
486,
11463,
2099,
6984,
15433,
49,
968,
317,
310,
1077,
435,
16,
284,
434,
79,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_polyjuice_contract_creator_allowlist() {
let deployment_script = Script::new_builder()
.code_hash(TEST_POLYJUICE_SCRIPT_CODE_HASH.pack())
.hash_type(ScriptHashType::Type.into())
.args([0u8; 20].pack())
.build();
let mut dummy_state... | rust_cleaned_test_functions.jsonl/112104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36133,
8613,
558,
51499,
68532,
55731,
1607,
368,
341,
286,
1077,
23172,
14660,
284,
13710,
486,
931,
28532,
741,
310,
659,
1851,
8950,
50320,
33165,
56,
41,
52,
5487,
45968,
10020,
32309,
20807,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cairo_short_string_to_felt_non_ascii() {
assert!(matches!(
cairo_short_string_to_felt("🦀"),
Err(CairoShortStringToFeltError::NonAsciiCharacter)
));
} | rust_cleaned_test_functions.jsonl/53658 | {
"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,
666,
25549,
16673,
3904,
2346,
761,
3818,
21637,
50238,
368,
341,
286,
2060,
10297,
19914,
33673,
310,
53648,
16673,
3904,
2346,
761,
3818,
445,
147579,
4461,
310,
15495,
3025,
25549,
12472,
703,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_from_cash_addr4() -> Result<()> {
let addr =
Address::from_cash_addr("redridinghood:pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqxmg9w0gt")?;
assert_eq!(addr.addr_type(), AddressType::P2SH);
assert_eq!(
addr.cash_addr(),
"redridinghood:pqqqqqqqqqq... | rust_cleaned_test_functions.jsonl/16404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
64363,
7387,
19,
368,
1464,
5714,
71698,
341,
286,
1077,
10789,
4035,
310,
9177,
486,
1499,
64363,
7387,
445,
1151,
49680,
5694,
44389,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_subject_match() {
assert!(subject_match("sub", "sub"));
assert!(subject_match("sub", "*"));
assert!(subject_match("sub", ">"));
assert!(!subject_match("pub", "sub"));
assert!(subject_match("sub.pub", "sub.pub"));
assert!(subject_match("sub.pub", "sub.*"));
assert!(sub... | rust_cleaned_test_functions.jsonl/102467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28834,
10708,
368,
341,
262,
2060,
10297,
11501,
10708,
445,
1966,
497,
330,
1966,
4010,
262,
2060,
10297,
11501,
10708,
445,
1966,
497,
15630,
4010,
262,
2060,
10297,
11501,
10708,
445,
1966,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_restrict_domain() {
let original = BoundedQuadratic::new(0., 2., 1., 0., 0.);
let expected_restricted = BoundedQuadratic::new(0., 1., 1., 0., 0.);
assert_eq!(original.restrict_domain(-1., 3.), original);
assert_eq!(original.restrict_domain(0., 1.), expected_restr... | rust_cleaned_test_functions.jsonl/19857 | {
"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,
97684,
20111,
368,
341,
286,
1077,
4024,
284,
425,
13082,
2183,
88678,
486,
931,
7,
15,
2572,
220,
17,
2572,
220,
16,
2572,
220,
15,
2572,
220,
15,
58957,
286,
1077,
3601,
1288,
73072,
284,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_statx() {
use rustix::fs::{FsWord, StatFs, PROC_SUPER_MAGIC};
// Ensure these all have consistent types.
let t: StatFs = unsafe { std::mem::zeroed() };
let _s: FsWord = t.f_type;
let _u: FsWord = PROC_SUPER_MAGIC;
// constant comes out with the correct value.
#... | rust_cleaned_test_functions.jsonl/124527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16271,
87,
368,
341,
262,
990,
23071,
941,
486,
3848,
22964,
48300,
10879,
11,
12166,
48300,
11,
24363,
86846,
49194,
2315,
262,
442,
29279,
1493,
678,
614,
12966,
4494,
624,
262,
1077,
259,
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_token_program_id_error() {
test_syscall_stubs();
let swap_key = Pubkey::new_unique();
let mut mint = (Pubkey::new_unique(), Account::default());
let mut destination = (Pubkey::new_unique(), Account::default());
let token_program = (spl_token::id(), Account... | rust_cleaned_test_functions.jsonl/14309 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
25096,
842,
4096,
368,
341,
286,
1273,
20344,
6659,
1261,
15738,
543,
286,
1077,
14291,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
28337,
284,
320,
29162,
792,
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_gen_weighted_bool() {
let mut r = task_rng();
assert_eq!(r.gen_weighted_bool(0u), true);
assert_eq!(r.gen_weighted_bool(1u), true);
} | rust_cleaned_test_functions.jsonl/23762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
15876,
291,
22159,
368,
341,
286,
1077,
5206,
435,
284,
3383,
66849,
543,
286,
2060,
10714,
10297,
81,
22822,
15876,
291,
22159,
7,
15,
84,
701,
830,
317,
286,
2060,
10714,
10297,
81,
228... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_value_single_value_enum() {
let test = TestSingleValueExternalEnum {
a: SingleValueExternalEnum::Double(64.0),
};
let expected = Value::Record(vec![(
"a".to_owned(),
Value::Record(vec![
("type".to_owned(), Value::Enu... | rust_cleaned_test_functions.jsonl/52763 | {
"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,
2346,
3142,
19487,
3142,
31054,
368,
341,
286,
1077,
1273,
284,
3393,
10888,
1130,
25913,
10766,
341,
310,
264,
25,
11327,
1130,
25913,
10766,
486,
7378,
7,
21,
19,
13,
15,
1326,
286,
3634,
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_json_object_expression() {
let n = ObjectExpr {
base: BaseNode::default(),
with: None,
properties: vec![Property {
base: BaseNode::default(),
key: PropertyKey::Identifier(Identifier {
base: BaseNode::default(),
n... | rust_cleaned_test_functions.jsonl/40435 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
5314,
28068,
368,
341,
262,
1077,
308,
284,
3002,
16041,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
448,
25,
2240,
345,
286,
5888,
25,
7486,
20703,
3052,
341,
310,
2331,
25,
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_time_as_decimal() {
test_none_with_ctx_and_extra(cast_any_as_decimal::<Time>);
let mut ctx = EvalContext::default();
// TODO: add more test case
let cs: Vec<(Time, bool, bool, Decimal)> = vec![
(
Time::parse_datetime(&mut ... | rust_cleaned_test_functions.jsonl/1986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
11898,
74429,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
37248,
11898,
74429,
27638,
1462,
42013,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
1428,
286,
442,
5343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_and_apply() {
let res = split_and_apply(
"foo",
3,
true,
&[(
SingleLineSpan {
line: 0.into(),
start_col: 0,
end_col: 3,
},
Sty... | rust_cleaned_test_functions.jsonl/74101 | {
"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,
17052,
8378,
36551,
368,
341,
286,
1077,
592,
284,
6718,
8378,
36551,
1006,
310,
330,
7975,
756,
310,
220,
18,
345,
310,
830,
345,
310,
44590,
1006,
394,
11327,
2460,
12485,
341,
503,
1555,
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_display_fmt() {
let location = SourceFileLocation::new("test_file.s", 1, 1, 1);
assert_eq!(format!("{}", Token::SingleLineComment("; Hello", location.clone())), "single-line comment");
assert_eq!(format!("{}", Token::DirectiveMarker(location.clone())), "directive marker");
assert... | rust_cleaned_test_functions.jsonl/58556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
38128,
368,
341,
262,
1077,
3728,
284,
8748,
1703,
4707,
486,
931,
445,
1944,
2458,
514,
497,
220,
16,
11,
220,
16,
11,
220,
16,
317,
262,
2060,
10714,
10297,
2243,
79878,
9660,
486,
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_self_interchange() {
let checker = MutationsChecker::new("tests/integration.rs").unwrap();
assert!(checker.has("exchange self with other", "59"));
assert!(checker.has("exchange one with other", "63"));
} | rust_cleaned_test_functions.jsonl/117857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25637,
15318,
3373,
368,
341,
262,
1077,
40915,
284,
31228,
804,
35188,
486,
931,
445,
23841,
31114,
17376,
25638,
1827,
15454,
1428,
262,
2060,
10297,
69955,
6858,
445,
39568,
656,
448,
1008,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_prove_pk_and_pk() {
let secret1 = DlogProverInput::random();
let secret2 = DlogProverInput::random();
let pk1 = secret1.public_image();
let pk2 = secret2.public_image();
let expr: Expr = SigmaAnd::new(vec![Expr::Const(pk1.into()), Expr::Const(pk2.into())])... | rust_cleaned_test_functions.jsonl/3884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
586,
33321,
8378,
33321,
368,
341,
286,
1077,
6234,
16,
284,
422,
839,
1336,
423,
2505,
486,
11463,
543,
286,
1077,
6234,
17,
284,
422,
839,
1336,
423,
2505,
486,
11463,
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_creation() {
let format = LoadStoreRegisterOffset::from(0x58B3);
assert_eq!(format.load, true);
assert_eq!(format.data_type, DataType::Word);
assert_eq!(format.offset_register, 2);
assert_eq!(format.rb, 6);
assert_eq!(format.rd, 3);
} | rust_cleaned_test_functions.jsonl/115681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46163,
368,
341,
286,
1077,
3561,
284,
8893,
6093,
8690,
6446,
486,
1499,
7,
15,
87,
20,
23,
33,
18,
626,
286,
2060,
10714,
10297,
2243,
5104,
11,
830,
317,
286,
2060,
10714,
10297,
2243,
2196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer_is_blank_simple_cases() {
let buffer: [u8; 100] = [0; 100];
assert!(buffer_is_blank(&buffer));
assert!(buffer_is_blank(&buffer[0..10]));
assert!(buffer_is_blank(&buffer[1..2]));
assert!(buffer_is_blank(&buffer[15..20]));
assert!(buffer_is_blank(&buffer[21..37]));
} | rust_cleaned_test_functions.jsonl/96752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
6892,
56103,
30015,
41427,
368,
341,
262,
1077,
4147,
25,
508,
84,
23,
26,
220,
16,
15,
15,
60,
284,
508,
15,
26,
220,
16,
15,
15,
935,
262,
2060,
10297,
7573,
6892,
56103,
2099,
7573,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_material_set_should_parse_correct_ambient_colors() {
let tests = test_cases();
for test in tests.iter() {
let mut parser = Parser::new(&test.data);
let result = parser.parse_mtlset().unwrap();
for (result_material, expected_material)
in result.... | rust_cleaned_test_functions.jsonl/53119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
33884,
2602,
43378,
21039,
31550,
62,
59614,
33670,
368,
341,
262,
1077,
7032,
284,
1273,
41427,
1428,
262,
369,
1273,
304,
7032,
19471,
368,
341,
286,
1077,
5206,
6729,
284,
21102,
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... | 3 |
#[test]
fn test_syn_written_numeric() {
let context = Context::new(
String::from("us"),
None,
Tokens::new(HashMap::new(), HashMap::new(), HashMap::new()),
);
assert_eq!(
syn_written_numeric(
&Name::new(String::from("Twenty-... | rust_cleaned_test_functions.jsonl/25033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 797
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51393,
72403,
29418,
368,
341,
286,
1077,
2266,
284,
9608,
486,
931,
1006,
310,
923,
486,
1499,
445,
355,
4461,
310,
2240,
345,
310,
58166,
486,
931,
7,
18497,
486,
931,
1507,
10528,
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_param_inferred() {
let spec = "input i: Int8 output x(param): Int8 := 3 output y: Int8 := x(i)";
assert_eq!(0, num_type_errors(spec));
assert_eq!(get_type(spec), ValueTy::Int(IntTy::I8));
} | rust_cleaned_test_functions.jsonl/110680 | {
"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,
4090,
1243,
5554,
368,
341,
286,
1077,
1398,
284,
330,
1355,
600,
25,
1333,
23,
2550,
856,
9743,
1648,
1333,
23,
1669,
220,
18,
2550,
379,
25,
1333,
23,
1669,
856,
1956,
24023,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_literal_2() {
let s = to_chars("\"test.sol\"");
let cur = &mut 0;
expect_next_token(&s, cur, Token::StringLiteral(s.as_string()));
} | rust_cleaned_test_functions.jsonl/21018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
34100,
62,
17,
368,
341,
286,
1077,
274,
284,
311,
37418,
38915,
1944,
41703,
88385,
286,
1077,
2847,
284,
609,
6984,
220,
15,
280,
286,
1720,
11257,
6458,
2099,
82,
11,
2847,
11,
9660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_public_key_from_pem_pkcs1_generate_panic() {
let keypair = super::Rsa::generate(512).unwrap();
let pubkey_pem = keypair.public_key_to_pem().unwrap();
super::Rsa::public_key_from_pem_pkcs1(&pubkey_pem).unwrap();
} | rust_cleaned_test_functions.jsonl/28566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
3097,
5673,
620,
336,
33321,
4837,
16,
48851,
620,
31270,
368,
341,
286,
1077,
1376,
12670,
284,
2256,
486,
49,
9081,
486,
19366,
7,
20,
16,
17,
568,
15454,
543,
286,
1077,
95116,
620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remember_skipped_rewrites() {
let GenesisConfigInfo {
mut genesis_config, ..
} = create_genesis_config_with_leader(1_000_000_000, &Pubkey::new_unique(), 42);
genesis_config.rent = Rent::default();
activate_all_features(&mut genesis_config);
le... | rust_cleaned_test_functions.jsonl/29021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 815
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
9597,
33811,
6450,
1288,
59079,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
11,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
6615,
79991,
7,
16,
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_with_valid_arguments() {
let config = Config::new(&[
"duckdns-ip-updater",
"--domain",
"mydomain",
"--token",
"mytoken",
])
.unwrap();
assert_eq!(config.get_domains(), &["mydomain"]);
as... | rust_cleaned_test_functions.jsonl/71847 | {
"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,
6615,
8337,
43433,
368,
972,
286,
1077,
2193,
284,
5532,
486,
931,
2099,
58,
319,
310,
330,
72970,
45226,
74732,
5239,
27463,
4723,
310,
14482,
12204,
4723,
310,
330,
2408,
12204,
4723,
310,
14482... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_ast() {
let ast: UserAST = ("super".into(), Or, ("cool".into(), Or, "fancy".into()).into()).into();
let ast = ast.map_ast(
&mut |ast: UserAST, _attr: Option<&str>| {
match ast {
UserAST::Leaf(ref map) if map.phrase == "cool" => ... | rust_cleaned_test_functions.jsonl/42781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 803
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
48019,
368,
341,
286,
1077,
11763,
25,
2657,
6349,
284,
3489,
9522,
3263,
18122,
1507,
2521,
11,
3489,
42196,
3263,
18122,
1507,
2521,
11,
330,
69,
6572,
3263,
18122,
6011,
18122,
6011,
1812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kind_value() {
let mut b: Bond = Bond { kind: purr::feature::BondKind::Aromatic, kind_value: 1, tid: 3, is_breaking_symmetry: false };
b.set_kind_value(&vec![2, 3], &(0, 1));
assert_eq!(b.fixed_hash_value(), 200350);
b.set_kind_value(&vec![3, 2], &(0, 1));
... | rust_cleaned_test_functions.jsonl/69020 | {
"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,
33162,
3142,
368,
341,
286,
1077,
5206,
293,
25,
23618,
284,
23618,
314,
3093,
25,
3999,
81,
486,
12753,
486,
89844,
10629,
486,
32,
98766,
11,
3093,
3142,
25,
220,
16,
11,
13112,
25,
220,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bind() {
Runtime::new().unwrap().block_on(async {
let config = UdpConnectionConfig::default();
let mut connection = UdpConnection::new(config);
let result = connection.bind().await;
result.unwrap();
assert_eq!(connection.is_ne... | rust_cleaned_test_functions.jsonl/54773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27461,
368,
341,
286,
10954,
486,
931,
1005,
15454,
1005,
4574,
4470,
18285,
341,
310,
1077,
2193,
284,
547,
9796,
4526,
2648,
486,
2258,
543,
310,
1077,
5206,
3633,
284,
547,
9796,
4526,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multi_polygon() {
let mut expected_coords = vec![];
let (polygon, mut coords) = create_polygon();
expected_coords.append(&mut coords.clone());
expected_coords.append(&mut coords);
let actual_coords = MultiPolygon::new(vec![polygon.clone(), polygon])
... | rust_cleaned_test_functions.jsonl/21576 | {
"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,
25133,
73542,
368,
341,
286,
1077,
5206,
3601,
32576,
284,
7486,
0,
15078,
286,
1077,
320,
65012,
11,
5206,
23897,
8,
284,
1855,
73542,
543,
286,
3601,
32576,
2057,
2099,
6984,
23897,
15997,
1423,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_openai_gpt_tokenizer() {
// Given
let vocab = generate_test_vocab();
let merges = generate_test_merges();
let openai_gpt_tokenizer: OpenAiGptTokenizer =
OpenAiGptTokenizer::from_existing_vocab_and_merges(vocab, merges, true);
let test_tu... | rust_cleaned_test_functions.jsonl/114294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 548
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
2143,
1889,
417,
6458,
3135,
368,
341,
286,
442,
286,
16246,
198,
286,
1077,
23820,
284,
6923,
4452,
52823,
543,
286,
1077,
80953,
284,
6923,
4452,
717,
2375,
288,
543,
286,
1077,
1787,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_lookup() {
let authority = create_example();
let mut catalog = Catalog::new();
catalog.upsert(authority.origin().clone(), Box::new(authority));
let mut io_loop = Runtime::new().unwrap();
let (stream, sender) = TestClientStream::new(Arc::new(Mutex::new(catalog)));
let dns... | rust_cleaned_test_functions.jsonl/21983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
368,
341,
262,
1077,
11198,
284,
1855,
39304,
543,
262,
1077,
5206,
16403,
284,
31221,
486,
931,
543,
262,
16403,
17652,
6047,
48269,
487,
20248,
1005,
19982,
1507,
8261,
486,
931,
48269,
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_escape() {
assert_eq!(escape("hello"), Cow::Borrowed("hello"));
assert_eq!(
escape("a \n b \r c \t d \" e \\ f"),
Cow::Owned::<str>("a \\n b \\r c \\t d \\\" e \\\\ f".to_string())
);
} | rust_cleaned_test_functions.jsonl/5687 | {
"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,
21832,
368,
341,
286,
2060,
10714,
10297,
12998,
445,
14990,
3975,
21851,
486,
33,
7768,
291,
445,
14990,
4010,
286,
2060,
10714,
33673,
310,
12449,
445,
64,
1124,
77,
293,
1124,
81,
272,
1124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_14() {
assert_eq!(
Solution::longest_common_prefix(vec![
"".to_string(),
"racecar".to_string(),
"car".to_string()
]),
""
);
assert_eq!(
Solution::longest_common_prefix(vec![
... | rust_cleaned_test_functions.jsonl/33222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
19,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
4825,
477,
21107,
13974,
25592,
90515,
394,
44907,
983,
3904,
3148,
394,
330,
41183,
6918,
3263,
983,
3904,
3148,
394,
330,
6918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assert_panics_with_too_few_requests() {
let mock = mock("GET", "/hello").expect(3).create();
request("GET /hello", "");
request("GET /hello", "");
mock.assert();
} | rust_cleaned_test_functions.jsonl/82440 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
71099,
1211,
6615,
2346,
78,
761,
365,
37216,
368,
341,
262,
1077,
7860,
284,
7860,
445,
3806,
497,
3521,
14990,
1827,
17119,
7,
18,
568,
3182,
1428,
262,
1681,
445,
3806,
608,
14990,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_try_panic_any_message_unit_struct() {
struct Juju;
match thread::spawn(move || panic_any(Juju)).join() {
Err(ref e) if e.is::<Juju>() => {}
Err(_) | Ok(()) => panic!(),
}
} | rust_cleaned_test_functions.jsonl/44050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
620,
31270,
37248,
6462,
14832,
15126,
368,
341,
262,
2036,
21671,
8613,
401,
262,
2432,
4516,
486,
46087,
34081,
1369,
21975,
37248,
16368,
72301,
4579,
5987,
368,
341,
286,
15495,
13321,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_send_px_and_backoff_in_prune() {
let config: GossipsubConfig = GossipsubConfig::default();
//build mesh with enough peers for px
let (mut gs, peers, topics) = inject_nodes1()
.peer_no(config.prune_peers() + 1)
.topics(vec!["test".into()])
... | rust_cleaned_test_functions.jsonl/66898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 805
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
67162,
8378,
3895,
1847,
1243,
5294,
2886,
368,
341,
286,
1077,
2193,
25,
479,
41473,
1966,
2648,
284,
479,
41473,
1966,
2648,
486,
2258,
1428,
286,
442,
5834,
11294,
448,
3322,
25029,
369,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_req_body() {
let engine = TestEngineBuilder::new().build().unwrap();
let read_pool = build_read_pool_for_test(engine.clone());
let cop = Endpoint::<RocksEngine>::new(&Config::default(), read_pool);
let mut req = coppb::Request::default();
req.set_... | rust_cleaned_test_functions.jsonl/40858 | {
"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,
31433,
17644,
14114,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
1349,
15709,
284,
1936,
6443,
15709,
5478,
4452,
48974,
15997,
1423,
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_basic_email() {
let email = Email::new("test-from@email.org", "test-to@email.org", "Body text");
assert_eq!(email.to_string(), "{\"from\":\"test-from@email.org\",\"to\":\"test-to@email.org\",\"textbody\":\"Body text\"}");
} | rust_cleaned_test_functions.jsonl/67589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
9172,
368,
341,
262,
1077,
2551,
284,
8299,
486,
931,
445,
1944,
38051,
71776,
2659,
497,
330,
1944,
4686,
71776,
2659,
497,
330,
5444,
1467,
797,
262,
2060,
10714,
10297,
2332,
2389,
3904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_never_excludes() {
let file = IgnoreFile::from_strings(&[], &base_dir()).expect("test ignore file invalid");
assert!(!file.is_excluded(&base_dir().join("target")));
} | rust_cleaned_test_functions.jsonl/9291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
2458,
13925,
423,
2702,
7396,
368,
341,
286,
1077,
1034,
284,
38971,
1703,
486,
1499,
33500,
2099,
12995,
609,
3152,
4334,
6011,
17119,
445,
1944,
10034,
1034,
8318,
3071,
286,
2060,
0,
347... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_qualify_path_1() {
check_assist(
add_missing_impl_members,
"
mod foo {
pub struct Bar;
trait Foo { fn foo(&self, bar: Bar); }
}
struct S;
impl foo::Foo for S { <|> }",
"
mod foo {
pub struct Bar;
trait Foo { fn foo(&self, bar: Bar); }
}... | rust_cleaned_test_functions.jsonl/106816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64391,
1437,
2638,
62,
16,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
6228,
2593,
15229,
341,
262,
6675,
2036,
4716,
280,
262,
17567,
33428,
314,
5168,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_key() {
assert_eq!("some".to_owned().join_key(&"path".to_string()), "some/path");
assert_eq!("some".to_owned().join_key(&"".to_string()), "some/");
assert_eq!("".to_owned().join_key(&"path".to_string()), "path");
assert_eq!("".to_owned().join_key(&"".to_strin... | rust_cleaned_test_functions.jsonl/124529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
3097,
368,
341,
286,
2060,
10714,
17223,
14689,
3263,
983,
51973,
1005,
5987,
3097,
2099,
1,
2343,
3263,
983,
3904,
11858,
330,
14689,
50976,
797,
286,
2060,
10714,
17223,
14689,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize() {
::init().unwrap();
let value_ron = "Default(Some(42))";
let value_de: GenericFormattedValue = ron::de::from_str(value_ron).unwrap();
assert_eq!(value_de, GenericFormattedValue::Default(Default::from(42)));
let value_json = "{\"Default\":4... | rust_cleaned_test_functions.jsonl/21902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
1077,
897,
1710,
263,
284,
330,
3675,
65405,
7,
19,
17,
593,
876,
286,
1077,
897,
2259,
25,
21281,
43500,
1130,
284,
435,
263,
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_api_public_get_following_address_existent() {
let mut testkit = AnchoringTestKit::default();
let requests = testkit.requests();
let api = testkit.api();
let (cfg_proposal, following_cfg) =
gen_following_cfg_exclude_validator(&mut testkit, Height(10));
let following_a... | rust_cleaned_test_functions.jsonl/80049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11697,
27074,
3062,
43490,
287,
6744,
2702,
18128,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
71484,
5503,
2271,
7695,
486,
2258,
543,
262,
1077,
7388,
284,
1273,
8226,
67671,
543,
262,
1077,
633... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transaction_input() {
let raw_input = sample_transaction_input();
let input_bytes = hex::decode(&raw_input).unwrap();
let mut parser = BytesParser::new(&input_bytes);
let input: TransactionInput = parser.parse_with(2).unwrap();
let previous_hash = H... | rust_cleaned_test_functions.jsonl/132189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
28884,
5898,
368,
341,
286,
1077,
7112,
5898,
284,
6077,
28884,
5898,
543,
286,
1077,
1946,
12524,
284,
12371,
486,
18196,
2099,
1041,
5898,
568,
15454,
543,
286,
1077,
5206,
6729,
284,
300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_integer_no_fraction() {
match Variant::VInteger(42).divide(Variant::VInteger(2)).unwrap() {
Variant::VInteger(result) => assert_eq!(result, 21),
_ => panic!("assertion failed"),
}
} | rust_cleaned_test_functions.jsonl/84625 | {
"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,
31725,
6536,
59023,
368,
341,
394,
2432,
39292,
486,
53,
3486,
7,
19,
17,
568,
59394,
12410,
15341,
486,
53,
3486,
7,
17,
4579,
15454,
368,
341,
503,
39292,
486,
53,
3486,
4456,
8,
589,
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... | 2 |
#[test]
fn test_scalar_repr_mul2() {
let mut a = ScalarRepr::from(23712937547);
a.mul2();
assert_eq!(a, ScalarRepr::new([0xb0acd6c96, 0x0, 0x0, 0x0]));
for _ in 0..60 {
a.mul2();
}
assert_eq!(
a,
ScalarRepr::new([0x6000000000000... | rust_cleaned_test_functions.jsonl/56391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 496
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
68535,
24944,
17,
368,
341,
286,
1077,
5206,
264,
284,
35176,
693,
649,
486,
1499,
7,
17,
18,
22,
16,
17,
24,
18,
22,
20,
19,
22,
317,
286,
264,
53141,
17,
543,
286,
2060,
10714,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_pod_constant_harmless_inside_type() {
// Check that the presence of this constant doesn't break anything.
let hdr = indoc! {"
#include <cstdint>
struct Bob {
uint32_t a;
};
struct Anna {
uint32_t a;
const Bob BOB = Bob {... | rust_cleaned_test_functions.jsonl/9815 | {
"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,
85337,
34967,
1523,
2178,
1717,
72860,
1819,
368,
341,
262,
442,
4248,
429,
279,
9362,
315,
419,
6783,
3171,
944,
1438,
4113,
624,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prefix() {
macro_rules! t(
($path:expr, $exp:expr) => (
{
let path = $path;
let exp = $exp;
let res = parse_prefix(path);
assert!(res == exp,
"par... | rust_cleaned_test_functions.jsonl/54446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
13974,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
1711,
2343,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
400,
2343,
280,
503,
1077,
1343,
284,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_literal() {
let x = hex2binary("D2FE28").unwrap();
let (_, p) = parse_packet(&x).unwrap();
assert_eq!(
p,
Packet::LiteralPacket {
version: 6,
type_id: 4,
num: 2021,
}
)
} | rust_cleaned_test_functions.jsonl/6775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34100,
368,
341,
286,
1077,
856,
284,
12371,
17,
25891,
445,
35,
17,
11419,
17,
23,
1827,
15454,
543,
286,
1077,
39464,
281,
8,
284,
4715,
21078,
2099,
87,
568,
15454,
543,
286,
2060,
10714,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reset() {
let (rx, rp) = crate::test::create_client();
rp.digital.reset();
assert_eq!("DIG:RST\r\n", rx.recv().unwrap());
} | rust_cleaned_test_functions.jsonl/15580 | {
"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,
18983,
368,
341,
286,
1077,
320,
12651,
11,
33109,
8,
284,
17717,
486,
1944,
486,
3182,
8179,
1428,
286,
33109,
87446,
13857,
543,
286,
2060,
10714,
17223,
86929,
25,
49,
784,
12016,
1699,
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 |
#[test]
fn test_recursive_function1() {
test(
"var x = 0; (function x() { return x ? x() : 3; })();",
"var x; (function x1() { return x1 ? x1() : 3; })();",
);
} | rust_cleaned_test_functions.jsonl/27664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66242,
9174,
16,
368,
341,
262,
1273,
1006,
286,
330,
947,
856,
284,
220,
15,
26,
320,
1688,
856,
368,
314,
470,
856,
937,
856,
368,
549,
220,
18,
26,
6413,
2129,
756,
286,
330,
947,
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_rpc_request_processor_allow_validator_exit_config() {
let exit = Arc::new(AtomicBool::new(false));
let validator_exit = create_validator_exit(&exit);
let ledger_path = get_tmp_ledger_path!();
let blockstore = Arc::new(Blockstore::open(&ledger_path).unwrap());
... | rust_cleaned_test_functions.jsonl/57672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 657
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
7893,
50127,
55731,
64959,
16880,
5332,
368,
341,
286,
1077,
4869,
284,
19689,
486,
931,
7,
65857,
11233,
486,
931,
3576,
1106,
286,
1077,
22935,
16880,
284,
1855,
64959,
16880,
2099,
13652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tipo() {
assert_eq!(tipo("intaa"), Ok(("aa", Tipo::INT)));
assert_eq!(tipo("floataa"), Ok(("aa", Tipo::FLOAT)));
assert_eq!(
tipo("laksl"),
Err(NomErr::Error(VerboseError {
errors: vec![
("laksl", VerboseErrorKin... | rust_cleaned_test_functions.jsonl/117164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43659,
368,
341,
286,
2060,
10714,
10297,
21194,
445,
396,
5305,
3975,
7622,
30873,
5305,
497,
45020,
486,
3221,
4945,
286,
2060,
10714,
10297,
21194,
445,
89806,
459,
64,
3975,
7622,
30873,
5305,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_limit_array_with_limit_too_large() {
let a = Int32Array::from(vec![5, 6, 7, 8, 9]);
let a_ref: ArrayRef = Arc::new(a);
let b = limit(&a_ref, 6);
let c = b.as_ref().as_any().downcast_ref::<Int32Array>().unwrap();
assert_eq!(5, c.len());
assert_eq!(... | rust_cleaned_test_functions.jsonl/56710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14763,
3858,
6615,
14763,
2346,
78,
45228,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
2558,
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_inner_macro_rules() {
parse_macro(
r#"
macro_rules! foo {
($a:ident, $b:ident, $c:tt) => {
macro_rules! bar {
($bi:ident) => {
fn $bi() -> u8 {$c}
}
}
bar!($a);
fn $b() -> u8 {$c}
}
}
"#,
).
ass... | rust_cleaned_test_functions.jsonl/28758 | {
"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,
34345,
58810,
21407,
368,
341,
262,
4715,
58810,
1006,
286,
435,
2,
698,
32606,
21407,
0,
15229,
341,
262,
1711,
64,
25,
1713,
11,
400,
65,
25,
1713,
11,
400,
66,
25,
5566,
8,
589,
1476,
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_get_first_seq_num_and_limit() {
assert!(get_first_seq_num_and_limit(Order::Ascending, 0, 0).is_err());
// ascending
assert_eq!(
get_first_seq_num_and_limit(Order::Ascending, 0, 4).unwrap(),
(0, 4)
);
assert_eq!(
get_first_seq_num_and_limit(Order::Asce... | rust_cleaned_test_functions.jsonl/23588 | {
"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,
3062,
12978,
14486,
4273,
8378,
14763,
368,
341,
262,
2060,
10297,
455,
12978,
14486,
4273,
8378,
14763,
39692,
486,
82952,
11,
220,
15,
11,
220,
15,
568,
285,
9266,
5231,
262,
442,
35388,
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,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_empty() {
run_with_server(|test_env| {
let ref bins = test_env.server.storage.lock().unwrap().get_bin_summaries();
assert!(bins.is_empty());
})
} | rust_cleaned_test_functions.jsonl/56476 | {
"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,
2019,
15124,
368,
341,
262,
1598,
6615,
12015,
22428,
1944,
15879,
91,
341,
286,
1077,
2053,
28518,
284,
1273,
15879,
12638,
22403,
21003,
1005,
15454,
1005,
455,
21816,
10160,
89333,
543,
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 |
#[test]
fn test_datetime_format() {
let dt = NaiveDate::from_ymd(2010, 9, 8).and_hms_milli(7, 6, 54, 321);
assert_eq!(dt.format("%c").to_string(), "Wed Sep 8 07:06:54 2010");
assert_eq!(dt.format("%s").to_string(), "1283929614");
assert_eq!(dt.format("%t%n%%%n%t").to_string(), "... | rust_cleaned_test_functions.jsonl/76827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
8955,
368,
341,
286,
1077,
7594,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
16,
15,
11,
220,
24,
11,
220,
23,
568,
437,
1523,
1011,
717,
57168,
7,
22,
11,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merged() {
let base = StrVectorClock::new();
let c1 = base.incr_clone("A");
let c2 = base.incr_clone("B");
let m = c1.merge_with(&c2);
assert_eq!(m.temporal_relation(&c1), TemporalRelation::EffectOf);
assert_eq!(c1.temporal_relation(&m), Temporal... | rust_cleaned_test_functions.jsonl/60188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90702,
368,
341,
286,
1077,
2331,
284,
4509,
3781,
26104,
486,
931,
543,
286,
1077,
272,
16,
284,
2331,
1858,
5082,
54742,
445,
32,
797,
286,
1077,
272,
17,
284,
2331,
1858,
5082,
54742,
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 |
#[test]
fn test_eu4_bin() {
let data = utils::request("ragusa2.bin.eu4");
let (save, encoding) = Eu4Extractor::extract_save(Cursor::new(&data[..])).unwrap();
assert_eq!(encoding, Encoding::BinZip);
assert_eq!(save.meta.player, "CRO".parse().unwrap());
let (save2, _) = Eu4Extractor::extract_... | rust_cleaned_test_functions.jsonl/97707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 571
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
84,
19,
21816,
368,
341,
262,
1077,
821,
284,
12439,
486,
2035,
445,
4101,
30753,
17,
29394,
35003,
19,
797,
262,
1077,
320,
6628,
11,
11170,
8,
284,
21963,
19,
56118,
486,
23493,
15376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_item_refcnt() {
Python::with_gil(|py| {
let cnt;
{
let _pool = unsafe { crate::GILPool::new() };
let none = py.None();
cnt = none.get_refcnt(py);
let _dict = [(10, none)].into_py_dict(py);
... | rust_cleaned_test_functions.jsonl/7722 | {
"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,
2602,
5634,
7793,
15853,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
13195,
280,
310,
341,
394,
1077,
716,
10285,
284,
19860,
314,
17717,
486,
38,
1715,
10551,
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_parse_pre_order_key_case_2() {
let text = "AAAAA-BBBBB-CCCCC-DDDD -> Pre-order game key";
let parsed_input = parse_message(text);
assert_eq!(parsed_input.value, "AAAAA-BBBBB-CCCCC-DDDD");
assert_eq!(
parsed_input.description,
Some(format!(... | rust_cleaned_test_functions.jsonl/97574 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10442,
7869,
3097,
19096,
62,
17,
368,
341,
286,
1077,
1467,
284,
330,
25699,
32,
7671,
73442,
12,
47932,
34,
40175,
4103,
1464,
4968,
23810,
1809,
1376,
876,
286,
1077,
15676,
5898,
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_one_minus_one_plus_line() {
let config = make_config_from_args(&[
"--line-numbers",
"--line-numbers-left-format",
"{nm:^4}⋮",
"--line-numbers-right-format",
"{np:^4}│",
"--line-numbers-left-style",
"0 1",... | rust_cleaned_test_functions.jsonl/54580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 499
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11667,
38457,
11667,
28043,
6528,
368,
341,
286,
1077,
2193,
284,
1281,
5332,
5673,
8384,
2099,
9640,
310,
14482,
1056,
31194,
1902,
756,
310,
14482,
1056,
31194,
1902,
7950,
38380,
756,
310,
13868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chain_after_error() {
test_chain(
// Error in after
(vec![Fine, Fine, Fine], Fine, vec![Prob, Prob, Prob]),
(vec![Fine, Fine, Fine], Fine, vec![Fine, Prob, Prob]),
);
} | rust_cleaned_test_functions.jsonl/39006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
19844,
4096,
368,
341,
262,
1273,
30583,
1006,
286,
442,
4600,
304,
1283,
198,
286,
320,
4083,
20703,
63716,
11,
30153,
11,
30153,
1125,
30153,
11,
7486,
20703,
36980,
11,
25627,
11,
25627,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collect_up_to_works_for_one() {
let test_items = vec![1];
let results = collect_up_to(10, test_items.iter());
assert_eq!(results.items, vec![&1]);
assert!(!results.is_empty());
} | rust_cleaned_test_functions.jsonl/22252 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
8237,
2346,
11498,
82,
5478,
11667,
368,
341,
262,
1077,
1273,
12134,
284,
7486,
20703,
16,
935,
262,
1077,
3059,
284,
6530,
8237,
2346,
7,
16,
15,
11,
1273,
12134,
19471,
1423,
262,
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 |
#[test]
fn test_structure_type_native() {
let resp = post_http_request(r#"{
"id": 42,
"jsonrpc": "2.0",
"method": "get_spent_transaction",
"params": [{
"outpoint": {
"tx_hash": "0xa4aee7ae950d7fb74271816566827832d50ebf3fc04234927314fd332c4cd11... | rust_cleaned_test_functions.jsonl/127547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 758
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38283,
1819,
44494,
368,
341,
1066,
262,
1077,
9039,
284,
1736,
25888,
7893,
2601,
55543,
515,
286,
330,
307,
788,
220,
19,
17,
345,
286,
330,
2236,
29414,
788,
330,
17,
13,
15,
756,
286,
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_bitv_set_union() {
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(9));
assert!(a.insert(11));
assert!(a.insert(160));
assert!(a.inse... | rust_cleaned_test_functions.jsonl/12159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
85,
2602,
51621,
368,
341,
286,
1077,
5206,
264,
284,
6495,
85,
1649,
486,
931,
543,
286,
1077,
5206,
293,
284,
6495,
85,
1649,
486,
931,
543,
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_v5() {
let config = idna::Config::default()
.verify_dns_length(true)
.use_std3_ascii_rules(true);
// IdnaTest:784 蔏。𑰺
assert!(is_combining_mark('\u{11C3A}'));
assert!(config.to_ascii("\u{11C3A}").is_err());
assert!(config.to_ascii("\u{850f}.\u{11C3A}").is_er... | rust_cleaned_test_functions.jsonl/13895 | {
"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,
2273,
20,
368,
341,
262,
1077,
2193,
284,
877,
3376,
486,
2648,
486,
2258,
741,
286,
659,
12446,
71125,
5118,
3715,
340,
286,
659,
810,
15656,
18,
50238,
21407,
3715,
626,
262,
442,
5223,
3376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_render_to_utf8_string() {
use crate::render::Renderer;
let colors = &[Color::Dark, Color::Light, Color::Light, Color::Dark];
let image: String = Renderer::<Dense1x2>::new(colors, 2, 1).build();
assert_eq!(&image, " ▄ \n ▀ ");
let image2 = Renderer::<Dense1x2>::new(colors,... | rust_cleaned_test_functions.jsonl/105287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22781,
2346,
39453,
23,
3904,
368,
341,
262,
990,
17717,
486,
7322,
486,
11541,
280,
262,
1077,
7987,
284,
44590,
1636,
486,
25830,
11,
3478,
486,
13911,
11,
3478,
486,
13911,
11,
3478,
486,
258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_page() -> Result<(), Error> {
let mut pager = open_test_pager()?;
let mut page = [0; PAGE_SIZE];
let result = pager.read_page(1, &mut page);
assert_eq!(Error::IncorrectPageNumber, result.unwrap_err());
Ok(())
} | rust_cleaned_test_functions.jsonl/127402 | {
"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,
6443,
31433,
6129,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
5206,
52588,
284,
1787,
4452,
620,
1409,
94136,
286,
1077,
5206,
2150,
284,
508,
15,
26,
25040,
4098,
935,
286,
1077,
1102,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_restore_from_old_state() -> Result<()> {
better_panic::install();
let old_settings_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"))
.join("tests")
.join("data")
.join("v0.15.0_settings.yml");
let settings: Settings = Settings::read_with_defaults(true, &S... | rust_cleaned_test_functions.jsonl/116784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62677,
5673,
21108,
4387,
368,
1464,
5714,
71698,
341,
262,
2664,
620,
31270,
486,
12248,
543,
262,
1077,
2310,
10853,
2638,
284,
7933,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_binary_files_differ() {
let options = get_command_line_options();
let output = strip_ansi_codes(&run_delta(BINARY_FILES_DIFFER, &options)).to_string();
assert!(output.contains("Binary files /dev/null and b/foo differ\n"));
} | rust_cleaned_test_functions.jsonl/61850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
10931,
814,
14320,
368,
341,
286,
1077,
2606,
284,
633,
10811,
6528,
8743,
543,
286,
1077,
2550,
284,
13316,
62,
52067,
38482,
2099,
6108,
26710,
5349,
32593,
48010,
53984,
640,
11,
609,
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_neuron_remove_permissions_of_different_principal() {
local_test_on_sns_subnet(|runtime| async move {
let user = Sender::from_keypair(&TEST_USER1_KEYPAIR);
let additional_user = Sender::from_keypair(&TEST_USER2_KEYPAIR);
let account_identifier = AccountIdentifier::from... | rust_cleaned_test_functions.jsonl/107263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
36090,
18193,
44767,
3575,
82741,
82402,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
1196,
284,
54610,
486,
1499,
3097,
12670,
2099,
10033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_metadata_item() {
let dataset = Dataset::open(fixture!("tinymarble.png")).unwrap();
let key = "None";
let domain = "None";
let meta = dataset.metadata_item(key, domain);
assert_eq!(meta, None);
let key = "INTERLEAVE";
let domain = "IMAGE_STRUCTURE";
let meta ... | rust_cleaned_test_functions.jsonl/83436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
22220,
5634,
368,
341,
262,
1077,
10337,
284,
39183,
486,
2508,
94886,
17223,
55971,
1600,
277,
891,
3508,
15197,
15454,
543,
262,
1077,
1376,
284,
330,
4064,
876,
262,
1077,
7947,
284,
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_psbt() {
let psbt_bytes = Vec::from_hex(
"70736274ff0100750200000001268171371edff285e937adeea4b37b78000c0566\
cbb3ad64641713ca42171bf60000000000feffffff02d3dff505000000001976a91\
4d0c59903c5bac2868760e90fd521a4665aa7652088ac00e1f5050000000017a914\
... | rust_cleaned_test_functions.jsonl/43975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 948
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26047,
12755,
368,
341,
286,
1077,
4726,
12755,
12524,
284,
11312,
486,
1499,
32655,
1006,
310,
330,
22,
15,
22,
18,
21,
17,
22,
19,
542,
15,
16,
15,
15,
22,
20,
15,
17,
15,
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_block_decode_with_compression() -> BaseRtResult<()> {
let mut bs = BytesMut::with_capacity(4);
let mut _bs = BytesMut::with_capacity(4);
let mut blk: Block = Default::default();
let col: Column = Column {
name: b"col_1".to_vec(),
data: Ba... | rust_cleaned_test_functions.jsonl/23918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 976
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
15227,
6615,
2965,
4011,
368,
1464,
5351,
49,
83,
2077,
71698,
341,
286,
1077,
5206,
17065,
284,
30024,
51440,
486,
4197,
35603,
7,
19,
317,
286,
1077,
5206,
716,
1279,
284,
30024,
51440,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signature_fromstr() {
let signature = Keypair::new().sign_message(&[0u8]);
let mut signature_base58_str = bs58::encode(signature).into_string();
assert_eq!(signature_base58_str.parse::<Signature>(), Ok(signature));
signature_base58_str.push_str(&bs58::encode(si... | rust_cleaned_test_functions.jsonl/8412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
5673,
495,
368,
341,
286,
1077,
11957,
284,
6569,
1082,
1310,
486,
931,
1005,
7752,
6462,
2099,
58,
15,
84,
23,
10149,
286,
1077,
5206,
11957,
7651,
20,
23,
2895,
284,
17065,
20,
23,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_with_whitespace() {
let source = "> + < - . , [ ]";
let instructions = Parser::parse_instructions(&Parser::parse_string(source));
assert_eq!(
instructions,
vec![
Instruction::FWD(1),
Instruction::INC(1),
Instruction::BAK(1... | rust_cleaned_test_functions.jsonl/56689 | {
"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,
21039,
5705,
6615,
86175,
368,
341,
262,
1077,
2530,
284,
28957,
488,
366,
481,
659,
1154,
508,
2279,
876,
262,
1077,
11221,
284,
21102,
486,
6400,
82427,
2099,
6570,
486,
6400,
3904,
12437,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.