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_authenticate_verify_bad_key() {
let sec_key_correct = SecretKey::generate(64).unwrap();
let sec_key_false = SecretKey::default();
let msg = "what do ya want for nothing?".as_bytes().to_vec();
let mac_bob = authenticate(&sec_key_correct, &msg).unwrap();
assert!(authenticate_verify... | rust_cleaned_test_functions.jsonl/18976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14014,
22661,
35638,
34199,
3097,
368,
341,
298,
10217,
5701,
3097,
31550,
284,
8599,
1592,
486,
19366,
7,
21,
19,
568,
15454,
543,
298,
10217,
5701,
3097,
36015,
284,
8599,
1592,
486,
2258,
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_invalid_offsets() {
solana_logger::setup();
let mut instruction_data = vec![0u8; DATA_START];
let offsets = SecpSignatureOffsets::default();
instruction_data[0] = 1;
let writer = std::io::Cursor::new(&mut instruction_data[1..]);
bincode::serialize... | rust_cleaned_test_functions.jsonl/47857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 692
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
56924,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
5206,
7600,
1769,
284,
7486,
20703,
15,
84,
23,
26,
14112,
13044,
935,
286,
1077,
35046,
284,
4520,
79,
25088,
81095,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_python_lib() {
assert!(is_python_lib("C:\\Users\\test\\AppData\\Local\\Programs\\Python\\Python37\\python37.dll"));
assert!(is_python_lib("C:\\Users\\test\\AppData\\Local\\Programs\\Python\\Python37\\python37.DLL"));
} | rust_cleaned_test_functions.jsonl/41253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
55869,
16142,
368,
341,
286,
2060,
10297,
285,
55869,
16142,
445,
34,
23817,
7137,
3422,
1944,
3422,
2164,
1043,
3422,
7319,
3422,
10690,
82,
3422,
30280,
3422,
30280,
18,
22,
3422,
12669,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timestamp_slots() {
let timestamp_sample_range = 5;
let ticks_per_slot = 5;
// Smaller interval than TIMESTAMP_SLOT_INTERVAL for convenience of building blockstore
let timestamp_interval = 7;
/*
Build a blockstore with < TIMESTAMP_SLOT_RANG... | rust_cleaned_test_functions.jsonl/77174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1745
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
23073,
54161,
368,
341,
286,
1077,
11441,
17491,
9698,
284,
220,
20,
280,
286,
1077,
29957,
5678,
27563,
284,
220,
20,
280,
286,
442,
4388,
13956,
9873,
1091,
92592,
53047,
37353,
369,
19132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_column_writer_dictionary_fallback_small_data_page() {
let props = WriterProperties::builder()
.set_dictionary_pagesize_limit(32)
.set_data_pagesize_limit(32)
.build();
column_roundtrip_random::<Int32Type>(
"test_col_writer_rnd_4",
... | rust_cleaned_test_functions.jsonl/30536 | {
"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,
8744,
28908,
42605,
761,
3420,
31966,
1769,
6129,
368,
341,
286,
1077,
6914,
284,
29404,
7903,
486,
17850,
741,
310,
659,
746,
42605,
21655,
551,
14763,
7,
18,
17,
340,
310,
659,
746,
1769,
2165... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hsv() {
let color = QColor::from_hsv(255, 200, 100, Some(213));
assert_eq!(255, color.hsv_hue());
assert_eq!(200, color.hsv_saturation());
assert_eq!(100, color.value());
assert_eq!(213, color.alpha());
assert_eq!((255, 200, 100, 213), color.get_hs... | rust_cleaned_test_functions.jsonl/25424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
3492,
368,
341,
286,
1077,
1894,
284,
55758,
486,
1499,
1523,
3492,
7,
17,
20,
20,
11,
220,
17,
15,
15,
11,
220,
16,
15,
15,
11,
4329,
7,
17,
16,
18,
1106,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ftp() {
let (mut ftp_stream, welcome_msg) = FtpStream::connect("127.0.0.1:21").unwrap();
println!("Welcome message: {:?}", welcome_msg);
let _ = ftp_stream.login("Doe", "mumble").unwrap();
ftp_stream.mkdir("test_dir").unwrap();
ftp_stream.cwd("test_dir").unwrap();
assert... | rust_cleaned_test_functions.jsonl/130706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
25068,
368,
341,
262,
1077,
320,
6984,
45427,
12673,
11,
10565,
6483,
8,
284,
434,
790,
3027,
486,
6459,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
17,
16,
1827,
15454,
543,
262,
137... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_until_single_line_comment_end() {
assert_eq!(
take_until_single_line_comment_end(" thing\nmore"),
Done("\nmore", " thing")
);
assert_eq!(
take_until_single_line_comment_end(" thing\n"),
Done("\n", " thing")
);
... | rust_cleaned_test_functions.jsonl/29986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
44352,
19487,
6528,
17638,
6213,
368,
341,
286,
2060,
10714,
33673,
310,
1896,
44352,
19487,
6528,
17638,
6213,
445,
3166,
1699,
6384,
4461,
310,
27357,
4921,
77,
6384,
497,
330,
3166,
1138,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xdg_data() {
let home = dirs_next::home_dir().unwrap();
let path = RootLocation::from("xdg-data").path().unwrap();
assert_eq!(path, home.join(".local/share"));
} | rust_cleaned_test_functions.jsonl/92110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3212,
35138,
1769,
368,
341,
310,
1077,
2114,
284,
42248,
11257,
486,
5117,
4334,
1005,
15454,
543,
310,
1077,
1815,
284,
18854,
4707,
486,
1499,
445,
9703,
70,
13945,
1827,
2343,
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,
1,
1,
1
] | 1 |
#[test]
fn test_defaults() {
let z = Angle::zero();
let h = Angle::half_circle();
let f = Angle::full_circle();
let d = Angle::default();
assert_approx_eq!(z.degrees(), 0.0);
assert_approx_eq!(z.radians(), 0.0);
assert_approx_eq!(h.degrees(), 180.0);
... | rust_cleaned_test_functions.jsonl/109957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42290,
368,
341,
286,
1077,
1147,
284,
36237,
486,
14154,
543,
286,
1077,
305,
284,
36237,
486,
37006,
42222,
543,
286,
1077,
282,
284,
36237,
486,
8878,
42222,
543,
286,
1077,
294,
284,
36237,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mode_long_preferred_over_short() {
let _dummy = TEST_MUTEX.lock().unwrap();
let matches = make_app().get_matches_from(vec!["app", "-b", "--backup=none"]);
let result = determine_backup_mode(&matches).unwrap();
assert_eq!(result, BackupMode::NoBackup);
... | rust_cleaned_test_functions.jsonl/98141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44710,
7302,
17799,
10442,
5554,
15431,
16673,
368,
341,
286,
1077,
716,
31390,
284,
13602,
66994,
21003,
1005,
15454,
543,
286,
1077,
9071,
284,
1281,
8191,
1005,
455,
38344,
5673,
25592,
0,
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_extract_package_version_without_version() -> io::Result<()> {
let config_name = "package.json";
let config_content = json::json!({
"name": "starship"
})
.to_string();
let project_dir = create_project_dir()?;
fill_config(&project_dir, c... | rust_cleaned_test_functions.jsonl/19237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
26328,
9438,
39904,
9438,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
1722,
4323,
876,
286,
1077,
2193,
7495,
284,
2951,
486,
2236,
0,
2262,
310,
330,
606,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enum() {
#[derive(Serialize)]
enum E {
Unit,
Newtype(u32),
Tuple(u32, u32),
Struct { a: u32 },
}
let u = E::Unit;
let expected = b"4:Unit";
assert_eq!(to_bytes(&u).unwrap(), expected);
let n = E::Newtype(1);
let expected = b"d7:Ne... | rust_cleaned_test_functions.jsonl/113656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
262,
11506,
27098,
3759,
9050,
5563,
262,
7618,
468,
341,
286,
7954,
345,
286,
1532,
1313,
8154,
18,
17,
1326,
286,
24622,
8154,
18,
17,
11,
575,
18,
17,
1326,
286,
16139,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_array_levels_twitter_example() {
let parent_levels = LevelInfo {
definition: vec![0, 0],
repetition: None,
array_offsets: vec![0, 1, 2],
array_mask: vec![true, true], // both lists defined
max_defini... | rust_cleaned_test_functions.jsonl/77701 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
3858,
37819,
83338,
39304,
368,
341,
16885,
286,
1077,
2681,
37819,
284,
9395,
1731,
341,
310,
7271,
25,
7486,
20703,
15,
11,
220,
15,
1259,
310,
53415,
25,
2240,
345,
310,
1334,
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_specializers() {
let rule = parse_rule(r#"f(x: 1);"#);
assert_eq!(rule, rule!("f", ["x"; 1]));
let rule = parse_rule(r#"f(x: 1, y: [x]) if y = 2;"#);
assert_eq!(
rule,
rule!("f", ["x" ; 1 , "y" ; value!([sym!("x")])] => op!(Unify, te... | rust_cleaned_test_functions.jsonl/12187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
41629,
12230,
368,
341,
286,
1077,
5912,
284,
4715,
21124,
2601,
55543,
69,
2075,
25,
220,
16,
42788,
2,
317,
286,
2060,
10714,
10297,
12937,
11,
5912,
17223,
69,
497,
4383,
87,
5123,
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_iterator_sum_result() {
let v: &[Result<i32, ()>] = &[Ok(1), Ok(2), Ok(3), Ok(4)];
assert_eq!(v.iter().cloned().sum::<Result<i32, _>>(), Ok(10));
let v: &[Result<i32, ()>] = &[Ok(1), Err(()), Ok(3), Ok(4)];
assert_eq!(v.iter().cloned().sum::<Result<i32, _>>(), Err(()));
} | rust_cleaned_test_functions.jsonl/25923 | {
"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,
13491,
10160,
5287,
368,
341,
262,
1077,
348,
25,
44590,
2077,
21897,
18,
17,
11,
1719,
53529,
284,
44590,
11578,
7,
16,
701,
7622,
7,
17,
701,
7622,
7,
18,
701,
7622,
7,
19,
12587,
262,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_native_loader() {
let (genesis_config, mint_keypair) = create_genesis_config(50000);
let bank = Bank::new(&genesis_config);
let to_keypair = Keypair::new();
let tx = Transaction::new_signed_with_payer(
&[
system_instruction::create... | rust_cleaned_test_functions.jsonl/2664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
44494,
22139,
368,
341,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
2099,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_same_weight_select_lower_slot() {
// Init state
let mut vote_simulator = VoteSimulator::new(1);
let node_pubkey = vote_simulator.node_pubkeys[0];
let tower = Tower::new_with_key(&node_pubkey);
// Create the tree of banks in a BankForks object
let ... | rust_cleaned_test_functions.jsonl/91764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 877
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
15876,
13051,
30425,
27563,
368,
341,
286,
442,
15690,
1584,
198,
286,
1077,
5206,
6910,
18314,
10511,
284,
34034,
14027,
10511,
486,
931,
7,
16,
317,
286,
1077,
2436,
34014,
792,
284,
6910... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_less_version_487() {
let output = b"less 487 (GNU regular expressions)
Copyright (C) 1984-2016 Mark Nudelman
less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Homepage: h... | rust_cleaned_test_functions.jsonl/1466 | {
"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,
21039,
50747,
9438,
62,
19,
23,
22,
368,
341,
262,
1077,
2550,
284,
293,
1,
1717,
220,
19,
23,
22,
320,
36223,
5792,
23393,
340,
13547,
320,
34,
8,
220,
16,
24,
23,
19,
12,
17,
15,
16,
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_format_java_version_sapmachine() {
let java_11 = String::from("OpenJDK 64-Bit Server VM (11.0.4+11-LTS-sapmachine) for linux-amd64 JRE (11.0.4+11-LTS-sapmachine), built on Jul 17 2019 08:58:43 by \"\" with gcc 7.3.0");
assert_eq!(format_java_version(java_11), Some(String::from("v... | rust_cleaned_test_functions.jsonl/104948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
77323,
9438,
643,
391,
32056,
368,
341,
286,
1077,
1642,
62,
16,
16,
284,
923,
486,
1499,
445,
5002,
41,
18301,
220,
21,
19,
7671,
275,
8422,
17792,
320,
16,
16,
13,
15,
13,
19,
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_from_box_str() {
use std::string::String;
let s = String::from("foo").into_boxed_str();
let r: Rc<str> = Rc::from(s);
assert_eq!(&r[..], "foo");
} | rust_cleaned_test_functions.jsonl/4675 | {
"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,
5673,
10194,
2895,
368,
341,
286,
990,
1460,
486,
917,
486,
703,
401,
286,
1077,
274,
284,
923,
486,
1499,
445,
7975,
1827,
18122,
10194,
291,
2895,
543,
286,
1077,
435,
25,
81463,
27,
495,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fn_signature_for_method_with_arg() {
let (desc, param) = get_signature(
r#"struct F;
impl F {
pub fn new() -> F{
F{}
}
pub fn do_it(&self, x: i32) {}
}
fn bar() {
let f : F = F::new();
f.do_it(<|>);
}"#,
);
assert_eq!(desc.name, "do_it".to_strin... | rust_cleaned_test_functions.jsonl/75856 | {
"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,
15246,
39859,
5478,
9032,
6615,
6057,
368,
341,
262,
1077,
320,
8614,
11,
1685,
8,
284,
633,
39859,
1006,
286,
435,
55543,
1235,
434,
280,
6383,
434,
341,
262,
6675,
5168,
501,
368,
1464,
434,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_domain() {
let spec = ChainSpec::mainnet();
test_domain(Domain::BeaconProposer, spec.domain_beacon_proposer, &spec);
test_domain(Domain::Randao, spec.domain_randao, &spec);
test_domain(Domain::Attestation, spec.domain_attestation, &spec);
test_domain(... | rust_cleaned_test_functions.jsonl/53262 | {
"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,
3062,
20111,
368,
341,
286,
1077,
1398,
284,
28525,
8327,
486,
3817,
4711,
1428,
286,
1273,
20111,
5432,
3121,
486,
3430,
22379,
2008,
23438,
11,
1398,
11003,
880,
12508,
443,
21663,
23438,
11,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_valid_redshift_create_cluster_parameter_group() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster-parameter-group.xml",
);
let mock = MockRequestDispatcher::with_status(200).wi... | rust_cleaned_test_functions.jsonl/12101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
26058,
13418,
8657,
28441,
24899,
6288,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
1151,
134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pad() {
assert_eq!(pad("0000").unwrap().1.len, 0);
assert_eq!(pad("123").unwrap().1.len, 23);
assert_eq!(pad("001").unwrap().1.len, 1);
assert!(pad("1").to_full_result().is_err());
assert!(pad("").to_full_result().is_err());
assert!(pad("x").to_full_result().is_err());
} | rust_cleaned_test_functions.jsonl/110351 | {
"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,
30290,
368,
341,
262,
2060,
10714,
10297,
13242,
445,
15,
15,
15,
15,
1827,
15454,
1005,
16,
19406,
11,
220,
15,
317,
262,
2060,
10714,
10297,
13242,
445,
16,
17,
18,
1827,
15454,
1005,
16,
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_duplicated_rule() -> TestResult {
let mut p = Polar::new();
p.load_str(
r#"f(1);
f(1);"#,
)?;
qvar(&mut p, "f(x)", "x", values![1, 1]);
Ok(())
} | rust_cleaned_test_functions.jsonl/97660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
98984,
21124,
368,
1464,
3393,
2077,
341,
262,
1077,
5206,
281,
284,
55896,
486,
931,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
7,
16,
317,
1843,
282,
7,
16,
42788,
2,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_if() {
// Operator 6: If
produces("[[40 43] 6 [3 0 1] [4 0 2] [4 0 1]]", "41");
produces("[42 6 [1 0] [4 0 1] 1 233]", "43");
produces("[42 6 [1 1] [4 0 1] 1 233]", "233");
produces("[42 [6 [1 0] [4 0 1] [1 233]]]", "43");
produces("[42 [6 [1 1] [4... | rust_cleaned_test_functions.jsonl/29738 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
368,
341,
286,
442,
28498,
220,
21,
25,
1416,
198,
286,
18644,
10937,
58,
19,
15,
220,
19,
18,
60,
220,
21,
508,
18,
220,
15,
220,
16,
60,
508,
19,
220,
15,
220,
17,
60,
508,
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_parse_ok() {
let r = Response { response: &[0, 1, 2, 8, 84, 137, 127, 13, 10] };
assert_eq!(r.parse(), ParsedResponse::Ok);
} | rust_cleaned_test_functions.jsonl/77732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19817,
368,
341,
286,
1077,
435,
284,
5949,
314,
2033,
25,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
23,
11,
220,
23,
19,
11,
220,
16,
18,
22,
11,
220,
16,
17,
22,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_config_fail_back_to_default_values() {
let want = Config::default();
let got = read_config(Path::new("")).unwrap();
assert_eq!(want, got);
} | rust_cleaned_test_functions.jsonl/60585 | {
"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,
6443,
5332,
22121,
3895,
2346,
9993,
9146,
368,
341,
286,
1077,
1366,
284,
5532,
486,
2258,
543,
286,
1077,
2684,
284,
1349,
5332,
33030,
486,
931,
445,
15197,
15454,
543,
286,
2060,
10714,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iterator_last() {
let s = "ศไทย中华Việt Nam";
let mut it = s.chars();
it.next();
assert_eq!(it.last(), Some('m'));
} | rust_cleaned_test_functions.jsonl/17633 | {
"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,
13491,
12195,
368,
341,
262,
1077,
274,
284,
330,
123863,
125451,
100849,
35544,
124382,
29974,
876,
262,
1077,
5206,
432,
284,
274,
85062,
543,
262,
432,
4529,
543,
262,
2060,
10714,
10297,
275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ip_nm_serialize() {
use serde_json::from_str;
let expected = IpNm {
ip: "0.0.0.0".parse().unwrap(),
nm: IpNm::default_netmask(),
};
let stringy = r#"{"ip":"0.0.0.0"}"#;
let actual: IpNm = from_str(stringy).unwrap();
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/102214 | {
"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,
10385,
57572,
88686,
368,
341,
197,
41819,
61570,
9455,
486,
1499,
2895,
280,
197,
10217,
3601,
284,
35033,
68205,
341,
298,
46531,
25,
330,
15,
13,
15,
13,
15,
13,
15,
3263,
6400,
1005,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_make_command_line() {
use super::make_command_line;
assert_eq!(
make_command_line("prog", ["aaa".to_owned(), "bbb".to_owned(), "ccc".to_owned()]),
"prog aaa bbb ccc".to_owned()
);
assert_eq!(
make_command_line("C:\\Program Files... | rust_cleaned_test_functions.jsonl/10222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
10811,
6528,
368,
341,
286,
990,
2256,
486,
6927,
10811,
6528,
280,
286,
2060,
10714,
33673,
310,
1281,
10811,
6528,
445,
32992,
497,
4383,
32646,
3263,
983,
51973,
1507,
330,
53151,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boring() {
use Token::*;
let (tokens, maybe_error) = tokenize_string("
add to into subtract from loop do end times while calc
+ - * / % ?= <> == < <= > >= :: && || !
if # else
split
");
assert_eq!(
token... | rust_cleaned_test_functions.jsonl/78242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
5503,
368,
341,
286,
990,
9660,
56162,
286,
1077,
320,
30566,
11,
7196,
4096,
8,
284,
77651,
3904,
70576,
310,
912,
311,
1119,
32256,
504,
6337,
653,
835,
3039,
1393,
10035,
198,
310,
488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_garbage_ir_fails_create_module_from_ir() {
let context = Context::create();
let memory_buffer = MemoryBuffer::create_from_memory_range("garbage ir data", "my_ir");
assert_eq!(memory_buffer.get_size(), 15);
assert_eq!(from_utf8(memory_buffer.as_slice()).unwrap(), "garbage ir data... | rust_cleaned_test_functions.jsonl/63536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
277,
20652,
51433,
761,
6209,
8657,
10750,
5673,
51433,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4938,
7776,
284,
13850,
4095,
486,
3182,
5673,
19195,
9698,
445,
1216... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_string() {
// test read string1
let d: [u8; 9] = [0x06, 0x07, b'f', b'o', b'o', b' ', b'b', b'a', b'r'];
let mut de = TarsDecoder::from(&d[..]);
assert_eq!(
de.read_string(0, true, String::default()).unwrap(),
String::from(&"foo bar"... | rust_cleaned_test_functions.jsonl/128478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
3904,
368,
341,
286,
442,
1273,
1349,
914,
16,
198,
286,
1077,
294,
25,
508,
84,
23,
26,
220,
24,
60,
284,
508,
15,
87,
15,
21,
11,
220,
15,
87,
15,
22,
11,
293,
6,
69,
516,
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_proof_commitment() {
let rng = &mut rand::thread_rng();
let channelId = Fr::rand(rng);
let nonce = Fr::rand(rng);
let rl = Fr::rand(rng);
let rho = Fr::rand(rng);
let tau = Fr::rand(rng);
let tau_bar = Fr::rand(rng);
let bc = rng.g... | rust_cleaned_test_functions.jsonl/12986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
36346,
478,
368,
341,
286,
1077,
28422,
284,
609,
6984,
10382,
486,
4528,
66849,
543,
286,
1077,
81725,
284,
2869,
486,
11335,
87597,
317,
286,
1077,
39676,
284,
2869,
486,
11335,
87597,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ber_read_bytes_ok() {
let tests : &[(&[u8], &[u8])] = &[
(&[1, 0, 100, 255], &[4, 4, 1, 0, 100, 255]),
(&[], &[4, 0]),
(&[4, 4, 4, 4], &[4, 4, 4, 4, 4, 4]),
(&[], &[36, 128, 0, 0]),
(&[12, 34], &[36, 128, 4, 2, 12, 34, 0, 0]),
(&[12, 34, 56], &... | rust_cleaned_test_functions.jsonl/111142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88165,
6443,
12524,
19817,
368,
341,
262,
1077,
7032,
549,
44590,
2099,
58,
84,
23,
1125,
44590,
84,
23,
72080,
284,
609,
9640,
286,
15899,
58,
16,
11,
220,
15,
11,
220,
16,
15,
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... | 2 |
#[test]
fn test_interior_nul_in_args_is_error() {
match Command::new("echo").args(&["has-some-\0\0s-inside"]).spawn() {
Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
Ok(_) => panic!(),
}
} | rust_cleaned_test_functions.jsonl/5491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15318,
2462,
1089,
360,
1243,
8384,
6892,
4096,
368,
341,
286,
2432,
7348,
486,
931,
445,
3047,
1827,
2116,
2099,
1183,
4648,
1331,
635,
30529,
15,
59,
15,
82,
21853,
577,
45014,
46087,
368,
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_read_line_segments_from_input_file() {
let mut hydrothermal_map = HydrothermalMap::new();
hydrothermal_map.read_lines_from_input_file("sample_input.txt");
assert_eq!(hydrothermal_map.line_segments.len(), 10);
} | rust_cleaned_test_functions.jsonl/121171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
6528,
55735,
5673,
5898,
2458,
368,
341,
286,
1077,
5206,
16643,
68118,
5376,
284,
39502,
68118,
2227,
486,
931,
543,
286,
16643,
68118,
5376,
4125,
18323,
5673,
5898,
2458,
445,
13611,
5898,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_partial_execution() {
let mut engine = super::MatchingEngine::new(String::from("QWERTY"));
// buy 100 units at 51
engine.add_order(super::OrderType::BUY, 100, 51.0);
// sell 1000 units at 50
engine.add_order(super::OrderType::SELL, 1000, 50.0);
assert_eq!(engine.get_se... | rust_cleaned_test_functions.jsonl/23020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
60948,
368,
341,
262,
1077,
5206,
4712,
284,
2256,
486,
64430,
4571,
486,
931,
2242,
486,
1499,
445,
48,
54,
3399,
56,
14929,
262,
442,
3695,
220,
16,
15,
15,
8153,
518,
220,
20,
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_duplicate_qualifier_is_error() {
let input = "abc$%";
let eol_reader = EolReader::from(input);
let mut parser = word_p();
let (_, err) = parser.parse(eol_reader).expect_err("Should not parse");
as... | rust_cleaned_test_functions.jsonl/102679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
64391,
3049,
6892,
4096,
368,
341,
503,
1077,
1946,
284,
330,
13683,
3,
95670,
503,
1077,
384,
337,
22306,
284,
468,
337,
5062,
486,
1499,
5384,
317,
503,
1077,
5206,
6729,
284,
3409,
620... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_session_metrics_errored() {
let update1 = SessionUpdate::parse(
r#"{
"init": true,
"started": "2021-04-26T08:00:00+0100",
"attrs": {
"release": "1.0.0"
},
"did": "user1... | rust_cleaned_test_functions.jsonl/63639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 890
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
12316,
37686,
62,
40296,
1151,
368,
341,
286,
1077,
2647,
16,
284,
9164,
4289,
486,
6400,
1006,
310,
435,
55543,
515,
394,
330,
2327,
788,
830,
345,
394,
330,
46723,
788,
330,
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... | 2 |
#[test]
fn test_token_stx_transfer_with_postcondition() {
let input_path = {
let mut r = PathBuf::new();
r.push(env!("CARGO_MANIFEST_DIR"));
r.push("tests");
r.push("stx_token_transfer_postcondition");
r.set_extension("json");
r
... | rust_cleaned_test_functions.jsonl/134586 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 900
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
1261,
87,
35403,
6615,
6333,
9056,
368,
341,
286,
1077,
1946,
2638,
284,
341,
310,
1077,
5206,
435,
284,
7933,
15064,
486,
931,
543,
310,
435,
2552,
16978,
17223,
34,
7581,
46,
25143,
9112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply_with_alpha_rgba() {
let mut rgba = Rgba([0, 0, 0, 0]);
rgba.apply_with_alpha(|s| s, |_| 0xFF);
assert_eq!(rgba, Rgba([0, 0, 0, 0xFF]));
} | rust_cleaned_test_functions.jsonl/46636 | {
"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,
36551,
6615,
26633,
95229,
368,
341,
286,
1077,
5206,
23524,
284,
431,
56380,
2561,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
2558,
286,
23524,
13045,
6615,
26633,
22428,
82,
91,
274,
11,
660... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_domain() {
let buffer = std::fs::read("./testdata/GeoIP2-Domain-Test.mmdb").unwrap();
let reader = Reader::<Domain>::from_bytes(&buffer).unwrap();
{
let result = reader
.lookup(IpAddr::from_str("1.2.0.0").unwrap())
.unwrap()
... | rust_cleaned_test_functions.jsonl/37385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
368,
341,
286,
1077,
4147,
284,
1460,
486,
3848,
486,
878,
13988,
92425,
14,
37344,
3298,
17,
9420,
3121,
12,
2271,
37008,
1999,
1827,
15454,
543,
286,
1077,
6604,
284,
25166,
27638,
13636,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsing_bitmasks_requiring_params_mem_access_missing_param() {
let mut v = ZERO_BOUND_HEADER.to_vec();
v.append(&mut vec![0x3e, 0x00, 0x04, 0x00]); // OpStore
v.append(&mut vec![0x01, 0x00, 0x00, 0x00]); // pointer: 1
v.append(&mut vec![0x02, 0x00, 0x00, 0x00]); /... | rust_cleaned_test_functions.jsonl/85757 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
13996,
76,
4604,
1288,
70094,
6745,
12976,
12759,
40447,
4090,
368,
341,
286,
1077,
5206,
348,
284,
54593,
73644,
20330,
2389,
13251,
543,
286,
348,
2057,
2099,
6984,
7486,
20703,
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_encrypt_decrypt() {
let params = Parameters::default();
let (secret_key, _cloud_key) = generate_keys(¶ms);
let every_combo = vec![true, false];
for x in every_combo {
let encrypted = encrypt(x, &secret_key);
let decrypted = decrypt(&encrypted, &secret_key);
assert_eq!(x... | rust_cleaned_test_functions.jsonl/69336 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
80764,
368,
341,
220,
1077,
3628,
284,
13522,
486,
2258,
543,
220,
1077,
320,
20474,
3097,
11,
716,
12361,
3097,
8,
284,
6923,
12631,
2099,
3519,
317,
220,
1077,
1449,
54781,
284,
7486,
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_single() {
let mut map = MultiMap::<char, u8>::new();
map.insert('x', 1);
assert_tokens(
&map,
&[
Token::Map { len: Some(1) },
Token::Char('x'),
Token::Seq { len: Some(1) },
Token::U8... | rust_cleaned_test_functions.jsonl/28209 | {
"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,
19487,
368,
341,
286,
1077,
5206,
2415,
284,
17439,
2227,
27638,
1762,
11,
575,
23,
6831,
931,
543,
286,
2415,
7030,
492,
87,
516,
220,
16,
626,
286,
2060,
28838,
1006,
310,
609,
2186,
345,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_path_ext_html_jinja() {
let t = PathHtmlJinja;
assert_eq!(t.render().unwrap(), "foo.html.jinja");
assert_eq!(PathHtmlJinja::EXTENSION, Some("html"));
} | rust_cleaned_test_functions.jsonl/133243 | {
"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,
2638,
9927,
9564,
5374,
41420,
368,
341,
262,
1077,
259,
284,
7933,
13591,
41,
41420,
280,
262,
2060,
10714,
10297,
83,
8740,
1005,
15454,
1507,
330,
7975,
2564,
1169,
41420,
797,
262,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_new_push_messages() {
let mut contact_info_table = ContactInfoTable::default();
let mut push = NodeTbleGspPush::default();
let peer = ContInfTblValue::ContactInfo(ContactInfo::new_localhost(&BvmAddr::new_rand(), 0));
assert_eq!(contact_info_table.insert(peer.clone... | rust_cleaned_test_functions.jsonl/120875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
14218,
23428,
368,
341,
286,
1077,
5206,
3645,
3109,
5237,
284,
9180,
1731,
2556,
486,
2258,
543,
286,
1077,
5206,
4484,
284,
6018,
51,
891,
38,
2154,
16644,
486,
2258,
543,
286,
1077,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_hash_value_modifies_a_registers_value() {
let mut test_hash: HashMap<String, i32> = HashMap::new();
test_hash.insert("foo".to_string(), 0);
test_hash.insert("bar".to_string(), 0);
update_hash_value(&mut test_hash, "foo", 10);
update_hash_value(&mut... | rust_cleaned_test_functions.jsonl/42000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
8950,
3142,
7480,
9606,
4306,
78360,
3142,
368,
341,
286,
1077,
5206,
1273,
8950,
25,
10528,
3464,
11,
600,
18,
17,
29,
284,
10528,
486,
931,
543,
286,
1273,
8950,
7030,
445,
7975,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chain_1() {
let src = HASH_ELEMENT;
let expect = hash_n_to_n_ret(&src);
let dst = hash_n_to_n_chain_ret(&src, 1);
assert_eq!(dst, expect);
} | rust_cleaned_test_functions.jsonl/127327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
62,
16,
368,
341,
286,
1077,
2286,
284,
58857,
27156,
280,
286,
1077,
1720,
284,
5175,
1089,
2346,
1089,
21695,
2099,
3548,
317,
286,
1077,
10648,
284,
5175,
1089,
2346,
1089,
30583,
21695,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sdiv() {
let mut v = [0, 0, 0, 0, 0, 0];
sdiv(&mut v, &[1, 1, 1, 1, 1, 1], 1);
assert!(v == [1, 1, 1, 1, 1, 1]);
} | rust_cleaned_test_functions.jsonl/86851 | {
"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,
643,
611,
368,
341,
262,
1077,
5206,
348,
284,
508,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
935,
262,
274,
611,
2099,
6984,
348,
11,
44590,
16,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recover() {
let mut data = read_bad("wrong-start");
data += TESTDATA;
let res: Vec<Result<_>> =
MicrodescReader::new(&data, &AllowAnnotations::AnnotationsAllowed).collect();
assert_eq!(res.len(), 2);
assert!(res[0].is_err());
assert!(... | rust_cleaned_test_functions.jsonl/73583 | {
"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,
1288,
3688,
368,
341,
286,
1077,
5206,
821,
284,
1349,
34199,
445,
34870,
18935,
797,
286,
821,
1421,
13602,
17777,
401,
286,
1077,
592,
25,
11312,
61329,
32399,
2452,
4035,
310,
18157,
8614,
5062... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_debug_abbrev_offset_32_incomplete() {
let buf = [0x01, 0x02];
let buf = &mut EndianSlice::new(&buf, LittleEndian);
match parse_debug_abbrev_offset(buf, Format::Dwarf32) {
Err(Error::UnexpectedEof(_)) => assert!(true),
otherwise => panic!("Un... | rust_cleaned_test_functions.jsonl/101989 | {
"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,
21039,
15446,
62,
44272,
6917,
62,
18,
17,
1243,
14737,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
935,
286,
1077,
6607,
284,
609,
6984,
3972,
1103,
33236,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_Elf_from_dynamic_hdr_mut() {
let mut buf = ELF32_DYNAMIC_ELF_HDR.clone();
let elf: Result<Elf<'_, LittleEndian, Elf32>, ElfError> =
Elf::try_from(&mut buf[0..]);
assert!(elf.is_ok());
} | rust_cleaned_test_functions.jsonl/119487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2089,
11008,
5673,
45992,
28238,
29523,
368,
341,
262,
1077,
5206,
6607,
284,
72568,
18,
17,
57356,
2089,
22609,
55765,
15997,
543,
262,
1077,
40745,
25,
5714,
27,
75832,
18291,
6878,
14671,
43231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_single() -> Result<(), Box<dyn error::Error>> {
let content = fs::read_to_string(PathBuf::new().join("tests/files/simple.go"))?;
let str = content
.lines()
.skip(15)
.take(4)
.collect::<Vec<_>>()
.join("\r\n");
assert_eq!(
TypeDe... | rust_cleaned_test_functions.jsonl/129652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19487,
368,
1464,
5714,
68843,
8261,
92846,
1465,
486,
1454,
2452,
341,
262,
1077,
2213,
284,
8619,
486,
878,
2346,
3904,
33030,
15064,
486,
931,
1005,
5987,
445,
23841,
33220,
67195,
18002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_update_to_file() {
let (mut cfg, tmp_dir) = TiKvConfig::with_tmp().unwrap();
cfg.cfg_path = tmp_dir.path().join("cfg_file").to_str().unwrap().to_owned();
{
let c = r#"
## comment should be reserve
[raftstore]
## comment should be reserve
# comment with one `#` should a... | rust_cleaned_test_functions.jsonl/63652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
8882,
2346,
2458,
368,
341,
262,
1077,
320,
6984,
13286,
11,
4174,
4334,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
262,
13286,
30481,
2638,
284,
4174,
4334,
3875,
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_keyrange_inf() {
let k1 = KeyRange::Inf;
let k2 = KeyRange::new(
Bytes::from_static(b"dddd00000000"),
Bytes::from_static(b"ffff00000000"),
);
assert_eq!(k1.extend(&k2), KeyRange::Inf);
assert_eq!(k2.extend(&k1), KeyRange::Inf);
... | rust_cleaned_test_functions.jsonl/112190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
9669,
26051,
368,
341,
286,
1077,
595,
16,
284,
5309,
6046,
486,
19433,
280,
286,
1077,
595,
17,
284,
5309,
6046,
486,
931,
1006,
310,
30024,
486,
1499,
25360,
1883,
1,
64100,
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_wrong_input_since() {
let mut case = get_correct_btc_case();
case.toCKB_cells.inputs[0].since = 1;
case.expect_return_code = Error::InputSinceInvalid as i8;
case_runner::run_test(case)
} | rust_cleaned_test_functions.jsonl/31024 | {
"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,
75198,
5898,
56262,
368,
341,
262,
1077,
5206,
1142,
284,
633,
31550,
880,
10413,
19096,
543,
262,
1142,
2389,
3021,
33,
37796,
42388,
58,
15,
936,
11284,
284,
220,
16,
280,
262,
1142,
25952,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tt_to_stmts() {
check(
r#"
macro_rules! m {
() => {
let a = 0;
a = 10 + 1;
a
}
}
fn f() -> i32 {
// +tree
m!{}
}
"#,
expect![[r#"
macro_rules! m {
() => {
let a = 0;
a = 10 + 1;
a
}
}
fn f() -> i32 {
... | rust_cleaned_test_functions.jsonl/85216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 746
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66740,
2346,
21824,
82,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1719,
589,
341,
286,
1077,
264,
284,
220,
15,
280,
286,
264,
284,
220,
16,
15,
488,
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_date_add() {
fn check((y1,m1,d1): (i32, u32, u32), rhs: Duration, ymd: Option<(i32, u32, u32)>) {
let lhs = NaiveDate::from_ymd(y1, m1, d1);
let sum = ymd.map(|(y,m,d)| NaiveDate::from_ymd(y, m, d));
assert_eq!(lhs.checked_add_signed(rhs), sum);
... | rust_cleaned_test_functions.jsonl/4768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
2891,
368,
341,
286,
5168,
1779,
1188,
88,
16,
13086,
16,
11991,
16,
1648,
320,
72,
18,
17,
11,
575,
18,
17,
11,
575,
18,
17,
701,
12916,
25,
21045,
11,
379,
2277,
25,
6959,
28706,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_offline_pay_tx() {
let (server, leader_data, alice, ledger_path) = new_validator_for_tests();
let bob_pubkey = Pubkey::new_rand();
let (sender, receiver) = channel();
run_local_faucet(alice, sender, None);
let faucet_addr = receiver.recv().unwrap();
let rpc_client = Rpc... | rust_cleaned_test_functions.jsonl/78056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13651,
1056,
28925,
17805,
368,
341,
262,
1077,
320,
4030,
11,
7653,
1769,
11,
70433,
11,
46933,
2638,
8,
284,
501,
64959,
5478,
32509,
543,
262,
1077,
35192,
34014,
792,
284,
22611,
792,
486,
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_calc_crc32() {
let tmp_dir = TempDir::new("").unwrap();
let small_file = tmp_dir.path().join("small.txt");
let small_checksum = gen_rand_file(&small_file, 1024);
assert_eq!(calc_crc32(&small_file).unwrap(), small_checksum);
let large_file = tmp_dir.path(... | rust_cleaned_test_functions.jsonl/15184 | {
"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,
38241,
59084,
18,
17,
368,
341,
286,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
80821,
15454,
1428,
286,
1077,
2613,
2458,
284,
4174,
4334,
3875,
1005,
5987,
445,
9004,
3909,
797,
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_bit_vec_push_pop() {
let mut s = BitVec::from_elem(5 * u32::BITS as usize - 2, false);
assert_eq!(s.len(), 5 * u32::BITS as usize - 2);
assert_eq!(s[5 * u32::BITS as usize - 3], false);
s.push(true);
s.push(true);
assert_eq!(s[5 * u32::BITS as usize - 2], true);
asser... | rust_cleaned_test_functions.jsonl/88622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
13251,
14218,
17061,
368,
341,
262,
1077,
5206,
274,
284,
6495,
10050,
486,
1499,
28179,
7,
20,
353,
575,
18,
17,
486,
69542,
438,
22301,
481,
220,
17,
11,
895,
317,
262,
2060,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encoding() {
let actors = Coin::generate_coins(3, 1);
let coin_name = "Hello world! Hello world! Hello!";
let mut data = [0u8; 32];
data.copy_from_slice(coin_name.as_bytes());
let share = actors[0].generate_share(&data);
// encode
let... | rust_cleaned_test_functions.jsonl/61855 | {
"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,
37613,
368,
341,
286,
1077,
19571,
284,
26233,
486,
19366,
11393,
1330,
7,
18,
11,
220,
16,
626,
286,
1077,
16254,
1269,
284,
330,
9707,
1879,
0,
21927,
1879,
0,
21927,
0,
3302,
286,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_73k_test_not_a_multiple_obs_gt_ibs() {
new_ucmd!()
.args(&[
"ibs=521",
"obs=1031",
"if=random-5828891cb1230748e146f34223bbd3b5.test",
])
.succeeds()
.stdout_is_fixture_bytes("random-5828891cb1230748e146f34223bbd3b5.te... | rust_cleaned_test_functions.jsonl/99865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
62,
22,
18,
74,
4452,
7913,
4306,
45233,
30405,
37479,
62,
54341,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
9640,
310,
330,
54341,
28,
20,
17,
16,
756,
310,
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_is_numerical_type() {
let mut c = Context::new();
let voidt = c.type_void();
{
let t = c.get_type(voidt);
assert!(!t.is_numerical_type());
}
let i32t = c.type_int(32, 1);
{
let t = c.get_type(i32t);
a... | rust_cleaned_test_functions.jsonl/125844 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
99001,
938,
1819,
368,
341,
286,
1077,
5206,
272,
284,
9608,
486,
931,
543,
286,
1077,
737,
83,
284,
272,
4852,
37775,
543,
286,
341,
310,
1077,
259,
284,
272,
670,
1819,
4333,
83,
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_serialize_get_request() {
let request = &PocketGetRequest {
search: Some("search"),
domain: Some("domain"),
tag: Some(PocketGetTag::Untagged),
state: Some(PocketGetState::All),
content_type: Some(PocketGetType::Article),
... | rust_cleaned_test_functions.jsonl/123699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1072
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
3062,
7893,
368,
341,
286,
1077,
1681,
284,
609,
63374,
1949,
1900,
341,
310,
2711,
25,
4329,
445,
1836,
4461,
310,
7947,
25,
4329,
445,
12204,
65974,
310,
4772,
25,
4329,
5304,
4537,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_real() {
let mut ctxt = ReadScope::new(&[
0x1e, 0xe2, 0xa2, 0x5f, 0x1e, 0x0a, 0x14, 0x05, 0x41, 0xc3, 0xff,
])
.ctxt();
assert_eq!(
Op::read(&mut ctxt).unwrap(),
Op::Operand(Operand::Real(Real(vec![0xe2, 0xa2, 0x... | rust_cleaned_test_functions.jsonl/85328 | {
"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,
6443,
15266,
368,
341,
286,
1077,
5206,
59162,
284,
4457,
10803,
486,
931,
2099,
9640,
5180,
220,
15,
87,
16,
68,
11,
220,
15,
8371,
17,
11,
220,
15,
9591,
17,
11,
220,
15,
87,
20,
69,
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_peekable() {
let path = Builder::new().prefix("test-raftstore").tempdir().unwrap();
let engines = new_temp_engine(&path);
let mut r = Region::default();
r.set_id(10);
r.set_start_key(b"key0".to_vec());
r.set_end_key(b"key4".to_vec());
let s... | rust_cleaned_test_functions.jsonl/57239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29107,
480,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
1005,
11849,
445,
1944,
12,
2944,
4314,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
21106,
284,
501,
11771,
24823,
2099,
2343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pre_order_traversal_ids() {
let mut tree = Tree::new();
let root_id = tree.insert(Node::new(0), AsRoot).unwrap();
let node_1 = tree.insert(Node::new(1), UnderNode(&root_id)).unwrap();
let node_2 = tree.insert(Node::new... | rust_cleaned_test_functions.jsonl/49562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
7869,
3547,
45545,
8077,
368,
341,
286,
1077,
5206,
4916,
284,
8942,
486,
931,
1428,
16885,
73363,
286,
1077,
3704,
842,
284,
4916,
7030,
22078,
486,
931,
7,
15,
701,
1634,
8439,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_arguments_passthrough() {
let args = ovec![
"-Oy",
"-Gw",
"-EHa",
"-Fmdictionary-map",
"-c",
"-Fohost_dictionary.obj",
"dictionary.c"
];
let ParsedArguments {
input,
... | rust_cleaned_test_functions.jsonl/24589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
79578,
86901,
368,
341,
286,
1077,
2827,
284,
297,
4083,
90515,
310,
6523,
46,
88,
756,
310,
6523,
38,
86,
756,
310,
6523,
36,
32942,
756,
310,
6523,
37,
2277,
3916,
25858,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lines() {
let (at, mut ucmd) = at_and_ucmd!();
let file_read = |f| {
let mut s = String::new();
at.open(f).read_to_string(&mut s).unwrap();
s
};
// Split into two files without splitting up lines.
ucmd.args(&["-n", "l/2", "fivelines.txt"]).succeeds()... | rust_cleaned_test_functions.jsonl/25878 | {
"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,
18323,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
1077,
1034,
6443,
284,
760,
69,
91,
341,
286,
1077,
5206,
274,
284,
923,
486,
931,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_workspace_settings_defaults() {
let config = setup();
config
.set_workspace_settings(json!({}))
.expect("could not update");
assert_eq!(
config.get_workspace_settings(),
WorkspaceSettings {
enable: false,
cache: None,
config: None,
... | rust_cleaned_test_functions.jsonl/20064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
75560,
10853,
42290,
368,
341,
262,
1077,
2193,
284,
6505,
543,
262,
2193,
198,
414,
659,
746,
75560,
10853,
9304,
0,
2306,
44194,
414,
659,
17119,
445,
28077,
537,
2647,
797,
262,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_successive_add() {
// we hope these get optimised away with adjacent plus optimisation
assert::eq("x = 'c'\n'a' + 'b' + x + 'd' + 'e'", "'abcde'");
} | rust_cleaned_test_functions.jsonl/8197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18632,
533,
2891,
368,
341,
286,
442,
582,
3900,
1493,
633,
7553,
4056,
3123,
448,
23942,
5519,
7553,
7923,
198,
286,
2060,
486,
11006,
445,
87,
284,
364,
66,
15777,
77,
25184,
6,
488,
364,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_gen_keypair() {
let (privkey, pubkey) = Generator::random_keypair();
assert_eq!(privkey.pubkey().expect("pubkey"), pubkey);
} | rust_cleaned_test_functions.jsonl/122788 | {
"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,
16322,
3097,
12670,
368,
341,
286,
1077,
320,
11887,
792,
11,
95116,
8,
284,
28358,
486,
11463,
3097,
12670,
543,
286,
2060,
10714,
10297,
11887,
792,
47773,
792,
1005,
17119,
445,
9585,
792,
3975... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_urlencoded_error() {
let (req, mut pl) =
TestRequest::with_header(CONTENT_TYPE, "application/x-www-form-urlencoded")
.header(CONTENT_LENGTH, "xxxx")
.to_http_parts();
let info = block_on(UrlEncoded::<Info>::new(&req, &mut pl));
... | rust_cleaned_test_functions.jsonl/94523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
19329,
4096,
368,
341,
286,
1077,
320,
2958,
11,
5206,
625,
8,
4035,
310,
3393,
1900,
486,
4197,
8757,
98747,
1825,
4189,
11,
330,
5132,
10776,
41242,
8460,
44557,
1138,
394,
659,
2708,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_max_coding_shreds() {
let keypair = Arc::new(Keypair::new());
let hash = hash(Hash::default().as_ref());
let version = shred_version::version_from_hash(&hash);
assert_ne!(version, 0);
let shredder = Shredder::new(0, 0, 0, version).unwrap();
let ent... | rust_cleaned_test_functions.jsonl/22338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
666,
3700,
3712,
53369,
368,
341,
286,
1077,
1376,
12670,
284,
19689,
486,
931,
7,
6608,
1082,
1310,
486,
931,
1423,
286,
1077,
5175,
284,
5175,
7,
6370,
486,
2258,
1005,
300,
7793,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_change_position() {
test_harness(|| unsafe {
library_init();
let session = get_session();
const N: usize = 10;
let uris = vec!["http://localhost/".into()];
let mut gids = [A2Gid::default(); N];
for i in 0..N {
assert_eq!(add_uri(se... | rust_cleaned_test_functions.jsonl/25965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
9661,
368,
341,
262,
1273,
1523,
23518,
79453,
19860,
341,
286,
6733,
6137,
543,
286,
1077,
3797,
284,
633,
12316,
1428,
286,
733,
451,
25,
22301,
284,
220,
16,
15,
280,
286,
1077,
4335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bad_form_missing_fields() {
let bad_inputs: [&str; 8] = [
"&",
"=",
"username=Sergio",
"password=pass",
"age=30",
"username=Sergio&password=pass",
"username=Sergio&age=30",
"password=pass&age=30"
];
for bad_input in &ba... | rust_cleaned_test_functions.jsonl/46559 | {
"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,
34199,
7915,
40447,
12132,
368,
341,
262,
1077,
3873,
28557,
25,
34336,
495,
26,
220,
23,
60,
284,
2278,
286,
13399,
756,
286,
36234,
345,
286,
330,
5113,
72196,
2375,
815,
756,
286,
330,
3833,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unsupported_items_are_emitted() -> Result<()> {
// We will have to rewrite this test to use something else that is unsupported
// once we start importing nested structs.
let ir = ir_from_cc("struct X { struct Y {}; };")?;
assert_strings_contain(
ir.unsupported_items().map... | rust_cleaned_test_functions.jsonl/37220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
18216,
12134,
56855,
22504,
3762,
368,
1464,
5714,
71698,
341,
262,
442,
1205,
686,
614,
311,
18130,
419,
1273,
311,
990,
2494,
770,
429,
374,
40409,
198,
262,
442,
3055,
582,
1191,
49895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_storage_create_snapshot() {
setup_for_test();
let ents = vec![new_entry(3, 3), new_entry(4, 4), new_entry(5, 5)];
let nodes = vec![1, 2, 3];
let mut cs = ConfState::new();
cs.set_nodes(nodes.clone());
let data = b"data".to_vec();
let mut t... | rust_cleaned_test_functions.jsonl/50262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
8657,
53265,
368,
341,
286,
6505,
5478,
4452,
543,
286,
1077,
36852,
284,
7486,
20703,
931,
9078,
7,
18,
11,
220,
18,
701,
501,
9078,
7,
19,
11,
220,
19,
701,
501,
9078,
7,
20,
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_cairo_short_string_to_felt() {
let data = [
(
"abcdefghijklmnopqrstuvwxyz",
"156490583352162063278528710879425690470022892627113539022649722",
),
(
"1234567890123456789012345678901",
"8692... | rust_cleaned_test_functions.jsonl/53656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
25549,
16673,
3904,
2346,
761,
3818,
368,
341,
286,
1077,
821,
284,
2278,
310,
2399,
394,
330,
67512,
756,
394,
330,
16,
20,
21,
19,
24,
15,
20,
23,
18,
18,
20,
17,
16,
21,
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... | 2 |
#[test]
fn test_params() {
block_on(async {
let srv = TestServer::start(|| {
HttpService::new(
App::new()
.service(get_param_test)
.service(put_param_test)
.service(delete_param_test),
)
});
... | rust_cleaned_test_functions.jsonl/129740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6745,
368,
341,
262,
2504,
4470,
18285,
341,
286,
1077,
43578,
284,
3393,
5475,
486,
2468,
79453,
341,
310,
4823,
1860,
486,
931,
1006,
394,
1845,
486,
931,
741,
503,
659,
7936,
5433,
4090,
4452... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_tree_walk() {
let mut parser = Parser::new();
parser.set_language(get_language("rust")).unwrap();
let tree = parser
.parse(
"
struct Stuff {
a: A;
b: Option<B>,
}
",
N... | rust_cleaned_test_functions.jsonl/131720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
56131,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
35788,
15197,
15454,
1428,
262,
1077,
4916,
284,
6729,
198,
286,
659,
6400,
1006,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_endpoint() {
let mut buf1 = [0u8; 500];
let mut buf2 = [0u8; 500];
let mut write_buf = [0u8; RCV_BUF_MAX_SIZE + 100];
let mut t = ConnectionTester::new();
let mut syn = t.write_syn(buf1.as_mut());
// Put another flag on the SYN so it becomes in... | rust_cleaned_test_functions.jsonl/4125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3722
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36699,
368,
341,
286,
1077,
5206,
6607,
16,
284,
508,
15,
84,
23,
26,
220,
20,
15,
15,
935,
286,
1077,
5206,
6607,
17,
284,
508,
15,
84,
23,
26,
220,
20,
15,
15,
4821,
286,
1077,
5206,
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... | 4 |
#[test]
fn test_samples() {
assert_eq!(
Passenger {
id: 357,
row: 44,
column: 5
},
Passenger::parse("FBFBBFFRLR").unwrap()
);
assert_eq!(
Passenger {
id: 567,
row: 70,
column: 7
},
... | rust_cleaned_test_functions.jsonl/78082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18297,
368,
341,
262,
2060,
10714,
33673,
286,
67634,
341,
310,
877,
25,
220,
18,
20,
22,
345,
310,
2802,
25,
220,
19,
19,
345,
310,
3250,
25,
220,
20,
198,
286,
1153,
286,
67634,
486,
6400,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_entry_success() {
let tests = [
// Basics
(
&b"First: 1"[..],
vec![(Binding::Tight, Component::Normal("First".to_string()))],
&b"1"[..],
),
(
b"First.second: 1",
... | rust_cleaned_test_functions.jsonl/113429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4849
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9078,
18632,
368,
341,
286,
1077,
7032,
284,
2278,
310,
442,
67176,
198,
310,
2399,
394,
609,
65,
1,
5338,
25,
220,
16,
36864,
496,
1259,
394,
7486,
0,
9697,
15059,
486,
51,
491,
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... | 2 |
#[test]
fn test_angle() {
assert!(Vector2::new(1.0f64, 0.0f64).angle(&Vector2::new(0.0f64, 1.0f64)).approx_eq( &rad(f64::consts::FRAC_PI_2) ));
assert!(Vector2::new(10.0f64, 0.0f64).angle(&Vector2::new(0.0f64, 5.0f64)).approx_eq( &rad(f64::consts::FRAC_PI_2) ));
assert!(Vector2::new(-1.0f64, 0.0f64)... | rust_cleaned_test_functions.jsonl/5670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 722
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21727,
368,
341,
262,
2060,
10297,
3781,
17,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
15,
13,
15,
69,
21,
19,
568,
4044,
2099,
3781,
17,
486,
931,
7,
15,
13,
15,
69,
21,
19,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proxy_view_assistant_first_call_input_event() -> std::result::Result<(), anyhow::Error>
{
let context = &mut ViewAssistantContext::new_for_testing();
let mut mock1 = MockProxyViewAssistant::new();
mock1.expect_handle_input_event().times(2).returning(|_, _| Ok(()));
... | rust_cleaned_test_functions.jsonl/86703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29712,
7122,
12083,
11202,
12978,
13429,
5898,
6748,
368,
1464,
1460,
486,
1382,
486,
2077,
68843,
88964,
486,
1454,
397,
262,
341,
286,
1077,
2266,
284,
609,
6984,
2738,
71703,
1972,
486,
931,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_decode_movt() {
assert_eq!(
decode_32(0xf2c20100),
Instruction::MOVT {
params: MovtParams {
rd: Reg::R1,
imm16: 0x2000
}
}
);
} | rust_cleaned_test_functions.jsonl/64874 | {
"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,
15227,
55798,
83,
368,
341,
14808,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
17,
66,
17,
15,
16,
15,
15,
1326,
286,
29051,
486,
10531,
20457,
341,
310,
3628,
25,
53285,
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_touch_start_event() {
let event: TouchStart = js!(
return new TouchEvent( @{TouchStart::EVENT_TYPE} );
).try_into().unwrap();
assert_eq!( event.event_type(), TouchStart::EVENT_TYPE );
} | rust_cleaned_test_functions.jsonl/86599 | {
"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,
60840,
4906,
6748,
368,
341,
286,
1077,
1538,
25,
19338,
3479,
284,
6994,
33673,
310,
470,
501,
19338,
1556,
7,
33267,
11309,
3479,
486,
37349,
4189,
92,
1439,
286,
7457,
1539,
45514,
1005,
15454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_multiply_dice_launches() {
assert_eq!(multiply_dice_launches(&vec![6, 6], 6), BigUint::from(35u32));
assert_eq!(multiply_dice_launches(&vec![6], 6), BigUint::from(5u32));
assert_eq!(
multiply_dice_launches(&vec![10, 10], 10),
BigUint::from(99u32)
... | rust_cleaned_test_functions.jsonl/39503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93054,
97196,
51617,
288,
368,
341,
286,
2060,
10714,
10297,
64648,
97196,
51617,
288,
2099,
4083,
20703,
21,
11,
220,
21,
1125,
220,
21,
701,
6164,
21570,
486,
1499,
7,
18,
20,
84,
18,
17,
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_parse_fallback() {
use Fallback;
use bech32::FromBase32;
let cases = vec![
(
from_bech32("3x9et2e20v6pu37c5d9vax37wxq72un98".as_bytes()),
Ok(Fallback::PubKeyHash([
0x31, 0x72, 0xb5, 0x65, 0x4f, 0x66, 0x83, 0xc8, 0xfb, 0x14, 0x69, 0x59, 0xd3,
0x47, 0xce, 0x30, 0x3c, 0x... | rust_cleaned_test_functions.jsonl/123249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 894
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
761,
3420,
368,
341,
197,
41819,
434,
3420,
280,
197,
41819,
387,
331,
18,
17,
486,
3830,
3978,
18,
17,
401,
197,
10217,
5048,
284,
7486,
90515,
298,
197,
1006,
571,
42727,
880,
4737,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_spec() {
let project = Project {
name: "Example".to_owned(),
targets: vec![(
"Example".to_owned(),
Target {
product_type: ProductType::Application,
platform: vec![Platform::IOS].into_iter().co... | rust_cleaned_test_functions.jsonl/47164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 873
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13594,
368,
341,
286,
1077,
2390,
284,
5787,
341,
310,
829,
25,
330,
13314,
3263,
983,
51973,
3148,
310,
11550,
25,
7486,
20703,
1006,
394,
330,
13314,
3263,
983,
51973,
3148,
394,
13483,
341,
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_generic_named_fields_struct() {
Python::with_gil(|py| {
let pye = PyE {
test: "test".into(),
test2: 2,
}
.into_py(py);
let e: E<String, usize> =
E::extract(pye.as_ref(py)).expect("Failed to extract E<String, usize> from PyE... | rust_cleaned_test_functions.jsonl/59468 | {
"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,
41232,
71834,
12132,
15126,
368,
341,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
286,
1077,
4510,
68,
284,
5355,
36,
341,
310,
1273,
25,
330,
1944,
3263,
18122,
3148,
310,
1273,
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_slice_mod() {
let cases: [(Vec<u8>, usize, usize); 5] = [
(vec![0], 10, 0),
(vec![1], 10, 1),
(vec![9], 10, 9),
(vec![10], 10, 0),
(vec![100, 0, 0, 1], 10, 1),
];
for (challenge, count, expected) in &cases {
... | rust_cleaned_test_functions.jsonl/101155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
7480,
368,
341,
286,
1077,
5048,
25,
17826,
10050,
34837,
23,
8066,
22301,
11,
22301,
1215,
220,
20,
60,
284,
2278,
310,
320,
4083,
20703,
15,
1125,
220,
16,
15,
11,
220,
15,
1326,
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_insert() {
Interpreter::default().enter(|vm| {
let dict = Dict::default();
assert_eq!(0, dict.len());
let key1 = vm.ctx.new_bool(true);
let value1 = vm.ctx.new_str("abc");
dict.insert(&vm, key1.clone(), value1.clone()).unwrap()... | rust_cleaned_test_functions.jsonl/8338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
368,
341,
286,
82493,
486,
2258,
1005,
1950,
22428,
7338,
91,
341,
310,
1077,
6451,
284,
29126,
486,
2258,
543,
310,
2060,
10714,
10297,
15,
11,
6451,
19406,
5231,
310,
1077,
1376,
16,
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_rsub_assign_big_decimal()
{
let mut nr0: [DecimalDigit<u8>; 0] = [];
let nr1: [DecimalDigit<u8>; 0] = [];
let res = rsub_assign_big(&mut nr0, &nr1);
assert_eq!(nr0, []);
assert_eq!(res, Ok(0));
let mut nr0 = [DecimalDigit(34u8), DecimalDigit(1... | rust_cleaned_test_functions.jsonl/45901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 934
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
1966,
20688,
36386,
74429,
741,
262,
341,
286,
1077,
5206,
20262,
15,
25,
508,
11269,
36420,
34837,
23,
65795,
220,
15,
60,
284,
5907,
286,
1077,
20262,
16,
25,
508,
11269,
36420,
34837,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.