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_as_u64(){
let json_value = from_str("12").unwrap();
let json_num = json_value.as_u64();
assert_eq!(json_num, Some(12));
} | rust_cleaned_test_functions.jsonl/6576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
7300,
21,
19,
3032,
286,
1077,
2951,
3142,
284,
504,
2895,
445,
16,
17,
1827,
15454,
543,
286,
1077,
2951,
4273,
284,
2951,
3142,
5357,
7300,
21,
19,
543,
286,
2060,
10714,
10297,
2236,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_str_to_str_untaggged_value_extension() {
assert_eq!(
"a_str".to_str_untagged_value(),
UntaggedValue::from("a_str".to_string())
);
} | rust_cleaned_test_functions.jsonl/124322 | {
"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,
2895,
2346,
2895,
62,
3850,
15718,
3556,
3142,
31035,
368,
341,
286,
2060,
10714,
33673,
310,
330,
64,
2895,
3263,
983,
2895,
62,
3850,
96476,
3142,
3148,
310,
15098,
96476,
1130,
486,
1499,
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 |
#[test]
fn test_boundary() {
let s = "🌞";
assert_eq!(closest_char_boundary(s, 0), 0);
assert_eq!(closest_char_boundary_rev(s, 0), 0);
for i in 1..s.len() {
assert_eq!(closest_char_boundary_rev(s, i), 0);
assert_eq!(closest_char_boundary(s, i), s.len());
... | rust_cleaned_test_functions.jsonl/85847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54004,
368,
341,
286,
1077,
274,
284,
330,
145469,
876,
286,
2060,
10714,
10297,
36461,
9232,
54004,
1141,
11,
220,
15,
701,
220,
15,
317,
286,
2060,
10714,
10297,
36461,
9232,
54004,
38082,
1141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_snapshot_restart_tower() {
solana_logger::setup_with_default(RUST_LOG_FILTER);
// First set up the cluster with 2 nodes
let snapshot_interval_slots = 10;
let num_account_paths = 2;
let leader_snapshot_test_config =
setup_snapshot_validator_config(snapshot_interval_sl... | rust_cleaned_test_functions.jsonl/98804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1047
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53265,
69392,
528,
1202,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
6615,
9993,
2785,
8553,
8419,
23728,
317,
262,
442,
5512,
738,
705,
279,
10652,
448,
220,
17,
7798,
198,
262,
1077,
16295,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pass_approve() {
ExtBuilder::build().execute_with(|| {
let bob = account_key("Bob"); // owner address
let risa = account_key("Risa"); // spender address
assert_ok!(CelerPayModule::approve(
Origin::signed(bob.clone()),
... | rust_cleaned_test_functions.jsonl/81775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
36057,
586,
368,
341,
286,
9447,
3297,
486,
5834,
1005,
10257,
6615,
79453,
314,
5872,
310,
1077,
35192,
284,
2692,
3097,
445,
32388,
5038,
442,
6372,
2621,
198,
310,
1077,
9824,
64,
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... | 2 |
#[test]
fn test_union() {
let mut edit1 = TextEdit::delete(range(7, 11));
let mut builder = TextEditBuilder::default();
builder.delete(range(1, 5));
builder.delete(range(13, 17));
let edit2 = builder.finish();
assert!(edit1.union(edit2).is_ok());
assert_e... | rust_cleaned_test_functions.jsonl/72302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
286,
1077,
5206,
4499,
16,
284,
2918,
4036,
486,
4542,
22345,
7,
22,
11,
220,
16,
16,
1106,
286,
1077,
5206,
7363,
284,
2918,
4036,
3297,
486,
2258,
543,
286,
7363,
7440,
2234... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_assignment_not_last_not_applicable() {
check_assist_not_applicable(
extract_assigment,
r#"
fn foo() {
let mut a = 1;
if true {
<|>a = 2;
b = a;
} else {
a = 3;
}
}"#,
)
} | rust_cleaned_test_functions.jsonl/113116 | {
"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,
39123,
51891,
7913,
12195,
7913,
8191,
46114,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
8649,
12083,
343,
478,
345,
310,
435,
2,
698,
8822,
15229,
368,
341,
262,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_median_sorted_arrays() {
let nums1 = vec![1, 3];
let nums2 = vec![2];
assert_eq!(Solution::find_median_sorted_arrays(nums1, nums2), 2.0);
let nums1 = vec![1, 2];
let nums2 = vec![3, 4];
assert_eq!(Solution::find_median_sorted_arrays(nums1, nu... | rust_cleaned_test_functions.jsonl/33566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
83003,
41277,
68983,
368,
341,
286,
1077,
10307,
16,
284,
7486,
20703,
16,
11,
220,
18,
935,
286,
1077,
10307,
17,
284,
7486,
20703,
17,
935,
286,
2060,
10714,
10297,
36842,
486,
3903,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_undefined() {
with_object(0, |activation, object| {
assert_eq!(
object.get("not_defined", activation).unwrap(),
Value::Undefined
);
})
} | rust_cleaned_test_functions.jsonl/19712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
62,
9614,
368,
341,
286,
448,
5314,
7,
15,
11,
760,
23002,
11,
1633,
91,
341,
310,
2060,
10714,
33673,
394,
1633,
670,
445,
1921,
52870,
497,
15099,
568,
15454,
3148,
394,
5162,
486,
305... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_best_shuffle() {
let mut s0 = best_shuffle("abracadabra");
assert_eq!(s0.score, 0);
s0 = best_shuffle("seesaw");
assert_eq!(s0.score, 0);
s0 = best_shuffle("elk");
assert_eq!(s0.score, 0);
s0 = best_shuffle("grrrrrr");
assert_eq!... | rust_cleaned_test_functions.jsonl/30414 | {
"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,
33101,
73484,
368,
341,
286,
1077,
5206,
274,
15,
284,
1850,
73484,
445,
370,
19959,
329,
43932,
797,
286,
2060,
10714,
10297,
82,
15,
21540,
11,
220,
15,
626,
286,
274,
15,
284,
1850,
73484,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compare_reference_impl() {
const OUT: usize = 303;
let mut input_buf = [0; TEST_CASES_MAX];
paint_test_input(&mut input_buf);
for &case in TEST_CASES {
let input = &input_buf[..case];
#[cfg(feature = "std")]
dbg!(case);
// regular
{
... | rust_cleaned_test_functions.jsonl/39147 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
25433,
21007,
368,
341,
262,
733,
9808,
25,
22301,
284,
220,
18,
15,
18,
26,
715,
262,
1077,
5206,
1946,
10363,
284,
508,
15,
26,
13602,
28540,
50,
6806,
935,
262,
6177,
4452,
5898,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_credential_arguments_correct() {
init!("true");
settings::set_config_value(settings::CONFIG_INSTITUTION_DID, DEFAULT_DID);
let cb = return_types_u32::Return_U32_U32::new().unwrap();
assert_eq!(vcx_issuer_create_credential(cb.command_handle,
... | rust_cleaned_test_functions.jsonl/66776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
666,
30320,
43433,
31550,
368,
341,
286,
2930,
17223,
1866,
797,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
2158,
25765,
28617,
1557,
915,
11,
11955,
1557,
915,
317,
286,
1077,
9858... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fmt_addr() {
let addr = [0x24, 0xBE, 0x59, 0x38, 0xC1, 0xA4];
let mut buf = [0; 12 + 5];
let addr_str = fmt_addr(&addr, &mut buf);
assert_eq!(addr_str, "A4:C1:38:59:BE:24");
} | rust_cleaned_test_functions.jsonl/48783 | {
"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,
38128,
7387,
368,
341,
286,
1077,
10789,
284,
508,
15,
87,
17,
19,
11,
220,
15,
85449,
11,
220,
15,
87,
20,
24,
11,
220,
15,
87,
18,
23,
11,
220,
15,
12125,
16,
11,
220,
15,
14673,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flat_map_try_folds() {
let f = &|acc, x| i32::checked_add(acc*2/3, x);
let mr = &|x| (5*x)..(5*x + 5);
assert_eq!((0..10).flat_map(mr).try_fold(7, f), (0..50).try_fold(7, f));
assert_eq!((0..10).flat_map(mr).try_rfold(7, f), (0..50).try_rfold(7, f));
let mut iter = (0..10).fl... | rust_cleaned_test_functions.jsonl/54197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49556,
5376,
53283,
761,
18431,
368,
341,
262,
1077,
282,
284,
609,
91,
4475,
11,
856,
91,
600,
18,
17,
486,
7549,
2891,
48455,
9,
17,
14,
18,
11,
856,
317,
262,
1077,
17317,
284,
609,
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_chacha20_poly1305() {
let key = "808182838485868788898a8b8c8d8e8f909192939495969798999a9b9c9d9e9f";
let iv = "070000004041424344454647";
let aad = "50515253c0c1c2c3c4c5c6c7";
let pt =
"4c616469657320616e642047656e746c656d656e206f662074686520636c6173732... | rust_cleaned_test_functions.jsonl/110566 | {
"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,
4138,
51576,
17,
15,
36133,
16,
18,
15,
20,
368,
341,
286,
1077,
1376,
284,
330,
23,
15,
23,
16,
23,
17,
23,
18,
23,
19,
23,
20,
23,
21,
23,
22,
23,
23,
23,
24,
23,
64,
23,
65,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_document_from_mg_mval_mmol_with_number() {
let it = doc! {
KEY_MG: 4078.0,
KEY_MVAL: 177.4,
KEY_MMOL: 177.4,
KEY_MVAL_PERCENT: 87.65
};
let r = MgMvalMmol::try_from(&it);
assert!(r.is_ok());
assert_eq!(r.unwr... | rust_cleaned_test_functions.jsonl/16361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26231,
5673,
717,
70,
717,
831,
35599,
337,
6615,
5500,
368,
341,
286,
1077,
432,
284,
4629,
0,
341,
310,
12013,
1245,
38,
25,
220,
19,
15,
22,
23,
13,
15,
345,
310,
12013,
1245,
5594,
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_placement_panic() {
let mut map = HashMap::new();
map.extend((0..10).map(|i| (i, i)));
fn mkpanic() -> usize { panic!() }
// modify existing key
let _ = panic::catch_unwind(panic::AssertUnwindSafe(|| { map.entry(0) <- mkpanic(); }));
ass... | rust_cleaned_test_functions.jsonl/134447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90203,
620,
31270,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
2415,
15831,
1188,
15,
496,
16,
15,
568,
2186,
22428,
72,
91,
320,
72,
11,
600,
22525,
286,
5168,
23789,
190... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_weekday() {
let now = Utc
.datetime_from_str("2020-07-12T12:45:00", "%Y-%m-%dT%H:%M:%S")
.unwrap(); // sunday
let expected = Utc
.datetime_from_str("2020-07-17T00:00:00", "%Y-%m-%dT%H:%M:%S")
.unwrap();
assert_eq!(
... | rust_cleaned_test_functions.jsonl/79602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
31277,
1292,
368,
341,
286,
1077,
1431,
284,
547,
10413,
198,
310,
659,
15450,
5673,
2895,
445,
17,
15,
17,
15,
12,
15,
22,
12,
16,
17,
51,
16,
17,
25,
19,
20,
25,
15,
15,
497,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ref() {
let mut ref_map = RefMap::new();
let ref_count = ref_map.add_ref("test_id".to_string());
assert_eq!(ref_count, 1);
let ref_count = ref_map.add_ref("test_id".to_string());
assert_eq!(ref_count, 2);
let id = ref_map.remove_ref("test_... | rust_cleaned_test_functions.jsonl/505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
7793,
368,
341,
286,
1077,
5206,
2053,
5376,
284,
8550,
2227,
486,
931,
543,
286,
1077,
2053,
3180,
284,
2053,
5376,
1364,
7793,
445,
1944,
842,
3263,
983,
3904,
1423,
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... | 1 |
#[test]
fn test_missing() {
let mut vcf = Reader::from_path(&"test/test_missing.vcf").expect("Error opening file.");
let fn4 = [
&[
i32::missing(),
i32::missing(),
i32::missing(),
i32::missing(),
][..],
... | rust_cleaned_test_functions.jsonl/8765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 791
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
368,
341,
286,
1077,
5206,
348,
9792,
284,
25166,
486,
1499,
2638,
2099,
1,
1944,
12697,
40447,
3133,
9792,
1827,
17119,
445,
1454,
8568,
1034,
7320,
286,
1077,
5168,
19,
284,
2278,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_resume_asm_2_asm() {
resume_asm_2_asm(VERSION1, 8126917);
resume_asm_2_asm(VERSION0, 8126917);
} | rust_cleaned_test_functions.jsonl/82895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58132,
67529,
62,
17,
67529,
368,
341,
262,
15688,
67529,
62,
17,
67529,
7,
17636,
16,
11,
220,
23,
16,
17,
21,
24,
16,
22,
317,
262,
15688,
67529,
62,
17,
67529,
7,
17636,
15,
11,
220,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_git_diff_is_unchanged_under_color_only() {
let config = integration_test_utils::make_config_from_args(&["--color-only"]);
let input = DIFF_WITH_TWO_ADDED_LINES;
let output = integration_test_utils::run_delta(input, &config);
let output = strip_ansi_codes(&output);... | rust_cleaned_test_functions.jsonl/70111 | {
"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,
68801,
15850,
6892,
62,
3185,
3726,
58228,
6714,
18410,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
1183,
313,
3423,
15382,
15049,
286,
1077,
1946,
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_check_transfer_success_with_source_only_errors() {
let genesis_account = GenesisAccount::account(
DEFAULT_ACCOUNT_PUBLIC_KEY.clone(),
Motes::new(U512::from(DEFAULT_ACCOUNT_INITIAL_BALANCE)),
None,
);
let mut genesis_config = DEFAULT_GENESIS_CONFIG.clone();
... | rust_cleaned_test_functions.jsonl/123011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 919
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
35403,
18632,
6615,
10347,
18410,
20196,
368,
341,
262,
1077,
59366,
13500,
284,
40788,
7365,
486,
4608,
1006,
286,
11955,
38831,
36209,
6600,
15997,
3148,
286,
386,
6295,
486,
931,
12317,
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_rest_vars() -> TestResult {
let p = polar();
qvar(&p, "[1,2,3] = [*rest]", "rest", vec![value!([1, 2, 3])]);
qvar(&p, "[1,2,3] = [1,*rest]", "rest", vec![value!([2, 3])]);
qvar(&p, "[1,2,3] = [1,2,*rest]", "rest", vec![value!([3])]);
qvar(&p, "[1,2,3] = [1,2,3,*rest]", "rest"... | rust_cleaned_test_functions.jsonl/68139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32231,
11168,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
2804,
947,
2099,
79,
11,
10545,
16,
11,
17,
11,
18,
60,
284,
60974,
3927,
19076,
330,
3927,
497,
7486,
20703,
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... | 4 |
#[test]
fn test_0_add() {
let mut a = Array::zeros(vec![]);
a += 1.;
assert_eq!(a[[]], 1.);
a += 2.;
assert_eq!(a[[]], 3.);
} | rust_cleaned_test_functions.jsonl/44836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
2891,
368,
341,
262,
1077,
5206,
264,
284,
2910,
486,
35716,
25592,
0,
56703,
262,
264,
1421,
220,
16,
37403,
262,
2060,
10714,
10297,
64,
58,
1294,
1125,
220,
16,
58957,
262,
264,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fmt_binary() {
let hash = b"hello".test_only_hash();
let hash_str = format!("{:b}", hash);
assert_eq!(hash_str.len(), HashValue::LENGTH_IN_BITS);
for (bit, chr) in hash.iter_bits().zip(hash_str.chars()) {
assert_eq!(chr, if bit { '1' } else { '0' });
}
} | rust_cleaned_test_functions.jsonl/118040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
31761,
368,
341,
262,
1077,
5175,
284,
293,
1,
14990,
3263,
1944,
18410,
8950,
543,
262,
1077,
5175,
2895,
284,
3561,
88928,
25,
65,
9545,
5175,
317,
262,
2060,
10714,
10297,
8296,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_matches_inline_snapshot() {
assert_matches_inline_snapshot!(
"1234567890".repeat(5).chars().rev().collect::<String>(),
r##"09876543210987654321098765432109876543210987654321"##
);
assert_matches_inline_snapshot!(
r#"escaped string \": \"{\\"namespace\\":\\"ww... | rust_cleaned_test_functions.jsonl/72018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38344,
41871,
53265,
368,
341,
262,
2060,
38344,
41871,
53265,
33673,
286,
330,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
3263,
30624,
7,
20,
568,
19255,
1005,
7282,
1005,
17384,
27638,
703,
657... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accept_inbound_peer_in_reserve_only_mode() {
let mut peer_store = new_peer_store();
let reserved_peer = PeerId::random();
let addr = "/ip4/127.0.0.1".parse::<Multiaddr>().unwrap();
let session_id = 1.into();
// reserved_only mode: only accept reserved_peer
let mut peers ... | rust_cleaned_test_functions.jsonl/13505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35728,
1243,
10891,
45159,
1243,
89591,
18410,
7302,
368,
341,
262,
1077,
5206,
14397,
14809,
284,
501,
45159,
14809,
543,
262,
1077,
4591,
45159,
284,
45147,
764,
486,
11463,
543,
262,
1077,
10789,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_balance_proof_edge_cases() {
let source_keypair = ElGamalKeypair::new_rand();
let mut transcript_prover = Transcript::new(b"test");
let mut transcript_verifier = Transcript::new(b"test");
// all zero ciphertext should always be a valid encryption of 0
... | rust_cleaned_test_functions.jsonl/90011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
29396,
86757,
17932,
41427,
368,
341,
286,
1077,
2530,
3097,
12670,
284,
3984,
78884,
278,
6608,
1082,
1310,
486,
931,
33864,
1428,
286,
1077,
5206,
35715,
2540,
423,
284,
90303,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha256d_data() {
assert_eq!(
Sha256dHash::from_data(&[]).data(),
[
0x5d, 0xf6, 0xe0, 0xe2, 0x76, 0x13, 0x59, 0xd3, 0x0a, 0x82, 0x75, 0x05, 0x8e, 0x29,
0x9f, 0xcc, 0x03, 0x81, 0x53, 0x45, 0x45, 0xf5, 0x5c, 0xf4, 0x3e, 0x41, 0x98, 0x3... | rust_cleaned_test_functions.jsonl/16827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
17,
20,
21,
67,
1769,
368,
341,
286,
2060,
10714,
33673,
310,
27970,
17,
20,
21,
67,
6370,
486,
1499,
1769,
2099,
1294,
568,
691,
3148,
310,
2278,
394,
220,
15,
87,
20,
67,
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_invalid_input_should_err() -> Result<(), Error> {
let result: Result<ProxyMap, Error> = parse2(quote! {test});
assert!(result.is_err());
Ok(())
} | rust_cleaned_test_functions.jsonl/85718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
5898,
43378,
9266,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1102,
25,
5714,
27,
16219,
2227,
11,
4600,
29,
284,
4715,
17,
7,
2949,
0,
314,
1944,
2960,
286,
2060,
10297,
1382,
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 |
#[test]
fn test_different_dev_id() {
let m1 = mount_info("0", "/mnt/bar");
let m2 = mount_info("1", "/mnt/bar");
assert!(is_best(&[m1.clone()], &m2));
assert!(is_best(&[m2], &m1));
} | rust_cleaned_test_functions.jsonl/7063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82741,
10433,
842,
368,
341,
310,
1077,
296,
16,
284,
6470,
3109,
445,
15,
497,
3521,
40882,
49513,
797,
310,
1077,
296,
17,
284,
6470,
3109,
445,
16,
497,
3521,
40882,
49513,
797,
310,
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_empty_bytes_to_dataframe() {
let fields = vec![Field::new("test_field", DataType::Utf8)];
let schema = Schema::new(fields);
let file = Cursor::new(vec![]);
let result = CsvReader::new(file)
.has_header(false)
.with_columns(Some(
... | rust_cleaned_test_functions.jsonl/57571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
12524,
2346,
77570,
368,
341,
286,
1077,
5043,
284,
7486,
20703,
1877,
486,
931,
445,
1944,
5013,
497,
33172,
486,
38980,
23,
12587,
286,
1077,
10802,
284,
12539,
486,
931,
37701,
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_white_pawn_capture() {
let position = PositionBuilder::new()
.place(Square::F3, Piece::WhitePawn, Color::White)
.place(Square::F4, Piece::WhitePawn, Color::White)
.place(Square::G4, Piece::Bishop, Color::Black)
.place(Square::G2, Piece::Knight, Color::Black)
.pl... | rust_cleaned_test_functions.jsonl/134606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 849
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44431,
620,
6379,
55148,
368,
341,
262,
1077,
2309,
284,
12380,
3297,
486,
931,
741,
414,
659,
2007,
3759,
5151,
486,
37,
18,
11,
28930,
486,
14075,
85313,
11,
3478,
486,
14075,
340,
414,
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_delete_by_rdata_multi() {
let mut io_loop = Runtime::new().unwrap();
let (bg, mut client, origin) = create_sig0_ready_client(&mut io_loop);
// append a record
let mut rrset = RecordSet::with_ttl(
Name::from_str("new.example.com").unwrap(),
RecordType::A,
... | rust_cleaned_test_functions.jsonl/33943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
3710,
1710,
691,
25133,
368,
341,
262,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1005,
15454,
543,
262,
1077,
320,
12220,
11,
5206,
2943,
11,
6238,
8,
284,
1855,
29252,
15,
35456,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_get_value_response_with_error() {
let mut response = pb::v1::RegistryGetValueResponse::default();
let error = RegistryError {
code: 1,
..Default::default()
};
response.error = Some(error);
let bytes = serialize_get_value_respo... | rust_cleaned_test_functions.jsonl/108183 | {
"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,
75861,
450,
3062,
3142,
9655,
6615,
4096,
368,
341,
286,
1077,
5206,
2033,
284,
17310,
486,
85,
16,
486,
15603,
23213,
2582,
486,
2258,
543,
286,
1077,
1465,
284,
32112,
1454,
341,
310,
2038,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_nonce_ix_ok() {
let nonce_address = Pubkey::new_unique();
let nonce_account = nonce_account::create_account(1_000_000).into_inner();
#[allow(deprecated)]
let blockhash_id = sysvar::recent_blockhashes::id();
let accounts = process_instruction(
... | rust_cleaned_test_functions.jsonl/95894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
48508,
62686,
19817,
368,
341,
286,
1077,
39676,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
39676,
13500,
284,
39676,
13500,
486,
3182,
13500,
7,
16,
62,
15,
15,
15,
62,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tilde_in_uri() {
let req = http::Request::builder()
.uri("https://s3.us-east-1.amazonaws.com/my-bucket?list-type=2&prefix=~objprefix&single&k=&unreserved=-_.~").body("").unwrap();
let req = SignableRequest::from(&req);
let signing_params = signing_params(Signi... | rust_cleaned_test_functions.jsonl/83744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
34276,
1243,
15572,
368,
341,
286,
1077,
4232,
284,
1758,
486,
1900,
486,
17850,
741,
310,
659,
6070,
445,
2428,
1110,
82,
18,
21916,
39507,
12,
16,
28771,
905,
34198,
1455,
11152,
30,
1607... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shrink() {
let mut buffer = Buffer::allocate(100);
buffer.push(7);
buffer.push(8);
buffer.shrink();
assert_eq!(buffer.capacity(), Buffer::default_capacity(2));
assert_eq!(&buffer[..], [7, 8]);
} | rust_cleaned_test_functions.jsonl/87208 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
34365,
368,
341,
286,
1077,
5206,
4147,
284,
10312,
486,
31191,
7,
16,
15,
15,
317,
286,
4147,
2552,
7,
22,
317,
286,
4147,
2552,
7,
23,
317,
286,
4147,
2395,
34365,
543,
286,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_creation_with_expected_values() {
let mut data = Vec::new();
data.push((
"192.168.1.0/24",
vec!["192.168.1.1/32".to_string(), "192.168.1.234/32".to_string(), "192.168.1.2/32".to_string()],
251,
3,
));
data.push(("10.... | rust_cleaned_test_functions.jsonl/52856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46163,
6615,
32190,
9146,
368,
341,
286,
1077,
5206,
821,
284,
11312,
486,
931,
543,
286,
821,
2552,
94702,
310,
330,
16,
24,
17,
13,
16,
21,
23,
13,
16,
13,
15,
14,
17,
19,
756,
310,
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... | 3 |
#[test]
fn test_optflag_missing() {
let args = vec!("blah".to_string());
let opts = vec!(optflag("t", "test", "testing"));
let rs = getopts(args.as_slice(), opts.as_slice());
match rs {
Ok(ref m) => {
assert!(!m.opt_present("test"));
assert!(!m.o... | rust_cleaned_test_functions.jsonl/11184 | {
"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,
15032,
9903,
40447,
368,
341,
286,
1077,
2827,
284,
7486,
17223,
70614,
3263,
983,
3904,
1423,
286,
1077,
12185,
284,
7486,
10297,
2912,
9903,
445,
83,
497,
330,
1944,
497,
330,
8840,
4010,
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_yield() {
let point = FailPoint::new();
point.set_actions("", vec![Action::new(Task::Yield, 1.0, None)]);
assert!(point.eval("test_fail_point_yield").is_none());
} | rust_cleaned_test_functions.jsonl/18301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83709,
368,
341,
286,
1077,
1459,
284,
39645,
2609,
486,
931,
543,
286,
1459,
980,
25368,
19814,
7486,
20703,
2512,
486,
931,
47531,
486,
56,
816,
11,
220,
16,
13,
15,
11,
2240,
41958,
286,
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 |
#[test]
fn test_connections() {
let client = Client::tracked(test_rocket()).expect("valid rocket instance");
let response = client.get("/connections").dispatch();
assert_eq!(response.status(), Status::Ok);
let response = response.into_json::<Value>().unwrap();
let connect... | rust_cleaned_test_functions.jsonl/46293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56402,
368,
341,
286,
1077,
2943,
284,
8423,
486,
58381,
8623,
26608,
3996,
6011,
17119,
445,
1891,
24306,
2867,
797,
286,
1077,
2033,
284,
2943,
670,
4283,
49986,
1827,
18274,
543,
286,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_month() {
let cases = vec![
(Some("0000-00-00 00:00:00"), Some(0i64)),
(Some("2018-01-01 01:01:01"), Some(1i64)),
(Some("2018-02-01 01:01:01"), Some(2i64)),
(Some("2018-03-01 01:01:01"), Some(3i64)),
(Some("2018-04-01 01:01:01")... | rust_cleaned_test_functions.jsonl/36250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 687
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18933,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
8373,
445,
15,
15,
15,
15,
12,
15,
15,
12,
15,
15,
220,
15,
15,
25,
15,
15,
25,
15,
15,
3975,
4329,
7,
15,
72,
21,
19,
696... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_secure_bn() {
let a = BigNum::new().unwrap();
assert!(!a.is_secure());
let b = BigNum::new_secure().unwrap();
assert!(b.is_secure())
} | rust_cleaned_test_functions.jsonl/52802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73088,
58112,
368,
341,
286,
1077,
264,
284,
6164,
4651,
486,
931,
1005,
15454,
543,
286,
2060,
0,
3471,
64,
2079,
73088,
5231,
286,
1077,
293,
284,
6164,
4651,
486,
931,
73088,
1005,
15454,
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 |
#[test]
fn test_install_copy_then_compare_file() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let file1 = "test_install_copy_then_compare_file_a1";
let file2 = "test_install_copy_then_compare_file_a2";
at.touch(file1);
scene
.ucmd()
.arg("-C")... | rust_cleaned_test_functions.jsonl/47035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
16096,
68367,
32235,
2458,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
280,
262,
1077,
1034,
16,
284,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_backup_meta() {
let mut suite = TestSuite::new(3);
let key_count = 60;
// 3 version for each key.
for _ in 0..3 {
for i in 0..key_count {
let (k, v) = (format!("key_{}", i), format!("value_{}", i));
// Prewrite
let start_ts = suite.all... | rust_cleaned_test_functions.jsonl/21559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 912
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44710,
13381,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
18,
317,
262,
1077,
1376,
3180,
284,
220,
21,
15,
401,
262,
442,
220,
18,
2319,
369,
1817,
1376,
624,
262,
369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sk_encrypt() {
let fv = FV::new(16, &BigInt::from(12289));
let sk = fv.generate_key();
let mut v = vec![0; fv.n];
let ct = fv.encrypt_sk(&v, &sk);
let pt_actual: Vec<u8> = fv.decrypt(&ct, &sk);
assert_eq!(v, pt_actual);
} | rust_cleaned_test_functions.jsonl/103697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33811,
66593,
368,
341,
286,
1077,
61654,
284,
434,
53,
486,
931,
7,
16,
21,
11,
609,
87474,
486,
1499,
7,
16,
17,
17,
23,
24,
3237,
286,
1077,
1901,
284,
61654,
22019,
3097,
1428,
286,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_data_directives_bad() {
let programs = [
".data 1", // requires .byte or similar
".section .data\n.byte 0x123", // immediate too large
];
for prog in &programs {
let ParseResult { reporter, .. } = Parser::<Rv32>::par... | rust_cleaned_test_functions.jsonl/91957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
32871,
1886,
34199,
368,
341,
286,
1077,
7468,
284,
2278,
310,
5933,
691,
220,
16,
497,
3824,
442,
7460,
659,
3782,
476,
4428,
198,
310,
5933,
2809,
659,
691,
1699,
46772,
220,
15,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_function_call_expression_one_arg() {
assert_expression!(
"IsValid(42)",
Expression::func("IsValid", vec![42.as_lit_expr(1, 15)])
);
} | rust_cleaned_test_functions.jsonl/102646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
13429,
28068,
11667,
6057,
368,
341,
310,
2060,
28068,
33673,
394,
330,
55470,
7,
19,
17,
15752,
394,
16378,
486,
2830,
445,
55470,
497,
7486,
20703,
19,
17,
5357,
98399,
21915,
7,
16,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rust_function() {
Lua::new().context(|lua| {
let globals = lua.globals();
lua.exec::<_, ()>(
r#"
function lua_function()
return rust_function()
end
-- Test to make sure chunk return is ignored
return 1
"#,
... | rust_cleaned_test_functions.jsonl/62536 | {
"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,
1710,
590,
9174,
368,
341,
262,
37662,
486,
931,
1005,
2147,
22428,
27623,
91,
341,
286,
1077,
37785,
284,
20357,
1302,
16616,
543,
286,
20357,
15776,
27638,
6878,
1719,
17055,
310,
435,
2,
698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_weight() {
let cycles_limit = 1024 * 1024 * 1024;
let caller = Address::from_hex("0x755cdba6ae4f479f7164792b318b2a06c759833b").unwrap();
let context = mock_context(cycles_limit, caller);
let tx_hash = context.get_tx_hash().unwrap();
let mut service = new_multi_signature... | rust_cleaned_test_functions.jsonl/130835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1016
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
15876,
368,
341,
262,
1077,
24484,
14763,
284,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
26,
715,
262,
1077,
19865,
284,
9177,
486,
1499,
32655,
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... | 1 |
#[test]
fn test_is_dynamic() {
assert!(!Token::Address("0000000000000000000000000000000000000000".parse().unwrap()).is_dynamic());
assert!(Token::Bytes(vec![0, 0, 0, 0]).is_dynamic());
assert!(!Token::FixedBytes(vec![0, 0, 0, 0]).is_dynamic());
assert!(!Token::Uint(0.into()).is_dynamic());
assert!(!To... | rust_cleaned_test_functions.jsonl/87589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
45992,
368,
341,
197,
6948,
0,
3471,
3323,
486,
4286,
445,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
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_bilibili_danmaku() {
Builder::new_current_thread().enable_all().build().unwrap().block_on(async move {
let u = TestUrl::new();
let b = qliveplayer_lib::danmaku::bilibili::Bilibili::new();
let dm_fifo = Arc::new(Mutex::new(LinkedList::<HashMap<String, String>>::new()))... | rust_cleaned_test_functions.jsonl/25597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 783
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
29959,
3921,
814,
276,
76,
23557,
368,
341,
262,
20626,
486,
931,
11080,
10814,
1005,
12552,
5705,
1005,
5834,
1005,
15454,
1005,
4574,
4470,
18285,
3271,
341,
286,
1077,
575,
284,
3393,
2864... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_derive_tuple_struct() {
#[derive(Debug, Encodable, Decodable, Eq, PartialEq)]
struct TestStruct(Vec<u8>, u32);
let reference = TestStruct(vec![1, 2, 3], 42);
let bytes = [3, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 42, 0, 0, 0];
test_roundtrip_expected(reference, &... | rust_cleaned_test_functions.jsonl/78901 | {
"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,
35345,
533,
21773,
15126,
368,
341,
286,
11506,
27098,
42618,
11,
10751,
69129,
11,
3714,
69129,
11,
33122,
11,
55039,
5563,
286,
2036,
3393,
9422,
49923,
34837,
23,
8066,
575,
18,
17,
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_foreign_ns_func_ret_nonpod() {
let hdr = indoc! {"
#include <cstdint>
#include <memory>
namespace A {
struct Bob {
uint32_t a;
};
}
namespace B {
inline A::Bob daft() { A::Bob bob; bob.a = 12; return ... | rust_cleaned_test_functions.jsonl/9830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78983,
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,
4473,
362,
341,
310,
2036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_directory() {
let s = TestScenario::new(util_name!());
s.fixtures.mkdir("test_directory");
s.ucmd()
.args(&["test_directory"])
.fails()
.stderr_is("cat: test_directory: Is a directory");
} | rust_cleaned_test_functions.jsonl/90927 | {
"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,
14846,
368,
341,
262,
1077,
274,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
274,
67785,
18513,
30163,
445,
1944,
14846,
797,
262,
274,
56334,
2277,
741,
286,
659,
2116,
2099,
1183,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_merge_normal() {
let (r1_dir, _repo) = repo_init_bare().unwrap();
let (clone1_dir, clone1) =
repo_clone(r1_dir.path().to_str().unwrap()).unwrap();
let (clone2_dir, clone2) =
repo_clone(r1_dir.path().to_str().unwrap()).unwrap();
let clone... | rust_cleaned_test_functions.jsonl/127216 | {
"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,
20888,
13973,
368,
341,
286,
1077,
320,
81,
16,
4334,
11,
716,
23476,
8,
284,
15867,
6137,
880,
546,
1005,
15454,
1428,
286,
1077,
320,
19982,
16,
4334,
11,
14715,
16,
8,
4035,
310,
15867,
547... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intotemplatevar() {
let address = Address {
city: "Los Angelos".to_string(),
state: "California".to_string()
};
let uri = UriTemplate::new("http://example.com/view{?address*}")
.set("address", &address)
.build();
assert_eq!(
uri,
"h... | rust_cleaned_test_functions.jsonl/45720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
354,
3708,
947,
368,
341,
262,
1077,
2621,
284,
9177,
341,
286,
3283,
25,
330,
29596,
23080,
436,
3263,
983,
3904,
3148,
286,
1584,
25,
330,
45410,
3263,
983,
3904,
741,
262,
2605,
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_op_code() {
assert_eq!(FsCacheOpCode::try_from(0).unwrap(), FsCacheOpCode::Open);
assert_eq!(FsCacheOpCode::try_from(1).unwrap(), FsCacheOpCode::Close);
assert_eq!(FsCacheOpCode::try_from(2).unwrap(), FsCacheOpCode::Read);
FsCacheOpCode::try_from(3).unwrap_err();
... | rust_cleaned_test_functions.jsonl/129718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
4136,
368,
341,
286,
2060,
10714,
10297,
48300,
8233,
7125,
2078,
486,
1539,
5673,
7,
15,
568,
15454,
1507,
84619,
8233,
7125,
2078,
486,
5002,
317,
286,
2060,
10714,
10297,
48300,
8233,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enable_cap_failure() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
let cap: kvm_enable_cap = Default::default();
// always result in a failure as it is not a valid capability.
assert!(vm.enable_cap(&cap).is_err());
} | rust_cleaned_test_functions.jsonl/86847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18988,
16388,
43618,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
543,
286,
1077,
2062,
25,
94748,
18988,
16388,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_candidate() {
setup_for_test();
let mut tt = Network::new(vec![None]);
tt.send(vec![new_message(1, 1, MessageType::MsgHup, 0)]);
assert_eq!(tt.peers[&1].state, StateRole::Leader);
} | rust_cleaned_test_functions.jsonl/107107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
5084,
62360,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5206,
17853,
284,
8141,
486,
931,
25592,
20703,
4064,
2558,
262,
17853,
5219,
25592,
20703,
931,
6462,
7,
16,
11,
220,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part1_example1() {
let passwords = read_input("input1.txt");
assert_eq!(passwords.iter().filter(|p| p.valid()).count(), 2);
} | rust_cleaned_test_functions.jsonl/118472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
39304,
16,
368,
341,
286,
1077,
33716,
284,
1349,
5898,
445,
1355,
16,
3909,
797,
286,
2060,
10714,
10297,
3833,
82,
19471,
1005,
5315,
22428,
79,
91,
281,
20586,
6011,
1830,
1507,
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 |
#[test]
fn test_adobe_rgb_xyz_conversion() {
let xyz1 = XYZColor {
x: 0.4,
y: 0.2,
z: 0.5,
illuminant: Illuminant::D75,
};
let xyz2 = AdobeRGBColor::from_xyz(xyz1).to_xyz(Illuminant::D75);
assert!(xyz1.approx_equal(&xyz2));
... | rust_cleaned_test_functions.jsonl/30945 | {
"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,
10027,
15422,
37407,
64974,
64132,
368,
341,
286,
1077,
40511,
16,
284,
71089,
1636,
341,
310,
856,
25,
220,
15,
13,
19,
345,
310,
379,
25,
220,
15,
13,
17,
345,
310,
1147,
25,
220,
15,
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_notification() {
use std::sync::atomic;
use std::sync::Arc;
let mut io = IoHandler::new();
let called = Arc::new(atomic::AtomicBool::new(false));
let c = called.clone();
io.add_notification("say_hello", move |_| {
c.store(true, atomic::Ordering::SeqCst);
});
let request = r#... | rust_cleaned_test_functions.jsonl/95531 | {
"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,
34296,
368,
341,
197,
41819,
1460,
486,
12996,
486,
6618,
280,
197,
41819,
1460,
486,
12996,
486,
36809,
401,
197,
10217,
5206,
6399,
284,
29655,
3050,
486,
931,
1428,
197,
10217,
2598,
284,
19689... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_variance() {
let f = |x: Gamma| x.variance().unwrap();
let test = [
((1.0, 0.1), 100.0),
((1.0, 1.0), 1.0),
((10.0, 10.0), 0.1),
((10.0, 1.0), 10.0),
((10.0, INF), 0.0),
];
for &(arg, res) in test.iter() ... | rust_cleaned_test_functions.jsonl/39872 | {
"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,
77450,
368,
341,
286,
1077,
282,
284,
760,
87,
25,
57682,
91,
856,
19526,
5284,
1005,
15454,
543,
286,
1077,
1273,
284,
2278,
310,
1781,
16,
13,
15,
11,
220,
15,
13,
16,
701,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_time_unit_spec_years() {
let expression = "* * * * * * 2015-2044";
let schedule = Schedule::from_str(expression).expect("Failed to parse expression.");
// Membership
assert_eq!(true, schedule.years().includes(2031));
assert_eq!(false, schedule.years().inc... | rust_cleaned_test_functions.jsonl/50820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
14832,
13594,
74490,
368,
341,
286,
1077,
7493,
284,
15630,
353,
353,
353,
353,
353,
220,
17,
15,
16,
20,
12,
17,
15,
19,
19,
876,
286,
1077,
9700,
284,
23512,
486,
1499,
2895,
48330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transmogrify() {
let internal_user = InternalUser {
name: "John",
age: 10,
address: InternalAddress {
is_whitelisted: true,
name: "somewhere out there",
phone: InternalPhoneNumber {
main: 1234,
second... | rust_cleaned_test_functions.jsonl/32223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
76,
73546,
1437,
368,
341,
262,
1077,
5306,
3317,
284,
15412,
1474,
341,
286,
829,
25,
330,
13079,
756,
286,
4231,
25,
220,
16,
15,
345,
286,
2621,
25,
15412,
4286,
341,
310,
374,
36225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unread_data() {
Runtime::new()
.unwrap()
.block_on(lazy(|| {
let (_, mut payload) = Payload::new(false);
payload.unread_data(Bytes::from("data"));
assert!(!payload.is_empty());
assert_eq!(payload.len... | rust_cleaned_test_functions.jsonl/1597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
878,
1769,
368,
341,
286,
10954,
486,
931,
741,
310,
659,
15454,
741,
310,
659,
4574,
4470,
2333,
13619,
79453,
341,
394,
1077,
39464,
5206,
7729,
8,
284,
52916,
486,
931,
3576,
626,
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_parse_header_hex() -> Result<(), SpvError> {
let testheader = "010000008a730974ac39042e95f82d719550e224c1a680a8dc9e8df9d007000000000000f50b20e8720a552dd36eb2ebdb7dceec9569e0395c990c1eb8a4292eeda05a931e1fce4e9a110e1a7a58aeb0";
let testhash = "0000000000000bae09a7a393a8acded75aa67e... | rust_cleaned_test_functions.jsonl/46243 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 757
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8757,
32655,
368,
1464,
5714,
68843,
3089,
85,
1454,
29,
341,
286,
1077,
1273,
2708,
284,
330,
15,
16,
15,
15,
15,
15,
15,
15,
23,
64,
22,
18,
15,
24,
22,
19,
580,
18,
24,
15,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_exact_chunks_mut_count() {
let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
let c = v.exact_chunks_mut(3);
assert_eq!(c.count(), 2);
let v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
let c2 = v2.exact_chunks_mut(2);
assert_eq!(c2.count(), 2);
let v3: &mut [i32] = &mut [];
... | rust_cleaned_test_functions.jsonl/4142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71084,
65470,
29523,
3180,
368,
341,
262,
1077,
348,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
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_clamp() {
let v1 = Vec3::new(-42.0f64, 0.5f64, 1.1f64);
let v2 = Vec3::new(0.0f64, 0.5f64, 1.0f64);
assert_eq!(v1.clamp(0.0, 1.0), v2);
} | rust_cleaned_test_functions.jsonl/120488 | {
"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,
6794,
1121,
368,
972,
286,
1077,
348,
16,
284,
11312,
18,
486,
931,
4080,
19,
17,
13,
15,
69,
21,
19,
11,
220,
15,
13,
20,
69,
21,
19,
11,
220,
16,
13,
16,
69,
21,
19,
736,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multisplit() {
let seps = vec![String::from(" "), String::from(";")];
let input = "this=is;a=test for:seperators";
let i = multi_split(input, &seps);
assert_eq!(i, vec!["this=is", "a=test", "for:seperators"]);
} | rust_cleaned_test_functions.jsonl/51878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
285,
2292,
368,
341,
286,
1077,
511,
1690,
284,
7486,
20703,
703,
486,
1499,
445,
59312,
923,
486,
1499,
61064,
899,
935,
286,
1077,
1946,
284,
330,
574,
92310,
48222,
53538,
369,
25,
325... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_type_detached() {
let c = make();
let value = c.get::<Value>("boolean_s_parse").unwrap();
let res = value.try_into::<bool>();
assert!(res.is_err());
assert_eq!(
res.unwrap_err().to_string(),
"invalid type: string \"fals\", expected a boolean".to_string... | rust_cleaned_test_functions.jsonl/13097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
1819,
24409,
3854,
368,
341,
262,
1077,
272,
284,
1281,
1428,
262,
1077,
897,
284,
272,
670,
27638,
1130,
13211,
6117,
643,
21039,
1827,
15454,
543,
262,
1077,
592,
284,
897,
48779,
45514,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rewrite_stakes_initialized() {
let right_data_len = std::mem::size_of::<StakeState>();
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_balance(right_data_len as usize);
let expected_stake = 1000;
let account_balance = rent_exempt_reserve... | rust_cleaned_test_functions.jsonl/65835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 522
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74052,
1261,
2050,
62421,
368,
341,
286,
1077,
1290,
1769,
6043,
284,
1460,
486,
10536,
486,
2141,
3575,
27638,
623,
726,
1397,
3913,
286,
1077,
8016,
284,
29737,
486,
2258,
543,
286,
1077,
8016,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert() {
let mut registry = Registry::new();
let key = vec![1, 2, 3, 4];
let value = vec![5, 6, 7, 8];
let value2 = vec![9, 10, 11, 12];
// Inserting a non-existing key should succeed.
assert_empty!(apply_mutations_skip_invariant_checks(
... | rust_cleaned_test_functions.jsonl/86099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
368,
341,
286,
1077,
5206,
19424,
284,
32112,
486,
931,
543,
286,
1077,
1376,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
897,
284,
7486,
20703,
20,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compare_and_swap() {
let catalog = Catalog::new();
let (client, origin) = create_sig0_ready_client(catalog);
// create a record
let mut record = Record::with(
Name::from_str("new.example.com").unwrap(),
RecordType::A,
Duration::minutes(5).whole_seconds() ... | rust_cleaned_test_functions.jsonl/36159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 958
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
8378,
40991,
368,
341,
262,
1077,
16403,
284,
31221,
486,
931,
543,
262,
1077,
320,
2972,
11,
6238,
8,
284,
1855,
29252,
15,
35456,
8179,
1337,
7750,
626,
262,
442,
1855,
264,
3255,
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... | 3 |
#[test]
fn test_std_does_not_contain() {
let res = CmdResult {
tmpd: None,
code: None,
success: true,
stdout: "This is a likely error message\n".into(),
stderr: "This is a likely error message\n".into(),
};
res.stdout_does_not_c... | rust_cleaned_test_functions.jsonl/74684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15656,
96374,
7913,
10260,
466,
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,
330,
1986,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_osvalues_with_shorter_lifetime() {
let matches = ArgMatches::default();
let mut values = matches.values_of_os("").unwrap_or_default();
assert_eq!(values.next(), None);
} | rust_cleaned_test_functions.jsonl/49538 | {
"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,
9993,
29387,
3661,
6615,
16673,
261,
98827,
368,
341,
286,
1077,
9071,
284,
7638,
42470,
486,
2258,
543,
286,
1077,
5206,
2750,
284,
9071,
10656,
3575,
29387,
80821,
15454,
8734,
9993,
543,
286,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_compress_pubkey() {
let privkey = PrivateKey::new(32_432_432);
let pubkey = privkey.generate_pubkey();
let compress = pubkey.clone().compressed();
assert_eq!(PublicKey::from_compressed(&compress).unwrap(), pubkey);
} | rust_cleaned_test_functions.jsonl/36199 | {
"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,
87845,
34014,
792,
368,
341,
286,
1077,
6095,
792,
284,
9679,
1592,
486,
931,
7,
18,
17,
62,
19,
18,
17,
62,
19,
18,
17,
317,
286,
1077,
95116,
284,
6095,
792,
22019,
34014,
792,
543,
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_launch() {
// Missing command line arguments.
assert!(Cli::launch(vec!["foobar"]).is_err());
// Invalid extra command line parameter.
assert!(Cli::launch(vec![
"foobar",
"--memory",
"size_mib=128",
"--vcpu",
... | rust_cleaned_test_functions.jsonl/95126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2901
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51617,
368,
341,
286,
442,
35264,
3210,
1555,
5977,
624,
286,
2060,
10297,
87014,
486,
33499,
25592,
0,
1183,
50267,
45014,
285,
9266,
5231,
286,
442,
13882,
4960,
3210,
1555,
5733,
624,
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_compress_lorem() {
let lorem = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod \
tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At \
vero eos et accusam et justo duo dolores et ea rebum. Stet clit... | rust_cleaned_test_functions.jsonl/49844 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87845,
5560,
1826,
368,
341,
262,
1077,
92385,
284,
330,
32783,
26342,
23655,
2444,
27212,
11,
390,
746,
31841,
12421,
573,
2388,
287,
655,
21561,
11,
10923,
12757,
2477,
372,
88,
384,
404,
2593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_one_minus() {
assert_eq!(LogProb::ln_zero().ln_one_minus_exp(), LogProb::ln_one());
assert_eq!(LogProb::ln_one().ln_one_minus_exp(), LogProb::ln_zero());
} | rust_cleaned_test_functions.jsonl/59939 | {
"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,
11667,
38457,
368,
341,
286,
2060,
10714,
10297,
2201,
36980,
486,
2261,
19359,
1005,
2261,
11667,
38457,
14214,
1507,
2835,
36980,
486,
2261,
11667,
1423,
286,
2060,
10714,
10297,
2201,
36980,
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 |
#[test]
fn test_compile_shift_right_b() {
let compiled = bitwise::compile_shift_right("B".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b00111110);
} | rust_cleaned_test_functions.jsonl/100614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
22230,
10539,
880,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
22230,
10539,
445,
33,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_board_new() {
let cols = 6;
let rows = 3;
let bg = 0;
let fg = 1;
let _b: Board = Board::new(cols, rows, bg, fg);
} | rust_cleaned_test_functions.jsonl/65990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23919,
5921,
368,
341,
286,
1077,
17000,
284,
220,
21,
280,
286,
1077,
6978,
284,
220,
18,
280,
286,
1077,
8951,
284,
220,
15,
280,
286,
1077,
29799,
284,
220,
16,
280,
286,
1077,
716,
65,
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 |
#[test]
fn test_json_pointer() {
let data: Value = from_str(
r#"{
"foo": ["bar", "baz"],
"": 0,
"a/b": 1,
"c%d": 2,
"e^f": 3,
"g|h": 4,
"i\\j": 5,
"k\"l": 6,
" ": 7,
"m~n": 8
}"#,
).unwrap();
assert_eq!(... | rust_cleaned_test_functions.jsonl/29857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
21425,
368,
341,
1066,
262,
1077,
821,
25,
5162,
284,
504,
2895,
1006,
286,
435,
55543,
515,
286,
330,
7975,
788,
4383,
2257,
497,
330,
42573,
8097,
286,
330,
788,
220,
15,
345,
286,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fuse_commit_version() -> Result<()> {
let v = &databend_query::configs::DATABEND_COMMIT_VERSION;
assert!(v.len() > 0);
Ok(())
} | rust_cleaned_test_functions.jsonl/23123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
810,
36346,
9438,
368,
1464,
5714,
71698,
341,
262,
1077,
348,
284,
609,
67,
2096,
408,
5738,
486,
53978,
486,
35,
19562,
4689,
77364,
10678,
280,
262,
2060,
10297,
85,
19406,
368,
861,
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 |
#[test]
fn test_incr_nonce_overflow() {
// other than in the golang implementation we panic if we incremented more than 64
// bits allow.
// In golang this would reset to an all zeroes nonce.
let mut nonce = Nonce([0_u8, 0, 0, 0, 255, 255, 255, 255, 255, 255, 255, 255]);
nonce.increment();
} | rust_cleaned_test_functions.jsonl/24234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
5082,
48508,
79073,
368,
341,
262,
442,
1008,
1091,
304,
279,
342,
37287,
8129,
582,
21975,
421,
582,
87819,
803,
1091,
220,
21,
19,
198,
262,
442,
9472,
2138,
624,
262,
442,
758,
342,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vertices_exist() {
let left_image = [[1, 1].to_vec()].to_vec();
let right_image = [[1, 0].to_vec()].to_vec();
let max_disparity: usize = 2;
let diffusion_graph = DiffusionGraph::initialize(left_image, right_image, max_disparity, 1.);
let vertices = vec![ve... | rust_cleaned_test_functions.jsonl/133555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37720,
35906,
368,
341,
286,
1077,
2115,
4954,
284,
4318,
16,
11,
220,
16,
936,
983,
13251,
57590,
983,
13251,
543,
286,
1077,
1290,
4954,
284,
4318,
16,
11,
220,
15,
936,
983,
13251,
57590,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cli_parse_close() {
let test_commands = app("test", "desc", "version");
let default_keypair = Keypair::new();
let keypair_file = make_tmp_path("keypair_file");
write_keypair_file(&default_keypair, &keypair_file).unwrap();
let default_signer = DefaultSigne... | rust_cleaned_test_functions.jsonl/22248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2080
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47147,
21039,
12704,
368,
341,
286,
1077,
1273,
44151,
284,
906,
445,
1944,
497,
330,
8614,
497,
330,
4366,
3071,
286,
1077,
1638,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
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,
1... | 1 |
#[test]
fn test_constants_and_bits() {
let a = bits::<16>(0xdead);
let b = a + 1_u32;
let c = 1_usize + a;
println!("{:x}", b);
assert_eq!(b, bits::<16>(0xdeae));
assert_eq!(b, c);
} | rust_cleaned_test_functions.jsonl/75139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55642,
8378,
20034,
368,
341,
286,
1077,
264,
284,
9472,
27638,
16,
21,
2235,
15,
87,
33754,
317,
286,
1077,
293,
284,
264,
488,
220,
16,
7300,
18,
17,
280,
286,
1077,
272,
284,
220,
16,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_backward_iterate() {
let mut it = build_iterator_for_test();
it.seek(Seek::Last).unwrap();
assert!(it.is_valid());
assert_eq!(&full_key(b"k05", 5)[..], it.key());
assert_eq!(b"v05", it.value());
it.prev().unwrap();
assert!(it.is_valid());... | rust_cleaned_test_functions.jsonl/5449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70477,
11723,
349,
368,
341,
286,
1077,
5206,
432,
284,
1936,
13491,
5478,
4452,
1428,
286,
432,
38179,
7,
39350,
486,
5842,
568,
15454,
543,
286,
2060,
10297,
275,
2079,
8337,
1423,
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_add_new_books() -> Result<()> {
let sql = SqlBuilder::insert_into("books")
.field("title")
.field("price")
.values(&[quote("In Search of Lost Time"), 150.to_string()])
.values(&["'Don Quixote', 200"])
.sql()?;
assert_eq... | rust_cleaned_test_functions.jsonl/12603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5921,
73084,
368,
1464,
5714,
71698,
341,
286,
1077,
5704,
284,
7224,
3297,
486,
4208,
45514,
445,
12110,
1138,
310,
659,
2566,
445,
2102,
1138,
310,
659,
2566,
445,
6555,
1138,
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... | 3 |
#[test]
fn test_transaction_signature_err_modified_input() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let (mut tx, _ledger) = create_test_tx();
// Remove an input.
tx.prefix.inputs[0].ring.pop();
match validate_signature(&tx, &mut rng) {
Err(... | rust_cleaned_test_functions.jsonl/78563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
39859,
9266,
37749,
5898,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17,
2558,
286,
1077,
320,
6984... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_replace_not_applicable_one_segment() {
check_assist_not_applicable(
replace_qualified_name_with_use,
"
impl foo<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/19577 | {
"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,
10633,
7913,
8191,
46114,
11667,
28061,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
8290,
62,
36335,
1269,
6615,
15951,
345,
310,
6228,
6383,
15229,
27,
91,
29,
369,
33428,
341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_optflagmulti_mix() {
let args = vec!("--verbose".to_string(), "-v".to_string(),
"-vv".to_string(), "verbose".to_string());
let opts = vec!(optflagmulti("v", "verbose", "verbosity"));
let rs = getopts(args.as_slice(), opts.as_slice());
match... | rust_cleaned_test_functions.jsonl/11193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
9903,
26268,
67729,
368,
341,
286,
1077,
2827,
284,
7486,
17223,
313,
14883,
3263,
983,
3904,
1507,
6523,
85,
3263,
983,
3904,
3148,
664,
6523,
33075,
3263,
983,
3904,
1507,
330,
14883,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_with_suppress_error_option() {
let test_file_path = "test_num_page.log";
let mut scenario = new_ucmd!();
scenario
.args(&["--pages=20:5", "-r", test_file_path])
.fails()
.stderr_is("")
.stdout_is("");
} | rust_cleaned_test_functions.jsonl/103052 | {
"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,
6615,
23723,
1873,
4096,
9672,
368,
341,
262,
1077,
1273,
2458,
2638,
284,
330,
1944,
4273,
6129,
1665,
876,
262,
1077,
5206,
15048,
284,
501,
68887,
2277,
0,
543,
262,
15048,
198,
286,
659,
211... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_insensitive() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(
&["--ignore-case", "C.Foo"],
"one/two/c.foo
one/two/C.Foo2",
);
te.assert_output(
&["--case-sensitive", "--ignore-case", "C.Foo"],
"one/two/c.foo
... | rust_cleaned_test_functions.jsonl/10854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
34386,
18723,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
1013,
3713,
7645,
1006,
286,
609,
1183,
313,
13130,
38485,
497,
330,
34,
991,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iso_week_date() {
assert!(iso_week_date(b"2015-W06-8").is_err());
assert!(iso_week_date(b"2015-W068").is_err());
assert!(iso_week_date(b"2015-W06-0").is_err());
assert!(iso_week_date(b"2015-W00-2").is_err());
assert!(iso_week_date(b"2015-W54-2").is_err());
assert!(iso_wee... | rust_cleaned_test_functions.jsonl/58595 | {
"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,
49660,
31277,
4164,
368,
341,
262,
2060,
10297,
15420,
31277,
4164,
1883,
1,
17,
15,
16,
20,
13002,
15,
21,
12,
23,
1827,
285,
9266,
1423,
262,
2060,
10297,
15420,
31277,
4164,
1883,
1,
17,
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_tracing() {
use dprint_core::formatting::*;
let trace_result = trace_printing(|| {
let mut print_items = PrintItems::new();
print_items.push_info(Info::new("info"));
print_items.push_signal(Signal::NewLine);
print_items.push_str("string");
print_i... | rust_cleaned_test_functions.jsonl/127251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
4527,
368,
341,
262,
990,
294,
1350,
15467,
486,
2243,
1280,
79304,
262,
1077,
11655,
5287,
284,
11655,
10064,
287,
79453,
341,
286,
1077,
5206,
1173,
12134,
284,
8213,
4353,
486,
931,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.