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_try_from_put_metrics() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
let body = "{ \
\"metrics_path\": \"string\" \
}";
sender
.write_all(http_request("PUT", "/metric... | rust_cleaned_test_functions.jsonl/106583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
15557,
37686,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
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_template_in_module() {
assert_eq!(
html! {p : submodule::Test3::new(&42)}
.into_string()
.unwrap(),
"<p><div>42</div></p>"
);
} | rust_cleaned_test_functions.jsonl/73249 | {
"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,
8693,
1243,
10750,
368,
341,
262,
2060,
10714,
33673,
286,
5272,
0,
314,
79,
549,
95570,
486,
2271,
18,
486,
931,
2099,
19,
17,
10569,
310,
659,
18122,
3904,
741,
310,
659,
15454,
3148,
286,
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 |
#[test]
fn test_join() {
assert_eq!(&join_url("app:///", "foo.html").unwrap(), "app:///foo.html");
assert_eq!(&join_url("app://", "foo.html").unwrap(), "app:///foo.html");
assert_eq!(&join_url("~/", "foo.html").unwrap(), "~/foo.html");
assert_eq!(
&join_url("app:///", "/foo.html").unwrap... | rust_cleaned_test_functions.jsonl/32395 | {
"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,
31017,
368,
341,
262,
2060,
10714,
0,
2099,
5987,
2903,
445,
676,
1110,
28105,
330,
7975,
2564,
1827,
15454,
1507,
330,
676,
60896,
7975,
2564,
797,
262,
2060,
10714,
0,
2099,
5987,
2903,
445,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_country() {
assert_eq!(vsd(230992580).country().unwrap(), "FI");
assert_eq!(vsd(276009860).country().unwrap(), "EE");
assert_eq!(vsd(265803690).country().unwrap(), "SE");
assert_eq!(vsd(273353180).country().unwrap(), "RU");
assert_eq!(vsd(211805060).countr... | rust_cleaned_test_functions.jsonl/52791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28106,
368,
341,
286,
2060,
10714,
10297,
11562,
67,
7,
17,
18,
15,
24,
24,
17,
20,
23,
15,
568,
11141,
1005,
15454,
1507,
330,
19426,
797,
286,
2060,
10714,
10297,
11562,
67,
7,
17,
22,
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_combination() {
let modulo = Modulo::new(1000, MOD);
assert_eq!(modulo.combination(1000, 500), 159835829);
} | rust_cleaned_test_functions.jsonl/113611 | {
"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,
34454,
2554,
368,
341,
286,
1077,
59864,
284,
5650,
8763,
486,
931,
7,
16,
15,
15,
15,
11,
18669,
317,
286,
2060,
10714,
10297,
87966,
905,
65,
2554,
7,
16,
15,
15,
15,
11,
220,
20,
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 |
#[test]
fn test_standard_geometric() {
let mut rng = crate::test::rng(654321);
let distr = StandardGeometric;
let expected_mean = 1.0;
let expected_variance = 2.0;
let mut results = [0.0; 1000];
for i in results.iter_mut() {
*i = distr.sample(&mut rn... | rust_cleaned_test_functions.jsonl/9275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48688,
32933,
23375,
368,
341,
286,
1077,
5206,
28422,
284,
17717,
486,
1944,
486,
69890,
7,
21,
20,
19,
18,
17,
16,
626,
286,
1077,
7905,
284,
11766,
9499,
23375,
280,
286,
1077,
3601,
16933,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transitions_with_at_least_four_elements() {
let model =
"0\n\
3\n\
a 0 1 8";
match DFAReader::new_from_string(model) {
Err(DFAReaderError::IllformedTransition(line)) => assert!(line == 3),
_ => assert!(false, "Illforme... | rust_cleaned_test_functions.jsonl/47831 | {
"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,
7965,
5930,
6615,
3752,
88716,
56142,
22801,
368,
341,
286,
1077,
1614,
4035,
310,
330,
15,
1699,
5661,
1797,
220,
18,
1699,
5661,
1797,
264,
220,
15,
220,
16,
220,
23,
876,
286,
2432,
93631,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encode_empty_array() {
let mut buf = Vec::new();
let empty: Vec<Value> = Vec::new();
encode(
&Value::Array(empty),
&Schema::parse_str(r#"{"type": "array", "items": "int"}"#).unwrap(),
&mut buf,
);
assert_eq!(vec![0u8], b... | rust_cleaned_test_functions.jsonl/12306 | {
"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,
11224,
15124,
3858,
368,
341,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
543,
286,
1077,
4287,
25,
11312,
48325,
29,
284,
11312,
486,
931,
543,
286,
16164,
1006,
310,
609,
1130,
486,
1857,
242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pretty_format_time_32_millisecond() {
let expected = vec![
"+--------------+",
"| f |",
"+--------------+",
"| 03:05:11.111 |",
"| |",
"+--------------+",
];
check_datetime!(Ti... | rust_cleaned_test_functions.jsonl/5248 | {
"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,
620,
21322,
8955,
3009,
62,
18,
17,
717,
65358,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
6630,
42091,
10,
756,
310,
25203,
282,
310,
760,
756,
310,
6630,
42091,
10,
756,
310,
25203,
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_mul() {
let mut a : felem_as_words = [11671922859260663127, 11050707557586042878, 284884720401305268, 17749945728364010941, 8613774818643959860, 145621051382923523];
let mut b : felem_as_words = [9794203289623549276, 7309342082925068282, 1139538881605221074, 15659550692327388916, 1600835... | rust_cleaned_test_functions.jsonl/91330 | {
"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,
24944,
368,
341,
262,
1077,
5206,
264,
549,
1152,
3433,
11898,
18981,
284,
508,
16,
16,
21,
22,
16,
24,
17,
17,
23,
20,
24,
17,
21,
15,
21,
21,
18,
16,
17,
22,
11,
220,
16,
16,
15,
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_list_fds_zombie() {
let mut test_subprocess = start_c_program("./nothing");
let process = ps_utils::get_target("nothing").unwrap().unwrap();
assert!(
process.list_fds().is_none(),
"Expected list_fds to return None for a zombie process"
);
... | rust_cleaned_test_functions.jsonl/18850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
90438,
6415,
23342,
368,
341,
286,
1077,
5206,
1273,
5228,
4630,
284,
1191,
666,
25096,
13988,
41212,
797,
286,
1077,
1882,
284,
4726,
17309,
486,
455,
11123,
445,
41212,
1827,
15454,
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_parse_two_octet_frame_size_command() {
let buf = [
0b00000000, // DLCI of 0 is OK.
0b11110000, // SupportedRequest.
0b00001000, // Priority = 8.
0b00000000, // Ignored.
0b10000100, // Max Frame Size Octet 1 = 132.
0b... | rust_cleaned_test_functions.jsonl/69347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
23241,
70135,
295,
8929,
2368,
10811,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
65,
15,
15,
15,
15,
15,
15,
15,
15,
11,
442,
42919,
40,
315,
220,
15,
374,
10402,
624,
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_mut() {
let mut val = Sticky::new(true);
*val.get_mut() = false;
assert_eq!(val.to_string(), "false");
assert_eq!(val.get(), &false);
} | rust_cleaned_test_functions.jsonl/13456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
368,
341,
262,
1077,
5206,
1044,
284,
92643,
486,
931,
3715,
317,
262,
353,
831,
670,
29523,
368,
284,
895,
280,
262,
2060,
10714,
10297,
831,
2389,
3904,
1507,
330,
3849,
797,
262,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_no_debug_failure() {
let (mut runtime, state_snapshot, _) = setup(
false,
json!({
"target": "esnext",
"module": "esnext",
"lib": ["deno.ns", "deno.window"],
"noEmit": true,
}),
&[(
"file:///a.ts",
r#"const url = new URL(... | rust_cleaned_test_functions.jsonl/23626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
15446,
43618,
368,
341,
262,
1077,
320,
6984,
15592,
11,
1584,
53265,
11,
27439,
284,
6505,
1006,
414,
895,
345,
414,
2951,
0,
2262,
286,
330,
5657,
788,
330,
288,
3600,
756,
286,
330,
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_delete_packet_acknowledgement_ok() {
let port_id = PortId::from_str("transfer").unwrap();
let channel_id = ChannelId::from_str("channel-0").unwrap();
let sequence = Sequence::from(0);
let ack = vec![1, 2, 3];
let mut context: Context<Test> = Context::new();
new_test_ext().execute_with(||... | rust_cleaned_test_functions.jsonl/60067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
21078,
48447,
50022,
29564,
19817,
368,
341,
10217,
2635,
842,
284,
5776,
764,
486,
1499,
2895,
445,
24188,
1827,
15454,
543,
10217,
5496,
842,
284,
13434,
764,
486,
1499,
2895,
445,
10119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_account_shared_data_serialize() {
let key = Pubkey::new_unique();
let (_account1, mut account2) = make_two_accounts(&key);
account2.serialize_data(&"hello world").unwrap();
} | rust_cleaned_test_functions.jsonl/48202 | {
"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,
13500,
20405,
1769,
88686,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5453,
4608,
16,
11,
5206,
2692,
17,
8,
284,
1281,
23241,
55665,
2099,
792,
317,
286,
2692,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_json_2() {
let old_json = "[]";
let to_be_added_json = r#"{"a":3}"#;
let final_json = r#"[{"a":3}]"#;
assert_eq!(update_json(old_json, to_be_added_json), final_json);
} | rust_cleaned_test_functions.jsonl/17532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
9455,
62,
17,
368,
341,
286,
1077,
2310,
9455,
284,
330,
1294,
876,
286,
1077,
311,
21263,
37653,
9455,
284,
435,
55543,
4913,
64,
788,
18,
9863,
2,
280,
286,
1077,
1590,
9455,
284,
435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_normal_code() {
let s = r#"
fn main() {
println!("hello, world");
}
"#;
assert_eq!(s, filter_normal_code(s));
let s_with_comment = r#"
fn main() {
// hello, world
println!("hello, world");
}
"#;
assert_eq!(s, filter_normal_code(s_with_comment));... | rust_cleaned_test_functions.jsonl/44606 | {
"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,
8727,
13973,
4136,
368,
341,
286,
1077,
274,
284,
435,
2,
698,
8822,
1887,
368,
341,
262,
13751,
17223,
14990,
11,
1879,
797,
532,
57676,
280,
286,
2060,
10714,
10297,
82,
11,
4051,
13973,
4136,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_base64() {
let s = "KkctSmFOZFJnVWtYcDJzNXY4eS9CP0UoSCtNYlBlU2g=";
assert!(Digest32::from_base64(s).is_ok());
} | rust_cleaned_test_functions.jsonl/5707 | {
"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,
5673,
7651,
21,
19,
368,
341,
286,
1077,
274,
284,
330,
42,
74,
302,
10673,
3788,
90814,
41,
77,
53,
54,
83,
56,
66,
53272,
89,
45,
16356,
19,
68,
50,
24,
7123,
15,
52,
78,
3540,
83,
230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rev_iterator() {
let data: Vec<_> = RandomCandles::new().take(600).collect();
for length in 1..255 {
let mut w = Window::new(length, data[0]);
data.iter().enumerate().for_each(|(i, &c)| {
w.push(c);
if i >= length as usize {
let iterated: Vec<_> = w.iter_rev().collect()... | rust_cleaned_test_functions.jsonl/125190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38082,
13491,
368,
341,
197,
10217,
821,
25,
11312,
32399,
29,
284,
10612,
34,
20125,
486,
931,
1005,
22769,
7,
21,
15,
15,
568,
17384,
1428,
197,
2023,
3084,
304,
220,
16,
496,
17,
20,
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... | 3 |
#[test]
fn test_get_nth_fibonacci_number() {
#[cfg_attr(rustfmt, rustfmt_skip)]
static SEQUENCE: &'static [u64] =
&[0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181,
6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040,
... | rust_cleaned_test_functions.jsonl/6692 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
78342,
761,
579,
39345,
5500,
368,
341,
262,
11506,
14072,
10422,
2601,
590,
12501,
11,
23071,
12501,
44830,
5563,
262,
1099,
5052,
50842,
25,
30136,
1978,
508,
84,
21,
19,
60,
4035,
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_parse_tail() {
let re = ResourceDef::new("/user/-{id}*");
let mut path = Path::new("/user/-profile");
assert!(re.match_path(&mut path));
assert_eq!(path.get("id").unwrap(), "profile");
let mut path = Path::new("/user/-2345");
assert!(re.match_pat... | rust_cleaned_test_functions.jsonl/87893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
35471,
368,
341,
286,
1077,
312,
284,
11765,
2620,
486,
931,
4283,
872,
23650,
90,
307,
92814,
3071,
286,
1077,
5206,
1815,
284,
7933,
486,
931,
4283,
872,
23650,
5365,
797,
286,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_displayed() {
for default in [
DefaultPolicy::Deny,
DefaultPolicy::Allow {
authenticated_only: true,
cluster_only: false,
},
DefaultPolicy::Allow {
authenticated_only: false,
... | rust_cleaned_test_functions.jsonl/12833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
14825,
291,
368,
341,
286,
369,
1638,
304,
2278,
310,
7899,
13825,
486,
23619,
88,
345,
310,
7899,
13825,
486,
18605,
341,
394,
37260,
18410,
25,
830,
345,
394,
10652,
18410,
25,
895,
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,
1... | 2 |
#[test]
fn test_check_leader() {
let sandbox = timestamping_sandbox();
let sandbox_state = SandboxState::new();
// option: with transaction
let tx = gen_timestamping_tx();
sandbox.recv(&tx);
let n_rounds_without_request_peers = {
let mut rounds = 0;
let mut time_left = ... | rust_cleaned_test_functions.jsonl/83606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
79991,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
543,
262,
1077,
42754,
4387,
284,
96860,
1397,
486,
931,
1428,
262,
442,
2999,
25,
448,
7745,
198,
262,
1077,
9854,
284,
408... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stop_sending_other_error_with_events() {
let (mut client, mut server, request_stream_id) = connect_and_send_request(false);
// send response - 200 Content-Length: 3
// with content: 'abc'.
server_send_response_and_exchange_packet(
&mut clien... | rust_cleaned_test_functions.jsonl/101906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1047
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
643,
2459,
30456,
4096,
6615,
19691,
368,
341,
1789,
286,
1077,
320,
6984,
2943,
11,
5206,
3538,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
3576,
626,
286,
442,
3624,
2033,
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... | 3 |
#[test]
fn test_derive_sha1_with_none() {
let ikm = hex::decode("0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c").unwrap();
let salt = None;
let info = hex::decode("").unwrap();
let hkdf = Hkdf::<Sha1>::extract(salt, &ikm[..]);
let mut okm = vec![0u8; 42];
assert!(hkdf.expand(&info[..], &m... | rust_cleaned_test_functions.jsonl/127018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
48836,
16,
6615,
31488,
368,
341,
262,
1077,
13361,
76,
284,
12371,
486,
18196,
445,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
15,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_analyze_index_expression() {
let b = ast::BaseNode::default();
let pkg = ast::Package {
base: b.clone(),
path: "path".to_string(),
package: "main".to_string(),
files: vec![ast::File {
base: b.clone(),
... | rust_cleaned_test_functions.jsonl/61569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12008,
55856,
3560,
28068,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
11763,
486,
13100,
341,
310,
2331,
25,
293,
15997,
3148,
310,
1815,
25,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip() {
use rand::Rng;
let mut rng = rand::thread_rng();
let size = 64;
let num_terrains = 8;
let mut layers = LevelLayers::new((size, size), num_terrains);
for _ in 0..size {
for _ in 0..size / 2 {
let delta = rng.gen_range(0..16) << DELTA_SHIF... | rust_cleaned_test_functions.jsonl/76731 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 731
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
368,
341,
262,
990,
10382,
486,
49,
968,
280,
262,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
262,
1077,
1379,
284,
220,
21,
19,
280,
262,
1077,
1629,
62,
68669,
1735,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_minqueue() {
let vec = vec![0x23, 0x47, 0xFA, 0x7D, 0x59, 0xFF, 0xA1, 0x84];
} | rust_cleaned_test_functions.jsonl/17106 | {
"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,
7260,
4584,
368,
341,
286,
1077,
7486,
284,
7486,
20703,
15,
87,
17,
18,
11,
220,
15,
87,
19,
22,
11,
220,
15,
72068,
11,
220,
15,
87,
22,
35,
11,
220,
15,
87,
20,
24,
11,
220,
15,
926... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_descriptor_number() {
assert_eq!(find_descriptor_number("Report reference"), Some(DESCRIPTOR_NUMBERS[8]));
assert_eq!(find_descriptor_number("fake descriptor name"), None);
assert_eq!(
find_descriptor_number("00002908-0000-1000-8000-00805F9B34FB"),
... | rust_cleaned_test_functions.jsonl/46714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
33774,
5500,
368,
341,
286,
2060,
10714,
10297,
3903,
33774,
5500,
445,
10361,
5785,
3975,
4329,
82208,
50920,
9631,
44116,
58,
23,
14382,
286,
2060,
10714,
10297,
3903,
33774,
5500,
445,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha1_to_hex() {
let data: &[u8; 20] = b"0123456789ABCDEFGHIJ";
assert_eq!(sha1_to_hex(data), encode_upper(data));
} | rust_cleaned_test_functions.jsonl/110922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
16,
2346,
32655,
368,
341,
286,
1077,
821,
25,
44590,
84,
23,
26,
220,
17,
15,
60,
284,
293,
1,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
71286,
41,
876,
286,
2060,
10714,
10297,
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 |
#[test]
fn test_parse_bulkstring_nil() {
// actual there is no string data.
// \r\n - a final CRLF.
let mut raw_data = Vec::from("$-10\r\n\r\n");
let expected_value_len = raw_data.len();
raw_data.append(&mut "trash".as_bytes().to_vec());
let Par... | rust_cleaned_test_functions.jsonl/85369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
71392,
917,
36175,
368,
341,
16885,
286,
442,
5042,
1052,
374,
902,
914,
821,
624,
286,
442,
1124,
81,
1699,
481,
264,
1590,
356,
80658,
624,
286,
1077,
5206,
7112,
1769,
284,
11312,
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_recursive_wildcards() {
let pat = Pattern::new("some/**/needle.txt").unwrap();
assert!(pat.matches("some/needle.txt"));
assert!(pat.matches("some/one/needle.txt"));
assert!(pat.matches("some/one/two/needle.txt"));
assert!(pat.matches("some/other/needle.txt... | rust_cleaned_test_functions.jsonl/40572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66242,
1670,
695,
25024,
368,
341,
286,
1077,
3272,
284,
18834,
486,
931,
445,
14689,
3663,
14,
59519,
3909,
1827,
15454,
543,
286,
2060,
10297,
4676,
36480,
445,
14689,
14,
59519,
3909,
4010,
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_verification_strategies() {
let invoice = r#"
bindleVersion = "1.0.0"
[bindle]
name = "arecebo"
version = "1.2.3"
[[parcel]]
[parcel.label]
sha256 = "aaabbbcccdddeeefff"
name = "telescope.gif"
mediaType = "image/gi... | rust_cleaned_test_functions.jsonl/125392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84245,
2895,
69388,
368,
341,
286,
1077,
24615,
284,
435,
2,
698,
286,
10719,
273,
5637,
284,
330,
16,
13,
15,
13,
15,
1837,
286,
508,
7666,
273,
921,
286,
829,
284,
330,
546,
346,
749,
698,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_regression() {
check!(4.7223665e21);
check!(8388608.0);
check!(16777216.0);
check!(33554436.0);
check!(67131496.0);
check!(1.9310392e-38);
check!(-2.47e-43);
check!(1.993244e-38);
check!(4103.9004);
check!(5339999700.0);
check!(6.0898e-39);
check!(... | rust_cleaned_test_functions.jsonl/58240 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91144,
368,
341,
262,
1779,
10297,
19,
13,
22,
17,
17,
18,
21,
21,
20,
68,
17,
16,
317,
262,
1779,
10297,
23,
18,
23,
23,
21,
15,
23,
13,
15,
317,
262,
1779,
10297,
16,
21,
22,
22,
22,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ipv4_only_toml_startup() {
named_test_harness("ipv4_only.toml", |_, tcp_port, _, _| {
let mut io_loop = Runtime::new().unwrap();
let addr: SocketAddr = SocketAddr::new(
Ipv4Addr::new(127, 0, 0, 1).into(),
tcp_port.expect("no tcp_port"),
);
... | rust_cleaned_test_functions.jsonl/88396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
19,
18410,
528,
316,
75,
80858,
368,
341,
262,
6941,
4452,
1523,
23518,
445,
42676,
19,
18410,
73494,
75,
497,
760,
6878,
28051,
8716,
11,
8358,
85137,
341,
286,
1077,
5206,
6399,
17198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_path_expr() {
check_assist(
inline_local_variable,
r"
fn foo() {
let d = 10;
let a$0 = d;
let b = a * 10;
let c = a as usize;
}",
r"
fn foo() {
let d = 10;
let b = d * 10;
let c = d as usize;
}",
);
} | rust_cleaned_test_functions.jsonl/3238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
435,
698,
8822,
15229,
368,
341,
262,
1077,
294,
284,
220,
16,
15,
280,
262,
1077,
264,
3,
15,
284,
294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_auth_header_by_key() {
let response = auth_header_by_key(String::from("username"), AuthHeader {
authorization: String::from("my bearer token"),
roles: vec![String::from("admin")],
subject: String::from("1234-1234-1234-1234"),
token: String:... | rust_cleaned_test_functions.jsonl/53100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14014,
8757,
3710,
3097,
368,
341,
286,
1077,
2033,
284,
4166,
8757,
3710,
3097,
2242,
486,
1499,
445,
5113,
3975,
7366,
4047,
341,
310,
23715,
25,
923,
486,
1499,
445,
2408,
69771,
3950,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duplicated_metrics_in_one_request() {
let mut runner = Runner::new();
// Attempt to start logging CPU Load twice. The request should fail as the logging request
// contains duplicated metric type.
let mut query = runner.proxy.start_logging(
"test",
... | rust_cleaned_test_functions.jsonl/66698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
98984,
37686,
1243,
11667,
7893,
368,
341,
286,
1077,
5206,
22259,
284,
44946,
486,
931,
1428,
286,
442,
43517,
311,
1191,
8392,
13940,
8893,
10917,
13,
576,
1681,
1265,
3690,
438,
279,
8392,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_key_codec() {
let tests = vec![
Datum::U64(1),
Datum::Bytes(b"123".to_vec()),
Datum::I64(-1),
Datum::Dur(Duration::parse(&mut EvalContext::default(), "12:34:56.666", 2).unwrap()),
];
let mut duration_col = ColumnInfo:... | rust_cleaned_test_functions.jsonl/4804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
3097,
51084,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
68459,
486,
52,
21,
19,
7,
16,
1326,
310,
68459,
486,
7078,
1883,
1,
16,
17,
18,
3263,
983,
13251,
14702,
310,
68459,
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_extract_config_data_ignores_services_defined_by_non_config_meta_contents() {
// Create a single package that IS the config data package but
let mock_reader: Box<dyn PackageReader> = Box::new(MockPackageReader::new());
let mut contents = HashMap::new();
c... | rust_cleaned_test_functions.jsonl/19455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
5332,
1769,
62,
622,
4589,
39846,
52870,
3710,
21637,
5332,
13381,
16682,
368,
341,
286,
442,
4230,
264,
3175,
6328,
429,
3424,
279,
2193,
821,
6328,
714,
8945,
286,
1077,
7860,
22306,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zip_next_back_side_effects_exhausted() {
let mut a = Vec::new();
let mut b = Vec::new();
let mut iter = [1, 2, 3, 4, 5, 6]
.iter()
.cloned()
.map(|n| {
a.push(n);
n * 10
})
.zip([2, 3, 4].iter().cloned().map(|n| {
... | rust_cleaned_test_functions.jsonl/8962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
11257,
3895,
30862,
83171,
2702,
15074,
291,
368,
341,
262,
1077,
5206,
264,
284,
11312,
486,
931,
543,
262,
1077,
5206,
293,
284,
11312,
486,
931,
543,
262,
1077,
5206,
5367,
284,
508,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_max() {
let b = Box3D::from_points(&[point3(50.0, 25.0, 12.5), point3(100.0, 160.0, 200.0)]);
assert!(b.min.x == 50.0);
assert!(b.min.y == 25.0);
assert!(b.min.z == 12.5);
assert!(b.max.x == 100.0);
assert!(b.max.y == 160.0);
assert!(b.... | rust_cleaned_test_functions.jsonl/7480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
6345,
368,
341,
286,
1077,
293,
284,
8261,
18,
35,
486,
1499,
12928,
2099,
58,
2768,
18,
7,
20,
15,
13,
15,
11,
220,
17,
20,
13,
15,
11,
220,
16,
17,
13,
20,
701,
1459,
18,
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_dcx_d_low() {
let mut state = State8080::empty_state();
state.memory = vec![0x1b];
state.d = 0x00;
state.e = 0x01;
emulate_8080_op(&mut state);
assert_eq!(state.d, 0x00);
assert_eq!(state.e, 0x00);
} | rust_cleaned_test_functions.jsonl/7755 | {
"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,
814,
25844,
814,
23767,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
16,
65,
935,
286,
1584,
950,
284,
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_doc_freq() {
let docs = SegmentPostings::create_from_docs(&[0, 2, 10]);
assert_eq!(docs.doc_freq(), 3);
let delete_bitset = DeleteBitSet::for_test(&[2], 12);
assert_eq!(docs.doc_freq_given_deletes(&delete_bitset), 2);
let all_deleted = DeleteBitSet::for_te... | rust_cleaned_test_functions.jsonl/33895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
21790,
368,
341,
286,
1077,
26340,
284,
37103,
4133,
819,
486,
3182,
5673,
49692,
2099,
58,
15,
11,
220,
17,
11,
220,
16,
15,
2558,
286,
2060,
10714,
10297,
14120,
23671,
21790,
1507,
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_lockup_is_expired() {
let custodian = solana_sdk::pubkey::new_rand();
let lockup = Lockup {
epoch: 1,
unix_timestamp: 1,
custodian,
};
// neither time
assert!(lockup.is_in_force(
&Clock {
epoc... | rust_cleaned_test_functions.jsonl/87031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 862
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
454,
6892,
80221,
368,
341,
286,
1077,
16564,
63849,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
5296,
454,
284,
15701,
454,
341,
310,
16342,
25,
220,
16,
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,
1... | 1 |
#[test]
fn test_counter() {
struct Service {
counter: usize,
}
impl Service {
fn init() -> Self {
Service { counter: 0 }
}
#[candid_method]
fn inc(&mut self) {
self.counter += 1;
}
#[candid_method(query)]
fn read... | rust_cleaned_test_functions.jsonl/103097 | {
"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,
15730,
368,
341,
262,
2036,
5362,
341,
286,
5546,
25,
22301,
345,
262,
456,
262,
11605,
5362,
341,
286,
5168,
2930,
368,
1464,
10115,
341,
310,
5362,
314,
5546,
25,
220,
15,
456,
286,
456,
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_two_numbers() {
let mut n1 = ListNode::new(9);
n1.append(9);
n1.append(9);
n1.append(9);
n1.append(9);
n1.append(9);
n1.append(9);
let l1 = Some(Box::new(n1));
let mut n2 = ListNode::new(9);
n2.append(9);
... | rust_cleaned_test_functions.jsonl/6797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
23241,
32964,
368,
341,
286,
1077,
5206,
308,
16,
284,
20501,
486,
931,
7,
24,
317,
286,
308,
16,
2057,
7,
24,
317,
286,
308,
16,
2057,
7,
24,
317,
286,
308,
16,
2057,
7,
24,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_app_try_into_app() {
let app = App {
client_name: "foo-test".to_string(),
redirect_uris: "http://example.com".to_string(),
scopes: Scopes::all(),
website: None,
};
let expected = app.clone();
let result = app.try_int... | rust_cleaned_test_functions.jsonl/51209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8191,
53283,
45514,
8191,
368,
341,
286,
1077,
906,
284,
1845,
341,
310,
2943,
1269,
25,
330,
7975,
16839,
3263,
983,
3904,
3148,
310,
6423,
64879,
285,
25,
330,
1254,
1110,
8687,
905,
3263,
983... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_generic_message_json_msg_should_be_parsed_as_generic() -> Result<(), String> {
let message = json!({
"@id": "some id",
"@type": "some type",
"content": "some content"
}).to_string();
let result = Connection::parse_generic_message(... | rust_cleaned_test_functions.jsonl/103831 | {
"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,
21039,
41232,
6462,
9455,
6483,
43378,
21263,
75788,
11898,
41232,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
1943,
284,
2951,
0,
2262,
310,
8428,
307,
788,
330,
14689,
877,
756,
310,
8428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_older_frozen_slots() {
let cache = AccountsCache::default();
assert!(cache.find_older_frozen_slots(0).is_empty());
let inserted_slot = 0;
cache.store(
inserted_slot,
&Pubkey::new_unique(),
AccountSharedData::new(1,... | rust_cleaned_test_functions.jsonl/28541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
62,
2018,
761,
42240,
54161,
368,
341,
286,
1077,
6500,
284,
40655,
8233,
486,
2258,
543,
1789,
286,
2060,
10297,
9360,
2658,
62,
2018,
761,
42240,
54161,
7,
15,
568,
285,
15124,
1423,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_var_path_simple() {
check_assist(
extract_variable,
"
fn main() {
let o = $0Some(true)$0;
}
",
"
fn main() {
let $0var_name = Some(true);
let o = var_name;
}
",
);
} | rust_cleaned_test_functions.jsonl/132837 | {
"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,
39123,
4612,
2638,
30015,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
14635,
345,
310,
6228,
8822,
1887,
368,
341,
262,
1077,
297,
284,
400,
15,
8373,
3715,
15087,
15,
280,
532,
756,
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_csp_msdn() {
let json = r#"{
"csp-report": {
"document-uri": "https://example.com/foo/bar",
"referrer": "https://www.google.com/",
"violated-directive": "default-src self",
"original-policy": "default-src self; r... | rust_cleaned_test_functions.jsonl/4018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 943
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2154,
717,
13446,
77,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
310,
330,
66,
2154,
47411,
788,
341,
394,
330,
6062,
87232,
788,
330,
2428,
1110,
8687,
905,
60555,
49513,
756,
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_star_network_large_pull() {
solana_logger::setup();
let mut network = star_network_create(2000);
network_simulator_pull_only(&mut network);
} | rust_cleaned_test_functions.jsonl/1103 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31681,
20966,
45228,
65693,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1077,
5206,
3922,
284,
6774,
20966,
8657,
7,
17,
15,
15,
15,
317,
262,
3922,
18314,
10511,
65693,
18410,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_valid_cant_fry() {
let floors: Vec<BTreeSet<ScienceThing>> = vec![
[
gen("thulium"), chip("strontium")
].iter().cloned().collect(),
];
assert_eq!(false, is_valid(&floors));
} | rust_cleaned_test_functions.jsonl/55908 | {
"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,
6892,
8337,
666,
517,
761,
884,
368,
341,
10217,
25945,
25,
11312,
32519,
6533,
1649,
27,
35400,
52940,
2452,
284,
7486,
90515,
197,
197,
9640,
298,
82281,
445,
339,
360,
2356,
3975,
16392,
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_duration_as_decimal() {
test_none_with_ctx_and_extra(cast_any_as_decimal::<Duration>);
let mut ctx = EvalContext::default();
// TODO: add more test case
let cs: Vec<(Duration, bool, bool, Decimal)> = vec![
(
Duration::parse... | rust_cleaned_test_functions.jsonl/1987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
11898,
74429,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
37248,
11898,
74429,
27638,
12945,
42013,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
442,
534... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_element_expand_visible_parent() {
let items = vec![
Path::new("a/b"),
];
//0 a/
//1 b
let mut tree =
FileTreeItems::new(&items, &BTreeSet::new()).unwrap();
tree.collapse(0, true);
assert_eq!(
get_visibles(&tree),
vec![
true,
false,
]
);
le... | rust_cleaned_test_functions.jsonl/129800 | {
"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,
15267,
7894,
67875,
34371,
15960,
368,
341,
197,
10217,
3589,
284,
7486,
90515,
298,
69640,
486,
931,
445,
64,
3470,
3975,
715,
197,
197,
4821,
197,
197,
322,
15,
264,
5894,
197,
197,
322,
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_new_with_no_fee() {
for compute_units in [0, 1, MICRO_LAMPORTS_PER_LAMPORT, u64::MAX] {
assert_eq!(
FeeDetails::new(FeeType::ComputeUnitPrice(0), compute_units),
FeeDetails::default(),
);
assert_eq!(
FeeD... | rust_cleaned_test_functions.jsonl/28260 | {
"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,
5921,
6615,
6536,
34305,
368,
341,
286,
369,
12564,
28345,
304,
508,
15,
11,
220,
16,
11,
86165,
2351,
1402,
5095,
50,
10617,
2351,
1402,
5095,
11,
575,
21,
19,
486,
10586,
60,
341,
310,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_tokenizer_1() {
test_tokenizer(
"(* 12 -15)",
vec![
TokenValue::Char('('),
TokenValue::Ident("*".to_string()),
TokenValue::Int(12),
TokenValue::Int(-15),
TokenValue::Char(')'),
... | rust_cleaned_test_functions.jsonl/59080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
62,
16,
368,
341,
286,
1273,
6458,
3135,
1006,
310,
330,
4071,
220,
16,
17,
481,
16,
20,
15752,
310,
7486,
90515,
394,
9660,
1130,
486,
4768,
89856,
1326,
394,
9660,
1130,
486,
283... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lea() {
assert_emit!(0x48, 0x8d, 0x04, 0xc5, 0, 0, 0, 0;
lea(RAX, Mem::Offset(RAX, 8, 0)));
assert_emit!(0x48, 0x8d, 0x04, 0xc5, 0x10, 0, 0, 0;
lea(RAX, Mem::Offset(RAX, 8, 16)));
assert_emit!(0x4c, 0x... | rust_cleaned_test_functions.jsonl/85510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11751,
64,
368,
341,
1789,
286,
2060,
69082,
10297,
15,
87,
19,
23,
11,
220,
15,
87,
23,
67,
11,
220,
15,
87,
15,
19,
11,
220,
15,
8148,
20,
11,
220,
15,
11,
220,
15,
11,
220,
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_account_checked_sub_tocks_underflow() {
let key = Pubkey::new_unique();
let (mut account1, _account2) = make_two_accounts(&key);
account1.checked_sub_tocks(u64::MAX).unwrap();
} | rust_cleaned_test_functions.jsonl/56005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
56456,
5228,
528,
25183,
58228,
4965,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
320,
6984,
2692,
16,
11,
716,
4608,
17,
8,
284,
1281,
23241,
55665,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_leaf_hash() {
{
let address = HashValue::random();
let blob = AccountStateBlob::from(vec![0x02]);
let value_hash = blob.hash();
let hash = hash_leaf(address, value_hash);
let leaf_node = Node::new_leaf(address, blob);
assert_eq!(leaf_node.hash(... | rust_cleaned_test_functions.jsonl/56487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38909,
8950,
368,
341,
262,
341,
286,
1077,
2621,
284,
6531,
1130,
486,
11463,
543,
286,
1077,
23404,
284,
8615,
1397,
37985,
486,
1499,
25592,
20703,
15,
87,
15,
17,
2558,
286,
1077,
897,
8950,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_closing_tag_mismatch_err() {
// no closing tag
let xml = "<img>";
let mut opts = ReadOptions::default();
opts.require_decl = false;
let doc = Document::parse_str_with_opts(xml, opts.clone());
assert!(matches!(doc.unwrap_err(), Error::MalformedXML(_)));
// closing tag... | rust_cleaned_test_functions.jsonl/74416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
17831,
9372,
717,
24976,
9266,
368,
341,
262,
442,
902,
15316,
4772,
198,
262,
1077,
8396,
284,
4055,
1892,
6734,
262,
1077,
5206,
12185,
284,
4457,
3798,
486,
2258,
543,
262,
12185,
23712,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserde_init() {
let json = r#"
{"buffer_id": 42,
"views": ["view-id-4"],
"rev": 1,
"buf_size": 20,
"nb_lines": 5,
"path": "some_path",
"syntax": "toml",
"config": {"some_key": 420}}"#;... | rust_cleaned_test_functions.jsonl/35884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
86805,
6137,
368,
341,
286,
1077,
2951,
284,
435,
2,
698,
310,
5212,
7573,
842,
788,
220,
19,
17,
345,
1797,
330,
5072,
788,
4383,
1050,
12897,
12,
19,
8097,
1797,
330,
7282,
788,
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... | 2 |
#[test]
fn test_bilinearity() {
let mut rng = test_rng();
let a: G1Projective = rng.gen();
let b: G2Projective = rng.gen();
let s: Fr = rng.gen();
let sa = a.mul(s.into_repr());
let sb = b.mul(s.into_repr());
let ans1 = CP6_782::pairing(sa, b);
let ans2 = CP6_782::pairing(a, sb... | rust_cleaned_test_functions.jsonl/15280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
26560,
10748,
368,
341,
262,
1077,
5206,
28422,
284,
1273,
66849,
543,
262,
1077,
264,
25,
479,
16,
7849,
533,
284,
28422,
22822,
543,
262,
1077,
293,
25,
479,
17,
7849,
533,
284,
28422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gen_ascii_str() {
let mut r = thread_rng();
assert_eq!(r.gen_ascii_chars().take(0).count(), 0);
assert_eq!(r.gen_ascii_chars().take(10).count(), 10);
assert_eq!(r.gen_ascii_chars().take(16).count(), 16);
} | rust_cleaned_test_functions.jsonl/76076 | {
"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,
16322,
50238,
2895,
368,
341,
286,
1077,
5206,
435,
284,
4516,
66849,
543,
286,
2060,
10714,
10297,
81,
22822,
50238,
37418,
1005,
22769,
7,
15,
568,
1830,
1507,
220,
15,
317,
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_child() {
let parsed: Expression = from_str("abcd.efgh").unwrap();
let expected = Child(Box::new(Identifier("abcd".into())), "efgh".into());
assert_eq!(parsed, expected);
let parsed: Expression = from_str("abcd.efgh.ijkl").unwrap();
let expected = Child(... | rust_cleaned_test_functions.jsonl/127053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17268,
368,
341,
286,
1077,
15676,
25,
16378,
284,
504,
2895,
445,
68644,
95856,
866,
1827,
15454,
543,
286,
1077,
3601,
284,
9391,
67758,
486,
931,
7,
8714,
445,
68644,
3263,
18122,
96501,
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_state_packing() {
let max_validators = 10_000;
let size = get_instance_packed_len(&ValidatorList::new(max_validators)).unwrap();
// Not initialized
let stake_list = ValidatorList {
account_type: AccountType::Uninitialized,
max_validators: 0... | rust_cleaned_test_functions.jsonl/5724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
620,
8985,
368,
341,
286,
1077,
1932,
8337,
2973,
284,
220,
16,
15,
62,
15,
15,
15,
280,
286,
1077,
1379,
284,
633,
11904,
620,
11191,
6043,
2099,
14256,
852,
486,
931,
8739,
8337,
2973,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_default() {
let b = Delete::new().add_run(Run::new()).build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:del w:id="123" w:author="unnamed" w:date="1970-01-01T00:00:00Z"><w:r><w:rPr /></w:r></w:del>"#
);
} | rust_cleaned_test_functions.jsonl/27932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
9993,
368,
341,
286,
1077,
293,
284,
10428,
486,
931,
1005,
718,
14007,
2785,
359,
486,
931,
6011,
5834,
543,
286,
2060,
10714,
33673,
310,
607,
486,
1499,
39453,
23,
2099,
65,
568,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wrap_return_type_handles_generic_functions() {
check_fix(
r#"
//- /main.rs crate:main deps:core
use core::result::Result::{self, Ok, Err};
fn div<T>(x: T) -> Result<T, i32> {
if x == 0 {
return Err(7);
}
<|>x
}
//- /core/lib.rs crate:core
pub mod result {... | rust_cleaned_test_functions.jsonl/11418 | {
"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,
38550,
12511,
1819,
68017,
41232,
31708,
368,
341,
286,
1779,
36060,
1006,
310,
435,
2,
698,
61463,
608,
3817,
25638,
17717,
25,
3817,
48178,
25,
2153,
198,
810,
6200,
486,
1382,
486,
2077,
22964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
// Test that `new_ip_socket` works with various edge cases.
// IPv4
let mut ctx = DummyEventDispatcherBuilder::from_config(DUMMY_CONFIG_V4)
.build::<DummyEventDispatcher>();
// A template socket that we can use to more concisely define socke... | rust_cleaned_test_functions.jsonl/74559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
442,
3393,
429,
1565,
931,
10385,
19555,
63,
4278,
448,
5257,
6821,
5048,
382,
286,
442,
31560,
19,
271,
286,
1077,
5206,
5635,
284,
50567,
1556,
21839,
3297,
486,
1499,
533... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_auto_namespace_map() {
let arena = bumpalo::Bump::new();
let dp_opts = Opts::default().decl_opts(&arena);
assert_eq!(dp_opts.auto_namespace_map.len(), 15);
} | rust_cleaned_test_functions.jsonl/103747 | {
"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,
27740,
41571,
5376,
368,
341,
286,
1077,
24902,
284,
27575,
12529,
486,
33,
1510,
486,
931,
543,
286,
1077,
11329,
32354,
284,
506,
12754,
486,
2258,
1005,
10005,
32354,
2099,
30527,
317,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_decode_mov_w() {
assert_eq!(
decode_32(0xf04f38ff),
Instruction::MOV_imm {
params: RegImmCarryParams {
rd: Reg::R8,
imm32: Imm32Carry::Carry {
imm32_c0: (0xffffffff, false),
imm32_c1: (0x... | rust_cleaned_test_functions.jsonl/64802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
55798,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
15,
19,
69,
18,
23,
542,
1326,
286,
29051,
486,
66022,
71370,
341,
310,
3628,
25,
3184,
50739,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_escape_minecraft() {
assert_eq!(
escape_minecraft("This\ncontains\nsome\nnewlines").collect::<String>(),
"This\\ncontains\\nsome\\nnewlines"
);
assert_eq!(
escape_minecraft("Now \\ some \\ backslashes").collect::<String>(),
... | rust_cleaned_test_functions.jsonl/106550 | {
"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,
21832,
717,
12086,
368,
341,
286,
2060,
10714,
33673,
310,
12449,
717,
12086,
445,
1986,
1699,
13372,
1699,
14689,
1699,
931,
7969,
1827,
17384,
27638,
703,
65766,
310,
330,
1986,
3422,
77,
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,
1,
1,
1,
1... | 1 |
#[test]
fn test_reader_io_errors_le() {
use bitstream_io::{BitRead, BitReader, LittleEndian};
use std::io::ErrorKind;
let actual_data: [u8; 1] = [0xB1];
/*individual bits*/
let mut r = BitReader::endian(Cursor::new(&actual_data), LittleEndian);
assert!(r.read_bit().is_ok());
assert... | rust_cleaned_test_functions.jsonl/65123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1060
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
16939,
20196,
11751,
368,
341,
262,
990,
2699,
4027,
16939,
22964,
8344,
4418,
11,
6495,
5062,
11,
14671,
43231,
2440,
262,
990,
1460,
486,
815,
486,
1454,
10629,
401,
262,
1077,
5042,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_ipv4_mapped() {
let test_cases = vec![
(Some(hex("00000000000000000001000001020304")), Some(0)),
(Some(hex("00000000000000000000000001020304")), Some(0)),
(Some(hex("10101010")), Some(0)),
(Some(hex("00000000000000000000ffff01020304")), ... | rust_cleaned_test_functions.jsonl/59417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
49378,
19,
91933,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
8373,
44660,
445,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_same_n_frac_digits() {
let x = Decimal::new_raw(1234567890, 3);
let y = x + x;
assert_eq!(y.coefficient(), 2 * x.coefficient());
assert_eq!(y.n_frac_digits(), x.n_frac_digits());
let z = x + Decimal::NEG_ONE;
assert_eq!(z.coefficient(), x.coeff... | rust_cleaned_test_functions.jsonl/29254 | {
"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,
2891,
33574,
1089,
70358,
41432,
368,
341,
286,
1077,
856,
284,
26728,
486,
931,
16067,
7,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
11,
220,
18,
317,
286,
1077,
379,
284,
856,
488,
856,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_ended_zip() {
let xs = [1, 2, 3, 4, 5, 6];
let ys = [1, 2, 3, 7];
let a = xs.iter().map(|&x| x);
let b = ys.iter().map(|&x| x);
let mut it = a.zip(b);
assert_eq!(it.next(), Some((1, 1)));
assert_eq!(it.next(), Some((2, 2)));
... | rust_cleaned_test_functions.jsonl/1023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
62,
2883,
42131,
368,
341,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
286,
1077,
31810,
284,
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_program_bpf_error_handling() {
solana_logger::setup();
let mut programs = Vec::new();
#[cfg(feature = "bpf_c")]
{
programs.extend_from_slice(&[("error_handling")]);
}
#[cfg(feature = "bpf_rust")]
{
programs.extend_from_slice(&[("solana_bpf_rust_error_... | rust_cleaned_test_functions.jsonl/5739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1865
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
880,
15897,
4096,
75642,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
5206,
7468,
284,
11312,
486,
931,
543,
262,
11506,
14072,
27062,
284,
330,
65,
15897,
666,
5422,
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... | 5 |
#[test]
fn test_csv() {
use std::collections::BTreeMap;
let exporter = CsvExporter::default();
// NOTE: results are fabricated
let results = vec![
BenchmarkResult::new(
String::from("FOO=one BAR=two command | 1"),
1.0,
2.0,
1.0,
... | rust_cleaned_test_functions.jsonl/114587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 912
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14020,
368,
341,
262,
990,
1460,
486,
51137,
486,
33,
6533,
2227,
280,
262,
1077,
57378,
284,
91671,
88025,
486,
2258,
1428,
262,
442,
16743,
25,
3059,
525,
69454,
198,
262,
1077,
3059,
284,
748... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bytesator_last() {
let s = "ศไทย中华Việt Nam";
let b = s.bytes();
assert_eq!(b.last().unwrap(), 109)
} | rust_cleaned_test_functions.jsonl/17638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
850,
12195,
368,
341,
262,
1077,
274,
284,
330,
123863,
125451,
100849,
35544,
124382,
29974,
3302,
262,
1077,
293,
284,
274,
42697,
543,
262,
2060,
10714,
10297,
65,
9110,
1005,
15454,
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 |
#[test]
fn test_invert() {
let v = Vector3::new(1.0f64, 2.0, 3.0);
let t = Decomposed {
scale: 1.5f64,
rot: Quaternion::new(0.5f64, 0.5, 0.5, 0.5),
disp: Vector3::new(6.0f64, -7.0, 8.0),
};
let ti = t
.inverse_transform()
.expect("Expected successful inver... | rust_cleaned_test_functions.jsonl/86459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
1621,
368,
341,
262,
1077,
348,
284,
4196,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
1077,
259,
284,
96378,
3865,
341,
286,
5452,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rfc_8285_one_byte_two_extension_of_two_bytes() -> Result<()> {
// | 0xBE | 0xDE | length=1 |
let raw_pkt = Bytes::from_static(&[
0x90, 0xe0, 0x69, 0x8f, 0xd9, 0xc2, 0x93, 0xda, 0x1c, 0x64, 0x27, 0x82, 0xBE, 0xDE... | rust_cleaned_test_functions.jsonl/128730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1038
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
8316,
62,
23,
17,
23,
20,
11667,
19737,
23241,
31035,
3575,
23241,
12524,
368,
1464,
5714,
71698,
341,
41693,
262,
442,
760,
981,
220,
15,
85449,
262,
760,
262,
220,
15,
78979,
981,
760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_parse_conv_impl_with_type_params() {
let _ = env_logger::try_init();
let mut conv_map = parse(
SourceId::none(),
r#"
#[allow(dead_code)]
#[swig_code = "let {to_var}: {to_var_type} = <{to_var_type}>::swig_from({from_var}, env);"]
trait SwigFrom<T> {
fn... | rust_cleaned_test_functions.jsonl/18736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
22716,
21007,
6615,
1819,
6745,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
1428,
286,
1077,
5206,
5686,
5376,
284,
4715,
1006,
310,
8748,
764,
486,
6697,
3148,
310,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drop_table() {
let config = Config::new(&r#"
max_memory_pool_page_num = 2
table_meta_dir = "test_file/table_meta/"
table_file_dir = "test_file/table_file""#.to_string());
let manager = TableManager::make_ref(&config);
let table = Table{
name : "... | rust_cleaned_test_functions.jsonl/67282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
5237,
368,
972,
262,
1077,
2193,
284,
5532,
486,
931,
2099,
81,
2,
5031,
286,
1932,
19195,
15709,
6129,
4273,
284,
220,
17,
319,
286,
1965,
13381,
4334,
284,
330,
1944,
2458,
45326,
13381... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pool_add() {
let mut dummy_chain = DummyChainImpl::new();
let head_header = block::BlockHeader {
height: 1,
..block::BlockHeader::default()
};
dummy_chain.store_head_header(&head_header);
let parent_transaction = test_transaction(vec![5, 6, 7], vec![11, 3]);
// We want t... | rust_cleaned_test_functions.jsonl/17036 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 709
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
15709,
2891,
368,
341,
197,
10217,
5206,
17292,
30583,
284,
50567,
18837,
9673,
486,
931,
543,
197,
10217,
1968,
8757,
284,
2504,
486,
4713,
4047,
341,
298,
30500,
25,
220,
16,
345,
298,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inspect_log_allows_mutex_guard_temporary() {
let (_inspector, node) = inspector_and_list_node();
let node = Mutex::new(node);
inspect_log!(node.lock(), k1: "v1");
} | rust_cleaned_test_functions.jsonl/90893 | {
"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,
34386,
987,
5224,
5705,
4241,
14204,
36796,
11771,
7592,
368,
341,
1789,
286,
1077,
5453,
1330,
18997,
11,
2436,
8,
284,
44725,
8378,
2019,
5084,
543,
286,
1077,
2436,
284,
66215,
486,
931,
6958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_qvariant_qstring() {
let ts = "TestString123".to_owned();
let qs = QString::from(ts.clone());
let qv = QVariant::from(qs);
let qs2 = QString::try_from(qv).unwrap();
let ts2: String = qs2.into();
assert_eq!(ts, ts2);
} | rust_cleaned_test_functions.jsonl/89749 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
15969,
8976,
917,
368,
341,
286,
1077,
10591,
284,
330,
2271,
703,
16,
17,
18,
3263,
983,
51973,
543,
286,
1077,
32421,
284,
7879,
486,
1499,
35864,
15997,
1423,
286,
1077,
2804,
85,
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_zero_commmit() {
let zero_commit = Confidential::zero_pedersen_commitment();
let mut handmade_bytes = vec![0x08u8];
handmade_bytes.extend(&[0x0u8; 32]);
let handmade_commit =
secp256k1zkp::pedersen::Commitment::strict_decode(
&handmade... | rust_cleaned_test_functions.jsonl/25385 | {
"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,
19359,
25149,
1763,
368,
341,
286,
1077,
7168,
36346,
284,
73365,
486,
14154,
93104,
87989,
36346,
478,
1428,
286,
1077,
5206,
51686,
12524,
284,
7486,
20703,
15,
87,
15,
23,
84,
23,
935,
286,
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_enum_string_value() {
let raw_schema = r#"
{
"type": "record",
"name": "test",
"fields": [
{"name": "a", "type": "long", "default": 42},
{"name": "b", "type": "string"},
... | rust_cleaned_test_functions.jsonl/77301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 901
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
3904,
3142,
368,
341,
286,
1077,
7112,
25371,
284,
435,
2,
698,
310,
341,
394,
330,
1313,
788,
330,
8548,
756,
394,
330,
606,
788,
330,
1944,
756,
394,
330,
9007,
788,
2278,
503,
5212,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verkey_is_b58_and_valid_length() {
let verkey = "EkVTa7SCJ5SntpYyX7CSb2pcBhiVGT9kWSagA8a9T69A";
match validate_verkey(&verkey) {
Err(x) => panic!("Should be valid verkey"),
Ok(x) => assert_eq!(x, verkey)
}
} | rust_cleaned_test_functions.jsonl/86089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26042,
792,
6892,
880,
20,
23,
8378,
8337,
5118,
368,
341,
286,
1077,
2739,
792,
284,
330,
41917,
20457,
64,
22,
3540,
41,
20,
50,
89340,
56,
88,
55,
22,
6412,
65,
17,
3992,
33,
6023,
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... | 2 |
#[test]
fn test_rope_from_nvim_cells() {
let cells = vec![
nvim_bridge::Cell {
text: String::from("1"),
hl_id: 1,
repeat: 3,
double_width: false,
},
nvim_bridge::Cell {
text: String::from(... | rust_cleaned_test_functions.jsonl/14021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 530
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26608,
375,
5673,
1089,
41194,
37796,
368,
341,
286,
1077,
7761,
284,
7486,
90515,
310,
31440,
318,
54944,
486,
3599,
341,
394,
1467,
25,
923,
486,
1499,
445,
16,
4461,
394,
49586,
842,
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_change_spend_policy_default() {
let change_spend_policy = ChangeSpendPolicy::default();
let filtered = get_test_utxos()
.into_iter()
.filter(|u| change_spend_policy.is_satisfied_by(u))
.count();
assert_eq!(filtered, 2);
} | rust_cleaned_test_functions.jsonl/5558 | {
"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,
15947,
643,
3740,
22773,
9993,
368,
341,
286,
1077,
2297,
643,
3740,
22773,
284,
10388,
50,
3740,
13825,
486,
2258,
543,
286,
1077,
18293,
284,
633,
4452,
60363,
87,
436,
741,
310,
659,
18122,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frame_decoder() {
use crate::frame_decoder;
use std::fs;
let mut content = fs::File::open("./decodecorpus_files/z000088.zst").unwrap();
struct NullWriter(());
impl std::io::Write for NullWriter {
fn write(&mut self, buf: &[u8]) -> Result<usize, std::io::Error> {
... | rust_cleaned_test_functions.jsonl/37445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8929,
49843,
368,
341,
262,
990,
17717,
486,
6763,
49843,
280,
262,
990,
1460,
486,
3848,
401,
262,
1077,
5206,
2213,
284,
8619,
486,
1703,
486,
2508,
13988,
18196,
6005,
17820,
10931,
31082,
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_mut_splitator_rev() {
let mut xs = [1,2,0,3,4,0,0,5,6,0];
for slice in xs.mut_split(|x| *x == 0).rev().take(4) {
slice.reverse();
}
assert!(xs == [1,2,0,4,3,0,0,6,5,0]);
} | rust_cleaned_test_functions.jsonl/75640 | {
"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,
29523,
17052,
850,
38082,
368,
341,
286,
1077,
5206,
11943,
284,
508,
16,
11,
17,
11,
15,
11,
18,
11,
19,
11,
15,
11,
15,
11,
20,
11,
21,
11,
15,
935,
286,
369,
15983,
304,
11943,
744,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_sum_times() {
let five_bucks: Expression = Money::dollar(5).into();
let ten_francs: Expression = Money::franc(10).into();
let mut bank = Bank::new();
bank.add_rate(Franc.into(), Dollar.into(), 2);
let sum: Expression = (&Sum::new(five_bucks, ten_francs) * ... | rust_cleaned_test_functions.jsonl/115310 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
22353,
368,
341,
286,
1077,
4236,
880,
15582,
25,
16378,
284,
17633,
486,
67,
21295,
7,
20,
568,
18122,
543,
286,
1077,
5779,
41537,
1129,
82,
25,
16378,
284,
17633,
486,
1626,
1129,
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_put_var_uint() {
let tests: &[(Vec<u8>, u64, usize)] = &[
(vec![0x01, 0x00], 0, 2),
(vec![0x01, 0x09], 9, 2),
(vec![0x02, 0x01, 0x02], 0x0102, 3),
(vec![0x03, 0x01, 0x02, 0x03], 0x010203, 4),
(vec![0x04, 0x01, 0x02, 0x03, 0x04],... | rust_cleaned_test_functions.jsonl/14914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 740
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
4612,
15807,
368,
341,
286,
1077,
7032,
25,
609,
9697,
10050,
34837,
23,
8066,
575,
21,
19,
11,
22301,
7252,
284,
609,
9640,
310,
320,
4083,
20703,
15,
87,
15,
16,
11,
220,
15,
87,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_collect() {
let empty = "";
let s: String = empty.chars().collect();
assert_eq!(empty, s);
let data = "ประเทศไทย中";
let s: String = data.chars().collect();
assert_eq!(data, s);
} | rust_cleaned_test_functions.jsonl/17584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
368,
341,
262,
1077,
4287,
284,
5438,
262,
1077,
274,
25,
923,
284,
4287,
85062,
1005,
17384,
543,
262,
2060,
10714,
10297,
3194,
11,
274,
317,
262,
1077,
821,
284,
330,
130391,
15946,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_normalize_magnitude() {
let v = Tuple::vector(1.0, 2.0, 3.0);
let normalized = v.normalize();
assert_eq!(true, compare_floats(normalized.magnitude(), 1.0f32));
} | rust_cleaned_test_functions.jsonl/113524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80807,
717,
34715,
368,
341,
286,
1077,
348,
284,
24622,
486,
3215,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
286,
1077,
29410,
284,
348,
44657,
543,
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_push_key_maps() {
// selected
let textbox: TextBox<TestBackend> = TextBox::new(true);
key_maps_test_case(
&textbox,
KeyEvent::new(KeyCode::Left, KeyModifiers::NONE),
"Move cursor",
);
key_maps_test_case(
&tex... | rust_cleaned_test_functions.jsonl/20812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
3097,
46512,
368,
341,
286,
442,
4091,
198,
286,
1077,
73999,
25,
29694,
71273,
29699,
29,
284,
29694,
486,
931,
3715,
317,
286,
1376,
46512,
4452,
19096,
1006,
310,
609,
77375,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.