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_scalar_multiplication() {
let c = 7.04217;
let p = Point3::new(70.0, 49.0, 95.0);
let expected = Point3::new(p.x * c, p.y * c, p.z *c);
let result = p * c;
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/4556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
91802,
1693,
368,
341,
286,
1077,
272,
284,
220,
22,
13,
15,
19,
17,
16,
22,
280,
286,
1077,
281,
284,
5126,
18,
486,
931,
7,
22,
15,
13,
15,
11,
220,
220,
19,
24,
13,
15,
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_string() {
let _setup_guard = setup();
let mut isolate = v8::Isolate::new(Default::default());
{
let mut hs = v8::HandleScope::new(&mut isolate);
let scope = hs.enter();
let reference = "Hello 🦕 world!";
let local = v8::String::new(scope, reference).unwrap();
assert_eq... | rust_cleaned_test_functions.jsonl/77891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
368,
341,
220,
1077,
716,
15188,
36796,
284,
6505,
543,
220,
1077,
5206,
42123,
284,
348,
23,
486,
3872,
33066,
486,
931,
87874,
486,
2258,
1423,
220,
341,
262,
1077,
5206,
32220,
284,
348... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_rules() {
assert_eq!(
rule("& a"),
Ok((
"",
Rule::SetContext {
before: None,
sequence: "a".into()
},
))
);
assert_eq!(
rule("< a... | rust_cleaned_test_functions.jsonl/21712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 988
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
21407,
368,
341,
286,
2060,
10714,
33673,
310,
5912,
34866,
264,
4461,
310,
7622,
94702,
394,
8324,
394,
18100,
486,
1649,
1972,
341,
503,
1573,
25,
2240,
345,
503,
8500,
25,
330,
64,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculation_of_potentials() {
let mut t = init();
t.least_cost_method();
t.replenish();
let u = vec![0, -2, -4, -4];
let v = vec![4, 5, 3, 6];
assert_eq!(t.calculation_of_potentials(), (u, v));
} | rust_cleaned_test_functions.jsonl/26612 | {
"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,
38241,
2914,
3575,
57952,
8476,
368,
341,
262,
1077,
5206,
259,
284,
2930,
543,
262,
259,
30502,
559,
15890,
9032,
543,
262,
259,
1327,
86535,
812,
543,
262,
1077,
575,
284,
7486,
20703,
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_valid_vm_config_fs() {
vec![
(
vec![
"cloud-hypervisor", "--kernel", "/path/to/kernel",
"--memory", "shared=true",
"--fs",
"tag=virtiofs1,socket=/path/to/sock1",
... | rust_cleaned_test_functions.jsonl/64903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5053
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
39008,
5332,
34470,
368,
341,
286,
7486,
90515,
310,
2399,
394,
7486,
90515,
503,
330,
12361,
2832,
1082,
31396,
497,
14482,
23248,
497,
3521,
2343,
32429,
58343,
756,
503,
14482,
17269,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ocaml_hash_string() {
// Left-side values obtained with OCaml: Hashtbl.hash "the-string"
assert_eq!(0, ocaml_hash_string(0, b""));
assert_eq!(721651713, ocaml_hash_string(0, b"a"));
assert_eq!(856662637, ocaml_hash_string(0, b"ab"));
assert_eq!(767105082, ... | rust_cleaned_test_functions.jsonl/24604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49648,
9467,
8950,
3904,
368,
341,
286,
442,
13727,
24067,
2750,
12180,
448,
31867,
9467,
25,
11443,
426,
2024,
15101,
330,
1782,
30881,
698,
286,
2060,
10714,
10297,
15,
11,
17796,
9467,
8950,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subsubcommand() {
assert_eq!(
Opt3 {
all: true,
cmd: Sub2::Foo {
file: "lib.rs".to_string(),
cmd: Sub3::Quux {}
}
},
Opt3::parse_from(&["test", "--all", "foo", "lib.rs", "quux"])
);
} | rust_cleaned_test_functions.jsonl/46411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
1966,
5631,
368,
341,
262,
2060,
10714,
33673,
286,
16554,
18,
341,
310,
678,
25,
830,
345,
310,
5439,
25,
3719,
17,
486,
40923,
341,
394,
1034,
25,
330,
2740,
25638,
3263,
983,
3904,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_groupby_projection_pd_same_column() -> Result<()> {
// this query failed when projection pushdown was enabled
let a = || {
let df = df![
"col1" => ["a", "ab", "abc"],
"col2" => [1, 2, 3]
]
.unwrap();
df.lazy()
.select(... | rust_cleaned_test_functions.jsonl/22392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
1694,
72738,
31322,
33574,
8744,
368,
1464,
5714,
71698,
341,
262,
442,
419,
3239,
4641,
979,
21615,
4484,
2923,
572,
8970,
271,
262,
1077,
264,
284,
1369,
341,
286,
1077,
6764,
284,
6764,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_at() {
let _reset = set_time_zone();
let time = Timespec::new(1234567890, 54321);
let local = at(time);
debug!("time_at: {:?}", local);
assert_eq!(local.tm_sec, 30);
assert_eq!(local.tm_min, 31);
assert_eq!(local.tm_hour, 15);
as... | rust_cleaned_test_functions.jsonl/7338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
368,
341,
286,
1077,
716,
9716,
284,
738,
3009,
28692,
1428,
286,
1077,
882,
284,
8523,
992,
486,
931,
7,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
11,
220,
20,
19,
18,
17,
16,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitcoin_to_from_proto() {
for feature in [
"bitcoin_mainnet",
"bitcoin_mainnet_paused",
"bitcoin_testnet",
"bitcoin_testnet_paused",
] {
let subnet_feature = SubnetFeatures::from_str(feature).unwrap();
assert... | rust_cleaned_test_functions.jsonl/36347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
7160,
2346,
5673,
37689,
368,
341,
286,
369,
4565,
304,
2278,
310,
330,
83910,
11027,
4711,
756,
310,
330,
83910,
11027,
4711,
55475,
2591,
756,
310,
330,
83910,
4452,
4711,
756,
310,
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... | 2 |
#[test]
fn test_column_writer_compression_v1() {
let props = WriterProperties::builder()
.set_writer_version(WriterVersion::PARQUET_1_0)
.set_compression(Compression::SNAPPY)
.build();
column_roundtrip_random::<Int32Type>(
props,
2048,
... | rust_cleaned_test_functions.jsonl/85660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
28908,
2965,
4011,
2273,
16,
368,
341,
286,
1077,
6914,
284,
29404,
7903,
486,
17850,
741,
310,
659,
746,
28908,
9438,
7,
6492,
5637,
486,
16567,
5757,
1348,
62,
16,
62,
15,
340,
310,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unquote_char() {
let s = "'→'";
let c = unquote_char(s, '\'');
assert_eq!(c, Some('→'));
let s = "'→←'";
let c = unquote_char(s, '\'');
assert_eq!(c, None);
let s = r"'\xf0\x9f\x92\xa9'";
let c = unquote_char(s, '\'');
asser... | rust_cleaned_test_functions.jsonl/76783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 789
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
2949,
9232,
368,
341,
286,
1077,
274,
284,
7178,
51018,
21689,
286,
1077,
272,
284,
650,
2949,
9232,
1141,
11,
58355,
1157,
286,
2060,
10714,
10297,
66,
11,
4329,
492,
51018,
6336,
286,
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_log_create() {
let l = Log::<Operation>::new(1024 * 1024);
let n = (1024 * 1024) / Log::<Operation>::entry_size();
assert_eq!(l.rawb, 1024 * 1024);
assert_eq!(l.size, n);
assert_eq!(l.slog.len(), n);
assert_eq!(l.head.load(Ordering::Relaxed), 0);
... | rust_cleaned_test_functions.jsonl/101042 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
8657,
368,
341,
286,
1077,
326,
284,
2835,
27638,
8432,
6831,
931,
7,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
317,
286,
1077,
308,
284,
320,
16,
15,
17,
19,
353,
220,
16,
15,
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... | 3 |
#[test]
fn test_parse_string_argument() {
let type_info = dlt::TypeInfo {
kind: dlt::TypeInfoKind::StringType,
coding: dlt::StringCoding::UTF8,
has_variable_info: false,
has_trace_info: false,
};
let argument = dlt::Argument {
t... | rust_cleaned_test_functions.jsonl/73190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
3904,
9025,
368,
341,
286,
1077,
943,
3109,
284,
294,
4832,
486,
45588,
341,
310,
3093,
25,
294,
4832,
486,
45588,
10629,
486,
703,
929,
345,
310,
10822,
25,
294,
4832,
486,
703,
77513,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cpuset_set() -> Result<()> {
let systemd_version = 245;
let cpu = LinuxCpuBuilder::default()
.cpus("0-3")
.mems("0-3")
.build()
.context("build cpu spec")?;
let mut properties: HashMap<&str, Box<dyn RefArg>> = HashMap::new()... | rust_cleaned_test_functions.jsonl/39171 | {
"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,
90673,
295,
2602,
368,
1464,
5714,
71698,
341,
286,
1077,
74966,
9438,
284,
220,
17,
19,
20,
280,
286,
1077,
17319,
284,
14340,
34,
5584,
3297,
486,
2258,
741,
310,
659,
4672,
355,
445,
15,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_div_rem() {
fn check_sub(a: &BigInt, b: &BigInt, ans_q: &BigInt, ans_r: &BigInt) {
let (q, r) = a.div_rem(b);
if !r.is_zero() {
assert_eq!(r.sign(), a.sign());
}
assert!(r.abs() <= b.abs());
assert!(*a == b * &q + &r);
assert!(q == ... | rust_cleaned_test_functions.jsonl/56632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 924
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
19194,
368,
341,
262,
5168,
1779,
5228,
2877,
25,
609,
87474,
11,
293,
25,
609,
87474,
11,
8099,
8976,
25,
609,
87474,
11,
8099,
1710,
25,
609,
87474,
8,
341,
286,
1077,
320,
80,
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... | 2 |
#[test]
fn test_zip_nth() {
let xs = [0, 1, 2, 4, 5];
let ys = [10, 11, 12];
let mut it = xs.iter().zip(&ys);
assert_eq!(it.nth(0), Some((&0, &10)));
assert_eq!(it.nth(1), Some((&2, &12)));
assert_eq!(it.nth(0), None);
let mut it = xs.iter().zip(&ys);
assert_eq!(it.nth(3), None... | rust_cleaned_test_functions.jsonl/8958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
78342,
368,
341,
262,
1077,
11943,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
31810,
284,
508,
16,
15,
11,
220,
16,
16,
11,
220,
16,
17,
482... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_ref() {
let p0 = DefaultCell::new("item0");
let p1 = DefaultCell::new("item1");
assert!(p0 < p1);
assert!(p1 > p0);
} | rust_cleaned_test_functions.jsonl/40869 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
7793,
368,
341,
286,
1077,
281,
15,
284,
7899,
3599,
486,
931,
445,
1203,
15,
797,
286,
1077,
281,
16,
284,
7899,
3599,
486,
931,
445,
1203,
16,
797,
286,
2060,
10297,
79,
15,
366,
281... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_input2_2() {
let content = "3417
17,x,13,19";
let input = input_generator(content);
let result = solve_part2(&input);
assert_eq!(result, 3417);
} | rust_cleaned_test_functions.jsonl/103595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
17,
62,
17,
368,
341,
262,
1077,
2213,
284,
330,
18,
19,
16,
22,
198,
16,
22,
12803,
11,
16,
18,
11,
16,
24,
876,
262,
1077,
1946,
284,
1946,
25813,
15063,
317,
262,
1077,
1102,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_notify() {
let m = Arc::new(AtomicUsize::new(0));
let m2 = Arc::clone(&m);
System::run(move || {
let addr = ContextNoWait::create(move |ctx| {
ctx.notify(Ping);
ctx.notify(Ping);
ContextNoWait {
cnt: Arc::clone(&m),
... | rust_cleaned_test_functions.jsonl/94384 | {
"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,
36654,
368,
341,
262,
1077,
296,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
1106,
262,
1077,
296,
17,
284,
19689,
486,
19982,
2099,
76,
626,
262,
739,
486,
6108,
34081,
1369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty() {
let mut r = Reader::from_str("<a />");
r.trim_text(true).expand_empty_elements(false);
next_eq!(r, Empty, b"a");
} | rust_cleaned_test_functions.jsonl/42066 | {
"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,
15124,
368,
341,
262,
1077,
5206,
435,
284,
25166,
486,
1499,
2895,
9639,
64,
6206,
797,
262,
435,
16419,
4326,
3715,
568,
32317,
15124,
22801,
3576,
317,
262,
1790,
10714,
10297,
81,
11,
22228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_passive_discovery_scan_args() {
let mut sched = create_sched();
let req = sched
.enqueue_scan_to_discover(passive_discovery_scan(10))
.expect("expected a ScanRequest");
assert_eq!(req.scan_type, fidl_mlme::ScanTypes::Passive);
assert_eq!(r... | rust_cleaned_test_functions.jsonl/8139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
533,
9932,
7449,
28857,
8384,
368,
341,
286,
1077,
5206,
5575,
284,
1855,
67394,
543,
286,
1077,
4232,
284,
5575,
198,
310,
659,
61373,
28857,
2346,
9932,
3688,
39790,
533,
9932,
7449,
2885... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_constructor_keyword_arguments_error() {
common::setup();
let mut oso = OsoTest::new();
#[derive(PolarClass)]
struct Foo {
#[polar(attribute)]
x: i64,
}
impl Foo {
fn new(x: i64) -> Self {
Foo { x }
}
}
let foo_class ... | rust_cleaned_test_functions.jsonl/5012 | {
"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,
66210,
45824,
43433,
4096,
368,
341,
262,
4185,
486,
15188,
1428,
262,
1077,
5206,
297,
704,
284,
506,
704,
2271,
486,
931,
1428,
262,
11506,
27098,
5304,
7417,
1957,
5563,
262,
2036,
33428,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_satisfies_commitment() {
let status = TransactionStatus {
slot: 0,
confirmations: None,
status: Ok(()),
err: None,
};
assert!(status.satisfies_commitment(CommitmentConfig::default()));
assert!(status.satisfies_commi... | rust_cleaned_test_functions.jsonl/89283 | {
"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,
643,
7478,
550,
36346,
478,
368,
341,
286,
1077,
2639,
284,
17869,
2522,
341,
310,
9446,
25,
220,
15,
345,
310,
7683,
804,
25,
2240,
345,
310,
2639,
25,
7622,
5065,
1326,
310,
1848,
25,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_email_bcc() {
let email = Email::new("test-from@email.org", "test-to@email.org", "Body text")
.with_bcc("bcc@email.org");
assert_eq!(email.to_string(), "{\"from\":\"test-from@email.org\",\"to\":\"test-to@email.org\",\"textbody\":\"Body text\",\"bcc\":\"bcc@email.org\"}");
} | rust_cleaned_test_functions.jsonl/67590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
9172,
880,
638,
368,
341,
262,
1077,
2551,
284,
8299,
486,
931,
445,
1944,
38051,
71776,
2659,
497,
330,
1944,
4686,
71776,
2659,
497,
330,
5444,
1467,
1138,
286,
659,
4197,
880,
638,
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_normalize() {
let c1 = XyY::new(0.3, 0.5, 1.5);
assert!(c1.is_normalized());
assert_eq!(c1.normalize(), c1);
let c2 = XyY::new(0.0, 0.0, 0.0);
assert!(c2.is_normalized());
assert_eq!(c2.normalize(), c2);
} | rust_cleaned_test_functions.jsonl/67706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80807,
368,
341,
286,
1077,
272,
16,
284,
1599,
88,
56,
486,
931,
7,
15,
13,
18,
11,
220,
15,
13,
20,
11,
220,
16,
13,
20,
317,
286,
2060,
10297,
66,
16,
2079,
80006,
1423,
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_results() {
let t = TestResponse::new();
let r = serde_json::to_string(&t).unwrap();
assert_eq!(
r#"{"result":[],"hasMore":false,"cached":false,"extra":{"stats":{"writesExecuted":0,"writesIgnored":0,"scannedFull":0,"scannedIndex":0,"filtered":0,"httpRequests":... | rust_cleaned_test_functions.jsonl/3895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13576,
368,
341,
286,
1077,
259,
284,
3393,
2582,
486,
931,
543,
286,
1077,
435,
284,
61570,
9455,
486,
983,
3904,
2099,
83,
568,
15454,
543,
286,
2060,
10714,
33673,
310,
435,
55543,
4913,
1382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_null() {
let (sql, params) = Postgres::build(Select::default().value(Value::Text(None).raw())).unwrap();
assert_eq!("SELECT null", sql);
assert!(params.is_empty());
} | rust_cleaned_test_functions.jsonl/6455 | {
"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,
16067,
15162,
368,
341,
286,
1077,
320,
3544,
11,
3628,
8,
284,
3877,
17818,
486,
5834,
7,
3379,
486,
2258,
1005,
957,
25346,
486,
1178,
26717,
568,
1041,
34670,
15454,
543,
286,
2060,
10714,
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 |
#[test]
fn test_audio_analysis() {
let spotify = Spotify::default()
.client_credentials_manager(CLIENT_CREDENTIAL.lock().unwrap().clone())
.build();
let track = "3JIxjvbbDrA9ztYlNcp3yL";
let analysis = spotify.audio_analysis(track);
assert!(analysis.is_ok());
} | rust_cleaned_test_functions.jsonl/96519 | {
"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,
29688,
42682,
368,
341,
1066,
262,
1077,
87790,
284,
40537,
486,
2258,
741,
286,
659,
2972,
47396,
12144,
52991,
10757,
920,
81509,
21003,
1005,
15454,
1005,
19982,
2398,
286,
659,
5834,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exclude() {
let mut config = configure(&[], &[]);
config.exclude = vec![
"src/test/run-pass".into(),
"src/tools/tidy".into(),
];
config.cmd = Subcommand::Test {
paths: Vec::new(),
test_args: Vec::new(),
r... | rust_cleaned_test_functions.jsonl/1471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88668,
368,
341,
286,
1077,
5206,
2193,
284,
14411,
2099,
12995,
609,
56703,
286,
2193,
89941,
284,
7486,
90515,
310,
330,
3548,
12697,
48385,
46967,
3263,
18122,
3148,
310,
330,
3548,
45714,
5523,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_command() {
let test_commands = app("test", "desc", "version");
let keypair = Keypair::new();
let pubkey = keypair.pubkey();
let pubkey_string = pubkey.to_string();
let keypair2 = Keypair::new();
let pubkey2 = keypair2.pubkey();
let p... | rust_cleaned_test_functions.jsonl/57690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5045
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10811,
368,
341,
286,
1077,
1273,
44151,
284,
906,
445,
1944,
497,
330,
8614,
497,
330,
4366,
797,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
95116,
284,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_longest_suit() {
let g = test_helpers::create_test_bid_phase();
// User: ♣2 ♣6 ♣9 ♣10 ♣A ♥6 ♥9 ♥10 ♥A ♠2 ♠7 ♠8 ♠K
assert_eq!(
longest_suit(hand_score(g.hand(Position::User))),
// HandBalance::Unbalanced
BidResponse::LongestSuit(Suit::C... | rust_cleaned_test_functions.jsonl/83223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
477,
643,
3083,
368,
341,
286,
1077,
342,
284,
1273,
54473,
486,
3182,
4452,
62509,
37593,
543,
286,
442,
2657,
25,
220,
35358,
96,
17,
35358,
96,
21,
35358,
96,
24,
35358,
96,
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... | 1 |
#[test]
fn test_doc_comment_preserves_indents() {
let file = SourceFile::parse(
r#"
/// doc1
/// ```
/// fn foo() {
/// // ...
/// }
/// ```
mod foo {}
"#,
)
.ok()
.unwrap();
let module = file.syntax().descendants().... | rust_cleaned_test_functions.jsonl/50912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
17638,
32116,
13280,
9122,
805,
368,
341,
262,
1077,
1034,
284,
8748,
1703,
486,
6400,
1006,
286,
435,
2,
698,
286,
1048,
4629,
16,
198,
286,
1048,
41233,
286,
1048,
5168,
15229,
368,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_FX33() {
let opcode = 0xF033;
let mut vm = get_vm();
vm.v[0x0] = 123;
vm.i = 0x0;
vm.execute_instruction(decode_opcode(opcode), opcode);
assert_eq!(vm.memory[vm.i as usize], 1);
assert_eq!(vm.memory[vm.i as usize + 1], 2);
assert_eq!(vm.memory[vm.i as usiz... | rust_cleaned_test_functions.jsonl/270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1400,
55,
18,
18,
368,
341,
14808,
262,
1077,
30028,
284,
220,
15,
9770,
15,
18,
18,
280,
262,
1077,
5206,
10995,
284,
633,
39008,
1428,
262,
10995,
3133,
58,
15,
87,
15,
60,
284,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fallback_post_compound_poseidon_single_partition_base_8() {
fallback_post::<LCTree<PoseidonHasher, U8, U0, U0>>(15, 15, 1, ApiVersion::V1_0_0);
fallback_post::<LCTree<PoseidonHasher, U8, U0, U0>>(15, 15, 1, ApiVersion::V1_1_0);
} | rust_cleaned_test_functions.jsonl/18129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
3420,
6333,
18177,
795,
33201,
90456,
19487,
43840,
7651,
62,
23,
368,
341,
262,
32772,
6333,
27638,
43,
1162,
765,
21604,
960,
90456,
6370,
261,
11,
547,
23,
11,
547,
15,
11,
547,
15,
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_remove() {
let mut a = vec![1, 2, 3, 4];
assert_eq!(a.remove(2), 3);
assert_eq!(a, [1, 2, 4]);
assert_eq!(a.remove(2), 4);
assert_eq!(a, [1, 2]);
assert_eq!(a.remove(0), 1);
assert_eq!(a, [2]);
assert_eq!(a.remove(0), 2);
assert_eq!(a, []);
} | rust_cleaned_test_functions.jsonl/12877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
368,
341,
262,
1077,
5206,
264,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
4821,
262,
2060,
10714,
10297,
64,
4850,
7,
17,
701,
220,
18,
317,
262,
2060,
10714,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pipeout_synthesizes() {
use rust_hdl_synth::yosys_validate;
let mut uut = rust_hdl_synth::TopWrap::new(PipeOut::new(0xA0));
uut.uut.ok1.connect();
uut.uut.datain.connect();
uut.connect_all();
yosys_validate("pipeout", &generate_verilog(&uut)).unwrap();
} | rust_cleaned_test_functions.jsonl/55825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41862,
411,
51393,
6375,
4756,
368,
341,
262,
990,
23071,
66154,
643,
45809,
486,
88,
436,
1047,
42681,
401,
262,
1077,
5206,
575,
332,
284,
23071,
66154,
643,
45809,
486,
5366,
26787,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_useless_number() {
assert_eq!(js_parser_rs::parse("0".chars()), Ok(vec![TokenType::Literal(LiteralType::Integer(0))]));
assert_eq!(js_parser_rs::parse("0xabcdef0".chars()), Ok(vec![TokenType::Literal(LiteralType::Integer(0xabcdef0))]));
assert_eq!(js_parser_rs::parse("0xABCDEF0".char... | rust_cleaned_test_functions.jsonl/61520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15951,
1717,
5500,
368,
341,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
445,
15,
3263,
19255,
11858,
7622,
25592,
20703,
75611,
486,
17350,
4957,
9953,
929,
486,
3486,
7,
15,
593,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add() {
let nan: f64 = Float::nan();
let inf: f64 = Float::infinity();
let neg_inf: f64 = Float::neg_infinity();
assert_approx_eq!(12.3f64.mul_add(4.5, 6.7), 62.05);
assert_approx_eq!((-12.3f64).mul_add(-4.5, -6.7), 48.65);
assert_approx_eq!(0.... | rust_cleaned_test_functions.jsonl/7441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
2891,
368,
341,
286,
1077,
20021,
25,
282,
21,
19,
284,
13001,
486,
18759,
543,
286,
1077,
4132,
25,
282,
21,
19,
284,
13001,
486,
80016,
543,
286,
1077,
4184,
26051,
25,
282,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pit2() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
assert!(vm.create_pit2(kvm_pit_config::default()).is_ok());
let pit2 = vm.get_pit2().unwrap();
vm.set_pit2(&pit2).unwrap();
let mut other_pit2 = vm.get_pit2().unwrap();
... | rust_cleaned_test_functions.jsonl/86836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
275,
17,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
543,
286,
2060,
10297,
7338,
2520,
620,
275,
17,
596... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_allowed_authorization() -> Result<()> {
let rights = AuthorizationItemSetBuilder::new()
.add_right("system.hdd.smart")?
.add_right("system.login.done")?
.build();
Authorization::new(Some(rights), None, Flags::EXTEND_RIGHTS).unwrap();
... | rust_cleaned_test_functions.jsonl/74274 | {
"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,
8657,
42155,
22938,
2022,
368,
1464,
5714,
71698,
341,
286,
1077,
3188,
284,
30562,
1234,
1649,
3297,
486,
931,
741,
310,
659,
718,
10539,
445,
8948,
860,
631,
52544,
899,
5267,
310,
659,
718,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rxq_event() {
// Test case:
// - there is pending RX data in the backend; and
// - the driver makes RX buffers available; and
// - the backend successfully places its RX data into the queue.
{
let test_ctx = TestContext::new();
let ... | rust_cleaned_test_functions.jsonl/75842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24330,
80,
6748,
368,
341,
286,
442,
3393,
1142,
510,
286,
442,
481,
1052,
374,
15280,
28170,
821,
304,
279,
19163,
26,
323,
198,
286,
442,
481,
279,
5579,
3643,
28170,
27389,
2500,
26,
323,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_record_literal_field_in_simple_macro() {
check(
r#"
macro_rules! m { ($e:expr) => { $e } }
struct A { the_field: u32 }
fn foo() {
m!(A { the$0 })
}
"#,
expect![[r#"
fd the_field u32
"#]],
);
} | rust_cleaned_test_functions.jsonl/39751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
34100,
5013,
1243,
30015,
58810,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
32606,
21407,
0,
296,
314,
1711,
68,
96011,
8,
589,
314,
400,
68,
335,
456,
1235,
362,
314,
279,
5013,
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_read_clob_abc() -> IonResult<()> {
let mut cursor = ion_cursor_for(&[0x93, 0x61, 0x62, 0x63]);
assert_eq!(cursor.next()?, Some(Value(IonType::Clob, false)));
assert_eq!(
cursor.read_clob_bytes()?.unwrap().as_slice(),
"abc".as_bytes()
);
... | rust_cleaned_test_functions.jsonl/82746 | {
"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,
6443,
666,
1684,
62,
13683,
368,
1464,
44805,
2077,
71698,
341,
286,
1077,
5206,
8128,
284,
27672,
28601,
5478,
2099,
58,
15,
87,
24,
18,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
21,
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... | 3 |
#[test]
fn test_check_is_mmapped_for_mapped() {
serial_test(|| {
with_cleanup(
|| {
assert!(dzmmap_noreplace(START, BYTES_IN_PAGE).is_ok());
panic_if_unmapped(START, BYTES_IN_PAGE);
},
|| {
... | rust_cleaned_test_functions.jsonl/107214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
6892,
35599,
5677,
5478,
91933,
368,
341,
286,
6146,
4452,
79453,
341,
310,
448,
42444,
1006,
394,
1369,
341,
503,
2060,
10297,
67,
31489,
2186,
1089,
460,
2007,
7,
22564,
11,
7710,
28484,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_assertion_fail_on_conflicting_index_key() {
let engine = crate::storage::TestEngineBuilder::new().build().unwrap();
let t1_start_ts = TimeStamp::compose(1, 0);
let t2_start_ts = TimeStamp::compose(2, 0);
let t2_commit_ts = TimeStamp::compose(3,... | rust_cleaned_test_functions.jsonl/31435 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2861
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
290,
22121,
4470,
16059,
78208,
3560,
3097,
368,
341,
286,
1077,
4712,
284,
17717,
486,
16172,
486,
2271,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
1789,
23459,
286,
1077,
259,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_count_bag_colors_nested() {
let lines = rules(r#"
light red bags contain 1 bright white bag.
bright white bags contain 3 dark orange bags, 4 dotted black bags.
dark orange bags contain 1 muted yellow bag, 2 vibrant plum bags.
muted yellow b... | rust_cleaned_test_functions.jsonl/98559 | {
"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,
3180,
74368,
33670,
66279,
368,
341,
286,
1077,
5128,
284,
5601,
2601,
2,
698,
310,
3100,
2518,
17899,
6644,
220,
16,
9906,
4158,
8968,
624,
310,
9906,
4158,
17899,
6644,
220,
18,
6319,
18575,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_style_omit() {
let config = integration_test_utils::make_config_from_args(&["--file-style", "omit"]);
let output = integration_test_utils::run_delta(GIT_DIFF_SINGLE_HUNK, &config);
assert!(!output.contains("src/align.rs"));
} | rust_cleaned_test_functions.jsonl/70072 | {
"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,
2458,
15117,
62,
77968,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
1183,
313,
1192,
11297,
497,
330,
77968,
15049,
286,
1077,
2550,
284,
17590,
4452,
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_raw_compaction_filter() {
let mut cfg = DbConfig::default();
cfg.defaultcf.disable_auto_compactions = true;
cfg.defaultcf.dynamic_level_bytes = false;
let engine = TestEngineBuilder::new()
.api_version(ApiVersion::V2)
.build_with_cfg(&cfg)... | rust_cleaned_test_functions.jsonl/94367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
18177,
1311,
8727,
368,
341,
286,
1077,
5206,
13286,
284,
11988,
2648,
486,
2258,
543,
286,
13286,
8764,
9792,
42628,
27740,
18177,
4020,
284,
830,
280,
286,
13286,
8764,
9792,
59044,
8274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_with_ancestors() {
let key = Keypair::new();
let mut index = AccountsIndex::<bool>::default();
let mut gc = Vec::new();
index.insert(0, &key.pubkey(), true, &mut gc);
assert!(gc.is_empty());
let ancestors = vec![(0, 0)].into_iter().collect(... | rust_cleaned_test_functions.jsonl/20395 | {
"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,
17678,
6615,
62,
681,
267,
1087,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1077,
5206,
22122,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_position() {
let b = [1, 2, 3, 5, 5];
assert!(b.iter().position(|&v| v == 9) == None);
assert!(b.iter().position(|&v| v == 5) == Some(3));
assert!(b.iter().position(|&v| v == 3) == Some(2));
assert!(b.iter().position(|&v| v == 0) == None);
} | rust_cleaned_test_functions.jsonl/8435 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9661,
368,
341,
262,
1077,
293,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
11,
220,
20,
935,
262,
2060,
10297,
65,
19471,
1005,
3487,
22428,
5,
85,
91,
348,
621,
220,
24,
8,
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_issue_467() {
let _result: Result<(AllTypes, _), _> = bincode::decode_from_slice(
&[],
bincode::config::Configuration::standard().with_limit::<1024>(),
);
} | rust_cleaned_test_functions.jsonl/17128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
19,
21,
22,
368,
341,
262,
1077,
716,
1382,
25,
5714,
28706,
2403,
4173,
11,
716,
701,
716,
29,
284,
9544,
1851,
486,
18196,
5673,
26488,
1006,
286,
44590,
1259,
286,
9544,
1851,
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 |
#[test]
fn test_secondary_probs_update_max_empty() {
let mut p = SecondaryProbs {
offset: 0,
probs: vec![],
max_prob: LogSpace::zero(),
};
p.max_prob = LogSpace::one();
p.update_max(0, 0);
assert!(p.max_prob.eq(&LogSpace::zero()));
... | rust_cleaned_test_functions.jsonl/101759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77759,
51405,
8882,
6345,
15124,
368,
341,
286,
1077,
5206,
281,
284,
43534,
1336,
1279,
341,
310,
4347,
25,
220,
15,
345,
310,
69370,
25,
7486,
20703,
1259,
310,
1932,
20794,
25,
2835,
9914,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_and_get_klapic_out_of_bounds() {
let reg_offset = KVM_APIC_REG_SIZE + 10;
let mut klapic = kvm_lapic_state::default();
set_klapic_reg(&mut klapic, reg_offset, 3);
} | rust_cleaned_test_functions.jsonl/25641 | {
"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,
2602,
8378,
3062,
4698,
15958,
292,
6068,
3575,
36878,
368,
341,
286,
1077,
1217,
6917,
284,
730,
11187,
21899,
1317,
8064,
4098,
488,
220,
16,
15,
280,
286,
1077,
5206,
595,
15958,
292,
284,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flow_controller_pending_compaction_bytes() {
let stub = EngineStub::new();
let (tx, rx) = mpsc::sync_channel(0);
let flow_controller = FlowController::new(&FlowControlConfig::default(), stub.clone(), rx);
// exceeds the threshold
stub.0
.pendi... | rust_cleaned_test_functions.jsonl/120662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27441,
21600,
37861,
18177,
1311,
12524,
368,
341,
286,
1077,
13633,
284,
8200,
33838,
486,
931,
543,
286,
1077,
320,
3998,
11,
19111,
8,
284,
296,
81984,
486,
12996,
14571,
7,
15,
317,
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_package_toolchain_with_volta_key() {
let package_empty_toolchain = r#"{
"volta": {
}
}"#;
let manifest_empty_toolchain =
serde_json::de::from_str::<Manifest>(package_empty_toolchain);
assert!(
manifest_empty_toolchai... | rust_cleaned_test_functions.jsonl/27129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26328,
22785,
8819,
6615,
42784,
2565,
3097,
368,
341,
286,
1077,
6328,
15124,
22785,
8819,
284,
435,
55543,
515,
310,
330,
12536,
2565,
788,
341,
310,
456,
286,
335,
57676,
280,
286,
1077,
14455,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sink_panic() {
let num_lines: usize = 10;
let in_addr = next_addr();
let out_addr = next_addr();
let mut config = config::Config::empty();
config.add_source(
"in",
sources::socket::SocketConfig::make_tcp_config(in_addr),
);
config.add_sink(
"... | rust_cleaned_test_functions.jsonl/11744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51567,
620,
31270,
368,
341,
262,
1077,
1629,
18323,
25,
22301,
284,
220,
16,
15,
401,
262,
1077,
304,
7387,
284,
1790,
7387,
543,
262,
1077,
700,
7387,
284,
1790,
7387,
1428,
262,
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_generate_config_key_files() {
let env = ConfigSpec::new_without_pass();
env.command("generate-config")
.with_arg(&env.expected_template_file())
.with_arg(&env.output_node_config_dir(0))
.with_named_arg("-a", "0.0.0.0:8000")
.with_arg("--no-password")
... | rust_cleaned_test_functions.jsonl/97976 | {
"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,
48851,
5332,
3097,
10931,
368,
341,
262,
1077,
6105,
284,
5532,
8327,
486,
931,
39904,
15464,
1428,
262,
6105,
14143,
445,
19366,
25130,
1138,
286,
659,
4197,
6057,
2099,
3160,
56835,
8693,
2458,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_matches_with_deeply_nested_patterns_with_fields() {
allocations::record(|| {
let language = get_language("python");
let query = Query::new(
language,
"
(call
function: (_) @func
arguments: (_) @args)
... | rust_cleaned_test_functions.jsonl/77457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2092
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
87044,
398,
66279,
64923,
6615,
12132,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
12669,
797,
286,
1077,
3239,
284,
11361,
486,
931,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bug6598844() {
test_same(concat!(
"function F() { this.a = 0; }",
"F.prototype.inc = function() { this.a++; return 10; };",
"F.prototype.bar = function() { var x = this.inc(); this.a += x; };"
));
} | rust_cleaned_test_functions.jsonl/27724 | {
"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,
73232,
21,
20,
24,
23,
23,
19,
19,
368,
341,
262,
1273,
33574,
96360,
33673,
286,
330,
1688,
434,
368,
314,
419,
5849,
284,
220,
15,
26,
335,
756,
286,
330,
37,
6003,
26797,
284,
729,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_upgrade() {
let resp = HttpResponseBuilder::new(StatusCode::OK)
.upgrade("websocket")
.finish();
assert!(resp.upgrade());
assert_eq!(
resp.headers().get(header::UPGRADE).unwrap(),
HeaderValue::from_static("websocket")
... | rust_cleaned_test_functions.jsonl/128613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67794,
368,
341,
286,
1077,
9039,
284,
17580,
3297,
486,
931,
7,
15872,
486,
3925,
340,
310,
659,
44230,
445,
83208,
1138,
310,
659,
30150,
543,
286,
2060,
10297,
18243,
17652,
6937,
1423,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frequency_and_count() {
let point = FailPoint::new();
point.set_actions("", vec![Action::new(Task::Return(None), 0.8, Some(100))]);
let mut count = 0;
let mut times = 0f64;
while count < 100 {
if point.eval("test_fail_point_frequency").is_some(... | rust_cleaned_test_functions.jsonl/18303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40132,
8378,
3180,
368,
341,
286,
1077,
1459,
284,
39645,
2609,
486,
931,
543,
286,
1459,
980,
25368,
19814,
7486,
20703,
2512,
486,
931,
47531,
486,
5598,
26717,
701,
220,
15,
13,
23,
11,
4329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stake_warmup_cooldown() {
let delegations = [
Delegation {
// never deactivates
stake: 1_000,
activation_epoch: std::u64::MAX,
..Delegation::default()
},
Delegation {
stake... | rust_cleaned_test_functions.jsonl/15290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
1670,
2178,
454,
11393,
24766,
368,
341,
286,
1077,
19854,
804,
284,
2278,
310,
1581,
87566,
341,
394,
442,
2581,
409,
8859,
973,
198,
394,
18279,
25,
220,
16,
62,
15,
15,
15,
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... | 3 |
#[test]
fn test_merge_disallowed_with_staged_changes() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let ours = commit! {
dir {
foo < "foo original"
}
};
let theirs = commit! {
whatever
};
repo.setup_three... | rust_cleaned_test_functions.jsonl/94184 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
9932,
20967,
6615,
1261,
3279,
47526,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
11350,
284,
5266,
0,
341,
310,
541... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_world_symbols_include_container_name() {
let code = r#"
fn foo() {
enum FooInner { }
}
"#;
let mut symbols = get_symbols_matching(code, "FooInner");
let s = symbols.pop().unwrap();
assert_eq!(s.name(), "FooInner");
assert_eq!(s.container_name(), Some(&SmolStr::new(... | rust_cleaned_test_functions.jsonl/19270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31792,
55752,
37878,
15847,
1269,
368,
341,
262,
1077,
2038,
284,
435,
2,
698,
8822,
15229,
368,
341,
262,
7618,
33428,
31597,
314,
456,
532,
262,
5869,
401,
262,
1077,
5206,
17738,
284,
633,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_policy_for_multiple_same_timelocks() {
let secp = Secp256k1::new();
let (prvkey0, _pubkey0, _fingerprint0) = setup_keys(TPRV0_STR, PATH, &secp);
let locktime_blocks0 = 100;
let locktime_blocks1 = 200;
let desc = descriptor!(sh(and_v(
v:... | rust_cleaned_test_functions.jsonl/77145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
22773,
5478,
45233,
33574,
29087,
301,
25183,
368,
341,
286,
1077,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
1077,
320,
649,
85,
792,
15,
11,
716,
9585,
792,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let req = TestRequest::with_header(
header::CONTENT_TYPE,
"application/x-www-form-urlencoded",
).finish();
let mut cfg = FormConfig::default();
cfg.limit(4096);
match Option::<Form<Info>>::from_request(&req, &cfg)
... | rust_cleaned_test_functions.jsonl/46183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 834
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
4197,
8757,
1006,
310,
4247,
486,
67872,
4189,
345,
310,
330,
5132,
10776,
41242,
8460,
44557,
756,
286,
7457,
30150,
1428,
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... | 4 |
#[test]
fn test_try_from_rgb() {
assert!(fidl_fuchsia_hardware_light::Rgb::try_from(ColorRgb {
red: -0.0,
green: 0.1,
blue: 1.0
})
.is_ok());
assert!(fidl_fuchsia_hardware_light::Rgb::try_from(ColorRgb {
red: 0.0 - f32::EPSILON,
... | rust_cleaned_test_functions.jsonl/33188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
37407,
368,
341,
286,
2060,
10297,
32439,
75,
761,
73391,
1523,
37750,
28663,
486,
80951,
486,
1539,
5673,
15028,
80951,
341,
310,
2518,
25,
481,
15,
13,
15,
345,
310,
6176,
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_resolve_url_from_location_full_2() {
let url = "https://deno.land".parse::<Url>().unwrap();
let new_uri = resolve_url_from_location(&url, "https://golang.org");
assert_eq!(new_uri.host_str().unwrap(), "golang.org");
} | rust_cleaned_test_functions.jsonl/70599 | {
"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,
77291,
2903,
5673,
13126,
16372,
62,
17,
368,
341,
262,
1077,
2515,
284,
330,
2428,
1110,
5183,
78,
87627,
3263,
6400,
27638,
2864,
10483,
15454,
543,
262,
1077,
501,
15572,
284,
8830,
2903,
5673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_metadata_item() {
let driver = Driver::get("MEM").unwrap();
let mut dataset = driver.create("", 1, 1, 1).unwrap();
let key = "Test_Key";
let domain = "Test_Domain";
let value = "Test_Value";
let result = dataset.set_metadata_item(key, value, domain);
assert!(resu... | rust_cleaned_test_functions.jsonl/83437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
22220,
5634,
368,
341,
262,
1077,
5579,
284,
14577,
486,
455,
445,
31970,
1827,
15454,
543,
262,
1077,
5206,
10337,
284,
5579,
2520,
19814,
220,
16,
11,
220,
16,
11,
220,
16,
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_iterator_chain_last() {
let xs = [0, 1, 2, 3, 4, 5];
let ys = [30, 40, 50, 60];
let zs = [];
assert_eq!(xs.iter().chain(ys.iter()).last(), Some(&60));
assert_eq!(zs.iter().chain(ys.iter()).last(), Some(&60));
assert_eq!(ys.iter().chain(zs.iter()).last(), Some(&60));
a... | rust_cleaned_test_functions.jsonl/36987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
30583,
12195,
368,
341,
262,
1077,
11943,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
31810,
284,
508,
18,
15,
11,
220,
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_async_stdin() {
let mut tty = conin_r().unwrap();
let mut ev = tty.get_event_and_raw(Some(Duration::from_millis(10)));
while let Some(Ok(_)) = ev {
ev = tty.get_event_and_raw(Some(Duration::from_millis(10)));
}
if let Some(Err(err)) = ev {
... | rust_cleaned_test_functions.jsonl/11787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
15656,
258,
368,
341,
286,
1077,
5206,
60067,
284,
390,
258,
1710,
1005,
15454,
543,
286,
1077,
5206,
3637,
284,
60067,
670,
6748,
8378,
16067,
65405,
64114,
486,
1499,
717,
56212,
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... | 4 |
#[test]
fn test_cliprect_full_screen() {
let clip = ClipRect::full_screen();
assert_eq!(clip.min, Pt::new(0, 0));
assert_eq!(clip.max, Pt::new(WIDTH, LINES));
} | rust_cleaned_test_functions.jsonl/104244 | {
"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,
44728,
2851,
16372,
17649,
368,
341,
286,
1077,
12327,
284,
29692,
4415,
486,
8878,
17649,
543,
286,
2060,
10714,
10297,
7974,
4358,
11,
51070,
486,
931,
7,
15,
11,
220,
15,
1106,
286,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_insert_vote() {
::libra_logger::try_init_for_testing();
// Set up enough different authors to support different votes for the same block.
let (signers, validator_verifier) = random_validator_verifier(11, Some(10), false);
let my_signer = signers[10].clone();
let mut inserter ... | rust_cleaned_test_functions.jsonl/59233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
54360,
368,
341,
262,
3504,
2740,
956,
27413,
486,
1539,
6137,
5478,
70962,
543,
262,
442,
2573,
705,
3322,
2155,
12014,
311,
1824,
2155,
12684,
369,
279,
1852,
2504,
624,
262,
1077,
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... | 3 |
#[test]
fn test_dummy_timer_context() {
// An implementation of `TimerContext` that uses `usize` timer IDs
// and stores every timer in a `Vec`.
impl TimerHandler<usize> for DummyCtx<Vec<(usize, DummyInstant)>, usize> {
fn handle_timer(&mut self, id: usize) {
... | rust_cleaned_test_functions.jsonl/108603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1729
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60321,
16255,
8467,
368,
341,
310,
442,
1527,
8129,
315,
1565,
10105,
1972,
63,
429,
5711,
1565,
51878,
63,
9021,
28360,
198,
310,
442,
323,
10533,
1449,
9021,
304,
264,
1565,
10050,
18639,
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_vertical_split_by_height() {
let target = Rect {
x: 2,
y: 2,
width: 10,
height: 10,
};
let chunks = Layout::default()
.direction(Direction::Vertical)
.constraints(
[
... | rust_cleaned_test_functions.jsonl/22805 | {
"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,
61203,
17052,
3710,
9561,
368,
341,
286,
1077,
2169,
284,
11920,
341,
310,
856,
25,
220,
17,
345,
310,
379,
25,
220,
17,
345,
310,
2374,
25,
220,
16,
15,
345,
310,
2608,
25,
220,
16,
15,
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_dkg_pool_purging() {
// create 2 DKGs for the same subnet
let current_dkg_id_start_height = Height::from(30);
let last_dkg_id_start_height = Height::from(10);
let mut pool = DkgPoolImpl::new(MetricsRegistry::new());
pool.apply_changes(
... | rust_cleaned_test_functions.jsonl/96878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 879
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
7351,
15709,
620,
324,
3173,
368,
341,
286,
442,
1855,
220,
17,
422,
42916,
82,
369,
279,
1852,
51457,
198,
286,
1077,
1482,
814,
7351,
842,
4906,
9561,
284,
21432,
486,
1499,
7,
18,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retain() {
let mut v = vec![1u, 2, 3, 4, 5];
v.retain(is_odd);
assert_eq!(v, vec![1u, 3, 5]);
} | rust_cleaned_test_functions.jsonl/31839 | {
"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,
21695,
466,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
16,
84,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
348,
1327,
22921,
9623,
74668,
317,
286,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_seccomp_empty() {
let rc1 = unsafe { libc::prctl(libc::PR_GET_SECCOMP) };
assert_eq!(rc1, 0);
SeccompFilter::apply(SeccompFilter::empty().try_into().unwrap()).unwrap();
let rc2 = unsafe { libc::prctl(libc::PR_GET_SECCOMP) };
assert_eq!(rc2, 0);
} | rust_cleaned_test_functions.jsonl/99453 | {
"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,
3453,
638,
14435,
15124,
368,
341,
286,
1077,
10192,
16,
284,
19860,
314,
42142,
486,
649,
12373,
44828,
66,
486,
6480,
12702,
3620,
3706,
51607,
8,
2605,
286,
2060,
10714,
10297,
1287,
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_scoring_from_scores() {
let y = b"GGGGGGATG";
let x = b"ATG";
let scoring = Scoring::from_scores(-5, -1, 1, -1).yclip(-5);
let mut aligner = Aligner::with_scoring(scoring);
let alignment = aligner.custom(x, y);
assert_eq!(alignment.operations, [... | rust_cleaned_test_functions.jsonl/16855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
5503,
5673,
27198,
368,
341,
286,
1077,
379,
284,
293,
1,
22254,
22254,
22254,
828,
38,
876,
286,
1077,
856,
284,
293,
1,
828,
38,
3302,
286,
1077,
19826,
284,
2463,
5503,
486,
1499,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pattern_matches_require_literal_separator() {
let options_require_literal = MatchOptions {
case_sensitive: true,
require_literal_separator: true,
require_literal_leading_dot: false
};
let options_not_require_literal = MatchOptions {
... | rust_cleaned_test_functions.jsonl/13358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21260,
38344,
13793,
34100,
58204,
368,
1476,
286,
1077,
2606,
13793,
34100,
284,
14152,
3798,
341,
310,
1142,
65324,
25,
830,
345,
310,
1373,
34100,
58204,
25,
830,
345,
310,
1373,
34100,
11751,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_temperature() {
let test_data = [
(0x0000, -45000),
// Datasheet setion 5.11 "Conversion of Sensor Output"
(((0b0110_0100 as u16) << 8) | 0b1000_1011, 23730),
];
for td in &test_data {
assert_eq!(convert_temperature(... | rust_cleaned_test_functions.jsonl/6822 | {
"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,
34910,
53525,
368,
341,
286,
1077,
1273,
1769,
284,
2278,
310,
320,
15,
87,
15,
15,
15,
15,
11,
481,
19,
20,
15,
15,
15,
1326,
310,
442,
422,
19346,
3674,
738,
290,
220,
20,
13,
16,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_device_insert_validation() {
let mut device = DeviceInsert {
device_name: "".into(),
device_url: "".into(),
pool_id: 0,
};
assert!(device.validate().is_err());
device.device_name = "test".into();
device.device_url = "htt... | rust_cleaned_test_functions.jsonl/64910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9204,
17678,
19416,
368,
341,
286,
1077,
5206,
3671,
284,
13903,
13780,
341,
310,
3671,
1269,
25,
44907,
18122,
3148,
310,
3671,
2903,
25,
44907,
18122,
3148,
310,
7314,
842,
25,
220,
15,
345,
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_handle_key() {
let mut input = StringInput::with_filter_map(|c| if c == 'i' { None } else { Some(c) });
input.set_value(LOREM.into());
input.set_at(40);
input.handle_key(KeyEvent::new(KeyCode::Left, KeyModifiers::empty()));
assert_eq!(input.get_at(), 39);... | rust_cleaned_test_functions.jsonl/63668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
3097,
368,
341,
286,
1077,
5206,
1946,
284,
923,
2505,
486,
4197,
8727,
5376,
22428,
66,
91,
421,
272,
621,
364,
72,
6,
314,
2240,
335,
770,
314,
4329,
1337,
8,
1625,
286,
1946,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_contains() {
let empty = Nil::<int>;
assert!((!empty.contains(5)));
let list = List::from_vec([5, 8, 6]);
assert!((list.contains(5)));
assert!((!list.contains(7)));
assert!((list.contains(8)));
} | rust_cleaned_test_functions.jsonl/130356 | {
"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,
63598,
368,
341,
286,
1077,
4287,
284,
32274,
27638,
396,
10133,
286,
2060,
0,
1188,
0,
3194,
8786,
7,
20,
22525,
286,
1077,
1140,
284,
1759,
486,
1499,
13251,
2561,
20,
11,
220,
23,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_disconnect_initiated_from_user_request() {
let (mut cobalt_sender, mut cobalt_receiver) = fake_cobalt_sender();
let inspect_tree = fake_inspect_tree();
let disconnect_info = DisconnectInfo {
connected_duration: 30.seconds(),
bssid: [1u8; 6],
... | rust_cleaned_test_functions.jsonl/14750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
67972,
6137,
10029,
5673,
3317,
7893,
368,
341,
286,
1077,
320,
6984,
33828,
3145,
54356,
11,
5206,
33828,
3145,
65691,
8,
284,
12418,
666,
674,
3145,
54356,
543,
286,
1077,
24085,
11663,
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_map_single_func_non_consuming() {
let h = hlist![9000, 9001, 9002];
let mapped = h.to_ref().map(|v| v + 1);
assert_eq!(mapped, hlist![9001, 9002, 9003]);
} | rust_cleaned_test_functions.jsonl/24763 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
19487,
9596,
21637,
3382,
61117,
368,
341,
286,
1077,
305,
284,
305,
1607,
20703,
24,
15,
15,
15,
11,
220,
24,
15,
15,
16,
11,
220,
24,
15,
15,
17,
935,
286,
1077,
23844,
284,
305,
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_user_playlist_unfollow() {
let mut oauth = SpotifyOAuth::default()
.scope("playlist-modify-private playlist-modify-public")
.build();
match get_token(&mut oauth) {
Some(token_info) => {
let client_credential = SpotifyClientCredentials::default()
... | rust_cleaned_test_functions.jsonl/79297 | {
"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,
3317,
69267,
4907,
18559,
368,
341,
262,
1077,
5206,
46415,
284,
40537,
57850,
486,
2258,
741,
286,
659,
4186,
445,
34233,
17078,
1437,
65277,
26791,
17078,
1437,
56471,
1138,
286,
659,
5834,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_consensus_serialization() {
let example_key = ConsensusKey(
TendermintKey::from_raw_ed25519(&hex::decode_upper(EXAMPLE_CONSENSUS_KEY).unwrap())
.unwrap(),
);
assert_eq!(
example_key.to_string(),
"icp1zcjduepqfgjuveq2rae... | rust_cleaned_test_functions.jsonl/62136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
13626,
25602,
2022,
368,
341,
286,
1077,
3110,
3097,
284,
7292,
13626,
1592,
1006,
310,
93867,
67791,
1592,
486,
1499,
16067,
32370,
17,
20,
20,
16,
24,
2099,
17308,
486,
18196,
34445,
2540... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_learner() -> Result<()> {
let l = default_logger();
let mut n1 = new_test_learner_raft(1, vec![1], vec![2], 10, 1, new_storage(), &l);
n1.apply_conf_change(&remove_node(2))?;
assert_iter_eq!(o n1.prs().conf().voters().ids(), vec![1]);
assert!(n1.prs().conf().learners()... | rust_cleaned_test_functions.jsonl/19183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
62,
93595,
368,
1464,
5714,
71698,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
308,
16,
284,
501,
4452,
62,
93595,
62,
2944,
7,
16,
11,
7486,
20703,
16,
1125,
7486,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_key() {
let key = JwtKey::new("1", N, E);
let mut key_set = KeyStore::new();
assert_eq!(0usize, key_set.keys_len());
key_set.add_key(&key);
assert_eq!(1usize, key_set.keys_len());
let result = key_set.key_by_id("1");
assert!(resul... | rust_cleaned_test_functions.jsonl/124805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
3097,
368,
341,
286,
1077,
1376,
284,
54369,
1592,
486,
931,
445,
16,
497,
451,
11,
468,
626,
286,
1077,
5206,
1376,
2602,
284,
5309,
6093,
486,
931,
1428,
286,
2060,
10714,
10297,
15,
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_seal_open_detached() {
init().unwrap();
use randombytes::randombytes;
let aes = Aes256Gcm::new().unwrap();
for i in 0..256usize {
let k = aes.gen_key();
let n = gen_random_nonce();
let ad = randombyte... | rust_cleaned_test_functions.jsonl/46773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
278,
11311,
24409,
3854,
368,
341,
310,
2930,
1005,
15454,
543,
310,
990,
4194,
9651,
486,
11463,
9651,
280,
310,
1077,
56575,
284,
362,
288,
17,
20,
21,
38,
6226,
486,
931,
1005,
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... | 2 |
#[test]
fn test_multiple_network_interfaces() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let kernel_path = direct_kernel_boot_path();
let mut child = GuestCommand::new(&guest)
.args(&["--cpus", "boot=1... | rust_cleaned_test_functions.jsonl/26146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 913
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
20966,
72960,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_field_from_bytes_string_invalid()
{
match Field::from_bytes(&test_string_data_invalid)
{
Err(error) =>
{
assert_eq!(error.to_string(), "Field data is too short!");
}
Ok(_) =>
{
panic!(... | rust_cleaned_test_functions.jsonl/41984 | {
"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,
5013,
5673,
12524,
3904,
31433,
741,
262,
341,
286,
2432,
8601,
486,
1499,
12524,
2099,
1944,
3904,
1769,
31433,
340,
286,
341,
310,
15495,
6390,
8,
6274,
310,
341,
394,
2060,
10714,
10297,
841,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_input() {
let input = "L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL";
let expected = make_expected();
let mut cont = Container::new();
assert_eq!(Ok(()), cont.parse_input(input));
as... | rust_cleaned_test_functions.jsonl/39671 | {
"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,
21039,
5898,
368,
341,
286,
1077,
1946,
284,
330,
43,
1214,
43,
1214,
43,
1214,
43,
198,
49356,
86708,
1214,
43,
198,
43,
1214,
1214,
496,
43,
33947,
49356,
1214,
43,
1214,
43,
198,
43,
1214,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_leader_superseding_with_check_quorum() {
let l = default_logger();
let mut a = new_test_raft(1, vec![1, 2, 3], 10, 1, new_storage(), &l);
let mut b = new_test_raft(2, vec![1, 2, 3], 10, 1, new_storage(), &l);
let mut c = new_test_raft(3, vec![1, 2, 3], 10, 1, new_storage(), &l);
... | rust_cleaned_test_functions.jsonl/19119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
23723,
388,
16100,
6615,
7200,
11280,
33006,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
264,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
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... | 3 |
#[test]
fn test_many_tombstones() {
let engine = TestEngineBuilder::new().build().unwrap();
// Generate RocksDB tombstones in write cf.
let start_ts = 1;
let safe_point = 2;
for i in 0..16 {
for y in 0..16 {
let pk = &[i as u8, y as u8];
... | rust_cleaned_test_functions.jsonl/36640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 721
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22101,
528,
2855,
32510,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
286,
442,
19813,
68031,
3506,
43080,
32510,
304,
3270,
24111,
624,
286,
1077,
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... | 8 |
#[test]
fn test_medium_ascii() {
let strs = vec![
"rustconf 2021",
"new york city",
"nyc pizza is good",
"test the 24 char limit!!",
];
for s in strs {
let compact = CompactString::new(s);
assert_eq!(compact, s);
assert_eq!(s, compact);
... | rust_cleaned_test_functions.jsonl/2782 | {
"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,
54867,
50238,
368,
341,
262,
1077,
57584,
284,
7486,
90515,
286,
330,
35788,
6135,
220,
17,
15,
17,
16,
756,
286,
330,
931,
49572,
3283,
756,
286,
330,
77,
3337,
22502,
374,
1661,
756,
286,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_causets_diff() {
let a = vec!["1", "2", "3"];
let a_diff_a = causets_diff(&a, &a);
assert!(a_diff_a.is_empty());
let b = vec!["4"];
assert_eq!(a, causets_diff(&a, &b));
let c = vec!["4", "5", "3", "6"];
assert_eq!(vec!["1", "2"], causets_di... | rust_cleaned_test_functions.jsonl/67535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
11855,
1415,
15850,
368,
341,
286,
1077,
264,
284,
7486,
0,
1183,
16,
497,
330,
17,
497,
330,
18,
6332,
286,
1077,
264,
15850,
4306,
284,
24524,
1415,
15850,
2099,
64,
11,
609,
64,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bloom_interval() -> Result<()> {
let schema = DataSchemaRefExt::create(vec![DataField::new(
"Interval",
DataType::Interval(IntervalUnit::DayTime),
true,
)]);
let block = DataBlock::create(schema, vec![Series::from_data([
None,
None,
No... | rust_cleaned_test_functions.jsonl/101371 | {
"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,
880,
18474,
20541,
368,
1464,
5714,
71698,
341,
262,
1077,
10802,
284,
2885,
8632,
3945,
6756,
486,
3182,
25592,
20703,
1043,
1877,
486,
931,
1006,
286,
330,
10256,
756,
286,
33172,
486,
10256,
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... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.