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_from_str_socket_addr() {
assert_eq!(Some(SocketAddr { ip: Ipv4Addr(77, 88, 21, 11), port: 80 }),
FromStr::from_str("77.88.21.11:80"));
assert_eq!(Some(SocketAddr { ip: Ipv6Addr(0x2a02, 0x6b8, 0, 1, 0, 0, 0, 1), port: 53 }),
FromStr::from_str("[2a02... | rust_cleaned_test_functions.jsonl/818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
19555,
7387,
368,
341,
286,
2060,
10714,
10297,
8373,
73066,
13986,
314,
5997,
25,
358,
30168,
19,
13986,
7,
22,
22,
11,
220,
23,
23,
11,
220,
17,
16,
11,
220,
16,
16,
701,
2635,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example() {
//create a new state instance with the name "foo"
let mut state = State::load_else_create("foo").unwrap();
//set some variables in foo
state.set("var", "some value").unwrap();
state.set("user_wants_pie", true).unwrap();
//destroy the state variable
drop(state);
//create... | rust_cleaned_test_functions.jsonl/55505 | {
"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,
39304,
368,
341,
1572,
197,
322,
3182,
264,
501,
1584,
2867,
448,
279,
829,
330,
7975,
698,
10217,
5206,
1584,
284,
3234,
486,
1078,
62628,
8657,
445,
7975,
1827,
15454,
543,
197,
322,
746,
1045... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xof_seek() {
let mut out = [0; 533];
let mut hasher = crate::Hasher::new();
hasher.update(b"foo");
hasher.finalize_xof().fill(&mut out);
assert_eq!(hasher.finalize().as_bytes(), &out[0..32]);
let mut reader = hasher.finalize_xof();
reader.set_position(303);
let m... | rust_cleaned_test_functions.jsonl/39150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 727
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3212,
1055,
74473,
368,
341,
262,
1077,
5206,
700,
284,
508,
15,
26,
220,
20,
18,
18,
935,
262,
1077,
5206,
90819,
284,
17717,
486,
6370,
261,
486,
931,
543,
262,
90819,
5317,
1883,
1,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date_from_isoywd() {
let isoywd_opt = |y,w,d| NaiveDate::from_isoywd_opt(y, w, d);
let ymd = |y,m,d| NaiveDate::from_ymd(y, m, d);
assert_eq!(isoywd_opt(2004, 0, Weekday::Sun), None);
assert_eq!(isoywd_opt(2004, 1, Weekday::Mon), Some(ymd(2003, 12, 29)));
... | rust_cleaned_test_functions.jsonl/4758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 862
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
5673,
6892,
2253,
6377,
368,
341,
286,
1077,
374,
2253,
6377,
15032,
284,
760,
88,
24558,
11991,
91,
12812,
533,
1916,
486,
1499,
6892,
2253,
6377,
15032,
7021,
11,
289,
11,
294,
317,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pull_request_merged_no_labels() {
let mut test = new_test();
test.handler.event = "pull_request".into();
test.handler.action = "closed".into();
test.handler.data.pull_request = some_pr();
if let Some(ref mut pr) = test.handler.data.pull_request {
pr.merged = Some(true... | rust_cleaned_test_functions.jsonl/89648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65693,
7893,
90702,
6536,
14547,
368,
341,
262,
1077,
5206,
1273,
284,
501,
4452,
543,
262,
1273,
31171,
5773,
284,
330,
23441,
7893,
3263,
18122,
543,
262,
1273,
31171,
12395,
284,
330,
34087,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_generate_type_check_empty() {
let types = &[];
let expected = quote! {
let __usdt_private_args_lambda = $args_lambda;
let _ = || {
let _: () = __usdt_private_args_lambda();
};
};
let block = generate_type_check("... | rust_cleaned_test_functions.jsonl/8786 | {
"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,
48851,
1819,
7200,
15124,
368,
341,
286,
1077,
4494,
284,
609,
15078,
286,
1077,
3601,
284,
12641,
0,
341,
310,
1077,
1304,
355,
8047,
26249,
8384,
51884,
284,
400,
2116,
51884,
280,
310,
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... | 2 |
#[test]
fn test_json_as_int() {
test_none_with_ctx(cast_json_as_any::<Int>);
// no overflow
let cs = vec![
(
Json::from_object(BTreeMap::default()).unwrap(),
0,
false,
true,
),
... | rust_cleaned_test_functions.jsonl/1955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1900
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
4042,
368,
341,
286,
1273,
31488,
6615,
15147,
1337,
559,
9455,
11898,
37248,
27638,
1072,
29,
626,
286,
442,
902,
16484,
198,
286,
1077,
10532,
284,
7486,
90515,
3374,
310,
2399,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_321_variable_expansion() {
let mut templates = [
UriTemplate::new("{count}"),
UriTemplate::new("{count*}"),
UriTemplate::new("{/count}"),
UriTemplate::new("{/count*}"),
UriTemplate::new("{;count}"),
UriTemplate::new("{;count*}"),
UriTem... | rust_cleaned_test_functions.jsonl/36931 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 881
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
17,
16,
14635,
14214,
10501,
368,
341,
262,
1077,
5206,
19911,
284,
2278,
286,
17226,
7275,
486,
931,
13976,
1830,
92,
4461,
286,
17226,
7275,
486,
931,
13976,
1830,
9,
92,
4461,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_country() {
let mut exec = fasync::Executor::new().expect("failed to create an executor");
let (wlansvc_local, wlansvc_remote) =
create_proxy::<DeviceServiceMarker>().expect("failed to create DeviceService service");
let mut wlansvc_stream = wlansvc_remote... | rust_cleaned_test_functions.jsonl/37344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
28106,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
320,
26417,
596,
7362,
13564,
11,
44709,
596,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_all() {
assert!(Flags::all().is_all());
assert!(!FlagA.is_all());
assert!(FlagABC.is_all());
assert!(AnotherFlag.is_all());
} | rust_cleaned_test_functions.jsonl/13426 | {
"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,
6892,
5705,
368,
341,
286,
2060,
10297,
9195,
486,
541,
1005,
285,
5705,
1423,
286,
2060,
0,
3471,
12135,
32,
2079,
5705,
1423,
286,
2060,
10297,
12135,
25411,
2079,
5705,
5231,
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 |
#[test]
fn test_axfr() {
let mut authority = create_example();
authority.set_allow_axfr(true);
let query = LowerQuery::from(Query::query(
Name::from_str("example.com.").unwrap(),
RecordType::AXFR,
));
let result = authority
.search(&query, false, Supp... | rust_cleaned_test_functions.jsonl/48174 | {
"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,
42385,
1626,
368,
341,
262,
1077,
5206,
11198,
284,
1855,
39304,
543,
262,
11198,
980,
55731,
42385,
1626,
3715,
626,
9401,
14808,
262,
1077,
3239,
284,
27536,
2859,
486,
1499,
59036,
486,
1631,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fac() {
let r = parse_and_eval(
r#"
block 0 {
r2 = 1;
r1 = 5;
goto(1);
}
block 1 {
ifz r1 {
exit(r2);
}
else {
... | rust_cleaned_test_functions.jsonl/55935 | {
"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,
41589,
368,
341,
286,
1077,
435,
284,
4715,
8378,
21296,
1006,
310,
435,
2,
698,
310,
2504,
220,
15,
341,
394,
435,
17,
284,
220,
16,
280,
394,
435,
16,
284,
220,
20,
280,
394,
7986,
7,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slot_subscription() {
let pubsub_addr = SocketAddr::new(
IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)),
rpc_port::DEFAULT_RPC_PUBSUB_PORT,
);
let exit = Arc::new(AtomicBool::new(false));
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let... | rust_cleaned_test_functions.jsonl/10201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27563,
59838,
368,
341,
262,
1077,
6675,
1966,
7387,
284,
20954,
13986,
486,
931,
1006,
286,
35033,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
15,
11,
220,
15,
11,
220,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_context_function_build_arg_from_ctx() -> Result<()> {
use pretty_assertions::assert_eq;
let ctx = crate::tests::try_create_context()?;
// Ok.
{
let args = ContextFunction::build_args_from_ctx("database".clone(), ctx.clone())?;
assert_eq!("default", format!("{:?}"... | rust_cleaned_test_functions.jsonl/27874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8467,
9174,
20801,
6057,
5673,
15147,
368,
1464,
5714,
71698,
341,
262,
990,
5020,
16553,
908,
486,
2207,
10714,
280,
262,
1077,
5635,
284,
17717,
486,
23841,
486,
1539,
8657,
8467,
368,
69493,
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,
1,
1... | 3 |
#[test]
fn test_multiple_constraints() {
let constraint = Constraint {
a: 1,
b: 2,
c: 3,
qm: Scalar::zero(),
ql: Scalar::one(),
qr: Scalar::one(),
qo: -Scalar::one(),
qc: Scalar::zero(),
};
le... | rust_cleaned_test_functions.jsonl/28103 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 976
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
60267,
368,
341,
286,
1077,
21568,
284,
44264,
341,
310,
264,
25,
220,
16,
345,
310,
293,
25,
220,
17,
345,
310,
272,
25,
220,
18,
345,
310,
2804,
76,
25,
35176,
486,
14154,
3148,
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_long_to_long() {
assert_less(Variant::from(1_i64), Variant::from(2_i64));
assert_equal(Variant::from(3_i64), Variant::from(3_i64));
assert_greater(Variant::from(5_i64), Variant::from(4_i64));
} | rust_cleaned_test_functions.jsonl/84527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
2346,
17799,
368,
341,
310,
2060,
50747,
12410,
15341,
486,
1499,
7,
16,
5318,
21,
19,
701,
39292,
486,
1499,
7,
17,
5318,
21,
19,
1106,
310,
2060,
11478,
12410,
15341,
486,
1499,
7,
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_optimize_switch_with_default_case_with_fallthru() {
test(
concat!(
"function f() {",
" switch(a) {",
" case 'x':",
" case foo():",
" default: return 3",
" }",
"}",
),
"foo()... | rust_cleaned_test_functions.jsonl/401 | {
"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,
15032,
11853,
27652,
6615,
9993,
19096,
6615,
761,
541,
339,
2672,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
330,
1688,
282,
368,
314,
756,
310,
330,
220,
3398,
2877,
8,
314,
756,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_list_insert_after_panic_index_invalidated() {
let mut list = VecList::new();
let index = list.push_front(0);
list.remove(index);
list.insert_after(index, 1);
} | rust_cleaned_test_functions.jsonl/11532 | {
"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,
13251,
2019,
17678,
19844,
620,
31270,
3560,
31433,
657,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1077,
1922,
284,
1140,
2552,
22926,
7,
15,
317,
286,
1140,
4850,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_create_revoke_client() {
run_e2e_client_test(4, |mut client| {
let resp = client
.create_symmetric_key(CryptographicAlgorithm::AES, 128)
.unwrap();
eprintln!("{:?}", resp);
let get = client.get(&resp.unique_identifier)... | rust_cleaned_test_functions.jsonl/56504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1288,
7621,
8179,
368,
341,
286,
1598,
2204,
17,
68,
8179,
4452,
7,
19,
11,
760,
6984,
2943,
91,
341,
310,
1077,
9039,
284,
2943,
198,
394,
659,
3182,
26825,
15903,
3097,
3025,
3571,
126... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bounded_queue_inspect() {
let inspect = inspect::Inspector::new();
let queue_inspect = inspect.root().create_child("queue");
let mut queue: BoundedQueue<Record> = BoundedQueue::new(
3 * std::mem::size_of::<Record>(),
Duration::new(0, 0),
... | rust_cleaned_test_functions.jsonl/120998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
13082,
10841,
34386,
987,
368,
341,
286,
1077,
24085,
284,
24085,
486,
46230,
486,
931,
543,
286,
1077,
7177,
34386,
987,
284,
24085,
12576,
1005,
3182,
17268,
445,
4584,
797,
286,
1077,
5206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_offset() {
let file = TempFile::new().unwrap().into_file();
let start = 1234;
let file_offset = FileOffset::new(file, start);
assert_eq!(file_offset.start(), start);
assert_eq!(
file_offset.file() as *const File,
file_offset.ar... | rust_cleaned_test_functions.jsonl/46436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
6917,
368,
341,
286,
1077,
1034,
284,
19944,
1703,
486,
931,
1005,
15454,
1005,
18122,
2458,
543,
286,
1077,
1191,
284,
220,
16,
17,
18,
19,
280,
286,
1077,
1034,
6917,
284,
2887,
6446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_esprima_basic() {
let esprima = Esprima::new();
let parsed = esprima.parse_str("function foo() {}")
.unwrap();
let expected = json!({
"body": [{
"body": {
"body":[],
"type":"BlockStatement"
},
"expres... | rust_cleaned_test_functions.jsonl/64669 | {
"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,
33741,
649,
7523,
34729,
368,
341,
262,
1077,
1531,
649,
7523,
284,
9236,
649,
7523,
486,
931,
543,
262,
1077,
15676,
284,
1531,
649,
7523,
4632,
2895,
445,
1688,
15229,
368,
4687,
1138,
286,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contains() {
let mut buf = Buffer::new();
buf.insert(0, &['a', 'b', 'c', 'd', 'e', 'f', 'g']);
let mut buf2 = Buffer::new();
buf2.insert(0, &['a', 'b', 'c']);
assert_eq!(buf.contains(&buf2), true);
let mut buf2 = Buffer::new();
buf2.insert(... | rust_cleaned_test_functions.jsonl/61898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
368,
341,
286,
1077,
5206,
6607,
284,
10312,
486,
931,
543,
286,
6607,
7030,
7,
15,
11,
609,
677,
64,
516,
364,
65,
516,
364,
66,
516,
364,
67,
516,
364,
68,
516,
364,
69,
516,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_filter() {
let mut rt = Runtime::new().unwrap();
// should always resolve to something and keep this test from being flaky.
let f = async move {
// this should always return something
let addrs = resolve_with_filter(IpFilter... | rust_cleaned_test_functions.jsonl/98947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 604
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
6615,
8727,
368,
341,
286,
1077,
5206,
16677,
284,
10954,
486,
931,
1005,
15454,
1428,
1789,
286,
442,
1265,
2677,
8830,
311,
2494,
323,
2506,
419,
1273,
504,
1660,
1320,
28100,
382,
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_random_extreme_thresholds() {
let mut rng = rand::thread_rng();
let sks = SecretKeySet::random(0, &mut rng);
assert_eq!(0, sks.threshold());
assert!(SecretKeySet::try_random(usize::max_value(), &mut rng).is_err());
} | rust_cleaned_test_functions.jsonl/30567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
9927,
9634,
21858,
82,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
1901,
82,
284,
8599,
1592,
1649,
486,
11463,
7,
15,
11,
609,
6984,
28422,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reduce_middleware() {
let initial_state = TestState { counter: 0 };
let store = StoreRef::new(TestReducer, initial_state);
let callback_test = Rc::new(RefCell::new(0));
let callback_test_copy = callback_test.clone();
let callback: Callback<TestState, Test... | rust_cleaned_test_functions.jsonl/69274 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64596,
717,
11603,
368,
341,
286,
1077,
2856,
4387,
284,
3393,
1397,
314,
5546,
25,
220,
15,
2605,
286,
1077,
3553,
284,
9129,
3945,
486,
931,
31159,
20874,
11,
2856,
4387,
626,
286,
1077,
4822,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_post_dynamic_to_fixed_input() {
let dynamic_a = GeneratePoStDynamicSectorsCountInput {
post_config: TEST_CONFIG,
challenge_seed: [0; 32],
input_parts: vec![],
};
let dynamic_b = GeneratePoStDynamicSectorsCountInput {
... | rust_cleaned_test_functions.jsonl/6741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1034
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
6333,
45992,
2346,
37839,
5898,
368,
341,
286,
1077,
8741,
4306,
284,
19813,
32904,
623,
21752,
50,
10605,
2507,
2505,
341,
310,
1736,
5332,
25,
13602,
12568,
345,
310,
8645,
33809,
25,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_process_instruction_decode_bail() {
assert_eq!(
super::process_instruction(&Pubkey::default(), &[], &[],),
Err(InstructionError::NotEnoughAccountKeys),
);
} | rust_cleaned_test_functions.jsonl/74409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
11305,
54923,
15227,
880,
604,
368,
341,
286,
2060,
10714,
33673,
310,
2256,
486,
4630,
54923,
2099,
29162,
792,
486,
2258,
1507,
609,
12995,
609,
12995,
1326,
310,
15495,
7,
16664,
1454,
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 |
#[test]
fn test_note_is_tonic_first_note() {
let constraint: Box<dyn SinglePartConstraint> = Box::new(NoteIsTonic(0));
assert!(constraint.is_active(&vec![], 10));
assert!(!constraint.is_active(&vec![PitchClassOctave(PC::from_str("E").unwrap(), 1)], 10));
run_scale_free_test(&cons... | rust_cleaned_test_functions.jsonl/74361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27207,
6892,
528,
14011,
12978,
27207,
368,
341,
286,
1077,
21568,
25,
8261,
92846,
11327,
5800,
17890,
29,
284,
8261,
486,
931,
89389,
3872,
51,
14011,
7,
15,
1106,
286,
2060,
10297,
48057,
2079,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_day08() {
let test_input = "nop +0
acc +1
jmp +4
acc +3
jmp -3
acc -99
acc +1
jmp -4
acc +6"
.to_owned();
assert_eq!(part1(&parse(&test_input)), 5);
assert_eq!(part2(&parse(&test_input)), 8);
} | rust_cleaned_test_functions.jsonl/28052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16763,
15,
23,
368,
341,
286,
1077,
1273,
5898,
284,
330,
62813,
488,
15,
198,
4475,
488,
16,
198,
61055,
488,
19,
198,
4475,
488,
18,
198,
61055,
481,
18,
198,
4475,
481,
24,
24,
198,
4475,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multi_time_parse() {
assert_eq!(
parse_duration::parse("2.5s500ms").unwrap(),
Duration::from_secs(3)
)
} | rust_cleaned_test_functions.jsonl/7236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
3009,
21039,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
25454,
486,
6400,
445,
17,
13,
20,
82,
20,
15,
15,
1011,
1827,
15454,
3148,
310,
21045,
486,
1499,
68718,
7,
18,
340,
286,
172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unsigned_limits() {
assert_eq!(
read_unsigned(&cbor_unsigned!(std::u64::MAX)),
Ok(std::u64::MAX)
);
assert_eq!(
read_unsigned(&cbor_unsigned!((std::i64::MAX as u64) + 1)),
Ok((std::i64::MAX as u64) + 1)
);
... | rust_cleaned_test_functions.jsonl/51434 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
67830,
31820,
368,
341,
286,
2060,
10714,
33673,
310,
1349,
67830,
2099,
7221,
269,
67830,
10297,
1834,
486,
84,
21,
19,
486,
10586,
6965,
310,
7622,
5194,
486,
84,
21,
19,
486,
10586,
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... | 1 |
#[test]
fn test_map_str() {
let c = make();
let m: Map<String, String> = c.get("place.creator").unwrap();
if cfg!(feature = "preserve_order") {
assert_eq!(
m.into_iter().collect::<Vec<(String, String)>>(),
vec![
("name".to_string(), "John Smith".to_st... | rust_cleaned_test_functions.jsonl/39927 | {
"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,
5376,
2895,
368,
341,
262,
1077,
272,
284,
1281,
543,
262,
1077,
296,
25,
5027,
3464,
11,
923,
29,
284,
272,
670,
445,
2007,
79660,
1827,
15454,
1428,
262,
421,
13286,
10297,
12753,
284,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ends_with_path() {
macro_rules! t(
(s: $path:expr, $child:expr, $exp:expr) => (
{
let path = Path::new($path);
let child = Path::new($child);
assert_eq!(path.ends_with_path(&child), $exp);
... | rust_cleaned_test_functions.jsonl/105888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 906
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90729,
6615,
2638,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
3048,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ascii_uppercase() {
assert_eq!(Atom::from("").to_ascii_uppercase(), Atom::from(""));
assert_eq!(Atom::from("aZ9").to_ascii_uppercase(), Atom::from("AZ9"));
assert_eq!(Atom::from("The Quick Brown Fox!").to_ascii_uppercase(), Atom::from("THE QUICK BROWN FOX!"));
ass... | rust_cleaned_test_functions.jsonl/80901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50238,
34445,
5638,
368,
341,
286,
2060,
10714,
10297,
35836,
486,
1499,
80821,
983,
50238,
34445,
5638,
1507,
39516,
486,
1499,
89744,
286,
2060,
10714,
10297,
35836,
486,
1499,
445,
64,
57,
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_lines_in_range_simple() {
let ranges_to_test = vec![
(("foo.rs", 1, 10), ("foo.rs", 5, 12)),
(("foo.rs", 1, 10), ("foo.rs", 5, 11)),
(("foo.rs", 1, 10), ("foo.rs", 10, 19)),
(("foo.rs", 1, 10), ("foo.rs", 9, 12)),
(("foo.rs", 8,... | rust_cleaned_test_functions.jsonl/28050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18323,
1243,
9698,
30015,
368,
341,
286,
1077,
21283,
2346,
4452,
284,
7486,
90515,
310,
89101,
7975,
25638,
497,
220,
16,
11,
220,
16,
15,
701,
3489,
7975,
25638,
497,
220,
20,
11,
220,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_environment_is_removed() {
let mut event = Annotated::new(Event {
environment: Annotated::new("".to_string()),
..Event::default()
});
let mut processor = NormalizeProcessor::default();
process_value(&mut event, &mut processor, ProcessingState::root()).unwra... | rust_cleaned_test_functions.jsonl/14089 | {
"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,
15124,
51774,
6892,
68248,
368,
341,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
341,
286,
4573,
25,
1527,
87029,
486,
931,
445,
3263,
983,
3904,
14702,
286,
5241,
1556,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_acceptance_message() {
init!("true");
let handle = create_connection("test_process_acceptance_message").unwrap();
let message = serde_json::from_str(INVITE_ACCEPTED_RESPONSE).unwrap();
assert_eq!(error::SUCCESS.code_num, process_acceptance_message(handle, ... | rust_cleaned_test_functions.jsonl/34230 | {
"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,
11305,
35728,
681,
6462,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
3705,
284,
1855,
15866,
445,
1944,
11305,
35728,
681,
6462,
1827,
15454,
543,
286,
1077,
1943,
284,
61570,
9455,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deduct() {
let mut deps = mock_dependencies(&[]);
let tax_rate = Decimal::percent(2);
let tax_cap = Uint128::from(1_000_000u128);
deps.querier.with_tax(
Decimal::percent(2),
&[(&"uusd".to_string(), &Uint128::from(1000000u128))],
);
let amount = Uint128::... | rust_cleaned_test_functions.jsonl/8665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
80500,
368,
341,
262,
1077,
5206,
48178,
284,
7860,
71841,
2099,
1294,
626,
262,
1077,
3742,
9246,
284,
26728,
486,
24422,
7,
17,
317,
262,
1077,
3742,
16388,
284,
27883,
16,
17,
23,
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_deletions_ouside_band() {
let x = b"AAAAATTGAGGAGTAATAGTAAA";
let y = b"AAAAAAAAAAAAGGAAGG";
let base_score = Scoring::from_scores(-13, 0, 1, -5);
let scoring = Scoring {
xclip_prefix: 0,
xclip_suffix: -136,
yclip_prefix: -112,
... | rust_cleaned_test_functions.jsonl/126767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 741
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
1149,
908,
62,
782,
577,
45344,
368,
341,
286,
1077,
856,
284,
293,
1,
25699,
21614,
38,
1890,
38,
1890,
15204,
828,
1890,
51,
50107,
876,
286,
1077,
379,
284,
293,
1,
57905,
50107,
1890... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rchunksator() {
let v = &[1, 2, 3, 4, 5];
assert_eq!(v.rchunks(2).len(), 3);
let chunks: &[&[_]] = &[&[4, 5], &[2, 3], &[1]];
assert_eq!(v.rchunks(2).collect::<Vec<_>>(), chunks);
let chunks: &[&[_]] = &[&[3, 4, 5], &[1, 2]];
assert_eq!(v.rchunks(3).collect::<Vec<_>>(),... | rust_cleaned_test_functions.jsonl/12905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
84263,
850,
368,
341,
262,
1077,
348,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
4821,
262,
2060,
10714,
10297,
85,
1746,
84263,
7,
17,
568,
2892,
1507,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_union() {
let ir = ir_from_cc("union SomeUnion { int first_field; int second_field; };").unwrap();
assert_ir_matches!(
ir,
quote! {
Record {
rs_name: "SomeUnion" ...
cc_name: "SomeUnion" ...
fields: [
... | rust_cleaned_test_functions.jsonl/37206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 907
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
445,
16192,
4329,
32658,
314,
526,
1156,
5013,
26,
526,
2086,
5013,
26,
20066,
1827,
15454,
543,
262,
2060,
51433,
38344,
33673,
286,
6216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_level2() {
delay();
let found_snapshot = Arc::new(AtomicBool::new(false));
let found_snapshot_2 = found_snapshot.clone();
let found_l2update = Arc::new(AtomicBool::new(false));
let found_l2update_2 = found_l2update.clone();
// hard to check in san... | rust_cleaned_test_functions.jsonl/118782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 842
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8274,
17,
368,
341,
286,
7626,
543,
286,
1077,
1730,
53265,
284,
19689,
486,
931,
7,
65857,
11233,
486,
931,
3576,
1106,
286,
1077,
1730,
53265,
62,
17,
284,
1730,
53265,
15997,
543,
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... | 4 |
#[test]
fn test_reading_single_line() {
let mut pointer = "9q5".as_bytes();
let reader = Reader::new(&mut pointer);
assert_eq!(1, reader.count());
} | rust_cleaned_test_functions.jsonl/100197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81859,
19487,
6528,
368,
341,
286,
1077,
5206,
7445,
284,
330,
24,
80,
20,
3263,
300,
12524,
543,
286,
1077,
6604,
284,
25166,
486,
931,
2099,
6984,
7445,
317,
286,
2060,
10714,
10297,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_take_random() -> Result<()> {
// Test DFUint16Array
let df_uint16_array = &DFUInt16Array::new_from_iter(1u16..4u16);
// Create TakeRandBranch for the array
let taker = df_uint16_array.take_rand();
// Call APIs defined in trait TakeRandom
assert_eq!(Some(1u16), taker.get(0... | rust_cleaned_test_functions.jsonl/13062 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 758
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
22644,
368,
1464,
5714,
71698,
341,
262,
442,
3393,
43376,
21570,
16,
21,
1857,
198,
262,
1077,
6764,
15807,
16,
21,
3858,
284,
609,
5262,
18777,
16,
21,
1857,
486,
931,
5673,
11723,
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_config_with_invalid_options() {
let query = "query";
let file = File::open("./test-data/test.txt").unwrap();
let config = Config::new(Some("vi"), query, &file);
assert_eq!(config.is_err(), true);
} | rust_cleaned_test_functions.jsonl/63338 | {
"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,
5332,
6615,
31433,
8743,
368,
341,
286,
1077,
3239,
284,
330,
1631,
876,
286,
1077,
1034,
284,
2887,
486,
2508,
13988,
1944,
13945,
12697,
3909,
1827,
15454,
543,
286,
1077,
2193,
284,
5532,
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 |
#[test]
fn test_partition_limits_boundary5() {
let mut part = Partition::new(100, 1000, 100, true);
part.allocate_causetids(901); // One more than allowed.
} | rust_cleaned_test_functions.jsonl/13984 | {
"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,
43840,
31820,
54004,
20,
368,
341,
286,
1077,
5206,
949,
284,
54626,
486,
931,
7,
16,
15,
15,
11,
220,
16,
15,
15,
15,
11,
220,
16,
15,
15,
11,
830,
317,
286,
949,
68726,
666,
11855,
295,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unix_datagram_recv() {
let dir = tmpdir();
let path1 = dir.path().join("sock1");
let sock1 = or_panic!(UnixDatagram::bind(&path1));
let sock2 = or_panic!(UnixDatagram::unbound());
or_panic!(sock2.connect(&path1));
let msg = b"hello world";
... | rust_cleaned_test_functions.jsonl/13728 | {
"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,
80572,
15353,
5745,
36118,
368,
341,
286,
1077,
5419,
284,
4174,
3741,
543,
286,
1077,
1815,
16,
284,
5419,
3875,
1005,
5987,
445,
13199,
16,
3071,
286,
1077,
11087,
16,
284,
476,
620,
31270,
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_encode_histogram() {
let metric = Metric {
name: "requests".to_owned(),
timestamp: None,
tags: None,
kind: MetricKind::Absolute,
value: MetricValue::AggregatedHistogram {
buckets: vec![1.0, 2.1, 3.0],
... | rust_cleaned_test_functions.jsonl/120140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
68564,
368,
341,
286,
1077,
18266,
284,
52458,
341,
310,
829,
25,
330,
36242,
3263,
983,
51973,
3148,
310,
11441,
25,
2240,
345,
310,
9492,
25,
2240,
345,
310,
3093,
25,
52458,
10629,
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_struct() -> Result<()> {
use hex_literal::hex;
#[bitcoin_code(crate = "crate")]
#[derive(BitcoinCode, PartialEq, Debug)]
struct Test {
int: u32,
seq: Vec<Vec<u8>>,
}
let j = hex!("010000000201770199");
let expected ... | rust_cleaned_test_functions.jsonl/77193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
368,
1464,
5714,
71698,
341,
286,
990,
12371,
34100,
486,
17308,
280,
286,
11506,
83910,
4136,
54907,
284,
330,
61711,
5422,
286,
11506,
27098,
68653,
7160,
2078,
11,
55039,
11,
11091,
5563,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_redirect_301_and_302_and_303_changes_post_to_get() {
let client = reqwest::Client::new();
let codes = [301, 302, 303];
for code in codes.iter() {
let redirect = server! {
request: format!("\
POST /{} HTTP/1.1\r\n\
user-agent: $USER... | rust_cleaned_test_functions.jsonl/105509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1062
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30043,
62,
18,
15,
16,
8378,
62,
18,
15,
17,
8378,
62,
18,
15,
18,
47526,
6333,
2346,
3062,
368,
341,
262,
1077,
2943,
284,
4232,
11039,
486,
2959,
486,
931,
543,
262,
1077,
13912,
284,
508,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_matrix_components1() {
let matrix = Matrix2x2::new(1_i32, 2_i32, 3_i32, 4_i32);
assert_eq!(matrix[0][0], 1_i32);
assert_eq!(matrix[0][1], 2_i32);
assert_eq!(matrix[1][0], 3_i32);
assert_eq!(matrix[1][1], 4_i32);
} | rust_cleaned_test_functions.jsonl/128952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10193,
23258,
16,
368,
341,
286,
1077,
6172,
284,
11631,
17,
87,
17,
486,
931,
7,
16,
5318,
18,
17,
11,
220,
17,
5318,
18,
17,
11,
220,
18,
5318,
18,
17,
11,
220,
19,
5318,
18,
17,
626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reference_after_initialzation() {
test("var a; a = foo();a;", "foo();");
test_same("var a; if (a = foo()) { alert(3); } a;");
test_same("var a; switch (a = foo()) {} a;");
test_same("var a; function f(){ return a = foo(); } a;");
test_same("function f(){ var a; return ... | rust_cleaned_test_functions.jsonl/27621 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
25433,
19844,
15809,
89,
367,
368,
341,
262,
1273,
445,
947,
264,
26,
264,
284,
15229,
2129,
64,
32503,
330,
7975,
2129,
797,
262,
1273,
33574,
445,
947,
264,
26,
421,
320,
64,
284,
152... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tcp_sack_block() {
let sack = TcpSackBlock::new(1, 2);
assert_eq!(sack.left_edge.get(), 1);
assert_eq!(sack.right_edge.get(), 2);
assert_eq!(sack.left_edge(), 1);
assert_eq!(sack.right_edge(), 2);
} | rust_cleaned_test_functions.jsonl/121768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
643,
473,
7113,
368,
341,
310,
1077,
52333,
284,
64876,
50,
473,
4713,
486,
931,
7,
16,
11,
220,
17,
317,
310,
2060,
10714,
10297,
82,
473,
8272,
17932,
670,
1507,
220,
16,
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,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_valid_interface() {
let iface_name = "eth0".to_string();
let mut interfaces: Vec<NetworkInterface> = vec![];
let intf_eth0 = NetworkInterface {
name: "eth0".to_string(),
index: 0,
mac: None,
ips: vec![],
fla... | rust_cleaned_test_functions.jsonl/41629 | {
"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,
3062,
8337,
20546,
368,
341,
286,
1077,
49313,
1269,
284,
330,
769,
15,
3263,
983,
3904,
543,
286,
1077,
5206,
24099,
25,
11312,
27,
12320,
5051,
29,
284,
7486,
0,
40901,
286,
1077,
93706,
57757... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_size() {
let data = [(), (), ()];
let traversal: Vec<()> = data.as_slice().map(|&x| x).collect();
assert_eq!(&*traversal, data.as_slice());
} | rust_cleaned_test_functions.jsonl/117263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
2368,
368,
341,
286,
1077,
821,
284,
508,
1507,
38104,
1719,
935,
286,
1077,
56302,
25,
11312,
71698,
284,
821,
5357,
26488,
1005,
2186,
22428,
5,
87,
91,
856,
568,
17384,
543,
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 |
#[test]
fn test_pop_covar_consistent_with_pop_var() {
let mut data = testing::load_data("nist/lottery.txt");
assert_almost_eq!((&data).population_variance(), (&data).population_covariance(&data), 1e-10);
data = testing::load_data("nist/lew.txt");
assert_almost_eq!((&data).popula... | rust_cleaned_test_functions.jsonl/55247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
50028,
277,
31971,
18128,
6615,
17061,
4612,
368,
341,
286,
1077,
5206,
821,
284,
7497,
486,
1078,
1769,
445,
64759,
14,
9184,
17615,
3909,
797,
286,
2060,
94418,
10714,
0,
42902,
691,
568,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status_service_fail_endpoints() {
let _guard = fail::FailScenario::setup();
let config = TiKvConfig::default();
let mut status_server = StatusServer::new(1, config);
let _ = status_server.start("127.0.0.1:0".to_string());
let client = Client::new();
... | rust_cleaned_test_functions.jsonl/47232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2996
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
12267,
22121,
6213,
7706,
368,
341,
286,
1077,
716,
26098,
284,
3690,
486,
19524,
54031,
486,
15188,
543,
286,
1077,
2193,
284,
22325,
42,
85,
2648,
486,
2258,
543,
286,
1077,
5206,
2639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_triangle() {
let mut dcel = DCEL::new();
let v0 = dcel.insert_vertex(());
let v1 = dcel.insert_vertex(());
let v2 = dcel.insert_vertex(());
let e01 = dcel.connect_two_isolated_vertices(v0, v1, 0);
let e12 = dcel.connect_edge_to_isolated_vert... | rust_cleaned_test_functions.jsonl/7373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 929
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
70575,
368,
341,
286,
1077,
5206,
294,
3672,
284,
422,
41664,
486,
931,
543,
286,
1077,
348,
15,
284,
294,
3672,
7030,
26611,
7,
1423,
286,
1077,
348,
16,
284,
294,
3672,
7030,
26611,
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_record_special_member_access_specifiers() {
let ir = ir_from_cc(
"
struct SomeStruct {
private:
SomeStruct(SomeStruct& s);
protected:
SomeStruct(SomeStruct&& s);
public:
~SomeStruct();
};
",
)
... | rust_cleaned_test_functions.jsonl/37164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
41629,
19388,
12759,
13594,
11836,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
6228,
286,
2036,
4329,
9422,
341,
688,
869,
510,
310,
4329,
9422,
65405,
9422,
5,
274,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_output_read() -> Result<(), Box<dyn Error>> {
TestSample {
source: StringLiteral(",..+"),
expected_result: Some(BinaryLiteral(&[11][..])),
expected_output: Some(BinaryLiteral(&[10, 10][..])),
input_data: Some(BinaryLiteral(&[10][..])),
}.run()
} | rust_cleaned_test_functions.jsonl/20222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
6443,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
3393,
17571,
341,
286,
2530,
25,
923,
17350,
12918,
496,
10,
4461,
286,
3601,
5287,
25,
4329,
77833,
17350,
2099,
58,
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... | 1 |
#[test]
fn test_get_neighbors_linux() {
use crate::KI;
use std::os::unix::process::ExitStatusExt;
use std::process::ExitStatus;
use std::process::Output;
KI.set_mock(Box::new(move |program, args| {
assert_eq!(program, "ip");
assert_eq!(args, &["neigh"]);
Ok(Output ... | rust_cleaned_test_functions.jsonl/33712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 608
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
55925,
77463,
368,
341,
262,
990,
17717,
486,
80971,
401,
262,
990,
1460,
486,
436,
486,
56646,
486,
4630,
486,
15339,
2522,
6756,
280,
262,
990,
1460,
486,
4630,
486,
15339,
2522,
280,
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,
1,
1... | 1 |
#[test]
fn test_register_virtio_device() {
let start_addr1 = GuestAddress(0x0);
let start_addr2 = GuestAddress(0x1000);
let guest_mem =
GuestMemoryMmap::from_ranges(&[(start_addr1, 0x1000), (start_addr2, 0x1000)]).unwrap();
let mut vm = builder::setup_kvm_vm(&guest_me... | rust_cleaned_test_functions.jsonl/34958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
2273,
2106,
815,
9204,
368,
341,
286,
1077,
1191,
7387,
16,
284,
26215,
4286,
7,
15,
87,
15,
317,
286,
1077,
1191,
7387,
17,
284,
26215,
4286,
7,
15,
87,
16,
15,
15,
15,
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_generate_getter_from_field_with_visibility_marker() {
check_assist(
generate_getter,
r#"
pub(crate) struct Context {
dat$0a: Data,
}
"#,
r#"
pub(crate) struct Context {
data: Data,
}
impl Context {
/// Get a reference to the context's data... | rust_cleaned_test_functions.jsonl/127256 | {
"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,
48851,
3062,
465,
5673,
5013,
6615,
71256,
26267,
368,
341,
286,
1779,
12083,
380,
1006,
310,
6923,
3062,
465,
345,
310,
435,
2,
698,
9585,
54907,
8,
2036,
9608,
341,
262,
3258,
3,
15,
64,
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_example_toml_startup() {
named_test_harness("example.toml", |_, tcp_port, _, _| {
let mut io_loop = Runtime::new().unwrap();
let addr: SocketAddr = SocketAddr::new(
Ipv4Addr::new(127, 0, 0, 1).into(),
tcp_port.expect("no tcp_port"),
);
... | rust_cleaned_test_functions.jsonl/88395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 566
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
528,
316,
75,
80858,
368,
341,
262,
6941,
4452,
1523,
23518,
445,
8687,
73494,
75,
497,
760,
6878,
28051,
8716,
11,
8358,
85137,
341,
286,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stream_lookup_dft_fault() {
let spec = "output a: UInt8 := 3\n output b: Bool := a[-1].defaults(to: false)";
assert_eq!(1, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
27464,
814,
723,
70097,
368,
341,
286,
1077,
1398,
284,
330,
3006,
264,
25,
22275,
23,
1669,
220,
18,
1699,
2550,
293,
25,
12608,
1669,
264,
7609,
16,
936,
26756,
12186,
25,
895,
24023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_push_maybe_quoted_string() {
assert_eq!(push_maybe_quoted_string(String::from_str("foo,"), &String::from_str("bar")), String::from_str("foo,bar"));
assert_eq!(push_maybe_quoted_string(String::from_str("foo,"), &String::from_str("bar/baz")), String::from_str("foo,\"bar/baz\""));
... | rust_cleaned_test_functions.jsonl/8812 | {
"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,
14218,
717,
49791,
11280,
9253,
3904,
368,
341,
286,
2060,
10714,
10297,
9077,
717,
49791,
11280,
9253,
3904,
2242,
486,
1499,
2895,
445,
7975,
1335,
701,
609,
703,
486,
1499,
2895,
445,
2257,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_idents_by_lowercasing_github_urls() {
let ident1 = ident(&url("https://github.com/PistonDevelopers/piston"));
let ident2 = ident(&url("https://github.com/pistondevelopers/piston"));
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/74052 | {
"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,
27421,
22391,
551,
842,
805,
3710,
30425,
66,
4422,
1889,
3827,
32822,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
1085,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
4010... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date_addassignment() {
let ymd = NaiveDate::from_ymd;
let mut date = ymd(2016, 10, 1);
date += Duration::days(10);
assert_eq!(date, ymd(2016, 10, 11));
date += Duration::days(30);
assert_eq!(date, ymd(2016, 11, 10));
} | rust_cleaned_test_functions.jsonl/4770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
2891,
29951,
368,
341,
286,
1077,
379,
2277,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
280,
286,
1077,
5206,
2400,
284,
379,
2277,
7,
17,
15,
16,
21,
11,
220,
16,
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_parse_put_request() {
assert!(parse_put_drive(&Body::new("invalid_payload"), Some(&"id")).is_err());
// PATCH with invalid fields.
let body = r#"{
"drive_id": "bar",
"is_read_only": false
}"#;
assert!(parse_put_drive(... | rust_cleaned_test_functions.jsonl/8226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15557,
7893,
368,
341,
286,
2060,
10297,
6400,
15557,
67151,
2099,
5444,
486,
931,
445,
11808,
32813,
3975,
4329,
2099,
1,
307,
15197,
285,
9266,
5231,
286,
442,
59345,
448,
8318,
5043,
624... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_case_insensitive() {
let cases = [
(Level::Fatal, [level_token("fatal")]),
(Level::Error, [level_token("error")]),
(Level::Warn, [level_token("warn")]),
(Level::Info, [level_token("info")]),
(Level::Debug, [level_token("de... | rust_cleaned_test_functions.jsonl/91798 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8274,
19096,
34386,
18723,
368,
341,
286,
1077,
5048,
284,
2278,
310,
320,
4449,
486,
62396,
11,
508,
3294,
6458,
445,
74394,
899,
17036,
310,
320,
4449,
486,
1454,
11,
508,
3294,
6458,
445,
841... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_asn1_non_der_signature() {
assert!(Signature::from_der(&[
der::Tag::Sequence.into(),
0x06, // length of below
der::Tag::Integer.into(),
0x01, // length of value
0x01, // value=1
der::Tag::Integer.into(),
... | rust_cleaned_test_functions.jsonl/113398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 496
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
77,
16,
21637,
35345,
39859,
368,
341,
1789,
286,
2060,
10297,
25088,
486,
1499,
35345,
2099,
9640,
310,
2694,
486,
5668,
486,
14076,
39860,
3148,
310,
220,
15,
87,
15,
21,
11,
442,
3084,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hotplug() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let api_socket = temp_api_path(&guest.tmp_dir);
let kernel_path = direct_kernel_boot_path();
let mut child = ... | rust_cleaned_test_functions.jsonl/29408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
33433,
47474,
368,
341,
310,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
310,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
955,
3683... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_has_with_p_steps_v2() {
let client = graph_serializer(GraphSON::V2);
drop_vertices(&client, "test_has_with_p_steps").unwrap();
let g = traversal().with_remote(client);
g.add_v("test_has_with_p_steps")
.property("age", 26)
.to_list()
.unwrap();
let v... | rust_cleaned_test_functions.jsonl/26298 | {
"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,
21778,
6615,
620,
22731,
2273,
17,
368,
341,
262,
1077,
2943,
284,
4771,
67441,
63779,
2703,
486,
53,
17,
626,
262,
5943,
37720,
2099,
2972,
11,
330,
1944,
21778,
6615,
620,
22731,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero_on_nonzero_integer_missing_byte() {
let bytes = &[0; 7];
assert_eq!(
std::num::NonZeroUsize::try_from_slice(bytes)
.unwrap_err()
.to_string(),
ERROR_UNEXPECTED_LENGTH_OF_INPUT
);
} | rust_cleaned_test_functions.jsonl/103726 | {
"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,
19359,
4470,
21637,
14154,
31725,
40447,
19737,
368,
341,
262,
1077,
5820,
284,
44590,
15,
26,
220,
22,
935,
262,
2060,
10714,
33673,
286,
1460,
486,
2413,
486,
8121,
17999,
52,
2141,
486,
1539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_udf() {
let df = get_df();
let new = df
.lazy()
.select([col("sepal.width").map(|s| Ok(s * 200.0), GetOutput::same_type())])
.collect()
.unwrap();
assert_eq!(
new.column("sepal.width").unwrap().f64().unwrap().get(0),
Some(700.0)
... | rust_cleaned_test_functions.jsonl/108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
71939,
69,
368,
341,
262,
1077,
6764,
284,
633,
10894,
543,
262,
1077,
501,
284,
6764,
198,
286,
659,
49013,
741,
286,
659,
1742,
2561,
2074,
445,
325,
19308,
5441,
1827,
2186,
22428,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_equality() {
assert_eq!(MetricValue::Int(1), MetricValue::Int(1));
assert_eq!(MetricValue::Float(1.0), MetricValue::Float(1.0));
assert_eq!(MetricValue::String("A".to_string()), MetricValue::String("A".to_string()));
assert_eq!(MetricValue::Bool(true), Me... | rust_cleaned_test_functions.jsonl/36072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
10473,
368,
341,
1789,
286,
2060,
10714,
10297,
54310,
1130,
486,
1072,
7,
16,
701,
52458,
1130,
486,
1072,
7,
16,
1106,
286,
2060,
10714,
10297,
54310,
1130,
486,
5442,
7,
16,
13,
15,
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_multi_threaded_access() {
// Use Arc from the Stdlib to keep track of observed values.
let observations = ::std::sync::Arc::new(
::std::sync::Mutex::new(
Vec::<i32>::new(),
),
);
let o1 = observations.clone();
let o2... | rust_cleaned_test_functions.jsonl/1840 | {
"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,
25133,
10814,
291,
12759,
368,
341,
286,
442,
5443,
19689,
504,
279,
42517,
2740,
311,
2506,
3754,
315,
13166,
2750,
624,
286,
1077,
23722,
284,
3504,
1834,
486,
12996,
486,
36809,
486,
931,
1006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encoding_script() {
static OP_RETURN: [u8; 40] = [
0x26, 0x0, 0x6a, 0x24, 0xaa, 0x21, 0xa9, 0xed, 0x20, 0x28, 0xf,
0x53, 0xf2, 0xd2, 0x16, 0x63, 0xca, 0xc8, 0x9e, 0x6b, 0xd2, 0xad,
0x19, 0xed, 0xba, 0xbb, 0x4, 0x8c, 0xda, 0x8, 0xe7, 0x3e, 0xd1,
... | rust_cleaned_test_functions.jsonl/43977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1684
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
14660,
368,
341,
286,
1099,
13134,
21909,
25,
508,
84,
23,
26,
220,
19,
15,
60,
284,
2278,
310,
220,
15,
87,
17,
21,
11,
220,
15,
87,
15,
11,
220,
15,
87,
21,
64,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tcp_listen_only() {
let server = TcpListener::bind("127.0.0.1:0").unwrap();
let server_addr = server.local_addr().unwrap();
let client = TcpStream::connect(server_addr).unwrap();
let client_addr = client.local_addr().unwrap();
let mut session = session::t... | rust_cleaned_test_functions.jsonl/90995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
79286,
18410,
368,
341,
286,
1077,
3538,
284,
64876,
2743,
486,
7666,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1827,
15454,
543,
286,
1077,
3538,
7387,
284,
3538,
11033,
7387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_binary_generic() {
let _guard = LOCK.run_concurrently();
let src = Binary {
subtype: BinarySubtype::Generic,
bytes: vec![0, 1, 2, 3, 4],
};
let dst = vec![
20, 0, 0, 0, 5, 107, 101, 121, 0, 5, 0, 0, 0, 0, 0, 1, 2, 3, 4, 0,
];
let doc = d... | rust_cleaned_test_functions.jsonl/49150 | {
"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,
88686,
31761,
41232,
368,
341,
262,
1077,
716,
26098,
284,
49463,
7634,
3382,
58202,
543,
262,
1077,
2286,
284,
17718,
341,
286,
52482,
25,
17718,
3136,
1313,
486,
19964,
345,
286,
5820,
25,
7486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long() {
assert_eq!(
Variant::VLong(42).divide(Variant::VInteger(2)).unwrap(),
Variant::VInteger(21)
);
} | rust_cleaned_test_functions.jsonl/84633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
368,
341,
394,
2060,
10714,
33673,
503,
39292,
486,
53,
6583,
7,
19,
17,
568,
59394,
12410,
15341,
486,
53,
3486,
7,
17,
4579,
15454,
3148,
503,
39292,
486,
53,
3486,
7,
17,
16,
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 |
#[test]
fn test_root_ns_func_ret_nonpod() {
let hdr = indoc! {"
#include <cstdint>
#include <memory>
struct Bob {
uint32_t a;
};
namespace B {
inline Bob daft() { Bob bob; bob.a = 12; return bob; }
}
"};
let rs = quote! {
... | rust_cleaned_test_functions.jsonl/9840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
34728,
9596,
21695,
21637,
39073,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
671,
997,
366,
17269,
397,
286,
2036,
14261,
341,
310,
2622... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_large_rate() -> Result<(), Box<dyn std::error::Error>> {
Command::new(get_os_binary_loc())
.arg("-r")
.arg("18446744073709551616")
.assert()
.failure()
.stderr(predicate::str::contains(
"Please set your update rate to be at most unsigned IN... | rust_cleaned_test_functions.jsonl/65682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
9246,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
7348,
486,
931,
5433,
29387,
31761,
13400,
2398,
286,
659,
858,
13645,
81,
1138,
286,
659,
858,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_router_alert() {
let mut buffer = [0u8; 4];
let option = Ipv4Option { copied: true, data: Ipv4OptionData::RouterAlert { data: 0 } };
<Ipv4Option<'_> as RecordBuilder>::serialize_into(&option, &mut buffer);
assert_eq!(buffer[0], 148);
... | rust_cleaned_test_functions.jsonl/31698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
55587,
35717,
368,
341,
310,
1077,
5206,
4147,
284,
508,
15,
84,
23,
26,
220,
19,
935,
310,
1077,
2999,
284,
358,
30168,
19,
5341,
314,
21774,
25,
830,
11,
821,
25,
358,
30168,
19,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_service_uuid() {
assert_eq!(find_service_uuid("GAP"), Some(SERVICE_UUIDS[0]));
assert_eq!(find_service_uuid("Gap"), Some(SERVICE_UUIDS[0]));
assert_eq!(find_service_uuid("gap"), Some(SERVICE_UUIDS[0]));
assert_eq!(find_service_uuid("hIdS"), Some(SERVICE_UUIDS... | rust_cleaned_test_functions.jsonl/46715 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 717
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
12267,
25540,
368,
341,
286,
2060,
10714,
10297,
3903,
12267,
25540,
445,
38,
2537,
3975,
4329,
3759,
71598,
57499,
50,
58,
15,
14382,
286,
2060,
10714,
10297,
3903,
12267,
25540,
445,
12868,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_put_logger() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
let req_as_bytes = b"PUT /logger HTTP/1.1\r\n\
Content-Type: application/json\r\n\
Content-Length: 91\r\n... | rust_cleaned_test_functions.jsonl/43146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
15557,
27413,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
626,
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_swma1() {
let mut candles = RandomCandles::default();
let mut ma = TestingMethod::new(1, candles.first().close).unwrap();
candles.take(100).for_each(|x| {
assert!((x.close - ma.next(x.close)).abs() < SIGMA);
});
} | rust_cleaned_test_functions.jsonl/122820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32581,
1728,
16,
368,
341,
197,
10217,
5206,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
197,
10217,
5206,
7491,
284,
26768,
3523,
486,
931,
7,
16,
11,
51205,
7389,
1005,
5552,
568,
15454,
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_blake2f() {
let input = &hex_decode("0000000048c9bdf267e6096a3ba7ca8485ae67bb2bf894fe72f36e3cf1361d5f3af54fa5d182e6ad7f520e511f6c3e2b8c68059b6bbd41fbabd9831f79217e1319cde05b61626300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000... | rust_cleaned_test_functions.jsonl/51970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13141,
726,
17,
69,
368,
341,
262,
1077,
1946,
284,
609,
17308,
15227,
445,
15,
15,
15,
15,
15,
15,
15,
15,
19,
23,
66,
24,
65,
2940,
17,
21,
22,
68,
21,
15,
24,
21,
64,
18,
4645,
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_next_multiple_of_eight() {
for x in 0usize..=IPV6_HBH_OPTIONS_MAX_LEN {
let y = next_multiple_of_eight(x);
assert_eq!(y % 8, 0);
assert!(y >= x);
if x % 8 == 0 {
assert_eq!(x, y);
} else {
assert_... | rust_cleaned_test_functions.jsonl/85899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
45233,
3575,
2204,
491,
368,
341,
286,
369,
856,
304,
220,
15,
51878,
496,
28,
3298,
53,
21,
2039,
97151,
36321,
6806,
15536,
341,
310,
1077,
379,
284,
1790,
45233,
3575,
2204,
491,
2075,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_healthyness() {
let mut server = common::setup_server().unwrap();
// Check that the server is healthy
let req = http::Request::get("/health").body(Body::empty()).unwrap();
let res = server.simulate(req).unwrap();
assert_eq!(res.status(), 200);
// Set the serve Unhealth... | rust_cleaned_test_functions.jsonl/14809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45727,
1872,
433,
368,
341,
262,
1077,
5206,
3538,
284,
4185,
486,
15188,
12015,
1005,
15454,
1428,
262,
442,
4248,
429,
279,
3538,
374,
9314,
271,
262,
1077,
4232,
284,
1758,
486,
1900,
486,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conversions() {
assert_eq!(
StickerFormatType::try_from(1).unwrap(),
StickerFormatType::Png
);
assert_eq!(
StickerFormatType::try_from(2).unwrap(),
StickerFormatType::Apng
);
assert_eq!(
StickerFo... | rust_cleaned_test_functions.jsonl/105268 | {
"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,
3382,
28290,
368,
341,
286,
2060,
10714,
33673,
310,
794,
5215,
4061,
929,
486,
1539,
5673,
7,
16,
568,
15454,
3148,
310,
794,
5215,
4061,
929,
486,
47,
968,
198,
286,
1439,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_2() {
let z1 = c(1f64, 2f64);
let z2 = c(3f64, 4f64);
let z3 = c(0f64, 0f64);
assert_eq!(&z1 - &z2 - &z3, c(-2.0, -2.0));
} | rust_cleaned_test_functions.jsonl/80103 | {
"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,
5228,
62,
17,
368,
341,
262,
1077,
1147,
16,
284,
272,
7,
16,
69,
21,
19,
11,
220,
17,
69,
21,
19,
317,
262,
1077,
1147,
17,
284,
272,
7,
18,
69,
21,
19,
11,
220,
19,
69,
21,
19,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aggregation() {
// prepare data and store
let tid = 1;
let cis = vec![
new_col_info(1, types::LONG_LONG),
new_col_info(2, types::VARCHAR),
new_col_info(3, types::NEW_DECIMAL),
];
let raw_data = vec![
vec![
... | rust_cleaned_test_functions.jsonl/3102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
34442,
368,
341,
286,
442,
10549,
821,
323,
3553,
198,
286,
1077,
13112,
284,
220,
16,
280,
286,
1077,
66404,
284,
7486,
90515,
310,
501,
10211,
3109,
7,
16,
11,
4494,
486,
51306,
19903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_possible_property() {
let input = "a.b.c";
let eol_reader = EolReader::from(input);
let mut parser = word_p();
let (_, result) = parser.parse(eol_reader).expect("Should parse");
assert_eq!(
... | rust_cleaned_test_functions.jsonl/102674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71244,
16638,
368,
341,
503,
1077,
1946,
284,
330,
64,
948,
520,
876,
503,
1077,
384,
337,
22306,
284,
468,
337,
5062,
486,
1499,
5384,
317,
503,
1077,
5206,
6729,
284,
3409,
620,
543,
503,
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_json2json_maintain_fields() -> Result<()> {
let mut del_test_output = DeleteTestOutput::new();
let root = find_project_root().unwrap();
let root = root.as_path();
let output_path = root.join("test_data/serial-link.log.json.output");
{
let input_path = root.join("te... | rust_cleaned_test_functions.jsonl/58779 | {
"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,
9455,
17,
2236,
717,
1641,
466,
12132,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
1594,
4452,
7645,
284,
10428,
2271,
5097,
486,
931,
1428,
262,
1077,
3704,
284,
1477,
16352,
12993,
1005,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_broken_database() {
let _ = env_logger::try_init();
let r = Reader::open_readfile("test-data/test-data/GeoIP2-City-Test-Broken-Double-Format.mmdb")
.ok()
.unwrap();
let ip: IpAddr = FromStr::from_str("2001:220::").unwrap();
#[derive(Deserialize, Debug)]
stru... | rust_cleaned_test_functions.jsonl/42005 | {
"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,
880,
81709,
27341,
368,
341,
262,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
1428,
262,
1077,
435,
284,
25166,
486,
2508,
6443,
1192,
445,
1944,
13945,
12697,
13945,
14,
37344,
3298,
17,
7658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_negative_lamports() {
// Attempt to create account with more lamports than remaining in from_account
let new_program_owner = Pubkey::new(&[9; 32]);
let from = Pubkey::new_rand();
let mut from_account = Account::new(100, 0, &system_program::id());
l... | rust_cleaned_test_functions.jsonl/24254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
53865,
907,
309,
3394,
368,
341,
286,
442,
43517,
311,
1855,
2692,
448,
803,
31603,
3394,
1091,
9664,
304,
504,
13500,
198,
286,
1077,
501,
25096,
29027,
284,
22611,
792,
486,
931,
2099,
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_deserialize_discovery_details_empty() {
let yaml = r#"
opcuaDiscoveryMethod:
standard: {}
"#;
let dh_config: OpcuaDiscoveryDetails = deserialize_discovery_details(yaml).unwrap();
let serialized = serde_json::to_string(&dh_config... | rust_cleaned_test_functions.jsonl/66110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
9932,
7449,
13260,
15124,
368,
341,
1789,
286,
1077,
32246,
284,
435,
2,
698,
310,
37027,
4284,
67400,
3523,
25,
715,
1060,
5297,
25,
5613,
286,
5869,
280,
286,
1077,
34096,
5332,
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_latex()
{
let gate = Kron::new(H::new(), X::new());
let mut state = LatexExportState::new(2, 0);
assert_eq!(gate.latex(&[0, 1], &mut state), Ok(()));
assert_eq!(state.code(),
r#"\Qcircuit @C=1em @R=.7em {
\lstick{\ket{0}} & \gate{H} & \qw \\
\lstick{\k... | rust_cleaned_test_functions.jsonl/34672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26174,
327,
741,
262,
341,
286,
1077,
18126,
284,
96560,
486,
931,
10896,
486,
931,
1507,
1599,
486,
931,
1423,
286,
1077,
5206,
1584,
284,
9926,
327,
16894,
1397,
486,
931,
7,
17,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.