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_validate_signature_with_header_jwt_hs256() {
let secret = "secret".to_string();
let jwt = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyaWQiOiJDUklTUCIsImdyb3VwIjoiQVRJIiwicmVzb3VyY2VzIjpbXX0.K9nfZnbMzF1-P1zXEQHeYYUz35NTbTPpT560wNG16DM".to_string();
let maybe_res = validate_... | rust_cleaned_test_functions.jsonl/51723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
39859,
6615,
8757,
95576,
85956,
17,
20,
21,
368,
341,
981,
1077,
6234,
284,
330,
20474,
3263,
983,
3904,
543,
981,
1077,
24589,
284,
330,
84609,
49039,
38,
5855,
81096,
45064,
52,
89,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_inplace() {
Python::with_gil(|py| {
let v = vec!["foo", "bar"];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
let rep_seq = seq.in_place_repeat(3).unwrap();
assert_eq!(6, seq.len().unwrap());
... | rust_cleaned_test_functions.jsonl/70327 | {
"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,
14486,
1243,
2007,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
284,
7486,
0,
1183,
7975,
497,
330,
2257,
6332,
310,
1077,
1508,
284,
348,
2389,
5314,
46827,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsing() {
assert_eq!(skip_next("[test]", '['), Some("test]"));
assert_eq!(take_until("one/two", '/'), ("one", "/two"));
assert_eq!(take_and_skip("one/two", '/'), Some(("one", "two")));
} | rust_cleaned_test_functions.jsonl/44006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
620,
28598,
368,
341,
262,
2060,
10714,
10297,
20599,
11257,
10937,
1944,
19076,
48290,
701,
4329,
445,
1944,
60,
4010,
262,
2060,
10714,
10297,
22769,
44352,
445,
603,
5523,
1126,
497,
3353,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remote_included() {
let opt = Default::default();
let m = mount_info("ext4", "/mnt/foo", true, false);
assert!(is_included(&m, &opt));
} | rust_cleaned_test_functions.jsonl/7065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36425,
1243,
10181,
368,
341,
310,
1077,
3387,
284,
7899,
486,
2258,
543,
310,
1077,
296,
284,
6470,
3109,
445,
427,
19,
497,
3521,
40882,
60555,
497,
830,
11,
895,
317,
310,
2060,
10297,
285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_statsd_client_as_metered() {
let client: Box<dyn Metered<u64>> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.meter("some.meter", 9).unwrap();
} | rust_cleaned_test_functions.jsonl/10619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
11898,
79338,
291,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
52539,
291,
34837,
21,
19,
2452,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
51567,
445,
11849,
497,
451,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_insert_character() {
let querier = new_valid_db("insert_character.db");
let inserted = querier.insert_character(models::Character {
name: String::from("Test_Character_Insert"),
components: Some(String::from("{ \"interactable\": true }")),
});
... | rust_cleaned_test_functions.jsonl/107695 | {
"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,
17678,
40988,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
4208,
40988,
7076,
3071,
286,
1077,
21578,
284,
29134,
1268,
7030,
40988,
20289,
486,
12404,
341,
310,
829,
25,
923,
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_special_cases() {
cov_mark::check!(useless_type_special_case);
check_assist(
generate_getter,
r#"
struct S { foo: $0String }
"#,
r#"
struct S { foo: String }
impl S {
/// Get a reference to the s's foo.
fn $0foo(&self) -> &str {
... | rust_cleaned_test_functions.jsonl/127258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41629,
41427,
368,
341,
286,
21836,
18924,
486,
2028,
10297,
810,
1717,
1819,
41629,
19096,
317,
286,
1779,
12083,
380,
1006,
310,
6923,
3062,
465,
345,
310,
435,
2,
698,
1235,
328,
314,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_root_module_gen_code() {
let root = from_protos(protos());
assert_eq!(
root.gen_code(),
r###"pub mod a { #[cfg(any(feature = "a",))]
include_proto!("a");
}
pub mod b { #[cfg(any(feature = "a",feature = "b",))]
include_proto!("b");
}
pub mod c { #[cfg(a... | rust_cleaned_test_functions.jsonl/8979 | {
"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,
12993,
10750,
16322,
4136,
368,
341,
286,
1077,
3704,
284,
504,
22357,
436,
7,
4391,
436,
1423,
286,
2060,
10714,
33673,
310,
3704,
22822,
4136,
3148,
310,
435,
14374,
1,
9585,
1463,
264,
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... | 1 |
#[test]
fn test_doc_hidden_filtering() {
check(
r#"
//- /lib.rs crate:lib deps:dep
fn foo(a: dep::A) { a.$0 }
//- /dep.rs crate:dep
pub struct A {
#[doc(hidden)]
pub hidden_field: u32,
pub pub_field: u32,
}
impl A {
pub fn pub_method(&self) {}
#[doc(hidden)]
pub fn ... | rust_cleaned_test_functions.jsonl/76772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
26739,
8727,
287,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
17717,
25,
2740,
48178,
25,
14891,
198,
8822,
15229,
2877,
25,
2170,
486,
32,
8,
314,
264,
2418,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_secret_key() {
// Take the lock so changing the environment doesn't cause races.
let _env_lock = ENV_LOCK.lock().unwrap();
env::remove_var(CONFIG_ENV);
assert!(RocketConfig::parse(r#"
[dev]
secret_key = true
"#.to_string(), TES... | rust_cleaned_test_functions.jsonl/35251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
21962,
3097,
368,
341,
286,
442,
11778,
279,
5296,
773,
10018,
279,
4573,
3171,
944,
5240,
20588,
624,
286,
1077,
716,
3160,
9818,
284,
32791,
27661,
21003,
1005,
15454,
543,
286,
6105,
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_insert_geo_distance() {
let value: Document = serde_json::from_str(
r#"{
"_geo": {
"lat": 50.629973371633746,
"lng": 3.0569447399419567
},
"city": "Lille",
"id": "1"
}"#,
... | rust_cleaned_test_functions.jsonl/60016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
60308,
19464,
368,
341,
286,
1077,
897,
25,
11789,
284,
61570,
9455,
486,
1499,
2895,
1006,
310,
435,
55543,
515,
1060,
9000,
13052,
788,
341,
394,
330,
5524,
788,
220,
20,
15,
13,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_register() {
let result = register(CompleteStr("$0"));
assert_eq!(result.is_ok(), true);
let result = register(CompleteStr("0"));
assert_eq!(result.is_ok(), false);
let result = register(CompleteStr("$a"));
assert_eq!(result.is_ok(), false);
... | rust_cleaned_test_functions.jsonl/15341 | {
"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,
21039,
14000,
368,
341,
286,
1077,
1102,
284,
4161,
7,
12548,
2580,
20912,
15,
4010,
286,
2060,
10714,
10297,
1382,
2079,
19817,
1507,
830,
317,
286,
1077,
1102,
284,
4161,
7,
12548,
2580,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_storage_apply_snapshot() {
let ents = vec![
new_entry(3, 3),
new_entry(4, 4),
new_entry(5, 5),
new_entry(6, 6),
];
let mut cs = ConfState::default();
cs.set_nodes(vec![1, 2, 3]);
let td1 = Builder::new().pre... | rust_cleaned_test_functions.jsonl/38622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1663
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
36551,
53265,
368,
341,
286,
1077,
36852,
284,
7486,
90515,
310,
501,
9078,
7,
18,
11,
220,
18,
1326,
310,
501,
9078,
7,
19,
11,
220,
19,
1326,
310,
501,
9078,
7,
20,
11,
220,
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... | 2 |
#[test]
fn test_version_long() {
let oup = exec_target(TARGET_EXE_PATH, &["--version", "inp"]);
assert_eq!(oup.status.success(), true);
assert_eq!(&oup.stdout[0..13], "Version:0.1.1");
assert_eq!(oup.stderr, "");
} | rust_cleaned_test_functions.jsonl/79973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
17799,
368,
341,
262,
1077,
5908,
79,
284,
3883,
11123,
4140,
16474,
4966,
36,
7944,
11,
609,
1183,
313,
4366,
497,
330,
42092,
15049,
262,
2060,
10714,
10297,
13346,
4299,
15426,
1507,
830,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_md2() {
// A.5 Test suite
assert_eq!(&md2(""),
&hex::decode("8350e5a3e24c153df2275c9f80692773").unwrap()[..]);
assert_eq!(&md2("a"),
&hex::decode("32ec01ec4a6dac72c0ab96fb34c0b5d1").unwrap()[..]);
assert_eq!(&md2("abc"),
&hex::decode("da853b0d3f88d99b... | rust_cleaned_test_functions.jsonl/63308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32994,
17,
368,
341,
262,
442,
362,
13,
20,
3393,
16182,
7213,
262,
2060,
10714,
0,
2099,
2277,
17,
445,
4461,
286,
609,
17308,
486,
18196,
445,
23,
18,
20,
15,
68,
20,
64,
18,
68,
17,
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_create_tx_with_custom_rbf_csv() {
let (wallet, _, _) = get_funded_wallet(get_test_single_sig_csv());
let addr = wallet.get_new_address().unwrap();
wallet
.create_tx(
TxBuilder::with_recipients(vec![(addr.script_pubkey(), 25_000)])
... | rust_cleaned_test_functions.jsonl/11319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
6615,
15875,
1710,
13233,
14020,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
19487,
29252,
14020,
1423,
286,
1077,
10789,
284,
15085,
670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let a = Jacobian::from(Affine::new(
FieldElement::from(u256h!(
"01ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca"
)),
FieldElement::from(u256h!(
"005668060aa49730b7be4801df46ec62de53ecd11abe43a328... | rust_cleaned_test_functions.jsonl/74018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 684
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
1077,
264,
284,
24521,
1103,
486,
1499,
4346,
542,
482,
486,
931,
1006,
310,
8601,
1691,
486,
1499,
8154,
17,
20,
21,
71,
33673,
394,
330,
15,
16,
823,
16,
20,
66,
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_process_new_vote_state_expired_ancestor_not_removed() {
// Construct on-chain vote state
let mut vote_state1 = VoteState::default();
vote_state1.process_slot_votes_unchecked(&[1, 2, 3, 9]);
assert_eq!(
vote_state1
.votes
... | rust_cleaned_test_functions.jsonl/6128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
5921,
54360,
4387,
80221,
62,
66878,
7913,
68248,
368,
341,
286,
442,
18678,
389,
65186,
6910,
1584,
198,
286,
1077,
5206,
6910,
4387,
16,
284,
34034,
1397,
486,
2258,
543,
286,
6910,
4387,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_c_call_r() {
fn cxx_run_test() {
extern "C" {
fn cxx_run_test() -> *const i8;
}
let failure = unsafe { cxx_run_test() };
if !failure.is_null() {
let msg = unsafe { CStr::from_ptr(failure as *mut std::os::raw::c_char) };
epri... | rust_cleaned_test_functions.jsonl/50899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
13429,
1710,
368,
341,
262,
5168,
272,
4146,
14007,
4452,
368,
341,
286,
15637,
330,
34,
1,
341,
310,
5168,
272,
4146,
14007,
4452,
368,
1464,
353,
1024,
600,
23,
280,
286,
456,
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_simple_add() {
assert_eq!((b(0) + b(0)).round_u128(), 0);
assert_eq!((b(5) + b(2)).round_u128(), 7);
assert_eq!((b(2) + b(5)).round_u128(), 7);
assert_eq!((b(5) + b(0)).round_u128(), 5);
assert_eq!((b(0) + b(5)).round_u128(), 5);
} | rust_cleaned_test_functions.jsonl/57390 | {
"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,
30015,
2891,
368,
341,
286,
2060,
10714,
0,
1188,
65,
7,
15,
8,
488,
293,
7,
15,
4579,
1049,
7300,
16,
17,
23,
1507,
220,
15,
317,
286,
2060,
10714,
0,
1188,
65,
7,
20,
8,
488,
293,
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_set() {
let mut bitmap = MutableBitmap::from_len_zeroed(12);
bitmap.set(0, true);
assert!(bitmap.get(0));
bitmap.set(0, false);
assert!(!bitmap.get(0));
bitmap.set(11, true);
assert!(bitmap.get(11));
bitmap.set(11, false);
... | rust_cleaned_test_functions.jsonl/64523 | {
"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,
2602,
368,
341,
286,
1077,
5206,
19746,
284,
31143,
16773,
486,
1499,
6043,
19359,
291,
7,
16,
17,
317,
286,
19746,
980,
7,
15,
11,
830,
317,
286,
2060,
10297,
40954,
670,
7,
15,
1106,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_from() {
let vec: &[_] = &[1, 2, 3, 4];
assert_eq!(&vec[..], vec);
let b: &[_] = &[3, 4];
assert_eq!(&vec[2..], b);
let b: &[_] = &[];
assert_eq!(&vec[4..], b);
} | rust_cleaned_test_functions.jsonl/12857 | {
"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,
26488,
5673,
368,
341,
262,
1077,
7486,
25,
609,
13496,
60,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
2060,
10714,
0,
2099,
4083,
95874,
1125,
7486,
317,
262,
1077,
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_stream_batch_row_limit() {
let data = vec![
(1, Some("name:0"), 2),
(2, Some("name:4"), 3),
(4, Some("name:3"), 1),
(5, Some("name:1"), 4),
(8, Some("name:2"), 4),
];
let product = ProductTable::new();
let stream_row_limit = 2;
let (_,... | rust_cleaned_test_functions.jsonl/47089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
14534,
8530,
14763,
368,
341,
262,
1077,
821,
284,
7486,
90515,
286,
320,
16,
11,
4329,
445,
606,
25,
15,
3975,
220,
17,
1326,
286,
320,
17,
11,
4329,
445,
606,
25,
19,
3975,
220,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_encode_float() {
let config = Config::new_empty();
let mut buffer = Buffer::new();
let value = Value::Float(12345.123);
td_rp::encode_field(&mut buffer, &config, &value).unwrap();
td_rp::encode_field(&mut buffer, &config, &value).unwrap();
// first read field
test_he... | rust_cleaned_test_functions.jsonl/121845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
17586,
368,
341,
262,
1077,
2193,
284,
5532,
486,
931,
15124,
543,
262,
1077,
5206,
4147,
284,
10312,
486,
931,
543,
262,
1077,
897,
284,
5162,
486,
5442,
7,
16,
17,
18,
19,
20,
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... | 2 |
#[test]
fn test_flatten_end() {
let segment = CubicBezierSegment {
from: Point::new(0.0, 0.0),
ctrl1: Point::new(100.0, 0.0),
ctrl2: Point::new(100.0, 100.0),
to: Point::new(100.0, 200.0),
};
let mut last = segment.from;
segment.for_each_flattened(0.0001, &mut |p... | rust_cleaned_test_functions.jsonl/49784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
14456,
6213,
368,
341,
262,
1077,
10238,
284,
18030,
292,
95050,
21086,
341,
286,
504,
25,
5126,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
286,
23743,
16,
25,
5126,
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_keysend_msg_with_secret_err() {
// Test that we error as expected if we receive a keysend payment that includes a payment secret.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None,... | rust_cleaned_test_functions.jsonl/94569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 852
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
6681,
6483,
6615,
21962,
9266,
368,
341,
197,
197,
322,
3393,
429,
582,
1465,
438,
3601,
421,
582,
5258,
264,
1376,
6681,
8160,
429,
5646,
264,
8160,
6234,
624,
197,
10217,
26023,
1645,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vincenty_distance_1() {
let a = Point::<f64>::new(17.072561, 48.154563);
let b = Point::<f64>::new(17.072562, 48.154564);
assert_relative_eq!(
a.vincenty_distance(&b).unwrap(),
0.13378944117648012,
epsilon = 1.0e-6
);
} | rust_cleaned_test_functions.jsonl/15215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
258,
1168,
88,
19464,
62,
16,
368,
341,
286,
1077,
264,
284,
5126,
27638,
69,
21,
19,
6831,
931,
7,
16,
22,
13,
15,
22,
17,
20,
21,
16,
11,
220,
19,
23,
13,
16,
20,
19,
20,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_requested_attrs_constructed_correctly_for_names() {
let _setup = SetupDefaults::init();
let attr_info = json!({
"names": ["name", "age", "email"],
"restrictions": [{"schema_id": "6XFh8yBzrpJQmNyZzgoTqB:2:schema_name:0.0.11"}]
});
let attr_info... | rust_cleaned_test_functions.jsonl/65276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72709,
39578,
64803,
291,
31550,
398,
5478,
9187,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16273,
486,
2327,
1428,
286,
1077,
6376,
3109,
284,
2951,
0,
2262,
688,
330,
11400,
788,
4383,
606,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_number() {
assert_eq!(Parser::from_reader("0".as_bytes()).next().unwrap().unwrap(),
Event::Number(N::Uint(0)));
assert_eq!(Parser::from_reader("10".as_bytes()).next().unwrap().unwrap(),
Event::Number(N::Uint(10)));
assert_eq!(Parser::from_reader("-10".as... | rust_cleaned_test_functions.jsonl/12578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 979
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5500,
368,
341,
262,
2060,
10714,
10297,
6570,
486,
1499,
22306,
445,
15,
3263,
300,
12524,
6011,
3600,
1005,
15454,
1005,
15454,
3148,
2290,
3665,
486,
2833,
8204,
486,
21570,
7,
15,
4945,
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_get_str_by_up() {
let cxx = indoc! {"
std::unique_ptr<std::string> get_str() {
return std::make_unique<std::string>(\"hello\");
}
"};
let hdr = indoc! {"
#include <string>
#include <memory>
std::unique_ptr<std::string> get_str();
"}... | rust_cleaned_test_functions.jsonl/9748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2895,
3710,
8237,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
262,
1460,
486,
9587,
4348,
8050,
486,
917,
29,
633,
2895,
368,
341,
310,
470,
1460,
486,
6927,
21218,
8050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_cannot_be_a_base_urls() {
assert!(ident(&url("github.com:PistonDevelopers/piston")).is_err());
assert!(ident(&url("google.com:PistonDevelopers/piston")).is_err());
} | rust_cleaned_test_functions.jsonl/21286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
666,
3401,
21263,
4306,
7651,
32822,
368,
341,
286,
2060,
10297,
1713,
2099,
1085,
445,
5204,
905,
92411,
58819,
20444,
388,
4322,
58819,
15197,
285,
9266,
1423,
286,
2060,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_y_candidates() {
let y_range = RangeInclusive::new(-10, -5);
let y_candidates = possible_y_velocities(&y_range);
assert_eq!(y_candidates[&7], (2, 3));
assert_eq!(y_candidates[&9], (3, 6));
assert_eq!(y_candidates[&10], (4, 10));
assert_eq!(y_candi... | rust_cleaned_test_functions.jsonl/95806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4178,
73553,
368,
341,
286,
1077,
379,
9698,
284,
16437,
641,
8336,
486,
931,
4080,
16,
15,
11,
481,
20,
317,
286,
1077,
379,
73553,
284,
3204,
4178,
34504,
80449,
2099,
88,
9698,
626,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type() {
let input = buffer(r#"(@interface type (func (param i32 i32) (result i32)))"#);
let output = Interface::Type(Type {
inputs: vec![InterfaceType::I32, InterfaceType::I32],
outputs: vec![InterfaceType::I32],
});
assert_eq!(parser::pa... | rust_cleaned_test_functions.jsonl/102972 | {
"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,
1819,
368,
341,
286,
1077,
1946,
284,
4147,
2601,
55543,
5957,
4970,
943,
320,
2830,
320,
903,
600,
18,
17,
600,
18,
17,
8,
320,
1382,
600,
18,
17,
7705,
57676,
317,
286,
1077,
2550,
284,
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_range_min() {
assert_eq!((0..20).min(), Some(0));
assert_eq!((-20..0).min(), Some(-20));
assert_eq!((5..5).min(), None);
} | rust_cleaned_test_functions.jsonl/54161 | {
"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,
9698,
7260,
368,
341,
262,
2060,
10714,
0,
1188,
15,
496,
17,
15,
568,
1065,
1507,
4329,
7,
15,
1106,
262,
2060,
10714,
0,
54934,
17,
15,
496,
15,
568,
1065,
1507,
4329,
4080,
17,
15,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_adding_ip_to_farm_works() {
ExternalityBuilder::build().execute_with(|| {
create_entity();
create_twin();
create_farm();
assert_ok!(TfgridModule::add_farm_ip(
Origin::signed(alice()),
1,
"1.1.1.2".as_bytes().to_vec(),
... | rust_cleaned_test_functions.jsonl/35357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
287,
10385,
2346,
761,
2178,
11498,
82,
368,
341,
262,
1374,
4160,
2719,
3297,
486,
5834,
1005,
10257,
6615,
79453,
341,
286,
1855,
19169,
543,
286,
1855,
528,
7526,
543,
286,
1855,
761,
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_mixed() -> Result<()> {
let fixture = rc().append_fixture_trace(
r#"
git init origin
origin <<EOF
git config user.name "Origin Test"
git config user.email "origin@test"
echo "Hello World!" > README.md
git add README.md
... | rust_cleaned_test_functions.jsonl/97317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
3286,
368,
1464,
5714,
71698,
341,
262,
1077,
12507,
284,
10192,
1005,
5090,
74409,
23575,
1006,
286,
435,
2,
698,
286,
16345,
2930,
6238,
198,
286,
6238,
1115,
23483,
198,
310,
16345,
2193,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_drop_on_notify() {
// task that holds the associated socket. If this notification results in
// that same lock in order to clean up state.
// the task is notified. This simulates an executor in the process of
// dropped.
let mut reacto... | rust_cleaned_test_functions.jsonl/706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
4470,
36654,
368,
341,
1066,
262,
442,
3383,
429,
9982,
279,
5815,
7575,
13,
1416,
419,
11540,
3059,
304,
7213,
41693,
262,
442,
429,
1852,
5296,
304,
1973,
311,
4240,
705,
1584,
624,
940... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cowrc_clone_weak() {
{
let mut cow0 = Cc::new(75);
let cow1_weak = cow0.downgrade();
assert!(75 == *cow0);
assert!(75 == *cow1_weak.upgrade().unwrap());
*cow0.make_unique() += 1;
assert!(76 == *cow0);
... | rust_cleaned_test_functions.jsonl/110854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
363,
1287,
54742,
86356,
368,
341,
286,
341,
310,
1077,
5206,
19362,
15,
284,
356,
66,
486,
931,
7,
22,
20,
317,
310,
1077,
19362,
16,
86356,
284,
19362,
15,
18148,
6937,
1428,
310,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_account_with_seed() {
let TestValidator {
server,
leader_data,
alice: mint_keypair,
ledger_path,
..
} = TestValidator::run_with_options(TestValidatorOptions {
fees: 1,
bootstrap_validator_lamports: 42_000,
..TestValid... | rust_cleaned_test_functions.jsonl/77782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1980
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
13500,
6615,
33809,
368,
341,
262,
1077,
3393,
14256,
341,
286,
3538,
345,
286,
7653,
1769,
345,
286,
70433,
25,
28337,
3097,
12670,
345,
286,
46933,
2638,
345,
286,
54538,
262,
335,
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_install_help() {
let (_, mut ucmd) = at_and_ucmd!();
ucmd.arg("--help")
.succeeds()
.no_stderr()
.stdout_contains("FLAGS:");
} | rust_cleaned_test_functions.jsonl/47011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
26926,
368,
341,
262,
1077,
39464,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
575,
8710,
21186,
21549,
8653,
1138,
286,
659,
82,
29264,
82,
741,
286,
659,
2152,
93033,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_indexes_and_variables() {
let p = Point2::new(1, 2);
assert_eq!(p[0], p.x);
assert_eq!(p[1], p.y);
} | rust_cleaned_test_functions.jsonl/4545 | {
"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,
50161,
8378,
28182,
368,
341,
286,
1077,
281,
284,
5126,
17,
486,
931,
7,
16,
11,
220,
17,
626,
286,
2060,
10714,
10297,
79,
58,
15,
1125,
281,
1993,
317,
286,
2060,
10714,
10297,
79,
58,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rotate_grandchildren() {
let (shapes, mut bvh) = create_predictable_bvh();
// Switch two nodes.
bvh.rotate(3, 5, &shapes);
// Check if the resulting tree is as expected.
let BVH { nodes } = bvh;
assert_eq!(nodes[0].parent(), 0);
assert_e... | rust_cleaned_test_functions.jsonl/90326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 687
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
15682,
437,
5864,
368,
341,
286,
1077,
320,
92059,
11,
5206,
293,
29919,
8,
284,
1855,
26815,
480,
880,
29919,
1428,
286,
442,
15586,
1378,
7798,
624,
286,
293,
29919,
35944,
7,
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... | 1 |
#[test]
fn test_rpc_get_cluster_nodes() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let RpcHandler {
io,
meta,
leader_pubkey,
..
} = start_rpc_handler_with_tx(&bob_pubkey);
let req = r#"{"jsonrpc":"2.0","id":1,"method":"getC... | rust_cleaned_test_functions.jsonl/3017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
28441,
14896,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
341,
310,
6399,
345,
310,
8823,
345,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_unsigned_limits() {
assert_eq!(
extract_unsigned(cbor_unsigned!(std::u64::MAX)),
Ok(std::u64::MAX)
);
assert_eq!(
extract_unsigned(cbor_unsigned!((std::i64::MAX as u64) + 1)),
Ok((std::i64::MAX as u64) + 1)
)... | rust_cleaned_test_functions.jsonl/48991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
67830,
31820,
368,
341,
286,
2060,
10714,
33673,
310,
8649,
67830,
1337,
9368,
67830,
10297,
1834,
486,
84,
21,
19,
486,
10586,
6965,
310,
7622,
5194,
486,
84,
21,
19,
486,
10586,
340,
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_alice29() {
assert_decompressed_input_matches_output(ALICE29_BR, ALICE29, 65536, 65536);
} | rust_cleaned_test_functions.jsonl/26426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 52
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8418,
558,
17,
24,
368,
341,
220,
2060,
2259,
45703,
5898,
38344,
7645,
46232,
5487,
17,
24,
26543,
11,
8753,
5487,
17,
24,
11,
220,
21,
20,
20,
18,
21,
11,
220,
21,
20,
20,
18,
21,
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 |
#[test]
fn test_dispatch_table_ptrs_mut_none() {
let signatures = &[];
let fn_ptrs = &mut [];
let mut dispatch_table = fake_dispatch_table(signatures, fn_ptrs);
assert_eq!(dispatch_table.ptrs_mut().len(), 0);
} | rust_cleaned_test_functions.jsonl/47219 | {
"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,
42991,
5237,
79533,
29523,
31488,
368,
341,
286,
1077,
32628,
284,
609,
15078,
286,
1077,
5168,
79533,
284,
609,
6984,
5907,
286,
1077,
5206,
6845,
5237,
284,
12418,
42991,
5237,
40046,
2789,
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 |
#[test]
fn test_pd_cfg() {
let mut cfg = Config::default();
// endpoints is required.
cfg.validate().unwrap_err();
cfg.endpoints = vec!["127.0.0.1:2333".to_owned()];
cfg.validate().unwrap();
} | rust_cleaned_test_functions.jsonl/51868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31322,
18343,
368,
341,
286,
1077,
5206,
13286,
284,
5532,
486,
2258,
543,
286,
442,
36342,
374,
2567,
624,
286,
13286,
19520,
1005,
15454,
9266,
543,
286,
13286,
5073,
7706,
284,
7486,
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_account_checked_add_tocks_overflow2() {
let key = Pubkey::new_unique();
let (_account1, mut account2) = make_two_accounts(&key);
account2.checked_add_tocks(u64::MAX).unwrap();
} | rust_cleaned_test_functions.jsonl/56006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
56456,
2891,
528,
25183,
79073,
17,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5453,
4608,
16,
11,
5206,
2692,
17,
8,
284,
1281,
23241,
55665,
2099,
792,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_braces() {
let input = "echo {c[a,b],d}";
let expected = vec![
WordToken::Normal("echo".into(), false, false),
WordToken::Whitespace(" "),
WordToken::Brace(vec!["c[a,b]", "d"]),
];
compare(input, expected);
} | rust_cleaned_test_functions.jsonl/33794 | {
"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,
17682,
2434,
368,
341,
262,
1077,
1946,
284,
330,
3047,
314,
66,
15481,
8402,
1125,
67,
26259,
262,
1077,
3601,
284,
7486,
90515,
286,
9322,
3323,
486,
12206,
445,
3047,
3263,
18122,
1507,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
assert_eq!(fold_(range(0, 0)
.map(|_| Ok::<(), ()>(()))),
Ok(()));
assert_eq!(fold(range(0, 3)
.map(|x| Ok::<int, ()>(x)),
0, |a, b| a + b),
Ok(3));
asse... | rust_cleaned_test_functions.jsonl/6933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
368,
341,
286,
2060,
10714,
10297,
19961,
8361,
9669,
7,
15,
11,
220,
15,
340,
664,
659,
2186,
22428,
35395,
7622,
27638,
1507,
1719,
2235,
10131,
1326,
4293,
7622,
5065,
1106,
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... | 5 |
#[test]
fn test_from_tle() -> Result<()> {
let elements = Elements::from_tle(
Some("ISS (ZARYA)".to_owned()),
"1 25544U 98067A 08264.51782528 -.00002182 00000-0 -11606-4 0 2927".as_bytes(),
"2 25544 51.6416 247.4627 0006703 130.5360 325.0288 15.72125391563537".as... | rust_cleaned_test_functions.jsonl/74833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1821
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
528,
273,
368,
1464,
5714,
71698,
341,
286,
1077,
5424,
284,
34157,
486,
1499,
528,
273,
1006,
310,
4329,
445,
30849,
320,
57,
8642,
32,
94010,
983,
51973,
14702,
310,
330,
16,
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... | 4 |
#[test]
fn test_realtime_activation_condition() {
let spec = "output a: Int32 @10Hz := 0\noutput b: Int32 @5Hz := 0\noutput x := a+b";
let type_table = type_check(spec);
// node ids can be verified using `rtlola-analyze spec.lola ast`
// output `a` has NodeId = 6
let _a_i... | rust_cleaned_test_functions.jsonl/110719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
1678,
52404,
27656,
368,
341,
286,
1077,
1398,
284,
330,
3006,
264,
25,
1333,
18,
17,
569,
16,
15,
11475,
1669,
220,
15,
1699,
3006,
293,
25,
1333,
18,
17,
569,
20,
11475,
1669,
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_encode_treemap() -> Result<(), Error> {
let mut v1 = MapHolder::default();
v1.values.insert(1, vec![0, 2]);
v1.values.insert(5, vec![1]);
let mut src = vec![];
v1.encode(&mut src, 0)?;
assert_eq!(src.len(), 30);
let v2 = MapHolder::decode_from(&mut Cursor::new(src),... | rust_cleaned_test_functions.jsonl/125322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
528,
265,
42040,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
5206,
348,
16,
284,
5027,
8589,
486,
2258,
543,
262,
348,
16,
10656,
7030,
7,
16,
11,
7486,
20703,
15,
11,
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... | 3 |
#[test]
fn test_constant_folding_binops() {
let expr = parse("4+2").constant_fold();
check_literal(expr, 6.);
let expr = parse("4-2").constant_fold();
check_literal(expr, 2.);
let expr = parse("4*2").constant_fold();
check_literal(expr, 8.);
let expr = ... | rust_cleaned_test_functions.jsonl/553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34967,
761,
14995,
21816,
3721,
368,
341,
286,
1077,
15169,
284,
4715,
445,
19,
10,
17,
1827,
18077,
61187,
543,
286,
1779,
34100,
34322,
11,
220,
21,
13,
626,
286,
1077,
15169,
284,
4715,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_writer_properties_dictionary_encoding() {
// writer version 1 and 2.
for version in vec![WriterVersion::PARQUET_1_0, WriterVersion::PARQUET_2_0] {
let props = WriterProperties::builder()
.set_writer_version(version)
.build();
... | rust_cleaned_test_functions.jsonl/56723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
25158,
42605,
37613,
368,
341,
1789,
286,
442,
6916,
2319,
220,
16,
323,
220,
17,
624,
286,
369,
2319,
304,
7486,
20703,
6492,
5637,
486,
16567,
5757,
1348,
62,
16,
62,
15,
11,
29404,
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... | 2 |
#[test]
fn test_parse_coinbase_transaction_input() {
let raw_input = sample_coinbase_transaction_input();
let input_bytes = hex::decode(&raw_input).unwrap();
let mut parser = BytesParser::new(&input_bytes);
let input: TransactionInput = parser.parse_with(2).unwrap();
asse... | rust_cleaned_test_functions.jsonl/132188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
75718,
3152,
28884,
5898,
368,
341,
286,
1077,
7112,
5898,
284,
6077,
75718,
3152,
28884,
5898,
543,
286,
1077,
1946,
12524,
284,
12371,
486,
18196,
2099,
1041,
5898,
568,
15454,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ok() {
xx_eq!(
"The cat sat in the hat",
"[csh].. [csh].. in",
concat!(
"The ",
color_start!(),
"cat sat in",
color_end!(),
" the hat",
"\n",
)
... | rust_cleaned_test_functions.jsonl/62178 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 747
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19817,
368,
341,
286,
20908,
10714,
33673,
310,
330,
785,
8251,
7578,
304,
279,
8896,
756,
310,
10545,
66,
927,
60,
496,
508,
66,
927,
60,
496,
304,
756,
310,
33720,
33673,
394,
330,
785,
2179... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_system_name() {
#[super::system(dynec_as(crate))]
fn simulate(
#[dynec(local = 0)] counter_one: &mut u16,
#[dynec(param)] counter_two: &mut i64,
) {
*counter_one += 1u16;
*counter_two += 3i64;
}
let system =... | rust_cleaned_test_functions.jsonl/103065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17687,
1269,
368,
341,
286,
11506,
9522,
486,
8948,
1500,
73930,
11898,
54907,
22297,
286,
5168,
37453,
1006,
310,
11506,
43085,
757,
18082,
284,
220,
15,
7252,
5546,
11667,
25,
609,
6984,
575,
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_generic_params() {
use super::group_hash::BlakeHasher;
let params = AltJubjubBn256::new();
let generic_params = AltJubjubBn256::new_with_hasher::<BlakeHasher>();
assert!(params.pedersen_hash_generators == generic_params.pedersen_hash_generators);
assert!(params.fixed_base_g... | rust_cleaned_test_functions.jsonl/51607 | {
"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,
41232,
6745,
368,
341,
262,
990,
2256,
486,
4074,
8950,
486,
91038,
6370,
261,
401,
262,
1077,
3628,
284,
23682,
41,
392,
73,
392,
33,
77,
17,
20,
21,
486,
931,
543,
262,
1077,
13954,
6745,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_incomplete() {
let mut dec = MultiResponseDecoder::<TO>::new();
{
let mut stream = dec.process_next_chunk(b"{");
assert!(stream.next().is_none());
}
assert_eq!(dec.finish().unwrap_err(), b"{");
} | rust_cleaned_test_functions.jsonl/14557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
14737,
368,
341,
286,
1077,
5206,
1622,
284,
17439,
2582,
20732,
27638,
5207,
6831,
931,
1428,
286,
341,
310,
1077,
5206,
4269,
284,
1622,
16988,
11257,
30539,
1883,
14129,
797,
310,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_details() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
// Make sure we can execute 'fd --list-details' without any errors.
te.assert_success_and_get_output(".", &["--list-details"]);
} | rust_cleaned_test_functions.jsonl/10901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
13260,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
442,
7405,
2704,
582,
646,
9026,
364,
6902,
1177,
1607,
30433,
6,
2041,
894,
5975,
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 |
#[test]
fn test_to_flags() {
let flags = to_flags(0xF000_0000_0000_0001);
assert_eq!(1, flags.get_ref());
assert_eq!(true, flags.is_rundown_in_progress());
} | rust_cleaned_test_functions.jsonl/52968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
14130,
368,
341,
286,
1077,
8042,
284,
311,
14130,
7,
15,
9770,
15,
15,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
16,
317,
286,
2060,
10714,
10297,
16,
11,
8042,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error() {
let cols = vec!["not_exist".to_string()];
let vals = vec![Value::String {
val: "Enter".to_string(),
span: Span::test_data(),
}];
let span = Span::test_data();
let b = EventType::try_from_columns(&cols, &vals, &span);
... | rust_cleaned_test_functions.jsonl/86564 | {
"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,
4096,
368,
341,
286,
1077,
17000,
284,
7486,
0,
1183,
1921,
35906,
3263,
983,
3904,
33800,
286,
1077,
28356,
284,
7486,
20703,
1130,
486,
703,
341,
310,
1044,
25,
330,
6269,
3263,
983,
3904,
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_weighted_choice_zero_weight() {
WeightedChoice::new(&mut [Weighted { weight: 0, item: 0},
Weighted { weight: 0, item: 1}]);
} | rust_cleaned_test_functions.jsonl/100784 | {
"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,
15876,
291,
31936,
19359,
15876,
368,
341,
286,
16516,
291,
24728,
486,
931,
2099,
6984,
508,
8295,
291,
314,
4680,
25,
220,
15,
11,
1509,
25,
220,
15,
1583,
6656,
16516,
291,
314,
4680,
25,
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 |
#[test]
fn test_extended_euclid_div_steps() {
let x = 935;
let y = 1491;
let (abs, k, sts) = extended_euclidean_steps(x, y);
assert_eq!(
abs,
vec![
(935, 1491),
(556, 935),
(379, 556),
(177, 3... | rust_cleaned_test_functions.jsonl/13572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61678,
2204,
84,
75044,
16237,
22731,
368,
341,
286,
1077,
856,
284,
220,
24,
18,
20,
280,
286,
1077,
379,
284,
220,
16,
19,
24,
16,
280,
286,
1077,
320,
3435,
11,
595,
11,
51756,
8,
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_valid_cloudfront_get_invalidation() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"cloudfront-get-invalidation.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);... | rust_cleaned_test_functions.jsonl/44880 | {
"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,
37356,
6951,
3062,
1243,
12284,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
12361,
6951,
2249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_game_and_engine_data() {
let actual =
Unreal4Context::parse(&ROOT_WITH_GAME_AND_ENGINE_DATA.as_bytes()).expect("default struct");
assert_eq!(
actual
.engine_data
.get("RHI.IsGPUOverclocked")
.map(|x| x.as_str()),
Some("false... | rust_cleaned_test_functions.jsonl/28094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
18547,
8378,
24823,
1769,
368,
341,
262,
1077,
5042,
4035,
286,
79919,
19,
1972,
486,
6400,
2099,
23888,
23929,
40908,
21767,
62177,
7896,
5357,
12524,
6011,
17119,
445,
2258,
2036,
797,
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_profile() {
let cwd = env::current_dir().unwrap().to_string_lossy().into_owned();
let xd = BaseDirectories::with_env("myapp", "default_profile", &*make_env(vec![
("HOME", format!("{}/test_files/user", cwd)),
("XDG_CONFIG_HOME", format!("{}/test_files/user/config",... | rust_cleaned_test_functions.jsonl/83591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13789,
368,
341,
262,
1077,
46938,
284,
6105,
486,
3231,
4334,
1005,
15454,
1005,
983,
3904,
11193,
88,
1005,
18122,
51973,
543,
262,
1077,
79052,
284,
5351,
56397,
486,
4197,
15879,
445,
2408,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_age_increment() {
solana_logger::setup();
let bins = 4;
let test = BucketMapHolder::<u64>::new(bins, &Some(AccountsIndexConfig::default()), 1);
for age in 0..513 {
assert_eq!(test.current_age(), (age % 256) as Age);
// inc all
... | rust_cleaned_test_functions.jsonl/5425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32053,
51482,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
28518,
284,
220,
19,
280,
286,
1077,
1273,
284,
47768,
2227,
8589,
27638,
84,
21,
19,
6831,
931,
1883,
1330,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_find_in_set() {
let cases = vec![
("foo", "foo,bar", Collation::Utf8Mb4Bin, 1),
("foo", "foobar,bar", Collation::Utf8Mb4Bin, 0),
(" foo ", "foo, foo ", Collation::Utf8Mb4Bin, 2),
("", "foo,bar,", Collation::Utf8Mb4Bin, 3),
("", ... | rust_cleaned_test_functions.jsonl/60530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
1243,
2602,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
7975,
497,
330,
7975,
11,
2257,
497,
12905,
367,
486,
38980,
23,
87313,
19,
28794,
11,
220,
16,
1326,
310,
3489,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_auth_challenge() {
let cmd = ChanCmd::AUTH_CHALLENGE;
assert_eq!(Into::<u8>::into(cmd), 130_u8);
let challenge = hex!("00DA5C085DEE4F3656710DA3B73652E48ACD5BAE608335FCA3FB6C4DEE104A51");
vbody(
cmd,
"00DA5C085DEE4F3656710DA3B73652E48ACD5BAE608335FCA3FB6C4DEE104A5... | rust_cleaned_test_functions.jsonl/6026 | {
"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,
14014,
87406,
368,
341,
262,
1077,
5439,
284,
41302,
15613,
486,
26694,
6466,
88074,
36,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
220,
16,
18,
15,
7300,
23,
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_uninstall() {
setup(None, false, &|url,
toolchain,
prefix,
download_cfg,
temp_cfg| {
update_from_dist(
url,
toolchain,
prefix,
&[],
... | rust_cleaned_test_functions.jsonl/33454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
12248,
368,
341,
262,
6505,
26717,
11,
895,
11,
609,
91,
1085,
345,
5108,
5392,
8819,
345,
5108,
9252,
345,
5108,
4139,
18343,
345,
5108,
2730,
18343,
91,
341,
286,
2647,
5673,
16031,
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_async_commit_pushed_min_commit_ts() {
let engine = TestEngineBuilder::new().build().unwrap();
let cm = ConcurrencyManager::new(42.into());
// Simulate that min_commit_ts is pushed forward larger than latest_ts
must_acquire_pessimistic_lock_impl(&engine, b"key", b... | rust_cleaned_test_functions.jsonl/16093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
36346,
14218,
291,
7260,
36346,
25023,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
9961,
284,
1200,
15973,
2043,
486,
931,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bench_tps_local_cluster_solana() {
test_bench_tps_local_cluster(Config {
tx_count: 100,
duration: Duration::from_secs(10),
..Config::default()
});
} | rust_cleaned_test_functions.jsonl/6390 | {
"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,
880,
19762,
528,
1690,
13564,
28441,
53668,
3362,
368,
341,
262,
1273,
880,
19762,
528,
1690,
13564,
28441,
33687,
341,
286,
9854,
3180,
25,
220,
16,
15,
15,
345,
286,
8090,
25,
21045,
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 |
#[test]
fn test_slice_vec() {
let test_bytes: &[Option<Bytes>] = &[
None,
Some("我好菜啊".as_bytes().to_vec()),
None,
Some("我菜爆了".as_bytes().to_vec()),
Some("我失败了".as_bytes().to_vec()),
None,
Some("💩".as_bytes().to_vec()),
... | rust_cleaned_test_functions.jsonl/105136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
13251,
368,
341,
286,
1077,
1273,
12524,
25,
44590,
5341,
27,
7078,
53529,
284,
609,
9640,
310,
2240,
345,
310,
4329,
445,
35946,
52801,
99800,
103924,
3263,
300,
12524,
1005,
983,
13251,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resultify() {
let side_effect = |i, effect: &mut _| -> i32 {
*effect += 1;
return i;
};
let mut calls = 0;
let ret: Result<i32, _> = resultify!(side_effect(0, &mut calls));
assert!(match ret { Ok(0) => true, _ => false });
... | rust_cleaned_test_functions.jsonl/44098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5287,
1437,
368,
341,
286,
1077,
3108,
27125,
284,
760,
72,
11,
2456,
25,
609,
6984,
85137,
1464,
600,
18,
17,
341,
310,
353,
26061,
1421,
220,
16,
280,
310,
470,
600,
280,
286,
3634,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_parse_macro_def_rules() {
mark::check!(parse_macro_def_rules);
parse_macro2(
r#"
macro foo {
($id:ident) => {
fn $id() {}
}
}
"#,
)
.assert_expand_items("foo!(bar);", "fn bar () {}");
} | rust_cleaned_test_functions.jsonl/28727 | {
"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,
21039,
58810,
7844,
21407,
368,
341,
262,
1868,
486,
2028,
10297,
6400,
58810,
7844,
21407,
626,
262,
4715,
58810,
17,
1006,
286,
435,
2,
698,
32606,
15229,
341,
262,
1711,
307,
25,
1713,
8,
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_check_fail() {
let mut perms = Permissions {
read: Permissions::new_read(&None, true),
write: Permissions::new_write(&None, true),
net: Permissions::new_net(&None, true),
env: Permissions::new_env(&None, true),
run: Permissions::new_run(&None, true),
ffi: ... | rust_cleaned_test_functions.jsonl/24818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1012
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
22121,
368,
341,
262,
1077,
5206,
82282,
284,
53357,
341,
414,
1349,
25,
53357,
486,
931,
6443,
2099,
4064,
11,
830,
1326,
414,
3270,
25,
53357,
486,
931,
9165,
2099,
4064,
11,
830,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commit_decoration_style_empty_string() {
_do_test_commit_style_no_decoration(&[
"--commit-style",
"blue",
"--commit-decoration-style",
"",
]);
} | rust_cleaned_test_functions.jsonl/70058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
2259,
26452,
15117,
15124,
3904,
368,
341,
286,
716,
2982,
4452,
36346,
15117,
6536,
2259,
26452,
2099,
9640,
310,
14482,
17413,
11297,
756,
310,
330,
12203,
756,
310,
14482,
17413,
30266,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rpc_get_balance_via_client() {
let genesis = create_genesis_config(20);
let mint_pubkey = genesis.mint_keypair.pubkey();
let bank = Arc::new(Bank::new(&genesis.genesis_config));
let meta = JsonRpcRequestProcessor::new_from_bank(&bank);
let mut io = MetaIo... | rust_cleaned_test_functions.jsonl/57639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
29396,
80710,
8179,
368,
341,
286,
1077,
59366,
284,
1855,
16322,
13774,
5332,
7,
17,
15,
317,
286,
1077,
28337,
34014,
792,
284,
59366,
744,
396,
3097,
12670,
47773,
792,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_freeze_account() {
let program_id = crate::id();
let account_key = Pubkey::new_unique();
let mut account_account = SolanaAccount::new(
account_minimum_balance(),
Account::get_packed_len(),
&program_id,
);
let account_own... | rust_cleaned_test_functions.jsonl/44648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8905,
2986,
13500,
368,
341,
286,
1077,
2025,
842,
284,
17717,
486,
307,
543,
286,
1077,
2692,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
2692,
13500,
284,
11473,
3362,
7365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_draw_calendar() {
let test_case = |expected: &Buffer| {
let mut app = TTApp::new().unwrap();
app.task_report_next();
app.context_next();
app.update(true).unwrap();
app.calendar_year = 2020;
app.mode = AppMode::Cale... | rust_cleaned_test_functions.jsonl/45046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1843
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
57665,
368,
341,
286,
1077,
1273,
19096,
284,
760,
7325,
25,
609,
4095,
91,
341,
310,
1077,
5206,
906,
284,
32744,
2164,
486,
931,
1005,
15454,
1428,
310,
906,
15034,
14813,
11257,
543,
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... | 8 |
#[test]
fn test_minimum_bytes_needed() {
use speedy::{
Readable,
Endianness
};
assert_eq!( <DerivedStruct as Readable< Endianness >>::minimum_bytes_needed(), 7 );
assert_eq!( <DerivedTupleStruct as Readable< Endianness >>::minimum_bytes_needed(), 7 );
assert_eq!( <DerivedUni... | rust_cleaned_test_functions.jsonl/35398 | {
"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,
84855,
12524,
57426,
368,
341,
262,
990,
65483,
74843,
286,
4457,
480,
345,
286,
3972,
72,
82033,
198,
262,
3634,
262,
2060,
10714,
10297,
366,
67843,
9422,
438,
4457,
480,
27,
3972,
72,
82033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_discard() -> Result<()> {
let db = Connection::open_in_memory()?;
let cache = &db.cache;
let sql = "PRAGMA schema_version";
{
let mut stmt = db.prepare_cached(sql)?;
assert_eq!(0, cache.len());
assert_eq!(0, stmt.query_row([], ... | rust_cleaned_test_functions.jsonl/14520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37745,
567,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
94136,
286,
1077,
6500,
284,
609,
1999,
20087,
401,
286,
1077,
5704,
284,
330,
6480,
76168,
10802,
943... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_part_from_cbor_unsigned_types() {
// u8
Part::from_cbor(&[0x85, 0x1, 0x2, 0x3, 0x4, 0x41, 0x5]).unwrap();
// u16
Part::from_cbor(&[
0x85, 0x19, 0x1, 0x2, 0x19, 0x3, 0x4, 0x19, 0x5, 0x6, 0x19, 0x7, 0x8, 0x41, 0x5,
])
.unwrap();
/... | rust_cleaned_test_functions.jsonl/106878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
5673,
666,
9368,
67830,
9763,
368,
341,
286,
442,
575,
23,
198,
286,
3660,
486,
1499,
666,
9368,
2099,
58,
15,
87,
23,
20,
11,
220,
15,
87,
16,
11,
220,
15,
87,
17,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_header_size() {
let h = BlockHeader::new(BlockType::DBlock);
let mut serializer = AllocSerializer::<256>::default();
serializer.serialize_value(&h).unwrap();
let buffer = serializer.into_serializer().into_inner().to_vec();
assert_eq!(buffer.len(), SE... | rust_cleaned_test_functions.jsonl/69341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
8757,
2368,
368,
341,
286,
1077,
305,
284,
8362,
4047,
486,
931,
55243,
929,
486,
3506,
1023,
317,
286,
1077,
5206,
21759,
284,
46685,
13909,
27638,
17,
20,
21,
6831,
2258,
543,
286,
21759... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_super_mod_vis() {
check(
r#"
//- /lib.rs
mod foo;
//- /foo.rs
mod some;
use some::Foo;
fn f() {
let i = Foo { n: 5 };
}
//- /foo/some.rs
pub(super) struct Foo<|> {
pub n: u32,
}
"#,
expect![[r#"
Foo Struct FileId(2) 0..41 1... | rust_cleaned_test_functions.jsonl/47778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
38886,
7480,
15887,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
2593,
15229,
401,
61463,
608,
7975,
25638,
198,
2593,
1045,
280,
810,
1045,
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_valid_config_yaml() {
let mut tmp = NamedTempFile::new().unwrap();
if let Ok(_) = tmp.write_all("foo: bar".as_bytes()) {
let _: DynamicConfig<ConfigYaml, ConfigObj> =
DynamicConfig::new(String::from(
tmp.into_temp_path().as_os_str()... | rust_cleaned_test_functions.jsonl/25064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
5332,
64380,
368,
341,
286,
1077,
5206,
4174,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
421,
1077,
7622,
48139,
284,
4174,
3836,
5705,
445,
7975,
25,
3619,
3263,
300,
12524,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_alogithm_id() {
assert_eq!(
AsymmetricEncryptionScheme::try_from(TPM2_ALG_OAEP).unwrap(),
AsymmetricEncryptionScheme::Oaep
);
assert_eq!(
AsymmetricEncryptionScheme::try_from(TPM2_ALG_RSAES).unwrap(),
AsymmetricEncr... | rust_cleaned_test_functions.jsonl/41510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
1634,
29459,
79239,
28906,
486,
1539,
5673,
4140,
8795,
17,
8912,
38,
2232,
32,
9197,
568,
15454,
3148,
310,
1634,
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_replace_add_use() {
check_assist(
replace_qualified_name_with_use,
"
use stdx;
impl std::fmt::Debug<|> for Foo {
}
",
"
use stdx;
use std::fmt::Debug;
impl Debug<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/19564 | {
"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,
10633,
2891,
15951,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8290,
62,
36335,
1269,
6615,
15951,
345,
310,
6228,
810,
1460,
87,
401,
6383,
1460,
486,
12501,
486,
7939,
27,
91,
29,
369,
33428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_duplicate_column_family() {
let n = DBPath::new("_rust_rocksdb_create_duplicate_column_family");
{
let mut opts = Options::default();
opts.create_if_missing(true);
opts.create_missing_column_families(true);
let mut db = match DB::open_cf(&opts, &n,... | rust_cleaned_test_functions.jsonl/79609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
70434,
8744,
26823,
368,
341,
262,
1077,
308,
284,
5952,
1820,
486,
931,
16975,
35788,
26608,
14553,
1999,
8657,
70434,
8744,
26823,
797,
262,
341,
286,
1077,
5206,
12185,
284,
14566,
486,
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_keys_with_expiry() {
struct TestRdbHandler {}
impl EventHandler for TestRdbHandler {
fn handle(&mut self, data: Event) {
match data {
Event::RDB(rdb) => match rdb {
Object::String(kv) => {
let key = String::... | rust_cleaned_test_functions.jsonl/93091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12631,
6615,
96509,
368,
341,
262,
2036,
3393,
49,
1999,
3050,
10086,
262,
11605,
31957,
369,
3393,
49,
1999,
3050,
341,
286,
5168,
3705,
2099,
6984,
656,
11,
821,
25,
3665,
8,
341,
310,
2432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compress_string() {
let short_str = "testing".to_string();
assert_eq!(display_compressed_string(short_str.clone(), 5, 5), short_str);
let long_str = "abcdefghijklmnopqrstuvwxyz".to_string();
assert_eq!(
display_compressed_string(long_str.clone(), 3, 3)... | rust_cleaned_test_functions.jsonl/103079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87845,
3904,
368,
341,
286,
1077,
2805,
2895,
284,
330,
8840,
3263,
983,
3904,
543,
286,
2060,
10714,
10297,
5493,
2965,
14318,
3904,
37890,
2895,
15997,
1507,
220,
20,
11,
220,
20,
701,
2805,
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_max_shift_binary()
{
assert_eq!(BinaryDigit(0x0u8).max_shift(), 8);
assert_eq!(BinaryDigit(0x1u8).max_shift(), 7);
assert_eq!(BinaryDigit(0x80u8).max_shift(), 0);
assert_eq!(BinaryDigit(0x0u16).max_shift(), 16);
assert_eq!(BinaryDigit(0x70u16).max_shi... | rust_cleaned_test_functions.jsonl/26383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
22230,
31761,
741,
262,
341,
286,
2060,
10714,
10297,
21338,
36420,
7,
15,
87,
15,
84,
23,
568,
2810,
22230,
1507,
220,
23,
317,
286,
2060,
10714,
10297,
21338,
36420,
7,
15,
87,
16,
84,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fork_by_first_received() {
let (chain_controller, shared, parent) = start_chain(None);
let final_number = 20;
let mock_store = MockStore::new(&parent, shared.store());
let mut chain1 = MockChain::new(parent.clone(), shared.consensus());
let mut chain2 = MockChain::new(... | rust_cleaned_test_functions.jsonl/105198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30583,
761,
669,
3710,
12978,
40783,
368,
341,
262,
1077,
320,
8819,
21600,
11,
6094,
11,
2681,
8,
284,
1191,
30583,
26717,
317,
262,
1077,
1590,
5500,
284,
220,
17,
15,
401,
262,
1077,
7860,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_added_empty_line_is_not_whitespace_error() {
let plus_style = "bold yellow red ul";
let config = integration_test_utils::make_config_from_args(&[
"--light",
"--keep-plus-minus-markers",
"--plus-style",
plus_style,
]);
... | rust_cleaned_test_functions.jsonl/70108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37653,
15124,
6528,
6892,
7913,
86175,
4096,
368,
341,
286,
1077,
5519,
15117,
284,
330,
14824,
13753,
2518,
8557,
876,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_section_map() {
let mut obj = fake_obj();
assert_matches!(
obj.parse_section(fake_section(
"maps/foo",
bytes_of(&bpf_map_def {
map_type: 1,
key_size: 2,
value_size: 3,
... | rust_cleaned_test_functions.jsonl/132927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16221,
5376,
368,
341,
286,
1077,
5206,
2839,
284,
12418,
7328,
1428,
286,
2060,
38344,
33673,
310,
2839,
4632,
16221,
74138,
16221,
1006,
394,
330,
17640,
60555,
756,
394,
5820,
3575,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_openai_gpt_tokenizer_no_lower_casing() {
// Given
let vocab = generate_test_vocab();
let merges = generate_test_merges();
let openai_gpt_tokenizer: OpenAiGptTokenizer =
OpenAiGptTokenizer::from_existing_vocab_and_merges(vocab, merges, false);
... | rust_cleaned_test_functions.jsonl/114295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
2143,
1889,
417,
6458,
3135,
6536,
30425,
666,
4422,
368,
341,
286,
442,
286,
16246,
198,
286,
1077,
23820,
284,
6923,
4452,
52823,
543,
286,
1077,
80953,
284,
6923,
4452,
717,
2375,
288,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_album() {
// Or set client_id and client_secret explictly
let spotify = Spotify::default()
.client_credentials_manager(CLIENT_CREDENTIAL.lock().unwrap().clone())
.build();
let birdy_uri = "spotify:album:0sNOF9WDwhWunNAHPD3Baj";
let albums... | rust_cleaned_test_functions.jsonl/96511 | {
"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,
53241,
368,
341,
14808,
262,
442,
2521,
738,
2943,
842,
323,
2943,
21962,
1343,
21242,
398,
7213,
41693,
262,
1077,
87790,
284,
40537,
486,
2258,
741,
286,
659,
2972,
47396,
12144,
52991,
10757,
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_big() {
let square = Square::from(vec![25, 13, 1, 19, 7, 16, 9, 22, 15, 3, 12, 5,
18, 6, 24, 8, 21, 14, 2, 20, 4, 17, 10, 23, 11]);
assert!(square.is_magic());
} | rust_cleaned_test_functions.jsonl/13905 | {
"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,
36386,
368,
341,
262,
1077,
9334,
284,
15619,
486,
1499,
25592,
20703,
17,
20,
11,
220,
16,
18,
11,
220,
16,
11,
220,
16,
24,
11,
220,
22,
11,
220,
16,
21,
11,
220,
24,
11,
220,
17,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.