text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
#[test]
fn test_from_dec_lit_neg_exp() {
let d = Decimal::<3>::from_str("-533.7e-2").unwrap();
assert_eq!(d.coeff, -5337);
} | rust_cleaned_test_functions.jsonl/12021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
13783,
98399,
28209,
14214,
368,
341,
286,
1077,
294,
284,
26728,
27638,
18,
6831,
1499,
2895,
13645,
20,
18,
18,
13,
22,
68,
12,
17,
1827,
15454,
543,
286,
2060,
10714,
10297,
67,
86462,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_allocate() {
let memory_pool = LibcMemoryPool {};
for _ in 0..10 {
let p = memory_pool.allocate(1024).unwrap();
// make sure this is 64-byte aligned
assert_eq!(0, (p as usize) % ALIGNMENT);
memory_pool.free(p);
}
} | rust_cleaned_test_functions.jsonl/100095 | {
"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,
77078,
368,
341,
286,
1077,
4938,
15709,
284,
5688,
66,
10642,
10551,
20375,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
1077,
281,
284,
4938,
15709,
68726,
7,
16,
15,
17,
19,
568,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_can_create_paginator() {
let (section, library) = create_library(false);
let paginator = Paginator::from_section(§ion, &library);
assert_eq!(paginator.pagers.len(), 2);
assert_eq!(paginator.pagers[0].index, 1);
assert_eq!(paginator.pagers[0].pages.len... | rust_cleaned_test_functions.jsonl/107065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
8657,
620,
33128,
368,
341,
286,
1077,
320,
2809,
11,
6733,
8,
284,
1855,
39461,
3576,
317,
286,
1077,
69395,
284,
93064,
486,
1499,
16221,
2099,
2809,
11,
609,
18065,
317,
286,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_focus_matching_pair() {
let fj = parse_top_level_json(OBJECT.to_owned()).unwrap();
let mut viewer = JsonViewer::new(fj, Mode::Line);
viewer.focused_row = 0;
assert_movements(
&mut viewer,
vec![
(Action::FocusMatchingPair, 1... | rust_cleaned_test_functions.jsonl/41777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47492,
70763,
14445,
368,
341,
286,
1077,
75371,
284,
4715,
10426,
8274,
9455,
19238,
10467,
2389,
51973,
6011,
15454,
543,
286,
1077,
5206,
25708,
284,
8308,
28271,
486,
931,
955,
73,
11,
14562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_decoding() {
use dataplane::api::Request;
let req = create_req();
let mut req_msg = RequestMessage::new_request(req);
req_msg
.get_mut_header()
.set_client_id("test")
.set_api_version(ObjectApiListRequest::API_KEY as i1... | rust_cleaned_test_functions.jsonl/72292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
13783,
3700,
368,
341,
286,
990,
61723,
37847,
486,
2068,
486,
1900,
401,
286,
1077,
4232,
284,
1855,
17644,
1428,
286,
1077,
5206,
4232,
6483,
284,
6145,
2052,
486,
931,
7893,
6881,
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_shell() {
assert_eq!(Shell::Sh, resolve_shell("sh"));
assert_eq!(Shell::Zsh, resolve_shell("zsh"));
assert_eq!(Shell::Bash, resolve_shell("bash"));
assert_eq!(Shell::Fish, resolve_shell("fish"));
assert_eq!(Shell::Unknown, resolve_shell("batty"));
} | rust_cleaned_test_functions.jsonl/118993 | {
"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,
48945,
368,
341,
286,
2060,
10714,
10297,
25287,
486,
2016,
11,
8830,
48945,
445,
927,
4010,
286,
2060,
10714,
10297,
25287,
486,
57,
927,
11,
8830,
48945,
445,
89,
927,
4010,
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_input_handler_on_enter_text_non_english_char() {
let mut app = App::new();
app.input = str_to_vec_char("ыа");
app.input_cursor_position = app.input.len().try_into().unwrap();
app.input_idx = app.input.len();
handler(Key::Char('ы'), &mut app);
as... | rust_cleaned_test_functions.jsonl/9023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
10183,
4470,
37480,
4326,
21637,
62,
29120,
9232,
368,
341,
286,
1077,
5206,
906,
284,
1845,
486,
931,
1428,
286,
906,
10046,
284,
607,
2346,
13251,
9232,
445,
4552,
1478,
797,
286,
906,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validator_info_serde() {
let mut info = Map::new();
info.insert("name".to_string(), Value::String("Alice".to_string()));
let info_string = serde_json::to_string(&Value::Object(info)).unwrap();
let validator_info = ValidatorInfo {
info: info_string.clo... | rust_cleaned_test_functions.jsonl/12695 | {
"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,
64959,
3109,
75861,
450,
368,
341,
286,
1077,
5206,
3546,
284,
5027,
486,
931,
543,
286,
3546,
7030,
445,
606,
3263,
983,
3904,
1507,
5162,
486,
703,
445,
61686,
3263,
983,
3904,
7392,
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_public_exponent_constants() {
for value in PublicExponent::ALL_CONSTANTS.iter() {
let value: u64 = value.0.into();
assert_eq!(value & 1, 1);
assert!(value >= PublicExponent::_3.0.into()); // The absolute minimum.
assert!(value <= PublicExpo... | rust_cleaned_test_functions.jsonl/25411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
2702,
1146,
55642,
368,
341,
286,
369,
897,
304,
3066,
840,
1146,
486,
3919,
23098,
37125,
19471,
368,
341,
310,
1077,
897,
25,
575,
21,
19,
284,
897,
13,
15,
39860,
543,
310,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_hex_until_brace() {
let tests = [
(r#"{1f}"#, Some(0x1f)),
(r#"{001f}"#, Some(0x1f)),
(r#"{1g}"#, None),
(r#"{001g}"#, None),
(r#"{1ff}"#, Some(0x1ff)),
(r#"{abcd}"#, Some(0xabcd)),
];
for &(input, expected) in tests.iter() {
assert_eq!... | rust_cleaned_test_functions.jsonl/69258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
32655,
44352,
17682,
578,
368,
341,
262,
1077,
7032,
284,
2278,
414,
320,
81,
2,
14129,
16,
69,
9863,
60778,
4329,
7,
15,
87,
16,
69,
6965,
414,
320,
81,
2,
14129,
15,
15,
16,
69,
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... | 2 |
#[test]
fn test_try_from_row_for_tuple_16() -> Result<()> {
use std::convert::TryFrom;
let create_table = "CREATE TABLE test (
a INTEGER,
b INTEGER,
c INTEGER,
d INTEGER,
e INTEGER,
f INTEGER,
g INTEGER,
... | rust_cleaned_test_functions.jsonl/42677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
8530,
5478,
21773,
62,
16,
21,
368,
1464,
5714,
71698,
341,
286,
990,
1460,
486,
14166,
486,
21453,
3830,
401,
286,
1077,
1855,
5237,
284,
330,
22599,
14363,
1273,
2399,
310,
264,
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_chi_squared_small() {
let mut chi = ChiSquared::new(0.5);
let mut rng = task_rng();
for _ in range(0, 1000) {
chi.sample(&mut rng);
chi.ind_sample(&mut rng);
}
} | rust_cleaned_test_functions.jsonl/89949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98826,
54641,
31966,
368,
341,
286,
1077,
5206,
25798,
284,
33282,
88294,
486,
931,
7,
15,
13,
20,
317,
286,
1077,
5206,
28422,
284,
3383,
66849,
543,
286,
369,
716,
304,
2088,
7,
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_default_value() {
let codec = create_default_value_codec();
let _encoder = create_decoder(&codec);
let _decoder = create_decoder(&codec);
let _data: Vec<(PropertyId, Value)> = test_data().into_iter().collect();
#[allow(dead_code)]
fn dfs(prop_list... | rust_cleaned_test_functions.jsonl/72469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 487
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
3142,
368,
341,
286,
1077,
34647,
284,
1855,
9993,
3142,
51084,
543,
286,
1077,
716,
27008,
284,
1855,
49843,
2099,
34607,
317,
286,
1077,
716,
48110,
284,
1855,
49843,
2099,
34607,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_skipmap_iterator_seek_valid() {
let skm = make_skipmap();
let mut iter = skm.iter();
iter.next();
assert!(iter.valid());
assert_eq!(current_key_val(&iter).unwrap().0, "aba".as_bytes().to_vec());
iter.seek(&"abz".as_bytes().to_vec());
asser... | rust_cleaned_test_functions.jsonl/89158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 481
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
2186,
13491,
74473,
8337,
368,
341,
286,
1077,
1901,
76,
284,
1281,
44830,
2186,
543,
286,
1077,
5206,
5367,
284,
1901,
76,
19471,
1428,
286,
5367,
4529,
543,
286,
2060,
10297,
2015,
20586,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_save_token_info() {
let spotify_oauth = SpotifyOAuth::default()
.state(&generate_random_string(16))
.scope("playlist-read-private playlist-read-collaborative playlist-modify-public playlist-modify-private streaming ugc-image-upload user-follow-modify user-follow-r... | rust_cleaned_test_functions.jsonl/10102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1066
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15376,
6458,
3109,
368,
341,
286,
1077,
87790,
91193,
284,
40537,
57850,
486,
2258,
741,
310,
659,
2454,
2099,
19366,
22644,
3904,
7,
16,
21,
1171,
310,
659,
4186,
445,
34233,
28806,
65277,
26791,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_execute_issue_overpayment_succeeds() {
run_test(|| {
ext::vault_registry::get_active_vault_from_id::<Test>
.mock_safe(|_| MockResult::Return(Ok(init_zero_vault(VAULT))));
ext::vault_registry::issue_tokens::<Test>.mock_safe(|_, _| MockResult::Return(Ok(())));
... | rust_cleaned_test_functions.jsonl/104086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 837
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
53340,
15431,
13755,
643,
29264,
82,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1303,
486,
82983,
50650,
486,
455,
12930,
2273,
945,
5673,
842,
27638,
2271,
397,
310,
659,
16712,
34067,
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... | 2 |
#[test]
fn test_handle_graft_explicit_peer() {
let (mut gs, peers, topic_hashes) = inject_nodes1()
.peer_no(1)
.topics(vec![String::from("topic1"), String::from("topic2")])
.to_subscribe(true)
.gs_config(GossipsubConfig::default())
.explicit(1)... | rust_cleaned_test_functions.jsonl/66894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
15682,
64,
723,
14214,
6026,
45159,
368,
341,
286,
1077,
320,
6984,
28081,
11,
25029,
11,
8544,
91616,
8,
284,
15551,
14896,
16,
741,
310,
659,
16537,
6536,
7,
16,
340,
310,
659,
55152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_df_op() {
let mut df = fx![
"ord";
"names" => ["Jacob", "Sam", "James"],
"ord" => [1, 2, 3],
"val" => [10, 9, 8]
]
.unwrap();
let row1 = Row::new(Some(1), vec![value!("Mia"), value!(4), value!(10)]);
let res... | rust_cleaned_test_functions.jsonl/38862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 664
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10894,
10287,
368,
341,
286,
1077,
5206,
6764,
284,
33219,
90515,
310,
330,
539,
876,
310,
330,
11400,
1,
589,
4383,
94167,
497,
330,
23950,
497,
330,
28084,
8097,
310,
330,
539,
1,
589,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pbar_overflow() {
let pb = ProgressBar::new(1);
pb.set_draw_target(ProgressDrawTarget::hidden());
pb.inc(2);
pb.finish();
} | rust_cleaned_test_functions.jsonl/107432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2257,
79073,
368,
341,
262,
1077,
17310,
284,
62044,
486,
931,
7,
16,
317,
262,
17310,
980,
23021,
11123,
7,
9496,
8137,
6397,
486,
6263,
1423,
262,
17310,
26797,
7,
17,
317,
262,
17310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_inline_let_bind_function_call_expr() {
check_assist(
inline_local_variable,
r"
fn bar(a: usize) {}
fn foo() {
let a$0 = bar(1);
a + 1;
if a > 10 {
}
while a > 10 {
}
let b = a * 10;
bar(a);
}",
r"
fn bar(a: usize) {}
f... | rust_cleaned_test_functions.jsonl/3223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41871,
62,
1149,
27461,
9174,
13429,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
435,
698,
8822,
3619,
2877,
25,
22301,
8,
5613,
8822,
15229,
368,
341,
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_shuffle_moves_high_bits() {
assert!(
shuffle(1) > (1_u128 << 80),
"Low bits must be moved to other half {:?} -> {:?}",
0,
shuffle(1)
);
assert!(
shuffle(1_u128 << 58) >= (1_u128 << 64),
"High bits mu... | rust_cleaned_test_functions.jsonl/109543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 700
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73484,
45390,
22680,
20034,
368,
341,
286,
2060,
33673,
310,
25947,
7,
16,
8,
861,
320,
16,
7300,
16,
17,
23,
1115,
220,
23,
15,
1326,
310,
330,
24187,
9472,
1969,
387,
7726,
311,
1008,
4279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_piece_try_from() {
assert_eq!(
Piece {
side: Side::White,
ptype: PieceType::Queen
},
Piece::try_from("♕").unwrap()
);
assert!(Piece::try_from("bad input").is_err());
} | rust_cleaned_test_functions.jsonl/46385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48470,
53283,
5673,
368,
341,
286,
2060,
10714,
33673,
310,
28930,
341,
394,
3108,
25,
16659,
486,
14075,
345,
394,
281,
1313,
25,
28930,
929,
486,
52006,
198,
310,
1153,
310,
28930,
486,
1539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vector_of_pointers() {
// Just ensures the troublesome API is ignored
let hdr = indoc! {"
#include <vector>
namespace operations_research {
class a;
class Solver {
public:
struct b c(std::vector<a *>);
};
class a {};
... | rust_cleaned_test_functions.jsonl/9887 | {
"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,
12247,
3575,
6085,
388,
368,
341,
262,
442,
4599,
25351,
279,
77418,
5333,
374,
12036,
198,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
3215,
397,
286,
4473,
7525,
1288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deserialize_db_pointer() {
let _guard = LOCK.run_concurrently();
let src = Bson::try_from(json!({
"$dbPointer": {
"$ref": "db.coll",
"$id": { "$oid": "507f1f77bcf86cd799439011" },
}
}))
.unwrap();
let dst = vec![
34, 0... | rust_cleaned_test_functions.jsonl/49162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15768,
9050,
8685,
21425,
368,
341,
262,
1077,
716,
26098,
284,
49463,
7634,
3382,
58202,
543,
262,
1077,
2286,
284,
425,
930,
486,
1539,
5673,
9304,
0,
2262,
286,
5201,
1999,
9084,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fold_match_arms() {
let text = r#"
fn main() <fold>{
match 0 <fold>{
0 => 0,
_ => 1,
}</fold>
}</fold>"#;
let folds = &[FoldKind::Block, FoldKind::Block];
do_check(text, folds);
} | rust_cleaned_test_functions.jsonl/12688 | {
"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,
61187,
10708,
62,
15914,
368,
341,
286,
1077,
1467,
284,
435,
2,
698,
8822,
1887,
368,
366,
19961,
41446,
262,
2432,
220,
15,
366,
19961,
41446,
286,
220,
15,
589,
220,
15,
345,
286,
716,
589,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hex_to_string() {
assert_eq_str!("0x0", &Addr(0).to_string());
assert_eq_str!("0x2a", &Addr(42).to_string());
} | rust_cleaned_test_functions.jsonl/57484 | {
"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,
32655,
2346,
3904,
368,
341,
262,
2060,
10714,
2895,
17223,
15,
87,
15,
497,
609,
13986,
7,
15,
568,
983,
3904,
1423,
262,
2060,
10714,
2895,
17223,
15,
87,
17,
64,
497,
609,
13986,
7,
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 |
#[test]
fn test_from_affine_translation_vector() {
let distance = Vector2::new(3, 7);
let matrix = Matrix3x3::from_affine_translation(&distance);
let vector = Vector3::zero();
let expected = vector;
let result = matrix * vector;
assert_eq!(result, expected);
... | rust_cleaned_test_functions.jsonl/129065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
48914,
482,
49273,
12247,
368,
341,
286,
1077,
6010,
284,
4196,
17,
486,
931,
7,
18,
11,
220,
22,
317,
286,
1077,
6172,
284,
11631,
18,
87,
18,
486,
1499,
48914,
482,
49273,
2099,
19348,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rent_exempt_executable_account() {
let (mut genesis_config, mint_keypair) = create_genesis_config(100_000);
genesis_config.rent = Rent {
lamports_per_byte_year: 1,
exemption_threshold: 1000.0,
burn_percent: 10,
};
let root_bank... | rust_cleaned_test_functions.jsonl/2534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
95736,
18430,
5922,
13500,
368,
341,
286,
1077,
320,
6984,
59366,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
15,
62,
15,
15,
15,
317,
286,
59366,
5332,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iteraor(){
let a = vec![vec![1,1,1,1],vec![2,2,2,2], vec![3,3,3,3]];
let b = flatten(a);
for x in b {
println!("{}", x)
}
let a = vec![vec![1,1,1,1],vec![2,2,2,2], vec![3,3,3,3]];
let b = flatten(a).rev();
for x in b {
... | rust_cleaned_test_functions.jsonl/46767 | {
"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,
11723,
64,
269,
3032,
286,
1077,
264,
284,
7486,
20703,
4083,
20703,
16,
11,
16,
11,
16,
11,
16,
1125,
4083,
20703,
17,
11,
17,
11,
17,
11,
17,
1125,
7486,
20703,
18,
11,
18,
11,
18,
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_distributions_iter() {
use distributions::Normal;
let mut rng = ::test::rng(210);
let distr = Normal::new(10.0, 10.0);
let results: Vec<_> = distr.sample_iter(&mut rng).take(100).collect();
println!("{:?}", results);
} | rust_cleaned_test_functions.jsonl/17682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
17994,
11723,
368,
341,
286,
990,
42685,
486,
12206,
280,
286,
1077,
5206,
28422,
284,
3504,
1944,
486,
69890,
7,
17,
16,
15,
317,
286,
1077,
7905,
284,
18437,
486,
931,
7,
16,
15,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_p2wpkh() {
// stolen from Bitcoin transaction: b3c8c2b6cfc335abbcb2c7823a8453f55d64b2b5125a9a61e8737230cdb8ce20
let mut key = hex_key!("033bc8c83c52df5712229a2f72206d90192366c36428cb0c12b6af98324d97bfbc");
let addr = Address::p2wpkh(&key, Digibyte).unwrap();
asser... | rust_cleaned_test_functions.jsonl/63230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
17,
8421,
30664,
368,
341,
286,
442,
22329,
504,
13127,
7745,
25,
293,
18,
66,
23,
66,
17,
65,
21,
66,
8316,
18,
18,
20,
12523,
7221,
17,
66,
22,
23,
17,
18,
64,
23,
19,
20,
18,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_to_path() {
if cfg!(windows) {
assert_eq!(
r"..\sample.txt",
convert_to_path(r"..\sample.txt", "test")
.unwrap()
.to_str()
.unwrap()
);
let expected_pa... | rust_cleaned_test_functions.jsonl/21449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
2638,
368,
341,
286,
421,
13286,
10297,
27077,
8,
341,
310,
2060,
10714,
33673,
394,
435,
1,
60402,
13611,
3909,
756,
394,
5508,
2346,
2638,
2601,
1,
60402,
13611,
3909,
497,
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... | 2 |
#[test]
fn test_read_ndarray_oob() {
let dir = tempdir::TempDir::new("rust_n5_ndarray_tests").unwrap();
let n = N5Filesystem::open_or_create(dir.path())
.expect("Failed to create N5 filesystem");
let block_size = smallvec![50, 100];
let data_attrs = DatasetAttributes::new(
sma... | rust_cleaned_test_functions.jsonl/2695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
43544,
1653,
14179,
674,
368,
1476,
262,
1077,
5419,
284,
2730,
3741,
486,
12151,
6184,
486,
931,
445,
35788,
1089,
20,
43544,
1653,
32509,
1827,
15454,
1428,
262,
1077,
308,
284,
451,
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_token_config_parsing() {
let from_config = Config {
vault: VaultConfig {
namespace: None,
server: "127.0.0.1:8200".to_string(),
ca_certificate: None,
token: Token::FromConfig(TokenFromConfig {
... | rust_cleaned_test_functions.jsonl/134635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
5332,
620,
28598,
368,
341,
286,
1077,
504,
5332,
284,
5532,
341,
310,
34584,
25,
41397,
2648,
341,
394,
4473,
25,
2240,
345,
394,
3538,
25,
330,
16,
17,
22,
13,
15,
13,
15,
13,
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_remove_default() {
let thread_pool = ThreadPoolBuilder::new().build().unwrap();
let mut crds = Crds::default();
let val = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::default()));
assert_matches!(crds.insert(val.clone(), 1), Ok(_));
let mut s... | rust_cleaned_test_functions.jsonl/17138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
9993,
368,
341,
286,
1077,
4516,
15709,
284,
72716,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
1044,
284,
4553,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_project_aggregates() {
let schemaReplicant = prepopulated_typed_schemaReplicant(MinkowskiValueType::Long);
let causetq = r#"[:find ?e (max ?t)
:where
[?e :foo/bar ?t]]"#;
let SQLCausetQ { allegrosql, args } = translate(&schemaReplicant, causetq... | rust_cleaned_test_functions.jsonl/90730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2800
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16352,
20587,
7998,
973,
368,
341,
262,
1077,
10802,
18327,
35237,
284,
855,
8374,
7757,
528,
32501,
25371,
18327,
35237,
3189,
766,
28284,
60897,
486,
6583,
317,
262,
1077,
2162,
18187,
80,
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_parse_csi_cursor_position() {
assert_eq!(
parse_csi_cursor_position(b"\x1B[20;10R").unwrap(),
Some(InternalEvent::CursorPosition(9, 19))
);
} | rust_cleaned_test_functions.jsonl/21325 | {
"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,
21039,
666,
6321,
28601,
9661,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
666,
6321,
28601,
9661,
1883,
11934,
87,
16,
33,
58,
17,
15,
26,
16,
15,
49,
1827,
15454,
3148,
310,
4329,
7,
11569... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_no_matches() {
let word = "diaper";
let inputs = ["hello", "world", "zombies", "pants"];
let outputs = vec![];
process_anagram_case(word, &inputs, &outputs);
} | rust_cleaned_test_functions.jsonl/14773 | {
"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,
6536,
38344,
368,
341,
262,
1077,
3409,
284,
330,
8579,
3191,
3302,
262,
1077,
11127,
284,
4383,
14990,
497,
330,
14615,
497,
330,
89,
35694,
497,
330,
91937,
31797,
262,
1077,
16275,
284,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_array_function_expression() {
expect_printed("a => a", "(a) => a;\n");
expect_printed("() => 3 * 3", "() => 3 * 3;\n");
expect_printed("() => {}", "() => {};\n");
expect_printed(
"(a, b, c) => { return a + b + c;\n }",
"(a, b, c) => { return a + b + c;\n };\n",
... | rust_cleaned_test_functions.jsonl/93453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
9174,
28068,
368,
341,
262,
1720,
10064,
291,
445,
64,
589,
264,
497,
11993,
64,
8,
589,
264,
17882,
77,
797,
262,
1720,
10064,
291,
445,
368,
589,
220,
18,
353,
220,
18,
497,
67411,
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_write_five_byte_uint() {
let value = 0x01_23_45_67_89;
let mut buffer: Vec<u8> = vec![];
DecodedUInt::write_u64(&mut buffer, value).expect(WRITE_ERROR_MESSAGE);
let expected_bytes = &[0x01, 0x23, 0x45, 0x67, 0x89];
assert_eq!(expected_bytes, buffer.as_slic... | rust_cleaned_test_functions.jsonl/30848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
95258,
19737,
15807,
368,
341,
286,
1077,
897,
284,
220,
15,
87,
15,
16,
62,
17,
18,
62,
19,
20,
62,
21,
22,
62,
23,
24,
280,
286,
1077,
5206,
4147,
25,
11312,
34837,
23,
29,
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_int() {
assert_eq!(
apply(
r#"
1234567890
"#
.trim()
),
Ok(vec![Token::Int(span(1, 1, "1234567890"))])
)
} | rust_cleaned_test_functions.jsonl/27573 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
1006,
394,
435,
2,
698,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
198,
1,
4956,
503,
659,
10666,
741,
310,
2837,
310,
7622,
25592,
20703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_guild_member() {
let route = Route::AddGuildMember {
guild_id: GUILD_ID,
user_id: USER_ID,
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/members/{user_id}",
guild_id = GUIL... | rust_cleaned_test_functions.jsonl/119833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
1889,
1498,
19388,
368,
341,
286,
1077,
6021,
284,
9572,
486,
2212,
72574,
9366,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
1196,
842,
25,
13872,
3450,
345,
286,
2605,
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_multiclass() {
let classes = vec!["Cat".to_owned(), "Dog".to_owned(), "Rabbit".to_owned()];
let mut metrics = MulticlassClassificationProductionPredictionMetrics::new(classes);
metrics.update((
NumberOrString::String("Cat".to_owned()),
NumberOrString::String("Cat".to_owned()),
));
let... | rust_cleaned_test_functions.jsonl/38417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
69503,
368,
341,
1572,
10217,
6846,
284,
7486,
0,
1183,
26801,
3263,
983,
51973,
1507,
330,
48940,
3263,
983,
51973,
1507,
330,
49,
19949,
3263,
983,
51973,
33800,
10217,
5206,
16734,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_credential_cache_set_than_get_works() {
let init = Init::new();
let rev_reg_id = "test-id";
let data = RevRegCache {
rev_state: Some(RevState {
timestamp: 1000,
value: "{\"key\": \"value1\"}".to_string(),
})
... | rust_cleaned_test_functions.jsonl/94547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
30320,
11529,
2602,
51613,
3062,
11498,
82,
368,
341,
286,
1077,
2930,
284,
15690,
486,
931,
1428,
286,
1077,
5772,
4920,
842,
284,
330,
1944,
12897,
3302,
286,
1077,
821,
284,
10107,
3477,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_strings() {
for (romani, arabici) in ROMANI_ARABICI {
let n = Numerus::try_from(arabici).unwrap();
assert_eq!(romani, &n.to_string());
}
} | rust_cleaned_test_functions.jsonl/76332 | {
"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,
2346,
33500,
368,
341,
262,
369,
320,
441,
5559,
11,
51312,
3375,
8,
304,
30686,
76893,
23399,
1867,
74076,
341,
286,
1077,
308,
284,
47124,
355,
486,
1539,
5673,
37544,
370,
3375,
568,
15454,
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
] | 2 |
#[test]
fn test_execute_custom_module_and_script() {
let (_swarm, mut client_proxy) = setup_swarm_and_client_proxy(1, 0);
client_proxy.create_next_account(false).unwrap();
client_proxy
.mint_coins(&["mintb", "0", "50"], true)
.unwrap();
assert_eq!(
Decimal::from_f64(50.0)... | rust_cleaned_test_functions.jsonl/32469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
15875,
10750,
8378,
14660,
368,
341,
262,
1077,
5453,
2280,
2178,
11,
5206,
2943,
29712,
8,
284,
6505,
32581,
2178,
8378,
8179,
29712,
7,
16,
11,
220,
15,
317,
262,
2943,
29712,
2520,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subss() {
assert_emit!(0xf3, 0x0f, 0x5c, 0xc1; subss(XMM0, XMM1));
assert_emit!(0xf3, 0x41, 0x0f, 0x5c, 0xdf; subss(XMM3, XMM15));
assert_emit!(0xf3, 0x44, 0x0f, 0x5c, 0xc4; subss(XMM8, XMM4));
} | rust_cleaned_test_functions.jsonl/85488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
778,
368,
341,
286,
2060,
69082,
10297,
15,
5848,
18,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
20,
66,
11,
220,
15,
8148,
16,
26,
1186,
778,
7644,
8035,
15,
11,
1599,
8035,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_used_in_different_expr1() {
check_assist(
inline_local_variable,
"
fn foo() {
let a<|> = 10 + 20;
let b = a * 10;
let c = (a, 20);
let d = [a, 10];
let e = (a);
}",
"
fn foo() {
<|>let b = (10 + 20) * 10;
let c = (10 + 20, 2... | rust_cleaned_test_functions.jsonl/60329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27803,
1243,
82741,
21915,
16,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
262,
1077,
264,
27,
91,
29,
284,
220,
16,
15,
488,
220,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast_list() -> Result<()> {
let mut builder = ListPrimitiveChunkedBuilder::<Int32Type>::new("a", 10, 10);
builder.append_slice(Some(&[1i32, 2, 3]));
builder.append_slice(Some(&[1i32, 2, 3]));
let ca = builder.finish();
let new = ca.cast_with_dtype(&DataTy... | rust_cleaned_test_functions.jsonl/59835 | {
"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,
5303,
2019,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
7363,
284,
1759,
33313,
28304,
291,
3297,
27638,
1072,
18,
17,
929,
6831,
931,
445,
64,
497,
220,
16,
15,
11,
220,
16,
15,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_zero_key_replay_counter_valid_msg3() {
let mut supplicant = test_util::get_wpa2_supplicant();
supplicant.start().expect("Failed starting Supplicant");
let (result, updates) = send_fourway_msg1(&mut supplicant, |msg1| {
msg1.key_frame_fields.key_replay_counter... | rust_cleaned_test_functions.jsonl/21800 | {
"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,
19359,
3097,
1288,
1363,
15730,
8337,
6483,
18,
368,
341,
286,
1077,
5206,
90035,
35237,
284,
1273,
18974,
486,
455,
1670,
6595,
17,
91480,
35237,
543,
286,
90035,
35237,
4962,
1005,
17119,
445,
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_gc_with_compaction_filter() {
use crate::server::gc_worker::gc_by_compact;
test_gc_imp(b"k1", b"v1", b"v2", b"v3", b"v4", gc_by_compact);
let v1 = "x".repeat(SHORT_VALUE_MAX_LEN + 1).into_bytes();
let v2 = "y".repeat(SHORT_VALUE_MAX_LEN + 1).into_bytes();
... | rust_cleaned_test_functions.jsonl/35958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49423,
6615,
18177,
1311,
8727,
368,
341,
286,
990,
17717,
486,
4030,
486,
20669,
40385,
486,
20669,
3710,
18177,
531,
401,
286,
1273,
49423,
36788,
1883,
62911,
16,
497,
293,
1,
85,
16,
497,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_realtime_runtime_not_supported() {
// arrange
let tmp = create_temp_dir("test_realtime_runtime_not_supported")
.expect("create temp directory for test");
let cpu = LinuxCpuBuilder::new().with_realtime_runtime(5).build();
// act
let result = Cp... | rust_cleaned_test_functions.jsonl/126564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
1678,
33232,
7913,
57885,
368,
341,
286,
442,
30893,
198,
286,
1077,
4174,
284,
1855,
11771,
4334,
445,
1944,
15266,
1678,
33232,
7913,
57885,
1138,
310,
659,
17119,
445,
3182,
2730,
6220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_attribute_starts() {
let doc = Document::from(
"<div>
<span>text hi there
<a data-counter='blobovo'>two</a>
</span>
</div>",
);
let sel = doc.select("div > span > a[data-counter^=\"blob\"]");
... | rust_cleaned_test_functions.jsonl/66021 | {
"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,
30015,
16791,
86552,
368,
341,
286,
1077,
4629,
284,
11789,
486,
1499,
1006,
310,
4055,
611,
397,
2290,
366,
1480,
29,
1318,
15588,
1052,
198,
338,
366,
64,
821,
63189,
1131,
38145,
749,
3334,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_as_decimal() {
test_none_with_ctx_and_extra(cast_any_as_decimal::<Json>);
// TODO: add test case that make Decimal::from_str failed
let cs: Vec<(Json, bool, bool, Decimal)> = vec![
(
Json::Object(BTreeMap::default()),
... | rust_cleaned_test_functions.jsonl/101804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
74429,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
37248,
11898,
74429,
27638,
5014,
29,
626,
286,
442,
5343,
25,
912,
1273,
1142,
429,
1281,
26728,
486,
1499,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_position() {
let p = Position::from_str("<x=-1, y=0, z=2>");
assert_eq!(p.unwrap(), Position { x: -1, y: 0, z: 2 });
} | rust_cleaned_test_functions.jsonl/93286 | {
"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,
21039,
9661,
368,
341,
286,
1077,
281,
284,
12380,
486,
1499,
2895,
9639,
87,
10829,
16,
11,
379,
28,
15,
11,
1147,
28,
17,
15084,
286,
2060,
10714,
10297,
79,
55395,
1507,
12380,
314,
856,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_grouped_vals_removal() {
let m = {
let mut m = MatchedArg::new();
m.push_val("aaa".into());
m.new_val_group();
m.append_val("bbb".into());
m.append_val("ccc".into());
m.new_val_group();
m.append_val("ddd"... | rust_cleaned_test_functions.jsonl/39136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3056
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
291,
29550,
1288,
6355,
831,
368,
341,
286,
1077,
296,
284,
341,
310,
1077,
5206,
296,
284,
14152,
291,
2735,
486,
931,
543,
310,
296,
2552,
6189,
445,
32646,
3263,
18122,
1423,
310,
296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_executable_with_shell_quoting_windows() {
let d = get_current_dir().ok();
d.and_then(|p| {
let new_env = process::Command::new("randomtemp")
.env("RANDOMTEMP_EXECUTABLE", "dir")
.env_remove("RANDOMTEMP_BASEDIR")
.env_rem... | rust_cleaned_test_functions.jsonl/19005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
5922,
6615,
48945,
11280,
11519,
58220,
368,
341,
286,
1077,
294,
284,
633,
11080,
4334,
1005,
562,
543,
286,
294,
34724,
68367,
22428,
79,
91,
341,
310,
1077,
501,
15879,
284,
1882,
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_get_events() {
let (mock_db, client, mut runtime) = create_database_client_and_runtime();
let event_index = 0;
let mock_db_events = mock_db.events;
let (first_event_version, first_event) = mock_db_events[event_index].clone();
let event_key = hex::encode(first_event.key().as_... | rust_cleaned_test_functions.jsonl/4630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
19691,
368,
341,
262,
1077,
320,
16712,
8685,
11,
2943,
11,
5206,
15592,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
1077,
1538,
3560,
284,
220,
15,
280,
262,
1077,
7860,
8685,
1969... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_descendant_for_range() {
let tree = parse_json_example();
let array_node = tree.root_node().child(0).unwrap();
// Leaf node exactly matches the given bounds - byte query
let colon_index = JSON_EXAMPLE.find(":").unwrap();
let colon_node = array_node
.descendant_f... | rust_cleaned_test_functions.jsonl/99268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1995
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
10986,
20372,
5478,
9698,
368,
341,
262,
1077,
4916,
284,
4715,
9455,
39304,
543,
262,
1077,
1334,
5084,
284,
4916,
12576,
5084,
1005,
3048,
7,
15,
568,
15454,
1428,
262,
442,
26869,
2436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_set_target() {
Target::initialize_x86(&Default::default());
let context = Context::create();
let module = context.create_module("mod");
let triple = TargetTriple::create("x86_64-pc-linux-gnu");
#[cfg(not(any(feature = "llvm3-6", feature = "llvm3-7", feature = "llvm3-8"))... | rust_cleaned_test_functions.jsonl/111716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2602,
11123,
368,
341,
262,
13483,
486,
21641,
3212,
23,
21,
2099,
3675,
486,
2258,
1423,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
2593,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_catchers() {
fn rocket() -> Rocket<Build> {
rocket::build()
.register("/0", catchers![not_found_0])
.register("/1", catchers![not_found_1])
.register("/2", catchers![not_found_2])
.register("/", catchers![all])
}
let cli... | rust_cleaned_test_functions.jsonl/121864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
666,
754,
388,
368,
341,
262,
5168,
24306,
368,
1464,
39218,
27,
11066,
29,
341,
286,
24306,
486,
5834,
741,
310,
659,
6343,
4283,
15,
497,
2287,
388,
20703,
1921,
21480,
62,
15,
2546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_subteams_are_hidden() {
let mut foo = dummy_team("foo");
foo.subteam_of = Some(String::new());
let data = Data::dummy(vec![foo]);
assert_eq!(data.index_data().unwrap().teams.len(), 0);
} | rust_cleaned_test_functions.jsonl/33046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
5228,
38496,
56855,
26739,
368,
341,
286,
1077,
5206,
15229,
284,
17292,
26532,
445,
7975,
797,
286,
15229,
4309,
9196,
3575,
284,
4329,
2242,
486,
931,
1423,
286,
1077,
821,
284,
2885,
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_out_n_a() {
let (mut cpu, mut bus) = new_cpu(vec![0xd3, 0x01]);
cpu.registers.a = 0x23;
cpu.step(&mut bus, 0);
assert_eq!(0x23, bus.port_data[0x01]);
} | rust_cleaned_test_functions.jsonl/112665 | {
"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,
6068,
1089,
4306,
368,
341,
286,
1077,
320,
6984,
17319,
11,
5206,
5828,
8,
284,
501,
21795,
25592,
20703,
15,
9703,
18,
11,
220,
15,
87,
15,
16,
10149,
286,
17319,
7031,
9303,
5849,
284,
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_point_approx_eq() {
approx_eq_case(
true,
Point::from_coords(1., 0., 0.),
Point::from_coords(1., 0., 0.),
);
approx_eq_case(
false,
Point::from_coords(1., 0., 0.),
Point::from_coords(0., 1., 0.),
... | rust_cleaned_test_functions.jsonl/70557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6085,
90425,
10714,
368,
341,
286,
9848,
10714,
19096,
1006,
310,
830,
345,
310,
5126,
486,
1499,
32576,
7,
16,
2572,
220,
15,
2572,
220,
15,
13,
1326,
310,
5126,
486,
1499,
32576,
7,
16,
2572... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optimization_trim_null_masks() {
// See https://github.com/influxdata/influxdb-pb-data-protocol#optimization-1-trim-null-masks
let table_batch = TableBatch {
table_name: "table".to_string(),
columns: vec![
with_i64(
colu... | rust_cleaned_test_functions.jsonl/36411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 998
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
65964,
70025,
15162,
62935,
368,
341,
286,
442,
3496,
3703,
1110,
5204,
905,
17996,
36706,
691,
17996,
36706,
1999,
2268,
65,
13945,
12,
17014,
2,
19133,
2022,
12,
16,
10188,
318,
60341,
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_buckets_limit() {
let buckets_num = 1;
let mut hist = Histogram::new(buckets_num);
assert_eq!(hist.buckets.len(), 0);
hist.append(&datum::encode_value(&[Datum::I64(1)]).unwrap());
assert_eq!(hist.buckets.len(), 1);
assert_eq!(hist.per_bucket_limit,... | rust_cleaned_test_functions.jsonl/94946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84156,
14763,
368,
341,
286,
1077,
42112,
4273,
284,
220,
16,
280,
286,
1077,
5206,
12744,
284,
82138,
486,
931,
1883,
38551,
4273,
317,
286,
2060,
10714,
10297,
21158,
948,
38551,
19406,
1507,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asin_none() {
let a = Angle::asin(1.5);
assert!(a.is_none());
let a = Angle::asin(-1.1);
assert!(a.is_none());
} | rust_cleaned_test_functions.jsonl/109961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
258,
31488,
368,
341,
286,
1077,
264,
284,
36237,
486,
50310,
7,
16,
13,
20,
317,
286,
2060,
10297,
64,
2079,
31488,
5231,
286,
1077,
264,
284,
36237,
486,
50310,
4080,
16,
13,
16,
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 |
#[test]
fn test_insufficient_funds() {
let (genesis_config, mint_keypair) = create_genesis_config(11_000);
let bank = Bank::new(&genesis_config);
let pubkey = Pubkey::new_rand();
bank.transfer(1_000, &mint_keypair, &pubkey).unwrap();
assert_eq!(bank.transaction_count(), 1... | rust_cleaned_test_functions.jsonl/42381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34386,
26683,
761,
42950,
368,
341,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
16,
62,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_drop_query() {
let mut state = State::new("GET", "www.example.com", "/path/to/something?foo=bar");
state.clear_value();
state.move_value_to_part(RequestPart::Query);
assert_eq!(state.key(), "GET www.example.com /path/to/something");
} | rust_cleaned_test_functions.jsonl/101350 | {
"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,
4387,
29584,
5738,
368,
341,
220,
1077,
5206,
1584,
284,
3234,
486,
931,
445,
3806,
497,
330,
2136,
7724,
905,
497,
3521,
2343,
32429,
2687,
11532,
30,
7975,
28,
2257,
3071,
220,
1584,
7426,
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_mv_backup_dir() {
let (at, mut ucmd) = at_and_ucmd!();
let dir_a = "test_mv_backup_dir_dir_a";
let dir_b = "test_mv_backup_dir_dir_b";
at.mkdir(dir_a);
at.mkdir(dir_b);
ucmd.arg("-vbT")
.arg(dir_a)
.arg(dir_b)
.succeeds()
.stdout_only(form... | rust_cleaned_test_functions.jsonl/41626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
44710,
4334,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
5419,
4306,
284,
330,
1944,
73187,
44710,
4334,
4334,
4306,
876,
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_uint32_addmany_constants() {
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06,
0xbc, 0xe5,
]);
for _ in 0..1000 {
let mut cs = TestConstraintSystem::<Bls12>::new(... | rust_cleaned_test_functions.jsonl/20439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
18,
17,
2891,
34576,
55642,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
8956,
310,
220,
15,
87,
20,
24,
11,
220,
15,
87,
21,
17,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_set_endpoint() {
let from = "EPSG:4326";
let to = "EPSG:4326+3855";
let tf = ProjBuilder::new();
let ep = tf.get_url_endpoint().unwrap();
assert_eq!(&ep, "https://cdn.proj.org");
tf.set_url_endpoint("https://github.com/georust").unwrap();
l... | rust_cleaned_test_functions.jsonl/104006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
36699,
368,
341,
286,
1077,
504,
284,
330,
45177,
38,
25,
19,
18,
17,
21,
876,
286,
1077,
311,
284,
330,
45177,
38,
25,
19,
18,
17,
21,
10,
18,
23,
20,
20,
876,
286,
1077,
6409,
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_registration_from_yaml_str() -> Result<()> {
let registration = AppServiceRegistration::try_from_yaml_str(registration_string())?;
assert_eq!(registration.id, "appservice");
Ok(())
} | rust_cleaned_test_functions.jsonl/34974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49101,
5673,
64380,
2895,
368,
1464,
5714,
71698,
341,
286,
1077,
12227,
284,
1845,
1860,
23365,
486,
1539,
5673,
64380,
2895,
18390,
4048,
3904,
2140,
69493,
286,
2060,
10714,
10297,
25862,
1764,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_langid_ord() {
let input = &[
"en-US-macos-zarab",
"en-US-macos-nedis",
"en-US-macos",
"en-GB",
"en",
"en-US",
"ar",
"fr",
"de",
];
let mut langids = input
.iter()
.map(|l| -> LanguageIdentifier ... | rust_cleaned_test_functions.jsonl/10768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17876,
307,
67324,
368,
341,
262,
1077,
1946,
284,
609,
9640,
286,
330,
268,
32340,
1448,
41647,
9141,
277,
370,
756,
286,
330,
268,
32340,
1448,
41647,
5279,
41825,
756,
286,
330,
268,
32340,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_none_or_up_to_42() {
let occurence: Occurences<u32> = Occurences::NoneOrUpTo(Some(42));
occurence.check_count(42).unwrap();
} | rust_cleaned_test_functions.jsonl/4444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
8734,
8237,
2346,
62,
19,
17,
368,
341,
286,
1077,
2983,
86937,
25,
19927,
552,
98162,
34837,
18,
17,
29,
284,
19927,
552,
98162,
486,
4064,
2195,
2324,
1249,
65405,
7,
19,
17,
1106,
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 |
#[test]
fn test_string_or_struct() -> Result<(), Error> {
use std::collections::BTreeMap as Map;
combined_keys_gen!(sender_combined_key, receiver_combined_key);
let shared_key = SharedKey::generate();
#[derive(PartialEq, Debug, Serialize, Deserialize)]
struct Service {
// The `stri... | rust_cleaned_test_functions.jsonl/31594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
8734,
15126,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
990,
1460,
486,
51137,
486,
33,
6533,
2227,
438,
5027,
401,
262,
10856,
12631,
16322,
10297,
11644,
89945,
3097,
11,
13964,
89945,
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... | 1 |
#[test]
fn test_multi_files() {
let args = ["-c", NORMAL_FMTSTR, "/dev", "/usr/lib", "/etc/fstab", "/var"];
new_ucmd!().args(&args)
.run()
.stdout_is(expected_result(&args));
} | rust_cleaned_test_functions.jsonl/36726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
10931,
368,
341,
262,
1077,
2827,
284,
4383,
12,
66,
497,
52431,
44332,
6666,
11,
3521,
3583,
497,
3521,
7063,
8194,
497,
3521,
12107,
6663,
67488,
497,
3521,
947,
6332,
262,
501,
68887,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_str() {
let s = "\0 a 'b \" c";
let tokens = quote!(#s);
let expected = "\"\\u{0} a 'b \\\" c\"";
assert_eq!(expected, tokens.to_string());
} | rust_cleaned_test_functions.jsonl/53400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
368,
341,
262,
1077,
274,
284,
2917,
15,
264,
364,
65,
7245,
272,
876,
262,
1077,
11211,
284,
12641,
10297,
2,
82,
317,
262,
1077,
3601,
284,
15898,
3422,
84,
90,
15,
92,
264,
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 |
#[test]
fn test_find_all_refs_macro_def() {
check(
r#"
#[macro_export]
macro_rules! m1$0 { () => (()) }
fn foo() {
m1();
m1();
}
"#,
expect![[r#"
m1 Macro FileId(0) 0..46 29..31
FileId(0) 63..65
FileId(0) 73..75
... | rust_cleaned_test_functions.jsonl/60654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
58810,
7844,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
13353,
32606,
27114,
921,
32606,
21407,
0,
296,
16,
3,
15,
314,
1719,
589,
320,
2140,
555,
8822,
15229,
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... | 1 |
#[test]
fn test_is_long_vowel() {
assert!(!is_long_vowel('A'));
assert!(is_long_vowel(CAPITAL_LONG_A));
assert!(!is_long_vowel('a'));
assert!(is_long_vowel(SMALL_LONG_A));
assert!(!is_long_vowel('Y'));
assert!(is_long_vowel(CAPITAL_LONG_Y));
assert!(!is_long_vowel('y'));
assert!... | rust_cleaned_test_functions.jsonl/6239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
17799,
2273,
67057,
368,
341,
262,
2060,
0,
3471,
285,
17799,
2273,
67057,
492,
32,
6336,
262,
2060,
10297,
285,
17799,
2273,
67057,
3025,
2537,
33188,
19903,
1566,
1106,
262,
2060,
0,
3471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_valid() {
let executor = fasync::Executor::new().expect("Failed to create executor");
let (client_end, server_end) = create_endpoints::<AccountHandlerContextMarker>().unwrap();
spawn_account_handler_context_server(server_end, Ok(()));
do_get_test(executor, cl... | rust_cleaned_test_functions.jsonl/108917 | {
"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,
3062,
8337,
368,
341,
286,
1077,
31558,
284,
282,
7692,
486,
25255,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
31558,
797,
286,
1077,
320,
2972,
6213,
11,
3538,
6213,
8,
284,
1855,
6213,
7706,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_milliseconds() -> Result<(), tarde::Error>{
let x = 10;
let now = time::Instant::now();
thread::sleep(x.millis()?);
Ok(assert!(now.elapsed() >= x.millis()?))
} | rust_cleaned_test_functions.jsonl/40369 | {
"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,
717,
56194,
368,
1464,
5714,
68843,
60645,
486,
1454,
41446,
262,
1077,
856,
284,
220,
16,
15,
280,
262,
1077,
1431,
284,
882,
486,
30340,
486,
3328,
543,
262,
4516,
486,
25809,
2075,
744,
56212... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mid() -> Result<(), IndexError> {
let mut x: MyVec<usize> = MyVec::new();
for i in &[11, 13, 15, 17, 19] {
x.push(*i);
}
assert_eq!(x.mid(), Some(&15));
Ok(())
} | rust_cleaned_test_functions.jsonl/24018 | {
"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,
43733,
368,
1464,
5714,
68843,
60203,
29,
341,
262,
1077,
5206,
856,
25,
3017,
10050,
90244,
29,
284,
3017,
10050,
486,
931,
543,
262,
369,
600,
304,
44590,
16,
16,
11,
220,
16,
18,
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_in_partial_2() -> TestResult {
let p = Polar::new();
p.load_str(r#"f(x) if y in x and y = 1;"#)?;
let mut q = p.new_query_from_term(term!(call!("f", [sym!("x")])), false);
assert_partial_expression!(next_binding(&mut q)?, "x", "1 in _this");
assert_query_... | rust_cleaned_test_functions.jsonl/63035 | {
"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,
1243,
52068,
62,
17,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
2601,
55543,
69,
2075,
8,
421,
379,
304,
856,
323,
379,
284,
220,
16,
10892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clear() {
let mut v: Vec<Box<_>> = vec![Box::new(6), Box::new(5), Box::new(4)];
v.clear();
assert_eq!(v.len(), 0);
} | rust_cleaned_test_functions.jsonl/80756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
368,
341,
262,
1077,
5206,
348,
25,
11312,
79852,
32399,
2452,
284,
7486,
20703,
1611,
486,
931,
7,
21,
701,
8261,
486,
931,
7,
20,
701,
8261,
486,
931,
7,
19,
12587,
262,
348,
7426,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_external_ops() {
/// Test case for a single operation.
macro_rules! test_case {
([$($op:tt)*], $protocol:ident, $derived:tt, $initial:literal, $arg:literal, $expected:literal) => {{
#[derive(Debug, Default, Any)]
struct External {
value: i6... | rust_cleaned_test_functions.jsonl/24679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1987
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47432,
21959,
368,
341,
262,
1048,
3393,
1142,
369,
264,
3175,
5666,
624,
262,
18072,
21407,
0,
1273,
19096,
341,
286,
320,
3442,
699,
453,
25,
5566,
4806,
1125,
400,
17014,
25,
1713,
11,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enable_split_irqchip_cap() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
let mut cap: kvm_enable_cap = Default::default();
cap.cap = KVM_CAP_SPLIT_IRQCHIP;
// be implemented by the VMM.
// of pins re... | rust_cleaned_test_functions.jsonl/86848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18988,
17052,
22623,
29662,
16388,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
543,
286,
1077,
5206,
2062,
25,
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_home_get_latest_key_path() {
let dir = tempdir().unwrap();
let home = Home::new(dir.path()).unwrap();
let correct_dir = dir.path().join(".shuffle/accounts/latest/dev.key");
assert_eq!(correct_dir, home.get_latest_key_path());
} | rust_cleaned_test_functions.jsonl/123544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21653,
3062,
64880,
3097,
2638,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
2114,
284,
5379,
486,
931,
14161,
3875,
6011,
15454,
543,
286,
1077,
4396,
4334,
284,
5419,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_unquote() {
let cases = vec![
(None, false, None),
(Some(r"a"), false, Some("a")),
(Some(r#""3""#), false, Some(r#""3""#)),
(Some(r#""3""#), true, Some(r#"3"#)),
(Some(r#"{"a": "b"}"#), false, Some(r#"{"a": "b"}"#)),
... | rust_cleaned_test_functions.jsonl/60598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 704
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
4907,
2949,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
4064,
11,
895,
11,
2240,
1326,
310,
320,
8373,
2601,
56693,
3975,
895,
11,
4329,
445,
64,
30154,
310,
320,
8373,
2601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_replies_with_warning_message() {
// contains "檔案過大!部分文章無法顯示"
let documents = load_document("../tests/Gossiping_M.1119222611.A.7A9.html");
let article_date = Some(
FixedOffset::east(8 * 3600)
.ymd(2005, 6, 20)
.and_hms(7, 1... | rust_cleaned_test_functions.jsonl/87155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1288,
7202,
6615,
38395,
6462,
368,
341,
286,
442,
5610,
330,
113568,
99751,
26288,
6313,
99659,
82025,
105704,
110612,
698,
286,
1077,
9293,
284,
2795,
26231,
17409,
23841,
15792,
41473,
287,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pin_message() {
let route = Route::PinMessage {
channel_id: CHANNEL_ID,
message_id: MESSAGE_ID,
};
assert_eq!(
route.to_string(),
format!(
"channels/{channel_id}/pins/{message_id}",
channel_id... | rust_cleaned_test_functions.jsonl/119955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26296,
6462,
368,
341,
286,
1077,
6021,
284,
9572,
486,
19861,
2052,
341,
310,
5496,
842,
25,
58756,
3450,
345,
310,
1943,
842,
25,
40758,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
310,
602... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_staff() {
let uuid = Uuid::parse_str(UUID).unwrap_or_default();
let profile = some_profile();
let staff = UsersStaff::from(&profile);
assert_eq!(staff.user_uuid, uuid);
assert_eq!(staff.first_name, None);
assert_eq!(staff.last_name, Some(LAS... | rust_cleaned_test_functions.jsonl/62148 | {
"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,
8727,
47060,
368,
341,
286,
1077,
16040,
284,
547,
2423,
486,
6400,
2895,
65664,
568,
15454,
8734,
9993,
543,
286,
1077,
5526,
284,
1045,
13789,
543,
286,
1077,
5570,
284,
14627,
33211,
486,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collision_when_ranked_query() {
assert!(default_rank_route_collisions(&["/a?a=b", "/a?c=d"]));
assert!(default_rank_route_collisions(&["/a?a=b&<b>", "/a?<c>&c=d"]));
assert!(default_rank_route_collisions(&["/a?a=b&<b..>", "/a?<c>&c=d"]));
} | rust_cleaned_test_functions.jsonl/25744 | {
"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,
70375,
47636,
20417,
291,
5738,
368,
341,
286,
2060,
10297,
2258,
20417,
28109,
43597,
6805,
2099,
1183,
14,
64,
98461,
22086,
497,
3521,
64,
30,
66,
25405,
74446,
286,
2060,
10297,
2258,
20417,
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_overlapping_with_intersection() {
// There are two overlapping segments a-b and b-a intersecting a segment
// c-d.
// This test used to fail until overlapping edges got dealt with before
// intersection detection. The issue was that the one of the overlapping
// edges would i... | rust_cleaned_test_functions.jsonl/102416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15431,
90619,
6615,
82558,
368,
341,
262,
442,
2619,
525,
1378,
49817,
20632,
264,
1455,
323,
293,
7409,
31796,
287,
264,
10238,
198,
262,
442,
272,
1737,
624,
262,
442,
1096,
1273,
1483,
311,
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_group_pattern_with_multiple_defs() {
check(
r#"
macro_rules! m {
($($i:ident),*) => ( impl Bar { $(fn $i() {})* } );
}
m! { foo, bar }
"#,
expect![[r#"
macro_rules! m {
($($i:ident),*) => ( impl Bar { $(fn $i() {})* } );
}
impl Bar {
fn foo() {}
fn bar()... | rust_cleaned_test_functions.jsonl/85205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
6288,
21260,
6615,
45233,
56535,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
699,
72,
25,
1713,
701,
3764,
589,
320,
11605,
4716,
314,
4930,
8822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optional_type_faulty() {
let spec = "input in: Int8\noutput out: Int8? := in";
assert_eq!(1, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74644,
1819,
70097,
88,
368,
341,
286,
1077,
1398,
284,
330,
1355,
304,
25,
1333,
23,
1699,
3006,
700,
25,
1333,
23,
30,
1669,
304,
876,
286,
2060,
10714,
10297,
16,
11,
1629,
1819,
20196,
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 |
#[test]
fn test_addresses() {
match ::parser::rfc3501::address(b"(\"John Klensin\" NIL \"KLENSIN\" \"MIT.EDU\") ") {
Ok((_, _address)) => {},
rsp @ _ => panic!("unexpected response {:?}", rsp)
}
} | rust_cleaned_test_functions.jsonl/60840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59471,
368,
341,
286,
2432,
3504,
9657,
486,
8052,
66,
18,
20,
15,
16,
486,
4995,
1883,
29209,
2105,
13079,
27941,
724,
258,
2105,
64147,
7245,
42,
867,
2448,
687,
2105,
7245,
18330,
13,
1479,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_block_type_or() {
let mut container = [0u8; constants::MIN_ORDER_SIZE];
container[0] = 0x20;
let block = Block::new(&container[..], 0);
assert_eq!(block.block_type_or().unwrap(), BlockType::Header);
let mut container = [0u8; constants::MIN_ORDER_SIZE];
... | rust_cleaned_test_functions.jsonl/100144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
1819,
8734,
368,
341,
286,
1077,
5206,
5476,
284,
508,
15,
84,
23,
26,
18021,
486,
16413,
26677,
4098,
935,
286,
5476,
58,
15,
60,
284,
220,
15,
87,
17,
15,
280,
286,
1077,
2504,
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_pitch_only() {
let (yaw, pitch) = yaw_and_pitch_from_vector(&Vector3::new(0.0, 1.0, 0.0));
assert_relative_eq!(yaw, 0.0);
assert_relative_eq!(pitch, f32::pi() / 2.0);
let (yaw, pitch) = yaw_and_pitch_from_vector(&Vector3::new(0.0, -1.0, 0.0));
assert_rela... | rust_cleaned_test_functions.jsonl/106183 | {
"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,
51959,
18410,
368,
341,
286,
1077,
320,
98586,
11,
9649,
8,
284,
45672,
8378,
51959,
5673,
12247,
2099,
3781,
18,
486,
931,
7,
15,
13,
15,
11,
220,
16,
13,
15,
11,
220,
15,
13,
15,
1106,
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_field_type_from_i32() {
for ft in field_types() {
assert_eq!(FieldTypeTp::from_i32(ft as i32), Some(ft));
}
let fail_cases = vec![-1, -42, i32::MIN, i32::MAX, 17, 42, 0xf4, 0x100];
for fail_case in fail_cases {
assert_eq!(FieldTypeTp::fro... | rust_cleaned_test_functions.jsonl/119552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
1819,
5673,
5318,
18,
17,
368,
341,
286,
369,
10482,
304,
2070,
9763,
368,
341,
310,
2060,
10714,
10297,
63733,
62241,
486,
1499,
5318,
18,
17,
63106,
438,
600,
18,
17,
701,
4329,
63106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.