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_rstar_network_large_push() {
solana_logger::setup();
let mut network = rstar_network_create(4000);
let thread_pool = build_gossip_thread_pool();
network_simulator(&thread_pool, &mut network, 0.9);
} | rust_cleaned_test_functions.jsonl/2402 | {
"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,
1710,
11870,
20966,
45228,
14218,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1077,
5206,
3922,
284,
435,
11870,
20966,
8657,
7,
19,
15,
15,
15,
317,
262,
1077,
4516,
15709,
284,
193... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_stage() {
let mut c = Compiler::new().unwrap();
let result = c.compile_into_spirv(
VOID_MAIN,
ShaderKind::InferFromSource,
"shader.glsl",
"main",
None,
);
assert!(result.is_err());
a... | rust_cleaned_test_functions.jsonl/41074 | {
"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,
4096,
31433,
35238,
368,
341,
286,
1077,
5206,
272,
284,
45631,
486,
931,
1005,
15454,
543,
286,
1077,
1102,
284,
272,
18922,
45514,
643,
5565,
85,
1006,
310,
59257,
32276,
345,
310,
34788,
10629,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shadow_variable() {
do_check(
r"
fn foo(x: String) {
let x : &str = &x<|>;
}",
&["x"],
);
} | rust_cleaned_test_functions.jsonl/12176 | {
"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,
53120,
14635,
368,
341,
286,
653,
7200,
1006,
310,
435,
698,
310,
5168,
15229,
2075,
25,
923,
8,
341,
394,
1077,
856,
549,
609,
495,
284,
609,
87,
27,
91,
10133,
310,
335,
756,
310,
609,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_file_is_newer_than_and_older_than_itself() {
// odd but matches GNU
new_ucmd!()
.args(&["regular_file", "-nt", "regular_file"])
.run()
.status_code(1);
new_ucmd!()
.args(&["regular_file", "-ot", "regular_file"])
.run()
.status_code(1);
... | rust_cleaned_test_functions.jsonl/11005 | {
"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,
2458,
6892,
5921,
261,
51613,
8378,
62,
2018,
51613,
14631,
721,
368,
341,
262,
442,
10322,
714,
9071,
4253,
198,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
22308,
2458,
497,
652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_urdf_viz_web_client_config_clone() {
let config1 = 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],
};
let config2 = co... | rust_cleaned_test_functions.jsonl/119543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64879,
2940,
2273,
449,
25960,
8179,
5332,
54742,
368,
341,
262,
1077,
2193,
16,
284,
16809,
2940,
53,
449,
5981,
2959,
2648,
341,
286,
829,
25,
330,
1944,
3263,
983,
51973,
3148,
286,
10284,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filtered_envs_for_deno() {
let dir = tempdir().unwrap();
let home = Home::new(dir.path()).unwrap();
let project_path = Path::new("/Users/project_path");
let network = get_test_localhost_network();
let user = UserContext::new(
TEST_USERNAME... | rust_cleaned_test_functions.jsonl/39543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 742
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
51429,
15879,
82,
5478,
814,
11790,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
2114,
284,
5379,
486,
931,
14161,
3875,
6011,
15454,
543,
286,
1077,
2390,
2638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aggregates_records() {
let arrays = [
Int32Array::from((0..100).collect::<Vec<_>>()),
Int32Array::from((0..50).collect::<Vec<_>>()),
Int32Array::from((200..500).collect::<Vec<_>>()),
];
let schema = Arc::new(Schema::new(vec![Field::new... | rust_cleaned_test_functions.jsonl/45135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1090
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
7998,
973,
31279,
368,
341,
286,
1077,
18386,
284,
2278,
310,
1333,
18,
17,
1857,
486,
1499,
1188,
15,
496,
16,
15,
15,
568,
17384,
27638,
10050,
32399,
2452,
14702,
310,
1333,
18,
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... | 2 |
#[test]
fn test_mock_with_fn_body() {
let _m = mock("GET", "/")
.with_body_from_fn(|w| {
w.write_all(b"hel")?;
w.write_all(b"lo")
})
.create();
let (_, _, body) = request("GET /", "");
assert_eq!("hello", body);
} | rust_cleaned_test_functions.jsonl/82399 | {
"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,
34134,
6615,
15246,
14114,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
1138,
286,
659,
4197,
14114,
5673,
15246,
22428,
86,
91,
341,
310,
289,
3836,
5705,
1883,
1,
49122,
899,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_modification_config_from_cmd_options() {
assert_eq!(
get_modification_config_from_cmd_options(
Some(vec!["Foo=Bar", "Baz=qux"]),
Some(vec!["Qux", "Quuz"]),
)
.unwrap(),
Modification {
repl... | rust_cleaned_test_functions.jsonl/76499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 499
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7480,
2404,
5332,
5673,
11684,
8743,
368,
341,
286,
2060,
10714,
33673,
310,
633,
7480,
2404,
5332,
5673,
11684,
8743,
1006,
394,
4329,
25592,
0,
1183,
40923,
28,
3428,
497,
330,
33,
1370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sysvar_keyed_account_to_from() {
let test_sysvar = TestSysvar::default();
let key = crate::keyed_account::tests::id();
let wrong_key = Pubkey::new_unique();
let account = create_account_for_test(&test_sysvar);
let test_sysvar = from_account::<TestSysvar, ... | rust_cleaned_test_functions.jsonl/39556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20344,
947,
3097,
291,
13500,
2346,
5673,
368,
341,
286,
1077,
1273,
20344,
947,
284,
3393,
32792,
947,
486,
2258,
543,
286,
1077,
1376,
284,
17717,
486,
792,
291,
13500,
486,
23841,
486,
307,
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_secret_redaction() {
let secret = ClientSecret::new("top_secret".to_string());
assert_eq!("ClientSecret([redacted])", format!("{:?}", secret));
} | rust_cleaned_test_functions.jsonl/12784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21962,
26058,
1311,
368,
341,
262,
1077,
6234,
284,
8423,
19773,
486,
931,
445,
3481,
21962,
3263,
983,
3904,
1423,
262,
2060,
10714,
17223,
2959,
19773,
2561,
1151,
22167,
2467,
497,
3561,
88928,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_scheme_apply() {
let s = Scheme {
vars: vec![String::from("a")],
t: Box::new(Type::Fun(
Box::new(Type::var("a")),
Box::new(Type::var("c")),
)),
};
let mut m = HashMap::new();
m.insert(String::from... | rust_cleaned_test_functions.jsonl/125811 | {
"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,
53293,
36551,
368,
341,
286,
1077,
274,
284,
43781,
341,
310,
19942,
25,
7486,
20703,
703,
486,
1499,
445,
64,
899,
1259,
310,
259,
25,
8261,
486,
931,
22498,
486,
30855,
1006,
394,
8261,
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_no_stderr_output() {
let res = CmdResult {
tmpd: None,
code: None,
success: true,
stdout: "".into(),
stderr: "".into(),
};
res.no_stderr();
res.no_stdout();
} | rust_cleaned_test_functions.jsonl/134007 | {
"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,
6536,
93033,
7645,
368,
341,
286,
1077,
592,
284,
40210,
2077,
341,
310,
4174,
67,
25,
2240,
345,
310,
2038,
25,
2240,
345,
310,
2393,
25,
830,
345,
310,
20075,
25,
44907,
18122,
3148,
310,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_validate_bad_transitions() {
let (graph, in0, _, mix) = simple_graph();
let req = SchedRequest { graph: &graph };
let mut sched = Scheduler::default();
sched.current_sched = 100;
sched.set_node_schedule(in0, 9);
sched.set_node_schedule(mix, 1);
... | rust_cleaned_test_functions.jsonl/66796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
34199,
7965,
5930,
368,
341,
286,
1077,
320,
4439,
11,
304,
15,
11,
8358,
6514,
8,
284,
4285,
14738,
543,
286,
1077,
4232,
284,
328,
2397,
1900,
314,
4771,
25,
609,
4439,
3634,
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_borrow_mut() {
use std::borrow::BorrowMut;
let mut a: SmallVec<[u32; 2]> = SmallVec::new();
a.push(1);
assert_eq!(a.borrow_mut(), [1]);
a.push(2);
assert_eq!(a.borrow_mut(), [1, 2]);
a.push(3);
assert_eq!(a.borrow_mut(), [1, 2, 3])... | rust_cleaned_test_functions.jsonl/88162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
7768,
29523,
368,
341,
286,
990,
1460,
486,
71141,
486,
33,
7768,
51440,
401,
286,
1077,
5206,
264,
25,
14994,
10050,
66746,
84,
18,
17,
26,
220,
17,
25669,
284,
14994,
10050,
486,
931,
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_process_push_old_version() {
let mut crds = Crds::default();
let mut push = CrdsGossipPush::default();
let mut ci = ContactInfo::new_localhost(&Pubkey::new_rand(), 0);
ci.wallclock = 1;
let value = CrdsValue::ContactInfo(ci.clone());
// push a new... | rust_cleaned_test_functions.jsonl/87048 | {
"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,
11305,
14218,
21108,
9438,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
5206,
4484,
284,
4553,
5356,
38,
41473,
16644,
486,
2258,
543,
286,
1077,
5206,
11825,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sanitization() {
let exporter = opentelemetry_prometheus::exporter()
.with_default_histogram_boundaries(vec![-0.5, 1.0])
.with_resource(Resource::new(vec![KeyValue::new(
"service.name",
"Test Service",
)]))
.init();
let meter = expo... | rust_cleaned_test_functions.jsonl/36941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 578
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87866,
275,
2022,
368,
341,
262,
1077,
57378,
284,
1179,
6817,
35958,
47877,
39705,
486,
1533,
261,
741,
286,
659,
4197,
9993,
68564,
19447,
5431,
25592,
0,
7609,
15,
13,
20,
11,
220,
16,
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_cost()
{
let gate = Kron::new(X::new(), H::new());
assert_eq!(gate.cost(), 201.0 + 104.0);
let gate = Kron::new(Kron::new(X::new(), H::new()), CX::new());
assert_eq!(gate.cost(), 201.0 + 104.0 + 1001.0);
} | rust_cleaned_test_functions.jsonl/34664 | {
"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,
15890,
741,
262,
341,
286,
1077,
18126,
284,
96560,
486,
931,
7644,
486,
931,
1507,
472,
486,
931,
1423,
286,
2060,
10714,
10297,
24601,
39166,
1507,
220,
17,
15,
16,
13,
15,
488,
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... | 1 |
#[test]
fn test_fail_too_deep() {
let src_data = b"(test) a [[]]";
let mut limits = yass_parser::ParserLimits::unlimited();
limits.max_depth = 1;
let expected_error = yass_parser::ParserError::TooDeep { pos: yass::Pos::new(0, 10) };
assert_eq!(yass_parser::parse(limits, src_data).unwrap_err(... | rust_cleaned_test_functions.jsonl/126507 | {
"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,
22121,
2346,
78,
87044,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
8,
264,
84507,
59757,
262,
1077,
5206,
13388,
284,
379,
395,
18517,
486,
6570,
94588,
486,
359,
18235,
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... | 1 |
#[test]
fn test_tx_ctx_metadata() {
let mut mock = Mock::default();
let mut ctx = mock.create_ctx();
ctx.with_tx(42, 888, mock::transaction(), |tx_ctx, _call| {
assert_eq!(tx_ctx.tx_index(), 42);
assert_eq!(tx_ctx.tx_size(), 888);
});
} | rust_cleaned_test_functions.jsonl/127990 | {
"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,
17805,
15147,
22220,
368,
341,
286,
1077,
5206,
7860,
284,
14563,
486,
2258,
543,
286,
1077,
5206,
5635,
284,
7860,
2520,
15147,
543,
286,
5635,
18164,
17805,
7,
19,
17,
11,
220,
23,
23,
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... | 1 |
#[test]
fn test_filter_reset() {
let mut ctx = ScmpFilterContext::new_filter(ScmpAction::KillThread).unwrap();
ctx.reset(ScmpAction::Allow).unwrap();
let action = ctx.get_filter_attr(ScmpFilterAttr::ActDefault).unwrap();
let expected_action: u32 = ScmpAction::Allow.to_native();... | rust_cleaned_test_functions.jsonl/66421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
18983,
368,
341,
286,
1077,
5206,
5635,
284,
2463,
1307,
5632,
1972,
486,
931,
8727,
7,
3326,
1307,
2512,
486,
53734,
6855,
568,
15454,
543,
286,
5635,
13857,
7,
3326,
1307,
2512,
486,
186... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arena_drop() {
let refcounter = Arc::new(());
let mut a = Arena::new();
for _ in 0..5 {
a.insert(refcounter.clone());
}
let i1 = a.insert(refcounter.clone());
for _ in 0..5 {
a.insert(refcounter.clone());
}
l... | rust_cleaned_test_functions.jsonl/30776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
30527,
29584,
368,
341,
286,
1077,
2053,
8292,
284,
19689,
486,
931,
7,
1423,
286,
1077,
5206,
264,
284,
27047,
486,
931,
543,
286,
369,
716,
304,
220,
15,
496,
20,
341,
310,
264,
7030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_list_null() {
let a =
create_list_array(&[Some(&[1, 2]), None, None, Some(&[3, 4]), None, None]);
let b =
create_list_array(&[Some(&[1, 2]), None, None, Some(&[3, 4]), None, None]);
test_equal(&a, &b, true);
let b = create_list_array(&[
... | rust_cleaned_test_functions.jsonl/24217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1012
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
15162,
368,
341,
286,
1077,
264,
4035,
310,
1855,
2019,
3858,
2099,
58,
8373,
2099,
58,
16,
11,
220,
17,
9719,
2240,
11,
2240,
11,
4329,
2099,
58,
18,
11,
220,
19,
9719,
2240,
11,
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_reject_proposal_during_region_split() {
let mut cluster = new_node_cluster(0, 3);
let pd_client = cluster.pd_client.clone();
pd_client.disable_default_operator();
cluster.run();
cluster.must_transfer_leader(1, new_peer(1, 1));
cluster.must_put(b"k", b"v");
// Pause o... | rust_cleaned_test_functions.jsonl/50878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 986
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
583,
21663,
32556,
814,
1677,
20627,
17052,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
1077,
7744,
8179,
284,
10652,
556,
67,
8179,
15997,
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... | 4 |
#[test]
fn test_fq2_mul_nonresidue() {
let mut rng = XorShiftRng::seed_from_u64(1231275789u64);
let nqr = Fq2::new(Fq::zero(), Fq::one());
println!("One: {:?}", Fq::one());
for _ in 0..1000 {
let mut a = Fq2::rand(&mut rng);
let mut b = a;
a ... | rust_cleaned_test_functions.jsonl/32340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
17,
24944,
21637,
416,
60607,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
16,
17,
18,
16,
17,
22,
20,
22,
23,
24,
84,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_generic_type() {
let source: &str = "vector<vector<string>, std::char_traits, int>";
let diag: RefCell<DiagContext> = RefCell::new(DiagContext::new());
let mut parser: Parser = Parser::new(
0, source, &diag
);
let ty: ConcreteType = pars... | rust_cleaned_test_functions.jsonl/118031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
41232,
1819,
368,
341,
286,
1077,
2530,
25,
609,
495,
284,
330,
3215,
24280,
4947,
8066,
1460,
486,
1762,
39693,
11,
526,
6734,
286,
1077,
39717,
25,
8550,
3599,
27,
21685,
351,
1972,
29,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hashmap() {
assert_changes!(
&HashMap::<i32, i32>::new(),
&HashMap::<i32, i32>::new(),
Unchanged,
);
assert_changes!(
&HashMap::new(),
&vec![(0, 1 as i32), (1, 2), (2, 3)]
.into_iter()
.collect::<HashMap<_, _>>(),
... | rust_cleaned_test_functions.jsonl/109516 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2186,
368,
341,
262,
2060,
47526,
33673,
286,
609,
18497,
27638,
72,
18,
17,
11,
600,
18,
17,
6831,
931,
3148,
286,
609,
18497,
27638,
72,
18,
17,
11,
600,
18,
17,
6831,
931,
3148,
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_clang_availability_attr() {
use ast::AvailabilityClause::*;
use ast::TypeSpecifier::Int;
use parser::declaration;
let env = &mut Env::with_clang();
let src = r#"int f __attribute__((availability(p1,introduced=1.2.3))) __attribute__((availability(p2,unavailable,replacement="... | rust_cleaned_test_functions.jsonl/107586 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6794,
524,
26173,
12535,
10422,
368,
341,
262,
990,
11763,
486,
51703,
28482,
56162,
262,
990,
11763,
486,
929,
87297,
486,
1072,
280,
262,
990,
6729,
486,
80383,
401,
262,
1077,
6105,
284,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alphabet() {
let expected = vec![
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
];
assert_eq!(expected, lower_case_alphabet().collect::<Vec<_>>());
} | rust_cleaned_test_functions.jsonl/28455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8418,
18485,
368,
341,
262,
1077,
3601,
284,
7486,
90515,
286,
364,
64,
516,
364,
65,
516,
364,
66,
516,
364,
67,
516,
364,
68,
516,
364,
69,
516,
364,
70,
516,
364,
71,
516,
364,
72,
516,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_builder() {
let resp = HttpResponse::Ok()
.header("X-TEST", "value")
.version(Version::HTTP_10)
.finish();
assert_eq!(resp.version(), Some(Version::HTTP_10));
assert_eq!(resp.status(), StatusCode::OK);
} | rust_cleaned_test_functions.jsonl/2945 | {
"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,
34729,
28532,
368,
341,
286,
1077,
9039,
284,
17580,
486,
11578,
741,
310,
659,
2708,
445,
55,
12,
10033,
497,
330,
957,
1138,
310,
659,
4366,
7,
5637,
486,
9230,
62,
16,
15,
340,
310,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_capacity() {
let db = Connection::open_in_memory().unwrap();
let cache = &db.cache;
let sql = "PRAGMA schema_version";
{
let mut stmt = db.prepare_cached(sql).unwrap();
assert_eq!(0, cache.len());
assert_eq!(0, stmt.query_r... | rust_cleaned_test_functions.jsonl/54423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 557
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
35603,
368,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
1077,
6500,
284,
609,
1999,
20087,
401,
286,
1077,
5704,
284,
330,
6480,
76168,
10802,
9438,
876,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gaps_are_handled() {
let mut index = HeightIndex::new();
let fifteen = Height::from(15);
let one_hundred = Height::from(100);
index.insert(fifteen, &12);
index.insert(one_hundred, &13);
let mut expected = vec![13];
assert_eq!(
... | rust_cleaned_test_functions.jsonl/5876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 833
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
2625,
56855,
23194,
832,
368,
341,
286,
1077,
5206,
1922,
284,
21432,
1552,
486,
931,
543,
286,
1077,
36655,
284,
21432,
486,
1499,
7,
16,
20,
317,
286,
1077,
825,
1523,
7114,
284,
21432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_schema_err() {
assert_eq!(error_message(&INVALID_SCHEMA.code_num), INVALID_SCHEMA.message);
assert_eq!(error_message(&INVALID_SCHEMA_SEQ_NO.code_num), INVALID_SCHEMA_SEQ_NO.message);
assert_eq!(error_message(&INVALID_SCHEMA_CREATION.code_num), INVALID_SCHEMA_CREATION.mess... | rust_cleaned_test_functions.jsonl/19313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25371,
9266,
368,
341,
286,
2060,
10714,
10297,
841,
6462,
2099,
46859,
46220,
10210,
4273,
701,
32269,
46220,
6698,
317,
286,
2060,
10714,
10297,
841,
6462,
2099,
46859,
46220,
50045,
9100,
10210,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reaction_remove_all() {
let cache = cache_with_message_and_reactions();
cache.update(&ReactionRemoveAll {
channel_id: ChannelId(2),
message_id: MessageId(4),
guild_id: Some(GuildId(1)),
});
let msg = cache.message(ChannelId(2),... | rust_cleaned_test_functions.jsonl/88902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96631,
18193,
5705,
368,
341,
286,
1077,
6500,
284,
6500,
6615,
6462,
8378,
1288,
4020,
543,
286,
6500,
5317,
2099,
87236,
13021,
2403,
341,
310,
5496,
842,
25,
13434,
764,
7,
17,
1326,
310,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_weight() {
let mut deps = mock_dependencies(&[]);
deps.querier
.with_terraswap_pairs(&[(&"uusdmirror0000".to_string(), &"MIRLP0000".to_string())]);
let msg = InstantiateMsg {
base_denom: BASE_DENOM.to_string(),
token_code_id: TOKEN_CODE_ID,
dis... | rust_cleaned_test_functions.jsonl/36370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1070
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
15876,
368,
341,
262,
1077,
5206,
48178,
284,
7860,
71841,
2099,
56703,
262,
48178,
13,
15959,
1268,
198,
286,
659,
4197,
72493,
12784,
21726,
36430,
2099,
58,
2099,
1,
84,
355,
13849,
28812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_element_enum() {
assert_eq!(
parse!(path_element_enum, "{a,b,c}"),
vec!["a".to_string(), "b".to_string(), "c".to_string()]
);
assert_eq!(
parse!(path_element_enum, "{a,ab,abc}"),
vec!["a".to_string(), "ab".to_string(), ... | rust_cleaned_test_functions.jsonl/130544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
7894,
31054,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
10297,
2343,
7894,
31054,
11,
13868,
64,
8402,
10109,
92,
4461,
310,
7486,
0,
1183,
64,
3263,
983,
3904,
1507,
330,
65,
3263,
983... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_std_file() {
let mut file = tempfile::tempfile().expect("Could not create temp file");
let bytes_written =
bincode::encode_into_std_write(Foo { a: 30, b: 50 }, &mut file, Configuration::standard())
.unwrap();
assert_eq!(bytes_written, 2);
file.seek(SeekFrom::... | rust_cleaned_test_functions.jsonl/85310 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15656,
2458,
368,
341,
262,
1077,
5206,
1034,
284,
54819,
486,
3888,
1192,
1005,
17119,
445,
12895,
537,
1855,
2730,
1034,
3071,
262,
1077,
5820,
72403,
4035,
286,
9544,
1851,
486,
6180,
45514,
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_config_from_file() -> () {
//let default_values = r#"{ a = 7 }"#;
let config_file_path = Fixture::blank("application.conf");
let mut config_file = File::create(config_file_path.deref()).expect("config file");
config_file
.write_all(b"{ a = 7 }")
... | rust_cleaned_test_functions.jsonl/36837 | {
"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,
5332,
5673,
2458,
368,
1464,
1719,
341,
286,
442,
1149,
1638,
9146,
284,
435,
2,
14129,
264,
284,
220,
22,
335,
57676,
280,
286,
1077,
2193,
2458,
2638,
284,
73252,
486,
10189,
445,
5132,
13937,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_icmp_echo_socket_worker_reply_in_order() {
let mut worker = create_worker_with_capacity(2);
let first_packet = EchoPacket { sequence_num: 1, payload: vec![0, 1, 2, 3, 4] };
let second_packet = EchoPacket { sequence_num: 2, payload: vec![5, 6, 7, 8, 9] };
worker.... | rust_cleaned_test_functions.jsonl/98596 | {
"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,
32747,
1307,
68628,
19555,
40385,
15323,
1243,
7869,
368,
341,
286,
1077,
5206,
11864,
284,
1855,
40385,
6615,
35603,
7,
17,
626,
286,
1077,
1156,
21078,
284,
37806,
16679,
314,
8500,
4273,
25,
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_augmentation_parse_S() {
let bases = Default::default();
let address_size = 8;
let rest = [9, 8, 7, 6, 5, 4, 3, 2, 1];
let section = Section::with_endian(Endian::Little)
.uleb(0)
.append_bytes(&rest)
.get_contents()
... | rust_cleaned_test_functions.jsonl/9393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60411,
31099,
21039,
1098,
368,
341,
286,
1077,
23092,
284,
7899,
486,
2258,
543,
286,
1077,
2621,
2368,
284,
220,
23,
280,
286,
1077,
2732,
284,
508,
24,
11,
220,
23,
11,
220,
22,
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_binary_search() {
let deque: VecDeque<_> = vec![1, 2, 3, 5, 6].into();
assert!(deque.as_slices().1.is_empty());
assert_eq!(deque.binary_search(&3), Ok(2));
assert_eq!(deque.binary_search(&4), Err(3));
let mut deque: VecDeque<_> = vec![5, 6].into();
deque.push_f... | rust_cleaned_test_functions.jsonl/124941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
10716,
368,
341,
1066,
262,
1077,
41950,
25,
11312,
73891,
32399,
29,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
11,
220,
21,
936,
18122,
543,
262,
2060,
10297,
53498,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_algo_with_sha_to_url() {
let mock_client = mock_client();
let algorithm = mock_client.algo("anowell/Pinky/abcdef123456");
assert_eq!(
algorithm.to_url().unwrap().path(),
"/v1/algo/anowell/Pinky/abcdef123456"
);
} | rust_cleaned_test_functions.jsonl/693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76993,
6615,
48836,
2346,
2903,
368,
341,
286,
1077,
7860,
8179,
284,
7860,
8179,
543,
286,
1077,
12111,
284,
7860,
8179,
12168,
3346,
445,
276,
79499,
16341,
38034,
14,
41202,
16,
17,
18,
19,
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_vector_next() {
let origin = Vector::new(Position::origin(), 5, 5);
let step_1 = origin.next_step();
assert_eq!(Vector::new(Position::new(5, 5), 4, 4), step_1);
let step_2 = step_1.next_step();
assert_eq!(Vector::new(Position::new(9, 9), 3, 3), step_2);
... | rust_cleaned_test_functions.jsonl/124100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
11257,
368,
341,
286,
1077,
6238,
284,
4196,
486,
931,
61843,
486,
8611,
1507,
220,
20,
11,
220,
20,
626,
286,
1077,
3019,
62,
16,
284,
6238,
4529,
11946,
543,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_starts_with_schema() {
// registered
assert!(starts_with_schema("https://example.com/"));
assert!(starts_with_schema("ftp://example.com/"));
assert!(starts_with_schema("mailto:user@example.com"));
assert!(starts_with_schema("xmpp:node@example.com"));
... | rust_cleaned_test_functions.jsonl/8148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86552,
6615,
25371,
368,
341,
286,
442,
9681,
198,
286,
2060,
10297,
65876,
6615,
25371,
445,
2428,
1110,
8687,
905,
14,
4010,
286,
2060,
10297,
65876,
6615,
25371,
445,
25068,
1110,
8687,
905,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_level() {
assert_eq_dbg!(
Level::Info,
Annotated::<Level>::from_json("\"log\"").unwrap().0.unwrap()
);
assert_eq_dbg!(
Level::Warning,
Annotated::<Level>::from_json("30").unwrap().0.unwrap()
);
assert_eq_dbg!(
Level::Fatal,
Anno... | rust_cleaned_test_functions.jsonl/57488 | {
"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,
8274,
368,
341,
262,
2060,
10714,
44124,
33673,
286,
9395,
486,
1731,
345,
286,
1527,
87029,
27638,
4449,
6831,
1499,
9455,
38915,
839,
2105,
1827,
15454,
1005,
15,
55395,
741,
262,
1439,
262,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_empty_state() {
// create temp directoy
let temp_dir = TempDir::new("test_empty_state").unwrap();
let temp_dir_path = temp_dir.path().to_path_buf();
// setup empty state file
let path = setup_empty_state_file(temp_dir_path);
// load empty st... | rust_cleaned_test_functions.jsonl/72015 | {
"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,
12411,
15124,
4387,
368,
341,
286,
442,
1855,
2730,
2118,
2253,
198,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
931,
445,
1944,
15124,
4387,
1827,
15454,
543,
286,
1077,
2730,
4334,
2638,
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_get_ledger_fees() {
init!("true");
let fees = get_ledger_fees().unwrap();
assert!(fees.contains(r#""101":2"#));
assert!(fees.contains(r#""1":0"#));
} | rust_cleaned_test_functions.jsonl/10475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
38367,
1389,
761,
5516,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
12436,
284,
633,
38367,
1389,
761,
5516,
1005,
15454,
543,
286,
2060,
10297,
1859,
288,
8786,
2601,
2,
3014,
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_decode_i32_invalid() {
assert!(decode_i32(&vec![]).is_err());
assert!(decode_i32(&vec![0]).is_err());
assert!(decode_i32(&vec![0, 0]).is_err());
assert!(decode_i32(&vec![0, 0, 0]).is_err());
} | rust_cleaned_test_functions.jsonl/103875 | {
"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,
15227,
5318,
18,
17,
31433,
368,
341,
262,
2060,
10297,
18196,
5318,
18,
17,
2099,
4083,
0,
1294,
568,
285,
9266,
1423,
262,
2060,
10297,
18196,
5318,
18,
17,
2099,
4083,
20703,
15,
10697,
285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_put_multiple_token_types() {
let mut token_cache = TokenCache::new(CACHE_SIZE);
// Verify cache will get and put different datatypes
let key = build_test_key("", "audience_1");
let token = build_test_token(LONG_EXPIRY, "1");
token_cache.put(key.cl... | rust_cleaned_test_functions.jsonl/88792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8378,
15557,
45233,
6458,
9763,
368,
341,
286,
1077,
5206,
3950,
11529,
284,
9660,
8233,
486,
931,
3025,
17810,
4098,
626,
286,
442,
25429,
6500,
686,
633,
323,
2182,
2155,
3258,
60913,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str_contains() {
let expr = build_binary_expression(
ExpressionFunc::StrContains,
DataType::Varchar,
DataType::Char { width: 10 },
);
for _ in 0..10 {
let result = expr
.eval_expr(&[
... | rust_cleaned_test_functions.jsonl/32305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
2895,
63598,
368,
341,
286,
1077,
15169,
284,
1936,
31761,
28068,
1006,
310,
16378,
9626,
486,
2580,
23805,
345,
310,
33172,
486,
53,
1113,
277,
345,
310,
33172,
486,
4768,
314,
2374,
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... | 2 |
#[test]
fn test_LDA_zeropage_negative() {
let code = vec![0xA5, 0x06];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
memory.set(0x06, 0x84);
nes.next(&mut memory).unwrap();
assert_eq!(0x84, nes.A);
assert_eq!(1, nes.N);
} | rust_cleaned_test_functions.jsonl/38684 | {
"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,
2351,
6352,
6415,
261,
453,
424,
53865,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
14673,
20,
11,
220,
15,
87,
15,
21,
4821,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_gc_slot() {
solana_logger::setup();
//This test is pedantic
//A slot is purged when a non root bank is cleaned up. If a slot is behind root but it is
let accounts = AccountsDb::new(Vec::new(), &ClusterType::Development);
let pubkey = solana_... | rust_cleaned_test_functions.jsonl/1349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
49423,
27563,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
442,
1986,
1273,
374,
10477,
8159,
198,
286,
442,
32,
9446,
374,
3999,
3556,
979,
264,
2477,
3704,
6073,
374,
27722,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_methods() {
#[pyclass]
struct MyClass {}
#[pymethods]
impl MyClass {
#[text_signature = "($self, a)"]
fn method(&self, a: i32) {
let _ = a;
}
#[text_signature = "($self, b)"]
fn pyself_method(_this: &PyCell<Self>, b: i32) {
... | rust_cleaned_test_functions.jsonl/37587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 671
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36084,
368,
341,
262,
11506,
3288,
1040,
921,
262,
2036,
83826,
10086,
262,
11506,
79,
1600,
1068,
82,
921,
262,
11605,
83826,
341,
286,
11506,
1318,
39859,
284,
330,
699,
721,
11,
264,
8,
7026,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_issue() {
let issue: Issue = read_test_file("issue");
assert_eq!(issue.id, IssueId::new(69328));
assert_eq!(issue.iid, IssueInternalId::new(6));
assert_eq!(issue.project_id, ProjectId::new(855));
assert_eq!(issue.title, "fix documentation warnings");
assert_eq!(issu... | rust_cleaned_test_functions.jsonl/12942 | {
"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,
6443,
53340,
368,
341,
262,
1077,
4265,
25,
25226,
284,
1349,
4452,
2458,
445,
11159,
3071,
262,
2060,
10714,
10297,
11159,
1764,
11,
25226,
764,
486,
931,
7,
21,
24,
18,
17,
23,
1106,
262,
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_dollar_crate_lhs_is_not_meta() {
check(
r#"
macro_rules! m {
($crate) => { err!(); };
() => { ok!(); };
}
m!{}
"#,
expect![[r#"
macro_rules! m {
($crate) => { err!(); };
() => { ok!(); };
}
ok!();
"#]],
);
} | rust_cleaned_test_functions.jsonl/85248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
21295,
666,
7698,
84284,
6892,
7913,
13381,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
61711,
8,
589,
314,
1848,
0,
2129,
2605,
262,
1719,
589,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ecdsa_non_receivers_dont_send_support() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
with_test_replica_logger(|logger| {
let (mut ecdsa_pool, pre_signer) =
create_pre_signer_dependencies(pool_config, logg... | rust_cleaned_test_functions.jsonl/86718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
21637,
1288,
346,
1945,
814,
544,
13565,
25827,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
448,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonce() {
let mut cs_rng = CsRng::default();
let nonce_1 = cs_rng.generate_nonce();
assert_eq!(NONCE_LENGTH, nonce_1.0.len());
let nonce_2 = cs_rng.generate_nonce();
assert_eq!(NONCE_LENGTH, nonce_2.0.len());
assert_ne!(nonce_1, nonce_2);
} | rust_cleaned_test_functions.jsonl/132749 | {
"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,
48508,
368,
341,
286,
1077,
5206,
10532,
66849,
284,
67332,
49,
968,
486,
2258,
543,
286,
1077,
39676,
62,
16,
284,
10532,
66849,
22019,
48508,
543,
286,
2060,
10714,
10297,
29563,
2104,
15023,
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_null_data_packet() {
test_test_item(TestItem {
bytes: &NULL_DATA_PACKET,
subtype: Some(FrameSubtype::Data(DataSubtype::Null)),
ds_status: Some(DSStatus::FromSTAToDS),
pwr_mgt: true,
duration_id: Some(DurationID::Duration(258)),
receiver_address: "0... | rust_cleaned_test_functions.jsonl/123620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
1769,
21078,
368,
341,
30779,
30779,
2303,
18611,
220,
1273,
4452,
5634,
31159,
1234,
341,
262,
5820,
25,
609,
4576,
7896,
40328,
345,
262,
52482,
25,
4329,
91008,
3136,
1313,
486,
1043,
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_strengthen_empty_arr() {
let to_test = Vec::new();
let expected = [0, 0, 0, 0, 0, 0, 0, 0];
assert_eq!(strengthen(to_test), expected);
} | rust_cleaned_test_functions.jsonl/54011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
265,
18465,
15124,
11210,
368,
341,
286,
1077,
311,
4452,
284,
11312,
486,
931,
543,
286,
1077,
3601,
284,
508,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
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... | 1 |
#[test]
fn test_foreign_vec_as_arg_cpp() {
let gen_code = parse_code(
"test_foreign_vec_as_arg_cpp",
r#"
foreigner_class!(class Boo {
self_type Boo;
constructor Boo::default() -> Boo;
});
foreigner_class!(class FooImpl {
self_type Foo<'a>;
constructor Foo::create() -> Foo<'a>... | rust_cleaned_test_functions.jsonl/71639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78983,
13251,
11898,
6057,
59686,
368,
341,
262,
1077,
4081,
4136,
284,
4715,
4136,
1006,
286,
330,
1944,
78983,
13251,
11898,
6057,
59686,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skiplist8() {
let mut output: Vec<u8> = Vec::new();
let mut skip_list_builder: SkipListBuilder<u64> = SkipListBuilder::new(8);
skip_list_builder.insert(2, &3).unwrap();
skip_list_builder.write::<Vec<u8>>(&mut output).unwrap();
assert_eq!(output.len(), 11);... | rust_cleaned_test_functions.jsonl/65081 | {
"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,
643,
6642,
39934,
23,
368,
341,
286,
1077,
5206,
2550,
25,
11312,
34837,
23,
29,
284,
11312,
486,
931,
543,
286,
1077,
5206,
10706,
2019,
28532,
25,
25784,
852,
3297,
34837,
21,
19,
29,
284,
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_validate_key_images_are_unique_rejects_duplicate() {
let (mut tx, _ledger) = create_test_tx();
let ring_signature = tx.signature.ring_signatures[0].clone();
tx.signature.ring_signatures.push(ring_signature);
assert_eq!(
validate_key_... | rust_cleaned_test_functions.jsonl/33277 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
3097,
13283,
56855,
21218,
1288,
583,
82,
70434,
368,
341,
286,
1077,
320,
6984,
9854,
11,
716,
50704,
8,
284,
1855,
4452,
17805,
543,
16885,
286,
1077,
10058,
39859,
284,
9854,
75185,
1746... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_mismatched_length() {
let a = Int32Array::from_slice(&[5, 6]);
let b = Int32Array::from_slice(&[5]);
sub(&a, &b)
.err()
.expect("should have failed due to different lengths");
} | rust_cleaned_test_functions.jsonl/23352 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
717,
24976,
291,
5118,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
26488,
2099,
58,
20,
11,
220,
21,
2558,
286,
1077,
293,
284,
1333,
18,
17,
1857,
486,
1499,
26488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encodingkind_try_from_usize() {
for value in EncodingKind::values() {
let converted = <EncodingKind as TryFrom<usize>>::try_from(value as usize).unwrap();
assert_eq!(converted, value);
}
assert!(<EncodingKind as TryFrom<usize>>::try_from(IcedConstants::ENCODING_KIND_ENUM_COUNT).is_err());... | rust_cleaned_test_functions.jsonl/5961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
15314,
53283,
5673,
11306,
551,
368,
341,
2023,
897,
304,
29330,
10629,
486,
3661,
368,
341,
197,
10217,
16099,
284,
366,
14690,
10629,
438,
9735,
3830,
90244,
77595,
1539,
5673,
3679,
438,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_short_name() {
assert_eq!(
TypeRegistration::get_short_name(std::any::type_name::<f64>()),
"f64"
);
assert_eq!(
TypeRegistration::get_short_name(std::any::type_name::<String>()),
"String"
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/3813 | {
"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,
3062,
16673,
1269,
368,
341,
286,
2060,
10714,
33673,
310,
3990,
23365,
486,
455,
16673,
1269,
5194,
486,
3767,
486,
1313,
1269,
27638,
69,
21,
19,
13555,
1326,
310,
330,
69,
21,
19,
698,
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_text_and_binary_at_once() {
assert_eq!(
split_mode_string("rbt"),
Err("can't have text and binary mode at once".to_owned())
);
} | rust_cleaned_test_functions.jsonl/105634 | {
"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,
4326,
8378,
31761,
3752,
7630,
368,
341,
310,
2060,
10714,
33673,
394,
6718,
7302,
3904,
445,
10681,
83,
4461,
394,
15495,
445,
4814,
944,
614,
1467,
323,
7868,
3856,
518,
3055,
3263,
983,
51973,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dbg_await_expr() {
check_assist(
remove_dbg,
r#"let res = $0dbg!(fut.await).foo();"#,
r#"let res = fut.await.foo();"#,
);
} | rust_cleaned_test_functions.jsonl/13615 | {
"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,
18193,
44124,
62,
11421,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
4057,
44124,
345,
310,
435,
55543,
1149,
592,
284,
400,
15,
54318,
10297,
69,
332,
67776,
568,
7975,
2129,
57676,
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 |
#[test]
fn test_saturating_add_int() {
use int::{min_value,max_value};
assert_eq!(3i.saturating_add(5i), 8i);
assert_eq!(3i.saturating_add(max_value-1), max_value);
assert_eq!(max_value.saturating_add(max_value), max_value);
assert_eq!((max_value-2).saturating_add(1), max... | rust_cleaned_test_functions.jsonl/12467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
2628,
1095,
2891,
4042,
368,
341,
286,
990,
526,
22964,
1065,
3142,
34851,
3142,
2440,
286,
2060,
10714,
10297,
18,
72,
514,
2628,
1095,
2891,
7,
20,
72,
701,
220,
23,
72,
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 |
#[test]
fn test_f32x4_except_first_not_all() {
let x1 = f32x4::new(1.0, 2.0, 2.0, 2.0);
let x2 = f32x4::splat(2.0);
assert!(!(x1.eq(x2)).all());
} | rust_cleaned_test_functions.jsonl/43320 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
18,
17,
87,
19,
54633,
12978,
7913,
5705,
368,
341,
286,
1077,
856,
16,
284,
282,
18,
17,
87,
19,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
17,
13,
15,
11,
220,
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_lookup_key() {
let doc = KTXDocument::from_slice(CUBEMAP_YOKOHAMA_ASTC_8X8_SRGB).unwrap();
let _value = doc.lookup_key("KTXorientation").unwrap().unwrap();
let _value = doc.lookup_key("KTXwriter").unwrap().unwrap();
assert!(doc.lookup_key("AKeyThatDoesntExist").unwrap().is_none(... | rust_cleaned_test_functions.jsonl/72493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
3097,
368,
341,
262,
1077,
4629,
284,
730,
22867,
7524,
486,
1499,
26488,
3025,
4493,
2716,
2537,
10626,
3925,
46761,
38100,
76853,
34,
62,
23,
55,
23,
1098,
18184,
568,
15454,
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_memory_gas_cost() {
assert_eq!(mem_gas_cost(32, 3), 3);
assert_eq!(mem_gas_cost(128, 3), 12);
assert_eq!(mem_gas_cost(129, 3), 15);
assert_eq!(mem_gas_cost(1024, 3), 98);
} | rust_cleaned_test_functions.jsonl/4317 | {
"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,
19195,
82116,
15890,
368,
341,
286,
2060,
10714,
10297,
10536,
82116,
15890,
7,
18,
17,
11,
220,
18,
701,
220,
18,
317,
286,
2060,
10714,
10297,
10536,
82116,
15890,
7,
16,
17,
23,
11,
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_decode_subw_reg() {
// 0xebb00b09
assert_eq!(
decode_32(0xebb00b09),
Instruction::SUB_reg {
params: Reg3ShiftParams {
rd: Reg::R11,
rn: Reg::R0,
rm: Reg::R9,
setflags: SetFlags::True,
... | rust_cleaned_test_functions.jsonl/64833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
5228,
86,
4920,
368,
341,
262,
442,
220,
15,
54468,
65,
15,
15,
65,
15,
24,
7213,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
54468,
65,
15,
15,
65,
15,
24,
1326,
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_can_nest_views() {
let mut source = ImageBuffer::from_pixel(3, 3, Rgba([255u8, 0, 0, 255]));
{
let mut sub1 = source.sub_image(0, 0, 2, 2);
let mut sub2 = sub1.sub_image(1, 1, 1, 1);
sub2.put_pixel(0, 0, Rgba([0, 0, 0, 0]));
}
... | rust_cleaned_test_functions.jsonl/2196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
1089,
477,
39498,
368,
341,
286,
1077,
5206,
2530,
284,
4654,
4095,
486,
1499,
29760,
7,
18,
11,
220,
18,
11,
431,
56380,
2561,
17,
20,
20,
84,
23,
11,
220,
15,
11,
220,
15,
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_to_public_key_3() {
let secret_key =
hex::decode("26fb4d661491b0a623637a2c611e34b6641cdea1743bee94c17b67e5ef14a550")
.unwrap();
let expected = hex::decode(
"077dfcf14e940b69bf88fa1ad99b6c7e1a1d6d2cb8813ac53383bf505a17f8ff\
2d1a... | rust_cleaned_test_functions.jsonl/65091 | {
"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,
2346,
27074,
3097,
62,
18,
368,
341,
286,
1077,
6234,
3097,
4035,
310,
12371,
486,
18196,
445,
17,
21,
10798,
19,
67,
21,
21,
16,
19,
24,
16,
65,
15,
64,
21,
17,
18,
21,
18,
22,
64,
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_key_derivation() {
let keychain = ExtKeychain::from_random_seed().unwrap();
let secp = keychain.secp();
let path = ExtKeychainPath::new(1, 1, 0, 0, 0);
let key_id = path.to_identifier();
let msg_bytes = [0; 32];
let msg = secp::Message::from_slice(&msg_bytes[..]).unwrap();
// no... | rust_cleaned_test_functions.jsonl/49620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
35345,
39127,
368,
341,
197,
10217,
1376,
8819,
284,
9447,
1592,
8819,
486,
1499,
22644,
33809,
1005,
15454,
543,
197,
10217,
511,
4672,
284,
1376,
8819,
4523,
4672,
1428,
197,
10217,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_preamble() {
let mut rfm = setup_rfm(Vec::new(), vec![0, 0, 0]);
rfm.preamble(0x1234).ok().unwrap();
assert_eq!(
rfm.spi.rx_buffer[0..=2],
[Registers::PreambleMsb.write(), 0x12, 0x34]
);
} | rust_cleaned_test_functions.jsonl/3694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
86706,
368,
341,
262,
1077,
5206,
435,
21112,
284,
6505,
1710,
21112,
49923,
486,
931,
1507,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
10149,
262,
435,
21112,
556,
86706,
7,
15,
87,
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_lazy_query_1() {
// test on aggregation pushdown
// and a filter that is not in the projection
let df_a = load_df();
let df_b = df_a.clone();
df_a.lazy()
.left_join(df_b.lazy(), col("b"), col("b"))
.filter(col("a").lt(lit(2)))
.groupby([col("b")])
... | rust_cleaned_test_functions.jsonl/116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
5738,
62,
16,
368,
341,
262,
442,
1273,
389,
51629,
4484,
2923,
198,
262,
442,
323,
264,
4051,
429,
374,
537,
304,
279,
21615,
198,
262,
1077,
6764,
4306,
284,
2795,
10894,
543,
262,
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_generate_filename() {
let dirname = "test";
let mut tests = if cfg!(windows) {
vec![
(FileType::Log, 10, "test\\000010.log"),
(FileType::Lock, 1, "test\\LOCK"),
(FileType::Table, 123, "test\\000123.sst"),
... | rust_cleaned_test_functions.jsonl/108915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 731
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
13323,
368,
341,
286,
1077,
29908,
284,
330,
1944,
876,
286,
1077,
5206,
7032,
284,
421,
13286,
10297,
27077,
8,
341,
310,
7486,
90515,
394,
320,
71873,
486,
2201,
11,
220,
16,
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... | 3 |
#[test]
fn test_arch_systemz() {
test_arch_mode_endian_insns(
&mut Capstone::new()
.sysz()
.mode(sysz::ArchMode::Default)
.build()
.unwrap(),
Arch::SYSZ,
Mode::Default,
None,
&[],
&[
("adb", b"\xed\x0... | rust_cleaned_test_functions.jsonl/127440 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34330,
17687,
89,
368,
341,
262,
1273,
34330,
7302,
87193,
34386,
4412,
1006,
286,
609,
6984,
8012,
10812,
486,
931,
741,
310,
659,
7791,
89,
741,
310,
659,
8516,
18140,
89,
486,
18727,
3636,
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_reputation_change() {
let mut score = Score::default();
// 0 change does not change de reputation
let change = 0.0;
score.test_add(change);
assert_eq!(score.score(), DEFAULT_SCORE);
// underflowing change is capped
let mut score ... | rust_cleaned_test_functions.jsonl/93739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
13320,
15947,
368,
341,
286,
1077,
5206,
5456,
284,
18115,
486,
2258,
1428,
286,
442,
220,
15,
2297,
1558,
537,
2297,
409,
17011,
8945,
286,
1077,
2297,
284,
220,
15,
13,
15,
280,
286,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_initialize_dio_option() {
let option = DioOption::new();
assert_eq!(option, DioOption { f0_floor: 71.0, f0_ceil: 800.0, channels_in_octave: 2.0, frame_period: 5.0, speed: 1, allowed_range: 0.1 });
} | rust_cleaned_test_functions.jsonl/20843 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
814,
815,
9672,
368,
341,
286,
1077,
2999,
284,
84942,
5341,
486,
931,
543,
286,
2060,
10714,
10297,
2047,
11,
84942,
5341,
314,
282,
15,
60044,
25,
220,
22,
16,
13,
15,
11,
282,
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_pyo3_circuit_ms() {
pyo3::prepare_freethreaded_python();
Python::with_gil(|py| {
let input_operation =
Operation::from(MultiQubitMS::new(vec![0, 1, 2], CalculatorFloat::from(1.0)));
let operation = convert_operation_to_pyobject(input_operation).unwrap();
... | rust_cleaned_test_functions.jsonl/59480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
16032,
18,
666,
37268,
21416,
368,
341,
262,
4510,
78,
18,
486,
13609,
74179,
769,
878,
291,
55869,
543,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
286,
1077,
1946,
32565,
4035... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prefiltering() {
let bar_rule = GenericRule::new(
sym!("bar"),
vec![
Arc::new(rule!("bar", [value!([1])])),
Arc::new(rule!("bar", [value!([2])])),
],
);
let mut kb = KnowledgeBase::new();
kb.add_... | rust_cleaned_test_functions.jsonl/18521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 616
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43331,
2044,
287,
368,
341,
286,
1077,
3619,
21124,
284,
21281,
11337,
486,
931,
1006,
310,
7886,
17223,
2257,
4461,
310,
7486,
90515,
394,
19689,
486,
931,
34944,
17223,
2257,
497,
508,
957,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_case_1() {
let hkdf = Hkdf {
salt: decode("000102030405060708090a0b0c").unwrap(),
ikm: decode("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b").unwrap(),
info: decode("f0f1f2f3f4f5f6f7f8f9").unwrap(),
length: 42,
hmac: ShaVariantO... | rust_cleaned_test_functions.jsonl/85133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 538
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
16,
368,
341,
286,
1077,
83381,
2940,
284,
472,
74,
2940,
341,
310,
12021,
25,
16895,
445,
15,
15,
15,
16,
15,
17,
15,
18,
15,
19,
15,
20,
15,
21,
15,
22,
15,
23,
15,
24,
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_validator_send() {
// create a Validator
let result = Validator::create(None);
assert!(result.is_ok());
let validator = result.unwrap();
let handle = thread::spawn(move || {
let result = Loader::create(None);
assert!(result.is_ok()... | rust_cleaned_test_functions.jsonl/49853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64959,
13565,
368,
341,
286,
442,
1855,
264,
32566,
198,
286,
1077,
1102,
284,
32566,
486,
3182,
26717,
317,
286,
2060,
10297,
1382,
2079,
19817,
1423,
286,
1077,
22935,
284,
1102,
55395,
1428,
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... | 2 |
#[test]
fn test_whitespace_with_plain_text() {
let res = document_node_all(
"<h2>
Hello World
this is <strong>some</strong> text
<span>!!!</span>
</h2>",
);
assert_eq!(
res,
Ok((
"",
SyntaxNode:... | rust_cleaned_test_functions.jsonl/124662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86175,
6615,
41015,
4326,
368,
972,
286,
1077,
592,
284,
2197,
5084,
5705,
7805,
310,
4055,
71,
17,
1433,
262,
21927,
4337,
319,
262,
419,
374,
366,
4519,
29,
14689,
522,
4519,
29,
1467,
319,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deep_expressions() {
let s = schema(&[("a", DataType::Int64), ("b", DataType::Int64)]);
let extract = |sql| PartitionFilter::extract(&s, &[parse(sql, &s)]);
let f = extract("(a <= 1 or b <= 2) and (a <= 2 or b <= 3) and (a <= 4 or b <= 5) and (a <= 6 or b <= 7) and (a <=... | rust_cleaned_test_functions.jsonl/65539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87044,
2702,
39873,
368,
341,
286,
1077,
274,
284,
10802,
2099,
58,
445,
64,
497,
33172,
486,
1072,
21,
19,
701,
3489,
65,
497,
33172,
486,
1072,
21,
19,
41958,
286,
1077,
8649,
284,
760,
3544... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_white() {
// Whitelist only filter
let whitelist = RxFilter::create(Some("001122".to_string()), None);
assert!(whitelist.filter(&[1, 2, 3, 4, 5]).is_none());
assert!(whitelist.filter(&[0x00, 0x11, 0x22, 4, 5]).is_some());
assert!(whitelist.filter(&[0x00, ... | rust_cleaned_test_functions.jsonl/110862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44431,
368,
341,
286,
442,
26386,
19230,
1172,
4051,
198,
286,
1077,
67727,
284,
35376,
5632,
486,
3182,
65405,
445,
15,
15,
16,
16,
17,
17,
3263,
983,
3904,
11858,
2240,
626,
286,
2060,
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_reverse_translation() {
let iter = RNAReverseTranslations::new(&Strand::new(vec![
AminoAcid::W,
AminoAcid::Y,
AminoAcid::Stop,
]));
let translations: Vec<Strand<RNA>> = iter.collect();
assert_eq!(translations.len(), 6);
} | rust_cleaned_test_functions.jsonl/131759 | {
"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,
43277,
49273,
368,
341,
262,
1077,
5367,
284,
40114,
45695,
95807,
486,
931,
2099,
2580,
437,
486,
931,
25592,
90515,
414,
362,
31824,
11654,
307,
486,
54,
345,
414,
362,
31824,
11654,
307,
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_linear_single() {
let md = ModelData::IntKeyToIntPos(vec![(1, 2)]);
let lin_mod = LinearModel::new(&md);
assert_eq!(lin_mod.predict_to_int(1.into()), 2);
} | rust_cleaned_test_functions.jsonl/112145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40674,
19487,
368,
341,
286,
1077,
10688,
284,
4903,
1043,
486,
1072,
1592,
38544,
4859,
25592,
0,
9697,
16,
11,
220,
17,
7252,
626,
286,
1077,
9805,
7480,
284,
28263,
1712,
486,
931,
2099,
2277... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fieldnorm() -> crate::Result<()> {
let mut schema_builder = Schema::builder();
let text_field = schema_builder.add_text_field("text", TEXT);
let index = Index::create_in_ram(schema_builder.build());
let mut index_writer = index.writer_for_tests()?;
index_w... | rust_cleaned_test_functions.jsonl/12716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
20011,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
497,
15762,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_product_of_pairings() {
let rng = &mut test_rng();
let a = G1Projective::rand(rng).into_affine();
let b = G2Projective::rand(rng).into_affine();
let c = G1Projective::rand(rng).into_affine();
let d = G2Projective::rand(rng).into_affine();
let ans1 = MNT6_298::pairing(a, ... | rust_cleaned_test_functions.jsonl/18423 | {
"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,
9840,
3575,
14445,
819,
368,
341,
262,
1077,
28422,
284,
609,
6984,
1273,
66849,
1428,
262,
1077,
264,
284,
479,
16,
7849,
533,
486,
11335,
87597,
568,
18122,
48914,
482,
543,
262,
1077,
293,
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_parse_arguments_values() {
let args = ovec!["-c", "foo.c", "-FI", "file", "-Fofoo.obj", "/showIncludes"];
let ParsedArguments {
input,
language,
outputs,
preprocessor_args,
dependency_args,
msvc_show_includes... | rust_cleaned_test_functions.jsonl/24584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
9146,
368,
341,
286,
1077,
2827,
284,
297,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
497,
6523,
19426,
497,
330,
1192,
497,
6523,
91879,
7975,
21232,
497,
3521,
3445,
55834,
6332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_raster_direct_n32_creation_and_clear_in_memory() {
let mut pixels: [u32; 4] = Default::default();
{
let mut canvas = Canvas::from_raster_direct_n32((2, 2), pixels.as_mut(), None).unwrap();
canvas.clear(Color::RED);
}
} | rust_cleaned_test_functions.jsonl/125498 | {
"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,
1710,
2300,
32871,
1089,
18,
17,
46163,
8378,
21811,
1243,
19195,
368,
972,
286,
1077,
5206,
15751,
25,
508,
84,
18,
17,
26,
220,
19,
60,
284,
7899,
486,
2258,
1647,
286,
972,
310,
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_single_tab_should_not_add_extra_newline() {
new_ucmd!()
.arg("-w1")
.pipe_in("\t")
.succeeds()
.stdout_is("\t");
} | rust_cleaned_test_functions.jsonl/23275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
17344,
43378,
7913,
2891,
31858,
5921,
1056,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
86,
16,
1138,
286,
659,
13768,
1243,
4921,
83,
1138,
286,
659,
82,
29264,
82,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ensemble_set_equal_weight() {
let jw = JaroWinklerMatcher::default();
let soundex = SoundexMatcher::default();
let matchers: Vec<Box<dyn Matcher>> = vec![Box::new(jw), Box::new(soundex)];
let mut ensemble = super::Ensemble::new(matchers);
ensemble.set_eq... | rust_cleaned_test_functions.jsonl/25043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
48475,
2602,
11478,
15876,
368,
341,
286,
1077,
502,
86,
284,
619,
17165,
54,
766,
1536,
37554,
486,
2258,
543,
286,
1077,
5112,
327,
284,
14594,
327,
37554,
486,
2258,
1428,
286,
1077,
2432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fp2_sqrt() {
assert_eq!(
Fp2::new(
Fp::from_u64s_le(&[
0x476b4c309720e227,
0x34c2d04faffdab6,
0xa57e6fc1bab51fd9,
0xdb4a116b5bf74aa1,
0x1e58b2159dfe10e2,
... | rust_cleaned_test_functions.jsonl/62489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1877
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34160,
17,
92199,
368,
341,
286,
2060,
10714,
33673,
310,
434,
79,
17,
486,
931,
1006,
394,
434,
79,
486,
1499,
7300,
21,
19,
82,
11751,
2099,
9640,
503,
220,
15,
87,
19,
22,
21,
65,
19,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_import_union_typedef_from_different_decl_context() {
let ir = ir_from_cc(
"union MyUnion {}; namespace test_namespace_bindings { typedef MyUnion MyUnion; }",
)
.unwrap();
assert_ir_matches!(ir, quote! { Record { ... cc_name: "MyUnion" ...}});
assert_ir_matches!(ir, qu... | rust_cleaned_test_functions.jsonl/37193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
51621,
42111,
4219,
5673,
82741,
35814,
8467,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
330,
16192,
3017,
32658,
52166,
4473,
1273,
41571,
94516,
314,
13501,
3017,
32658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_layout() {
let contents = "\
operators = [\"alice\", \"bob\"]\n\
owners = [\"carol\"]\n\
libra_root = \"dave\"\n\
treasury_compliance = \"other_dave\"\n\
";
let layout = Layout::parse(contents).unwrap();
assert_eq!(... | rust_cleaned_test_functions.jsonl/85117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14466,
368,
341,
286,
1077,
8794,
284,
93317,
310,
19624,
284,
508,
2105,
63195,
16215,
7245,
47086,
75104,
59,
77,
5661,
310,
7824,
284,
508,
2105,
6918,
337,
75104,
59,
77,
5661,
310,
3051,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_edit_ok() {
Tester::default()
.set_program(Some("foo.bas"), "previous\n")
.add_input_chars("new line\n")
.run("EDIT")
.expect_program(Some("foo.bas"), "previous\nnew line\n")
.check();
} | rust_cleaned_test_functions.jsonl/112739 | {
"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,
13156,
19817,
368,
341,
286,
76816,
486,
2258,
741,
310,
659,
746,
25096,
65405,
445,
7975,
948,
300,
3975,
330,
19702,
1699,
1138,
310,
659,
718,
5898,
37418,
445,
931,
1555,
1699,
1138,
310,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.