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_retransmit_medium_equal_stakes() {
let num_nodes = 2000;
let stakes: Vec<_> = (0..num_nodes).map(|_| 10).collect();
run_simulation(&stakes, 200);
} | rust_cleaned_test_functions.jsonl/36197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
1458,
1763,
54867,
11478,
1261,
2050,
368,
341,
262,
1077,
1629,
14896,
284,
220,
17,
15,
15,
15,
280,
262,
1077,
44425,
25,
11312,
32399,
29,
284,
320,
15,
496,
2413,
14896,
568,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_prepare_column_names() {
let db = checked_memory_handle();
db.execute_batch("CREATE TABLE foo(x INTEGER);").unwrap();
let stmt = db.prepare("SELECT * FROM foo").unwrap();
assert_eq!(stmt.column_count(), 1);
assert_eq!(stmt.column_names(), vec!["x"]);
... | rust_cleaned_test_functions.jsonl/25507 | {
"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,
47460,
8744,
9187,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
2927,
7769,
14534,
445,
22599,
14363,
15229,
2075,
30381,
1215,
1827,
15454,
1428,
286,
1077,
20020,
284,
2927,
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... | 1 |
#[test]
fn test_extract_nothing_from_url() {
assert_eq!(
extract_cred_from_url("https://github.com"),
BasicAuthCredential::new(None, None)
);
} | rust_cleaned_test_functions.jsonl/101752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
6536,
1596,
5673,
2903,
368,
341,
197,
6948,
10714,
33673,
298,
8122,
2144,
73475,
5673,
2903,
445,
2428,
1110,
5204,
905,
4461,
298,
12791,
5971,
5087,
48265,
486,
931,
26717,
11,
2240,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_disjoint() {
let mut xs = SmallIntSet::new();
let mut ys = SmallIntSet::new();
assert!(xs.is_disjoint(&ys));
assert!(ys.is_disjoint(&xs));
assert!(xs.insert(5));
assert!(ys.insert(11));
assert!(xs.is_disjoint(&ys));
assert!(ys.is_di... | rust_cleaned_test_functions.jsonl/81797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
32850,
368,
341,
286,
1077,
5206,
11943,
284,
14994,
1072,
1649,
486,
931,
543,
286,
1077,
5206,
31810,
284,
14994,
1072,
1649,
486,
931,
543,
286,
2060,
10297,
18561,
2079,
9932,
32850,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inv() {
let bp = RistrettoElem(constants::RISTRETTO_BASEPOINT_POINT);
let bp_inv = Ristretto::inv(&bp);
assert!(Ristretto::op(&bp, &bp_inv) == Ristretto::id());
assert_ne!(bp, bp_inv);
} | rust_cleaned_test_functions.jsonl/85260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19996,
368,
341,
262,
1077,
26685,
284,
431,
380,
2122,
983,
25586,
80368,
486,
49,
3846,
38064,
5207,
11762,
21531,
27407,
317,
262,
1077,
26685,
19996,
284,
431,
380,
2122,
983,
486,
14057,
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_canceled_order_done() {
let json = r#"{"type": "done", "side": "sell", "order_id": "d05c295b-af2e-4f5e-bfa0-55d93370c450",
"reason":"canceled","product_id":"BTC-USD","price":"10009.17000000","remaining_size":"0.00973768",
"user_id":"0fd194ab8... | rust_cleaned_test_functions.jsonl/76862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
38392,
7869,
24390,
368,
341,
286,
1077,
2951,
284,
435,
55543,
4913,
1313,
788,
330,
10438,
497,
330,
2929,
788,
330,
34835,
497,
330,
1358,
842,
788,
330,
67,
15,
20,
66,
17,
24,
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_from_bytes_simple_cases() {
{
let input = b"";
let metas = metadata::from_bytes(input).unwrap();
assert_eq!(0, metas.len());
}
{
let input = b"FNM\x0Ahelloworld";
let expect = Metadata::FNM("helloworld".to_string());
let metas = metad... | rust_cleaned_test_functions.jsonl/24708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
30015,
41427,
368,
341,
262,
341,
286,
1077,
1946,
284,
293,
3014,
401,
286,
1077,
2270,
300,
284,
11160,
486,
1499,
12524,
5384,
568,
15454,
543,
286,
2060,
10714,
10297,
15,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_sync_multichunk_epoch() {
let mut swarm = new_local_swarm(4);
for validator in swarm.validators_mut() {
let mut config = validator.config().clone();
config.state_sync.chunk_limit = 5;
config.save(validator.config_path()).unwrap();
validator.restart()... | rust_cleaned_test_functions.jsonl/10527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
23008,
26290,
713,
3122,
20682,
368,
341,
262,
1077,
5206,
60841,
284,
501,
13564,
32581,
2178,
7,
19,
317,
262,
369,
22935,
304,
60841,
82728,
29523,
368,
341,
286,
1077,
5206,
2193,
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... | 4 |
#[test]
fn test_empty_entry() {
let mut m: HashMap<i32, bool> = HashMap::new();
match m.entry(0) {
Occupied(_) => panic!(),
Vacant(_) => {}
}
assert!(*m.entry(0).or_insert(true));
assert_eq!(m.len(), 1);
} | rust_cleaned_test_functions.jsonl/8500 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
9078,
368,
341,
286,
1077,
5206,
296,
25,
10528,
21897,
18,
17,
11,
1807,
29,
284,
10528,
486,
931,
543,
286,
2432,
296,
24116,
7,
15,
8,
341,
310,
32412,
1122,
48139,
589,
21975,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_req_strand() {
assert_eq!(ReqStrand::from_char(&'+').unwrap(), ReqStrand::Forward);
assert_eq!(ReqStrand::from_char(&'-').unwrap(), ReqStrand::Reverse);
assert!(ReqStrand::from_char(&'o').is_err());
assert_eq!(ReqStrand::Forward.strand_symbol(), "+");
asse... | rust_cleaned_test_functions.jsonl/51021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17644,
2895,
437,
368,
341,
286,
2060,
10714,
10297,
27234,
2580,
437,
486,
1499,
9232,
2099,
8133,
1823,
15454,
1507,
82458,
2580,
437,
486,
25925,
317,
286,
2060,
10714,
10297,
27234,
2580,
437,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize() {
crate::init().unwrap();
let tag_list_ron = r#"
(
scope: Global,
tags: [
("title", [
"a title",
"another title",
]),
... | rust_cleaned_test_functions.jsonl/61373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
368,
341,
286,
17717,
486,
2327,
1005,
15454,
1428,
286,
1077,
4772,
2019,
1710,
263,
284,
435,
2,
698,
310,
2399,
394,
6891,
25,
7962,
345,
394,
9492,
25,
2278,
503,
3489,
2102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submit_inputs() {
let submitter = testing_get_submitter();
let inputs = testing_get_inputs();
match submitter.submit_inputs(inputs) {
Ok(()) => assert!(true),
Err(errors::ServicesError::Networking(_)) => assert!(false),
Err(Error(_)) =... | rust_cleaned_test_functions.jsonl/116368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31674,
28557,
368,
341,
286,
1077,
9318,
465,
284,
7497,
3062,
5228,
16126,
543,
286,
1077,
11127,
284,
7497,
3062,
28557,
1428,
286,
2432,
9318,
465,
26923,
28557,
33999,
8,
341,
310,
7622,
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... | 2 |
#[test]
fn test_verify_single_element_accumulator() {
let element_hash = b"hello".test_only_hash();
let root_hash = element_hash;
let proof = TestAccumulatorProof::new(vec![]);
assert!(proof.verify(root_hash, element_hash, 0).is_ok());
} | rust_cleaned_test_functions.jsonl/33619 | {
"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,
35638,
19487,
7894,
75837,
10511,
368,
341,
262,
1077,
2392,
8950,
284,
293,
1,
14990,
3263,
1944,
18410,
8950,
543,
262,
1077,
3704,
8950,
284,
2392,
8950,
280,
262,
1077,
11064,
284,
3393,
14603... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ptrace() {
let err = ptrace::attach(getpid()).unwrap_err();
assert!(err == Error::Sys(Errno::EPERM) || err == Error::Sys(Errno::ENOSYS));
} | rust_cleaned_test_functions.jsonl/63563 | {
"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,
4348,
578,
368,
341,
9401,
262,
1077,
1848,
284,
10087,
578,
486,
16330,
5433,
10412,
6011,
15454,
9266,
543,
262,
2060,
10297,
615,
621,
4600,
486,
32792,
7,
7747,
2152,
486,
9197,
38720,
8,
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
] | 2 |
#[test]
fn test_parse_invalid() {
let r = Response { response: "VALUE key 0 10\r\n0123456789ABCDEF\r\nEND\r\n" };
assert_eq!(r.parse(), ParsedResponse::Invalid);
let r = Response { response: "VALUE key 0 NaN\r\n0123456789ABCDEF\r\nEND\r\n" };
assert_eq!(r.parse(), ParsedResponse... | rust_cleaned_test_functions.jsonl/86638 | {
"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,
21039,
31433,
368,
341,
286,
1077,
435,
284,
5949,
314,
2033,
25,
330,
23832,
1376,
220,
15,
220,
16,
15,
12016,
1699,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25411,
13649,
12016,
1699,
4689... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_buf_error() {
let mut small_buf = [];
let dlc_pn_command = ParameterNegotiationParams {
dlci: DLCI::try_from(0).unwrap(),
credit_based_flow_handshake: CreditBasedFlowHandshake::SupportedRequest,
priority: 8,
max_frame... | rust_cleaned_test_functions.jsonl/69348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
31433,
10363,
4096,
368,
341,
286,
1077,
5206,
2613,
10363,
284,
5907,
286,
1077,
294,
17257,
620,
77,
10811,
284,
15168,
47800,
354,
7101,
4870,
341,
310,
27513,
5855,
25,
42919,
40,
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_proof_request_msg() {
let _setup = SetupDefaults::init();
let request = ProofRequestData::create()
.set_name("Test".into())
.set_nonce().unwrap()
.set_not_revoked_interval(r#"{"from":1100000000, "to": 1600000000}"#.into()).unwrap()
... | rust_cleaned_test_functions.jsonl/65272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
7893,
6483,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16273,
486,
2327,
1428,
286,
1077,
1681,
284,
36991,
1900,
1043,
486,
3182,
741,
310,
659,
746,
1269,
445,
2271,
3263,
18122,
2398,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_pub_visibility() {
check_assist(
extract_struct_from_enum_variant,
"pub enum A { $0One(u32, u32) }",
r#"
pub struct One(pub u32, pub u32);
pub enum A { One(One) }"#,
);
} | rust_cleaned_test_functions.jsonl/36306 | {
"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,
39123,
15126,
34014,
71256,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
15126,
5673,
31054,
46112,
345,
310,
330,
9585,
7618,
362,
314,
400,
15,
3966,
8154,
18,
17,
11,
575,
18,
17,
8,
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_int_from_str_overflow() {
let mut i8_val: i8 = 127_i8;
assert_eq!(from_str::<i8>("127"), Some(i8_val));
assert_eq!(from_str::<i8>("128"), None);
i8_val += 1 as i8;
assert_eq!(from_str::<i8>("-128"), Some(i8_val));
assert_eq!(from_str::<i8>("-129")... | rust_cleaned_test_functions.jsonl/98624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
5673,
2895,
79073,
368,
341,
286,
1077,
5206,
600,
23,
6189,
25,
600,
23,
284,
220,
16,
17,
22,
5318,
23,
280,
286,
2060,
10714,
10297,
1499,
2895,
27638,
72,
23,
13211,
16,
17,
22,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_context_new() {
let _ctx = Context::new(Flag::VITERBI, 2, 0);
let _ctx = Context::new(Flag::MARGINALS, 2, 0);
let _ctx = Context::new(Flag::VITERBI | Flag::MARGINALS, 2, 0);
} | rust_cleaned_test_functions.jsonl/45714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8467,
5921,
368,
341,
286,
1077,
716,
3773,
284,
9608,
486,
931,
7,
12135,
486,
53,
24733,
8598,
11,
220,
17,
11,
220,
15,
317,
286,
1077,
716,
3773,
284,
9608,
486,
931,
7,
12135,
486,
44,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_float_statistics_nan_middle() {
let stats = statistics_roundtrip::<FloatType>(&[1.0, f32::NAN, 2.0]);
assert!(stats.has_min_max_set());
if let Statistics::Float(stats) = stats {
assert_eq!(stats.min(), &1.0);
assert_eq!(stats.max(), &2.0);
... | rust_cleaned_test_functions.jsonl/54369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17586,
49569,
73936,
62580,
368,
341,
286,
1077,
10472,
284,
13142,
29896,
32981,
27638,
5442,
929,
44784,
58,
16,
13,
15,
11,
282,
18,
17,
486,
45,
1093,
11,
220,
17,
13,
15,
2558,
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... | 2 |
#[test]
fn test_disk_space_settings() {
let (_td, cd, cp) = test_prolog();
let conf = load_config!(
cp,
"[cache]\n\
enabled = true\n\
directory = {cache_dir}\n\
files-total-size-soft-limit = '76'",
cd
);
assert!(conf.enabled());
assert!(conf... | rust_cleaned_test_functions.jsonl/48297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41687,
14663,
10853,
368,
341,
262,
1077,
5453,
1296,
11,
15307,
11,
12490,
8,
284,
1273,
2540,
839,
543,
262,
1077,
2335,
284,
2795,
5332,
33673,
286,
12490,
345,
286,
10545,
9360,
17960,
77,
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_neuron_add_multiple_permissions_and_principals() {
local_test_on_sns_subnet(|runtime| async move {
let user = Sender::from_keypair(&TEST_USER1_KEYPAIR);
let additional_user = Sender::from_keypair(&TEST_USER2_KEYPAIR);
let account_identifier = AccountIdentifier::from(u... | rust_cleaned_test_functions.jsonl/107256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
36090,
2891,
45233,
44767,
8378,
5294,
5706,
1127,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
1196,
284,
54610,
486,
1499,
3097,
12670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_cell_experiment() {
let (a, b, c) = get_test_sce_f32_data();
let sce = match SingleCellExperiment::from_csr(a.clone(), b.clone(), c.clone()) {
Ok(x) => x,
Err(y) => panic!("ERROR: {}", y),
};
assert_eq!(sce.cols(), 3);
asser... | rust_cleaned_test_functions.jsonl/7646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
16648,
82302,
368,
341,
286,
1077,
320,
64,
11,
293,
11,
272,
8,
284,
633,
4452,
643,
346,
761,
18,
17,
1769,
543,
286,
1077,
93810,
284,
2432,
11327,
3599,
77780,
486,
1499,
666,
15094... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_explorer_single_block() {
use exonum::explorer::BlockchainExplorer;
use exonum::helpers::Height;
use std::collections::HashSet;
let mut testkit = TestKitBuilder::validator()
.with_validators(4)
.with_service(CounterService)
.create();
assert_eq!(test... | rust_cleaned_test_functions.jsonl/86876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 785
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
79825,
19487,
7113,
368,
341,
262,
990,
98744,
372,
486,
29892,
14827,
486,
98898,
70916,
280,
262,
990,
98744,
372,
486,
21723,
486,
3640,
280,
262,
990,
1460,
486,
51137,
486,
44601,
401,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_purge_unconfirmed_duplicate_slot() {
let (bank_forks, mut progress) = setup_forks();
let descendants = bank_forks.read().unwrap().descendants();
// Purging slot 5 should purge only slots 5 and its descendant 6
ReplayStage::purge_unconfirmed_duplicate_slot(5, &des... | rust_cleaned_test_functions.jsonl/91774 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 770
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
4907,
41028,
70434,
27563,
368,
341,
286,
1077,
320,
17033,
761,
73302,
11,
5206,
5098,
8,
284,
6505,
761,
73302,
543,
286,
1077,
48346,
284,
6073,
761,
73302,
4125,
1005,
15454,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersection() {
let p = Rect(Point2D(0, 0), Size2D(10, 20));
let q = Rect(Point2D(5, 15), Size2D(10, 10));
let r = Rect(Point2D(-5, -5), Size2D(8, 8));
let pq = p.intersection(&q);
assert!(pq.is_some());
let pq = pq.unwrap();
assert!(pq.origin == Point2D(5, 15));
... | rust_cleaned_test_functions.jsonl/67412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82558,
368,
341,
262,
1077,
281,
284,
11920,
32737,
17,
35,
7,
15,
11,
220,
15,
701,
8478,
17,
35,
7,
16,
15,
11,
220,
17,
15,
1106,
262,
1077,
2804,
284,
11920,
32737,
17,
35,
7,
20,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ling_grad() -> Result<(), Box<dyn std::error::Error>> {
let c0 = "#89155180".parse()?;
let c1 = "#ff272d80".parse()?;
let c2 = "#ff272d00".parse()?;
let grad = GradLinear::new(
vec![
GradStop::new(0.0, c0),
GradStop::new... | rust_cleaned_test_functions.jsonl/97807 | {
"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,
907,
287,
18352,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
1077,
272,
15,
284,
5869,
23,
24,
16,
20,
20,
16,
23,
15,
3263,
6400,
94136,
286,
1077,
272,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_needs_eapol_exchange() {
assert!(fake_bss!(Wpa1).needs_eapol_exchange());
assert!(fake_bss!(Wpa2).needs_eapol_exchange());
assert!(!fake_bss!(Open).needs_eapol_exchange());
assert!(!fake_bss!(Wep).needs_eapol_exchange());
} | rust_cleaned_test_functions.jsonl/60263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
6767,
2204,
16657,
59212,
368,
341,
286,
2060,
10297,
30570,
880,
778,
10297,
54,
6595,
16,
568,
55245,
2204,
16657,
59212,
1423,
286,
2060,
10297,
30570,
880,
778,
10297,
54,
6595,
17,
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 |
#[test]
fn test_new_pool_pop_client_and_borrow_collection() {
let uri = Uri::new("mongodb://localhost:27017/").unwrap();
let pool = ClientPool::new(uri.clone(), None);
assert_eq!(pool.get_uri(), &uri);
// Pop a client and get a database and collection
let client = pool.pop();
pool.pop()... | rust_cleaned_test_functions.jsonl/22215 | {
"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,
5921,
15709,
17061,
8179,
8378,
880,
7768,
25019,
368,
341,
262,
1077,
13071,
284,
17226,
486,
931,
445,
37197,
1110,
8301,
25,
17,
22,
15,
16,
22,
14,
1827,
15454,
543,
262,
1077,
7314,
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_handshake() {
let magic = Network::Mainnet.magic(&ConsensusFork::NoFork);
let version = 70012;
let local_version = local_version();
let remote_version = remote_version();
let mut remote_stream = Stream::new();
remote_stream.append_slice(Message::new(magic, version, &remote_version).... | rust_cleaned_test_functions.jsonl/79005 | {
"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,
23194,
29661,
368,
341,
197,
10217,
10963,
284,
8141,
486,
6202,
4711,
88870,
2099,
15220,
13626,
37,
669,
486,
2753,
37,
669,
317,
197,
10217,
2319,
284,
220,
22,
15,
15,
16,
17,
280,
197,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unpack_single_file_to_dest_use_entry_name() {
let zfilename = Path::new(env!("CARGO_MANIFEST_DIR"))
.join("testdata")
.join("archives")
.join("op_linux_amd64_v1.11.2.zip");
let tmp = Path::new(env!("CARGO_MANIFEST_DIR"))
.join("test... | rust_cleaned_test_functions.jsonl/77206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54889,
19487,
2458,
2346,
25264,
15951,
9078,
1269,
368,
341,
286,
1077,
1147,
8404,
284,
7933,
486,
931,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
5455,
310,
659,
5987,
445,
92425,
1138,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_total() {
let j = r#"{"a": 1,
"b": false,
"c": null,
"d": -1.1e-1,
"e": [
{ "x": 1, "y": 2 },
{ "x": 2, "y": 3 },
]}"#
.as_bytes();
let mut p = Parser::from... | rust_cleaned_test_functions.jsonl/12582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 942
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10784,
368,
341,
262,
1077,
502,
284,
435,
55543,
4913,
64,
788,
220,
16,
345,
394,
330,
65,
788,
895,
345,
394,
330,
66,
788,
845,
345,
394,
330,
67,
788,
481,
16,
13,
16,
68,
12,
16,
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_default() {
let mut w = World::default();
let ds = get_default_spheres();
w.objects = vec![Box::new(ds[0].clone()), Box::new(ds[1].clone())];
let r = Ray {
origin: Tuple::point(0.0, 0.0, -5.0),
direction: Tuple::vector(0.0, 0.0, 1.0),
... | rust_cleaned_test_functions.jsonl/45906 | {
"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,
9993,
368,
341,
286,
1077,
5206,
289,
284,
4337,
486,
2258,
543,
286,
1077,
11472,
284,
633,
9993,
643,
64633,
543,
286,
289,
8383,
284,
7486,
20703,
1611,
486,
931,
33783,
58,
15,
936,
19982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_record_for_reference_sequence_with_invalid_name(
) -> Result<(), record::value::TryFromIteratorError> {
let record = Record::new(
record::Kind::ReferenceSequence,
record::Value::try_from_iter(vec![("SN", "*")])?,
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/23400 | {
"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,
53283,
5673,
14192,
5478,
25433,
23735,
6615,
31433,
1269,
1006,
262,
873,
1464,
5714,
68843,
3255,
486,
957,
486,
21453,
3830,
11951,
1454,
29,
341,
286,
1077,
3255,
284,
13583,
486,
931,
1006,
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... | 2 |
#[test]
fn test_parse_response_nxdomain() {
let p = Parsed::parse(&[
0x63, 0xc4, 0x81, 0x83, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x13, 0x61,
0x68, 0x61, 0x73, 0x64, 0x67, 0x68, 0x6c, 0x61, 0x6b, 0x73, 0x6a, 0x68, 0x62, 0x61,
0x61, 0x73, 0x6c, 0x64, 0x03, 0... | rust_cleaned_test_functions.jsonl/88886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1086
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9655,
1089,
9703,
3121,
368,
341,
286,
1077,
281,
284,
393,
18112,
486,
6400,
2099,
9640,
310,
220,
15,
87,
21,
18,
11,
220,
15,
8148,
19,
11,
220,
15,
87,
23,
16,
11,
220,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transaction_status_protobuf_backward_compatability() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
let status = TransactionStatusMeta {
status: Ok(()),
fee: 42,
... | rust_cleaned_test_functions.jsonl/9581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
4773,
22357,
18464,
70477,
18177,
2096,
1403,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_server_receive_settings_twice() {
let (mut hconn, mut peer_conn) = connect(Server);
// send the second SETTINGS frame.
let sent = peer_conn.conn.stream_send(
peer_conn.control_stream_id,
&[0x4, 0x6, 0x1, 0x40, 0x64, 0x7, 0x40, 0x64],
);
... | rust_cleaned_test_functions.jsonl/10918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12015,
38557,
10853,
54178,
558,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
8,
284,
4564,
54489,
317,
286,
442,
3624,
279,
2086,
73991,
4034,
624,
286,
1077,
3208,
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... | 1 |
#[test]
fn test_wrong_fast_field_type() {
let mut schema_builder = SchemaBuilder::default();
let fast_field_unsigned = schema_builder.add_u64_field("unsigned", FAST);
let fast_field_signed = schema_builder.add_i64_field("signed", FAST);
let text_field = schema_builder.add_text_fi... | rust_cleaned_test_functions.jsonl/65784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 960
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
35743,
5013,
1819,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
3297,
486,
2258,
543,
286,
1077,
4937,
5013,
67830,
284,
10802,
28532,
1364,
7300,
21,
19,
5013,
445,
3626,
497,
5073... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nan_stats() {
let values = vec![1.0, std::f64::NAN];
let counts = vec![1, 1];
assert!(stats(&values, &counts).is_some());
} | rust_cleaned_test_functions.jsonl/60626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73936,
15381,
368,
341,
286,
1077,
2750,
284,
7486,
20703,
16,
13,
15,
11,
1460,
486,
69,
21,
19,
486,
45,
1093,
935,
286,
1077,
14579,
284,
7486,
20703,
16,
11,
220,
16,
935,
286,
2060,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_e2e_262145_at() {
let sbuf = ['@' as u8; 262145];
let raw_text_buffer = UnlimitedBuffer::new(&sbuf[..]);
let ir_buffer = UnlimitedBuffer::new(b"window 22 len 262145\ninsert 1 40\ncopy 262144 from 1 ctx 3\n");
let mut dv_buffer = UnlimitedBuffer::new(&[]);
let mut buf_ir = BufReade... | rust_cleaned_test_functions.jsonl/19834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
17,
68,
62,
17,
21,
17,
16,
19,
20,
3752,
368,
341,
256,
1077,
274,
5909,
284,
2509,
31,
6,
438,
575,
23,
26,
220,
17,
21,
17,
16,
19,
20,
935,
256,
1077,
7112,
4326,
7776,
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_gossip_to_at_most_gossip_factor_peers() {
let config: GossipsubConfig = GossipsubConfig::default();
//add a lot of peers
let m =
config.mesh_n_low() + config.gossip_lazy() * (2.0 / config.gossip_factor()) as usize;
let (mut gs, _, topic_hashes) = inje... | rust_cleaned_test_functions.jsonl/66904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
41473,
2346,
3752,
81416,
1889,
41473,
18588,
36367,
388,
368,
341,
286,
1077,
2193,
25,
479,
41473,
1966,
2648,
284,
479,
41473,
1966,
2648,
486,
2258,
1428,
286,
442,
718,
264,
2696,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_balance_sqlite_db() {
let db_name = format!("{}.sqlite3", random_string(8).as_str());
let db_tempdir = tempdir().unwrap();
let db_folder = db_tempdir.path().to_str().unwrap().to_string();
let db_path = format!("{}/{}", db_folder, db_name);
let connection = run_migration_a... | rust_cleaned_test_functions.jsonl/110928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
29396,
18063,
632,
8685,
368,
341,
262,
1077,
2927,
1269,
284,
3561,
17223,
46391,
37042,
18,
497,
4194,
3904,
7,
23,
568,
300,
2895,
1423,
262,
1077,
2927,
11771,
3741,
284,
2730,
3741,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_numeric_valid_empty_string() {
let mut params = Map::new();
params.assign("numeric", Value::String("".to_owned())).ok();
let mut rules = BTreeMap::new();
rules.insert("numeric", vec![Rule::Numeric]);
let result = validate(&rules, params);
assert!(result.is_ok());
a... | rust_cleaned_test_functions.jsonl/74439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29418,
8337,
15124,
3904,
368,
341,
262,
1077,
5206,
3628,
284,
5027,
486,
931,
543,
262,
3628,
17870,
445,
19600,
497,
5162,
486,
703,
445,
3263,
983,
51973,
34670,
562,
1428,
262,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_field_inference() {
check(
r#"
pub struct S;
impl S { pub fn blah(&self) {} }
struct T(S);
impl T {
fn foo(&self) {
// FIXME: This doesn't work without the trailing `a` as `0.` is a float
self.0.a$0
}
}
"#,
expect![[r#"
... | rust_cleaned_test_functions.jsonl/26256 | {
"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,
21773,
5013,
1243,
2202,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9585,
2036,
328,
280,
6383,
328,
314,
6675,
5168,
52561,
2099,
721,
8,
4687,
555,
1235,
350,
3759,
626,
6383,
350,
341,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intersect_dow_dom_month() {
let context = build_context(Moment(Paris.ymd(2013, 02, 12).and_hms(4, 30, 0)));
let weekday = rc!(DayOfWeek(Weekday::Mon));
let month_day = DayOfMonth::new(1).unwrap().intersect(&rc!(Month(11)));
let inter = weekday.intersect(&month_da... | rust_cleaned_test_functions.jsonl/114678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
814,
363,
35749,
18933,
368,
341,
286,
1077,
2266,
284,
1936,
8467,
3189,
12913,
7,
59604,
13,
1600,
67,
7,
17,
15,
16,
18,
11,
220,
15,
17,
11,
220,
16,
17,
568,
437,
1523,
1011,
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_srgb_scaling_returns_correct_value() {
assert_eq!(scale_to_srgb(Float::from(0.5)), 128);
assert_eq!(scale_to_srgb(Float::from(0.15)), 38);
assert_eq!(scale_to_srgb(Float::from(0.7)), 179);
assert_eq!(scale_to_srgb(Float::from(0.91)), 232);
} | rust_cleaned_test_functions.jsonl/29472 | {
"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,
643,
16509,
79216,
58900,
31550,
3142,
368,
341,
286,
2060,
10714,
10297,
12445,
2346,
643,
16509,
57178,
486,
1499,
7,
15,
13,
20,
5731,
220,
16,
17,
23,
317,
286,
2060,
10714,
10297,
12445,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_renaming_of_expression() {
// Given: x + y * x
let mut expression = BitVector::add(
variable("x").into(),
BitVector::mul(variable("y").into(), variable("x").into()).unwrap(),
)
.unwrap();
let mut versioning = VariableVersioning::ne... | rust_cleaned_test_functions.jsonl/13492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
77,
6469,
3575,
28068,
368,
341,
286,
442,
16246,
25,
856,
488,
379,
353,
856,
198,
286,
1077,
5206,
7493,
284,
6495,
3781,
486,
718,
1006,
310,
3890,
445,
87,
1827,
18122,
3148,
310,
64... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lints_tracking_hash_different_construction_order() {
let mut v1 = Options::default();
let mut v2 = Options::default();
v1.lint_opts = vec![
(String::from("a"), Level::Allow),
(String::from("b"), Level::Warn),
(String::from("c"), Level::Deny),
(String:... | rust_cleaned_test_functions.jsonl/16051 | {
"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,
907,
21042,
66105,
8950,
82741,
3382,
3024,
7869,
368,
341,
262,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
1428,
262,
348,
16,
918,
396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tail() {
let mut a = vec![11i];
let b: &[int] = &[];
assert_eq!(a.tail(), b);
a = vec![11i, 12];
let b: &[int] = &[12];
assert_eq!(a.tail(), b);
} | rust_cleaned_test_functions.jsonl/31819 | {
"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,
35471,
368,
341,
286,
1077,
5206,
264,
284,
7486,
20703,
16,
16,
72,
935,
286,
1077,
293,
25,
44590,
396,
60,
284,
609,
15078,
286,
2060,
10714,
10297,
64,
38711,
1507,
293,
317,
286,
264,
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_download_sst_invalid() {
let ext_sst_dir = tempfile::tempdir().unwrap();
file_system::write(ext_sst_dir.path().join("sample.sst"), b"not an SST file").unwrap();
let mut meta = SstMeta::default();
meta.set_uuid(vec![0u8; 16]);
let importer_dir = tempfile::t... | rust_cleaned_test_functions.jsonl/51549 | {
"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,
35939,
643,
267,
31433,
368,
341,
286,
1077,
1303,
643,
267,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1034,
17687,
486,
4934,
48531,
643,
267,
4334,
3875,
1005,
5987,
445,
13611,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_displayable_predicate_two_args() {
let (comparison, _) = make_host_comparison();
let rpc_pred = Some(RPCPredicate {
root: Some(comparison),
});
assert_eq!(
"(FieldRef:host > 5)",
format!("{}", displayable_predicate(rpc_pred.as_r... | rust_cleaned_test_functions.jsonl/3673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
480,
97474,
23241,
8384,
368,
341,
286,
1077,
320,
54705,
11,
27439,
284,
1281,
12848,
90797,
543,
286,
1077,
35596,
12830,
284,
4329,
2785,
4872,
36329,
341,
310,
3704,
25,
4329,
14094,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_builder() {
let pool: Pool<String> = builder().with_starting_size(100).build();
assert_eq!(pool.size(), 100);
let value = pool.get();
assert_eq!(pool.size(), 99);
assert_eq!(*value, "");
drop(value);
assert_eq!(pool.size(), 100);
} | rust_cleaned_test_functions.jsonl/66269 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
368,
341,
286,
1077,
7314,
25,
22728,
3464,
29,
284,
7363,
1005,
4197,
4906,
287,
2368,
7,
16,
15,
15,
568,
5834,
1428,
286,
2060,
10714,
10297,
10285,
2486,
1507,
220,
16,
15,
15,
626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_normalization_string() {
let mut s = "normalize-stderr-32bit: \"something (32 bits)\" -> \"something ($WORD bits)\".";
let first = parse_normalization_string(&mut s);
assert_eq!(first, Some("something (32 bits)".to_owned()));
assert_eq!(s, " -> \"something ($WORD bits)\".")... | rust_cleaned_test_functions.jsonl/983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
13973,
2022,
3904,
368,
341,
262,
1077,
5206,
274,
284,
330,
30590,
12,
36422,
12,
18,
17,
4489,
25,
7245,
33331,
320,
18,
17,
9472,
8,
2105,
1464,
7245,
33331,
1711,
7227,
9472,
8,
210... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_off() {
let t = Type::primitive_type_builder("col", PhysicalType::INT32)
.build()
.unwrap();
let descriptor = Arc::new(ColumnDescriptor::new(
Arc::new(t),
1,
0,
ColumnPath::new(vec![]),
));
... | rust_cleaned_test_functions.jsonl/50834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
13651,
368,
341,
286,
1077,
259,
284,
3990,
486,
73448,
1819,
28532,
445,
2074,
497,
27379,
929,
486,
3221,
18,
17,
340,
310,
659,
5834,
741,
310,
659,
15454,
1428,
286,
1077,
16414,
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_try_from_single() {
assert_eq!("1.32.0".parse(), Ok(Version { parts: [1, 32, 0] }));
assert_eq!("1.0.0".parse(), Ok(Version { parts: [1, 0, 0] }));
} | rust_cleaned_test_functions.jsonl/36549 | {
"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,
53283,
5673,
19487,
368,
341,
286,
2060,
10714,
17223,
16,
13,
18,
17,
13,
15,
3263,
6400,
1507,
7622,
7,
5637,
314,
5479,
25,
508,
16,
11,
220,
18,
17,
11,
220,
15,
60,
17830,
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_map_transactions_to_statuses() {
let blockstore_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&blockstore_path).unwrap();
let transaction_status_cf = blockstore.db.column::<cf::TransactionStatus>();
let slot = 0;
... | rust_cleaned_test_functions.jsonl/7624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
68182,
2346,
83702,
368,
341,
286,
1077,
2504,
4314,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
4574,
4314,
2638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fixed_hash() {
test_struct!([]
{ [fixed=0x0f0f0f0f0f0f0f0f] x: u64 = 0x12345678 }
[(SimpleHasher, SimpleHasher, 1u64)]);
} | rust_cleaned_test_functions.jsonl/43899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
8950,
368,
341,
262,
1273,
15126,
0,
2561,
921,
338,
314,
508,
22021,
28,
15,
87,
15,
69,
15,
69,
15,
69,
15,
69,
15,
69,
15,
69,
15,
69,
15,
69,
60,
856,
25,
575,
21,
19,
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_fetching_illustration() {
dotenv::dotenv().ok();
let mut pixiv: PixivClient = PixivClient::new().unwrap();
let username = std::env::var("PIXIV_ID").expect("PIXIV_ID isn't set!");
let password = std::env::var("PIXIV_PW").expect("PIXIV_PW isn't set!");
pixiv
.login(&... | rust_cleaned_test_functions.jsonl/30370 | {
"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,
11803,
287,
62,
82618,
367,
368,
341,
262,
91286,
486,
50893,
1005,
562,
1428,
262,
1077,
5206,
31574,
344,
25,
49466,
344,
2959,
284,
49466,
344,
2959,
486,
931,
1005,
15454,
1428,
262,
1077,
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_jle_reg() {
test_interpreter_and_jit_asm!(
"
mov r0, 0
mov r1, 5
mov r2, 4
mov r3, 6
jle r1, r2, +2
jle r1, r1, +1
exit
jle r1, r3, +1
exit
mov r0, 1
exit",
[],
(),
{ |_vm,... | rust_cleaned_test_functions.jsonl/59013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5374,
273,
4920,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
220,
15,
198,
286,
1974,
435,
16,
11,
220,
20,
198,
286,
1974,
435,
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_get_field_by_name() {
let item = ContentItem {
path: "test-path".to_string(),
slug: "test-slug".to_string(),
meta: Default::default(),
entry: "test-entry".to_string(),
time_to_read: 0,
};
let path: String = get_field_by_name(item.clone(), "pat... | rust_cleaned_test_functions.jsonl/48663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
5013,
3710,
1269,
368,
341,
262,
1077,
1509,
284,
8883,
1234,
341,
286,
1815,
25,
330,
1944,
33095,
3263,
983,
3904,
3148,
286,
24470,
25,
330,
1944,
1331,
43213,
3263,
983,
3904,
3148,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_owner() {
let program_id = crate::id();
let owner_key = Pubkey::new_unique();
let mut signer_keys = [Pubkey::default(); MAX_SIGNERS];
for signer_key in signer_keys.iter_mut().take(MAX_SIGNERS) {
*signer_key = Pubkey::new_unique();
}
... | rust_cleaned_test_functions.jsonl/44641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
29027,
368,
341,
286,
1077,
2025,
842,
284,
17717,
486,
307,
543,
286,
1077,
6372,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
70039,
12631,
284,
508,
29162,
792,
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... | 3 |
#[test]
fn test_point_get() {
let mut wrapper = TableScanTestWrapper::default();
// point get returns none
let r1 = wrapper.get_point_range(i64::MIN);
// point get return something
let handle = 0;
let r2 = wrapper.get_point_range(handle);
wrapper.ranges = ... | rust_cleaned_test_functions.jsonl/35048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 581
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6085,
3062,
368,
341,
286,
1077,
5206,
13261,
284,
6633,
26570,
2271,
11542,
486,
2258,
543,
286,
442,
1459,
633,
4675,
6857,
198,
286,
1077,
435,
16,
284,
13261,
670,
6085,
9698,
1956,
21,
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... | 2 |
#[test]
fn test_get_routed_vlan_interfaces() {
let mut test_config = create_test_config_no_paths();
test_config.device_config = Some(build_full_config());
match test_config.get_routed_vlan_interfaces() {
Some(it) => {
// Turn the iterator into a vector.
... | rust_cleaned_test_functions.jsonl/83822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1710,
18533,
71296,
72960,
368,
341,
286,
1077,
5206,
1273,
5332,
284,
1855,
4452,
5332,
6536,
24152,
1428,
286,
1273,
5332,
18355,
5332,
284,
4329,
43333,
16372,
5332,
1423,
286,
2432,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_contains_flush() {
let mut cards = vec![];
cards.push(Card {
rank: Rank::Three,
suit: Suit::Diamonds,
});
cards.push(Card {
rank: Rank::Five,
suit: Suit::Diamonds,
});
cards.push(Card {
ra... | rust_cleaned_test_functions.jsonl/80728 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
39213,
368,
341,
286,
1077,
5206,
7411,
284,
7486,
0,
15078,
286,
7411,
2552,
58645,
341,
310,
7077,
25,
19298,
486,
19641,
345,
310,
7781,
25,
32611,
486,
76510,
82,
345,
286,
1625,
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_negated_any_value() -> TestResult {
let p = Polar::new();
p.load_str(r#"f(x, y) if x = 1 and not (y = 1 and x = 2);"#)?;
let mut q = p.new_query_from_term(term!(call!("f", [sym!("x"), sym!("y")])), false);
let bindings = next_binding(&mut q)?;
assert_eq!(b... | rust_cleaned_test_functions.jsonl/63044 | {
"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,
28209,
657,
37248,
3142,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
2601,
55543,
69,
2075,
11,
379,
8,
421,
856,
284,
220,
16,
323,
537,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_two_plus_lines() {
DeltaTest::with_args(&[
"--side-by-side",
"--width",
"41",
"--line-fill-method=spaces",
])
.with_input(TWO_PLUS_LINES_DIFF)
.expect_after_header(
r#"
│ │ │ ... | rust_cleaned_test_functions.jsonl/72594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
28043,
18323,
368,
341,
286,
24957,
2271,
486,
4197,
8384,
2099,
9640,
310,
14482,
2929,
14319,
24067,
756,
310,
14482,
3098,
756,
310,
330,
19,
16,
756,
310,
14482,
1056,
58987,
50297,
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_position() {
let mut l = Lexer::new("foo bar baz ", 0);
assert_matches!(l.next_token().unwrap(), (_, Token::Name("foo")));
assert_eq!(l.current_position(), 3);
assert_matches!(l.next_token().unwrap(), (_, Token::Name("bar")));
assert_eq!(l.current_positi... | rust_cleaned_test_functions.jsonl/92858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9661,
368,
341,
286,
1077,
5206,
326,
284,
85082,
486,
931,
445,
7975,
3619,
50247,
3670,
220,
15,
626,
286,
2060,
38344,
10297,
75,
4529,
6458,
1005,
15454,
1507,
39464,
9660,
486,
675,
445,
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_dt_utc_strip_nanos() {
let times = get_times();
// No stripping - OffsetDateTime with nanos
let res = catch_unwind(|| UTCTime::from_datetime(times[0]));
assert!(res.is_err());
// Stripping
for dt in times {
let date_time = dt_strip_nanos(dt);
assert_eq!(date_time.time().nanos... | rust_cleaned_test_functions.jsonl/67839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27516,
84259,
66130,
1089,
43605,
368,
341,
197,
10217,
3039,
284,
633,
22353,
1428,
197,
197,
322,
2308,
66670,
481,
16861,
7689,
448,
20021,
436,
198,
197,
10217,
592,
284,
2287,
4907,
19154,
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... | 3 |
#[test]
fn test_with() {
let template = compile("{{ with nested as n }}{ n.value } { number }{{endwith}}");
let context = context();
let template_registry = other_templates();
let formatter_registry = formatters();
let string = template
.render(&context,... | rust_cleaned_test_functions.jsonl/2382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
368,
972,
286,
1077,
3811,
284,
19192,
445,
2979,
448,
24034,
438,
308,
3869,
90,
308,
2824,
335,
314,
1372,
335,
2979,
408,
4197,
3417,
2815,
286,
1077,
2266,
284,
2266,
1647,
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_new_run_cheated() {
pyo3::prepare_freethreaded_python();
Python::with_gil(|py| -> () {
let input_type = py.get_type::<CheatedInputWrapper>();
let input_instance = input_type
.call1((2,))
.unwrap()
.cast_as::<PyCell<CheatedInputWrapper>>... | rust_cleaned_test_functions.jsonl/8603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1004
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
14007,
83527,
657,
368,
341,
262,
4510,
78,
18,
486,
13609,
74179,
769,
878,
291,
55869,
543,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
1464,
1719,
341,
286,
1077,
1946,
1819,
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_display() {
assert_eq!(format!("{}", Decimal::of(2.1_f32, 4)), "2.1000");
assert_eq!(format!("{}", Decimal::of(0.2_f64, 4)), "0.2000");
assert_eq!(format!("{}", Decimal::of(2, 4)), "2.0000");
assert_eq!(format!("{:?}", Decimal::of(2, 4)), "2.0000");
} | rust_cleaned_test_functions.jsonl/120418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
262,
2060,
10714,
10297,
2243,
79878,
26728,
486,
1055,
7,
17,
13,
16,
761,
18,
17,
11,
220,
19,
5731,
330,
17,
13,
16,
15,
15,
15,
797,
262,
2060,
10714,
10297,
2243,
79878... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer_issues_encrypted_handshake() {
let params: NoiseParams = "Noise_IKpsk2_25519_AESGCM_SHA256".parse().unwrap();
let b_i = Builder::new(params.clone());
let b_r = Builder::new(params);
let static_i = b_i.generate_keypair().unwrap();
let static_r = b_r.generate_keypair()... | rust_cleaned_test_functions.jsonl/27115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
90232,
13781,
14026,
23194,
29661,
368,
341,
262,
1077,
3628,
25,
50523,
4870,
284,
330,
61819,
7959,
42,
1690,
74,
17,
62,
17,
20,
20,
16,
24,
69381,
38,
9985,
38096,
17,
20,
21,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_black_five() {
let result = Sequence::scan(Black, Five, 0b0111110, 0b0000000, 7, 0);
let expected = [Sequence::new(1, 5, None, None)];
assert_eq!(result, expected);
let result = Sequence::scan(Black, Five, 0b0111110, 0b0000000, 6, 0);
let expected = ... | rust_cleaned_test_functions.jsonl/56140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
40272,
95258,
368,
341,
286,
1077,
1102,
284,
28871,
486,
16405,
7,
14417,
11,
20924,
11,
220,
15,
65,
15,
16,
16,
16,
16,
16,
15,
11,
220,
15,
65,
15,
15,
15,
15,
15,
15,
15,
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_virtio_fs_dax_on_cache_size_1_gib_w_vhost_user_fs_daemon() {
test_virtio_fs(
true,
Some(0x4000_0000),
"none",
&prepare_vhost_user_fs_daemon,
false,
)
} | rust_cleaned_test_functions.jsonl/23986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
34470,
814,
706,
4470,
11529,
2368,
62,
16,
1889,
579,
1670,
2273,
3790,
3317,
34470,
47070,
7291,
368,
341,
310,
1273,
2273,
2106,
815,
34470,
1006,
394,
830,
345,
394,
4329,
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_argsort() {
let a = Int32Chunked::new(
"a",
&[
Some(1),
Some(5),
None,
Some(1),
None,
Some(4),
Some(3),
Some(1),
... | rust_cleaned_test_functions.jsonl/16389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
371,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
28304,
291,
486,
931,
1006,
310,
330,
64,
756,
310,
609,
9640,
394,
4329,
7,
16,
701,
715,
394,
4329,
7,
20,
701,
715,
394,
2240,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_memory() {
assert_eq!(Some((8usize, 11usize)), parse_memory("mem[8] = 11"));
assert_eq!(
None,
parse_memory("mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X")
);
} | rust_cleaned_test_functions.jsonl/90589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19195,
368,
341,
286,
2060,
10714,
10297,
8373,
1188,
23,
51878,
11,
220,
16,
16,
51878,
5731,
4715,
19195,
445,
10536,
58,
23,
60,
284,
220,
16,
16,
4010,
286,
2060,
10714,
33673,
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_convert_other() {
assert_eq!(
Measure::from_str("10.0 cents"),
convert(
Measure::from_str("1 whole"),
MeasureKind::Money,
vec![(
Measure::from_str("12 whole"),
Measure::from_st... | rust_cleaned_test_functions.jsonl/38588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
30456,
368,
341,
286,
2060,
10714,
33673,
310,
34104,
486,
1499,
2895,
445,
16,
15,
13,
15,
30191,
4461,
310,
5508,
1006,
394,
34104,
486,
1499,
2895,
445,
16,
4361,
4461,
394,
34104,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_snapshot_must_be_later_than_updating_max_ts() {
let engine = TestEngineBuilder::new().build().unwrap();
let storage = TestStorageBuilder::<_, DummyLockManager>::from_engine_and_lock_mgr(
engine,
DummyLockManager {},
ApiVersion::V1,
)
.build()
.unwrap()... | rust_cleaned_test_functions.jsonl/8368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 769
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53265,
717,
590,
21263,
907,
962,
51613,
8237,
14110,
6345,
25023,
368,
341,
262,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
262,
1077,
5819,
284,
3393,
5793,
3297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_range() {
assert!(range(0i, 5).collect::<Vec<int>>() == vec![0i, 1, 2, 3, 4]);
assert!(range(-10i, -1).collect::<Vec<int>>() ==
vec![-10, -9, -8, -7, -6, -5, -4, -3, -2]);
assert!(range(0i, 5).rev().collect::<Vec<int>>() == vec![4, 3, 2, 1, 0]);
assert_eq!(range(20... | rust_cleaned_test_functions.jsonl/7953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
368,
341,
262,
2060,
10297,
9669,
7,
15,
72,
11,
220,
20,
568,
17384,
27638,
10050,
4159,
61586,
621,
7486,
20703,
15,
72,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
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_integer() {
let s = "
a: 1
b: 10
c: c
";
let docs = YamlLoader::load_from_str(s).unwrap();
let doc = &docs[0];
let v = IntegerValidator::default();
assert_eq!(v.validate(&doc["a"]), None);
let v = IntegerValidator {
... | rust_cleaned_test_functions.jsonl/4902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
368,
341,
286,
1077,
274,
284,
6228,
286,
264,
25,
220,
16,
198,
286,
293,
25,
220,
16,
15,
198,
286,
272,
25,
272,
198,
286,
7620,
286,
1077,
26340,
284,
809,
9467,
9181,
486,
1078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jump() {
let mut emu = MockEmulator::new().unwrap();
emu.cpu.f.bits = 0;
emu.cpu.pc = 0xC000;
emu.wram[0] = 0xC3; // jp immediate
emu.wram[1] = 0x00;
emu.wram[2] = 0xD0;
emu.wram[0x1000] = 0xCA;
emu.wram[0x1001] = 0x50;
em... | rust_cleaned_test_functions.jsonl/51432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 649
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65436,
368,
341,
286,
1077,
5206,
976,
84,
284,
14563,
2269,
10511,
486,
931,
1005,
15454,
1428,
286,
976,
84,
42387,
833,
38440,
284,
220,
15,
280,
286,
976,
84,
42387,
53335,
284,
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,
1... | 1 |
#[test]
fn test_div() {
let (q, r) = div(
Limb(2),
Limb(0),
Limb((usize::max_value() / 2 + 1) as BaseInt),
);
assert_eq!((q.0, r.0), (4, 0));
} | rust_cleaned_test_functions.jsonl/67886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
368,
341,
262,
1077,
320,
80,
11,
435,
8,
284,
3429,
1006,
286,
13589,
65,
7,
17,
1326,
286,
13589,
65,
7,
15,
1326,
286,
13589,
65,
1188,
51878,
486,
2810,
3142,
368,
608,
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_reject_tailing_half_quoted_pair() {
let mime = Mime::from_str(r#"application/x-custom;param="\""#);
assert!(mime.is_err());
} | rust_cleaned_test_functions.jsonl/99139 | {
"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,
1288,
583,
528,
14277,
40626,
11280,
9253,
14445,
368,
341,
286,
1077,
45270,
284,
82430,
486,
1499,
2895,
2601,
55543,
5132,
10776,
36898,
26,
903,
428,
57139,
2,
317,
286,
2060,
10297,
49588,
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 |
#[test]
fn test_parse_expectations_unknown() {
assert_expectation(
indoc!(
"
mysql:
expectation:
- type: FOO
"
),
None,
);
} | rust_cleaned_test_functions.jsonl/74667 | {
"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,
21039,
68918,
804,
57507,
368,
341,
286,
2060,
68918,
367,
1006,
310,
1257,
509,
33673,
394,
6228,
12272,
510,
220,
30193,
510,
262,
481,
943,
25,
434,
19499,
198,
286,
6228,
310,
2837,
310,
224... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bytewise_should_not_add_newline_when_line_longer_than_fold() {
new_ucmd!()
.args(&["-w2", "-b"])
.pipe_in("1234")
.succeeds()
.stdout_is("12\n34");
} | rust_cleaned_test_functions.jsonl/23303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3710,
83,
24350,
43378,
7913,
2891,
5921,
1056,
47636,
6528,
17799,
261,
51613,
61187,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
86,
17,
497,
6523,
65,
14108,
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_seek_to_first() {
let db = TestDB::new();
let mut iter = db.iter();
iter.seek_to_first();
assert_eq!(
collect_values(iter),
[100, 102, 104, 110, 112, 114, 200, 202]
);
} | rust_cleaned_test_functions.jsonl/3509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
2346,
12978,
368,
341,
262,
1077,
2927,
284,
3393,
3506,
486,
931,
543,
262,
1077,
5206,
5367,
284,
2927,
19471,
543,
262,
5367,
38179,
2346,
12978,
543,
262,
2060,
10714,
33673,
286,
6530,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_url_is_data() {
assert!(
url_is_data("data:text/html;base64,V2VsY29tZSBUbyBUaGUgUGFydHksIDxiPlBhbDwvYj4h")
.unwrap_or(false)
);
assert!(!url_is_data("https://kernel.org").unwrap_or(false));
assert!(!url_is_data("//kernel.org").unwrap_or... | rust_cleaned_test_functions.jsonl/41749 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
6892,
1769,
368,
341,
286,
2060,
33673,
310,
2515,
6892,
1769,
445,
691,
34952,
13739,
81860,
21,
19,
39954,
17,
51737,
56,
17,
24,
83,
57,
50,
14928,
1694,
14928,
64,
54695,
70,
2941,
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_bitxor_assign() {
let mut x = u12(4);
x ^= u12(1);
assert_eq!(x, u12(5));
x ^= u12(128);
assert_eq!(x, u12(133));
x ^= u12(1);
assert_eq!(x, u12(132));
x ^= u12(127);
assert_eq!(x, u12(251));
} | rust_cleaned_test_functions.jsonl/112541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
71311,
20688,
368,
341,
286,
1077,
5206,
856,
284,
575,
16,
17,
7,
19,
317,
286,
856,
31602,
575,
16,
17,
7,
16,
317,
286,
2060,
10714,
10297,
87,
11,
575,
16,
17,
7,
20,
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_cmd_encode() {
let rocks_engine = TestEngineBuilder::new().build().unwrap();
let engine = MockEngineBuilder::from_rocks_engine(rocks_engine).build();
let reqs = modifies_to_requests(vec![Modify::Put(
"default",
Key::from_raw(b"k1"),
b"... | rust_cleaned_test_functions.jsonl/27266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11684,
11224,
368,
341,
286,
1077,
23035,
24823,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
4712,
284,
14563,
4571,
3297,
486,
1499,
26608,
14553,
24823,
78009,
14553,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_loading_unknown_version() {
let manifest_contents = UNKNOWN_VERSION.to_string();
let result = FlashManifest::load(BufReader::new(manifest_contents.as_bytes()));
assert!(result.is_err());
} | rust_cleaned_test_functions.jsonl/85909 | {
"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,
57726,
57507,
9438,
368,
341,
286,
1077,
14455,
16682,
284,
61395,
10678,
2389,
3904,
543,
286,
1077,
1102,
284,
17263,
38495,
486,
1078,
5349,
1704,
5062,
486,
931,
60671,
6962,
16682,
5357,
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 |
#[test]
fn test_hoisted_function2() {
test_same(concat!(
"var impl_0;",
"b(a());",
"function a() { impl_0 = {}; }",
"function b() { window['f'] = impl_0; }"
));
} | rust_cleaned_test_functions.jsonl/27727 | {
"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,
1523,
78,
13236,
9174,
17,
368,
341,
262,
1273,
33574,
96360,
33673,
286,
330,
947,
11605,
62,
15,
64497,
286,
330,
65,
2877,
13426,
756,
286,
330,
1688,
264,
368,
314,
11605,
62,
15,
284,
521... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_line_len_rope_keymapper() {
use crate::commandline;
let (rope, s) = commandline::from_path(Some("./src/keymapper.rs".to_string()));
assert_eq!(s, Some("./src/keymapper.rs".to_string()));
let v = rope.line(8).as_str().unwrap_or("\n").trim().chars().collect::<Vec<char>>();
prin... | rust_cleaned_test_functions.jsonl/131725 | {
"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,
6528,
6043,
26608,
375,
3097,
38076,
368,
341,
262,
990,
17717,
486,
5631,
1056,
280,
262,
1077,
320,
299,
375,
11,
274,
8,
284,
3210,
1056,
486,
1499,
2638,
65405,
13988,
3548,
68864,
38076,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_mul_plaintext_scalar() {
let (ek, dk) = test_keypair().keys();
let c = Paillier::encrypt(&ek, 10);
let d = Paillier::mul(&ek, &c, 20);
let m = Paillier::decrypt(&dk, &d);
assert_eq!(m, 200);
} | rust_cleaned_test_functions.jsonl/40394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
24944,
6317,
1641,
427,
41652,
368,
341,
286,
1077,
320,
1225,
11,
40204,
8,
284,
1273,
3097,
12670,
1005,
10563,
1428,
286,
1077,
272,
284,
15681,
483,
1268,
486,
32826,
2099,
1225,
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_iter_index() {
let offset_array = [1, 2, 3];
let data_array = [4, 5];
let index = Index {
count: 2,
off_size: 1,
offset_array: &offset_array,
data_array: &data_array,
};
assert_eq!(index.iter().collect::<Vec... | rust_cleaned_test_functions.jsonl/85320 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
3560,
368,
341,
286,
1077,
4347,
3858,
284,
508,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
821,
3858,
284,
508,
19,
11,
220,
20,
935,
286,
1077,
1922,
284,
8008,
341,
310,
1760,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_repetition() {
assert_eq!(Repetition::Required.to_string(), "REQUIRED");
assert_eq!(Repetition::Optional.to_string(), "OPTIONAL");
assert_eq!(Repetition::Repeated.to_string(), "REPEATED");
} | rust_cleaned_test_functions.jsonl/126067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
1288,
55767,
368,
341,
197,
6948,
10714,
10297,
693,
55767,
486,
8164,
2389,
3904,
1507,
330,
89815,
797,
197,
6948,
10714,
10297,
693,
55767,
486,
15309,
2389,
3904,
1507,
330,
34057,
969,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_response_from_hyper_response() {
let mut headers = Headers::new();
headers.set(ContentType(mime::TEXT_HTML));
let response = Response::from(
HyperResponse::new()
.with_status(StatusCode::NotFound)
.with_headers(headers.clone())... | rust_cleaned_test_functions.jsonl/4155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9655,
5673,
93416,
9655,
368,
341,
286,
1077,
5206,
7102,
284,
21426,
486,
931,
543,
286,
7102,
980,
7,
29504,
1255,
545,
486,
12708,
56726,
3237,
286,
1077,
2033,
284,
5949,
486,
1499,
1006,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_children_with_complex_block_tree() {
let backend: Arc<Backend<test_client::runtime::Block>> = Arc::new(Backend::new_test(20, 20));
test_client::trait_tests::test_children_for_backend(backend);
} | rust_cleaned_test_functions.jsonl/94583 | {
"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,
31206,
6615,
41522,
7113,
11663,
368,
341,
197,
10217,
19163,
25,
19689,
27,
29699,
27,
1944,
8179,
486,
22255,
486,
4713,
2452,
284,
19689,
486,
931,
7,
29699,
486,
931,
4452,
7,
17,
15,
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 |
#[test]
fn test_json_encode_pretty() {
let mut args = HashMap::new();
args.insert("pretty".to_string(), to_value(true).unwrap());
let result =
json_encode(&serde_json::from_str("{\"key\": [\"value1\", 2, true]}").unwrap(), &args);
assert!(result.is_ok());
asse... | rust_cleaned_test_functions.jsonl/94803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11224,
620,
21322,
368,
341,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
32955,
3263,
983,
3904,
1507,
311,
3142,
3715,
568,
15454,
1423,
286,
1077,
1102,
4035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_varter() {
assert_eq!(varter("var"), Ok(("", "var")));
assert_eq!(
varter("a"),
Err(NomErr::Error(VerboseError {
errors: vec![
("a", VerboseErrorKind::Nom(ErrorKind::Tag)),
("a", VerboseErrorKind::Con... | rust_cleaned_test_functions.jsonl/117165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
465,
368,
341,
286,
2060,
10714,
10297,
947,
465,
445,
947,
3975,
7622,
7,
19814,
330,
947,
17621,
286,
2060,
10714,
33673,
310,
762,
465,
445,
64,
4461,
310,
15495,
8204,
316,
7747,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.