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_case_11() {
let key = "4739a0ad2169b9c89edd74e16fbcecc748c25dc338041fc34af0f1bda20eaf3f";
let nonce = "ff7b372aa801eb98a1298bc610280737";
let expected_output =
"06ccde41d10d6466859927bfc9a476dbc84064838ec721261cb548c18bd14c67";
hcha... | rust_cleaned_test_functions.jsonl/44673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
16,
16,
368,
341,
310,
1077,
1376,
284,
330,
19,
22,
18,
24,
64,
15,
329,
17,
16,
21,
24,
65,
24,
66,
23,
24,
53537,
22,
19,
68,
16,
21,
10798,
346,
638,
22,
19,
23,
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... | 1 |
#[test]
fn test_parse_attribute_flag_false() {
let buf = [0x00];
let unit = test_parse_attribute_unit_default();
let form = constants::DW_FORM_flag;
let value = AttributeValue::Flag(false);
test_parse_attribute(&buf, 1, &unit, form, value);
} | rust_cleaned_test_functions.jsonl/102024 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16791,
10933,
36015,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
15,
935,
286,
1077,
4982,
284,
1273,
21039,
16791,
14832,
9993,
543,
286,
1077,
1352,
284,
18021,
486,
54219,
12705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_disconnected() {
let mut exec = fasync::TestExecutor::new().expect("executor should build");
let (proxy, _stream) =
create_proxy_and_stream::<ProfileMarker>().expect("Profile proxy should be created");
let (remote, signaling) = Channel::create();
let ... | rust_cleaned_test_functions.jsonl/91775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
15288,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
80787,
1265,
1936,
797,
286,
1077,
320,
22803,
11,
716,
4027,
8,
4035,
310,
1855,
2971... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_parser() -> Result<(), Box<dyn std::error::Error>> {
let content = r#"
DEBUG = true
FOO = "foo"
PORT = 8080
bars = [ 1, 2, 3 ]
[test]
FLAGS = "none"
FOO = "test_foo"
PORT = "3000"
... | rust_cleaned_test_functions.jsonl/32852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 818
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
18517,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
1077,
2213,
284,
435,
2,
698,
310,
12657,
284,
830,
198,
310,
434,
19499,
284,
330,
7975,
698,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_file_decoration_style_omit() {
_do_test_file_style_no_decoration(&[
"--file-style",
"green",
"--file-decoration-style",
"omit",
]);
} | rust_cleaned_test_functions.jsonl/70070 | {
"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,
2458,
2259,
26452,
15117,
62,
77968,
368,
341,
286,
716,
2982,
4452,
2458,
15117,
6536,
2259,
26452,
2099,
9640,
310,
14482,
1192,
11297,
756,
310,
330,
13250,
756,
310,
14482,
1192,
30266,
11297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_to_bytes() {
assert!(to_bytes(&mut "64K".to_string()).is_ok());
assert!(to_bytes(&mut "64M".to_string()).is_ok());
let res = to_bytes(&mut "64KK".to_string());
assert!(
res.is_err()
&& format!("{}", res.unwrap_err())
... | rust_cleaned_test_functions.jsonl/125483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
12524,
368,
341,
286,
2060,
10297,
983,
12524,
2099,
6984,
330,
21,
19,
42,
3263,
983,
3904,
6011,
285,
19817,
1423,
286,
2060,
10297,
983,
12524,
2099,
6984,
330,
21,
19,
44,
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... | 4 |
#[test]
fn test_epoch_slots_fill_random_range() {
use rand::Rng;
for _ in 0..10 {
let mut range: Vec<Slot> = vec![];
for _ in 0..5000 {
let last = *range.last().unwrap_or(&0);
range.push(last + rand::thread_rng().gen_range(1, 5));
... | rust_cleaned_test_functions.jsonl/116106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20682,
54161,
30728,
22644,
9698,
368,
341,
286,
990,
10382,
486,
49,
968,
280,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
1077,
5206,
2088,
25,
11312,
27,
19877,
29,
284,
7486,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wmi_services () {
let reader: Box<dyn WmiServicesIface> = Box::new(Test{});
let test_services = &WmiServices::get_specific_ex(reader.borrow())[0];
assert_eq!(test_services.accept_pause, "false");
assert_eq!(test_services.accept_stop, "true");
assert_eq!(te... | rust_cleaned_test_functions.jsonl/103576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
8155,
39846,
1719,
341,
286,
1077,
6604,
25,
8261,
92846,
467,
8155,
11025,
40,
1564,
29,
284,
8261,
486,
931,
31159,
90,
2960,
286,
1077,
1273,
39846,
284,
609,
54,
8155,
11025,
486,
455,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_benchmarks() {
ExtBuilder::default().base_weight(5).build().execute_with(|| {
assert_ok!(test_benchmark_swap_currency::<Test>());
assert_ok!(test_benchmark_set_currency::<Test>());
assert_ok!(test_benchmark_add_currency::<Test>());
assert_ok!(test_benchmark_remove_currency::<Test>(... | rust_cleaned_test_functions.jsonl/27028 | {
"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,
880,
19762,
15544,
368,
341,
197,
76605,
3297,
486,
2258,
1005,
3152,
15876,
7,
20,
568,
5834,
1005,
10257,
6615,
79453,
341,
298,
6948,
19817,
10297,
1944,
880,
39381,
40991,
34710,
27638,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_hotplug_timeout() {
#[derive(Debug)]
struct TestData<'a> {
param: &'a str,
result: Result<time::Duration>,
}
let tests = &[
TestData {
param: "",
result: Err(make_err(ERR_INVALID_HOTPLUG_TIME... | rust_cleaned_test_functions.jsonl/4049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
33433,
47474,
20537,
368,
341,
286,
11506,
27098,
42618,
5563,
286,
2036,
93200,
18291,
64,
29,
341,
310,
1685,
25,
30136,
64,
607,
345,
310,
1102,
25,
5714,
27,
1678,
486,
12945,
12520,
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_serde_round_trip() {
// validate serde attribute working
let json = serde_json::to_string(&SerdeRoundtrip { a: 5, b: 5 }).unwrap();
assert_eq!("{\"a\":5}", json);
let result: SerdeRoundtrip = serde_json::from_str(&json).unwrap();
assert_eq!(result.a, 5);
assert_eq!(resul... | rust_cleaned_test_functions.jsonl/124089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
29896,
63883,
368,
341,
262,
442,
9593,
61570,
7035,
3238,
198,
262,
1077,
2951,
284,
61570,
9455,
486,
983,
3904,
2099,
31745,
450,
27497,
32981,
314,
264,
25,
220,
20,
11,
293,
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_option() {
test_parse_ok(&[
("<a/>", Some("".to_string())),
("<a></a>", Some("".to_string())),
("<a> </a>", Some("".to_string())),
("<a>42</a>", Some("42".to_string())),
]);
} | rust_cleaned_test_functions.jsonl/54627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
368,
341,
262,
1273,
21039,
19817,
2099,
9640,
286,
90276,
64,
9685,
497,
4329,
445,
3263,
983,
3904,
73727,
286,
90276,
64,
1472,
64,
21156,
4329,
445,
3263,
983,
3904,
73727,
286,
90276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nmaximizer_custom_struct() {
let mut highs = NMaximizer::new(3);
highs.insert(CustomStruct {
value: 7i32,
dist: 5f64,
});
highs.insert(CustomStruct {
value: 5i32,
dist: 13f64,
});
highs.insert(CustomS... | rust_cleaned_test_functions.jsonl/40402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
2810,
41699,
15875,
15126,
368,
341,
286,
1077,
5206,
53779,
284,
451,
5974,
41699,
486,
931,
7,
18,
317,
286,
53779,
7030,
3025,
1450,
9422,
341,
310,
897,
25,
220,
22,
72,
18,
17,
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_nice_api() {
let ctx = TestContext::new();
let mut con = ctx.connection();
assert_eq!(con.set("my_key", 42), Ok(()));
assert_eq!(con.get("my_key"), Ok(42));
let (k1, k2): (i32, i32) = redis::pipe()
.atomic()
.set("key_1", 42)
.ignore()
.set("... | rust_cleaned_test_functions.jsonl/108965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
558,
11697,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
5206,
390,
284,
5635,
20310,
1428,
262,
2060,
10714,
10297,
443,
980,
445,
2408,
3097,
497,
220,
19,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_last() {
let a: VolAddress<i32> = unsafe { VolAddress::new(4) };
let i: VolIter<i32> = unsafe { a.iter_slots(2) };
assert_eq!(i.last(), Some(unsafe { VolAddress::new(4 + 2 * 4) }));
let mut i: VolIter<i32> = unsafe { a.iter_slots(2) };
i.next();
i.next();
assert_eq!(i.last(), Non... | rust_cleaned_test_functions.jsonl/116633 | {
"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,
12195,
368,
341,
220,
1077,
264,
25,
10882,
4286,
21897,
18,
17,
29,
284,
19860,
314,
10882,
4286,
486,
931,
7,
19,
8,
2605,
220,
1077,
600,
25,
10882,
8537,
21897,
18,
17,
29,
284,
19860,
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_misused_facet_collector() {
let mut facet_collector = FacetCollector::for_field(Field(0));
facet_collector.add_facet(Facet::from("/country"));
facet_collector.add_facet(Facet::from("/country/europe"));
} | rust_cleaned_test_functions.jsonl/25606 | {
"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,
717,
285,
2591,
41589,
295,
10211,
27669,
368,
341,
286,
1077,
5206,
44507,
10211,
27669,
284,
16945,
295,
53694,
486,
1958,
5013,
57788,
7,
15,
1106,
286,
44507,
10211,
27669,
1364,
41589,
295,
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_cmsg_len() {
for l in 0..128 {
unsafe {
assert_eq!(libc::CMSG_LEN(l) as usize, cmsg_len(l));
}
}
} | rust_cleaned_test_functions.jsonl/91465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
3236,
6043,
368,
341,
286,
369,
326,
304,
220,
15,
496,
16,
17,
23,
341,
310,
19860,
341,
394,
2060,
10714,
10297,
55576,
486,
34,
19575,
15536,
2333,
8,
438,
22301,
11,
272,
3236,
6043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encryption_crud() {
let db_name = format!("{}.sqlite3", string(8).as_str());
let temp_dir = tempdir().unwrap();
let db_folder = temp_dir.path().to_str().unwrap().to_string();
let db_path = format!("{}{}", db_folder, db_name);
embed_migrations!("./migratio... | rust_cleaned_test_functions.jsonl/1822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2096
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13781,
15597,
32331,
661,
368,
341,
286,
1077,
2927,
1269,
284,
3561,
17223,
46391,
37042,
18,
497,
914,
7,
23,
568,
300,
2895,
1423,
286,
1077,
2730,
4334,
284,
2730,
3741,
1005,
15454,
543,
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_webpush_notification() {
let payload = WebNotificationBuilder::new(
WebPushAlert {
action: "View",
title: "Hello",
body: "world",
},
&vec!["arg1"],
)
.build("device-token", Default::defaul... | rust_cleaned_test_functions.jsonl/35556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 438
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25960,
9077,
34296,
368,
341,
286,
1077,
7729,
284,
4895,
11196,
3297,
486,
931,
1006,
310,
4895,
16644,
9676,
341,
394,
1917,
25,
330,
851,
756,
394,
2265,
25,
330,
9707,
756,
394,
2487,
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_searcher_1() {
let mut schema_builder = SchemaBuilder::default();
let text_field = schema_builder.add_text_field("text", TEXT);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
{
// writing the segment
... | rust_cleaned_test_functions.jsonl/65781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
261,
62,
16,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
3297,
486,
2258,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
497,
15762,
317,
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_printf_user_group() {
let temp_dir = Builder::new().prefix("example").tempdir().unwrap();
let temp_dir_path = temp_dir.path().to_string_lossy();
let new_file_name = "newFile";
File::create(temp_dir.path().join(new_file_name)).expect("create temp file");
l... | rust_cleaned_test_functions.jsonl/69255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21823,
3317,
6288,
368,
341,
286,
1077,
2730,
4334,
284,
20626,
486,
931,
1005,
11849,
445,
8687,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
2730,
4334,
2638,
284,
2730,
4334,
3875,
1005,
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_generators() {
test(
concat!("function* f() {", " let x = 1;", " yield x;", "}"),
concat!("function* f() {", " let x;", " yield 1;", "}"),
);
test(
concat!("function* f(x) {", " let y = x++", " yield y;", "}"),
concat!("function* f(x) {", " yield... | rust_cleaned_test_functions.jsonl/27735 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71963,
2973,
368,
341,
262,
1273,
1006,
286,
33720,
17223,
1688,
9,
282,
368,
314,
497,
330,
220,
1077,
856,
284,
220,
16,
32503,
330,
220,
7540,
856,
32503,
80548,
4461,
286,
33720,
17223,
1688... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_max_commit_ts_error() {
let engine = TestEngineBuilder::new().build().unwrap();
let storage = TestStorageBuilder::<_, DummyLockManager>::from_engine_and_lock_mgr(
engine,
DummyLockManager {},
ApiVersion::V1,
)
.build()
.unwrap();
let cm = storage.g... | rust_cleaned_test_functions.jsonl/8370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 992
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
36346,
25023,
4096,
368,
341,
262,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
262,
1077,
5819,
284,
3393,
5793,
3297,
27638,
6878,
50567,
11989,
2043,
6831,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ro_account_modify() {
solana_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(50);
let mut bank = Bank::new_for_tests(&genesis_config);
let (name, id, entrypoint) = solana_bpf_loader_progr... | rust_cleaned_test_functions.jsonl/5760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 904
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
880,
15897,
26608,
13500,
57725,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
40788,
2648,
1731,
341,
286,
59366,
5332,
345,
286,
28337,
3097,
12670,
345,
286,
54538,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_initable_through_ffi() {
unsafe {
let test = InitableTestType::new_uninit();
let test: *mut ffi::InitableTestType = test.as_ptr();
let mut error: *mut glib::ffi::GError = std::ptr::null_mut();
assert_ne!(0x123456789abcdef, ffi::initable_te... | rust_cleaned_test_functions.jsonl/602 | {
"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,
6137,
480,
87399,
62,
53799,
368,
341,
286,
19860,
341,
310,
1077,
1273,
284,
758,
15368,
2271,
929,
486,
931,
4907,
2327,
543,
310,
1077,
1273,
25,
353,
6984,
76956,
486,
3803,
480,
2271,
929,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_float_special_values() {
parse_equals("+inf ", f64::INFINITY);
parse_equals("-inf ", f64::NEG_INFINITY);
// Can't test two NaNs for equality with assert_eq
let value = parse_unwrap(parse_float, "nan ");
if let TextValue::Float(f) = value {
... | rust_cleaned_test_functions.jsonl/85900 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
17586,
41629,
9146,
368,
341,
286,
4715,
61664,
34973,
13573,
3670,
282,
21,
19,
486,
687,
55990,
317,
286,
4715,
61664,
13645,
13573,
3670,
282,
21,
19,
486,
97127,
91110,
626,
286,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_group_register() {
let mut state = GlobalReplicationState::default();
let label1 = new_label("zone", "label 1");
assert_eq!(None, state.group.register_store(1, vec![label1.clone()]));
let label2 = new_label("zone", "label 2");
assert_eq!(None, state.group.... | rust_cleaned_test_functions.jsonl/76848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
14000,
368,
341,
286,
1077,
5206,
1584,
284,
7962,
18327,
1693,
1397,
486,
2258,
543,
286,
1077,
2383,
16,
284,
501,
6106,
445,
8684,
497,
330,
1502,
220,
16,
797,
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... | 2 |
#[test]
fn test_intact_distance_ring_buffer2() {
static BR:&'static[u8] = &[0x1b, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe3, 0xb4, 0x0d, 0x00, 0x00,
0x07, 0x5b, 0x26, 0x31, 0x40, 0x02, 0x00, 0xe0, 0x4e, 0x1b, 0x41, 0x80,
0x20, 0x50, 0x10, 0x24, 0x08, 0x06];
static OUT:&'static[u8] = b"leftdatadatalef... | rust_cleaned_test_functions.jsonl/26471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
531,
19464,
34683,
7776,
17,
368,
341,
220,
1099,
18803,
35218,
6,
1978,
21335,
23,
60,
284,
44590,
15,
87,
16,
65,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
15,
15,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consistency_check() {
let path = TempDir::new("tikv-store-test").unwrap();
let db = new_engine(path.path().to_str().unwrap(), &[CF_DEFAULT, CF_RAFT], None).unwrap();
let db = Arc::new(db);
let mut region = Region::new();
region.mut_peers().push(Peer::new(... | rust_cleaned_test_functions.jsonl/84194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 850
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
47094,
7200,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
445,
83,
1579,
85,
33252,
16839,
1827,
15454,
543,
286,
1077,
2927,
284,
501,
24823,
5581,
3875,
1005,
983,
2895,
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... | 3 |
#[test]
fn test_hash() {
assert_eq!(hash(&[40, 20, 50, 30]), 3005002040);
} | rust_cleaned_test_functions.jsonl/35860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 51
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
2060,
10714,
10297,
8296,
2099,
58,
19,
15,
11,
220,
17,
15,
11,
220,
20,
15,
11,
220,
18,
15,
9719,
220,
18,
15,
15,
20,
15,
15,
17,
15,
19,
15,
317,
262,
335
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_canonicalize_idents_by_stripping_dot_git() {
let ident1 = ident(&url("https://github.com/PistonDevelopers/piston"));
let ident2 = ident(&url("https://github.com/PistonDevelopers/piston.git"));
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/74053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
842,
805,
3710,
1261,
461,
10732,
30941,
68801,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
1085,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
4010,
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_tabs_with_specifier_not_at_start() {
fn run_cmd(arg: &str, expected_prefix: &str, expected_suffix: &str) {
let expected_msg = format!(
"{} specifier not at start of number: {}",
expected_prefix.quote(),
expected_suffix.quote()
);
ne... | rust_cleaned_test_functions.jsonl/121807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57953,
6615,
13594,
3049,
7913,
3752,
4906,
368,
341,
262,
5168,
1598,
11684,
9404,
25,
609,
495,
11,
3601,
13974,
25,
609,
495,
11,
3601,
37151,
25,
609,
495,
8,
341,
286,
1077,
3601,
6483,
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_binary_min_max_all_nulls() {
let a = BinaryArray::<i32>::from(&[None::<&[u8]>, None]);
assert_eq!(None, min_binary(&a));
assert_eq!(None, max_binary(&a));
} | rust_cleaned_test_functions.jsonl/112102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
7260,
6345,
5705,
15162,
82,
368,
341,
262,
1077,
264,
284,
17718,
1857,
27638,
72,
18,
17,
6831,
1499,
2099,
58,
4064,
27638,
5,
58,
84,
23,
60,
8066,
2240,
2558,
262,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fuzz() {
let loader_id = bpf_loader::id();
let program_id = Pubkey::new_unique();
// Create program account
let mut file = File::open("test_elfs/noop_aligned.so").expect("file open failed");
let mut elf = Vec::new();
file.read_to_end(&mut elf).unw... | rust_cleaned_test_functions.jsonl/3082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
8889,
368,
341,
286,
1077,
16047,
842,
284,
293,
15897,
22139,
486,
307,
543,
286,
1077,
2025,
842,
284,
22611,
792,
486,
931,
21218,
1428,
286,
442,
4230,
2025,
2692,
198,
286,
1077,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_left_join() {
let s0 = Series::new("days", &[0, 1, 2, 3, 4]);
let s1 = Series::new("temp", &[22.1, 19.9, 7., 2., 3.]);
let temp = DataFrame::new(vec![s0, s1]).unwrap();
let s0 = Series::new("days", &[1, 2]);
let s1 = Series::new("rain", &[0.1, 0.2]);
... | rust_cleaned_test_functions.jsonl/4173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9579,
31017,
368,
341,
286,
1077,
274,
15,
284,
11131,
486,
931,
445,
13778,
497,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
286,
1077,
274,
16,
284,
11131,
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_handshake_message_finished() -> Result<()> {
let raw_finished = vec![
0x01, 0x01, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F,
];
let parsed_finished = HandshakeMessageFinished {
verify_data: raw_finished.clone(),
};
let mut r... | rust_cleaned_test_functions.jsonl/81553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23194,
29661,
6462,
56423,
368,
1464,
5714,
71698,
341,
262,
1077,
7112,
56423,
284,
7486,
90515,
286,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
18,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_complex() {
let style = Style::new(
r#"
background-color: black;
.with-class {
color: red;
}
@media screen and (max-width: 600px) {
color: yellow;
}
... | rust_cleaned_test_functions.jsonl/43945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 889
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41522,
368,
341,
286,
1077,
1707,
284,
11913,
486,
931,
1006,
310,
435,
2,
698,
394,
4004,
7889,
25,
3691,
280,
394,
659,
4197,
14800,
341,
503,
1894,
25,
2518,
280,
394,
456,
394,
569,
7399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rng_range() {
crate::init().unwrap();
let mut generator = Generator;
let min: u64 = 123;
let max: u64 = 9876;
for _ in 0..100 {
let n: u64 = generator.gen_range(min..max);
assert!(min <= n);
assert!(n < max);
}
} | rust_cleaned_test_functions.jsonl/64557 | {
"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,
66849,
9698,
368,
341,
262,
17717,
486,
2327,
1005,
15454,
1428,
262,
1077,
5206,
13823,
284,
28358,
280,
262,
1077,
1308,
25,
575,
21,
19,
284,
220,
16,
17,
18,
280,
262,
1077,
1932,
25,
575,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kill_partition_switch_threshold_progress() {
let max_switch_threshold_failure_pct = 1.0 - 2.0 * SWITCH_FORK_THRESHOLD;
let total_stake = 10_000;
// Kill `< max_failures_stake` of the validators
let max_failures_stake = (max_switch_threshold_failure_pct * total_stake as f64) as u... | rust_cleaned_test_functions.jsonl/31758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 838
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73327,
43840,
27652,
21858,
27200,
368,
341,
262,
1077,
1932,
27652,
21858,
43618,
71512,
284,
220,
16,
13,
15,
481,
220,
17,
13,
15,
353,
72543,
1400,
10647,
44405,
280,
262,
1077,
2790,
1261,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_conflicts() {
let mut m = HashMap::with_capacity(4);
assert!(m.insert(1, 2).is_none());
assert!(m.insert(5, 3).is_none());
assert!(m.insert(9, 4).is_none());
assert_eq!(*m.get(&9).unwrap(), 4);
assert_eq!(*m.get(&5).unwrap(), 3);
ass... | rust_cleaned_test_functions.jsonl/8505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
16059,
56445,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
4197,
35603,
7,
19,
317,
286,
2060,
10297,
76,
7030,
7,
16,
11,
220,
17,
568,
285,
31488,
1423,
286,
2060,
10297,
76,
7030... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_mut() {
unsafe {
let p: *mut isize = null_mut();
assert!(p.as_mut() == None);
let q: *mut isize = &mut 2;
assert!(q.as_mut().unwrap() == &mut 2);
// Lifetime inference
let mut u = 2isize;
{
let p = &mut u as *mut isize;... | rust_cleaned_test_functions.jsonl/18509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
29523,
368,
341,
262,
19860,
341,
286,
1077,
281,
25,
353,
6984,
91373,
284,
845,
29523,
543,
286,
2060,
10297,
79,
5357,
29523,
368,
621,
2240,
626,
286,
1077,
2804,
25,
353,
6984,
91373... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_php_version() {
let input = "7.3.8";
assert_eq!(format_php_version(input), "v7.3.8".to_string());
} | rust_cleaned_test_functions.jsonl/68255 | {
"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,
8955,
78547,
9438,
368,
341,
286,
1077,
1946,
284,
330,
22,
13,
18,
13,
23,
876,
286,
2060,
10714,
10297,
2243,
78547,
9438,
5384,
701,
330,
85,
22,
13,
18,
13,
23,
3263,
983,
3904,
1423,
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 |
#[test]
fn test_append_from_set() {
let mut collection: OneOrSet<MockKeyU8> = OneOrSet::new_set((0..42).map(MockKeyU8).collect()).unwrap();
assert_eq!(collection.len(), 42);
// Appends to end.
collection.append(MockKeyU8(42));
let expected: OneOrSet<MockKeyU8> = OneOrSet::new_set((0..=42).m... | rust_cleaned_test_functions.jsonl/5920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
5673,
2602,
368,
341,
262,
1077,
5206,
4426,
25,
3776,
2195,
1649,
27,
11571,
1592,
52,
23,
29,
284,
3776,
2195,
1649,
486,
931,
2602,
1188,
15,
496,
19,
17,
568,
2186,
66436,
1592,
52,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_serial_off() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let mut child = GuestCommand::new(&guest)
.args(&["--cpus", "boot=1"])
.args(&["--memory", "size=512M"])
.args(&["-... | rust_cleaned_test_functions.jsonl/26148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 662
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
13651,
368,
341,
286,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
286,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
955,
3683,
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... | 2 |
#[test]
fn test_variance() {
let variance = |x: Pareto| x.variance().unwrap();
test_case(1.0, 3.0, 0.75, variance);
test_almost(10.0, 10.0, 125.0 / 81.0, 1e-13, variance);
} | rust_cleaned_test_functions.jsonl/18748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77450,
368,
341,
286,
1077,
32273,
284,
760,
87,
25,
74185,
983,
91,
856,
19526,
5284,
1005,
15454,
543,
286,
1273,
19096,
7,
16,
13,
15,
11,
220,
18,
13,
15,
11,
220,
15,
13,
22,
20,
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_try_generate_state() {
let key_1 = key_pair::random();
let addr_1: H160 = digest::digest(&digest::SHA256, key_1.public_key().as_ref()).into();
let random_h256 = generate_random_hash();
let signed_coinbase_tran = generate_signed_coinbase_transaction(&key_1);
... | rust_cleaned_test_functions.jsonl/18475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
48851,
4387,
368,
341,
286,
1077,
1376,
62,
16,
284,
1376,
14445,
486,
11463,
543,
286,
1077,
10789,
62,
16,
25,
472,
16,
21,
15,
284,
20882,
486,
36339,
2099,
36339,
486,
33145,
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... | 7 |
#[test]
fn test_closest_to_zero() {
let input = "p=< 3,0,0>, v=< 2,0,0>, a=<-1,0,0>\n\
p=< 4,0,0>, v=< 0,0,0>, a=<-2,0,0>\n";
let particles = Particle::load_group(input);
assert_eq!(find_closest_to_zero(particles.iter()), Some(0));
} | rust_cleaned_test_functions.jsonl/41538 | {
"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,
12704,
267,
2346,
19359,
368,
341,
262,
1077,
1946,
284,
330,
79,
38698,
220,
18,
11,
15,
11,
15,
8066,
348,
38698,
220,
17,
11,
15,
11,
15,
8066,
264,
38698,
12,
16,
11,
15,
11,
15,
8449,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crds_filter_default() {
let filter = CrdsFilter::default();
let mask = CrdsFilter::compute_mask(0, filter.mask_bits);
assert_eq!(filter.mask, mask);
let mut rng = thread_rng();
for _ in 0..10 {
let hash = solana_sdk::hash::new_rand(&mut rng);
... | rust_cleaned_test_functions.jsonl/82266 | {
"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,
32331,
5356,
8727,
9993,
368,
341,
286,
1077,
4051,
284,
4553,
5356,
5632,
486,
2258,
543,
286,
1077,
6911,
284,
4553,
5356,
5632,
486,
27706,
9999,
7,
15,
11,
4051,
35179,
20034,
317,
286,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_numerical_identifiers() {
let data = [
0x0c, 0x00, 0x59, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x1e, 0x00, 0x00, 0x00,
];
assert_eq!(
parse(&data[..]).unwrap().token_tape,
vec![BinaryToken::I32(89), BinaryToken::I32(30),]
)... | rust_cleaned_test_functions.jsonl/109414 | {
"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,
99001,
938,
38399,
11836,
368,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
87,
15,
66,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
20,
24,
11,
220,
15,
87,
15,
15,
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... | 1 |
#[test]
fn test_product_update() {
get_setup();
let url = env::var("INTEGRATION_TEST_URL").unwrap_or("http://gridd:8080".to_string());
//run `grid product create`
let mut cmd_product_create = make_grid_command();
cmd_product_create
.arg("product")
... | rust_cleaned_test_functions.jsonl/55901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9840,
8882,
368,
341,
286,
633,
21363,
543,
286,
1077,
2515,
284,
6105,
486,
947,
445,
687,
68003,
3495,
11641,
8000,
1827,
15454,
8734,
445,
1254,
1110,
901,
1772,
25,
23,
15,
23,
15,
3263,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_legacy_checksums() {
let config = r#"
[[package]]
name = "aho-corasick"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"memchr 2.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
"#;
let resolve = E... | rust_cleaned_test_functions.jsonl/89396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
97555,
64038,
82,
368,
341,
262,
1077,
2193,
284,
435,
2,
698,
15505,
1722,
14288,
606,
284,
330,
28582,
45613,
300,
865,
698,
4366,
284,
330,
15,
13,
22,
13,
21,
698,
2427,
284,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_roundtrip() {
::init().unwrap();
let mut buffer = Buffer::from_slice(vec![1, 2, 3, 4]);
{
let buffer = buffer.get_mut().unwrap();
buffer.set_pts(1.into());
buffer.set_offset(3);
buffer.set_offset_end(4);
b... | rust_cleaned_test_functions.jsonl/69951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
29896,
32981,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
1077,
5206,
4147,
284,
10312,
486,
1499,
26488,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
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_call_hierarchy_in_same_fn() {
check_hierarchy(
r#"
//- /lib.rs
fn callee() {}
fn caller() {
call<|>ee();
callee();
}
"#,
"callee FN_DEF FileId(1) [0; 14) [3; 9)",
... | rust_cleaned_test_functions.jsonl/35202 | {
"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,
13429,
95043,
1243,
33574,
15246,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
310,
78406,
608,
2740,
25638,
198,
310,
5168,
94800,
368,
5613,
310,
5168,
19865,
368,
341,
394,
1618,
27,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verification_report_with_pib() {
let report = VerificationReport {
sig: VerificationSignature::default(),
chain: Vec::default(),
http_body: String::from(IAS_WITH_PIB.trim()),
};
let data = VerificationReportData::try_from(&report)
... | rust_cleaned_test_functions.jsonl/55870 | {
"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,
84245,
14813,
6615,
620,
579,
368,
341,
286,
1077,
1895,
284,
55473,
10361,
341,
310,
8366,
25,
55473,
25088,
486,
2258,
3148,
310,
8781,
25,
11312,
486,
2258,
3148,
310,
1758,
14114,
25,
923,
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_proposal_prevent_sleep() {
let mut cluster = new_node_cluster(0, 3);
configure_for_hibernate(&mut cluster);
cluster.run();
cluster.must_transfer_leader(1, new_peer(1, 1));
cluster.must_put(b"k1", b"v1");
must_get_equal(&cluster.get_engine(3), b"k1", b"v1");
// Wait t... | rust_cleaned_test_functions.jsonl/50286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21663,
32556,
10442,
684,
49393,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
1523,
18818,
2099,
6984,
10652,
317,
262,
10652,
7634,
543,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_two_idents() {
parse_macro(
r#"
macro_rules! foo {
($ i:ident, $ j:ident) => {
fn foo() { let a = $ i; let b = $j; }
}
}
"#,
)
.assert_expand_items("foo! { foo, bar }", "fn foo () {let a = foo ; let b = bar ;}");
} | rust_cleaned_test_functions.jsonl/28723 | {
"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,
23241,
842,
805,
368,
341,
262,
4715,
58810,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
600,
25,
1713,
11,
400,
502,
25,
1713,
8,
589,
341,
394,
5168,
15229,
368,
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_split_messages_large() {
let value = CrdsValue::new_unsigned(CrdsData::LowestSlot(
0,
LowestSlot::new(Pubkey::default(), 0, 0),
));
test_split_messages(value);
} | rust_cleaned_test_functions.jsonl/11665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
23428,
45228,
368,
341,
286,
1077,
897,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
24187,
477,
19877,
1006,
310,
220,
15,
345,
310,
68530,
19877,
486,
931,
5304,
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 |
#[test]
fn test_option_debug_string_property() {
fn make_string_property(value: &str) -> Property {
Property::String("name".to_owned(), value.to_owned())
}
fn dbg<D: std::fmt::Debug>(d: D) -> String {
format!("{:?}", d)
}
// trivial ok
assert_matches!(
OptionDeb... | rust_cleaned_test_functions.jsonl/37512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 633
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
15446,
3904,
16638,
368,
341,
262,
5168,
1281,
3904,
16638,
3679,
25,
609,
495,
8,
1464,
8655,
341,
286,
8655,
486,
703,
445,
606,
3263,
983,
51973,
1507,
897,
2389,
51973,
2398,
262,
555,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_greeting() {
let string = greeting("carol");
assert!(
string.contains("carol"),
"Greeting did not contain name, value was `{}`",
string
);
} | rust_cleaned_test_functions.jsonl/97299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
43632,
368,
341,
286,
1077,
914,
284,
42113,
445,
6918,
337,
797,
286,
2060,
33673,
310,
914,
8786,
445,
6918,
337,
4461,
310,
330,
38,
43632,
1521,
537,
6644,
829,
11,
897,
572,
53692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_server_push_promise_frame_on_control_stream() {
test_wrong_frame_on_control_stream(&[0x5, 0x2, 0x1, 0x2]);
} | rust_cleaned_test_functions.jsonl/52185 | {
"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,
12015,
14218,
620,
5273,
8929,
4470,
13436,
12673,
368,
341,
286,
1273,
75198,
8929,
4470,
13436,
12673,
2099,
58,
15,
87,
20,
11,
220,
15,
87,
17,
11,
220,
15,
87,
16,
11,
220,
15,
87,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_decimal_offsets() {
// Test the case where offset != 0
let a = create_decimal_array(&[
Some(8_887_000_000),
None,
None,
Some(-8_887_000_000),
None,
None,
]);
let b = create_decimal_array(&[
... | rust_cleaned_test_functions.jsonl/24224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 829
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
56924,
368,
341,
286,
442,
3393,
279,
1142,
1380,
4347,
961,
220,
15,
198,
286,
1077,
264,
284,
1855,
74429,
3858,
2099,
9640,
310,
4329,
7,
23,
62,
23,
23,
22,
62,
15,
15,
15,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zinc_dict_comma_decode() {
let value: Value = from_str(r#"{a,b,c}"#).unwrap();
assert_eq!(
value,
Value::make_dict(dict! {"a"=> Value::Marker, "b"=> Value::Marker,"c"=> Value::Marker})
);
} | rust_cleaned_test_functions.jsonl/6388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
2840,
5243,
2965,
1728,
15227,
368,
341,
262,
1077,
897,
25,
5162,
284,
504,
2895,
2601,
2,
14129,
64,
8402,
10109,
9863,
2,
568,
15454,
543,
262,
2060,
10714,
33673,
286,
897,
345,
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_byte_vec_message_as_ref_uci_message() {
let uci = ByteVecUciMessage::from(UciMessage::Uci);
let um: &UciMessage = uci.as_ref();
assert_eq!(*um, UciMessage::Uci);
} | rust_cleaned_test_functions.jsonl/19076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
13251,
6462,
11898,
7793,
62,
42409,
6462,
368,
341,
286,
1077,
575,
5855,
284,
10906,
10050,
52,
5855,
2052,
486,
1499,
12317,
5855,
2052,
486,
52,
5855,
317,
286,
1077,
4443,
25,
609,
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_from_vecref() {
let r = &VecRef {
x: NotNan::new(0.0).unwrap(),
y: NotNan::new(1.0).unwrap(),
z: NotNan::new(2.0).unwrap(),
};
let v: Vec3 = r.into();
assert_eq!(0.0, v.x);
assert_eq!(1.0, v.y);
assert_eq!(2.0, v... | rust_cleaned_test_functions.jsonl/32875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
73285,
837,
69,
368,
341,
286,
1077,
435,
284,
609,
10050,
3945,
341,
310,
856,
25,
2806,
45,
276,
486,
931,
7,
15,
13,
15,
568,
15454,
3148,
310,
379,
25,
2806,
45,
276,
486,
931,
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_withdraw_lockup() {
let stake_pubkey = analog_sdk::pubkey::new_rand();
let custodian = analog_sdk::pubkey::new_rand();
let total_lamports = 100;
let stake_account = AccountSharedData::new_ref_data_with_space(
total_lamports,
&StakeState::In... | rust_cleaned_test_functions.jsonl/15300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
7633,
9818,
454,
368,
341,
286,
1077,
18279,
34014,
792,
284,
23400,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
16564,
63849,
284,
23400,
61783,
486,
9585,
792,
486,
931,
33864,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accountsdb_add_root_many() {
let db = AccountsDB::new(Vec::new());
let mut pubkeys: Vec<Pubkey> = vec![];
create_account(&db, &mut pubkeys, 0, 100, 0, 0);
for _ in 1..100 {
let idx = thread_rng().gen_range(0, 99);
let ancestors = vec![(0, ... | rust_cleaned_test_functions.jsonl/33664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
2891,
12993,
22101,
368,
341,
286,
1077,
2927,
284,
40655,
3506,
486,
931,
49923,
486,
931,
5231,
286,
1077,
5206,
6675,
10563,
25,
11312,
21604,
392,
792,
29,
284,
7486,
0,
15078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clean_stuck_transactions() {
let mut pool = setup_mempool().0;
for seq in 0..5 {
add_txn(&mut pool, TestTransaction::new(0, seq, 1)).unwrap();
}
let db_sequence_number = 10;
let txn = TestTransaction::new(0, db_sequence_number, 1).make_signed_transaction();
pool.a... | rust_cleaned_test_functions.jsonl/80945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19573,
1261,
1942,
68182,
368,
341,
262,
1077,
5206,
7314,
284,
6505,
717,
3262,
1749,
1005,
15,
280,
262,
369,
12981,
304,
220,
15,
496,
20,
341,
286,
912,
92299,
2099,
6984,
7314,
11,
3393,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_statsd_client_queuing_buffered_udp_sink_many_threaded() {
let client = new_queuing_buffered_udp_client("cadence");
run_arc_threaded_test(client, NUM_THREADS, NUM_ITERATIONS);
} | rust_cleaned_test_functions.jsonl/21896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
47342,
7471,
7776,
291,
69432,
51567,
22101,
10814,
291,
368,
341,
262,
1077,
2943,
284,
501,
47342,
7471,
7776,
291,
69432,
8179,
445,
34455,
763,
797,
262,
1598,
62914,
10814,
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 |
#[test]
fn test_extend_new_tester() {
let mut my_tera = Tera::default();
let mut framework_tera = Tera::default();
framework_tera.register_tester("hello", |_: Option<&JsonValue>, _: &[JsonValue]| Ok(true));
my_tera.extend(&framework_tera).unwrap();
assert!(my_tera.testers... | rust_cleaned_test_functions.jsonl/87555 | {
"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,
70265,
5921,
4452,
261,
368,
341,
286,
1077,
5206,
847,
62,
50037,
284,
350,
2416,
486,
2258,
543,
286,
1077,
5206,
12626,
62,
50037,
284,
350,
2416,
486,
2258,
543,
286,
12626,
62,
50037,
9929,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ng() {
let calc = RpnCalculator::new(false);
assert!(calc.eval("").is_err());
assert!(calc.eval("1 1 1 +").is_err());
assert!(calc.eval("+ 1 1").is_err());
} | rust_cleaned_test_functions.jsonl/22175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82102,
368,
341,
286,
1077,
10035,
284,
431,
19958,
55743,
486,
931,
3576,
317,
286,
2060,
10297,
26586,
31710,
80821,
285,
9266,
1423,
286,
2060,
10297,
26586,
31710,
445,
16,
220,
16,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_convert_polytype() {
let type_exp =
Parser::new("(A: T, B: S) => T where T: Addable, S: Divisible").parse_type_expression();
let got = convert_polytype(&type_exp, &mut sub::Substitution::default()).unwrap();
let mut vars = Vec::<types::Tvar>::new();
va... | rust_cleaned_test_functions.jsonl/131391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 574
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
36133,
1313,
368,
341,
286,
1077,
943,
14214,
4035,
310,
21102,
486,
931,
31732,
32,
25,
350,
11,
425,
25,
328,
8,
589,
350,
1380,
350,
25,
2691,
480,
11,
328,
25,
8765,
23066,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_utctime() {
assert_writes::<UtcTime>(&[
(
UtcTime::new(Utc.ymd(1991, 5, 6).and_hms(23, 45, 40)).unwrap(),
b"\x17\x0d910506234540Z",
),
(
UtcTime::new(Utc.timestamp(0, 0)).unwrap(),
b... | rust_cleaned_test_functions.jsonl/129896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
60363,
33600,
368,
341,
286,
2060,
1670,
23262,
27638,
97768,
1462,
44784,
9640,
310,
2399,
394,
547,
10413,
1462,
486,
931,
12317,
10413,
13,
1600,
67,
7,
16,
24,
24,
16,
11,
220,
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... | 1 |
#[test]
fn test_zip_nested_sideffectful() {
let mut xs = [0; 6];
let ys = [0; 4];
{
// test that it has the side effect nested inside enumerate
let it = xs.iter_mut().map(|x| *x = 1).enumerate().zip(&ys);
it.count();
}
assert_eq!(&xs, &[1, 1, 1, 1, 1, 0]);
} | rust_cleaned_test_functions.jsonl/8966 | {
"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,
42131,
66279,
30862,
1705,
1262,
368,
341,
262,
1077,
5206,
11943,
284,
508,
15,
26,
220,
21,
935,
262,
1077,
31810,
284,
508,
15,
26,
220,
19,
4821,
262,
341,
286,
442,
1273,
429,
432,
702,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_row_insert_rope_at() {
let mut row = Row::new(30);
let rope = Rope::new(String::from("first"), 0);
let rope = rope.concat(Rope::new(String::from("second"), 0));
let rope = rope.concat(Rope::new(String::from("third"), 0));
row.insert_rope_at(5, rope);
... | rust_cleaned_test_functions.jsonl/14031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
17678,
26608,
375,
3752,
368,
341,
286,
1077,
5206,
2802,
284,
10801,
486,
931,
7,
18,
15,
317,
286,
1077,
33420,
284,
97896,
486,
931,
2242,
486,
1499,
445,
3896,
3975,
220,
15,
317,
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_dynamic() {
let db = checked_memory_handle();
let sql = "BEGIN;
CREATE TABLE foo(x INTEGER, y TEXT);
INSERT INTO foo VALUES(4, \"hello\");
END;";
db.execute_batch(sql).unwrap();
... | rust_cleaned_test_functions.jsonl/25531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
368,
341,
310,
1077,
2927,
284,
10067,
19195,
10630,
543,
310,
1077,
5704,
284,
330,
37588,
280,
5180,
30776,
14363,
15229,
2075,
30381,
11,
379,
15762,
317,
5180,
39518,
12496,
15229,
14710,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_credential_def_fails_when_already_created() {
init!("ledger");
let (schema_id, _) = ::utils::libindy::anoncreds::tests::create_and_write_test_schema(::utils::constants::DEFAULT_SCHEMA_ATTRS);
let my_did = settings::get_config_value(settings::CONFIG_INSTITUTION_DID)... | rust_cleaned_test_functions.jsonl/64625 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 764
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
666,
30320,
7844,
761,
6209,
47636,
80772,
27288,
368,
341,
286,
2930,
17223,
50704,
797,
286,
1077,
320,
17349,
842,
11,
27439,
284,
3504,
6031,
486,
2740,
48990,
486,
58910,
85734,
486,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all_can_be_set_true() {
let result = SubnetFeatures::from_str(
"ecdsa_signatures,canister_sandboxing,http_requests,bitcoin_testnet",
)
.unwrap();
assert_eq!(
result,
SubnetFeatures {
ecdsa_signatures: true,
... | rust_cleaned_test_functions.jsonl/36343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
27421,
21263,
2602,
16082,
368,
341,
286,
1077,
1102,
284,
3719,
4711,
21336,
486,
1499,
2895,
1006,
310,
330,
757,
96780,
11172,
2789,
11,
4814,
1571,
643,
31536,
287,
11,
1254,
37216,
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_simple_table_manager() {
let manager = TableManager::new();
assert!(manager.add(-1, 100).is_err());
assert!(manager.add(0, 100).is_err());
for i in 1..=100 {
manager.add(i, i as TableId).unwrap();
}
assert_eq!(manager.size(), 100);
... | rust_cleaned_test_functions.jsonl/28804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 572
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
5237,
12144,
368,
341,
286,
1077,
6645,
284,
6633,
2043,
486,
931,
543,
286,
2060,
10297,
13297,
1364,
4080,
16,
11,
220,
16,
15,
15,
568,
285,
9266,
1423,
286,
2060,
10297,
13297,
1364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_t1b() {
init();
let result = t1b(0, 0, 3, 4, 72, 2, 2);
println!("{}", result.len());
println!("{:?}", result)
} | rust_cleaned_test_functions.jsonl/104708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
16,
65,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
16,
65,
7,
15,
11,
220,
15,
11,
220,
18,
11,
220,
19,
11,
220,
22,
17,
11,
220,
17,
11,
220,
17,
317,
286,
13751,
7987... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_net_device() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
let tbc_1mtps = TokenBucketConfig {
size: 1024 * 1024,
one_time_burst: None,
refill_time: 1000,
};
let tbc_2mtps = TokenBucketConfig {
... | rust_cleaned_test_functions.jsonl/28142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
19722,
9204,
368,
341,
286,
1077,
5206,
348,
3821,
284,
1855,
2273,
3821,
5314,
7,
8846,
486,
1806,
36161,
626,
286,
1077,
259,
8904,
62,
16,
76,
96031,
284,
9660,
36018,
2648,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_packed_struct_can_derive_serialize() {
#[derive(Copy, Clone, Serialize)]
#[repr(packed, C)]
struct PackedC {
t: f32,
}
#[derive(Copy, Clone, Serialize)]
#[repr(C, packed)]
struct CPacked {
t: f32,
}
#[derive(Copy, Clone, Serialize)]
#[rep... | rust_cleaned_test_functions.jsonl/56452 | {
"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,
620,
11191,
15126,
27421,
35345,
533,
88686,
368,
341,
262,
11506,
27098,
3025,
1266,
11,
27913,
11,
39900,
5563,
262,
11506,
30837,
1295,
11191,
11,
356,
5563,
262,
2036,
393,
11191,
34,
341,
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_make_command_line() {
fn test_wrapper(prog: &str, args: &[&str]) -> String {
let command_line = &make_command_line(OsStr::new(prog),
&args.iter()
.map(|a| OsString::from(a... | rust_cleaned_test_functions.jsonl/17125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 865
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
10811,
6528,
368,
341,
286,
5168,
1273,
23561,
80078,
25,
609,
495,
11,
2827,
25,
44590,
5,
495,
2467,
1464,
923,
341,
310,
1077,
3210,
6528,
284,
609,
6927,
10811,
6528,
19238,
82,
2580,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytearray_to_array() {
let gil = Python::acquire_gil();
let py = gil.python();
let v: [u8; 3] = py
.eval("bytearray(b'abc')", None, None)
.unwrap()
.extract()
.unwrap();
assert!(&v == b"abc");
} | rust_cleaned_test_functions.jsonl/47429 | {
"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,
39123,
19737,
1653,
2346,
3858,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
25,
508,
84,
23,
26,
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_parse_query_to_triming_spaces() {
test_parse_query_to_ast_helper(" abc", "\"abc\"");
test_parse_query_to_ast_helper("abc ", "\"abc\"");
test_parse_query_to_ast_helper("( a OR abc)", "(?\"a\" ?\"abc\")");
test_parse_query_to_ast_helper("(a OR abc)", "(?\"a\" ?\... | rust_cleaned_test_functions.jsonl/64413 | {
"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,
21039,
5738,
2346,
3547,
59076,
67883,
368,
341,
286,
1273,
21039,
5738,
2346,
48019,
10418,
445,
256,
39022,
497,
15898,
13683,
88385,
286,
1273,
21039,
5738,
2346,
48019,
10418,
445,
13683,
3670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int_divide_decimal_overflow() {
let test_cases = vec![
(Decimal::from(std::i64::MIN), Decimal::from(-1)),
(
Decimal::from(std::i64::MAX),
Decimal::from_bytes(b"0.1").unwrap().unwrap(),
),
];
for (lhs, rh... | rust_cleaned_test_functions.jsonl/5294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
16237,
577,
74429,
79073,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
11269,
486,
1499,
5194,
486,
72,
21,
19,
486,
16413,
701,
26728,
486,
1499,
4080,
16,
6965,
310,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prewrite_rolledback_transaction() {
let engine = TestEngineBuilder::new().build().unwrap();
let cm = ConcurrencyManager::new(1.into());
let mut statistics = Statistics::default();
let k1 = b"k1";
let v1 = b"v1";
let v2 = b"v2";
// Test th... | rust_cleaned_test_functions.jsonl/31434 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
52473,
62,
20947,
1419,
28884,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
9961,
284,
1200,
15973,
2043,
486,
931,
7,
16,
39860,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string()
{
let mut cursor = Cursor::new(r#""This is a string" "Blaat\n" "$a""#);
let tokens: Vec<Token> = Lexer::new("")
.read(&mut cursor)
.expect("Lexing failed")
.collect();
assert_eq!(tokens, vec![
tok(TokenKind::In... | rust_cleaned_test_functions.jsonl/117357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
741,
262,
341,
286,
1077,
5206,
8128,
284,
28067,
486,
931,
2601,
2,
3014,
1986,
374,
264,
914,
1,
330,
33,
4260,
266,
1699,
1,
5201,
64,
3014,
2,
317,
286,
1077,
11211,
25,
11312,
834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_0689_example_1() {
let nums = vec![1, 2, 1, 2, 6, 7, 5, 1];
let k = 2;
let result = vec![0, 3, 5];
assert_eq!(Solution::max_sum_of_three_subarrays(nums, k), result);
} | rust_cleaned_test_functions.jsonl/83462 | {
"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,
62,
15,
21,
23,
24,
39304,
62,
16,
368,
341,
286,
1077,
10307,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
16,
11,
220,
17,
11,
220,
21,
11,
220,
22,
11,
220,
20,
11,
220,
16,
935,
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_github_27() {
// https://github.com/chyh1990/yaml-rust/issues/27
let s = "&a";
let out = YamlLoader::load_from_str(&s).unwrap();
let doc = &out[0];
assert_eq!(doc.as_str().unwrap(), "");
} | rust_cleaned_test_functions.jsonl/1206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
3827,
62,
17,
22,
368,
341,
286,
442,
3703,
1110,
5204,
905,
21284,
73801,
16,
24,
24,
15,
26491,
9467,
3795,
590,
38745,
14,
17,
22,
198,
286,
1077,
274,
284,
13399,
64,
876,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_for_vec_attr_vec() {
let t = ForVecAttrVecTemplate {
v: vec![
ForVecAttrVec {
iterable: vec![1, 2],
},
ForVecAttrVec {
iterable: vec![3, 4],
},
ForVecAttrVec {
iterable: vec![5... | rust_cleaned_test_functions.jsonl/24298 | {
"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,
5478,
13251,
10422,
13251,
368,
341,
262,
1077,
259,
284,
1752,
10050,
13371,
10050,
7275,
341,
286,
348,
25,
7486,
90515,
310,
1752,
10050,
13371,
10050,
341,
394,
50834,
25,
7486,
20703,
16,
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_slave_fs_cache_send_failure() {
let (p1, p2) = UnixStream::pair().unwrap();
let fs_cache = SlaveFsCacheReq::from_stream(p1);
fs_cache.set_failed(libc::ECONNRESET);
fs_cache
.fs_slave_map(&VhostUserFSSlaveMsg::default(), &p2)
.unwrap_err();... | rust_cleaned_test_functions.jsonl/123042 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65320,
34470,
11529,
13565,
43618,
368,
341,
286,
1077,
320,
79,
16,
11,
281,
17,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
8619,
11529,
284,
59368,
48300,
8233,
27234,
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_load_store() {
let r = parse_and_eval(
r#"
block 0 {
r0 = 200;
*r0 = 42;
r1 = *r0;
exit(r1);
}"#,
).unwrap();
assert!(r == 42);
} | rust_cleaned_test_functions.jsonl/55931 | {
"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,
12411,
14809,
368,
341,
286,
1077,
435,
284,
4715,
8378,
21296,
1006,
310,
435,
2,
698,
310,
2504,
220,
15,
341,
394,
435,
15,
284,
220,
17,
15,
15,
280,
394,
353,
81,
15,
284,
220,
19,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_acid_converts_to_string() {
assert_eq!(dna::RibonucleicAcid::new("AGC").as_slice(), "AGC");
assert_eq!(dna::RibonucleicAcid::new("CGA").as_slice(), "CGA");
} | rust_cleaned_test_functions.jsonl/36951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14718,
307,
3382,
28163,
2346,
3904,
368,
341,
262,
2060,
10714,
10297,
92877,
486,
98884,
263,
22147,
292,
11654,
307,
486,
931,
445,
1890,
34,
1827,
300,
26488,
1507,
330,
1890,
34,
797,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_genesis() {
// Test genesis and the next block
let genesis_block = Block::<i64>::make_genesis_block();
assert_eq!(genesis_block.height(), 0);
assert_eq!(genesis_block.parent_id(), HashValue::zero());
assert_ne!(genesis_block.id(), HashValue::zero());
assert!(genesis_block... | rust_cleaned_test_functions.jsonl/541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
13774,
368,
341,
262,
442,
3393,
59366,
323,
279,
1790,
2504,
198,
262,
1077,
59366,
7113,
284,
8362,
27638,
72,
21,
19,
6831,
6927,
16322,
13774,
7113,
543,
262,
2060,
10714,
10297,
77894,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unknown_commands() {
let td: Vec<String> = vec!["asd +0".to_string()];
assert_eq!(
read_commands(&td),
Err(SimpleError::new("unknown command: asd"))
);
} | rust_cleaned_test_functions.jsonl/50505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
44151,
368,
341,
286,
1077,
17941,
25,
11312,
3464,
29,
284,
7486,
0,
1183,
79102,
488,
15,
3263,
983,
3904,
368,
4821,
286,
2060,
10714,
33673,
310,
1349,
44151,
2099,
1296,
1326,
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 |
#[test]
fn test_push_str() {
let example = "hello";
let mut repr = Repr::new(example);
repr.push_str(" world!");
assert_eq!(repr.as_str(), "hello world!");
assert_eq!(repr.len(), 12);
} | rust_cleaned_test_functions.jsonl/14393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
2895,
368,
341,
286,
1077,
3110,
284,
330,
14990,
876,
286,
1077,
5206,
30636,
284,
1032,
649,
486,
931,
66203,
626,
286,
30636,
2552,
2895,
445,
1879,
57073,
286,
2060,
10714,
10297,
30837... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
gst::init().unwrap();
let info = VideoInfo::builder(crate::VideoFormat::I420, 320, 240)
.build()
.unwrap();
assert_eq!(info.format(), crate::VideoFormat::I420);
assert_eq!(info.width(), 320);
assert_eq!(info.height(), 240);... | rust_cleaned_test_functions.jsonl/113669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 752
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
43769,
486,
2327,
1005,
15454,
1428,
286,
1077,
3546,
284,
8354,
1731,
486,
17850,
54907,
486,
10724,
4061,
486,
40,
19,
17,
15,
11,
220,
18,
17,
15,
11,
220,
17,
19,
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_py03_evaluate_error0() {
pyo3::prepare_freethreaded_python();
Python::with_gil(|py| -> () {
let input_type = py.get_type::<BasisRotationInputWrapper>();
let input = input_type
.call1((3, false))
.unwrap()
.cast_as::<PyCell<BasisRotatio... | rust_cleaned_test_functions.jsonl/5780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40291,
15,
18,
2204,
19642,
4096,
15,
368,
341,
262,
4510,
78,
18,
486,
13609,
74179,
769,
878,
291,
55869,
1428,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
1464,
1719,
341,
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_smoke_update() {
let mut rng = new_rng(70812476915813);
for _ in 0..2048 {
// use an odd length so we test the odd length logic
const BUF_LEN: usize = 31;
let buf: [u8; BUF_LEN] = rng.gen();
let mut c = Chec... | rust_cleaned_test_functions.jsonl/15733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 827
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15874,
4740,
8882,
368,
341,
310,
1077,
5206,
28422,
284,
501,
66849,
7,
22,
15,
23,
16,
17,
19,
22,
21,
24,
16,
20,
23,
16,
18,
626,
310,
369,
716,
304,
220,
15,
496,
17,
15,
19,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_polygon_extreme_x() {
// a diamond shape
let poly1 = polygon![
(x: 1.0, y: 0.0),
(x: 2.0, y: 1.0),
(x: 1.0, y: 2.0),
(x: 0.0, y: 1.0),
(x: 1.0, y: 0.0)
];
let min_x = polymax_naive_indices(point!(x: -1., ... | rust_cleaned_test_functions.jsonl/100476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73542,
9927,
9634,
3212,
368,
341,
286,
442,
264,
22205,
6083,
198,
286,
1077,
9861,
16,
284,
29372,
90515,
310,
320,
87,
25,
220,
16,
13,
15,
11,
379,
25,
220,
15,
13,
15,
1326,
310,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.