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_convex_hull_trick() {
let lines = [(0, -3), (-1, 0), (1, -8), (-2, 1), (1, -4)];
let xs = [0, 1, 2, 3, 4, 5];
// results[i] consists of the expected y-coordinates after processing
// the first i+1 lines.
let results = [
[-3, -3, -3, -3, -3, -3]... | rust_cleaned_test_functions.jsonl/133819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22716,
327,
1523,
617,
3547,
865,
368,
341,
286,
1077,
5128,
284,
17826,
15,
11,
481,
18,
701,
10293,
16,
11,
220,
15,
701,
320,
16,
11,
481,
23,
701,
10293,
17,
11,
220,
16,
701,
320,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_boolean_array_neq_scalar() {
let a: BooleanArray = vec![Some(true), Some(false), None].into();
let res1: Vec<Option<bool>> =
neq_bool_scalar(&a, false).unwrap().iter().collect();
assert_eq!(res1, vec![Some(true), Some(false), None]);
let res2: Vec<O... | rust_cleaned_test_functions.jsonl/45799 | {
"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,
46642,
3858,
13925,
80,
41652,
368,
341,
286,
1077,
264,
25,
6992,
1857,
284,
7486,
20703,
8373,
3715,
701,
4329,
3576,
701,
2240,
936,
18122,
1428,
286,
1077,
592,
16,
25,
11312,
94150,
17028,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_extract() {
let mut span = Span::default();
span.new_column();
span.new_line();
let span1 = span.extract();
assert_eq!(1, span1.start_line);
assert_eq!(2, span1.end_line);
assert_eq!(0, span1.start_col);
assert_eq!(0, span1.en... | rust_cleaned_test_functions.jsonl/44736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
39123,
368,
341,
286,
1077,
5206,
9390,
284,
11903,
486,
2258,
543,
286,
9390,
4618,
8744,
543,
286,
9390,
4618,
6528,
1428,
286,
1077,
9390,
16,
284,
9390,
37358,
1428,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flaky_mod_2() {
// Use this undocumented environment variable to figure out how many times this test has been
// run so far.
let nextest_attempt = nextest_attempt();
if nextest_attempt % 2 != 0 {
panic!("Failed because attempt {} % 2 != 0", nextest_attempt)
}
} | rust_cleaned_test_functions.jsonl/77289 | {
"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,
5081,
28100,
7480,
62,
17,
368,
341,
262,
442,
5443,
419,
46657,
4573,
3890,
311,
7071,
700,
1246,
1657,
3039,
419,
1273,
702,
1012,
198,
262,
442,
1598,
773,
3041,
624,
262,
1077,
1790,
477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_macos_os_version() {
let mut os = OsContext {
raw_description: "Unix 17.5.0.0".to_string().into(),
..OsContext::default()
};
normalize_os_context(&mut os);
assert_eq_dbg!(Some("Unix"), os.name.as_str());
assert_eq_dbg!(Some("17.5.0"), os.kernel_version.a... | rust_cleaned_test_functions.jsonl/68955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22802,
436,
29387,
9438,
368,
341,
1066,
262,
1077,
5206,
2643,
284,
15433,
1972,
341,
286,
7112,
11448,
25,
330,
55832,
220,
16,
22,
13,
20,
13,
15,
13,
15,
3263,
983,
3904,
1005,
18122,
3148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_grows_with_false() {
let input_all_set: &[u8] = &[0b1111_1111, 0b1111_1111];
let mut field = BooleanBitfield::from_bytes(input_all_set);
let a = field.len();
let b = a + 1;
// Ensure `a` is out-of-bounds for test integrity.
assert!(field... | rust_cleaned_test_functions.jsonl/30476 | {
"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,
1889,
1811,
6615,
36015,
368,
341,
286,
1077,
1946,
5705,
2602,
25,
44590,
84,
23,
60,
284,
44590,
15,
65,
16,
16,
16,
16,
62,
16,
16,
16,
16,
11,
220,
15,
65,
16,
16,
16,
16,
62,
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_invalid_icmpv6_in_ipv4() {
let ip_config = Ipv4::DUMMY_CONFIG;
let mut ctx = DummyEventDispatcherBuilder::from_config(ip_config.clone())
.build::<DummyEventDispatcher>();
// First possible device id.
let device = DeviceId::new_ethernet(0);
let ... | rust_cleaned_test_functions.jsonl/122986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
32747,
1307,
85,
21,
1243,
49378,
19,
368,
341,
286,
1077,
5997,
5332,
284,
358,
30168,
19,
486,
35,
58673,
12568,
280,
286,
1077,
5206,
5635,
284,
50567,
1556,
21839,
3297,
486,
1499,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_queue_is_valid() {
let m = &GuestMemoryMmap::<()>::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap();
let vq = MockSplitQueue::new(m, 16);
let mut q = vq.create_queue(m);
// q is currently valid
assert!(q.is_valid());
// shouldn't be valid when... | rust_cleaned_test_functions.jsonl/94694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10841,
6892,
8337,
368,
341,
286,
1077,
296,
284,
609,
37804,
10642,
44,
2186,
27638,
368,
6831,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tail() {
let dir = tempdir().unwrap();
let expected = create_files(dir.path(), 3).unwrap();
let repo = LogRepository::new(dir.path());
for i in 0..=3 {
let paths = repo.tail(i).unwrap();
assert_eq!(paths, &expected[0..i]);
}
} | rust_cleaned_test_functions.jsonl/101107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35471,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
3601,
284,
1855,
10931,
14161,
3875,
1507,
220,
18,
568,
15454,
543,
286,
1077,
15867,
284,
2835,
4624,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_heartbeat_done_participant() {
let mut protocol = Protocol::new(get_default_fl_settings());
let client_id = ClientId::new();
let resp = protocol.heartbeat(client_id, ClientState::Done);
assert_eq!(HeartBeatResponse::StandBy, resp);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/97777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
72471,
24390,
10495,
21757,
368,
341,
286,
1077,
5206,
11507,
284,
24572,
486,
931,
5433,
9993,
5081,
10853,
1423,
286,
1077,
2943,
842,
284,
8423,
764,
486,
931,
1428,
286,
1077,
9039,
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_array_windows_nth_back() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let snd = v.array_windows::<4>().nth_back(1);
assert_eq!(snd, Some(&[1, 2, 3, 4]));
let mut arr_windows = v.array_windows::<2>();
assert_ne!(arr_windows.nth_back(0), arr_windows.nth_back(0));
} | rust_cleaned_test_functions.jsonl/9659 | {
"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,
3858,
58220,
78342,
3895,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
28612,
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_adsr() {
let mut a = ADSR::new(
Duration::from_secs_f64(0.03125),
Duration::from_secs_f64(0.125),
linear_to_db(0.5),
Duration::from_secs_f64(0.5)
);
let mut g = Sine::new(440.0);
let mut t = bae_rs::SampleTrackT::ne... | rust_cleaned_test_functions.jsonl/67269 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72275,
81,
368,
341,
286,
1077,
5206,
264,
284,
64235,
49,
486,
931,
1006,
310,
21045,
486,
1499,
68718,
761,
21,
19,
7,
15,
13,
15,
18,
16,
17,
20,
1326,
310,
21045,
486,
1499,
68718,
761,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_pubkey_len() {
let tx = test_tx();
let mut packet = sigverify::make_packet_from_transaction(tx);
let res = sigverify::do_get_packet_offsets(&packet, 0);
// make pubkey len huge
packet.data[res.unwrap().pubkey_start as usize - 1] = 0x7f;
... | rust_cleaned_test_functions.jsonl/22078 | {
"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,
31433,
34014,
792,
6043,
368,
341,
286,
1077,
9854,
284,
1273,
17805,
543,
286,
1077,
5206,
10151,
284,
8366,
12446,
486,
6927,
21078,
5673,
28884,
27301,
626,
286,
1077,
592,
284,
8366,
12446,
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_private_encrypt() {
let k0 = super::Rsa::generate(512).unwrap();
let k0pkey = k0.public_key_to_pem().unwrap();
let k1 = super::Rsa::public_key_from_pem(&k0pkey).unwrap();
let msg = vec![0xdeu8, 0xadu8, 0xd0u8, 0x0du8];
let mut emesg = vec![0; k0.size() a... | rust_cleaned_test_functions.jsonl/28561 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26249,
66593,
368,
341,
286,
1077,
595,
15,
284,
2256,
486,
49,
9081,
486,
19366,
7,
20,
16,
17,
568,
15454,
543,
286,
1077,
595,
15,
79,
792,
284,
595,
15,
37899,
3097,
2346,
620,
336,
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_concat() {
assert_eq!(map_to_solidity_type::<(u8,)>(), "uint8");
assert_eq!(map_to_solidity_type::<(u8, String)>(), "uint8,string");
assert_eq!(
map_to_solidity_type::<(Vec<u8>, String)>(),
"uint8[],string"
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/4194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57478,
368,
341,
286,
2060,
10714,
10297,
2186,
2346,
643,
5192,
487,
1819,
27638,
7,
84,
23,
11,
16018,
1507,
330,
2496,
23,
797,
286,
2060,
10714,
10297,
2186,
2346,
643,
5192,
487,
1819,
2763... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_watch() {
let r = flags_from_vec(svec!["deno", "test", "--watch"]);
assert_eq!(
r.unwrap(),
Flags {
subcommand: DenoSubcommand::Test(TestFlags {
no_run: false,
doc: false,
fail_fast: None,
filter: None,
allow_none: fal... | rust_cleaned_test_functions.jsonl/24374 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58562,
368,
341,
262,
1077,
435,
284,
8042,
5673,
13251,
1141,
4083,
0,
1183,
5183,
78,
497,
330,
1944,
497,
14482,
14321,
15049,
262,
2060,
10714,
33673,
414,
435,
55395,
3148,
414,
33205,
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_tricky_full_house() {
let cards = parse_cards("8h 8s 8c Ah As 9c Ac");
let result = hand(cards);
assert_eq!(result.hand_type, FullHouse);
assert_eq!(result.cards.to_vec(), parse_cards("Ah As Ac 8h 8s"));
} | rust_cleaned_test_functions.jsonl/3096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
18964,
16372,
64270,
368,
341,
286,
1077,
7411,
284,
4715,
41357,
445,
23,
71,
220,
23,
82,
220,
23,
66,
16366,
1634,
220,
24,
66,
6381,
797,
286,
1077,
1102,
284,
1424,
73863,
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_join_empty() {
let v: Vec<Value> = Vec::new();
let mut args = HashMap::new();
args.insert("sep".to_owned(), to_value(&"==").unwrap());
let result = join(&to_value(&v).unwrap(), &args);
assert!(result.is_ok());
assert_eq!(result.unwrap(), to_value(... | rust_cleaned_test_functions.jsonl/62048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
15124,
368,
341,
286,
1077,
348,
25,
11312,
48325,
29,
284,
11312,
486,
931,
543,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
28036,
3263,
983,
51973,
1507,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_2_of_3_multisig() {
let alice = crypto::gen_keypair();
let bob = crypto::gen_keypair();
let carol = crypto::gen_keypair();
let mut testkit = create_testkit_with_multisig(vec![alice.0, bob.0, carol.0], 2);
let ms_address = Caller::Service {
instance_id: MULTISIG_ID,
... | rust_cleaned_test_functions.jsonl/72165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
3575,
62,
18,
26290,
285,
343,
368,
341,
262,
1077,
70433,
284,
19028,
486,
4370,
3097,
12670,
543,
262,
1077,
35192,
284,
19028,
486,
4370,
3097,
12670,
543,
262,
1077,
1803,
337,
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_depool_2() -> Result<(), Box<dyn std::error::Error>> {
let depool_abi = "tests/samples/fakeDepool.abi.json";
let seed_phrase = "blanket time net universe ketchup maid way poem scatter blur limit drill";
let config = get_config().unwrap();
let depool_addr = config["addr"].as_str(... | rust_cleaned_test_functions.jsonl/118335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1004
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
10285,
62,
17,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
2170,
1749,
22885,
72,
284,
330,
23841,
2687,
4023,
6663,
726,
7839,
1749,
22048,
72,
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... | 4 |
#[test]
fn test_set_readonly() {
with_object(0, |activation, object| {
object.as_script_object().unwrap().define_value(
activation.context.gc_context,
"normal",
"initial".into(),
Attribute::empty(),
);
ob... | rust_cleaned_test_functions.jsonl/19714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
6443,
3243,
368,
341,
286,
448,
5314,
7,
15,
11,
760,
23002,
11,
1633,
91,
341,
310,
1633,
5357,
14660,
5314,
1005,
15454,
1005,
1289,
3142,
1006,
394,
15099,
8681,
65554,
8467,
345,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_revocation_signatures() {
let revaultds = [
dummy_revaultd(test_datadir(), UserRole::Manager),
dummy_revaultd(test_datadir(), UserRole::ManagerStakeholder),
dummy_revaultd(test_datadir(), UserRole::Stakeholder),
];
let c... | rust_cleaned_test_functions.jsonl/31172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3055
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
38082,
2276,
11172,
2789,
368,
341,
286,
1077,
5772,
945,
5356,
284,
2278,
310,
17292,
38082,
945,
67,
8623,
15353,
41173,
1507,
95019,
486,
2043,
1326,
310,
17292,
38082,
945,
67,
8623,
153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_genesis_account_struct_compatibility() {
let yaml_string_pubkey = "---
98frSc8R8toHoS3tQ1xWSvHCvGEADRM9hAm5qmUKjSDX:
balance: 4
owner: Gw6S9CPzR8jHku1QQMdiqcmUKjC2dhJ3gzagWduA6PGw
data:
executable: true
88frSc8R8toHoS3tQ1xWSvHCvGEADRM9hAm5qmUKjSDX:
balance: 3
owner: Gw7S9CPzR... | rust_cleaned_test_functions.jsonl/32750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
13774,
13500,
15126,
2965,
53053,
368,
341,
286,
1077,
32246,
3904,
34014,
792,
284,
330,
10952,
24,
23,
1626,
3326,
23,
49,
23,
983,
47978,
50,
18,
83,
48,
16,
87,
7433,
85,
22455,
85,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_message() {
let msg = r#"message ReferenceData
{
repeated ScenarioInfo scenarioSet = 1;
repeated CalculatedObjectInfo calculatedObjectSet = 2;
repeated RiskFactorList riskFactorListSet = 3;
repeated RiskMaturityInfo riskMaturitySet = 4;
repeat... | rust_cleaned_test_functions.jsonl/70450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
368,
341,
286,
1077,
3750,
284,
435,
55543,
1994,
17207,
1043,
198,
262,
341,
286,
11504,
58663,
1731,
220,
15048,
1649,
284,
220,
16,
280,
286,
11504,
31359,
657,
1190,
1731,
16588,
1190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_union_default() {
let got = parse!(
r#"
union LOCKU4res switch (nfsstat4 status) {
case NFS4_OK:
stateid4 lock_stateid;
default:
type_name field_name;
};"#
);
assert_eq!(got.name, "LOCKU4res");
assert_eq!(got.cases.len(), 1);... | rust_cleaned_test_functions.jsonl/7409 | {
"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,
51621,
9993,
368,
341,
286,
1077,
2684,
284,
4715,
33673,
310,
435,
2,
698,
197,
73924,
49463,
52,
19,
416,
3398,
320,
77,
3848,
9878,
19,
2639,
8,
341,
298,
2722,
87815,
19,
8375,
510,
464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_snapshot_max_total_size() {
let regions: Vec<u64> = (0..20).collect();
let kv_path = Builder::new()
.prefix("test-snapshot-max-total-size-db")
.tempdir()
.unwrap();
let engine = get_test_db_for_regions(&kv_path, None, None, None, None, ... | rust_cleaned_test_functions.jsonl/41926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53265,
6345,
10784,
2368,
368,
341,
286,
1077,
13604,
25,
11312,
34837,
21,
19,
29,
284,
320,
15,
496,
17,
15,
568,
17384,
543,
286,
1077,
16178,
2638,
284,
20626,
486,
931,
741,
310,
659,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filter_by_tid() {
timeout_ms(
|| {
let mut p = setup_default_packet();
p.metadata.pid = 0;
let mut p2 = p.clone();
p2.metadata.tid = 0;
let lm = LogMessage {
pid: p.metadata.pi... | rust_cleaned_test_functions.jsonl/76995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 726
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
3710,
73719,
368,
341,
286,
9632,
21416,
1006,
310,
1369,
341,
394,
1077,
5206,
281,
284,
6505,
9993,
21078,
543,
394,
281,
27544,
40939,
284,
220,
15,
280,
394,
1077,
5206,
281,
17,
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_make_bounded_mean_hamming() {
let transformation = make_sized_bounded_mean(5, (0., 10.)).unwrap_test();
let arg = vec![1., 2., 3., 4., 5.];
let ret = transformation.invoke(&arg).unwrap_test();
let expected = 3.;
assert_eq!(ret, expected);
assert!(t... | rust_cleaned_test_functions.jsonl/81927 | {
"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,
28230,
880,
13082,
16933,
1523,
309,
5311,
368,
341,
286,
1077,
17991,
284,
1281,
643,
1506,
880,
13082,
16933,
7,
20,
11,
320,
15,
2572,
220,
16,
15,
13,
4579,
15454,
4452,
543,
286,
1077,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_4() {
let string = r#""a\"bc""#;
let tokenizer = Tokenizer::new(string);
let tokens: Vec<Token> = tokenizer.iter().collect();
assert_eq!(tokens, vec![Token::Quoted("\"a\\\"bc\"".to_string()),]);
assert_eq!(
string,
tokens.iter().map... | rust_cleaned_test_functions.jsonl/75868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
19,
368,
341,
286,
1077,
914,
284,
435,
2,
3014,
64,
2105,
8904,
3014,
2,
280,
286,
1077,
45958,
284,
9660,
3135,
486,
931,
3609,
317,
286,
1077,
11211,
25,
11312,
83416,
29,
284,
45958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_blake2s_constant_constraints() {
let cs = ConstraintSystem::<Fr>::new_ref();
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
let input_bits: Vec<_> = (0..512)
.map(|_| Boolean::<Fr>::constant(rng.gen()))
.collect();
evaluate_blake2... | rust_cleaned_test_functions.jsonl/101938 | {
"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,
13141,
726,
17,
82,
34967,
60267,
368,
341,
286,
1077,
10532,
284,
44264,
2320,
27638,
22560,
6831,
931,
7793,
543,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
22602,
5673,
7300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_avro_3452_parsing_name_without_namespace() {
init();
let name: Name = serde_json::from_str(r#"{"name": "a.b.c.d"}"#).unwrap();
assert_eq!(&name.name, "d");
assert_eq!(name.namespace, Some("a.b.c".to_owned()));
let fullname = name.fullname(None);
assert_eq!("a.b.c.d", full... | rust_cleaned_test_functions.jsonl/69036 | {
"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,
26173,
299,
62,
18,
19,
20,
17,
620,
28598,
1269,
39904,
41571,
368,
341,
262,
2930,
543,
262,
1077,
829,
25,
3988,
284,
61570,
9455,
486,
1499,
2895,
2601,
55543,
4913,
606,
788,
330,
64,
948... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_settings() {
let mut context = get_context(accounts(1));
testing_env!(context.build());
let mut contract = Contract::new();
testing_env!(context.is_view(true).build());
assert_eq!(contract.slot_granularity, SLOT_GRANULARITY);
testing_env!(c... | rust_cleaned_test_functions.jsonl/74938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
10853,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
16,
1106,
286,
7497,
15879,
10297,
2147,
13239,
1423,
286,
1077,
5206,
5116,
284,
19185,
486,
931,
543,
286,
7497,
15879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_commutative() {
let data_a = b"test data A";
let data_b = b"test data B";
let mut hash1 = RistrettoHash::<Sha512>::default();
let mut hash2 = hash1.clone();
hash1.add(data_a, 1);
hash1.add(data_b, 1);
hash2.add(data_b, 1);
h... | rust_cleaned_test_functions.jsonl/30200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2965,
6984,
1388,
368,
341,
286,
1077,
821,
4306,
284,
293,
1,
1944,
821,
362,
876,
286,
1077,
821,
880,
284,
293,
1,
1944,
821,
425,
3302,
286,
1077,
5206,
5175,
16,
284,
431,
380,
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_simplify() {
fn get_w_expression(lines: &[&str]) -> Expr {
let mut state = State::start();
for line in lines {
let instruction = line.parse().unwrap();
state = state.after(&instruction);
}
state.registers[0].clone()
}
// Regist... | rust_cleaned_test_functions.jsonl/132167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
70206,
368,
341,
262,
5168,
633,
1670,
28068,
33152,
25,
44590,
5,
495,
2467,
1464,
28819,
341,
286,
1077,
5206,
1584,
284,
3234,
486,
2468,
543,
286,
369,
1555,
304,
5128,
341,
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... | 2 |
#[test]
fn test_resolve_vars_out_of_order() {
let d = Dockerfile::parse(indoc!(r#"
FROM $image
ARG image="alpine:3.12"
"#)).unwrap();
let from: &FromInstruction = d.instructions
.get(0).unwrap()
.try_into().unwrap();
assert_eq!(
from.image_parsed.resolve_vars... | rust_cleaned_test_functions.jsonl/17938 | {
"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,
77291,
11168,
6068,
3575,
7869,
368,
341,
1066,
262,
1077,
294,
284,
40549,
1192,
486,
6400,
23884,
509,
10297,
81,
2,
698,
414,
4295,
400,
1805,
198,
414,
32746,
2168,
428,
278,
38038,
25,
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_ext_sort_zero_terminated() {
new_ucmd!()
.arg("-z")
.arg("-S")
.arg("10K")
.arg("zero-terminated.txt")
.succeeds()
.stdout_is_fixture("zero-terminated.expected");
} | rust_cleaned_test_functions.jsonl/20452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9927,
18435,
19359,
62,
68659,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
89,
1138,
286,
659,
858,
13645,
50,
1138,
286,
659,
858,
445,
16,
15,
42,
1138,
286,
659,
858,
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_unlock_uninitialized_account() {
let location = TempLocation::new();
let pre_auth_manager =
Arc::new(pre_auth::InMemoryManager::create(TEST_PRE_AUTH_SINGLE.clone()));
request_stream_test(
location.to_persistent_lifetime(),
pre_auth_mana... | rust_cleaned_test_functions.jsonl/105837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19465,
4907,
36161,
13500,
368,
341,
286,
1077,
3728,
284,
19944,
4707,
486,
931,
543,
286,
1077,
855,
14014,
12144,
4035,
310,
19689,
486,
931,
27659,
14014,
486,
641,
10642,
2043,
486,
3182,
503... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pluralize_multiple_custom_suffix() {
let mut args = HashMap::new();
args.insert("suffix".to_string(), to_value("es"));
let result = pluralize(to_value(2), args);
assert!(result.is_ok());
assert_eq!(result.unwrap(), to_value("es"));
} | rust_cleaned_test_functions.jsonl/62618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57427,
551,
45233,
15875,
37151,
368,
341,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
26786,
3263,
983,
3904,
1507,
311,
3142,
445,
288,
4010,
286,
1077,
1102,
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_hover_generic_struct_has_goto_type_actions() {
check_actions(
r#"
struct Arg(u32);
struct S<T>{ f1: T }
fn main() { let s$0t = S{ f1:Arg(0) }; }
"#,
expect![[r#"
[
GoToType(
[
... | rust_cleaned_test_functions.jsonl/66671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
41232,
15126,
21778,
97732,
1819,
25368,
368,
341,
286,
1779,
25368,
1006,
310,
435,
2,
698,
1235,
7638,
8154,
18,
17,
317,
1235,
328,
3125,
7309,
282,
16,
25,
350,
555,
8822,
1887,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dot() {
let v1 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
let v2 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
let dot = v1.e[0] * v2.e[0] + v1.e[1] * v2.e[1] + v1.e[2] * v2.e[2];
assert_eq!(v1.dot(v2), dot);
} | rust_cleaned_test_functions.jsonl/120479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30941,
368,
972,
286,
1077,
348,
16,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
69,
21,
19,
11,
220,
18,
13,
15,
69,
21,
19,
736,
286,
1077,
348,
17,
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_sandbox_unexpected_message_when_drop() {
let sandbox = timestamping_sandbox();
// See comments to `test_sandbox_recv_and_send`.
let consensus_keys = KeyPair::random();
let service_key = KeyPair::random().public_key();
let validator_keys = ValidatorKeys::ne... | rust_cleaned_test_functions.jsonl/77269 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
31536,
4907,
7325,
6462,
47636,
29584,
368,
341,
286,
1077,
42754,
284,
11441,
287,
643,
31536,
543,
286,
442,
3496,
6042,
311,
1565,
1944,
643,
31536,
36118,
8378,
13565,
18639,
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... | 1 |
#[test]
fn test_uint_as_string() {
test_none_with_ctx_and_extra(cast_uint_as_string);
let cs: Vec<(u64, Vec<u8>, String)> = vec![
(
i64::MAX as u64,
(i64::MAX as u64).to_string().into_bytes(),
(i64::MAX as u64).to_string(),
... | rust_cleaned_test_functions.jsonl/101786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 611
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
11898,
3904,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
15807,
11898,
3904,
626,
286,
1077,
10532,
25,
11312,
28706,
84,
21,
19,
11,
11312,
34837,
23,
8066,
923,
16018... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_plantuml_code() {
macro_rules! assert_plantuml_injection {
($markdown:expr, $expected_code_block:expr, $rendered_output:expr) => {{
let processor = PlantUMLCodeProcessor::new($markdown);
let renderer = FakeRenderer {
... | rust_cleaned_test_functions.jsonl/21609 | {
"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,
11305,
6317,
517,
42231,
4136,
368,
341,
286,
18072,
21407,
0,
2060,
6317,
517,
42231,
1243,
7606,
341,
310,
1711,
60073,
96011,
11,
400,
7325,
4136,
7113,
96011,
11,
400,
7322,
291,
7645,
96011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3a_angle_between() {
let angle = Vec3A::new(1.0, 0.0, 1.0).angle_between(Vec3A::new(1.0, 1.0, 0.0));
assert_approx_eq!(f32::consts::FRAC_PI_3, angle, 1e-6);
let angle = Vec3A::new(10.0, 0.0, 10.0).angle_between(Vec3A::new(5.0, 5.0, 0.0));
assert_approx_eq!(f32::consts::FRAC_P... | rust_cleaned_test_functions.jsonl/23511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
64,
21727,
48302,
368,
341,
262,
1077,
9210,
284,
11312,
18,
32,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
11,
220,
16,
13,
15,
568,
4044,
48302,
49923,
18,
32,
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_total_ord() {
[1, 2, 3, 4].cmp(& &[1, 2, 3]) == Greater;
[1, 2, 3].cmp(& &[1, 2, 3, 4]) == Less;
[1, 2, 3, 4].cmp(& &[1, 2, 3, 4]) == Equal;
[1, 2, 3, 4, 5, 5, 5, 5].cmp(& &[1, 2, 3, 4, 5, 6]) == Less;
[2, 2].cmp(& &[1, 2, 3, 4]) == Greater;
} | rust_cleaned_test_functions.jsonl/75620 | {
"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,
10784,
67324,
368,
341,
286,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
936,
7293,
2099,
44590,
16,
11,
220,
17,
11,
220,
18,
2467,
621,
32281,
280,
286,
508,
16,
11,
220,
17,
11,
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_prefix() {
let in_values: Vec<u8> = vec![2, 20];
let mut dna_string = DnaString::new();
dna_string.push_bytes(&in_values, 8);
let pref_dna_string = dna_string.prefix(0).to_owned();
assert_eq!(pref_dna_string.len(), 0);
let pref_dna_strin... | rust_cleaned_test_functions.jsonl/95213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
368,
341,
286,
1077,
304,
9146,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
17,
11,
220,
17,
15,
935,
286,
1077,
5206,
75334,
3904,
284,
422,
3376,
703,
486,
931,
543,
286,
75334,
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_process_entries_2_entries_par() {
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(1000);
let bank = Arc::new(Bank::new(&genesis_config));
let keypair1 = Keypair::new();
let keypair2 = K... | rust_cleaned_test_functions.jsonl/47537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 824
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
26092,
62,
17,
26092,
22654,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unicode_codepoints() {
let invalid = ["Ƒ", "バ", "メ", "﷽"];
for c in &invalid {
assert_invalid_str(c);
}
} | rust_cleaned_test_functions.jsonl/4161 | {
"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,
54662,
4136,
7706,
368,
341,
286,
1077,
8318,
284,
4383,
149965,
497,
330,
65853,
497,
330,
38750,
497,
330,
149861,
6332,
286,
369,
272,
304,
609,
11808,
341,
310,
2060,
31433,
2895,
1337,
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
] | 2 |
#[test]
fn test_delete_followup_message() -> Result<(), Box<dyn Error>> {
let application_id = Id::new(1);
let token = "foo".to_owned();
let client = Client::new(String::new());
let req = client
.interaction(application_id)
.delete_response(&token)
... | rust_cleaned_test_functions.jsonl/96788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
43490,
454,
6462,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
3766,
842,
284,
5223,
486,
931,
7,
16,
317,
286,
1077,
3950,
284,
330,
7975,
3263,
983,
51973,
1428,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_length() {
let ie = InformationElement::new(
CauseCode::RequestAccepted,
CauseSource::LocalNode,
false,
false,
None,
0).unwrap();
assert_eq!(ie.length(), 2+4);
} | rust_cleaned_test_functions.jsonl/614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5118,
368,
341,
286,
1077,
29858,
284,
8085,
1691,
486,
931,
1006,
310,
44346,
2078,
486,
1900,
65906,
345,
310,
44346,
3608,
486,
7319,
1955,
345,
310,
895,
345,
310,
895,
345,
310,
2240,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_schema_descriptor() {
let result = test_schema_descriptor_helper();
assert!(
result.is_ok(),
"Expected result to be OK but got err:\n {}",
result.unwrap_err()
);
} | rust_cleaned_test_functions.jsonl/16684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25371,
33774,
368,
341,
286,
1077,
1102,
284,
1273,
25371,
33774,
10418,
543,
286,
2060,
33673,
310,
1102,
2079,
19817,
3148,
310,
330,
18896,
1102,
311,
387,
10402,
714,
2684,
1848,
7190,
77,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merkle_node_schema() {
assert_encode_decode::<StateMerkleNodeSchema>(
&HashValue::random(),
&Node::new_leaf(HashValue::random(), HashValue::random()),
);
} | rust_cleaned_test_functions.jsonl/88854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
717,
16754,
273,
5084,
25371,
368,
341,
262,
2060,
11224,
15227,
27638,
1397,
44,
16754,
273,
1955,
8632,
17055,
286,
609,
6370,
1130,
486,
11463,
3148,
286,
609,
1955,
486,
931,
38909,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stable() {
assert_eq!(Version::parse("v1"), Version::Stable(1));
assert_eq!(Version::parse("v3"), Version::Stable(3));
assert_eq!(Version::parse("v10"), Version::Stable(10));
} | rust_cleaned_test_functions.jsonl/116487 | {
"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,
1261,
480,
368,
341,
286,
2060,
10714,
10297,
5637,
486,
6400,
445,
85,
16,
3975,
6079,
486,
623,
480,
7,
16,
1106,
286,
2060,
10714,
10297,
5637,
486,
6400,
445,
85,
18,
3975,
6079,
486,
623,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let upt = upt::init();
check_eval!(upt, (Install, "vim", false), "upt install vim");
check_eval!(upt, (Install, "vim jq", true), "upt install -y vim jq");
check_eval!(upt, (Remove, "vim jq", false), "upt remove vim jq");
check_eval!(upt, (Upgrade,... | rust_cleaned_test_functions.jsonl/37067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
368,
341,
286,
1077,
34335,
284,
34335,
486,
2327,
543,
286,
1779,
21296,
10297,
7564,
11,
320,
24690,
11,
330,
41194,
497,
895,
701,
330,
7564,
4582,
36157,
797,
286,
1779,
21296,
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_resume_asm_2_interpreter() {
resume_asm_2_interpreter(VERSION1, 8126917);
resume_asm_2_interpreter(VERSION0, 8126917);
} | rust_cleaned_test_functions.jsonl/82893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58132,
67529,
62,
17,
15318,
28637,
368,
341,
262,
15688,
67529,
62,
17,
15318,
28637,
7,
17636,
16,
11,
220,
23,
16,
17,
21,
24,
16,
22,
317,
262,
15688,
67529,
62,
17,
15318,
28637,
7,
176... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_y_0() {
test_add(
TimeGranularity::Years,
0,
"2000-01-01T00:00:00.000",
"2000-01-01T00:00:00.000",
);
} | rust_cleaned_test_functions.jsonl/134021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
4178,
62,
15,
368,
341,
286,
1273,
2891,
1006,
310,
4120,
90723,
28979,
486,
54419,
345,
310,
220,
15,
345,
310,
330,
17,
15,
15,
15,
12,
15,
16,
12,
15,
16,
51,
15,
15,
25,
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_intraday_dealts_400_failed() {
let it = crawler::IntradayBuilder::default().build();
assert_err!(it.dealts("").call(), Err(FugleError::General(_)));
} | rust_cleaned_test_functions.jsonl/49448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
47026,
352,
2259,
278,
2576,
62,
19,
15,
15,
35060,
368,
341,
262,
1077,
432,
284,
73094,
486,
641,
47026,
352,
3297,
486,
2258,
1005,
5834,
543,
262,
2060,
9266,
10297,
275,
2285,
278,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_not_in_tree() {
let tests = [(3u32, 2u32), (13, 7)];
for test in tests.iter() {
assert_eq!(
node_in_tree(test.0.into(), test.1.into()),
Err(TreeMathError::NodeNotInTree)
);
}
} | rust_cleaned_test_functions.jsonl/98697 | {
"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,
5084,
7913,
1243,
11663,
368,
341,
262,
1077,
7032,
284,
17826,
18,
84,
18,
17,
11,
220,
17,
84,
18,
17,
701,
320,
16,
18,
11,
220,
22,
12587,
262,
369,
1273,
304,
7032,
19471,
368,
341,
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_system_path() {
std::env::set_var(
"PATH",
format!(
"{}:/usr/bin:/bin",
shim_dir().to_string_lossy()
),
);
let expected_path = String::from("/usr/bin:/bin");
assert_eq!(System::path().unwrap().i... | rust_cleaned_test_functions.jsonl/132773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17687,
2638,
368,
341,
286,
1460,
486,
3160,
486,
746,
4612,
1006,
310,
330,
13593,
756,
310,
3561,
33673,
394,
35503,
14375,
7063,
8749,
14375,
6863,
756,
394,
62132,
4334,
1005,
983,
3904,
11193... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subscribers() {
let era: EraIndex = 100;
let epoch: EpochIndex = 20;
// Define Subscribers
let mut subscribers = Subscribers::with_era_and_epoch(era, epoch);
assert_eq!(subscribers.current_era(), 100);
assert_eq!(subscribers.current_epoch(), 20);
... | rust_cleaned_test_functions.jsonl/54287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 597
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
46361,
368,
341,
286,
1077,
11385,
25,
47588,
1552,
284,
220,
16,
15,
15,
280,
286,
1077,
16342,
25,
87379,
1552,
284,
220,
17,
15,
401,
286,
442,
18614,
3719,
46361,
198,
286,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_estimate_fee_get_height() {
let bitcoind = create_bitcoind(vec![]);
let rpc = create_rpc(&bitcoind, DESCRIPTOR_PUB, Network::Regtest).unwrap();
let result = rpc.estimate_fee(2);
assert!(result.is_err());
let address = generate(&bitcoind, 100);
... | rust_cleaned_test_functions.jsonl/108190 | {
"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,
60799,
78718,
34305,
3062,
9561,
368,
341,
286,
1077,
2699,
1015,
484,
284,
1855,
13996,
1015,
484,
25592,
0,
56703,
286,
1077,
35596,
284,
1855,
60799,
2099,
4489,
1015,
484,
11,
16089,
27210,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_complex_junk() {
let html = Html::parse_fragment(HTML_COMPLEX_JUNK_WITH_TABLES);
let div_id = "main_page";
let selector_str = format!("div#{}", div_id);
let selector = Selector::parse(&selector_str).unwrap();
let sub_tree = html.select(&selector).ne... | rust_cleaned_test_functions.jsonl/47600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
41522,
5374,
3122,
368,
341,
286,
1077,
5272,
284,
19200,
486,
6400,
43012,
7,
5835,
97820,
10598,
31883,
23929,
16039,
50,
626,
286,
1077,
3429,
842,
284,
330,
3817,
6129,
876,
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_import_stalled_dataflow() {
// Runs the first dataflow to completion before constructing the subscriber.
timely::execute(timely::Configuration::Thread, move |worker| {
let mut input = InputSession::new();
let (mut trace, probe1) = worker.dataflow(|scope| {
... | rust_cleaned_test_functions.jsonl/130261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
1261,
4736,
1769,
4965,
368,
341,
262,
442,
49990,
279,
1156,
821,
4965,
311,
9755,
1573,
49353,
279,
32115,
624,
262,
31000,
486,
10257,
1155,
318,
974,
486,
7688,
486,
6855,
11,
3271,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_packet_resize() {
analog_logger::setup();
let recv_socket = UdpSocket::bind("127.0.0.1:0").expect("bind");
let addr = recv_socket.local_addr().unwrap();
let send_socket = UdpSocket::bind("127.0.0.1:0").expect("bind");
let mut p = Packets::default();
... | rust_cleaned_test_functions.jsonl/88890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21078,
53370,
368,
341,
286,
23400,
27413,
486,
15188,
543,
286,
1077,
27006,
19555,
284,
547,
9796,
10286,
486,
7666,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1827,
17119,
445,
7666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simplify_null_and_false() {
let expr = binary_expr(lit_null(), Operator::And, lit(false));
let expr_eq = lit(false);
assert_eq!(simplify(&expr), expr_eq);
} | rust_cleaned_test_functions.jsonl/19686 | {
"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,
643,
70206,
15162,
8378,
36015,
368,
341,
286,
1077,
15169,
284,
7868,
21915,
2333,
275,
15162,
1507,
28498,
486,
3036,
11,
13020,
3576,
1106,
286,
1077,
15169,
10714,
284,
13020,
3576,
626,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_chacha_true_values_a() {
// Test vectors 1 and 2 from
let seed = [0u8; 32];
let mut rng = ChaChaRng::from_seed(seed);
let mut results = [0u32; 16];
for i in results.iter_mut() { *i = rng.next_u32(); }
let expected = [0xade0b876, 0x903df1a... | rust_cleaned_test_functions.jsonl/112999 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
51576,
16082,
9146,
4306,
368,
341,
286,
442,
3393,
22879,
220,
16,
323,
220,
17,
504,
8945,
286,
1077,
10320,
284,
508,
15,
84,
23,
26,
220,
18,
17,
935,
286,
1077,
5206,
28422,
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... | 3 |
#[test]
fn test_bit_set_show() {
let mut s = BitSet::new();
s.insert(1);
s.insert(10);
s.insert(50);
s.insert(2);
assert_eq!("BitSet {1, 2, 10, 50}", format!("{:?}", s));
} | rust_cleaned_test_functions.jsonl/76220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
2602,
15267,
368,
341,
286,
1077,
5206,
274,
284,
57227,
486,
931,
543,
286,
274,
7030,
7,
16,
317,
286,
274,
7030,
7,
16,
15,
317,
286,
274,
7030,
7,
20,
15,
317,
286,
274,
7030,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_overflow() {
let pubkey = Pubkey::new_rand();
let mut keyed_accounts = Vec::new();
let mut user_account = Account::default();
keyed_accounts.push(KeyedAccount::new(&pubkey, true, &mut user_account));
let ix = storage_instruction::advertise_recen... | rust_cleaned_test_functions.jsonl/127031 | {
"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,
88686,
79073,
368,
341,
286,
1077,
95116,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
5206,
90529,
55665,
284,
11312,
486,
931,
543,
286,
1077,
5206,
1196,
13500,
284,
8615,
486,
2258,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_batch_size_edge_limit() {
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 (mock_server, port) = create_mock_server(service, 60200,... | rust_cleaned_test_functions.jsonl/37842 | {
"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,
14534,
2368,
17932,
14763,
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,
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... | 4 |
#[test]
fn test_serde_os2_panose() {
let p1 = OS2Panose {
family_type: 1,
serif_style: 2,
weight: 3,
proportion: 4,
contrast: 5,
stroke_variation: 6,
arm_style: 7,
letterform: 8,
midline: 9,
... | rust_cleaned_test_functions.jsonl/126998 | {
"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,
75861,
450,
29387,
17,
71099,
960,
368,
341,
286,
1077,
281,
16,
284,
10085,
17,
35693,
960,
341,
310,
2997,
1819,
25,
220,
16,
345,
310,
89748,
15117,
25,
220,
17,
345,
310,
4680,
25,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_8() {
assert_eq!(
parse_column_type(&mut Parser::new("decimal(18,4) unsigned zerofill")),
ColumnType::Decimal(NumericAttr {
maximum: Some(18),
decimal: Some(4),
unsigned: Some(true),
zero_fill: Some(t... | rust_cleaned_test_functions.jsonl/73837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
23,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
8744,
1819,
2099,
6984,
21102,
486,
931,
445,
23289,
7,
16,
23,
11,
19,
8,
3774,
76178,
1055,
483,
30154,
310,
9332,
929,
486,
11269,
8204... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jne_imm() {
test_interpreter_and_jit_asm!(
"
mov32 r0, 0
mov32 r1, 0xb
jne r1, 0xb, +4
mov32 r0, 1
mov32 r1, 0xa
jne r1, 0xb, +1
mov32 r0, 2
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0... | rust_cleaned_test_functions.jsonl/59018 | {
"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,
5374,
811,
71370,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
18,
17,
435,
15,
11,
220,
15,
198,
286,
1974,
18,
17,
435,
16,
11,
220,
15,
7929,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_begin_application_on_empty_storage_with_first_blocks() {
init_test_runtime();
// init empty context for test
let (chain_id, genesis_block_header, ..) =
init_test_protocol_context("test_begin_application_on_empty_storage_with_first_block");
// begin application for first... | rust_cleaned_test_functions.jsonl/21216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 941
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23338,
38721,
4470,
15124,
23310,
6615,
12978,
25201,
368,
341,
262,
2930,
4452,
33232,
1428,
262,
442,
2930,
4287,
2266,
369,
1273,
198,
262,
1077,
320,
8819,
842,
11,
59366,
7113,
8757,
11,
5241... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_div_rem_gaussian() {
// These would overflow with `norm_sqr` division.
let max = Complex::new(255u8, 255u8);
assert_eq!(max / 200, Complex::new(1, 1));
assert_eq!(max % 200, Complex::new(55, 55));
} | rust_cleaned_test_functions.jsonl/105720 | {
"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,
16237,
19194,
1889,
46972,
368,
341,
310,
442,
4220,
1035,
16484,
448,
1565,
20011,
643,
23004,
63,
12804,
624,
310,
1077,
1932,
284,
22096,
486,
931,
7,
17,
20,
20,
84,
23,
11,
220,
17,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_css_border_2() {
assert_eq!(
parse_css_border("double"),
Ok(StyleBorderSide {
border_width: PixelValue::px(3.0),
border_style: BorderStyle::Double,
border_color: ColorU { r: 0, g: 0, b: 0, a: 255 },
... | rust_cleaned_test_functions.jsonl/37088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
31940,
62,
17,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
25924,
31940,
445,
4331,
4461,
310,
7622,
7,
2323,
10691,
16384,
341,
394,
3886,
7927,
25,
27469,
1130,
486,
1767,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_linear_gradient_11() {
// wacky whitespace on purpose
assert_eq!(
parse_style_background_content(
"linear-gradient(to bottom,rgb(255,0, 0)0%, rgb( 0 , 255 , 0 ) 10% ,blue 100% )"
),
Ok(StyleBackgroundContent::LinearGrad... | rust_cleaned_test_functions.jsonl/114013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1089
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
40674,
49482,
62,
16,
16,
368,
341,
286,
442,
289,
79957,
36372,
389,
7428,
198,
286,
2060,
10714,
33673,
310,
4715,
15117,
24103,
7495,
1006,
394,
330,
22763,
42738,
12186,
5622,
11,
16509... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rwlock_kill_downgrader() {
rwlock_kill_helper(Downgrade, Read);
rwlock_kill_helper(Read, Downgrade);
rwlock_kill_helper(Downgrade, Write);
rwlock_kill_helper(Write, Downgrade);
rwlock_kill_helper(DowngradeRead, Read);
rwlock_kill_helper(Read, Downg... | rust_cleaned_test_functions.jsonl/20120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98850,
73327,
13998,
901,
998,
368,
341,
286,
25991,
1023,
73327,
10418,
7,
4454,
6937,
11,
4457,
317,
286,
25991,
1023,
73327,
10418,
7,
4418,
11,
6285,
6937,
317,
286,
25991,
1023,
73327,
10418,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_block_invalid_blockhash_for_member() {
let block = Some(Block::new(hex::decode(BLOCK).unwrap()));
let state = Member::for_test().candidate_block(block.clone()).build();
let blockhash = SHA256Hash::from_slice(&hex::decode(INVALID_HASH).unwrap()[..]).unwrap();
... | rust_cleaned_test_functions.jsonl/75391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8337,
7113,
31433,
7113,
8296,
5478,
19388,
368,
341,
286,
1077,
2504,
284,
4329,
55243,
486,
931,
44660,
486,
18196,
5349,
8044,
568,
15454,
7392,
286,
1077,
1584,
284,
12039,
486,
1958,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_fields() {
let (at, mut ucmd) = testing(UTIL_NAME);
let result = ucmd.args(&["-d", ":", "-f", "1,3", INPUT]).run();
assert_eq!(result.stdout, at.read("lists_multiple_fields.expected"));
} | rust_cleaned_test_functions.jsonl/77649 | {
"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,
45233,
12132,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
1102,
284,
575,
8710,
16365,
2099,
1183,
12,
67,
497,
330,
12147,
6523,
69,
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_set_net_device() {
let mut vm_resources = default_vm_resources();
// Clone the existing net config in order to obtain a new one.
let mut new_net_device_cfg = default_net_cfg();
new_net_device_cfg.iface_id = "new_net_if".to_string();
new_net_device_cfg.gue... | rust_cleaned_test_functions.jsonl/5459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
19722,
9204,
368,
341,
286,
1077,
5206,
10995,
35569,
284,
1638,
39008,
35569,
1428,
286,
442,
27913,
279,
6350,
4179,
2193,
304,
1973,
311,
6851,
264,
501,
825,
624,
286,
1077,
5206,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mld_parse_and_serialize_done() {
use crate::icmp::mld::MulticastListenerDone;
use crate::testdata::mld_router_done::*;
test_parse_and_serialize::<MulticastListenerDone, _, _>(
SRC_IP,
DST_IP,
DONE,
|ip| {
che... | rust_cleaned_test_functions.jsonl/82323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
507,
21039,
8378,
88686,
24390,
368,
341,
286,
990,
17717,
486,
50774,
486,
76,
507,
486,
40404,
35446,
2743,
17453,
280,
286,
990,
17717,
486,
92425,
486,
76,
507,
55587,
24390,
56162,
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_null_json_equal() {
// Test equaled array
let arrow_array = NullArray::new(4);
let json_array: Value = serde_json::from_str(
r#"
[
null, null, null, null
]
"#,
)
.unwrap();
assert!(arrow_a... | rust_cleaned_test_functions.jsonl/901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
9455,
11478,
368,
341,
286,
442,
3393,
3232,
5838,
1334,
198,
286,
1077,
17921,
3858,
284,
18084,
1857,
486,
931,
7,
19,
317,
286,
1077,
2951,
3858,
25,
5162,
284,
61570,
9455,
486,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_regex_literal_continue_character_class() {
// character class as second char
assert_parse_success!(
regex_literal,
"/a[ab]/",
RegExpLiteral {
pattern: "a[ab]".to_string(),
flags: String::new(),
}
);
} | rust_cleaned_test_functions.jsonl/66460 | {
"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,
41832,
34100,
75297,
40988,
4790,
368,
341,
262,
442,
3668,
536,
438,
2086,
1161,
198,
262,
2060,
21039,
18632,
33673,
286,
20180,
34100,
345,
286,
3521,
64,
58,
370,
9769,
756,
286,
28487,
17350,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flac_reader_tags_skips_empty_vorbis_comments() {
// This file has been prepared to contain one empty Vorbis comment; a string
let flac_reader = claxon::FlacReader::open("testsamples/empty_vorbis_comment.flac").unwrap();
// length pre... | rust_cleaned_test_functions.jsonl/39105 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
580,
22306,
16333,
33811,
3077,
15124,
2273,
29886,
285,
30359,
368,
341,
262,
442,
1096,
1034,
702,
1012,
10030,
311,
6644,
825,
4287,
647,
29886,
285,
3980,
26,
264,
914,
7213,
80719,
4169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_circle_inter() {
let c = Circle {
center: [15.0, 15.0].into(),
radius: 6.0,
};
let mut g: DenseShapeGrid<(), Circle> = DenseShapeGrid::new(10);
let a = g.insert(c, ());
assert_eq!(
g.query(Circle {
... | rust_cleaned_test_functions.jsonl/32134 | {
"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,
42222,
15318,
368,
972,
286,
1077,
272,
284,
21224,
972,
310,
4126,
25,
508,
16,
20,
13,
15,
11,
220,
16,
20,
13,
15,
936,
18122,
24853,
310,
10578,
25,
220,
21,
13,
15,
1871,
286,
16511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsed_datetime_time() {
run_test_build_parsed_datetime_time(
"3:4:5.6",
ParsedDateTime {
hour: Some(DateTimeFieldValue::new(3, 0)),
minute: Some(DateTimeFieldValue::new(4, 0)),
second: Some(DateTimeFieldValue:... | rust_cleaned_test_functions.jsonl/100331 | {
"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,
20801,
75788,
28943,
3009,
368,
341,
286,
1598,
4452,
20801,
75788,
28943,
3009,
1006,
310,
330,
18,
25,
19,
25,
20,
13,
21,
756,
310,
393,
18112,
7689,
341,
394,
6460,
25,
4329,
32083,
52112,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pop_head() {
let mut ll = LinkedList::<u8>::new();
let node = ll.push_head(11);
assert_node!(ll, node, ONLY, 11, 1);
//now pop the head
assert_eq!(ll.pop_head(), Some(11));
assert_empty!(ll);
//now push two nodes
let node = ll.push... | rust_cleaned_test_functions.jsonl/59884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
13138,
368,
341,
286,
1077,
5206,
9323,
284,
22917,
27638,
84,
23,
6831,
931,
543,
286,
1077,
2436,
284,
9323,
2552,
13138,
7,
16,
16,
317,
286,
2060,
5084,
10297,
654,
11,
2436,
11,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part_two() {
let mut crab_cups = CrabCups::from_str(&INPUT, 1_000_000);
crab_cups.make_moves(10_000_000);
assert_eq!(
149245887792,
crab_cups.get_cup_product_two_clockwise_of_one(),
);
} | rust_cleaned_test_functions.jsonl/73801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
23241,
368,
341,
286,
1077,
5206,
59412,
666,
8602,
284,
74104,
34,
8602,
486,
1499,
2895,
2099,
29421,
11,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
626,
286,
59412,
666,
8602,
10117,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negative_active_destory() {
run_e2e_client_test(4, |mut client| {
let resp = client
.create_symmetric_key(CryptographicAlgorithm::AES, 128)
.unwrap();
let get = client.get(&resp.unique_identifier).unwrap();
assert_eq! ... | rust_cleaned_test_functions.jsonl/56506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53865,
12930,
25264,
679,
368,
341,
286,
1598,
2204,
17,
68,
8179,
4452,
7,
19,
11,
760,
6984,
2943,
91,
341,
310,
1077,
9039,
284,
2943,
198,
394,
659,
3182,
26825,
15903,
3097,
3025,
3571,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_colinear_4() {
// The path goes back and forth along a line.
let mut builder = Path::builder();
builder.begin(point(0.0, 2.0));
builder.line_to(point(0.0, 1.0));
builder.line_to(point(0.0, 3.0));
builder.line_to(point(0.0, 0.0));
builder.end(true);
let path = bui... | rust_cleaned_test_functions.jsonl/102421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10211,
88921,
62,
19,
368,
341,
262,
442,
576,
1815,
5780,
1182,
323,
13241,
3156,
264,
1555,
624,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
543,
262,
7363,
6848,
20235,
7,
15,
13,
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_export() {
let name = "sgx_data_test";
let reference = r#"
{
"mrEnclave" : ["123"],
"mrSigner" : ["123"],
"productId" : 1,
"svn" : 2
}
"#;
set_reference(name, reference)
.map_err(|e| {
... | rust_cleaned_test_functions.jsonl/84004 | {
"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,
27114,
368,
341,
286,
1077,
829,
284,
330,
1991,
87,
1769,
4452,
876,
286,
1077,
5785,
284,
435,
2,
698,
286,
341,
310,
330,
20946,
1702,
40533,
1,
549,
4383,
16,
17,
18,
8097,
310,
330,
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_read_var_uint_two_bytes_max_value() {
let var_uint =
VarUInt::read(&mut Cursor::new(&[0b0111_1111, 0b1111_1111])).expect(ERROR_MESSAGE);
assert_eq!(var_uint.size_in_bytes(), 2);
assert_eq!(var_uint.value(), 16_383);
} | rust_cleaned_test_functions.jsonl/116130 | {
"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,
6443,
4612,
15807,
23241,
12524,
6345,
3142,
368,
341,
286,
1077,
762,
15807,
4035,
310,
8735,
18777,
486,
878,
2099,
6984,
28067,
486,
931,
2099,
58,
15,
65,
15,
16,
16,
16,
62,
16,
16,
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_transitive() {
check(
r#"
//- /level3.rs new_source_root:local crate:level3
pub struct Fo$0o;
//- /level2.rs new_source_root:local crate:level2 deps:level3
pub use level3::Foo;
//- /level1.rs new_source_root:local crate:level1 deps:level2
pub use level2::Foo;
//- /level0.rs n... | rust_cleaned_test_functions.jsonl/60679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
3404,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
61463,
608,
3294,
18,
25638,
501,
10347,
12993,
25,
2438,
17717,
25,
3294,
18,
198,
9585,
2036,
31657,
3,
15,
78,
280,
61463,
608,
3294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_implicit() {
#[cfg(feature = "const-generics")]
assert_writes::<Implicit<bool, 2>>(&[
(Implicit::new(true), b"\x82\x01\xff"),
(Implicit::new(false), b"\x82\x01\x00"),
]);
assert_eq!(
write(|w| { w.write_optional_implicit_... | rust_cleaned_test_functions.jsonl/129902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 495
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
62,
30940,
368,
341,
286,
11506,
14072,
27062,
284,
330,
1024,
2371,
798,
1211,
5422,
286,
2060,
1670,
23262,
27638,
59558,
17028,
11,
220,
17,
2452,
2099,
9640,
310,
320,
59558,
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_rsa_encrypt() {
let big_a = BigUint::parse_bytes(b"188394207298085200331335318886080117835", 10).unwrap();
let big_b = BigUint::parse_bytes(b"65537", 10).unwrap();
let big_c = BigUint::parse_bytes(b"313451135729381938245427493117266465994", 10).unwrap();
let res ... | rust_cleaned_test_functions.jsonl/43389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82522,
66593,
368,
341,
286,
1077,
2409,
4306,
284,
6164,
21570,
486,
6400,
12524,
1883,
1,
16,
23,
23,
18,
24,
19,
17,
15,
22,
17,
24,
23,
15,
23,
20,
17,
15,
15,
18,
18,
16,
18,
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_vote_double_lockout_after_expiration() {
let voter_pubkey = solana_sdk::pubkey::new_rand();
let mut vote_state = VoteState::new_for_test(&voter_pubkey);
for i in 0..3 {
vote_state.process_slot_vote_unchecked(i as u64);
}
check_lockouts(&vote_... | rust_cleaned_test_functions.jsonl/6087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
24598,
9818,
411,
19844,
2702,
28479,
368,
341,
286,
1077,
25323,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
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_00() {
let foo = Just(2);
match foo {
Just(i) => assert_eq!(i, 2),
Nothing => {}
}
} | rust_cleaned_test_functions.jsonl/115368 | {
"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,
62,
15,
15,
368,
341,
286,
1077,
15229,
284,
4599,
7,
17,
317,
286,
2432,
15229,
341,
310,
4599,
1956,
8,
589,
2060,
10714,
10297,
72,
11,
220,
17,
1326,
310,
12064,
589,
5613,
286,
456,
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
] | 2 |
#[test]
fn test_neverproducestickets_does_nothing() {
let npt = NeverProducesTickets {};
assert_eq!(false, npt.enabled());
assert_eq!(0, npt.get_lifetime());
assert_eq!(None, npt.encrypt(&[]));
assert_eq!(None, npt.decrypt(&[]));
} | rust_cleaned_test_functions.jsonl/8736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
423,
8555,
15184,
17480,
96374,
6536,
1596,
368,
341,
286,
1077,
308,
417,
284,
14695,
49112,
55321,
9321,
286,
2060,
10714,
10297,
3849,
11,
308,
417,
22141,
1423,
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_vec_list_push_front() {
let mut list = VecList::new();
list.push_front(0);
assert_eq!(list.front(), Some(&0));
list.push_front(1);
assert_eq!(list.front(), Some(&1));
list.push_front(2);
assert_eq!(list.front(), Some(&2));
} | rust_cleaned_test_functions.jsonl/11547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
14218,
22926,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
22926,
7,
15,
317,
286,
2060,
10714,
10297,
1607,
23445,
1507,
4329,
2099,
15,
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_pass_rust_str() {
// passing by value is the only legal option
let cxx = indoc! {"
uint32_t measure_string(rust::Str z) {
return std::string(z).length();
}
"};
let hdr = indoc! {"
#include <cstdint>
#include <cxx.h>
uint32_t mea... | rust_cleaned_test_functions.jsonl/9782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
1710,
590,
2895,
368,
341,
262,
442,
12299,
553,
897,
374,
279,
1172,
5777,
2999,
198,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
6629,
3904,
2601,
590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.