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_construct() {
assert_relative_eq!(Deg(50.0), Deg::new(50.0));
let mut a1 = Deg(100.0);
let scalar = a1.scalar();
a1.set_scalar(scalar + 150.0);
assert_relative_eq!(a1, Deg(250.0));
} | rust_cleaned_test_functions.jsonl/58801 | {
"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,
64803,
368,
341,
286,
2060,
29286,
10714,
10297,
45657,
7,
20,
15,
13,
15,
701,
57237,
486,
931,
7,
20,
15,
13,
15,
1106,
286,
1077,
5206,
264,
16,
284,
57237,
7,
16,
15,
15,
13,
15,
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_make_2() {
let res = make(OpConstant, vec![65536]);
assert_eq!(res, vec![0, 0, 0]);
} | rust_cleaned_test_functions.jsonl/89579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
62,
17,
368,
341,
286,
1077,
592,
284,
1281,
54494,
15472,
11,
7486,
20703,
21,
20,
20,
18,
21,
2558,
286,
2060,
10714,
10297,
416,
11,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
2558... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_request() {
use helix::*;
let req = GetCustomRewardRedemptionRequest::builder()
.broadcaster_id("274637212".to_string())
.reward_id("92af127c-7326-4483-a52b-b0da0be61c01".to_string())
.status(CustomRewardRedemptionStatus::Canceled)
.build();
// From t... | rust_cleaned_test_functions.jsonl/76185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 959
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
341,
262,
990,
11338,
941,
56162,
262,
1077,
4232,
284,
2126,
10268,
59622,
6033,
33106,
1900,
486,
17850,
741,
286,
659,
65,
8546,
32020,
842,
445,
17,
22,
19,
21,
18,
22,
17,
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_multiple_chunk() {
let mut b = new_test_builder();
// first filter
b.start_block(0);
b.add_key(&Slice::from("foo"));
b.start_block(2000);
b.add_key(&Slice::from("bar"));
// second filter
b.start_block(3100);
b.add_key(&Slic... | rust_cleaned_test_functions.jsonl/106962 | {
"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,
45233,
30539,
368,
341,
286,
1077,
5206,
293,
284,
501,
4452,
28532,
543,
286,
442,
1156,
4051,
198,
286,
293,
4962,
7113,
7,
15,
317,
286,
293,
1364,
3097,
2099,
33236,
486,
1499,
445,
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_vcx_init_with_default_values() {
let wallet_name = settings::DEFAULT_WALLET_NAME;
::utils::devsetup::tests::setup_ledger_env(wallet_name);
wallet::close_wallet().unwrap();
pool::close().unwrap();
let content = "{}".to_string();
let cb = return_typ... | rust_cleaned_test_functions.jsonl/19801 | {
"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,
2273,
25844,
6137,
6615,
9993,
9146,
368,
341,
286,
1077,
15085,
1269,
284,
5003,
486,
17285,
2763,
969,
20756,
4708,
280,
286,
3504,
6031,
486,
3583,
15188,
486,
23841,
486,
15188,
38367,
1389,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_method() {
let t = TryMethodTemplate { some: false }; // instantiate your struct
assert!(t.call().is_err()); // then call it.
let t = TryMethodTemplate { some: true }; // instantiate your struct
assert_eq!("foo", t.call().unwrap()); // then call it.
} | rust_cleaned_test_functions.jsonl/92845 | {
"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,
53283,
9032,
368,
341,
262,
1077,
259,
284,
9735,
3523,
7275,
314,
1045,
25,
895,
20066,
442,
40902,
697,
2036,
198,
262,
2060,
10297,
83,
8524,
1005,
285,
9266,
13426,
442,
1221,
1618,
432,
382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_operator_in_encrypted_to_string() {
let name1 = _random_vector(10);
let value1 = _random_vector(10);
let query = Operator::In(
TagName::EncryptedTagName(name1.clone()),
vec![TargetValue::Encrypted(value1.clone())]
);
let js... | rust_cleaned_test_functions.jsonl/11887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
40594,
1243,
13781,
14026,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
12247,
7,
16,
15,
626,
286,
1077,
3239,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_conversions() {
// closure used for the repeated tests
let conversion_check = |esys_handle: ESYS_TR, object_handle: ObjectHandle| {
assert_eq!(esys_handle, ESYS_TR::from(object_handle));
assert_eq!(object_handle, ObjectHandle::from(esys_handle));
};
// ... | rust_cleaned_test_functions.jsonl/60194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55642,
3382,
28290,
368,
341,
262,
442,
21955,
1483,
369,
279,
11504,
7032,
198,
262,
1077,
14409,
7200,
284,
760,
288,
1047,
10630,
25,
19287,
9394,
6410,
11,
1633,
10630,
25,
3002,
6999,
91,
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_match_any_body_by_default() {
let _m = mock("POST", "/").create();
let (status, _, _) = request_with_body("POST /", "", "hello");
assert_eq!("HTTP/1.1 200 OK\r\n", status);
} | rust_cleaned_test_functions.jsonl/82382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
37248,
14114,
3710,
9993,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
2946,
497,
3521,
1827,
3182,
1428,
262,
1077,
320,
2829,
11,
8358,
27439,
284,
1681,
6615,
14114,
445,
2946,
608,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reduce_sum_f32x4() {
let test_f32x4 = f32x4::from_elts(1.0, 2.0, 3.0, 4.0);
let mut result = 0f32;
result += test_f32x4;
let expected_result = 1.0 + 2.0 + 3.0 + 4.0;
assert_eq!(result, expected_result);
} | rust_cleaned_test_functions.jsonl/25590 | {
"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,
64596,
10160,
761,
18,
17,
87,
19,
368,
341,
286,
1077,
1273,
761,
18,
17,
87,
19,
284,
282,
18,
17,
87,
19,
486,
1499,
21602,
2576,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
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_fetch_source_3() {
let (_temp_dir, deno_dir) = test_setup();
let cwd = std::env::current_dir().unwrap();
let cwd_string = cwd.to_str().unwrap();
let module_name = "http://example.com/mt_text_typescript.t1.ts"; // not used
let filename =
format!("{}/tests/subdir/mt_... | rust_cleaned_test_functions.jsonl/72746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
10347,
62,
18,
368,
341,
1066,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
543,
262,
1077,
46938,
284,
1460,
486,
3160,
486,
3231,
4334,
1005,
15454,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_readme_doomsday() {
use num_iter::range_inclusive;
for y in range_inclusive(MIN_DATE.year(), MAX_DATE.year()) {
// even months
let d4 = NaiveDate::from_ymd(y, 4, 4);
let d6 = NaiveDate::from_ymd(y, 6, 6);
let d8 = NaiveDate::from_y... | rust_cleaned_test_functions.jsonl/29540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2660,
814,
4191,
82,
1292,
368,
341,
286,
990,
1629,
11723,
486,
9669,
1243,
8336,
401,
286,
369,
379,
304,
2088,
1243,
8336,
3189,
687,
18500,
24414,
1507,
8334,
18500,
24414,
2140,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_update_summary() -> Result<(), std::io::Error> {
let tmp_path = "./tmp_file";
let original_line = "original_line";
// Create the file with only the original line.
std::fs::write(tmp_path, original_line)?;
// Add in the new line.
update_summary(tm... | rust_cleaned_test_functions.jsonl/66792 | {
"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,
8882,
27251,
368,
1464,
5714,
68843,
1460,
486,
815,
486,
1454,
29,
341,
286,
1077,
4174,
2638,
284,
5924,
5173,
2458,
876,
286,
1077,
4024,
6528,
284,
330,
9889,
6528,
3302,
286,
442,
4230,
279... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_print_tabular_vbox() {
// test 1
let mut rows = Vec::<Vec<String>>::new();
let row = vec![
"omega".to_string(),
"superduperfineexcellent".to_string(),
"\\ext".to_string(),
];
rows.push(row);
let row = vec![
... | rust_cleaned_test_functions.jsonl/10758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
17344,
1276,
2273,
2011,
368,
341,
286,
442,
1273,
220,
16,
271,
286,
1077,
5206,
6978,
284,
11312,
27638,
10050,
3464,
77595,
931,
543,
286,
1077,
2802,
284,
7486,
90515,
310,
330,
32696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_request() -> Result<(), Box<dyn Error>> {
let client = Client::new("token".to_string());
let channel_id = Id::new(123);
let actual = UpdateThread::new(&client, channel_id)
.rate_limit_per_user(60)?
.try_into_request()?;
let expected = Req... | rust_cleaned_test_functions.jsonl/104262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
2943,
284,
8423,
486,
931,
445,
5839,
3263,
983,
3904,
1423,
286,
1077,
5496,
842,
284,
5223,
486,
931,
7,
16,
17,
18,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_custom_entrypoint() {
let mut file = File::open("tests/elfs/unresolved_syscall.so").expect("file open failed");
let mut elf = Vec::new();
file.read_to_end(&mut elf).unwrap();
elf[24] = 80; // Move entrypoint to later in the text section
let config = Config {
enable_in... | rust_cleaned_test_functions.jsonl/59056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
9078,
2768,
368,
341,
262,
1077,
5206,
1034,
284,
2887,
486,
2508,
445,
23841,
14,
490,
82,
35217,
39747,
20344,
6659,
26476,
1827,
17119,
445,
1192,
1787,
4641,
797,
262,
1077,
5206,
40745... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mixed_stop_hyphen() {
let args = vec![
"-a".to_string(),
"-".to_string(),
"-c".to_string(),
"d".to_string(),
];
match Options::new()
.parsing_style(ParsingStyle::StopAtFirstFree)
.optflag("a", "", "")
.optopt("c", "", "", "")
... | rust_cleaned_test_functions.jsonl/52384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
3286,
19039,
1523,
88,
14769,
368,
341,
262,
1077,
2827,
284,
7486,
90515,
286,
6523,
64,
3263,
983,
3904,
3148,
286,
6523,
3263,
983,
3904,
3148,
286,
6523,
66,
3263,
983,
3904,
3148,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_receive_before_send() {
init_test_log();
// to wait for the message.
let (sender, receiver) = create::<u32>(5, 20);
let receiver2 = receiver.clone();
let mutex = Arc::new(Mutex::new(false));
let rx_mutex = mutex.clone();
let rx =... | rust_cleaned_test_functions.jsonl/83272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 685
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38557,
23708,
13565,
368,
341,
286,
2930,
4452,
5224,
1428,
1789,
286,
442,
311,
3783,
369,
279,
1943,
624,
286,
1077,
320,
11644,
11,
13964,
8,
284,
1855,
27638,
84,
18,
17,
2235,
20,
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... | 6 |
#[test]
fn test_neg64() {
test_interpreter_and_jit_asm!(
"
mov32 r0, 2
neg r0
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0xfffffffffffffffe } },
3
);
} | rust_cleaned_test_functions.jsonl/58929 | {
"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,
28209,
21,
19,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
18,
17,
435,
15,
11,
220,
17,
198,
286,
4184,
435,
15,
198,
286,
4869,
756,
286,
10239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wycheproof() {
let tests: P256TestVector =
P256TestVector::from_file("tests/wycheproof/ecdh_secp256r1_ecpoint_test.json");
assert_eq!(tests.algorithm, "ECDH");
let num_tests = tests.numberOfTests;
let mut tests_run = 0;
for testGroup in tests.testGroups.iter() {
... | rust_cleaned_test_functions.jsonl/4911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 867
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
5641,
747,
75636,
368,
341,
262,
1077,
7032,
25,
393,
17,
20,
21,
2271,
3781,
4035,
286,
393,
17,
20,
21,
2271,
3781,
486,
1499,
2458,
445,
23841,
6324,
5641,
747,
75636,
73058,
30621,
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... | 5 |
#[test]
fn test_persist_ref_unref() {
let block_manager = BlockManager::new();
let a = create_block("A", NULL_BLOCK_IDENTIFIER, 0);
let b = create_block("B", "A", 1);
let c = create_block("C", "A", 1);
let d = create_block("D", "C", 2);
let e = create_block("E", ... | rust_cleaned_test_functions.jsonl/10255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 889
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
7793,
49484,
368,
341,
286,
1077,
2504,
12144,
284,
8362,
2043,
486,
931,
1428,
286,
1077,
264,
284,
1855,
7113,
445,
32,
497,
1770,
18756,
49554,
11,
220,
15,
317,
286,
1077,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_and_then() {
let x: Option<int> = Some(1);
assert_eq!(x.and_then(|x| Some(x + 1)), Some(2));
assert_eq!(x.and_then(|_| None::<int>), None);
let x: Option<int> = None;
assert_eq!(x.and_then(|x| Some(x + 1)), None);
assert_eq!(x.and_then(|_| None::<... | rust_cleaned_test_functions.jsonl/14246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
68367,
368,
341,
286,
1077,
856,
25,
6959,
4159,
29,
284,
4329,
7,
16,
317,
286,
2060,
10714,
10297,
87,
34724,
68367,
22428,
87,
91,
4329,
2075,
488,
220,
16,
5731,
4329,
7,
17,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concat_array() {
let input = json!([1, 2, 3,]);
let mut args = HashMap::new();
args.insert("with".to_string(), json!([3, 4]));
let expected = json!([1, 2, 3, 3, 4,]);
let res = concat(&input, &args);
assert!(res.is_ok());
assert_eq!(res.un... | rust_cleaned_test_functions.jsonl/62072 | {
"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,
57478,
3858,
368,
341,
286,
1077,
1946,
284,
2951,
0,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
2558,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
4197,
3263,
983,
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_305() {
assert_eq!(
Solution::num_islands2(3, 3, vec![vec![0, 0], vec![0, 1], vec![1, 2], vec![2, 1]]),
vec![1, 1, 2, 3]
);
assert_eq!(
Solution::num_islands2(3, 3, vec![vec![0, 0], vec![0, 1], vec![1, 2], vec![1, 2]]),
vec!... | rust_cleaned_test_functions.jsonl/17205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
18,
15,
20,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
2413,
6892,
8166,
17,
7,
18,
11,
220,
18,
11,
7486,
20703,
4083,
20703,
15,
11,
220,
15,
1125,
7486,
20703,
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_one() {
// It is inside the box1
let box1 = &[12, 16, 45, 35];
let box2 = &[10, 15, 50, 40];
assert_eq!(overlaps(&box1, &box2), true);
} | rust_cleaned_test_functions.jsonl/71427 | {
"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,
11667,
368,
341,
286,
442,
1084,
374,
4766,
279,
3745,
16,
198,
286,
1077,
3745,
16,
284,
44590,
16,
17,
11,
220,
16,
21,
11,
220,
19,
20,
11,
220,
18,
20,
935,
286,
1077,
3745,
17,
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_read_write_be() {
let uints = [0, 1, 2, 42, 10_123, 100_123_456, ::u64::MAX];
let mut writer = MemWriter::new();
for i in uints.iter() {
writer.write_be_u64(*i).unwrap();
}
let mut reader = MemReader::new(writer.unwrap());
for i in ui... | rust_cleaned_test_functions.jsonl/4836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
9165,
21263,
368,
341,
286,
1077,
2622,
82,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
19,
17,
11,
220,
16,
15,
62,
16,
17,
18,
11,
220,
16,
15,
15,
62,
16,
17,
18,
62,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_max_size_resume() {
let data_dir = tempdir().unwrap();
let data_dir = data_dir.path().to_path_buf();
let num_lines: usize = 1000;
let line_size = 1000;
let max_size = num_lines * line_size / 2;
let in_addr1 = next_addr();
let in_addr2 = next_addr();
let out_addr... | rust_cleaned_test_functions.jsonl/113331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 732
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
2368,
58132,
368,
341,
262,
1077,
821,
4334,
284,
2730,
3741,
1005,
15454,
543,
262,
1077,
821,
4334,
284,
821,
4334,
3875,
1005,
983,
2638,
10363,
1428,
262,
1077,
1629,
18323,
25,
22301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pow() {
let a: Array = [1, 2, 3][..].into();
let b: Array = [2][..].into();
assert_eq!(a.pow(&b), [1.0, 4.0, 9.0][..].into());
let a: Array = [1, 2, 3][..].into();
let b: Array = [2.0][..].into();
assert_eq!(a.pow(&b), [1.0, 4.0, 9.0][..].into());... | rust_cleaned_test_functions.jsonl/45233 | {
"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,
56183,
368,
341,
286,
1077,
264,
25,
2910,
284,
508,
16,
11,
220,
17,
11,
220,
18,
1457,
496,
936,
18122,
543,
286,
1077,
293,
25,
2910,
284,
508,
17,
1457,
496,
936,
18122,
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,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_envelope_take_item() {
let event_id = EventId::new();
let mut envelope = Envelope::from_request(Some(event_id), request_meta());
let mut item1 = Item::new(ItemType::Attachment);
item1.set_filename("item1");
envelope.add_item(item1);
let mut item2... | rust_cleaned_test_functions.jsonl/103607 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
18853,
73261,
5634,
368,
341,
286,
1077,
1538,
842,
284,
3665,
764,
486,
931,
543,
286,
1077,
5206,
34398,
284,
2925,
18853,
486,
1499,
7893,
65405,
6235,
842,
701,
1681,
13381,
5231,
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_from_reflection_zx_plane() {
let normal = Unit::from_value(-Vector3::unit_y());
let expected = Matrix3x3::new(
1.0, 0.0, 0.0,
0.0, -1.0, 0.0,
0.0, 0.0, 1.0
);
let result = Matrix3x3::from_reflection(&normal);
asser... | rust_cleaned_test_functions.jsonl/129057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
7793,
1170,
6415,
87,
46023,
368,
341,
286,
1077,
4622,
284,
7954,
486,
1499,
3142,
4080,
3781,
18,
486,
3843,
4178,
1423,
286,
1077,
3601,
284,
11631,
18,
87,
18,
486,
931,
1006,
310,
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_null_time_diff() {
let output = RpnFnScalarEvaluator::new()
.evaluate::<Duration>(ScalarFuncSig::NullTimeDiff)
.unwrap();
assert_eq!(output, None);
} | rust_cleaned_test_functions.jsonl/36243 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
3009,
15850,
368,
341,
286,
1077,
2550,
284,
431,
19958,
24911,
20639,
89042,
486,
931,
741,
310,
659,
47291,
27638,
12945,
2235,
20639,
9626,
47246,
486,
3280,
1462,
21751,
340,
310,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_seed() {
let t = |tv:&TestVector| {
let prvenc = fiatproof::ui::bitcoin::MAINNET.create_xprv_encoder();
let seed = fiatproof::utils::h2b(tv.seed).unwrap();
let xprv = bip32::XPrv::from_seed(seed);
assert!(xprv.is_ok());
let xprv = xprv.unwrap();
assert_eq!(... | rust_cleaned_test_functions.jsonl/98412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33809,
368,
341,
256,
1077,
259,
284,
760,
22209,
35218,
2271,
3781,
91,
341,
414,
1077,
84888,
954,
284,
53830,
15780,
486,
1963,
486,
83910,
486,
41815,
15373,
2520,
3212,
649,
85,
39068,
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... | 1 |
#[test]
fn test_tokenize_real() {
let mut tokenizer = Tokenizer::new().unwrap();
let tokens: Vec<&str> = tokenizer
.tokenize_str(
"本項で解説する地方病とは、山梨県における日本住血吸虫症の呼称であり、\
長い間その原因が明らかにならず住民を苦しめた感染症である。",
)
.unwrap();
assert_eq!(... | rust_cleaned_test_functions.jsonl/61445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
15266,
368,
341,
286,
1077,
5206,
45958,
284,
9660,
3135,
486,
931,
1005,
15454,
543,
286,
1077,
11211,
25,
11312,
52244,
495,
29,
284,
45958,
198,
310,
659,
5839,
551,
2895,
1006,
394,
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_poh_verify() {
let zero = Hash::default();
let one = hash(zero.as_ref());
let two = hash(one.as_ref());
let one_with_zero = hashv(&[zero.as_ref(), zero.as_ref()]);
let mut poh = Poh::new(zero, None);
assert!(verify(
zero,
&... | rust_cleaned_test_functions.jsonl/38892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
35638,
368,
341,
286,
1077,
7168,
284,
6531,
486,
2258,
543,
286,
1077,
825,
284,
5175,
13174,
2328,
5357,
7793,
1423,
286,
1077,
1378,
284,
5175,
51067,
5357,
7793,
1423,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ser_de() {
let mut vec = ArrayVec::<[u32; 3]>::new();
vec.push(20);
vec.push(55);
vec.push(123);
assert_tokens(&vec, &[
Token::Seq { len: Some(3) },
Token::U32(20),
Token::U32(55),
Token::U32(123),
... | rust_cleaned_test_functions.jsonl/67021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
2259,
368,
341,
286,
1077,
5206,
7486,
284,
2910,
10050,
27638,
58,
84,
18,
17,
26,
220,
18,
60,
6831,
931,
543,
286,
7486,
2552,
7,
17,
15,
317,
286,
7486,
2552,
7,
20,
20,
317,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_webpki_separate_ca() {
let mut params = util::default_params();
params.is_ca = IsCa::Ca(BasicConstraints::Unconstrained);
let ca_cert = Certificate::from_params(params).unwrap();
let ca_der = ca_cert.serialize_der().unwrap();
let trust_anchor_list = &[cert_der_as_trust_anchor(Input::from(&... | rust_cleaned_test_functions.jsonl/74779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25960,
79,
6642,
3453,
67598,
49604,
368,
341,
10217,
5206,
3628,
284,
4094,
486,
2258,
6745,
543,
25856,
2079,
49604,
284,
2160,
22571,
486,
22571,
5349,
5971,
12925,
486,
1806,
443,
57727,
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_fp2_sqrt_2() {
// a = 1488924004771393321054797166853618474668089414631333405711627789629391903630694737978065425271543178763948256226639*u + 784063022264861764559335808165825052288770346101304131934508881646553551234697082295473567906267937225174620141295
let a = Fp2::new(
... | rust_cleaned_test_functions.jsonl/62488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2009
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34160,
17,
92199,
62,
17,
368,
341,
286,
442,
264,
284,
220,
16,
19,
23,
23,
24,
17,
19,
15,
15,
19,
22,
22,
16,
18,
24,
18,
18,
17,
16,
15,
20,
19,
22,
24,
22,
16,
21,
21,
23,
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_query_subspaces() {
let query = SubspacesQuery::Subspaces {
pagination: Default::default(),
};
let response = mock_subspaces_query_response(&query);
let expected = to_binary(&QuerySubspacesResponse {
subspaces: vec![MockSubspacesQueries::ge... | rust_cleaned_test_functions.jsonl/109483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
5228,
44285,
368,
341,
286,
1077,
3239,
284,
3719,
44285,
2859,
486,
3136,
44285,
341,
310,
28495,
25,
7899,
486,
2258,
3148,
286,
2605,
286,
1077,
2033,
284,
7860,
5228,
44285,
5738,
9655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_superimpose_style_sections_3() {
let sections_1 = vec![(*SYNTAX_STYLE, "ab")];
let sections_2 = vec![(*NON_SYNTAX_HIGHLIGHTED_STYLE, "ab")];
let superimposed = vec![(*NON_SYNTAX_HIGHLIGHTED_STYLE, "ab".to_string())];
assert_eq!(
sup... | rust_cleaned_test_functions.jsonl/13390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38886,
318,
2900,
15117,
59485,
62,
18,
368,
341,
310,
1077,
14158,
62,
16,
284,
7486,
20703,
4071,
18416,
78221,
41775,
11,
330,
370,
899,
935,
310,
1077,
14158,
62,
17,
284,
7486,
20703,
4071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subtraction() {
let a = Fp([
0x5360_bb59_7867_8032,
0x7dd2_75ae_799e_128e,
0x5c5b_5071_ce4f_4dcf,
0xcdb2_1f93_078d_bb3e,
0xc323_65c5_e73f_474a,
0x115a_2a54_89ba_be5b,
]);
let b = Fp([
0x9fd2_8773_3d23_dda0,
0xb16b_f2af_7... | rust_cleaned_test_functions.jsonl/23231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
26425,
368,
341,
262,
1077,
264,
284,
434,
79,
8956,
286,
220,
15,
87,
20,
18,
21,
15,
50255,
20,
24,
62,
22,
23,
21,
22,
62,
23,
15,
18,
17,
345,
286,
220,
15,
87,
22,
631,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_txn_store_scan() {
let store = AssertionStorage::default();
store.put_ok(b"A", b"A10", 5, 10);
store.put_ok(b"C", b"C10", 5, 10);
store.put_ok(b"E", b"E10", 5, 10);
let check_v10 = || {
store.scan_ok(b"", None, 0, 10, vec![]);
store.scan_ok(b"", None, 1... | rust_cleaned_test_functions.jsonl/37872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92299,
14809,
28857,
368,
341,
262,
1077,
3553,
284,
46730,
5793,
486,
2258,
1428,
1066,
262,
3553,
3597,
19817,
1883,
29133,
497,
293,
29133,
16,
15,
497,
220,
20,
11,
220,
16,
15,
317,
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... | 5 |
#[test]
fn test_bad_regions() {
let debugger = new_debugger();
let kv_engine = &debugger.engines.kv;
let raft_engine = &debugger.engines.raft;
let store_id = 1; // It's a fake id.
let mut wb1 = raft_engine.write_batch();
let cf1 = CF_DEFAULT;
let mut wb2... | rust_cleaned_test_functions.jsonl/33468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1762
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
58035,
368,
341,
286,
1077,
44473,
284,
501,
15446,
1389,
543,
286,
1077,
16178,
24823,
284,
609,
8349,
1389,
90413,
1543,
5202,
85,
280,
286,
1077,
52455,
24823,
284,
609,
8349,
1389,
9041... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_display() {
assert_eq!("1.0", BigDecimal::one().to_string());
assert_eq!("2.0", BigDecimal::from(2u32).to_string());
assert_eq!("0.0", BigDecimal::zero().to_string());
assert!(BigDecimal::from(1.5f64).to_string().starts_with("1.500000"));
assert!(BigDecima... | rust_cleaned_test_functions.jsonl/57396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
2060,
10714,
17223,
16,
13,
15,
497,
20618,
486,
603,
1005,
983,
3904,
1423,
286,
2060,
10714,
17223,
17,
13,
15,
497,
20618,
486,
1499,
7,
17,
84,
18,
17,
568,
983,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_names_from_csr() {
let _ = env_logger::init();
let mut names = HashSet::new();
names.insert("cn.example.com".to_owned());
names.insert("www.example.com".to_owned());
names.insert("example.com".to_owned());
let names_from_csr = names_from_csr("tests/domain_with_san.csr").u... | rust_cleaned_test_functions.jsonl/96080 | {
"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,
9187,
5673,
666,
15094,
368,
341,
262,
1077,
716,
284,
6105,
27413,
486,
2327,
543,
262,
1077,
5206,
5036,
284,
18931,
486,
931,
543,
262,
5036,
7030,
445,
14271,
7724,
905,
3263,
983,
51973,
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_committed_entries_pagination() {
let l = default_logger();
let s = new_storage();
let mut raw_node = new_raw_node(1, vec![1, 2, 3], 10, 1, s, &l);
let mut entries = vec![];
for i in 2..10 {
entries.push(new_entry(1, i, None));
}
let mut msg = new_message_with... | rust_cleaned_test_functions.jsonl/120177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
5483,
26092,
82231,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
274,
284,
501,
23310,
543,
262,
1077,
5206,
7112,
5084,
284,
501,
16067,
5084,
7,
16,
11,
7486,
20703,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_select_expensive_harry_potter() -> Result<()> {
let sql = SqlBuilder::select_from("books")
.field("title")
.field("price")
.and_where("price > 100")
.and_where_like_left("title", "Harry Potter")
.sql()?;
assert_eq!(
... | rust_cleaned_test_functions.jsonl/12592 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
14214,
4025,
1523,
11433,
57952,
465,
368,
1464,
5714,
71698,
341,
286,
1077,
5704,
284,
7224,
3297,
486,
1742,
5673,
445,
12110,
1138,
310,
659,
2566,
445,
2102,
1138,
310,
659,
2566,
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... | 2 |
#[test]
fn test_parse_kernel_symbols() {
let data = "0000000000002000 A irq_stack_backing_store\n\
0000000000006000 A cpu_tss_rw [foo bar]\n"
.as_bytes();
let syms = parse_kernel_symbols(&mut BufReader::new(data)).unwrap();
assert_eq!(syms.keys().col... | rust_cleaned_test_functions.jsonl/8652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
26876,
55752,
368,
341,
286,
1077,
821,
284,
330,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
17,
15,
15,
15,
362,
38269,
15528,
3895,
287,
14809,
1699,
5661,
3502,
220,
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_assignment() {
let source = String::from(r"avariable = 99 + 2-0");
let tokens = lex_source(&source);
assert_eq!(
tokens,
vec![
Tok::Name {
name: String::from("avariable"),
},
Tok::... | rust_cleaned_test_functions.jsonl/53200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51891,
368,
341,
286,
1077,
2530,
284,
923,
486,
1499,
2601,
1,
36232,
2156,
284,
220,
24,
24,
488,
220,
17,
12,
15,
797,
286,
1077,
11211,
284,
22429,
10347,
2099,
2427,
317,
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_resolve_reference_missing() {
let document: CoreDocument = document();
// Resolving an existing reference to a missing method returns None
assert_eq!(document.resolve("#key-4"), None);
} | rust_cleaned_test_functions.jsonl/125546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
25433,
40447,
368,
341,
262,
1077,
2197,
25,
9518,
7524,
284,
2197,
1428,
262,
442,
1800,
19648,
458,
6350,
5785,
311,
264,
7402,
1714,
4675,
2240,
198,
262,
2060,
10714,
10297,
6062,
14691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_equal_hashes_ignored_args() {
let f = TestFixture::new();
assert_eq!(
hash_key(
&f,
&[
"--emit",
"link",
"-L",
"x=x",
"foo.rs",
... | rust_cleaned_test_functions.jsonl/8175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1044
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11478,
91616,
62,
58471,
8384,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
2060,
10714,
33673,
310,
5175,
3097,
1006,
394,
609,
69,
345,
394,
609,
9640,
503,
14482,
18712,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq_is_valid() {
let mut a = Fq(MODULUS);
assert!(!a.is_valid());
a.0.sub_noborrow(&FqRepr::from(1));
assert!(a.is_valid());
assert!(Fq(FqRepr::from(0)).is_valid());
assert!(Fq(FqRepr([
0xdf4671abd14dab3e,
0xe2dc0c9f534fbd33,... | rust_cleaned_test_functions.jsonl/2323 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 670
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
6892,
8337,
368,
341,
286,
1077,
5206,
264,
284,
434,
80,
3189,
2069,
1094,
2034,
317,
286,
2060,
0,
3471,
64,
2079,
8337,
1423,
286,
264,
13,
15,
4309,
1089,
674,
7768,
2099,
37,
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... | 2 |
#[test]
fn test_assign_local() {
eval_global!(
"\"hello\"; let test = [2,4,6,8]; let $out = test;",
Value::from(hashmap! {
"out".into() => Value::from(vec![2u64, 4, 6, 8]),
})
);
eval_global!(
"\"hello\"; let test = [4,6,8,1... | rust_cleaned_test_functions.jsonl/45675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
13564,
368,
341,
286,
5603,
19296,
33673,
310,
15898,
14990,
2105,
26,
1077,
1273,
284,
508,
17,
11,
19,
11,
21,
11,
23,
5265,
1077,
400,
411,
284,
1273,
64497,
310,
5162,
486,
1499,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_to_vector() {
let mut m = Matrix::new_identity();
m.set_translate((10.0, 11.0));
assert_eq!(10.0, m.translate_x());
assert_eq!(11.0, m.translate_y());
} | rust_cleaned_test_functions.jsonl/1096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
2346,
12247,
368,
972,
262,
1077,
5206,
296,
284,
11631,
486,
931,
46244,
1647,
262,
296,
980,
66381,
1188,
16,
15,
13,
15,
11,
220,
16,
16,
13,
15,
4860,
262,
2060,
10714,
10297,
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_filter_id() {
let rt = tokio::runtime::Runtime::new().unwrap();
let ch = CollectionHolder {
collection: rt.block_on(setup()),
rt: &rt,
};
let s = Searcher {
collection: ch.collection.clone_with_type(),
};
let ... | rust_cleaned_test_functions.jsonl/113866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
842,
368,
341,
286,
1077,
16677,
284,
9628,
815,
486,
22255,
486,
15123,
486,
931,
1005,
15454,
1428,
286,
1077,
521,
284,
11101,
8589,
341,
310,
4426,
25,
16677,
15697,
4470,
14171,
454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_service_sdk() {
let memdb = Arc::new(MemoryDB::new(false));
let state = new_state(Arc::clone(&memdb), None);
let rs = Rc::new(RefCell::new(state));
let arcs = Arc::new(MockStorage {});
let cq = DefaultChainQuerier::new(Arc::clone(&arcs));
let mut sdk = DefaultServiceSDK... | rust_cleaned_test_functions.jsonl/93574 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12267,
61783,
368,
341,
262,
1077,
1833,
1999,
284,
19689,
486,
931,
3189,
4731,
3506,
486,
931,
3576,
1106,
262,
1077,
1584,
284,
501,
4387,
4346,
1287,
486,
19982,
2099,
10536,
1999,
701,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_did_exchange_handle_other_message_from_null_state() {
let _setup = SetupIndyMocks::init();
let mut did_exchange_sm = inviter_sm().to_inviter_invited_state();
let routing_keys: Vec<String> = vec!("verkey123".into());
let service_en... | rust_cleaned_test_functions.jsonl/29139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
307,
59212,
10630,
30456,
6462,
5673,
15162,
4387,
368,
341,
394,
1077,
716,
15188,
284,
18626,
1425,
88,
72577,
486,
2327,
1428,
394,
1077,
5206,
1521,
59212,
15874,
284,
1529,
2015,
15874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_montgomery() {
let mut b : felem_as_words = [9794203289623549276, 7309342082925068282, 1139538881605221074, 15659550692327388916, 16008355200866287827, 582484205531694093];
let mut out : felem_as_words = [0, 0, 0, 0, 0, 0];
bls12_from_montgomery(&mut out, &mut b);
assert_eq!... | rust_cleaned_test_functions.jsonl/91334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
717,
544,
38230,
368,
341,
262,
1077,
5206,
293,
549,
1152,
3433,
11898,
18981,
284,
508,
24,
22,
24,
19,
17,
15,
18,
17,
23,
24,
21,
17,
18,
20,
19,
24,
17,
22,
21,
11,
220,
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_reader() -> Result<()> {
let mut reader = InputReader::new("123abc");
let head = reader.head(4);
assert_eq!(head.unwrap(), "123a");
assert_eq!(reader.loc, Loc { line: 0, col: 0 });
let head = reader.head(10);
assert_eq!(head.is_none(), true);
... | rust_cleaned_test_functions.jsonl/45495 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
6604,
284,
5571,
5062,
486,
931,
445,
16,
17,
18,
13683,
3071,
286,
1077,
1968,
284,
6604,
16042,
7,
19,
317,
286,
2060,
10714,
10297,
1983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_temperatures() {
let mut p = bluetherm::Packet::new();
p.set_sensor1_reading(Some(32.0f64));
p.set_sensor2_reading(Some(100.5f64));
assert_eq!(Some(32.0f64), p.get_sensor1_reading());
assert_eq!(Some(100.5f64), p.get_sensor2_reading());
p.set_sensor1_reading(None);
... | rust_cleaned_test_functions.jsonl/124762 | {
"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,
28613,
712,
2789,
368,
341,
262,
1077,
5206,
281,
284,
1501,
84,
2723,
76,
486,
16679,
486,
931,
543,
262,
281,
980,
28899,
16,
81859,
65405,
7,
18,
17,
13,
15,
69,
21,
19,
1106,
262,
281,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_location_undefined_property() {
let mock_context = MockTransactionContext::new();
mock_context.create_gs1_schema();
let perm_checker = PermissionChecker::new(&mock_context);
let mut state = LocationState::new(&mock_context);
let properties = vec![... | rust_cleaned_test_functions.jsonl/20011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 933
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
13126,
62,
9614,
16638,
368,
341,
286,
1077,
7860,
8467,
284,
14563,
8070,
1972,
486,
931,
543,
286,
7860,
8467,
2520,
96930,
16,
25371,
1428,
286,
1077,
13854,
62715,
284,
18135,
35188,
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... | 2 |
#[test]
fn test_parse_standard_eop_line_bulletin_a() {
// Test good parse
let good_str = "741231 42412.00 I -0.043558 0.029749 0.265338 0.028736 I-0.2891063 0.0002710 2.9374 0.1916 P -0.259 0.199 -0.869 0.300 -.039000 .281000 -.2908000 -16.159 -1.585";
assert_eq!... | rust_cleaned_test_functions.jsonl/128060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
48688,
2204,
453,
6528,
94619,
258,
4306,
368,
341,
286,
442,
3393,
1661,
4715,
198,
286,
1077,
1661,
2895,
284,
330,
22,
19,
16,
17,
18,
16,
220,
19,
17,
19,
16,
17,
13,
15,
15,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_tuple_iter() {
let mut iter = (1i32).into_value_tuple().into_iter();
assert_eq!(iter.next().unwrap(), Value::Int(Some(1)));
assert_eq!(iter.next(), None);
let mut iter = (1i32, 2.4f64).into_value_tuple().into_iter();
assert_eq!(iter.next().unwrap(),... | rust_cleaned_test_functions.jsonl/12483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
21773,
11723,
368,
341,
286,
1077,
5206,
5367,
284,
320,
16,
72,
18,
17,
568,
18122,
3142,
21773,
1005,
18122,
11723,
543,
286,
2060,
10714,
10297,
2015,
4529,
1005,
15454,
1507,
5162,
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_generate_parenthesis_1() {
assert_eq!(
vec![
String::from("()"),
],
Solution::generate_parenthesis(1),
);
} | rust_cleaned_test_functions.jsonl/81438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
620,
9151,
13189,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
7486,
90515,
394,
923,
486,
1499,
445,
368,
4461,
310,
3211,
310,
12478,
486,
19366,
620,
9151,
13189,
7,
16,
1326,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_run_get_net() {
if *NODE_SE {
return;
}
let ton_client = create_client();
let result = ton_client.contracts.run_get(
Some(&TonAddress::from_str("-1:3333333333333333333333333333333333333333333333333333333333333333").unwrap()),
None,
"par... | rust_cleaned_test_functions.jsonl/88275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
3062,
19722,
368,
972,
262,
421,
353,
40686,
3620,
972,
286,
470,
463,
262,
2553,
262,
1077,
8766,
8179,
284,
1855,
8179,
7317,
262,
1077,
1102,
284,
8766,
8179,
2862,
36188,
7634,
3062,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validate_module_publishing_non_association() {
let vm_validator = TestValidator::new();
let address = account_config::treasury_compliance_account_address();
let transaction = transaction_test_helpers::get_test_signed_module_publishing_transaction(
address,
1,
... | rust_cleaned_test_functions.jsonl/35409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
10750,
58779,
287,
21637,
58665,
367,
368,
341,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
1428,
262,
1077,
2621,
284,
2692,
5332,
486,
10157,
26102,
2965,
31612,
13500,
6744,
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... | 1 |
#[test]
fn test_lockfile_already_exists_error_msg() {
let schema_builder = schema::Schema::builder();
let index = Index::create_in_ram(schema_builder.build());
let _index_writer = index.writer_with_num_threads(1, 3_000_000).unwrap();
match index.writer_with_num_threads(1, 3_000_0... | rust_cleaned_test_functions.jsonl/58883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
1192,
80772,
9766,
4096,
6483,
368,
341,
286,
1077,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1922,
284,
8008,
486,
3182,
1243,
62124,
42735,
28532,
13239,
1423,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extract_assignment_match() {
check_assist(
extract_assigment,
r#"
fn foo() {
let mut a = 1;
match 1 {
1 => {
<|>a = 2;
},
2 => {
a = 3;
},
3 => {
a = 4;
}
}
}"#,
... | rust_cleaned_test_functions.jsonl/113115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
51891,
10708,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
12083,
343,
478,
345,
310,
435,
2,
698,
8822,
15229,
368,
341,
262,
1077,
5206,
264,
284,
220,
16,
401,
262,
2432,
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... | 1 |
#[test]
fn test_merge_strict_list_unknown()
{
let mut t = Inferator::new("burritos");
let mtype = t.merge_types(
&Type::StrictList(Box::new(Type::Unknown)),
&Type::StrictList(Box::new(Type::Int)),
);
assert_eq!(Ok(Type::StrictList(Box::new(Type::Int))... | rust_cleaned_test_functions.jsonl/15070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
2895,
849,
2019,
57507,
741,
262,
341,
286,
1077,
5206,
259,
284,
62658,
850,
486,
931,
445,
11240,
94012,
797,
286,
1077,
296,
1313,
284,
259,
25002,
9763,
1006,
310,
609,
929,
486,
4185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aa () {
// let mut a = 0xdea0b564;
// let a = "are-ocw::local_host_key";
// let ss: u32 = 385329431u32;
let ss: u32 = 1689624798;
let aa: u32 = 0xdea0b564;
// let using_u8 = ss.using_encoded(|v| {
let using_u8 = ss.encode();
println!("--- a = {:?}", using_u8);
println!("--- b ... | rust_cleaned_test_functions.jsonl/35134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89808,
1719,
341,
197,
322,
1077,
5206,
264,
284,
220,
15,
87,
55088,
15,
65,
20,
21,
19,
280,
197,
322,
1077,
264,
284,
330,
546,
12,
509,
86,
486,
2438,
12848,
3097,
876,
197,
322,
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_empty_needle() {
search_test!("", &"".to_string(), Some(0));
search_test!("1", &"".to_string(), Some(0));
let haystack = "111 a 111b";
search_test!(haystack, &"".to_string(), Some(0));
} | rust_cleaned_test_functions.jsonl/19391 | {
"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,
15124,
71506,
273,
368,
341,
286,
2711,
4452,
17223,
497,
609,
69355,
983,
3904,
1507,
4329,
7,
15,
5905,
715,
286,
2711,
4452,
17223,
16,
497,
609,
69355,
983,
3904,
1507,
4329,
7,
15,
5905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_passthrough_process_packets() {
// load the loadbalancer
let conf = Config::new("testdata/passthrough_test.toml").unwrap();
let srv = passthrough::Server::new(conf, false);
let mut lb = srv.lbs[0].clone();
let local_addr = find_local_addr().unwrap();
... | rust_cleaned_test_functions.jsonl/83801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79578,
86901,
11305,
63569,
368,
341,
286,
442,
2795,
279,
2795,
13313,
11705,
198,
286,
1077,
2335,
284,
5532,
486,
931,
445,
92425,
4322,
300,
86901,
4452,
73494,
75,
1827,
15454,
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... | 6 |
#[test]
fn test_compare_short_name() {
let mut de: super::DirectoryEntry = unsafe { std::mem::zeroed() };
de.name.copy_from_slice(b"X ABC");
assert!(super::compare_short_name("X.abc", &de));
de.name.copy_from_slice(b"ABCDEFGHIJK");
assert!(super::compare_short_name(... | rust_cleaned_test_functions.jsonl/104530 | {
"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,
32235,
16673,
1269,
368,
341,
286,
1077,
5206,
409,
25,
2256,
486,
9310,
5874,
284,
19860,
314,
1460,
486,
10536,
486,
14154,
291,
368,
2605,
286,
409,
2644,
12232,
5673,
26488,
1883,
1,
55,
981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_store_fail_instruction_data_too_large() {
solana_logger::setup();
let keys = vec![];
let (config_keypair, config_account) = create_config_account(keys.clone());
let config_pubkey = config_keypair.pubkey();
let my_config = MyConfig::new(42);
... | rust_cleaned_test_functions.jsonl/36693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
14809,
22121,
54923,
1769,
2346,
78,
45228,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
6894,
284,
7486,
0,
15078,
286,
1077,
320,
1676,
3097,
12670,
11,
2193,
13500,
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_bad_utf_8_extension() {
use std::fs::File;
let tmp = tempdir();
let fname = bad_utf8(tmp.path(), "bad.extension", "");
File::create(fname).expect("failed to create file");
cmd()
.arg(tmp.path())
.assert()
.stdout(predicate::str::is_match("bad.extensio... | rust_cleaned_test_functions.jsonl/641 | {
"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,
34199,
39453,
62,
23,
31035,
368,
341,
262,
990,
1460,
486,
3848,
486,
1703,
280,
262,
1077,
4174,
284,
2730,
3741,
543,
262,
1077,
22548,
284,
3873,
39453,
23,
10368,
3875,
1507,
330,
13855,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_project_custom() {
let cli = TestCli::get();
let project = TestProject::new_args(&["--title=some title", "--description=some description"]);
/// A subset of project fields that we can easily check for equality accross
#[derive(PartialEq, Eq, Debug)]
struct Proj... | rust_cleaned_test_functions.jsonl/116376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 760
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
8882,
16352,
15875,
368,
341,
262,
1077,
21348,
284,
3393,
87014,
486,
455,
543,
262,
1077,
2390,
284,
3393,
7849,
486,
931,
8384,
2099,
1183,
313,
2102,
14149,
635,
2265,
497,
14482,
4684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_background() {
let mut color = TextModeColor::new(Color16::Yellow, Color16::Black);
color.set_background(Color16::DarkGrey);
assert_eq!(color.0 >> 4, Color16::DarkGrey as u8);
} | rust_cleaned_test_functions.jsonl/4899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
24103,
368,
341,
286,
1077,
5206,
1894,
284,
2918,
3636,
1636,
486,
931,
15028,
16,
21,
486,
47699,
11,
3478,
16,
21,
486,
14417,
317,
286,
1894,
980,
24103,
15028,
16,
21,
486,
25830,
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_parse_message_type_invalid() {
let mut iter = Tokenizer::from_str("test");
let result = Parser {
tokenizer: &mut iter,
}
.parse_message_type();
assert!(result.is_err());
assert_eq!(
result.unwrap_err().to_string(),
... | rust_cleaned_test_functions.jsonl/79626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6462,
1819,
31433,
368,
341,
286,
1077,
5206,
5367,
284,
9660,
3135,
486,
1499,
2895,
445,
1944,
797,
286,
1077,
1102,
284,
21102,
341,
310,
45958,
25,
609,
6984,
5367,
345,
286,
456,
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_cache_guild_member() {
let cache = InMemoryCache::new();
// Single inserts
{
let guild_1_user_ids = (1..=10).map(Id::new).collect::<Vec<_>>();
let guild_1_members = guild_1_user_ids
.iter()
.copied()
... | rust_cleaned_test_functions.jsonl/11260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11529,
1889,
1498,
19388,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
1428,
286,
442,
11327,
49298,
198,
286,
341,
310,
1077,
26411,
62,
16,
3317,
8077,
284,
320,
16,
496,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_compute_proof_and_index() {
for exp in 0..6 {
let mut digest: Sha256 = Sha256::new();
let nodes: Vec<[u8; 4]> = (0..(1 << exp)).map(u32::to_be_bytes).collect();
let hashes: Vec<Sha256Hash> = nodes.iter().map(|node| digest.hash_leaf(node.as_ref())).collect();
let root... | rust_cleaned_test_functions.jsonl/85256 | {
"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,
57028,
86757,
8378,
3560,
368,
341,
262,
369,
1343,
304,
220,
15,
496,
21,
341,
414,
1077,
5206,
20882,
25,
27970,
17,
20,
21,
284,
27970,
17,
20,
21,
486,
931,
1428,
414,
1077,
7798,
25,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_matching() {
match (TEXT_PLAIN.type_(), TEXT_PLAIN.subtype()) {
(TEXT, PLAIN) => (),
_ => unreachable!(),
}
} | rust_cleaned_test_functions.jsonl/99123 | {
"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,
70763,
368,
341,
286,
2432,
320,
12708,
11082,
6836,
4852,
62,
1507,
15762,
11082,
6836,
4309,
1313,
2140,
341,
310,
320,
12708,
11,
10315,
6836,
8,
589,
84201,
310,
716,
589,
69322,
0,
3148,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_partitioned() {
assert_eq!(vec![].partitioned(|x: &int| *x < 3), (vec![], vec![]))
assert_eq!(vec![1, 2, 3].partitioned(|x: &int| *x < 4), (vec![1, 2, 3], vec![]));
assert_eq!(vec![1, 2, 3].partitioned(|x: &int| *x < 2), (vec![1], vec![2, 3]));
assert_eq!(vec![1, ... | rust_cleaned_test_functions.jsonl/58455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43840,
291,
368,
341,
286,
2060,
10714,
10297,
4083,
20703,
936,
40998,
291,
22428,
87,
25,
609,
396,
91,
353,
87,
366,
220,
18,
701,
320,
4083,
0,
12995,
7486,
0,
1294,
1171,
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_unlock_jwt() {
let key1 = AuthKey::Board(Uuid::new_v4());
assert!(!Auth::is_locked(key1));
let jwt1 = Auth::lock(key1);
let key2 = AuthKey::Board(Uuid::new_v4());
assert!(!Auth::is_locked(key2));
let jwt2 = Auth::lock(key2);
assert!(Auth:... | rust_cleaned_test_functions.jsonl/59594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19465,
95576,
368,
341,
286,
1077,
1376,
16,
284,
7366,
1592,
486,
11932,
12317,
2423,
486,
931,
2273,
19,
1423,
286,
2060,
0,
3471,
5087,
486,
285,
60271,
4857,
16,
1106,
286,
1077,
24589,
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_skiplist_basic() {
let skl = new_test_skl();
let inputs = vec!["key1", "key11", "key13", "key3", "key5", "key7", "key9"];
for key in inputs.clone() {
skl.insert(key.as_bytes())
}
let mut iter = SkiplistIterator::new(Arc::new(skl));
asse... | rust_cleaned_test_functions.jsonl/15464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 809
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
6642,
39934,
34729,
368,
341,
286,
1077,
82542,
284,
501,
4452,
643,
10561,
543,
286,
1077,
11127,
284,
7486,
0,
1183,
792,
16,
497,
330,
792,
16,
16,
497,
330,
792,
16,
18,
497,
330,
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... | 6 |
#[test]
fn test_index() {
run_test(|| {
let val1 = unsafe {
let mut alloc = BumpAlloc::from_raw_parts(Key([0x0; 32]));
let mut val1: Value<Vec<i32>> = Value::allocate_using(&mut alloc);
val1.initialize(vec![2, 3, 5, 7, 11, 13]);
... | rust_cleaned_test_functions.jsonl/2206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
286,
1598,
4452,
79453,
341,
310,
1077,
1044,
16,
284,
19860,
341,
394,
1077,
5206,
5574,
284,
425,
1510,
25154,
486,
1499,
16067,
33217,
21358,
2561,
15,
87,
15,
26,
220,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_leader_stepdown_when_quorum_active() {
let l = default_logger();
let mut sm = new_test_raft(1, vec![1, 2, 3], 5, 1, new_storage(), &l);
sm.check_quorum = true;
sm.become_candidate();
sm.become_leader();
for _ in 0..=sm.election_timeout() {
let mut m = new_message... | rust_cleaned_test_functions.jsonl/19117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
11946,
2923,
47636,
11280,
33006,
12930,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
1525,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_leader_restart_validator_start_from_old_ledger() -> result::Result<()> {
// this test verifies that a freshly started leader makes his ledger available
// in the repair window to validators that are started with an older
logger::setup();
let leader_keypair = Arc::new(Key... | rust_cleaned_test_functions.jsonl/36556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
69392,
64959,
4906,
5673,
21108,
38367,
1389,
368,
1464,
1102,
486,
2077,
71698,
341,
262,
442,
419,
1273,
87856,
429,
264,
49899,
3855,
7653,
3643,
806,
46933,
2500,
198,
262,
442,
262,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_to_bytes_simple_cases() {
{
let expect = b"FNM\x0Ahelloworld";
let meta = [Metadata::FNM("helloworld".to_string())];
let mut buffer: [u8; 100] = [0; 100];
metadata::to_bytes(&meta, &mut buffer).unwrap();
assert_eq!(*expect, *&buffer[0..expect.len()])... | rust_cleaned_test_functions.jsonl/24707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
12524,
30015,
41427,
368,
341,
262,
341,
286,
1077,
1720,
284,
293,
86555,
37325,
3462,
15,
24765,
95292,
876,
286,
1077,
8823,
284,
508,
14610,
486,
37,
37325,
445,
71,
95292,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_tree_reader_handle_repeated_fields_with_no_annotation() {
// Array field `phoneNumbers` does not contain LIST annotation.
// We parse it as struct with `phone` repeated field as array.
let rows = test_file_reader_rows("repeated_no_annotation.parquet", None).unwrap();
... | rust_cleaned_test_functions.jsonl/69598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1873
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
22306,
10630,
1288,
41954,
12132,
6615,
6536,
61237,
368,
341,
286,
442,
2910,
2070,
1565,
4844,
27237,
63,
1558,
537,
6644,
26966,
21223,
624,
286,
442,
1205,
4715,
432,
438,
2036,
448,
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_join_netns() {
let mut path = "invalid_path";
assert_eq!(
format!("{}", Env::join_netns(path).unwrap_err()),
format!(
"Failed to open file {}: No such file or directory (os error 2)",
path
)
);
l... | rust_cleaned_test_functions.jsonl/24738 | {
"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,
31017,
19722,
4412,
368,
341,
286,
1077,
5206,
1815,
284,
330,
11808,
2638,
876,
286,
2060,
10714,
33673,
310,
3561,
79878,
37039,
486,
5987,
19722,
4412,
5581,
568,
15454,
9266,
14702,
310,
3561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sleep() {
#[cfg(target_os="macos")]
{
// We need root permissions here to run this on OSX
if unsafe { libc::geteuid() } != 0 {
return;
}
}
let mut runner = TestRunner::new(Config::default(), "./tests/scripts/longsleep.py");
let trace... | rust_cleaned_test_functions.jsonl/11291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
49393,
368,
341,
262,
11506,
14072,
8637,
29387,
428,
11948,
436,
5422,
262,
341,
286,
442,
1205,
1184,
3704,
8541,
1588,
311,
1598,
419,
389,
87746,
198,
286,
421,
19860,
314,
42142,
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... | 2 |
#[test]
fn test_temporal_array_timestamp_micro_hour() {
let a: TimestampMicrosecondArray = vec![37800000000, 86339000000].into();
let b = hour(&a).unwrap();
assert_eq!(10, b.value(0));
assert_eq!(23, b.value(1));
} | rust_cleaned_test_functions.jsonl/128629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11771,
9819,
3858,
23073,
73003,
32292,
368,
341,
286,
1077,
264,
25,
32758,
34609,
5569,
1857,
284,
7486,
20703,
18,
22,
23,
15,
15,
15,
15,
15,
15,
15,
15,
11,
220,
23,
21,
18,
18,
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... | 1 |
#[test]
fn test_punycode_prefix_without_length_check() {
let config = idna::Config::default()
.verify_dns_length(false)
.check_hyphens(true)
.use_std3_ascii_rules(true);
assert_eq!(config.to_ascii("xn--").unwrap(), "");
assert!(config.to_ascii("xn---").is_err());
assert!... | rust_cleaned_test_functions.jsonl/13894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
359,
88,
1851,
13974,
39904,
5118,
7200,
368,
341,
262,
1077,
2193,
284,
877,
3376,
486,
2648,
486,
2258,
741,
286,
659,
12446,
71125,
5118,
3576,
340,
286,
659,
2028,
1523,
88,
759,
724,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_heap() {
let mut rng = StdRng::seed_from_u64(42);
for _ in 0..20 {
let mut binary = BinaryHeap::new();
let mut skew = SkewHeap::new();
for _ in 0..1000 {
match rng.gen_range(0..3) {
0 => {
... | rust_cleaned_test_functions.jsonl/28358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 799
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33059,
368,
341,
286,
1077,
5206,
28422,
284,
42517,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
19,
17,
317,
286,
369,
716,
304,
220,
15,
496,
17,
15,
341,
310,
1077,
5206,
7868,
284,
17718... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clone() {
let rwlock = RwLock::new(Arc::new(1));
let a = rwlock.read_recursive();
let b = a.clone();
assert_eq!(Arc::strong_count(&b), 2);
} | rust_cleaned_test_functions.jsonl/15763 | {
"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,
54742,
368,
341,
286,
1077,
25991,
1023,
284,
55294,
11989,
486,
931,
4346,
1287,
486,
931,
7,
16,
1106,
286,
1077,
264,
284,
25991,
1023,
4125,
66242,
543,
286,
1077,
293,
284,
264,
15997,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_array_type() {
let want = ArrayType {
base: BaseNode::default(),
element: MonoType::Basic(NamedType {
base: BaseNode::default(),
name: Identifier {
base: BaseNode::default(),
name: "int".to_st... | rust_cleaned_test_functions.jsonl/112506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
1819,
368,
341,
286,
1077,
1366,
284,
2910,
929,
341,
310,
2331,
25,
5351,
1955,
486,
2258,
3148,
310,
2392,
25,
12691,
929,
486,
15944,
8204,
3606,
929,
341,
394,
2331,
25,
5351,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_env() -> Result<()> {
let key = "key".to_string();
let value = "value".to_string();
let env_input = vec![format!("{}={}", key, value)];
let env_output = parse_env(&env_input);
assert_eq!(
env_output.len(),
1,
"Ther... | rust_cleaned_test_functions.jsonl/51830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15879,
368,
1464,
5714,
71698,
341,
286,
1077,
1376,
284,
330,
792,
3263,
983,
3904,
543,
286,
1077,
897,
284,
330,
957,
3263,
983,
3904,
543,
286,
1077,
6105,
5898,
284,
7486,
20703,
224... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rotate_with_append_numbers() {
// we use timestamp as discriminant to allow repeated runs
let ts = Local::now()
.format("true-numbers-%Y-%m-%d_%H-%M-%S")
.to_string();
let naming = Naming::Numbers;
// ensure we start with -/-/-
ass... | rust_cleaned_test_functions.jsonl/119665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 933
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
6615,
26041,
32964,
368,
341,
286,
442,
582,
990,
11441,
438,
49319,
517,
311,
2138,
11504,
8473,
198,
286,
1077,
10591,
284,
8774,
486,
3328,
741,
310,
659,
2243,
445,
1866,
31194,
1902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_length() {
check!(1.0); // already tested in Basic
check!(1.2);
check!(1.23);
check!(1.234);
check!(1.2345);
check!(1.23456);
check!(1.234567);
check!(1.2345678);
check!(1.23456735e-36);
} | rust_cleaned_test_functions.jsonl/58242 | {
"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,
7645,
5118,
368,
341,
262,
1779,
10297,
16,
13,
15,
1215,
442,
2669,
12510,
304,
14625,
198,
262,
1779,
10297,
16,
13,
17,
317,
262,
1779,
10297,
16,
13,
17,
18,
317,
262,
1779,
10297,
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_bit() -> Result<(), String> {
assert_eq!(get_bit!(0,0), 0);
assert_eq!(get_bit!(1,0), 1);
assert_eq!(get_bit!(2,0), 0);
assert_eq!(get_bit!(3,0), 1);
assert_eq!(get_bit!(4,0), 0);
assert_eq!(get_bit!(4,1), 0);
assert_eq!(get_bit!(4,2), ... | rust_cleaned_test_functions.jsonl/116433 | {
"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,
3062,
13996,
368,
1464,
5714,
68843,
923,
29,
341,
286,
2060,
10714,
10297,
455,
13996,
10297,
15,
11,
15,
701,
220,
15,
317,
286,
2060,
10714,
10297,
455,
13996,
10297,
16,
11,
15,
701,
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_create_json_attachment_works() {
let json_attachment: Json = Json::new(AttachmentId::Credential, _json(), AttachmentEncoding::Base64).unwrap();
assert_eq!(vec![123, 34, 102, 105, 101, 108, 100, 34, 58, 34, 118, 97, 108, 117, 101, 34, 125], json_attachment.data.get_bytes().unwrap(... | rust_cleaned_test_functions.jsonl/23119 | {
"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,
8657,
9455,
40868,
11498,
82,
368,
341,
286,
1077,
2951,
40868,
25,
8308,
284,
8308,
486,
931,
7,
33569,
764,
486,
48265,
11,
716,
2236,
1507,
55748,
14690,
486,
3978,
21,
19,
568,
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,
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.