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_split_zero_fast_aggregate_verify() {
let agg_sig = AggregateSignature::new();
let mut sk_bytes = [0; 32];
sk_bytes[31] = 1;
let sk = SecretKey::from_bytes(&sk_bytes).unwrap();
let pk = PublicKey::from_secret_key(&sk);
let sk_bytes = hex::decode(... | rust_cleaned_test_functions.jsonl/112215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
19359,
35743,
20587,
14240,
35638,
368,
341,
286,
1077,
50020,
29252,
284,
56922,
25088,
486,
931,
1428,
286,
1077,
5206,
1901,
12524,
284,
508,
15,
26,
220,
18,
17,
935,
286,
1901,
12524,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3a_serde() {
let a = Vec3A::new(1.0, 2.0, 3.0);
let serialized = serde_json::to_string(&a).unwrap();
assert_eq!(serialized, "[1.0,2.0,3.0]");
let deserialized = serde_json::from_str(&serialized).unwrap();
assert_eq!(a, deserialized);
let deserialized = serde_json::from... | rust_cleaned_test_functions.jsonl/23513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
64,
75861,
450,
368,
341,
262,
1077,
264,
284,
11312,
18,
32,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
1077,
32916,
284,
61570,
9455,
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_resize_policy() {
let rp = DefaultResizePolicy;
for n in 0..1000 {
assert!(rp.min_capacity(rp.usable_capacity(n)) <= n);
assert!(rp.usable_capacity(rp.min_capacity(n)) <= n);
}
} | rust_cleaned_test_functions.jsonl/57325 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53370,
22773,
368,
341,
262,
1077,
33109,
284,
7899,
30561,
13825,
280,
262,
369,
308,
304,
220,
15,
496,
16,
15,
15,
15,
341,
286,
2060,
10297,
22252,
4358,
35603,
95970,
21916,
480,
35603,
144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reset_parameters() {
use approx::assert_relative_eq;
use nalgebra::{storage::Owned, Matrix2, OVector, Vector2, U2};
#[derive(Clone)]
struct AllButOne {
params: OVector<f64, U2>,
}
impl LeastSquaresProblem<f64, U2, U2> for AllButOne {
type ParameterStorage ... | rust_cleaned_test_functions.jsonl/104113 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 647
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18983,
18263,
368,
341,
262,
990,
9848,
486,
2207,
29286,
10714,
280,
262,
990,
84533,
26083,
22964,
16172,
486,
57641,
11,
11631,
17,
11,
506,
3781,
11,
4196,
17,
11,
547,
17,
2440,
262,
11506,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_include_detect_cycle() {
let ctx = TestContext::new();
let cmx_path = ctx.new_include(
"some1.cmx",
json!({
"include": ["some2.cmx"],
}),
);
ctx.new_include(
"some2.cmx",
json!({
... | rust_cleaned_test_functions.jsonl/50693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37878,
56457,
39079,
368,
341,
286,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
286,
1077,
9961,
87,
2638,
284,
5635,
4618,
37878,
1006,
310,
330,
14689,
16,
520,
18085,
756,
310,
2951,
0,
2262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_median_long_constant_seq() {
let even = vec![2.0; 100000];
let even = Data::new(even);
assert_eq!(2.0, even.median());
let odd = vec![2.0; 100001];
let odd = Data::new(odd);
assert_eq!(2.0, odd.median());
} | rust_cleaned_test_functions.jsonl/81933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83003,
17799,
34967,
14486,
368,
341,
286,
1077,
1496,
284,
7486,
20703,
17,
13,
15,
26,
220,
16,
15,
15,
15,
15,
15,
935,
286,
1077,
1496,
284,
2885,
486,
931,
2026,
1037,
317,
286,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_f32x4_all_all() {
let x1 = f32x4::splat(1.0);
let x2 = f32x4::splat(1.0);
assert!((x1.eq(x2)).all());
} | rust_cleaned_test_functions.jsonl/43316 | {
"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,
761,
18,
17,
87,
19,
5705,
5705,
368,
341,
286,
1077,
856,
16,
284,
282,
18,
17,
87,
19,
486,
82,
42339,
7,
16,
13,
15,
317,
286,
1077,
856,
17,
284,
282,
18,
17,
87,
19,
486,
82,
4233... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mat2_transpose() {
let m = mat2(vec2(1.0, 2.0), vec2(3.0, 4.0));
let mt = m.transpose();
assert_eq!(mt.x_axis, vec2(1.0, 3.0));
assert_eq!(mt.y_axis, vec2(2.0, 4.0));
} | rust_cleaned_test_functions.jsonl/13468 | {
"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,
16610,
17,
7965,
2900,
368,
341,
262,
1077,
296,
284,
5517,
17,
25592,
17,
7,
16,
13,
15,
11,
220,
17,
13,
15,
701,
7486,
17,
7,
18,
13,
15,
11,
220,
19,
13,
15,
1106,
262,
1077,
11965,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_carriage_return() {
let csv =
"\"foo\",\"bar\"\r\n\"158252579.00\",\"7.5800\"\r\n\"158252579.00\",\"7.5800\"\r\n";
let file = Cursor::new(csv);
let df = CsvReader::new(file)
.has_header(true)
.with_n_threads(Some(1))
.finis... | rust_cleaned_test_functions.jsonl/57572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26616,
8775,
12511,
368,
341,
286,
1077,
13147,
4035,
310,
15898,
7975,
34333,
2257,
22245,
81,
1699,
2105,
16,
20,
23,
17,
20,
17,
20,
22,
24,
13,
15,
15,
34333,
22,
13,
20,
23,
15,
15,
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_fetch_sync() {
let fetcher = TestFileFetcher::new();
let en_us: LanguageIdentifier = "en-US".parse().unwrap();
let fs1 = fetcher.get_test_file_source("toolkit", vec![en_us.clone()], "toolkit/{locale}/");
assert!(fs1
.fetch_file_sync(&en_us, FTL_RESOURCE_PRESENT, false)
... | rust_cleaned_test_functions.jsonl/133058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
23008,
368,
341,
262,
1077,
7807,
261,
284,
3393,
1703,
97492,
486,
931,
543,
262,
1077,
662,
11306,
25,
11434,
8714,
284,
330,
268,
32340,
3263,
6400,
1005,
15454,
1428,
262,
1077,
8619,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_increment() -> Result<(), Box<EvalAltResult>> {
let engine = Engine::new();
assert_eq!(engine.eval::<INT>("let x = 1; x += 2; x")?, 3);
assert_eq!(
engine.eval::<String>(r#"let s = "test"; s += "ing"; s"#)?,
"testing"
);
Ok(())
} | rust_cleaned_test_functions.jsonl/104222 | {
"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,
51482,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
4712,
284,
8200,
486,
931,
1428,
262,
2060,
10714,
10297,
8512,
31710,
27638,
3221,
13211,
1149,
856,
284,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_path_builder_empty_move_to() {
let mut p = Path::builder();
p.move_to(point(1.0, 2.0));
p.move_to(point(3.0, 4.0));
p.move_to(point(5.0, 6.0));
let path = p.build();
let mut it = path.iter();
assert_eq!(it.next(), Some(PathEvent::MoveTo(point(1.0, 2.0))));
assert... | rust_cleaned_test_functions.jsonl/19895 | {
"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,
2638,
28532,
15124,
17134,
2346,
368,
341,
262,
1077,
5206,
281,
284,
7933,
486,
17850,
543,
262,
281,
13635,
2346,
20235,
7,
16,
13,
15,
11,
220,
17,
13,
15,
1106,
262,
281,
13635,
2346,
2023... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum() {
let msg = r#"enum PairingStatus {
DEALPAIRED = 0;
INVENTORYORPHAN = 1;
CALCULATEDORPHAN = 2;
CANCELED = 3;
}"#;
let enumeration = parse_opt(msg, |p| p.next_enum_opt());
assert... | rust_cleaned_test_functions.jsonl/70451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
286,
1077,
3750,
284,
435,
55543,
9018,
25995,
287,
2522,
341,
394,
25491,
8041,
40,
6504,
286,
284,
220,
15,
280,
394,
1964,
75672,
868,
10842,
1093,
256,
284,
220,
16,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_local_e2e_2ads() {
let (genesis_config, sender_keypair) = create_genesis_config(sol_to_lamports(9_000_000.0));
let mut bank = Bank::new(&genesis_config);
let program_id = Keypair::new().pubkey();
bank.add_builtin("Themis", program_id, process_instruction_native);
... | rust_cleaned_test_functions.jsonl/49526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
2204,
17,
68,
62,
17,
7664,
368,
341,
286,
1077,
320,
77894,
5332,
11,
4646,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
80608,
2346,
907,
309,
3394,
7,
24,
62,
15,
15,
15,
62,
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_parse_board_not_in_html_meta() {
let documents = load_document("../tests/Gossiping_M.1123769450.A.A1A.html");
assert_eq!(parse_board(&documents).unwrap(), BoardName::Gossiping);
} | rust_cleaned_test_functions.jsonl/87150 | {
"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,
21039,
23919,
7913,
1243,
9564,
13381,
368,
341,
286,
1077,
9293,
284,
2795,
26231,
17409,
23841,
15792,
41473,
287,
1245,
13,
16,
16,
17,
18,
22,
21,
24,
19,
20,
15,
875,
875,
16,
32,
2564,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_amount_try_from_string() {
for (xrp, result) in TEST_XRP_CASES {
let amount = Amount::try_from(xrp).unwrap();
assert_eq!(result, amount.to_string())
}
} | rust_cleaned_test_functions.jsonl/23244 | {
"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,
13471,
53283,
5673,
3904,
368,
341,
286,
369,
320,
87,
22252,
11,
1102,
8,
304,
13602,
6859,
21657,
28540,
50,
341,
310,
1077,
3311,
284,
25783,
486,
1539,
5673,
2075,
22252,
568,
15454,
543,
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
] | 2 |
#[test]
fn test_egl() {
let _ = [
egl::SURFACE_TYPE, egl::WINDOW_BIT,
egl::BLUE_SIZE, 8,
egl::GREEN_SIZE, 8,
egl::RED_SIZE, 8,
egl::NONE
];
let _ = egl::GetDisplay(egl::DEFAULT_DISPLAY);
egl::Terminate(unsafe { std::mem::uninitialized() });
} | rust_cleaned_test_functions.jsonl/70569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
63502,
368,
341,
262,
1077,
716,
284,
2278,
286,
384,
6072,
486,
91815,
19759,
4189,
11,
384,
6072,
486,
40156,
11189,
345,
286,
384,
6072,
486,
64330,
4098,
11,
220,
23,
345,
286,
384,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transaction_spend_in_same_block() {
let (chain_controller, shared, parent) = start_chain(None);
let mut mock_store = MockStore::new(&parent, shared.store());
let mut chain = MockChain::new(parent.clone(), shared.consensus());
chain.gen_empty_block(100u64, &mut mock_store);
l... | rust_cleaned_test_functions.jsonl/84790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
643,
3740,
1243,
33574,
7113,
368,
341,
262,
1077,
320,
8819,
21600,
11,
6094,
11,
2681,
8,
284,
1191,
30583,
26717,
317,
262,
1077,
5206,
7860,
14809,
284,
14563,
6093,
486,
931,
2099,
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... | 3 |
#[test]
fn test_ip_lookup_across_threads() {
use super::testing::ip_lookup_across_threads_test;
let io_loop = Runtime::new().expect("failed to create tokio runtime io_loop");
let handle = io_loop.handle().clone();
ip_lookup_across_threads_test::<Runtime, TokioRuntime>(io_loop, ha... | rust_cleaned_test_functions.jsonl/121532 | {
"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,
10385,
27464,
14718,
2128,
29725,
368,
341,
286,
990,
2256,
486,
8840,
486,
573,
27464,
14718,
2128,
29725,
4452,
280,
286,
1077,
6399,
17198,
284,
10954,
486,
931,
1005,
17119,
445,
16091,
311,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_method_mut_fails() {
let mut document: CoreDocument = document();
// Resolving an existing reference to a missing method returns None.
assert_eq!(document.resolve_method_mut("#key-4", None), None);
// Resolving a plain DID returns None.
assert_eq!(document.resolve_m... | rust_cleaned_test_functions.jsonl/50544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
9032,
29523,
761,
6209,
368,
341,
262,
1077,
5206,
2197,
25,
9518,
7524,
284,
2197,
1428,
262,
442,
1800,
19648,
458,
6350,
5785,
311,
264,
7402,
1714,
4675,
2240,
624,
262,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_ready_final_wave() {
let mut update = Update {
variant: String::from("bottlerocket"),
arch: String::from("test"),
version: Version::parse("1.0.0").unwrap(),
max_version: Version::parse("1.1.0").unwrap(),
waves: BTreeMap::... | rust_cleaned_test_functions.jsonl/49369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
35456,
20676,
60063,
368,
341,
286,
1077,
5206,
2647,
284,
5549,
341,
310,
11424,
25,
923,
486,
1499,
445,
65,
1716,
1536,
4537,
4461,
310,
5325,
25,
923,
486,
1499,
445,
1944,
4461,
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_record_to_string_for_ssa_record() {
let ssa_record_1 = Record::StartSegmentAddress {
cs: 0x0110,
ip: 0x3801,
};
assert_eq!(
ssa_record_1.to_record_string(),
Ok(String::from(":0400000301103801AF"))
);
let ssa_record_2 = Record::StartSegmentAddr... | rust_cleaned_test_functions.jsonl/105909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
2346,
3904,
5478,
643,
9081,
14192,
368,
341,
262,
1077,
274,
9081,
14192,
62,
16,
284,
13583,
486,
3479,
21086,
4286,
341,
286,
10532,
25,
220,
15,
87,
15,
16,
16,
15,
345,
286,
5997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_codebook_msb() {
let mut scb_desc: Vec<ShortCodebookDesc> = vec![ShortCodebookDesc {
code: 0b0,
bits: 1,
}... | rust_cleaned_test_functions.jsonl/33954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2772
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
4136,
2190,
717,
16892,
368,
341,
286,
1077,
5206,
1136,
65,
10986,
25,
11312,
27,
12472,
2078,
2190,
11065,
29,
284,
7486,
20703,
12472,
2078,
2190,
11065,
341,
11950,
2038,
25,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overwrite() {
let overwrite = PermissionOverwrite {
allow: Permissions::CREATE_INVITE,
deny: Permissions::KICK_MEMBERS,
kind: PermissionOverwriteType::Member(UserId::new(12_345_678).expect("non zero")),
};
// We can't use serde_test be... | rust_cleaned_test_functions.jsonl/89932 | {
"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,
15431,
4934,
368,
341,
286,
1077,
32216,
284,
18135,
1918,
4934,
341,
310,
2138,
25,
53357,
486,
22599,
40107,
5991,
345,
310,
23101,
25,
53357,
486,
42,
10685,
96446,
345,
310,
3093,
25,
18135,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_index_out_of_range() {
let mut builder = ConfigurationBuilder::default();
builder.add(
InMemorySource::from_string_slice(TEST_JSON.trim()),
Json::default(),
);
let configuration = builder.build().unwrap().merge_owned().unwrap();
let result: Result<Optio... | rust_cleaned_test_functions.jsonl/20037 | {
"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,
5084,
3560,
6068,
3575,
9698,
368,
341,
262,
1077,
5206,
7363,
284,
12221,
3297,
486,
2258,
543,
262,
7363,
1364,
1006,
286,
758,
10642,
3608,
486,
1499,
3904,
26488,
50320,
25356,
16419,
14702,
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_simple_launch() {
let bionic = UbuntuDiskConfig::new(BIONIC_IMAGE_NAME.to_string());
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
vec![Box::new(bionic), Box::new(focal)]
.drain(..)
.for_each(|disk_config| {
vec!... | rust_cleaned_test_functions.jsonl/26097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
51617,
368,
341,
286,
1077,
293,
20764,
284,
34960,
47583,
2648,
486,
931,
5349,
1271,
1317,
19121,
4708,
2389,
3904,
1423,
286,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_execute_one() {
let mut result = FakeWrite::default();
execute!(&mut result, FakeCommand).unwrap();
assert_eq!(&result.buffer, "cmd");
assert!(result.flushed);
} | rust_cleaned_test_functions.jsonl/5849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
11667,
368,
341,
310,
1077,
5206,
1102,
284,
36965,
7985,
486,
2258,
543,
310,
9026,
0,
2099,
6984,
1102,
11,
36965,
4062,
568,
15454,
543,
310,
2060,
10714,
0,
2099,
1382,
24465,
11,
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 |
#[test]
fn test_from_str_round_trips() {
for signal in Signal::iterator() {
assert_eq!(signal.as_ref().parse::<Signal>().unwrap(), signal);
assert_eq!(signal.to_string().parse::<Signal>().unwrap(), signal);
}
} | rust_cleaned_test_functions.jsonl/10337 | {
"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,
5673,
2895,
29896,
3547,
3077,
368,
341,
286,
369,
8286,
304,
27230,
486,
6854,
368,
341,
310,
2060,
10714,
10297,
26622,
5357,
7793,
1005,
6400,
27638,
26810,
10483,
15454,
1507,
8286,
317,
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
] | 2 |
#[test]
fn test_format_docs_handles_error_codes() {
let comment = "```compile_fail,E0641\nlet b = 0 as *const _;\n```";
assert_eq!(format_docs(comment), "```rust\nlet b = 0 as *const _;\n```");
} | rust_cleaned_test_functions.jsonl/57087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
49692,
68017,
4096,
38482,
368,
341,
286,
1077,
3980,
284,
330,
73594,
20433,
22121,
42125,
15,
21,
19,
16,
1699,
1149,
293,
284,
220,
15,
438,
353,
1024,
716,
17882,
77,
73594,
876,
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_bounds_middle_symmetric() {
// easy case
let b = Bounds::new(-10.0, 10.0);
assert_eq!(b.middle(), 0.0);
// overflow?
let b = Bounds::new(f64::MIN, f64::MAX);
assert_eq!(b.middle(), 0.0);
// underflow?
let v = f64::MIN_POSITIVE / 2... | rust_cleaned_test_functions.jsonl/7154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36878,
62580,
26825,
15903,
368,
341,
286,
442,
4135,
1142,
198,
286,
1077,
293,
284,
69130,
486,
931,
4080,
16,
15,
13,
15,
11,
220,
16,
15,
13,
15,
317,
286,
2060,
10714,
10297,
65,
80264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alloc_bio_desc() {
let mut f = OpenOptions::new()
.truncate(true)
.create(true)
.write(true)
.read(true)
.open("/tmp/buf_3")
.unwrap();
let mut writer = BufWriter::new(f.try_clone().unwrap());
let mut... | rust_cleaned_test_functions.jsonl/81048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1764
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14802,
89641,
10986,
368,
341,
286,
1077,
5206,
282,
284,
5264,
3798,
486,
931,
741,
310,
659,
66054,
3715,
340,
310,
659,
3182,
3715,
340,
310,
659,
4934,
3715,
340,
310,
659,
878,
3715,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_max_transaction_size() {
let mut rng: StdRng = SeedableRng::from_seed([18u8; 32]);
let sender = AccountKey::random(&mut rng);
let recipient = AccountKey::random(&mut rng);
let tx = get_transaction(
MAX_INPUTS as usize,
MAX_OUTPUTS as usize,... | rust_cleaned_test_functions.jsonl/32207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
28884,
2368,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
23,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
4646,
284,
8615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pop() {
let mut cache = LruCache::new(2);
cache.put("apple", "red");
cache.put("banana", "yellow");
assert_eq!(cache.len(), 2);
assert_opt_eq(cache.get(&"apple"), "red");
assert_opt_eq(cache.get(&"banana"), "yellow");
let popped = cache.... | rust_cleaned_test_functions.jsonl/77941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
368,
341,
286,
1077,
5206,
6500,
284,
444,
2672,
8233,
486,
931,
7,
17,
626,
286,
6500,
3597,
445,
22377,
497,
330,
1151,
797,
286,
6500,
3597,
445,
87747,
497,
330,
27869,
3071,
286,
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_delete_node() {
let pool = create_connection_pool_and_migrate();
let registry = DieselRegistry::new(pool);
registry
.insert_node(get_node_1())
.expect("Unable to insert node");
registry
.insert_node(get_node_2())
.e... | rust_cleaned_test_functions.jsonl/106300 | {
"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,
11353,
5084,
368,
341,
286,
1077,
7314,
284,
1855,
15866,
15709,
8378,
717,
34479,
543,
286,
1077,
19424,
284,
53794,
15603,
486,
931,
41838,
626,
286,
19424,
198,
310,
659,
4208,
5084,
5433,
5084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty() {
let empty_stream: Vec<u8> = Vec::new();
let mut cart_stream:Vec<u8> = Vec::new();
let mut final_stream: Vec<u8> = Vec::new();
cart::pack(&mut empty_stream.as_slice(), &mut cart_stream, None, None, None).unwrap();
assert!(cart::is_cart(&cart_stream[..]));
let m... | rust_cleaned_test_functions.jsonl/69923 | {
"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,
15124,
368,
341,
262,
1077,
4287,
12673,
25,
11312,
34837,
23,
29,
284,
11312,
486,
931,
543,
262,
1077,
5206,
7406,
12673,
25,
10050,
34837,
23,
29,
284,
11312,
486,
931,
543,
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_send_append_for_progress_snapshot() {
let l = default_logger();
let mut r = new_test_raft(1, vec![1, 2], 10, 1, new_storage(), &l);
r.become_candidate();
r.become_leader();
r.read_messages();
r.mut_prs().get_mut(2).unwrap().become_snapshot(10);
for _ in 0..10 {
... | rust_cleaned_test_functions.jsonl/30296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
26041,
5478,
27200,
53265,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
435,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ser_enum_unit() {
assert_ser_tokens(
&SerEnum::Unit::<u32, u32, u32>,
&[Token::UnitVariant {
name: "SerEnum",
variant: "Unit",
}],
);
} | rust_cleaned_test_functions.jsonl/56417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
31054,
14832,
368,
341,
262,
2060,
75861,
28838,
1006,
286,
609,
31745,
10766,
486,
4562,
27638,
84,
18,
17,
11,
575,
18,
17,
11,
575,
18,
17,
12520,
286,
44590,
3323,
486,
4562,
20746,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_peer_coverage() {
let strat = PeerStratBeta::default();
let arc = |c, n, h| {
let mut arc = DhtArc::from_start_and_half_len(0u32, h);
arc.update_length(PeerViewBeta::new(Default::default(), arc, c, n));
(arc.coverage() * 10000.0).round() / 10000.0
};
let ... | rust_cleaned_test_functions.jsonl/23341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
73384,
368,
341,
262,
1077,
43297,
284,
45147,
2580,
266,
64811,
486,
2258,
543,
262,
1077,
15580,
284,
760,
66,
11,
308,
11,
305,
91,
341,
286,
1077,
5206,
15580,
284,
422,
426,
36809,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_split_full_amount_minimum_stake_delegation() {
let feature_set = FeatureSet::all_enabled();
let minimum_delegation = crate::get_minimum_delegation(&feature_set);
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_balance(StakeState::size_of());
... | rust_cleaned_test_functions.jsonl/31651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
16372,
13471,
84855,
1261,
726,
2259,
87566,
368,
341,
286,
1077,
4565,
2602,
284,
19998,
1649,
486,
541,
18220,
543,
286,
1077,
8028,
2259,
87566,
284,
17717,
486,
455,
84855,
2259,
87566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_running_not_allowed_when_no_root_privileges() -> Result<(), Box<dyn error::Error>> {
let image = build_image(&[
"RUN addgroup --gid 1234 app",
"RUN adduser --uid 1234 --gid 1234 --gecos '' --disabled-password app",
])?;
let output = run_container(&image, &["--user", "... | rust_cleaned_test_functions.jsonl/90915 | {
"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,
37333,
7913,
42155,
47636,
6536,
12993,
24726,
70838,
368,
1464,
5714,
68843,
8261,
92846,
1465,
486,
1454,
2452,
341,
262,
1077,
2168,
284,
1936,
4954,
2099,
9640,
286,
330,
47390,
912,
4074,
1177,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_numeric_list() {
context!(ctx, dev);
execute_str!(ctx, b"*NUMLIST? (1,2,3:5)" => result, response {
assert_eq!(result, Ok(()));
assert_eq!(response, b"1.0,2.0,3.0,5.0\n");
});
} | rust_cleaned_test_functions.jsonl/82174 | {
"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,
29418,
2019,
368,
341,
286,
2266,
10297,
3773,
11,
3483,
317,
286,
9026,
2895,
10297,
3773,
11,
293,
61593,
3926,
2668,
3846,
30,
320,
16,
11,
17,
11,
18,
25,
20,
9940,
589,
1102,
11,
2033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cd() {
let (_tmp, path) = tmpdir("test-glob");
cd(&path);
cd(cwd());
let old = cwd();
assert!(cwd() == old);
mkdir(old.clone() + "/foo");
cd(old.clone() + "/foo");
assert!(cwd() == old + "/foo");
} | rust_cleaned_test_functions.jsonl/74392 | {
"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,
43074,
368,
341,
220,
1077,
5453,
5173,
11,
1815,
8,
284,
4174,
3741,
445,
1944,
2371,
1684,
797,
220,
15307,
2099,
2343,
317,
220,
15307,
1337,
6377,
1423,
220,
1077,
2310,
284,
46938,
543,
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_mut_interval_iter() {
let mut m_lower = TreeMap::new();
let mut m_upper = TreeMap::new();
for i in range(1, 100) {
assert!(m_lower.insert(i * 2, i * 4));
assert!(m_upper.insert(i * 2, i * 4));
}
for i in range(1, 199) {
... | rust_cleaned_test_functions.jsonl/67251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
20541,
11723,
368,
341,
286,
1077,
5206,
296,
30425,
284,
76883,
486,
931,
543,
286,
1077,
5206,
296,
34445,
284,
76883,
486,
931,
543,
286,
369,
600,
304,
2088,
7,
16,
11,
220,
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... | 4 |
#[test]
fn test_can_resume_to() {
assert!(TLS13_CHACHA20_POLY1305_SHA256.can_resume_to(&TLS13_AES_128_GCM_SHA256));
assert!(!TLS13_CHACHA20_POLY1305_SHA256.can_resume_to(&TLS13_AES_256_GCM_SHA384));
assert!(
!TLS13_CHACHA20_POLY1305_SHA256
.can_resume_to(&TLS_... | rust_cleaned_test_functions.jsonl/3964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
58132,
2346,
368,
341,
286,
2060,
10297,
45439,
16,
18,
6466,
11873,
32,
17,
15,
33165,
56,
16,
18,
15,
20,
38096,
17,
20,
21,
27399,
58132,
2346,
2099,
45439,
16,
18,
69381,
62,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_forks_with_set_root() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let mut banks = vec![Arc::new(Bank::new(&genesis_config))];
assert_eq!(banks[0].slot(), 0);
let mut bank_forks = BankForks::new_from_banks(&banks, 0);
... | rust_cleaned_test_functions.jsonl/30582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
761,
73302,
6615,
2602,
12993,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
317,
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... | 1 |
#[test]
fn test_networks_config_get() {
let networks_config = get_test_networks_config();
let network = networks_config.get("localhost").unwrap();
let correct_network = get_test_localhost_network();
assert_eq!(network, correct_network);
} | rust_cleaned_test_functions.jsonl/39541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
82,
5332,
3062,
368,
341,
286,
1077,
14155,
5332,
284,
633,
4452,
20966,
82,
5332,
543,
286,
1077,
3922,
284,
14155,
5332,
670,
445,
8301,
1827,
15454,
543,
286,
1077,
4396,
20966,
284,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_der_implicit_long_tag() {
let empty = &b""[..];
let bytes = [0x5f, 0x52, 0x04, 0x70, 0x61, 0x73, 0x73];
let expected = DerObject {
header: BerObjectHeader::new(BerClass::Application, 0, BerTag(0x52), 4)
.with_raw_tag(Some(&[0x5f, 0x52])),
content: BerObjec... | rust_cleaned_test_functions.jsonl/45883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
62,
30940,
17799,
9372,
368,
341,
262,
1077,
4287,
284,
609,
65,
3014,
95874,
935,
262,
1077,
5820,
284,
508,
15,
87,
20,
69,
11,
220,
15,
87,
20,
17,
11,
220,
15,
87,
15,
19,
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_request_serialize_str() {
let expected = r#"{"id":"1","method":"login","jsonrpc":"2.0","params":null}"#;
let rpc = RpcRequest {
id: JsonId::StrId(String::from("1")),
method: String::from("login"),
jsonrpc: String::from("2.0"),
params: None,
};
let json_actual = serde_json::to... | rust_cleaned_test_functions.jsonl/49209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
88686,
2895,
368,
341,
197,
10217,
3601,
284,
435,
55543,
4913,
307,
3252,
16,
2198,
4393,
3252,
3673,
2198,
2236,
29414,
3252,
17,
13,
15,
2198,
3519,
788,
2921,
9863,
2,
280,
197,
10217,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_known_introspection_queries() {
// this only makes sure KNOWN_INTROSPECTION_QUERIES get created correctly.
// thus preventing regressions if a wrong query is added
// to the `well_known_introspection_queries` folder
let _ = &*KNOWN_INTROSPECTION_QUERIES;
} | rust_cleaned_test_functions.jsonl/10537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71690,
4042,
3630,
16076,
65588,
368,
341,
286,
442,
419,
1172,
3643,
2704,
31292,
7583,
9161,
33439,
1740,
3580,
16332,
640,
5369,
633,
3465,
12440,
624,
286,
442,
8450,
26160,
69780,
908,
421,
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_eval_issue_2() {
assert_eq!(eval("2 * (4 + 0) + 4"), Ok(to_value(12)));
assert_eq!(eval("2 * (2 + 2) + (1 + 3)"), Ok(to_value(12)));
assert_eq!(eval("2 * (4) + (4)"), Ok(to_value(12)));
} | rust_cleaned_test_functions.jsonl/28449 | {
"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,
21296,
53340,
62,
17,
368,
341,
286,
2060,
10714,
10297,
14170,
445,
17,
353,
320,
19,
488,
220,
15,
8,
488,
220,
19,
3975,
7622,
12186,
3142,
7,
16,
17,
4945,
286,
2060,
10714,
10297,
14170,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_segment_coordinates() {
let ship = Ship::new(Coordinates { x: 0, y: 0 }, Heading::East, 2);
let segments = ship.get_segment_coordinates();
assert_eq!(segments[0].x, 0);
assert_eq!(segments[0].y, 0);
assert_eq!(segments[1].x, 1);
assert_eq!(segm... | rust_cleaned_test_functions.jsonl/99680 | {
"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,
3062,
28061,
50084,
368,
341,
286,
1077,
8284,
284,
26803,
486,
931,
3025,
78,
8742,
314,
856,
25,
220,
15,
11,
379,
25,
220,
15,
2470,
51349,
486,
36340,
11,
220,
17,
317,
286,
1077,
20632,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_routes() {
assert!(builds_route_ok(&[(1, 2, 1, 10), (2, 1, 123, 5)], &[(2, 1)]));
assert!(builds_route_ok(
&[
(1, 2, 1, 10),
(2, 1, 123, 5),
(1, 3, 2, 10),
(3, 1, 133, 1),
(2, 3, 7, ... | rust_cleaned_test_functions.jsonl/13247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
64314,
368,
341,
286,
2060,
10297,
5834,
82,
28109,
19817,
2099,
9697,
16,
11,
220,
17,
11,
220,
16,
11,
220,
16,
15,
701,
320,
17,
11,
220,
16,
11,
220,
16,
17,
18,
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 |
#[test]
fn test_flat_take() {
let empty = &b""[..];
assert_eq!(parse_ber_bool(&[0x01, 0x01, 0xff]), Ok((empty, BerObject::from_obj(BerObjectContent::Boolean(true)))));
assert_eq!(parse_ber_bool(&[0x01, 0x01, 0x00]), Ok((empty, BerObject::from_obj(BerObjectContent::Boolean(false)))));
assert_eq!(... | rust_cleaned_test_functions.jsonl/73524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49556,
73261,
368,
341,
262,
1077,
4287,
284,
609,
65,
3014,
95874,
935,
262,
2060,
10714,
10297,
6400,
88165,
22159,
2099,
58,
15,
87,
15,
16,
11,
220,
15,
87,
15,
16,
11,
220,
15,
9020,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lifetime() {
check(
r#"
macro_rules! m {
($lt:lifetime) => { struct Ref<$lt>{ s: &$ lt str } }
}
m! {'a}
"#,
expect![[r#"
macro_rules! m {
($lt:lifetime) => { struct Ref<$lt>{ s: &$ lt str } }
}
struct Ref<'a> {
s: &'a str
}
"#]],
);
} | rust_cleaned_test_functions.jsonl/85249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98827,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
4832,
88397,
28515,
8,
589,
314,
2036,
8550,
35887,
4832,
7309,
274,
25,
26950,
25175,
607,
335,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simplify_and_true() {
let expr_a = lit(true).and(col("c2"));
let expr_b = col("c2").and(lit(true));
let expected = col("c2");
assert_eq!(simplify(&expr_a), expected);
assert_eq!(simplify(&expr_b), expected);
} | rust_cleaned_test_functions.jsonl/19678 | {
"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,
643,
70206,
8378,
16082,
368,
341,
286,
1077,
15169,
4306,
284,
13020,
3715,
568,
437,
19611,
445,
66,
17,
4010,
286,
1077,
15169,
880,
284,
1375,
445,
66,
17,
1827,
437,
2333,
275,
3715,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sgemm() {
let x = vec![1., 2., 3., 4.];
let y = vec![1., 2., 3., 4.];
let mut z = uninitialized_vec::<f32>(4);
cblas_sgemm_wrapper(
false,
false,
2, // m
2, // n
2, // k
1., // alpha
x.as_ptr(),
y.as_ptr(), //... | rust_cleaned_test_functions.jsonl/189 | {
"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,
643,
34103,
76,
368,
341,
262,
1077,
856,
284,
7486,
20703,
16,
2572,
220,
17,
2572,
220,
18,
2572,
220,
19,
13,
5265,
715,
262,
1077,
379,
284,
7486,
20703,
16,
2572,
220,
17,
2572,
220,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_css_color_13() {
assert_eq!(parse_css_color("rgb(10)"), Err(CssColorParseError::MissingColorComponent(CssColorComponent::Green)));
} | rust_cleaned_test_functions.jsonl/37108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
6714,
62,
16,
18,
368,
341,
286,
2060,
10714,
10297,
6400,
25924,
6714,
445,
16509,
7,
16,
15,
8,
3975,
15495,
3025,
778,
1636,
14463,
1454,
486,
25080,
1636,
2189,
3025,
778,
1636... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_contains() {
Python::with_gil(|py| {
let mut v = HashMap::new();
v.insert(7, 32);
let ob = v.to_object(py);
let dict = <PyDict as PyTryFrom>::try_from(ob.as_ref(py)).unwrap();
assert!(dict.contains(7i32).unwrap());
a... | rust_cleaned_test_functions.jsonl/7719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
5206,
348,
284,
10528,
486,
931,
543,
310,
348,
7030,
7,
22,
11,
220,
18,
17,
317,
310,
1077,
1508,
284,
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_struct_shadow_map2_d_data_std140() {
assert_eq!(std::mem::size_of::<ShadowMap2DDataStd140>(), 96);
assert_eq!(std::mem::size_of::<[f32; 2]>(), 8);
assert_eq!(std::mem::align_of::<[f32; 2]>(), 4);
assert_eq!(memoffset::offset_of!(ShadowMap2DDataStd140, uv_min), 0);... | rust_cleaned_test_functions.jsonl/50168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 647
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
53120,
5376,
17,
814,
1769,
15656,
16,
19,
15,
368,
341,
286,
2060,
10714,
10297,
1834,
486,
10536,
486,
2141,
3575,
27638,
23667,
2227,
17,
35,
1043,
22748,
16,
19,
15,
39019,
220,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_payable() {
let s = to_chars("payable");
let cur = &mut 0;
expect_next_token(&s, cur, Token::Payable);
} | rust_cleaned_test_functions.jsonl/21079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28925,
480,
368,
341,
286,
1077,
274,
284,
311,
37418,
445,
13890,
480,
797,
286,
1077,
2847,
284,
609,
6984,
220,
15,
280,
286,
1720,
11257,
6458,
2099,
82,
11,
2847,
11,
9660,
486,
20595,
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 |
#[test]
fn test_into_iter_as_mut_slice() {
let vec = vec!['a', 'b', 'c'];
let mut into_iter = vec.into_iter();
assert_eq!(into_iter.as_slice(), &['a', 'b', 'c']);
into_iter.as_mut_slice()[0] = 'x';
into_iter.as_mut_slice()[1] = 'y';
assert_eq!(into_iter.next().unwrap(), 'x');
assert_... | rust_cleaned_test_functions.jsonl/24439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
11898,
29523,
26488,
368,
341,
262,
1077,
7486,
284,
7486,
0,
677,
64,
516,
364,
65,
516,
364,
66,
3860,
262,
1077,
5206,
1119,
11723,
284,
7486,
39860,
11723,
543,
262,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xtpl_e() {
let tpl_xp = xtpl_e(pbxz(), a24plus(), a24minus(), EB - 1);
let x = affine_x(tpl_xp);
let tpl_p = tpl_k((a(), b()), pbxy(), EB - 1);
assert_eq!(x, tpl_p.0)
} | rust_cleaned_test_functions.jsonl/11568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60069,
500,
2204,
368,
341,
262,
1077,
60979,
3212,
79,
284,
856,
12620,
2204,
1295,
21861,
89,
1507,
264,
17,
19,
7138,
1507,
264,
17,
19,
38365,
1507,
49142,
481,
220,
16,
317,
262,
1077,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_duplicate_operator() {
let mut tree = Tree {
raw: "5 + + 5".to_owned(),
..Default::default()
};
tree.parse_pos().unwrap();
tree.parse_operators().unwrap();
assert_eq!(tree.parse_node(), Err(Error::DuplicateOperatorNode));
... | rust_cleaned_test_functions.jsonl/28445 | {
"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,
4096,
70434,
40594,
368,
341,
286,
1077,
5206,
4916,
284,
8942,
341,
310,
7112,
25,
330,
20,
488,
488,
220,
20,
3263,
983,
51973,
3148,
310,
5241,
3675,
486,
2258,
741,
286,
3634,
286,
4916,
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_0698_example_2() {
let nums = vec![1, 2, 3, 4];
let k = 3;
let result = false;
assert_eq!(Solution::can_partition_k_subsets(nums, k), result);
} | rust_cleaned_test_functions.jsonl/121067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
21,
24,
23,
39304,
62,
17,
368,
341,
286,
1077,
10307,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
595,
284,
220,
18,
280,
286,
1077,
1102,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_block_sequence_start() {
let s = "
key:
- item 1
- item 2
";
let mut p = Scanner::new(s.chars());
next!(p, StreamStart(..));
next!(p, BlockMappingStart);
next!(p, Key);
next_scalar!(p, TScalarStyle::Plain, "key");
next!(p, Value);
... | rust_cleaned_test_functions.jsonl/91009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
7113,
23735,
4906,
368,
341,
286,
1077,
274,
284,
6228,
792,
510,
12,
1509,
220,
16,
198,
12,
1509,
220,
17,
198,
876,
286,
1077,
5206,
281,
284,
17170,
486,
931,
1141,
85062,
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_or_with_one_not_eq_parse() {
let name1 = _random_string(10);
let value1 = _random_string(10);
let json = format!(r#"{{"$or":[{{"$not":{{"~{}":"{}"}}}}]}}"#, name1, value1);
let query = parse_from_json(&json).unwrap();
let expected = Operator::Or(
... | rust_cleaned_test_functions.jsonl/11853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
11667,
7913,
10714,
21039,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
2951,
284,
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_ignore_blacklist() {
fn is_skipped(db: &Database, ex: &str, krate: &str) -> bool {
let crates: Vec<Crate> = db
.query(
"SELECT crate FROM experiment_crates WHERE experiment = ?1 AND skipped = 0",
&[&ex],
... | rust_cleaned_test_functions.jsonl/74500 | {
"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,
58493,
40272,
1607,
368,
341,
286,
5168,
374,
33811,
6450,
9791,
25,
609,
5988,
11,
505,
25,
609,
495,
11,
595,
7698,
25,
609,
495,
8,
1464,
1807,
341,
310,
1077,
81720,
25,
11312,
20373,
7698... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_words() {
let data = "\n \tMäry häd\tä little lämb\nLittle lämb\n";
let words: Vec<&str> = data.words().collect();
assert_eq!(words, vec!["Märy", "häd", "ä", "little", "lämb", "Little", "lämb"])
} | rust_cleaned_test_functions.jsonl/2475 | {
"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,
18981,
368,
341,
286,
1077,
821,
284,
2917,
77,
1124,
83,
44,
2305,
884,
256,
305,
30875,
4955,
2305,
220,
2632,
30005,
3096,
1699,
38103,
30005,
3096,
1699,
876,
286,
1077,
4244,
25,
11312,
522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sig() {
verify_signature("I am attesting that this Twitter handle @BihelSimon is linked to the Tezos account tz1giDGsifWB9q9siekCKQaJKrmC9da5M43J.\n\n", &jwk_from_tezos_key("edpkvRWhuk5cLe5vwR7TGfSJxVLmVDk5og45WAhsAAvfqQXmYKNPve").unwrap(), "edsigtvJYvymTLaGPwbwcmtcfNNGcrSFtGNUWuXgwHXM52EU8z... | rust_cleaned_test_functions.jsonl/76524 | {
"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,
29252,
368,
341,
262,
10146,
39859,
445,
40,
1079,
1619,
59855,
429,
419,
6271,
3705,
569,
33,
6996,
301,
68781,
374,
10592,
311,
279,
2655,
53701,
2692,
42528,
16,
8212,
53725,
82,
333,
52868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_remove_zero_balance_accounts() {
solana_logger::setup();
let key = Pubkey::new_unique();
let hash = Hash::new_unique();
let account_maps: DashMap<Pubkey, CalculateHashIntermediate> = DashMap::new();
let val = CalculateHashIntermediate::new(0, h... | rust_cleaned_test_functions.jsonl/115973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
18193,
19359,
29396,
55665,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5175,
284,
6531,
486,
931,
21218,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_checked_add() {
for elm in sum_triples.iter() {
let (aVec, bVec, cVec) = *elm;
let a = BigInt::from_slice(Plus, aVec);
let b = BigInt::from_slice(Plus, bVec);
let c = BigInt::from_slice(Plus, cVec);
assert!(a.checked_add(&b).un... | rust_cleaned_test_functions.jsonl/96928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56456,
2891,
368,
341,
286,
369,
42205,
304,
2629,
3547,
37458,
19471,
368,
341,
310,
1077,
320,
64,
10050,
11,
293,
10050,
11,
272,
10050,
8,
284,
353,
23162,
280,
310,
1077,
264,
284,
62608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_merge_catch_up_logs_no_need() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
cluster.cfg.raft_store.raft_base_tick_interval = ReadableDuration::millis(10);
cluster.cfg.raft_store.raft_election_timeout_ticks = 25;
cluster.cfg.raft_store.raf... | rust_cleaned_test_functions.jsonl/10779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1057
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
666,
754,
8237,
42899,
6536,
71506,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
10652,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize_snapshot_data_file_under_limit() {
let temp_dir = tempfile::TempDir::new().unwrap();
let expected_consumed_size = size_of::<u32>() as u64;
let consumed_size = serialize_snapshot_data_file_capped(
&temp_dir.path().join("data-file"),
expect... | rust_cleaned_test_functions.jsonl/53292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
53265,
1769,
2458,
58228,
14763,
368,
341,
286,
1077,
2730,
4334,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
3601,
69870,
291,
2368,
284,
1379,
3575,
27638,
84,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_apply_to_appendable() {
let dir = TempDir::new("segment_dir").unwrap();
let segment1 = build_segment_1(dir.path());
let mut segment2 = build_segment_2(dir.path());
segment2.appendable_flag = false;
let mut holder = SegmentHolder::default();
let... | rust_cleaned_test_functions.jsonl/115812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
2346,
26041,
480,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
23169,
4334,
1827,
15454,
1428,
286,
1077,
10238,
16,
284,
1936,
28061,
62,
16,
14161,
3875,
1423,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_tikv_config() {
let mut cfg = TiKvConfig::default();
let default_region_split_check_diff = cfg.raft_store.region_split_check_diff.0;
cfg.raft_store.region_split_check_diff.0 += 1;
assert!(cfg.validate().is_ok());
assert_eq!(
cfg.raft_s... | rust_cleaned_test_functions.jsonl/2167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 568
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
528,
1579,
85,
5332,
368,
341,
286,
1077,
5206,
13286,
284,
22325,
42,
85,
2648,
486,
2258,
543,
286,
1077,
1638,
20627,
17052,
7200,
15850,
284,
13286,
13,
2944,
14809,
42976,
17052,
7200,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unicode_anagrams() {
let inputs = ["ΒΓΑ", "ΒΓΔ", "γβα"];
let outputs: Vec<&str> = vec!["ΒΓΑ", "γβα"];
assert_eq!(anagram::anagrams_for("ΑΒΓ", &inputs), outputs);
} | rust_cleaned_test_functions.jsonl/65511 | {
"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,
54662,
12008,
68772,
368,
341,
1066,
262,
1077,
11127,
284,
4383,
144946,
145281,
144842,
497,
330,
144946,
145281,
144665,
497,
330,
59374,
51255,
18945,
6332,
262,
1077,
16275,
25,
11312,
52244,
495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_locked_out_child() {
let mut tower = Tower::new(EpochStakes::new_for_tests(2), 0, 0.67);
let descendants = vec![(0, vec![1].into_iter().collect())]
.into_iter()
.collect();
tower.record_vote(0, Hash::default());
assert!(!tower.is_locked_... | rust_cleaned_test_functions.jsonl/113941 | {
"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,
6892,
60271,
6068,
17268,
368,
341,
286,
1077,
5206,
21271,
284,
21938,
486,
931,
10722,
79,
4953,
623,
2050,
486,
931,
5478,
32509,
7,
17,
701,
220,
15,
11,
220,
15,
13,
21,
22,
317,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resume_aot_2_asm() {
resume_aot_2_asm(VERSION1, 8126917);
resume_aot_2_asm(VERSION0, 8126917);
} | rust_cleaned_test_functions.jsonl/82890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58132,
4306,
354,
62,
17,
67529,
368,
341,
262,
15688,
4306,
354,
62,
17,
67529,
7,
17636,
16,
11,
220,
23,
16,
17,
21,
24,
16,
22,
317,
262,
15688,
4306,
354,
62,
17,
67529,
7,
17636,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_root() {
let e = List::empty();
match *e.root() {
Nil => {},
_ => assert!(false),
};
let e = e.cons(1);
match *e.root() {
Nil => assert!(false),
_ => {},
};
} | rust_cleaned_test_functions.jsonl/40675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
368,
341,
286,
1077,
384,
284,
1759,
486,
3194,
543,
286,
2432,
353,
68,
12576,
368,
341,
310,
32274,
589,
14573,
310,
716,
589,
2060,
10297,
3849,
1326,
286,
2605,
286,
1077,
384,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_serialize_panic() {
// create with a body which is below the minimum length
let mut buf = [0u8; ETHERNET_MIN_FRAME_LEN - 1];
let mut b = [&mut buf[..]];
let buf = b.as_fragmented_byte_slice();
let (head, body, foot) = buf.try_split_contiguous(ETHERNET_HDR_... | rust_cleaned_test_functions.jsonl/35170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
620,
31270,
368,
341,
286,
442,
1855,
448,
264,
2487,
892,
374,
3685,
279,
8028,
3084,
198,
286,
1077,
5206,
6607,
284,
508,
15,
84,
23,
26,
17768,
3012,
15373,
11820,
22260,
15536,
481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signature_is_eligible() {
// eligible signature
let sig = Signature::from_slice_unchecked(&[
172, 29, 85, 219, 118, 44, 107, 32, 219, 253, 25, 242, 53, 45, 111, 62, 102, 130, 24,
8, 222, 199, 34, 120, 166, 163, 223, 229, 100, 50, 252, 244, 250, 88, 196, 15... | rust_cleaned_test_functions.jsonl/6145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 514
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
6892,
21602,
343,
1238,
368,
341,
286,
442,
17013,
11957,
198,
286,
1077,
8366,
284,
32232,
486,
1499,
26488,
4907,
7549,
2099,
9640,
310,
220,
16,
22,
17,
11,
220,
17,
24,
11,
220,
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_asciidoc_timestamp() {
assert_eq!(asciidoc_timestamp("2016-10-27 15:14:07.704374171 UTC"),
"2016-10-27-15-14-07-704374171-utc")
} | rust_cleaned_test_functions.jsonl/114722 | {
"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,
88474,
54483,
509,
23073,
368,
341,
262,
2060,
10714,
10297,
5061,
54483,
509,
23073,
445,
17,
15,
16,
21,
12,
16,
15,
12,
17,
22,
220,
16,
20,
25,
16,
19,
25,
15,
22,
13,
22,
15,
19,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_view_function_when_no_scope() {
let parsed_file = syn::parse_file(_FILE_WITH_ROUTES_AND_MODEL,).unwrap();
let model = find_model(&parsed_file,);
let result = get_view_function("", "not_found", &model.unwrap(),);
let should_have = NOT_FOUND;
assert_e... | rust_cleaned_test_functions.jsonl/15084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7122,
9174,
47636,
6536,
23199,
368,
341,
286,
1077,
15676,
2458,
284,
6782,
486,
6400,
2458,
2490,
6041,
23929,
8302,
53785,
21767,
27551,
11,
568,
15454,
543,
286,
1077,
1614,
284,
1477,
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_ASL_zeropage_with_carry() {
let code = vec![0x06, 0x07];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
memory.set(0x07, 0x84);
nes.next(&mut memory).unwrap();
assert_eq!(0x08, memory.get(0x07 as usize));
assert_eq!(0, nes.... | rust_cleaned_test_functions.jsonl/38693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1566,
7984,
6415,
261,
453,
424,
6615,
666,
11433,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
87,
15,
21,
11,
220,
15,
87,
15,
22,
4821,
286,
1077,
5206,
308,
288,
284,
356,
5584,
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_save_restore_position() {
let (saved_x, saved_y) = position().unwrap();
execute!(
stdout(),
SavePosition,
MoveTo(saved_x + 1, saved_y + 1),
RestorePosition
)
.unwrap();
let (x, y) = position().unwrap();
... | rust_cleaned_test_functions.jsonl/13976 | {
"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,
15376,
62677,
9661,
368,
341,
286,
1077,
320,
32702,
3212,
11,
6781,
4178,
8,
284,
2309,
1005,
15454,
1428,
286,
9026,
33673,
310,
20075,
3148,
310,
10255,
3812,
345,
310,
14561,
1249,
14217,
3212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_headline_invalid() {
let src = "
// Package foo does a thing.
package foo
// F is a function.
f = () => 1
";
let loc = Locator::new(&src[..]);
assert_docs_full(
src,
PackageDoc {
pat... | rust_cleaned_test_functions.jsonl/9993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
13138,
1056,
31433,
368,
341,
286,
1077,
2286,
284,
6228,
286,
442,
16906,
15229,
1558,
264,
3166,
624,
286,
6328,
15229,
271,
286,
442,
434,
374,
264,
729,
624,
286,
282,
284,
1719,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_caps() {
let mut builder = Path::builder();
builder.move_to(point(1.0, 0.0));
builder.move_to(point(2.0, 0.0));
builder.move_to(point(3.0, 0.0));
let path = builder.build();
test_path(
path.as_slice(),
&StrokeOptions::default().with_line_cap(LineC... | rust_cleaned_test_functions.jsonl/117060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
52955,
368,
341,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
1428,
262,
7363,
13635,
2346,
20235,
7,
16,
13,
15,
11,
220,
15,
13,
15,
1106,
262,
7363,
13635,
2346,
20235,
7,
17,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_small_hamming_distance_in_the_middle_somewhere() {
assert_eq!(dna::hamming_distance("GGACG", "GGTCG").unwrap(), 1);
} | rust_cleaned_test_functions.jsonl/52078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31966,
1523,
309,
5311,
19464,
1243,
16068,
62580,
643,
316,
60652,
368,
341,
262,
2060,
10714,
10297,
92877,
486,
5604,
5311,
19464,
445,
22254,
1706,
38,
497,
330,
22254,
7749,
38,
1827,
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 |
#[test]
fn test_untagged_enum() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
enum Untagged {
A { a: u8 },
B { b: u8 },
C,
D(u8),
E(String),
F(u8, u8),
}
assert_tokens(
&Untagged::A { a: 1 },
&[
... | rust_cleaned_test_functions.jsonl/102278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1008
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3850,
96476,
31054,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
39900,
11,
48440,
5563,
262,
11506,
47024,
7,
3850,
96476,
5563,
262,
7618,
15098,
96476,
341,
286,
362,
314,
264,
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_process_make_credential_unsupported_algorithm() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
let mut make_credential_params = create_minimal_make_credential_pa... | rust_cleaned_test_functions.jsonl/35309 | {
"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,
11305,
28230,
666,
30320,
4907,
18216,
59531,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
7,
1423,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sample_and_hold_useful() {
let spec = "input x: UInt8\noutput y: UInt8 @1Hz := x.hold().defaults(to: 0)";
assert_eq!(0, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
8378,
65824,
15951,
1262,
368,
341,
286,
1077,
1398,
284,
330,
1355,
856,
25,
22275,
23,
1699,
3006,
379,
25,
22275,
23,
569,
16,
11475,
1669,
856,
860,
813,
1005,
26756,
12186,
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 |
#[test]
fn test_query_captures_with_duplicates() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
r#"
(variable_declarator
name: (identifier) @function
value: (function)... | rust_cleaned_test_functions.jsonl/25188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
666,
2689,
1413,
6615,
75051,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
4128,
345,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_partial_isa_two_rule() -> TestResult {
let p = Polar::new();
p.load_str(
r#"f(x: Post) if x.foo = 0 and g(x);
f(x: User) if x.bar = 1 and g(x);
g(x: Post) if x.post = 1;
g(x: PostSubclass) if x.post_subclass = 1;
... | rust_cleaned_test_functions.jsonl/63009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1018
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
6892,
64,
23241,
21124,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
1006,
310,
435,
55543,
69,
2075,
25,
3877,
8,
421,
856,
58432,
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... | 4 |
#[test]
fn test_urdf_viz_web_client_config_debug() {
let config = UrdfVizWebClientConfig {
name: "test".to_owned(),
joint_names: vec!["j1".to_owned(), "j2".to_owned()],
wrap_with_joint_velocity_limiter: true,
joint_velocity_limits: vec![1.0, 2.0],
};
assert_eq!(
... | rust_cleaned_test_functions.jsonl/119542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64879,
2940,
2273,
449,
25960,
8179,
5332,
15446,
368,
341,
262,
1077,
2193,
284,
16809,
2940,
53,
449,
5981,
2959,
2648,
341,
286,
829,
25,
330,
1944,
3263,
983,
51973,
3148,
286,
10284,
9187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_input_output() {
let mut interpreter = IntCodeInterpreter::new();
interpreter.set_pipe_mode(true);
interpreter.reset(&vec![3, 0, 4, 0, 99]);
interpreter.add_input(14);
interpreter.run();
assert_eq!(interpreter.memory(), &[14, 0, 4, 0, 99]);
... | rust_cleaned_test_functions.jsonl/42128 | {
"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,
34729,
5898,
7645,
368,
341,
286,
1077,
5206,
39299,
284,
1333,
2078,
58426,
486,
931,
543,
286,
39299,
980,
41862,
7302,
3715,
317,
286,
39299,
13857,
2099,
4083,
20703,
18,
11,
220,
15,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_necessary_dangling_else() {
test(
"if (x) if (y){ y(); z() } else; else x()",
"if (x) { if(y) { y(); z() } } else x()",
);
} | rust_cleaned_test_functions.jsonl/114460 | {
"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,
1089,
20122,
814,
90104,
62628,
368,
341,
262,
1273,
1006,
286,
330,
333,
320,
87,
8,
421,
320,
88,
6098,
379,
2129,
1147,
368,
335,
770,
26,
770,
856,
368,
756,
286,
330,
333,
320,
87,
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 |
#[test]
fn test_region_append() {
let mut region = Region::new(RegionType::CacheFast);
let tag = BlobIoTag::User(BlobIoSegment {
offset: 0x1800,
len: 0x1800,
});
region.append(0x1000, 0x2000, tag, None).unwrap();
assert_eq!(region.status, RegionSt... | rust_cleaned_test_functions.jsonl/130990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 877
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20627,
26041,
368,
341,
286,
1077,
5206,
5537,
284,
17152,
486,
931,
7,
14091,
929,
486,
8233,
32174,
626,
286,
1077,
4772,
284,
49439,
42799,
5668,
486,
1474,
5349,
1684,
42799,
21086,
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_deletequeue() {
let delete_queue = DeleteQueue::new();
let make_op = |i: usize| {
let field = Field::from_field_id(1u32);
DeleteOperation {
opstamp: i as u64,
term: Term::from_field_u64(field, i as u64),
}
... | rust_cleaned_test_functions.jsonl/72702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 888
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
4584,
368,
341,
286,
1077,
3698,
10841,
284,
10428,
7554,
486,
931,
1428,
286,
1077,
1281,
10287,
284,
760,
72,
25,
22301,
91,
341,
310,
1077,
2070,
284,
8601,
486,
1499,
5013,
842,
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_arithmetic_function() -> Result<()> {
let tests = vec![
("+", ScalarFunctionTest {
name: "add-int64-passed",
columns: vec![
Series::from_data(vec![4i64, 3, 2, 1]),
Series::from_data(vec![1i64, 2, 3, 4]),
],
... | rust_cleaned_test_functions.jsonl/28354 | {
"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,
25842,
25922,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
3489,
44056,
35176,
5152,
2271,
341,
310,
829,
25,
330,
718,
20052,
21,
19,
46967,
291,
756,
310,
8147,
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... | 3 |
#[test]
fn test_parse_request() {
let _ = pretty_env_logger::try_init();
let mut raw = BytesMut::from("GET /echo HTTP/1.1\r\nHost: hyper.rs\r\n\r\n");
let mut method = None;
let msg = Server::parse(
&mut raw,
ParseContext {
cached_headers: ... | rust_cleaned_test_functions.jsonl/7657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
7893,
368,
341,
286,
1077,
716,
284,
5020,
15879,
27413,
486,
1539,
6137,
543,
286,
1077,
5206,
7112,
284,
30024,
51440,
486,
1499,
445,
3806,
608,
3047,
10130,
14,
16,
13,
16,
12016,
169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.