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_basic_enum() {
let basic_enum = quote! {
enum Basic {
A,
B,
C,
D
}
};
match syn::parse2::<DeriveInput>(basic_enum) {
Ok(mut input) => {
assert!(derive_avro_... | rust_cleaned_test_functions.jsonl/110870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
31054,
368,
341,
286,
1077,
6770,
31054,
284,
12641,
0,
341,
310,
7618,
14625,
341,
394,
362,
345,
394,
425,
345,
394,
356,
345,
394,
422,
198,
310,
456,
286,
2605,
286,
2432,
6782,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_plain_decode_byte_array() {
let data = vec![
ByteArray::new(ByteBufferPtr::new(String::from("hellp").into_bytes())),
ByteArray::new(ByteBufferPtr::new(String::from("parquet").into_bytes())),
];
let data_bytes = ByteArrayType::to_byte_array(&data[..]);
let mut buffer = vec![ByteArra... | rust_cleaned_test_functions.jsonl/113127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41015,
15227,
19737,
3858,
368,
341,
197,
10217,
821,
284,
7486,
90515,
298,
197,
18394,
486,
931,
55823,
4095,
5348,
486,
931,
2242,
486,
1499,
445,
56095,
79,
1827,
18122,
12524,
73727,
298,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enum() {
test_parse_ok(vec![
("\"Dog\"", Animal::Dog),
(" \"Dog\" ", Animal::Dog),
(
"{\"Frog\":[\"Henry\",[]]}",
Animal::Frog("Henry".to_string(), vec![]),
),
(
" { \"Frog\": [ \"Henry\" , [ 349, 102 ] ] } ",
... | rust_cleaned_test_functions.jsonl/29844 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 822
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31054,
368,
341,
262,
1273,
21039,
19817,
25592,
90515,
286,
3489,
2105,
48940,
55853,
21292,
486,
48940,
1326,
286,
3489,
7245,
48940,
2105,
3670,
21292,
486,
48940,
1326,
286,
2399,
310,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pagparams_parsing() {
#[derive(Debug, Deserialize, Serialize)]
struct MyScanParams {
the_field: String,
only_good: Option<String>,
how_many: u32,
really: bool,
}
#[derive(Debug, Deserialize)]
#[allow(dead_co... | rust_cleaned_test_functions.jsonl/16568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2974
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51003,
3519,
620,
28598,
368,
341,
286,
11506,
27098,
42618,
11,
48440,
11,
39900,
5563,
286,
2036,
3017,
26570,
4870,
341,
310,
279,
5013,
25,
923,
345,
310,
1172,
44781,
25,
6959,
3464,
12520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mld_integration_fallback_from_idle() {
let (mut ctx, dev_id) = setup_simple_test_environment();
mld_join_group(&mut ctx, dev_id, MulticastAddr::new(GROUP_ADDR).unwrap());
assert_eq!(ctx.dispatcher.frames_sent().len(), 1);
assert!(testutil::trigger_next_timer(&mut... | rust_cleaned_test_functions.jsonl/123215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
507,
90250,
761,
3420,
5673,
47810,
368,
341,
286,
1077,
320,
6984,
5635,
11,
3483,
842,
8,
284,
6505,
30015,
4452,
51774,
543,
286,
296,
507,
31017,
6288,
2099,
6984,
5635,
11,
3483,
842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_check_condition() {
let focus = MockFocus {
accepted_conditions: &["foo", "bar"],
};
let test_cases = [
("foo", true),
("bar", true),
("!foo", false),
("!bar", false),
("foo || bar", true),
... | rust_cleaned_test_functions.jsonl/51719 | {
"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,
7200,
27656,
368,
341,
286,
1077,
5244,
284,
14563,
13819,
341,
310,
11666,
54099,
25,
609,
1183,
7975,
497,
330,
2257,
8097,
286,
3634,
286,
1077,
1273,
41427,
284,
2278,
310,
3489,
7975,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extract_path_decode() {
let mut router = Router::<()>::default();
router.register_resource(Resource::new(ResourceDef::new("/{value}/")));
macro_rules! test_single_value {
($value:expr, $expected:expr) => {
{
let req = TestR... | rust_cleaned_test_functions.jsonl/46189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 968
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
2638,
15227,
368,
341,
286,
1077,
5206,
9273,
284,
10554,
27638,
368,
6831,
2258,
543,
286,
9273,
9929,
17962,
40071,
486,
931,
40071,
2620,
486,
931,
65871,
957,
4472,
74385,
286,
18072,
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_qualify_path_fn_trait_notation() {
check_assist(
add_missing_impl_members,
r#"
mod foo {
pub trait Fn<Args> { type Output; }
trait Foo { fn foo(&self, bar: dyn Fn(u32) -> i32); }
}
struct S;
impl foo::Foo for S { <|> }"#,
r#"
mod foo {
pub ... | rust_cleaned_test_functions.jsonl/110449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64391,
1437,
2638,
15246,
78491,
7913,
367,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
435,
2,
698,
2593,
15229,
341,
262,
6675,
17567,
50182,
27,
4117,
29,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pileup() {
let (_, _, seqs, quals, _) = gold();
let mut bam = Reader::from_path(&"test/test.bam")
.ok()
.expect("Error opening file.");
let pileups = bam.pileup();
for pileup in pileups.take(26) {
let _pileup = pileup.expect("E... | rust_cleaned_test_functions.jsonl/34033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
457,
454,
368,
341,
286,
1077,
39464,
8358,
12981,
82,
11,
922,
1127,
11,
27439,
284,
6623,
1428,
286,
1077,
5206,
41304,
284,
25166,
486,
1499,
2638,
2099,
1,
1944,
12697,
71804,
1138,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_raft_client_reconnect() {
let msg_count = Arc::new(AtomicUsize::new(0));
let batch_msg_count = Arc::new(AtomicUsize::new(0));
let service = MockKvForRaft::new(Arc::clone(&msg_count), Arc::clone(&batch_msg_count), true);
let (mut mock_server, port) = create_mock_server(service, 60... | rust_cleaned_test_functions.jsonl/37840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2944,
8179,
1288,
6459,
368,
341,
262,
1077,
3750,
3180,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
1106,
262,
1077,
7162,
6483,
3180,
284,
19689,
486,
931,
7,
65857,
52,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_toposort() {
let mut gr = Graph::<_, _>::new();
let a = gr.add_node("A");
let b = gr.add_node("B");
let c = gr.add_node("C");
let d = gr.add_node("D");
let e = gr.add_node("E");
let f = gr.add_node("F");
let g = gr.add_node("G");
gr.extend_with_edges(&[
... | rust_cleaned_test_functions.jsonl/46748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
436,
371,
368,
341,
262,
1077,
5206,
1081,
284,
12165,
27638,
6878,
716,
6831,
931,
543,
262,
1077,
264,
284,
1081,
1364,
5084,
445,
32,
797,
262,
1077,
293,
284,
1081,
1364,
5084,
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_server_down_peers_without_hibernate_regions() {
let mut cluster = new_server_cluster(0, 5);
cluster.cfg.raft_store.hibernate_regions = false;
test_down_peers(&mut cluster);
} | rust_cleaned_test_functions.jsonl/50370 | {
"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,
12015,
13998,
36367,
388,
39904,
1523,
18818,
58035,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
20,
317,
262,
10652,
30481,
13,
2944,
14809,
28881,
58035,
284,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_handle_redeem() {
let (init_result, mut deps) = init_helper_with_config(
vec![InitialBalance {
address: HumanAddr("butler".to_string()),
amount: Uint128(5000),
}],
false,
true,
false,
... | rust_cleaned_test_functions.jsonl/69615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
1288,
450,
336,
368,
341,
286,
1077,
320,
2327,
5287,
11,
5206,
48178,
8,
284,
2930,
10418,
6615,
5332,
1006,
310,
7486,
20703,
6341,
21190,
341,
394,
2621,
25,
11097,
13986,
445,
8088,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parents() {
let parent = Parent::new(Some(32),String::from("William"), Some(String::from("Logan")), String::from("Porter"));
} | rust_cleaned_test_functions.jsonl/97304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81719,
368,
341,
286,
1077,
2681,
284,
17022,
486,
931,
65405,
7,
18,
17,
701,
703,
486,
1499,
445,
44787,
3975,
4329,
2242,
486,
1499,
445,
2201,
276,
35674,
923,
486,
1499,
445,
7084,
261,
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 |
#[test]
fn test_basic_small() {
let mut map = BTreeMap::new();
assert_eq!(map.remove(&1), None);
assert_eq!(map.len(), 0);
assert_eq!(map.get(&1), None);
assert_eq!(map.get_mut(&1), None);
assert_eq!(map.first_key_value(), None);
assert_eq!(map.last_key_value(), None);
asser... | rust_cleaned_test_functions.jsonl/56331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
31966,
368,
341,
262,
1077,
5206,
2415,
284,
425,
6533,
2227,
486,
931,
543,
1066,
262,
2060,
10714,
10297,
2186,
4850,
2099,
16,
701,
2240,
317,
262,
2060,
10714,
10297,
2186,
19406,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delta_bit_packed_int32_empty() {
let data = vec![vec![0; 0]];
test_delta_bit_packed_decode::<Int32Type>(data);
} | rust_cleaned_test_functions.jsonl/38518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26710,
13996,
620,
11191,
4042,
18,
17,
15124,
368,
341,
286,
1077,
821,
284,
7486,
20703,
4083,
20703,
15,
26,
220,
15,
13204,
286,
1273,
26710,
13996,
620,
11191,
15227,
27638,
1072,
18,
17,
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 |
#[test]
fn test_subscribe() {
delay();
let s = Subscribe {
_type: SubscribeCmd::Subscribe,
product_ids: vec!["BTC-USD".to_string()],
channels: vec![
Channel::Name(ChannelType::Heartbeat),
Channel::WithProduct {
... | rust_cleaned_test_functions.jsonl/118780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88935,
368,
341,
286,
7626,
543,
286,
1077,
274,
284,
27270,
341,
310,
716,
1313,
25,
27270,
15613,
486,
28573,
345,
310,
1985,
8077,
25,
7486,
0,
1183,
59118,
12,
26749,
3263,
983,
3904,
73845,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_roundtrip() {
assert_eq!(
QueryOutputFormat::from_str(&QueryOutputFormat::Pretty.to_string()).unwrap(),
QueryOutputFormat::Pretty
);
assert_eq!(
QueryOutputFormat::from_str(&QueryOutputFormat::Csv.to_string()).unwrap(),
... | rust_cleaned_test_functions.jsonl/76594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
29896,
32981,
368,
341,
286,
2060,
10714,
33673,
310,
11361,
5097,
4061,
486,
1499,
2895,
2099,
2859,
5097,
4061,
486,
51940,
2389,
3904,
6011,
15454,
3148,
310,
11361,
5097,
4061,
486,
51940,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_replacement() {
let (genesis_config, _mint_keypair) = create_genesis_config(0);
let mut bank = Bank::new_for_tests(&genesis_config);
// Setup original program account
let old_address = Pubkey::new_unique();
let new_address = Pubkey::new_unique();
... | rust_cleaned_test_functions.jsonl/28971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 606
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
1288,
16101,
368,
341,
286,
1077,
320,
77894,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
15,
317,
286,
1077,
5206,
6073,
284,
8547,
486,
931,
5478,
32509,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into() {
let raw_pk: [u8; PUBLIC_KEY_SIZE] = [
0x79, 0xce, 0xd, 0xe0, 0x43, 0x33, 0x4a, 0xec, 0xe0, 0x8b, 0x7b, 0xb5, 0x61, 0xbc,
0xe7, 0xc1, 0xd4, 0x69, 0xc3, 0x44, 0x26, 0xec, 0xef, 0xc0, 0x72, 0xa, 0x52, 0x4d,
0x37, 0x32, 0xef, 0xed,
];
... | rust_cleaned_test_functions.jsonl/80376 | {
"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,
45514,
368,
341,
286,
1077,
7112,
33321,
25,
508,
84,
23,
26,
31416,
6600,
4098,
60,
284,
2278,
310,
220,
15,
87,
22,
24,
11,
220,
15,
55963,
11,
220,
15,
9703,
11,
220,
15,
8371,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_demote_program_write_locks() {
let keypair0 = Keypair::new();
let keypair1 = Keypair::new();
let keypair2 = Keypair::new();
let keypair3 = Keypair::new();
let account0 = AccountSharedData::new(1, 0, &Pubkey::default());
let account1 = AccountShare... | rust_cleaned_test_functions.jsonl/13221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69403,
1272,
25096,
9165,
9818,
82,
368,
341,
286,
1077,
1376,
12670,
15,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1376,
12670,
16,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1376,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_address_in_range() {
let f1 = TempFile::new().unwrap().into_file();
f1.set_len(0x400).unwrap();
let f2 = TempFile::new().unwrap().into_file();
f2.set_len(0x400).unwrap();
let start_addr1 = GuestAddress(0x0);
let start_addr2 = GuestAddress(0x800);
... | rust_cleaned_test_functions.jsonl/63917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6744,
1243,
9698,
368,
341,
286,
1077,
282,
16,
284,
19944,
1703,
486,
931,
1005,
15454,
1005,
18122,
2458,
543,
286,
282,
16,
980,
6043,
7,
15,
87,
19,
15,
15,
568,
15454,
543,
286,
1077,
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_serialization() {
let summary = Summary::parse(SERIALIZED_SUMMARY).expect("from_str succeeded");
let summary2 = Summary::parse(SUMMARY2).expect("from_str succeeded");
let diff = summary.diff(&summary2);
let to_serialize = &diff;
static EXPECTED_JSON: &str = r#"{"target-pack... | rust_cleaned_test_functions.jsonl/10247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
2022,
368,
341,
262,
1077,
12126,
284,
21517,
486,
6400,
3759,
640,
88727,
50369,
48870,
568,
17119,
445,
1499,
2895,
25331,
797,
262,
1077,
12126,
17,
284,
21517,
486,
6400,
3759,
2794,
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_inbound_substream_closed() {
let mut rt = Runtime::new().unwrap();
let (_ds_requests_tx, mut ds_notifs_rx, mut peer_mgr_notifs_tx, _peer_mgr_reqs_rx) =
start_direct_send_actor(rt.executor());
let peer_id = PeerId::random();
let (dialer_substream, listener_substream) = M... | rust_cleaned_test_functions.jsonl/81947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 713
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
10891,
5228,
4027,
44697,
368,
341,
262,
1077,
5206,
16677,
284,
10954,
486,
931,
1005,
15454,
1428,
262,
1077,
5453,
5356,
37216,
17805,
11,
5206,
11472,
7913,
21835,
24330,
11,
5206,
14397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_key_prefix() {
let address1 = AccountAddress::new([12u8; AccountAddress::LENGTH]);
let address2 = AccountAddress::new([22u8; AccountAddress::LENGTH]);
let key1 = StateKey::AccessPath(AccessPath::new(address1, b"state_key".to_vec()));
let key2 = StateKey::Acc... | rust_cleaned_test_functions.jsonl/78451 | {
"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,
4387,
3097,
13974,
368,
341,
286,
1077,
2621,
16,
284,
8615,
4286,
486,
931,
2561,
16,
17,
84,
23,
26,
8615,
4286,
486,
65981,
2558,
286,
1077,
2621,
17,
284,
8615,
4286,
486,
931,
2561,
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_fast_retransmit_duplicate_detection_with_data() {
let mut s = socket_established();
s.send_slice(b"abc").unwrap(); // This is lost
recv!(s, time 1000, Ok(TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
payload: ... | rust_cleaned_test_functions.jsonl/91893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 909
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35743,
1288,
1458,
1763,
70434,
57505,
6615,
1769,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
1428,
286,
274,
5219,
26488,
1883,
1,
13683,
1827,
15454,
2129,
442,
1096,
374,
5558... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_circuit_too_many_allowed_nodes() {
let state = setup_splinter_state();
let peer_connector = setup_peer_connector();
let orchestrator = setup_orchestrator();
// set up key registry
let mut key_registry = StorageKeyRegistry::new("memory".to_string()... | rust_cleaned_test_functions.jsonl/124170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 697
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
666,
37268,
2346,
78,
22101,
42155,
14896,
368,
341,
286,
1077,
1584,
284,
6505,
643,
500,
2245,
4387,
543,
286,
1077,
14397,
76393,
284,
6505,
45159,
76393,
543,
286,
1077,
65128,
850,
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_cast_range_i8_min() {
assert_eq!(i8::min_value.to_int(), Some(i8::min_value as int));
assert_eq!(i8::min_value.to_i8(), Some(i8::min_value as i8));
assert_eq!(i8::min_value.to_i16(), Some(i8::min_value as i16));
assert_eq!(i8::min_value.to_i32(), Some(i8::min... | rust_cleaned_test_functions.jsonl/12446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9698,
5318,
23,
7260,
368,
341,
286,
2060,
10714,
10297,
72,
23,
486,
1065,
3142,
2389,
4042,
1507,
220,
4329,
1956,
23,
486,
1065,
3142,
438,
526,
1106,
286,
2060,
10714,
10297,
72,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_time_format() {
let t = NaiveTime::from_hms_nano(3, 5, 7, 98765432);
assert_eq!(t.format("%H,%k,%I,%l,%P,%p").to_string(), "03, 3,03, 3,am,AM");
assert_eq!(t.format("%M").to_string(), "05");
assert_eq!(t.format("%S,%f,%.f").to_string(), "07,098765432,.098765432");... | rust_cleaned_test_functions.jsonl/57982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 826
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
8955,
368,
341,
286,
1077,
259,
284,
12812,
533,
1462,
486,
1499,
1523,
1011,
1089,
5652,
7,
18,
11,
220,
20,
11,
220,
22,
11,
220,
24,
23,
22,
21,
20,
19,
18,
17,
317,
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_report_min_resolved_ts() {
fail::cfg("mock_tick_interval", "return(0)").unwrap();
fail::cfg("mock_collect_tick_interval", "return(0)").unwrap();
fail::cfg("mock_min_resolved_ts_interval", "return(0)").unwrap();
let mut suite = TestSuite::new(1);
let region = suite.cluster.get... | rust_cleaned_test_functions.jsonl/117185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
7260,
4918,
8731,
25023,
368,
341,
262,
3690,
486,
14072,
445,
16712,
43612,
20541,
497,
330,
689,
7,
15,
63554,
15454,
543,
262,
3690,
486,
14072,
445,
16712,
68140,
43612,
20541,
497,
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_vhost_user_net_existing_tap() {
test_vhost_user_net(
Some("vunet-tap0"),
2,
Some(&prepare_vhost_user_net_daemon),
false,
false,
)
} | rust_cleaned_test_functions.jsonl/23970 | {
"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,
2273,
3790,
3317,
19722,
62630,
528,
391,
368,
341,
310,
1273,
2273,
3790,
3317,
19722,
1006,
394,
4329,
445,
85,
359,
295,
2385,
391,
15,
4461,
394,
220,
17,
345,
394,
4329,
2099,
13609,
2273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_aes_siv_key_template() {
tink_daead::init();
let test_cases = vec![("AES256_SIV", tink_daead::aes_siv_key_template())];
for (name, template) in test_cases {
let want = tink_tests::key_template_proto("daead", name).unwrap();
assert_eq!(want, template);
// Chec... | rust_cleaned_test_functions.jsonl/113343 | {
"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,
90958,
643,
344,
3097,
8693,
368,
341,
262,
90584,
47070,
3149,
486,
2327,
543,
262,
1077,
1273,
41427,
284,
7486,
20703,
445,
69168,
17,
20,
21,
1098,
3090,
497,
90584,
47070,
3149,
486,
76584,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_voter_registration() {
let (vote_pubkey, vote_account) = create_test_account();
let vote_state: VoteState = StateMut::<VoteStateVersions>::state(&*vote_account.borrow())
.unwrap()
.convert_to_current();
assert_eq!(vote_state.authorized_voters.len(... | rust_cleaned_test_functions.jsonl/6085 | {
"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,
2273,
25392,
49101,
368,
341,
286,
1077,
320,
29358,
34014,
792,
11,
6910,
13500,
8,
284,
1855,
4452,
13500,
1428,
286,
1077,
6910,
4387,
25,
34034,
1397,
284,
3234,
51440,
27638,
41412,
1397,
690... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_is_new() {
numid!(@CloneIsNew struct Test);
let t = Test::new();
assert_ne!(t, t.clone());
let tt = Test::create_lower(0);
assert_ne!(tt, tt.clone());
} | rust_cleaned_test_functions.jsonl/10272 | {
"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,
54742,
6892,
5921,
368,
341,
286,
1629,
307,
0,
5957,
37677,
3872,
3564,
2036,
3393,
317,
286,
1077,
259,
284,
3393,
486,
931,
543,
286,
2060,
13925,
10297,
83,
11,
259,
15997,
1423,
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 |
#[test]
fn test_create_tx_both_non_witness_utxo_and_witness_utxo() {
let (wallet, _, _) =
get_funded_wallet("wsh(pk(cVpPVruEDdmutPzisEsYvtST1usBR3ntr8pXSyt6D2YYqXRyPcFW))");
let addr = wallet.get_new_address().unwrap();
let (psbt, _) = wallet
.create_tx(
... | rust_cleaned_test_functions.jsonl/11344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
88819,
21637,
1670,
8091,
60363,
40822,
8378,
1670,
8091,
60363,
40822,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
4035,
310,
633,
761,
36053,
62308,
445,
86,
927,
39928,
1337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing_zero_word_count() {
let mut v = ZERO_BOUND_HEADER.to_vec();
v.append(&mut vec![0x00, 0x00, 0x00, 0x00]); // OpNop with word count 0
let mut c = RetainingConsumer::new();
let p = Parser::new(&v, &mut c);
// The first instruction starts at byte offse... | rust_cleaned_test_functions.jsonl/85736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
19359,
13533,
3180,
368,
341,
286,
1077,
5206,
348,
284,
54593,
73644,
20330,
2389,
13251,
543,
286,
348,
2057,
2099,
6984,
7486,
20703,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_downcast_trait_object() {
trait T<'a>: Tid<'a> {}
#[derive(Tid)]
struct S<'a>(&'a str);
impl<'a> T<'a> for S<'a> {}
let s = String::from("xx");
let orig = S(&s);
let to = &orig as &dyn T;
let downcasted = to.downcast_ref::<S>().unwrap();
assert_eq!(orig.0, dow... | rust_cleaned_test_functions.jsonl/16590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13998,
3829,
78491,
5314,
368,
341,
262,
17567,
350,
18291,
64,
26818,
350,
307,
18291,
64,
29,
5613,
262,
11506,
27098,
4140,
307,
5563,
262,
2036,
328,
18291,
64,
44784,
6,
64,
607,
317,
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... | 2 |
#[test]
fn test_lookup_namespace_uri() {
let xml = xml("x", "http://foo.com");
assert!(xml.lookup_namespace_uri("y").is_none());
assert_eq!(xml.lookup_namespace_uri("x").unwrap(), "http://foo.com");
} | rust_cleaned_test_functions.jsonl/33772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
41571,
15572,
368,
341,
286,
1077,
8396,
284,
8396,
445,
87,
497,
330,
1254,
1110,
7975,
905,
797,
286,
2060,
10297,
6455,
39937,
41571,
15572,
445,
88,
1827,
285,
31488,
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 |
#[test]
fn test_scans_escaped_strings() {
let mut scanner = Scanner::new(
"<?php
$a = 'aa\\'a';
$b = \"d\\\"dd\";
",
);
scanner.scan().unwrap();
assert_eq!(
token_list!(scanner.tokens),
"<?php $a = 'aa\\'a' ; $... | rust_cleaned_test_functions.jsonl/52949 | {
"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,
13171,
596,
62,
65826,
33500,
368,
341,
286,
1077,
5206,
20775,
284,
17170,
486,
931,
1006,
310,
40271,
1208,
198,
310,
400,
64,
284,
364,
5305,
3422,
6,
64,
1010,
310,
400,
65,
284,
7245,
67,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_by_program_slot() {
let accounts = Accounts::new(Vec::new(), &ClusterType::Development);
// Load accounts owned by various programs into AccountsDB
let pubkey0 = solana_sdk::pubkey::new_rand();
let account0 = Account::new(1, 0, &Pubkey::new(&[2; 32]));
... | rust_cleaned_test_functions.jsonl/82602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
3710,
25096,
27563,
368,
341,
286,
1077,
9618,
284,
40655,
486,
931,
49923,
486,
931,
1507,
609,
28678,
929,
486,
39419,
626,
286,
442,
8893,
9618,
12938,
553,
5257,
7468,
1119,
40655,
3506... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_put_response() {
#[derive(Apiv2Schema, serde::Serialize)]
struct Person {
first_name: String,
last_name: String,
}
#[api_v2_errors(code = 400, description = "Bad request", code = 404, description = "Not found")]
#[derive(Debug, thiserror::Error)]
enum Per... | rust_cleaned_test_functions.jsonl/87613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
9655,
368,
341,
262,
11506,
27098,
4346,
79,
344,
17,
8632,
11,
61570,
486,
15680,
5563,
262,
2036,
7357,
341,
286,
1156,
1269,
25,
923,
345,
286,
1537,
1269,
25,
923,
345,
262,
555,
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_argsiter() {
static ARGS: [(ArgInfo, u8); 7] = [
flag!("-bar", 1),
take_arg!("-foo", String, Separated, 2),
flag!("-fuga", 3),
take_arg!("-hoge", Path, Concatenated, 4),
flag!("-plop", 5),
take_arg!("-qux", String, C... | rust_cleaned_test_functions.jsonl/108773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1726
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
2015,
368,
341,
286,
1099,
84149,
25,
17826,
2735,
1731,
11,
575,
23,
1215,
220,
22,
60,
284,
2278,
310,
5181,
0,
13645,
2257,
497,
220,
16,
1326,
310,
1896,
6057,
0,
13645,
7975,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_query_conversion_no_resource_type() {
let sr = meta_search::SearchRequest {
key: Some("key".to_string()),
resource_type: None,
conditions: vec![meta_search::FieldQuery {
key: "fancy_key".to_owned(),
query: "\"fancy_value... | rust_cleaned_test_functions.jsonl/113861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
64132,
6536,
17962,
1819,
368,
341,
286,
1077,
18962,
284,
8823,
10716,
486,
5890,
1900,
341,
310,
1376,
25,
4329,
445,
792,
3263,
983,
3904,
14702,
310,
5101,
1819,
25,
2240,
345,
310,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_macro() {
let m = map!{1=>"1",2=>"2"};
match m.get(&1) {
Some(&i) if i == "1" => (),
_ => assert!(false),
}
} | rust_cleaned_test_functions.jsonl/105361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
58810,
368,
341,
262,
1077,
296,
284,
2415,
0,
90,
16,
44488,
16,
497,
17,
44488,
17,
26690,
1066,
262,
2432,
296,
670,
2099,
16,
8,
341,
286,
4329,
2099,
72,
8,
421,
600,
621,
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
] | 3 |
#[test]
fn test_range_with_prefix_wrapover() {
let mut storage = MockStorage::new();
let prefix = to_length_prefixed(b"f\xff\xff");
let other_prefix = to_length_prefixed(b"f\xff\x44");
// set some values in this range
set_with_prefix(&mut storage, &prefix, b"bar... | rust_cleaned_test_functions.jsonl/83834 | {
"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,
9698,
6615,
13974,
38550,
1975,
368,
341,
286,
1077,
5206,
5819,
284,
14563,
5793,
486,
931,
543,
1789,
286,
1077,
9252,
284,
311,
5118,
43331,
3286,
1883,
96171,
86977,
86977,
797,
286,
1077,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_msg(){
let reference_1 = Package::Msg(MessagePackage{
key: "SOME KEY".to_string(),
payload: vec![1, 2, 3, 4, 5],
});
let reference_2 = Package::Msg(MessagePackage{
key: "".to_string(),
payload: vec![],
});
le... | rust_cleaned_test_functions.jsonl/124207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6483,
3032,
286,
1077,
5785,
62,
16,
284,
16906,
486,
6611,
29359,
13100,
515,
310,
1376,
25,
330,
50,
11408,
12013,
3263,
983,
3904,
3148,
310,
7729,
25,
7486,
20703,
16,
11,
220,
17,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_sys_errno() {
let eperm = errno::Errno(1);
let err = ErrorKind::Sys(eperm);
assert!(err.description().contains("syscall failed"));
assert!(format!("{}", err).contains("Operation not permitted"));
} | rust_cleaned_test_functions.jsonl/24662 | {
"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,
20344,
37363,
368,
341,
262,
1077,
384,
19913,
284,
26955,
486,
7747,
2152,
7,
16,
317,
262,
1077,
1848,
284,
4600,
10629,
486,
32792,
2026,
19913,
317,
262,
2060,
10297,
615,
13178,
1005,
13372,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_metadata_tf1x_simple_value() {
let md = pb::SummaryMetadata {
plugin_data: Some(PluginData {
plugin_name: "ignored_plugin".to_string(),
content: Bytes::from_static(b"ignored_content"),
..Default::default()
... | rust_cleaned_test_functions.jsonl/6191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22220,
47719,
16,
87,
30015,
3142,
368,
341,
310,
1077,
10688,
284,
17310,
486,
19237,
14610,
341,
394,
9006,
1769,
25,
4329,
7,
11546,
1043,
341,
503,
9006,
1269,
25,
330,
58471,
23110,
3263,
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_instance_lookup() {
// be the only thing we should permit
qext(&mut Polar::new(), "new a(x: 1).x = 1", values![1], 1);
} | rust_cleaned_test_functions.jsonl/97622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11904,
27464,
368,
341,
1066,
262,
442,
387,
279,
1172,
3166,
582,
1265,
11549,
198,
262,
2804,
427,
2099,
6984,
55896,
486,
931,
1507,
330,
931,
264,
2075,
25,
220,
16,
568,
87,
284,
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 |
#[test]
fn test_sign_and_verify_message_tsig_reject_keyname() {
let (mut question, signer) = get_message_and_signer();
let other_name: Name = Name::from_ascii("other_name").unwrap();
let mut signature = question.take_signature().remove(0);
signature.set_name(other_name);
... | rust_cleaned_test_functions.jsonl/36502 | {
"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,
11172,
8378,
35638,
6462,
528,
21339,
1288,
583,
3097,
606,
368,
341,
286,
1077,
320,
6984,
3405,
11,
70039,
8,
284,
633,
6462,
8378,
11172,
261,
1428,
286,
1077,
1008,
1269,
25,
3988,
284,
3988... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_check_merged_message() {
let mut cluster = new_node_cluster(0, 4);
configure_for_merge(&mut cluster);
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
cluster.run_conf_change();
cluster.must_put(b"k1", b"v1");
cluster.must_p... | rust_cleaned_test_functions.jsonl/27246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
7200,
90702,
6462,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
19,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
1077,
7744,
8179,
284,
19689,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_identifiers() {
let mut decoder = Decoder::new(from_str("null").unwrap());
let v: () = Decodable::decode(&mut decoder).unwrap();
assert_eq!(v, ());
let mut decoder = Decoder::new(from_str("true").unwrap());
let v: bool = Decodable::decode(&mut deco... | rust_cleaned_test_functions.jsonl/111027 | {
"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,
15227,
38399,
11836,
368,
341,
286,
1077,
5206,
24551,
284,
50472,
486,
931,
17016,
2895,
445,
2921,
1827,
15454,
1423,
286,
1077,
348,
25,
1719,
284,
3714,
69129,
486,
18196,
2099,
6984,
24551,
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_show_line_number() {
let mut pane = gen_pane!(OpenOptions::new().write(true).open("/dev/null").unwrap());
pane.show_line_number(true);
assert_eq!(pane.show_linenumber, true);
pane.show_line_number(false);
assert_eq!(pane.show_linenumber, false);
} | rust_cleaned_test_functions.jsonl/1685 | {
"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,
15267,
6528,
5500,
368,
341,
286,
1077,
5206,
37322,
284,
4081,
620,
2145,
10297,
5002,
3798,
486,
931,
1005,
4934,
3715,
568,
2508,
4283,
3583,
19293,
1827,
15454,
1423,
286,
37322,
5460,
6528,
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_rand_new_with_seed() {
let tests = vec![
(0, 0.15522042769493574, 0.620881741513388),
(1, 0.40540353712197724, 0.8716141803857071),
(-1, 0.9050373219931845, 0.37014932126752037),
(9223372036854775807, 0.9050373219931845, 0.37014932126752037... | rust_cleaned_test_functions.jsonl/9511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33864,
5921,
6615,
33809,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
15,
11,
220,
15,
13,
16,
20,
20,
17,
17,
15,
19,
17,
22,
21,
24,
19,
24,
18,
20,
22,
19,
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,
1... | 2 |
#[test]
fn test_mp4() {
let format = FileFormat::from_file("fixtures/video/sample.mp4").unwrap();
assert_eq!(format, FileFormat::Mpeg4Part14Video);
} | rust_cleaned_test_functions.jsonl/115188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39898,
19,
368,
341,
262,
1077,
3561,
284,
2887,
4061,
486,
1499,
2458,
445,
45247,
41303,
69851,
16870,
19,
1827,
15454,
543,
262,
2060,
10714,
10297,
2243,
11,
2887,
4061,
486,
44,
10311,
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 |
#[test]
fn test_rb_node() {
let parent_node = Rc::new(RefCell::new(RBTreeNode {
label: Label::from_str("com").unwrap(),
rr_sets: Default::default(),
parent: None,
subtree: None,
}));
let node = Rc::new(RefCell::new(RBTreeNode {
... | rust_cleaned_test_functions.jsonl/29050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68544,
5084,
368,
341,
286,
1077,
2681,
5084,
284,
81463,
486,
931,
7,
3945,
3599,
486,
931,
2785,
33,
26597,
341,
310,
2383,
25,
9402,
486,
1499,
2895,
445,
874,
1827,
15454,
3148,
310,
34393,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_play() {
let mut sudoku = create_sudoku(TEST_VALUES);
assert_eq!(sudoku.play(0, 10), PlayResult::InvalidInput);
assert_eq!(sudoku.play(100, 0), PlayResult::InvalidInput);
assert_eq!(sudoku.play(0, 7), PlayResult::InvalidMove);
assert_eq!(sudoku.play(0, 4)... | rust_cleaned_test_functions.jsonl/58576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22144,
368,
341,
286,
1077,
5206,
90809,
284,
1855,
643,
68302,
50320,
58662,
626,
286,
2060,
10714,
10297,
82,
68302,
12972,
7,
15,
11,
220,
16,
15,
701,
7054,
2077,
486,
7928,
2505,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
let num0 = Number::new("[[[[4,3],4],4],[7,[[8,4],9]]]");
let num1 = Number::new("[1,1]");
let result = num0.add(num1);
assert_eq!(result, Number::new("[[[[0,7],4],[[7,8],[6,0]]],[8,1]]"));
} | rust_cleaned_test_functions.jsonl/100424 | {
"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,
2891,
368,
341,
286,
1077,
1629,
15,
284,
5624,
486,
931,
10937,
15505,
58,
19,
11,
18,
1125,
19,
1125,
19,
14955,
22,
11,
15505,
23,
11,
19,
1125,
24,
5053,
37389,
286,
1077,
1629,
16,
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_protocol_state_chain_epoch_slot() {
let mut c: ProtocolStateChain = ProtocolStateChain(vec![]);
let mut b0: ProtocolState = Default::default();
b0.body.consensus_state.blockchain_length = Length(0);
b0.body.consensus_state.curr_global_slot = GlobalSlot {
... | rust_cleaned_test_functions.jsonl/16444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34880,
4387,
30583,
20682,
27563,
368,
341,
286,
1077,
5206,
272,
25,
24572,
1397,
18837,
284,
24572,
1397,
18837,
25592,
0,
1294,
626,
286,
1077,
5206,
293,
15,
25,
24572,
1397,
284,
7899,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_essential_files() {
let _ = env_logger::try_init();
let options = DocBuilderOptions::from_prefix(PathBuf::from("../cratesfyi-prefix"));
let docbuilder = DocBuilder::new(options);
docbuilder.add_essential_files().unwrap();
} | rust_cleaned_test_functions.jsonl/31380 | {
"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,
2891,
62,
48482,
10931,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
543,
286,
1077,
2606,
284,
21709,
3297,
3798,
486,
1499,
13974,
33030,
15064,
486,
1499,
17409,
5082,
973,
3059... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_proposals() {
let pool = create_connection_pool_and_migrate();
let store = DieselAdminServiceStore::new(pool);
let proposal = create_proposal();
store
.add_proposal(proposal.clone())
.expect("Unable to add circuit proposal");
... | rust_cleaned_test_functions.jsonl/564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
3062,
21663,
85975,
368,
341,
286,
1077,
7314,
284,
1855,
15866,
15709,
8378,
717,
34479,
1428,
286,
1077,
3553,
284,
53794,
7210,
1860,
6093,
486,
931,
41838,
626,
286,
1077,
13734,
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_eval_unary_function_raw_column() {
#[rpn_fn(nullable)]
fn foo(v: Option<&i64>) -> Result<Option<i64>> {
Ok(Some(v.unwrap() + 5))
}
let mut ctx = EvalContext::default();
let mut columns = LazyBatchColumnVec::from(vec![{
let ... | rust_cleaned_test_functions.jsonl/92664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 947
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
4907,
658,
9174,
16067,
8744,
368,
341,
394,
11506,
81,
19958,
15246,
34885,
5563,
286,
5168,
15229,
3747,
25,
6959,
52244,
72,
21,
19,
9231,
1464,
5714,
94150,
21897,
21,
19,
2452,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_material_set_should_parse_correct_specular_exponents() {
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 res... | rust_cleaned_test_functions.jsonl/53123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
33884,
2602,
43378,
21039,
31550,
13594,
1276,
2702,
2700,
368,
341,
262,
1077,
7032,
284,
1273,
41427,
1428,
262,
369,
1273,
304,
7032,
19471,
368,
341,
286,
1077,
5206,
6729,
284,
21102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_leader_transfer_remove_node() -> Result<()> {
let l = default_logger();
let mut nt = Network::new(vec![None, None, None], &l);
nt.send(vec![new_message(1, 1, MessageType::MsgHup, 0)]);
nt.ignore(MessageType::MsgTimeoutNow);
// The lead_transferee is removed when leadship tr... | rust_cleaned_test_functions.jsonl/19168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
35403,
18193,
5084,
368,
1464,
5714,
71698,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
31412,
284,
8141,
486,
931,
25592,
20703,
4064,
11,
2240,
11,
2240,
1125,
609,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_look_at_lh() {
let direction = Vector3::new(1.0, 1.0, 1.0).normalize();
let up = Vector3::unit_y();
let unit_z = Vector3::unit_z();
let look_at = Matrix3x3::look_at_lh(&direction, &up);
let expected = unit_z;
let result = look_at * direction;
... | rust_cleaned_test_functions.jsonl/129068 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24271,
3752,
907,
71,
368,
341,
286,
1077,
5106,
284,
4196,
18,
486,
931,
7,
16,
13,
15,
11,
220,
16,
13,
15,
11,
220,
16,
13,
15,
568,
30590,
543,
286,
1077,
705,
284,
4196,
18,
486,
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... | 1 |
#[test]
fn test_same_size() {
let haystack = "111 a 111b";
let needle = "111 a 1 1b";
search_test!(haystack, needle, None);
} | rust_cleaned_test_functions.jsonl/19387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
2368,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
876,
286,
1077,
30309,
284,
330,
16,
16,
16,
264,
220,
16,
220,
16,
65,
876,
286,
2711,
4452,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_comment_multi_line_5() {
let code = r#";();"#;
let tokenization_result = tokenize(code);
let tokens = tokenization_result.unwrap();
assert_eq_code_and_tokens_length(code, &tokens);
assert!(tokens.len() == 1);
let token = &tokens[0];
as... | rust_cleaned_test_functions.jsonl/116456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17638,
25133,
6528,
62,
20,
368,
341,
286,
1077,
2038,
284,
435,
2,
5123,
2129,
57676,
401,
286,
1077,
3950,
2022,
5287,
284,
77651,
15842,
317,
286,
1077,
11211,
284,
3950,
2022,
5287,
55395,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_i32() -> Result<()> {
let array = Int32Array::from(vec![1, 2]);
let cmp = build_compare(&array, &array)?;
assert_eq!(Ordering::Less, (cmp)(0, 1));
Ok(())
} | rust_cleaned_test_functions.jsonl/7134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
18,
17,
368,
1464,
5714,
71698,
341,
286,
1077,
1334,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
16,
11,
220,
17,
10149,
286,
1077,
26089,
284,
1936,
32235,
2099,
1653,
11,
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... | 2 |
#[test]
fn test_index_data() {
let mut foo = dummy_team("foo");
foo.kind = TeamKind::WorkingGroup;
let data = Data::dummy(vec![foo, dummy_team("bar")]);
let res = data.index_data().unwrap();
assert_eq!(res.teams.len(), 1);
assert_eq!(res.teams[0].url, "teams/bar"... | rust_cleaned_test_functions.jsonl/33045 | {
"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,
3560,
1769,
368,
341,
286,
1077,
5206,
15229,
284,
17292,
26532,
445,
7975,
797,
286,
15229,
36632,
284,
7909,
10629,
486,
33978,
2808,
280,
286,
1077,
821,
284,
2885,
486,
31390,
25592,
20703,
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... | 1 |
#[test]
fn test_clear_ip_cache() {
let keypair = Keypair::new();
let mut drone = Drone::new(keypair, None, None);
let ip = "127.0.0.1".parse().expect("create IpAddr from string");
assert_eq!(drone.ip_cache.len(), 0);
drone.add_ip_to_cache(ip);
assert_eq!(drone.ip_... | rust_cleaned_test_functions.jsonl/123513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
10385,
11529,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
26713,
284,
73481,
486,
931,
4857,
12670,
11,
2240,
11,
2240,
317,
286,
1077,
5997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_block_with_depth_commitment() {
// Build BlockCommitmentCache with votes at depths 0 and 1 for 2 slots
let mut cache0 = BlockCommitment::default();
cache0.increase_confirmation_stake(1, 15);
cache0.increase_confirmation_stake(2, 25);
let mut cache1 = ... | rust_cleaned_test_functions.jsonl/65256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 831
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7113,
6615,
19061,
36346,
478,
368,
341,
286,
442,
7854,
8362,
33441,
478,
8233,
448,
12684,
518,
42857,
220,
15,
323,
220,
16,
369,
220,
17,
15711,
198,
286,
1077,
5206,
6500,
15,
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_wifi() {
let dev = LinuxIPLinkInterface {
ifname: "wlp3s0".to_string(),
link_type: "ether".to_string(),
operstate: OperState::UP,
flags: vec![],
};
assert![WifiLinuxIPLinkInterface::try_from(dev.clone()).is_ok()];
a... | rust_cleaned_test_functions.jsonl/33475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71495,
368,
341,
286,
1077,
3483,
284,
14340,
40,
2916,
766,
5051,
341,
310,
421,
606,
25,
330,
86,
13545,
18,
82,
15,
3263,
983,
3904,
3148,
310,
2656,
1819,
25,
330,
2723,
3263,
983,
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_eq() {
let mut n: ImmutSList<u8> = list_from(&[]);
let mut m = list_from(&[]);
assert!(n == m);
n = n.append(1);
assert!(n != m);
m = m.append(1);
assert!(n == m);
let n = list_from(&[2,3,4]);
let m = list_from(&[1,2,3]);
... | rust_cleaned_test_functions.jsonl/64464 | {
"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,
10714,
368,
341,
286,
1077,
5206,
308,
25,
2362,
6984,
50,
852,
34837,
23,
29,
284,
1140,
5673,
2099,
56703,
286,
1077,
5206,
296,
284,
1140,
5673,
2099,
56703,
286,
2060,
10297,
77,
621,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_woff2_transformed_hmtx_table() {
with_woff2_hmtx_table("tests/fonts/woff2/roundtrip-hmtx-lsb-001.woff2", |hmtx| {
// The expected values were determined as follows:
// then examining the TTX file:
// <hmtx>
// <mtx name=".notdef" width="4... | rust_cleaned_test_functions.jsonl/40132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 749
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
68585,
17,
18449,
291,
1523,
90310,
5237,
368,
341,
262,
448,
62,
68585,
17,
1523,
90310,
5237,
445,
23841,
60667,
14,
68585,
17,
14,
1049,
32981,
2832,
90310,
2852,
16892,
12,
15,
15,
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_first_1() {
let elem: Element = XML.parse().unwrap();
let sub1 = super::find_subnodes(&elem, "Containers");
assert_eq!(1, sub1.len());
let sub2 = super::find_subnodes(&sub1[0], "Container");
assert_eq!(2, sub2.len());
} | rust_cleaned_test_functions.jsonl/124948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12978,
62,
16,
368,
341,
286,
1077,
11750,
25,
8543,
284,
11874,
4632,
1005,
15454,
1428,
286,
1077,
1186,
16,
284,
2256,
486,
3903,
5228,
20008,
2099,
18871,
11,
330,
74632,
797,
286,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drain_size_hint() {
let mut list = VecList::new();
list.push_back(0);
list.push_back(1);
list.push_back(-1);
list.push_back(2);
list.push_back(-2);
let mut drain = list.drain();
assert_eq!(drain.size_hint(), (5, Some(5)));
... | rust_cleaned_test_functions.jsonl/11489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
2368,
45825,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
3895,
7,
15,
317,
286,
1140,
2552,
3895,
7,
16,
317,
286,
1140,
2552,
3895,
4080,
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_fq_negate() {
{
let mut a = Fq::zero();
a.negate();
assert!(a.is_zero());
}
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06,
0xbc, 0xe5,... | rust_cleaned_test_functions.jsonl/2330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
28209,
349,
368,
341,
286,
341,
310,
1077,
5206,
264,
284,
434,
80,
486,
14154,
543,
310,
264,
79219,
349,
1428,
310,
2060,
10297,
64,
2079,
19359,
1423,
286,
555,
286,
1077,
5206,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_error_record() {
let expected = vec![
1, 0, 0, 0, 255, 255, 255, 255, 10, 0, 0, 0, 69, 114, 114, 111, 114, 32,
32, 32,
];
let err_record = ErrorRecord {
promise_id: 1,
arg: -1,
error_code: 10,
error_message: "Error".to_string().as_bytes().to_owned(),
};
let buf:... | rust_cleaned_test_functions.jsonl/97340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
14192,
368,
341,
220,
1077,
3601,
284,
7486,
90515,
262,
220,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
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... | 1 |
#[test]
fn test_keywords_in_match_arm() {
check(
r#"
fn quux() -> i32 {
match () { () => $0 }
}
"#,
expect![[r#"
kw match
kw while
kw while let
kw loop
kw if
kw if let
... | rust_cleaned_test_functions.jsonl/17380 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
1243,
10708,
34680,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
8822,
922,
2200,
368,
1464,
600,
18,
17,
341,
262,
2432,
1719,
314,
1719,
589,
400,
15,
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_update_gc_purged_slot() {
let key = Keypair::new();
let index = AccountsIndex::<bool>::default_for_tests();
let mut gc = Vec::new();
index.upsert(
0,
&key.pubkey(),
&Pubkey::default(),
&[],
&AccountSecond... | rust_cleaned_test_functions.jsonl/99734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
49423,
620,
324,
3556,
27563,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
5478,
32509,
543,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_currency_prefix() {
use Currency;
assert_eq!("bc".parse::<Currency>(), Ok(Currency::Bitcoin));
assert_eq!("tb".parse::<Currency>(), Ok(Currency::BitcoinTestnet));
assert_eq!("bcrt".parse::<Currency>(), Ok(Currency::Regtest));
assert_eq!("sb".parse::<Currency>(), Ok(Currency::Sim... | rust_cleaned_test_functions.jsonl/123242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
34710,
13974,
368,
341,
197,
41819,
28453,
401,
197,
6948,
10714,
17223,
8904,
3263,
6400,
27638,
26321,
39019,
7622,
3025,
5088,
486,
48287,
1106,
197,
6948,
10714,
17223,
18387,
3263,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterations_without_errors() {
let it: PageIterator<u64, u64> = PageIterator::new(
Box::new(|key, limit| {
let start = key.unwrap_or(0);
Ok(Page {
items: (start..start + limit).collect(),
next_page_key: if... | rust_cleaned_test_functions.jsonl/114314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55607,
39904,
20196,
368,
341,
286,
1077,
432,
25,
5755,
11951,
34837,
21,
19,
11,
575,
21,
19,
29,
284,
5755,
11951,
486,
931,
1006,
310,
8261,
486,
931,
22428,
792,
11,
3930,
91,
341,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_iterator_rev_nth() {
let v: &[_] = &[0, 1, 2, 3, 4];
for i in 0..v.len() {
assert_eq!(v.iter().rev().nth(i).unwrap(), &v[v.len() - 1 - i]);
}
assert_eq!(v.iter().rev().nth(v.len()), None);
} | rust_cleaned_test_functions.jsonl/54112 | {
"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,
13491,
38082,
78342,
368,
341,
262,
1077,
348,
25,
609,
13496,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
369,
600,
304,
220,
15,
496,
85,
19406,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_write_headers_orig_case_empty_value() {
let mut headers = HeaderMap::new();
let name = http::header::HeaderName::from_static("x-empty");
headers.insert(&name, "".parse().expect("parse empty"));
let mut orig_cases = HeaderCaseMap::default();
orig_cases.inse... | rust_cleaned_test_functions.jsonl/7674 | {
"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,
9165,
26719,
35328,
19096,
15124,
3142,
368,
341,
286,
1077,
5206,
7102,
284,
12104,
2227,
486,
931,
543,
286,
1077,
829,
284,
1758,
486,
2708,
486,
4047,
675,
486,
1499,
25360,
445,
87,
39433,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_slice() {
let s = Secp256k1::new();
assert_eq!(Signature::from_der(&s, &[0; constants::MAX_SIGNATURE_SIZE + 1]),
Err(InvalidSignature));
assert_eq!(Signature::from_der(&s, &[0; constants::MAX_SIGNATURE_SIZE]),
Err(InvalidSignature... | rust_cleaned_test_functions.jsonl/13556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
26488,
368,
341,
286,
1077,
274,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
2060,
10714,
10297,
25088,
486,
1499,
35345,
2099,
82,
11,
44590,
15,
26,
18021,
486,
10586,
7375... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_sequences() {
let reader = IndexedReader::new(io::Cursor::new(FASTA_FILE), FAI_FILE).unwrap();
let sequences = reader.index.sequences();
assert_eq!(sequences.len(), 2);
assert_eq!(
sequences[0],
Sequence {
name: "id".... | rust_cleaned_test_functions.jsonl/62828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
58732,
368,
341,
286,
1077,
6604,
284,
8008,
17120,
486,
931,
37258,
486,
14543,
486,
931,
7,
59206,
32,
8087,
701,
15008,
40,
8087,
568,
15454,
1428,
286,
1077,
23700,
284,
6604,
5154,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arrow_multi_left() {
let text = "And It tilted Its vanes and ennobled Its spires ->";
let text: Vec<_> = text.split_whitespace().collect();
let (a, b) = parse_arrow(&text).unwrap();
assert_eq!(a, &text[..text.len() - 1]);
assert!(b.is_empty());
} | rust_cleaned_test_functions.jsonl/65979 | {
"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,
21039,
46566,
25133,
9579,
368,
341,
286,
1077,
1467,
284,
330,
3036,
1084,
85917,
11445,
5242,
288,
323,
662,
55023,
832,
11445,
978,
3861,
1464,
876,
286,
1077,
1467,
25,
11312,
32399,
29,
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_build_request_json() {
let test_request = RpcRequest::GetAccountInfo;
let request = test_request.build_request_json(
1,
Some(json!("deadbeefXjn8o3yroDHxUtKsZZgoy4GPkPPXfouKNHhx")),
);
assert_eq!(request["method"], "getAccountInfo");
... | rust_cleaned_test_functions.jsonl/82110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 746
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
7893,
9455,
368,
341,
286,
1077,
1273,
7893,
284,
79961,
1900,
486,
1949,
7365,
1731,
280,
286,
1077,
1681,
284,
1273,
7893,
13239,
7893,
9455,
1006,
310,
220,
16,
345,
310,
4329,
9304,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_var() -> Result<()> {
let var = Var::new("local".to_string(), Type::null(), Span::null());
let text = as_text(var.clone());
assert!(text.contains("%local"));
Ok(())
} | rust_cleaned_test_functions.jsonl/110961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
368,
1464,
5714,
71698,
341,
286,
1077,
762,
284,
8735,
486,
931,
445,
2438,
3263,
983,
3904,
1507,
3990,
486,
2921,
1507,
11903,
486,
2921,
1423,
286,
1077,
1467,
284,
438,
4326,
7537,
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 |
#[test]
fn test_split_with_intersections() {
// This is a reduced test case that was showing a bug where duplicate intersections
// inconsistent state when insert_edge was called.
let mut builder = Path::builder();
builder.begin(point(-21.004179, -71.57515));
builder.line_to(point(-21... | rust_cleaned_test_functions.jsonl/102417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
6615,
15318,
24661,
368,
341,
262,
442,
1096,
374,
264,
11046,
1273,
1142,
429,
572,
9027,
264,
9876,
1380,
22513,
64257,
7213,
262,
442,
39140,
1584,
979,
5656,
17932,
572,
2598,
382,
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_exclude_ip_v4_mapped_ip_v6_not_supported() {
let filter = Filter {
exclude_private_ips: true,
exclude_link_local_ips: true,
..Filter::default()
};
assert!(!filter.is_excluded(&website(V6_MAPPED_V4_PRIVATE_CLASS_A)));
a... | rust_cleaned_test_functions.jsonl/65573 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88668,
10385,
2273,
19,
91933,
10385,
2273,
21,
7913,
57885,
368,
341,
286,
1077,
4051,
284,
12339,
341,
310,
21687,
26249,
71074,
25,
830,
345,
310,
21687,
7233,
13564,
71074,
25,
830,
345,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_fps_copy() {
let src = [
11, 12, 13,
21, 22, 23,
31, 32, 33 ];
let expected = [
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 11, 11, 12, 12, 13, 13,
0, 0, 11, 11, 12, 12, 13, 13,
0, 0, 21, 21, 22, 22, 23... | rust_cleaned_test_functions.jsonl/104180 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
65163,
16096,
368,
341,
286,
1077,
2286,
284,
2278,
310,
220,
16,
16,
11,
220,
16,
17,
11,
220,
16,
18,
345,
310,
220,
17,
16,
11,
220,
17,
17,
11,
220,
17,
18,
345,
310,
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_scalar_mul1() {
let base_point = Secp256r1Point::generator();
let int: Secp256r1Scalar = ECScalar::from(&BigInt::from(1));
let test = base_point * int;
assert_eq!(
test.x_coor().unwrap().to_hex(),
"6B17D1F2E12C4247F8BCE6E563A440F277037D812D... | rust_cleaned_test_functions.jsonl/12367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
24944,
16,
368,
341,
286,
1077,
2331,
6085,
284,
4520,
79,
17,
20,
21,
81,
16,
2609,
486,
35851,
543,
286,
1077,
526,
25,
4520,
79,
17,
20,
21,
81,
16,
20639,
284,
20633,
20639,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_object() {
assert_eq!(from_str("{"), Err(SyntaxError(EOFWhileParsingObject, 1, 2)));
assert_eq!(from_str("{ "), Err(SyntaxError(EOFWhileParsingObject, 1, 3)));
assert_eq!(from_str("{1"), Err(SyntaxError(KeyMustBeAString, 1, 2)));
assert_e... | rust_cleaned_test_functions.jsonl/6552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5314,
368,
341,
286,
2060,
10714,
10297,
1499,
2895,
13976,
3975,
981,
15495,
93549,
1454,
7,
23483,
7983,
68839,
1190,
11,
220,
16,
11,
220,
17,
4945,
286,
2060,
10714,
10297,
1499,
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_remove_aux() {
let mut bam = Reader::from_path(&Path::new("test/test.bam"))
.ok()
.expect("Error opening file.");
for record in bam.records() {
let mut rec = record.expect("Expected valid record");
if rec.aux(b"XS").is_some() {
... | rust_cleaned_test_functions.jsonl/34029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
30468,
368,
341,
286,
1077,
5206,
41304,
284,
25166,
486,
1499,
2638,
2099,
1820,
486,
931,
445,
1944,
12697,
71804,
5455,
310,
659,
562,
741,
310,
659,
17119,
445,
1454,
8568,
1034,
30458,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize() {
let method = Method::AES128GCM;
let serialized_method = serde_json::to_string(&method).unwrap();
assert_eq!(serialized_method, r#""aes-128-gcm""#);
let method = Method::AES256GCM;
let serialized_method = serde_json::to_string(&method).unwrap... | rust_cleaned_test_functions.jsonl/551 | {
"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,
88686,
368,
341,
286,
1077,
1714,
284,
6730,
486,
69168,
16,
17,
23,
38,
9985,
280,
286,
1077,
32916,
9032,
284,
61570,
9455,
486,
983,
3904,
2099,
4393,
568,
15454,
543,
286,
2060,
10714,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_by() {
let xs: &[isize] = &[-3, 0, 1, 5, -10];
assert_eq!(*xs.iter().min_by(|x, y| x.abs().cmp(&y.abs())).unwrap(), 0);
} | rust_cleaned_test_functions.jsonl/25938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
3710,
368,
341,
262,
1077,
11943,
25,
44590,
285,
551,
60,
284,
609,
7609,
18,
11,
220,
15,
11,
220,
16,
11,
220,
20,
11,
481,
16,
15,
935,
262,
2060,
10714,
0,
4071,
18561,
19471,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3_cmp() {
assert!(!Vec3Mask::default().any());
assert!(!Vec3Mask::default().all());
assert_eq!(Vec3Mask::default().bitmask(), 0x0);
let a = vec3(-1.0, -1.0, -1.0);
let b = vec3(1.0, 1.0, 1.0);
let c = vec3(-1.0, -1.0, 1.0);
let d = vec3(1.0, -1.0, -1.0);
assert... | rust_cleaned_test_functions.jsonl/48591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
35193,
368,
341,
262,
2060,
0,
3471,
10050,
18,
12686,
486,
2258,
1005,
3767,
1423,
262,
2060,
0,
3471,
10050,
18,
12686,
486,
2258,
1005,
541,
1423,
262,
2060,
10714,
10297,
10050,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_swap_front_back_remove() {
fn test(back: bool) {
let mut tester = FixedVecDeque::<[usize; 16]>::new();
let usable_cap = tester.capacity();
let final_len = usable_cap / 2;
for len in 0..final_len {
let expected: FixedVecDequ... | rust_cleaned_test_functions.jsonl/3290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 981
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40991,
22926,
3895,
18193,
368,
341,
286,
5168,
1273,
58092,
25,
1807,
8,
341,
310,
1077,
5206,
37111,
284,
20149,
10050,
73891,
27638,
58,
51878,
26,
220,
16,
21,
60,
6831,
931,
543,
310,
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... | 9 |
#[test]
fn test_timetz() {
// TIMETZ - 15:12:34-05
assert_eq!(
[0xd0u8, 0x97, 0x01, 0x80, 0xf0, 0x79, 0xf0, 0x10],
_timetz(15, 12, 34, -5).to_le_bytes()
)
} | rust_cleaned_test_functions.jsonl/13421 | {
"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,
29087,
42189,
368,
341,
286,
442,
17742,
1348,
57,
481,
220,
16,
20,
25,
16,
17,
25,
18,
19,
12,
15,
20,
198,
286,
2060,
10714,
33673,
310,
508,
15,
9703,
15,
84,
23,
11,
220,
15,
87,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.