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_into_bytes_string() {
let b = Bytes::new("hello, world!".to_string());
let actual = b.into_bytes();
assert_eq!(b"hello, world!\0", &actual[..]);
} | rust_cleaned_test_functions.jsonl/66211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
12524,
3904,
368,
341,
286,
1077,
293,
284,
30024,
486,
931,
445,
14990,
11,
1879,
92993,
983,
3904,
1423,
286,
1077,
5042,
284,
293,
39860,
12524,
543,
286,
2060,
10714,
10297,
65,
1,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_minus_real() {
let test_cases = vec![
(
Real::new(1.01001).ok(),
Real::new(-0.01).ok(),
Real::new(1.02001).ok(),
false,
),
(
Real::new(std::f64::MIN).ok(),
... | rust_cleaned_test_functions.jsonl/5284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 576
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38457,
15266,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
2399,
394,
8800,
486,
931,
7,
16,
13,
15,
16,
15,
15,
16,
568,
562,
3148,
394,
8800,
486,
931,
4080,
15,
13,
15,
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... | 3 |
#[test]
fn test_tokenize_fields_custom_separator() {
let line = "aaa foo bar b x";
assert_eq!(
tokenize_helper(line, Some('a')),
vec![0..0, 1..1, 2..2, 3..9, 10..18,]
);
} | rust_cleaned_test_functions.jsonl/31607 | {
"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,
86508,
12132,
15875,
58204,
368,
341,
286,
1077,
1555,
284,
330,
32646,
15229,
3619,
293,
262,
856,
876,
286,
2060,
10714,
33673,
310,
77651,
10418,
8797,
11,
4329,
492,
64,
22337,
310,
7486,
2070... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tree_insertion_and_search() {
let sample = |_| {
rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(20)
.collect::<String>()
};
let sample_vec = vec![0; 20];
let sample_vec: Vec<String> = sample_vec.ite... | rust_cleaned_test_functions.jsonl/61996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
17678,
290,
8378,
10716,
368,
341,
286,
1077,
6077,
284,
66091,
341,
310,
10382,
486,
4528,
66849,
741,
394,
659,
13611,
11723,
2099,
2101,
65788,
340,
394,
659,
22769,
7,
17,
15,
340,
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... | 3 |
#[test]
fn test_select_utxos_for_optimization_selects_smallest_inputs() {
{
let mut utxos = generate_utxos(6);
utxos[0].value = 100 * MILLIMOB_TO_PICOMOB;
utxos[1].value = 200 * MILLIMOB_TO_PICOMOB;
utxos[2].value = 150 * MILLIMOB_TO_PICOMOB;
... | rust_cleaned_test_functions.jsonl/526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1009
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
60363,
87,
436,
5478,
15032,
65964,
13051,
82,
15874,
19236,
28557,
368,
341,
1789,
286,
341,
310,
1077,
5206,
8621,
87,
436,
284,
6923,
60363,
87,
436,
7,
21,
626,
310,
8621,
87,
436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dense_rank() -> Result<()> {
let r = dense_rank("arr".into());
test_without_rank(&r, vec![1; 8])?;
test_with_rank(&r, vec![1, 1, 2, 3, 3, 3, 4, 5])?;
Ok(())
} | rust_cleaned_test_functions.jsonl/129705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72619,
20417,
368,
1464,
5714,
71698,
341,
286,
1077,
435,
284,
27950,
20417,
445,
1118,
3263,
18122,
1423,
286,
1273,
39904,
20417,
2099,
81,
11,
7486,
20703,
16,
26,
220,
23,
2467,
37445,
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... | 3 |
#[test]
fn test_body_brotli() {
let mut srv = TestServer::new(move || {
h1::H1Service::new(App::new().wrap(Compress::new(ContentEncoding::Br)).service(
web::resource("/").route(web::to(move || Response::Ok().body(STR))),
))
});
// client request
let mut response = sr... | rust_cleaned_test_functions.jsonl/48229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14114,
880,
4640,
742,
368,
341,
262,
1077,
5206,
43578,
284,
3393,
5475,
486,
931,
34081,
1369,
341,
286,
305,
16,
486,
39,
16,
1860,
486,
931,
23231,
486,
931,
1005,
10097,
7,
1092,
1873,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bank_process_and_record_transactions() {
analog_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_slow_genesis_config(10_000);
let bank = Arc::new(Bank::new_no_wallclock_throttle_for_tests(&gen... | rust_cleaned_test_functions.jsonl/4989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2041
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
11305,
8378,
14192,
68182,
368,
341,
286,
23400,
27413,
486,
15188,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
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... | 5 |
#[test]
fn test_to_urn_string() {
let yyid = Yyid::new();
let yurn = yyid.to_urn_ref().to_string();
let ystr = &yurn[9..];
assert!(yurn.starts_with("urn:yyid:"));
assert!(ystr.len() == 36);
assert!(ystr.chars().all(|c| c.is_digit(16) || c == '-'));
} | rust_cleaned_test_functions.jsonl/134734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
62,
399,
3904,
368,
341,
286,
1077,
13197,
307,
284,
809,
88,
307,
486,
931,
543,
286,
1077,
379,
399,
284,
13197,
307,
2389,
62,
399,
7793,
1005,
983,
3904,
543,
286,
1077,
379,
495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_size_hint() {
use core::usize::MAX as UMAX;
assert_eq!((0..0usize).size_hint(), (0, Some(0)));
assert_eq!((0..100usize).size_hint(), (100, Some(100)));
assert_eq!((0..UMAX).size_hint(), (UMAX, Some(UMAX)));
let umax = u128::try_from(UMAX).unwrap();
assert_eq!((0..0... | rust_cleaned_test_functions.jsonl/54164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 522
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
2368,
45825,
368,
341,
262,
990,
6200,
486,
51878,
486,
10586,
438,
547,
10586,
280,
262,
2060,
10714,
0,
1188,
15,
496,
15,
51878,
568,
2141,
45825,
1507,
320,
15,
11,
4329,
7,
15,
4945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shorten() {
let src = r#"
// Package foo does a thing.
//
// This is a description.
//
// ## Examples
//
// ### Using foo
//
// ```
// import "foo"
//
// foo.a
// ```
package f... | rust_cleaned_test_functions.jsonl/9988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
268,
368,
341,
286,
1077,
2286,
284,
435,
2,
698,
286,
442,
16906,
15229,
1558,
264,
3166,
624,
286,
6475,
286,
442,
1096,
374,
264,
4008,
624,
286,
6475,
286,
442,
7704,
25311,
198,
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_wrong_number_of_parameters_error() {
test_parse_error!(
vec![("a", "1")],
(u32, u32),
ErrorKind::WrongNumberOfParameters {
got: 1,
expected: 2,
}
);
} | rust_cleaned_test_functions.jsonl/16605 | {
"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,
75198,
5500,
3575,
18263,
4096,
368,
341,
286,
1273,
21039,
4096,
33673,
310,
7486,
20703,
445,
64,
497,
330,
16,
899,
1259,
310,
320,
84,
18,
17,
11,
575,
18,
17,
1326,
310,
4600,
10629,
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_from_i64() {
let cases = vec![
(-12345i64, "-12345"),
(-1, "-1"),
(1, "1"),
(-9223372036854775807, "-9223372036854775807"),
(-9223372036854775808, "-9223372036854775808"),
];
for (num, exp) in cases {
... | rust_cleaned_test_functions.jsonl/13652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5318,
21,
19,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
10293,
16,
17,
18,
19,
20,
72,
21,
19,
11,
6523,
16,
17,
18,
19,
20,
4461,
310,
10293,
16,
11,
6523,
16,
4461,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_impossible_keys() {
// make sure not infinite loops are hit here.
let seed = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
let mut rng = StdRng::seed_from_u64(seed.as_secs());
for i in 0..32 {
let _ = RSAPrivateKey::new(&mut rng, i... | rust_cleaned_test_functions.jsonl/29037 | {
"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,
17895,
10031,
12631,
368,
341,
286,
442,
1281,
2704,
537,
23809,
29753,
525,
4201,
1588,
624,
286,
1077,
10320,
284,
739,
1462,
486,
3328,
1005,
17021,
56262,
10407,
1462,
486,
99089,
2089,
69945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_change_rate_limiter_auto_tuned() {
let (mut cfg, _dir) = TiKvConfig::with_tmp().unwrap();
// vanilla limiter does not support dynamically changing auto-tuned mode.
cfg.rocksdb.rate_limiter_auto_tuned = true;
cfg.validate().unwrap();
let (storage, cfg_contr... | rust_cleaned_test_functions.jsonl/2157 | {
"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,
15947,
9246,
907,
17700,
27740,
528,
48883,
368,
341,
286,
1077,
320,
6984,
13286,
11,
716,
3741,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
286,
442,
32065,
4568,
2015,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ledger_cleanup_service() {
solana_logger::setup();
error!("test_ledger_cleanup_service");
let num_nodes = 3;
let mut validator_config = ValidatorConfig::default();
validator_config.max_ledger_slots = Some(100);
let config = ClusterConfig {
cluster_lamports: 10_000... | rust_cleaned_test_functions.jsonl/55963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38367,
1389,
42444,
12267,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1465,
17223,
1944,
38367,
1389,
42444,
12267,
797,
262,
1077,
1629,
14896,
284,
220,
18,
280,
262,
1077,
5206,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_primorial() {
let alpha = 6370;
let mut primorial = BigNumber::one();
for i in 1..alpha {
if BigNumber::from(i).is_prime() {
primorial *= i;
}
}
let primorial_from_bytes = BigNumber::from_slice(ALPHA_PRIMORIAL_BYTE... | rust_cleaned_test_functions.jsonl/52309 | {
"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,
87419,
21913,
368,
341,
286,
1077,
8287,
284,
220,
21,
18,
22,
15,
280,
286,
1077,
5206,
8860,
21913,
284,
53673,
486,
603,
1428,
286,
369,
600,
304,
220,
16,
496,
7141,
341,
310,
421,
53673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_execution_summary() {
let helper = TableScanTestHelper::new();
let mut executor = BatchTableScanExecutor::new(
helper.store(),
Arc::new(EvalConfig::default()),
helper.columns_info_by_idx(&[0]),
vec![helper.whole_table_range()],
... | rust_cleaned_test_functions.jsonl/66511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60948,
27251,
368,
341,
286,
1077,
13137,
284,
6633,
26570,
2271,
5511,
486,
931,
1428,
286,
1077,
5206,
31558,
284,
33904,
2556,
26570,
25255,
486,
931,
1006,
310,
13137,
16114,
3148,
310,
19689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optional_value() {
// simple list with 3-Options
let encoded =
"0b000000030a000000000000000000000000000000000f090a000000000000000000000000000000000f";
let bytes = hex::decode(encoded).unwrap();
let (_, value) = Value::from_bytes(&bytes).unwrap();
... | rust_cleaned_test_functions.jsonl/49839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74644,
3142,
368,
341,
286,
442,
4285,
1140,
448,
220,
18,
12,
3798,
198,
286,
1077,
20498,
4035,
310,
330,
15,
65,
15,
15,
15,
15,
15,
15,
15,
18,
15,
64,
15,
15,
15,
15,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u128() {
const VALUE: u128 = u128_from_bytes!("aaaaaaaabbbbbbbb");
assert_eq!(0x62626262626262626161616161616161, VALUE);
} | rust_cleaned_test_functions.jsonl/114329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
16,
17,
23,
368,
341,
262,
733,
26827,
25,
575,
16,
17,
23,
284,
575,
16,
17,
23,
5673,
12524,
17223,
28458,
32646,
370,
87609,
53151,
797,
262,
2060,
10714,
10297,
15,
87,
21,
17,
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_delegate_subscribe_unsubscribe() {
let new_downstream = |id: u64, region_version: u64| {
let peer = format!("{}", id);
let mut epoch = RegionEpoch::default();
epoch.set_conf_ver(region_version);
epoch.set_version(region_version);
... | rust_cleaned_test_functions.jsonl/112319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1023
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55312,
88935,
4907,
9384,
368,
341,
286,
1077,
501,
13998,
4027,
284,
760,
307,
25,
575,
21,
19,
11,
5537,
9438,
25,
575,
21,
19,
91,
341,
310,
1077,
14397,
284,
3561,
79878,
877,
317,
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_scalar_multiplication() {
println!("Started getting field elements");
let f1 = Fr::from_str(
"4691331900926794624732159288782398864809513177368446695323460897088210774597",
)
.unwrap();
let f2 = Fr::from_str(
"13050281033800249534771511321594569653376467224795... | rust_cleaned_test_functions.jsonl/76307 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
91802,
1693,
368,
341,
262,
13751,
17223,
32527,
3709,
2070,
5424,
797,
262,
1077,
282,
16,
284,
2869,
486,
1499,
2895,
1006,
286,
330,
19,
21,
24,
16,
18,
18,
16,
24,
15,
15,
24,
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_optimized_regression() {
let mut lin_mod = LinRegressor::default();
let inputs = Matrix::new(3, 1, vec![2.0, 3.0, 4.0]);
let targets = Vector::new(vec![5.0, 6.0, 7.0]);
lin_mod.train_with_optimization(&inputs, &targets);
let _ = lin_mod.parameters().unwrap();
} | rust_cleaned_test_functions.jsonl/69350 | {
"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,
15032,
45706,
91144,
368,
341,
262,
1077,
5206,
9805,
7480,
284,
8564,
93139,
486,
2258,
543,
262,
1077,
11127,
284,
11631,
486,
931,
7,
18,
11,
220,
16,
11,
7486,
20703,
17,
13,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple() {
let resp = find_nearest_test_markers("./fixtures/rust/cargo/src/pickers/tester.rs", 16)
.unwrap()
.unwrap();
assert_eq!(
resp.name.unwrap(),
WithLineNo {
no: 15,
value: "test_function".to_s... | rust_cleaned_test_functions.jsonl/29649 | {
"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,
30015,
368,
341,
286,
1077,
9039,
284,
1477,
13925,
15432,
4452,
92082,
13988,
45247,
7382,
590,
2899,
12088,
13437,
4322,
39089,
12697,
261,
25638,
497,
220,
16,
21,
340,
310,
659,
15454,
741,
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_mul_overflowing() {
let a = Primitive::from(&vec![None, Some(6), None, Some(6)]).to(DataType::Int32);
let b = Primitive::from(&vec![Some(5), None, None, Some(6)]).to(DataType::Int32);
let (result, overflow) = overflowing_mul(&a, &b).unwrap();
let expected = Primit... | rust_cleaned_test_functions.jsonl/12705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
79073,
287,
368,
341,
286,
1077,
264,
284,
51460,
486,
1499,
2099,
4083,
20703,
4064,
11,
4329,
7,
21,
701,
2240,
11,
4329,
7,
21,
7252,
568,
983,
63941,
486,
1072,
18,
17,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_writer_append_ser() {
let schema = Schema::parse_str(SCHEMA).unwrap();
let mut writer = Writer::new(&schema, Vec::new());
let record = TestSerdeSerialize {
a: 27,
b: "foo".to_owned(),
};
let n1 = writer.append_ser(record).unwrap()... | rust_cleaned_test_functions.jsonl/37661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
26041,
75861,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
59461,
35839,
568,
15454,
543,
286,
1077,
5206,
6916,
284,
29404,
486,
931,
2099,
17349,
11,
11312,
486,
931,
5231,
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_aggsig_batch() {
let secp = Secp256k1::with_caps(ContextFlag::Full);
let mut sigs: Vec<Signature> = vec![];
let mut msgs: Vec<Message> = vec![];
let mut pub_keys: Vec<PublicKey> = vec![];
for _ in 0..100 {
let (sk, pk) = secp.generate_keypair(&mut thread_rng()).unwrap();
let mu... | rust_cleaned_test_functions.jsonl/15035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
5857,
343,
14534,
368,
341,
197,
10217,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
4197,
52955,
14001,
12135,
486,
9432,
626,
197,
10217,
5206,
8366,
82,
25,
11312,
27,
25088,
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_filter_by_pid() {
timeout_ms(
|| {
let p = setup_default_packet();
let mut p2 = p.clone();
p2.metadata.pid = 0;
let lm = LogMessage {
pid: p.metadata.pid,
tid: p.metadata.t... | rust_cleaned_test_functions.jsonl/76994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 698
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
3710,
30065,
368,
341,
286,
9632,
21416,
1006,
310,
1369,
341,
394,
1077,
281,
284,
6505,
9993,
21078,
543,
394,
1077,
5206,
281,
17,
284,
281,
15997,
543,
394,
281,
17,
27544,
40939,
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_radd() {
// Bazel/Buck `select` function.
#[derive(Debug, Display, Clone)]
#[display(fmt = "${:?}", _0)]
struct Select(Vec<i32>);
starlark_simple_value!(Select);
impl<'v> UnpackValue<'v> for Select {
fn expected() -> String {
Select::get_type_val... | rust_cleaned_test_functions.jsonl/92433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1035
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
718,
368,
341,
1066,
262,
442,
425,
68326,
16276,
1942,
1565,
1742,
63,
729,
624,
262,
11506,
27098,
42618,
11,
10623,
11,
27913,
5563,
262,
11506,
5493,
28197,
284,
10857,
25,
52652,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hollow_ellipse() {
use imageproc::drawing::draw_hollow_ellipse_mut;
let red = Rgb([255, 0, 0]);
let green = Rgb([0, 255, 0]);
let blue = Rgb([0, 0, 255]);
let mut image = RgbImage::from_pixel(200, 200, Rgb([255, 255, 255]));
// Circle
draw_hollow_ellipse_mut(&m... | rust_cleaned_test_functions.jsonl/20082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
1523,
1544,
62,
68004,
368,
341,
262,
990,
2168,
15782,
486,
80849,
486,
7633,
1523,
1544,
62,
68004,
29523,
401,
262,
1077,
2518,
284,
431,
9511,
2561,
17,
20,
20,
11,
220,
15,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_entering_and_leving() {
with_externalities(&mut new_test_ext(), || {
let user = 1;
assert_eq!(Parking::all_parking_lots_count(), 2);
let parking_lot_hash = Parking::owner_parking_lots_array((0, 0));
assert_eq!(Parking::parking_lots_by_inde... | rust_cleaned_test_functions.jsonl/105203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 749
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37480,
287,
8378,
62,
3449,
287,
368,
341,
286,
448,
47432,
1361,
2099,
6984,
501,
4452,
9927,
1507,
1369,
341,
310,
1077,
1196,
284,
220,
16,
280,
310,
2060,
10714,
10297,
94316,
486,
541,
620,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_weight_delta_to() {
let a_lst = Tensor::<f64>::new(&Shape::new([2, 3]), vec![
1., 7., 8.,
-2., 3., 5.,
]);
let l = Dense::<f64> {
input_shape: Shape::new([2, 3]),
output_shape: Shape::new([2]),
weight: vec![
2., 1., -1., 3., 2.,... | rust_cleaned_test_functions.jsonl/39100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
15876,
26710,
2346,
368,
341,
262,
1077,
264,
31983,
284,
26036,
27638,
69,
21,
19,
6831,
931,
2099,
12301,
486,
931,
2561,
17,
11,
220,
18,
9719,
7486,
90515,
286,
220,
16,
2572,
220,
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_signal_return_expected_type() {
let obj = Object::with_type(SimpleObject::static_type(), &[]).expect("Object::new failed");
obj.connect("create-string", false, move |_args| {
Some("return value".to_value())
})
.expect("Failed to connect on 'create-str... | rust_cleaned_test_functions.jsonl/27402 | {
"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,
21137,
12511,
32190,
1819,
368,
341,
286,
1077,
2839,
284,
3002,
486,
4197,
1819,
3759,
6456,
1190,
486,
1978,
1819,
1507,
609,
1294,
568,
17119,
445,
1190,
486,
931,
4641,
3071,
286,
2839,
10800,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_groupby_categorical() {
let mut df = df! {"foo" => ["a", "a", "b", "b", "c"],
"ham" => ["a", "a", "b", "b", "c"],
"bar" => [1, 1, 1, 1, 1]
}
.unwrap();
df.apply("foo", |s| s.cast::<CategoricalType>().unwrap())
.... | rust_cleaned_test_functions.jsonl/124229 | {
"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,
6288,
1694,
87455,
368,
341,
286,
1077,
5206,
6764,
284,
6764,
0,
5212,
7975,
1,
589,
4383,
64,
497,
330,
64,
497,
330,
65,
497,
330,
65,
497,
330,
66,
8097,
503,
330,
5604,
1,
589,
4383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq_add_one() {
let f1 = Fq::from_str(
"4946875394261337176810256604189376311946643975348516311606738923340201185904",
)
.unwrap();
let f2 = Fq::from_str(
"4946875394261337176810256604189376311946643975348516311606738923340201185905",
)
.unwrap();
asser... | rust_cleaned_test_functions.jsonl/81819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
2891,
11667,
368,
341,
262,
1077,
282,
16,
284,
434,
80,
486,
1499,
2895,
1006,
286,
330,
19,
24,
19,
21,
23,
22,
20,
18,
24,
19,
17,
21,
16,
18,
18,
22,
16,
22,
21,
23,
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_list() {
init();
let s = (0..=59).map(|v| v.to_string()).collect::<Vec<_>>().join(",");
let input = s.chars().collect::<Vec<_>>();
let result = (list(min_digit()) - end()).parse(&input).to_result().unwrap();
let values = (0..=59).map(|v| ValueExpr(v)).collect::<Vec<_>>();
... | rust_cleaned_test_functions.jsonl/106889 | {
"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,
2019,
368,
341,
262,
2930,
543,
262,
1077,
274,
284,
320,
15,
496,
28,
20,
24,
568,
2186,
22428,
85,
91,
348,
2389,
3904,
6011,
17384,
27638,
10050,
32399,
2452,
1005,
5987,
46649,
262,
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_runtime_get_function_info_invalid_has_fn_info() {
let driver = TestDriver::new(
r#"
pub fn main() -> i32 { 3 }
"#,
);
let fn_name = CString::new("main").expect("Invalid function name");
let handle = unsafe {
mun_runtime_get_function_definition(
... | rust_cleaned_test_functions.jsonl/120554 | {
"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,
33232,
3062,
9174,
3109,
31433,
21778,
15246,
3109,
368,
341,
262,
1077,
5579,
284,
3393,
11349,
486,
931,
1006,
286,
435,
2,
698,
286,
6675,
5168,
1887,
368,
1464,
600,
18,
17,
314,
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... | 1 |
#[test]
fn test_handlebars_json_helper() {
let content = "{{toJson x}}".to_string();
let mut data = BTreeMap::new();
data.insert("test".into(), "something".into());
let mut renderer = TemplateRenderer::new();
renderer.register_template_string("t", content).unwrap();
... | rust_cleaned_test_functions.jsonl/86982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
24950,
9455,
10418,
368,
341,
286,
1077,
2213,
284,
47219,
73985,
856,
3417,
3263,
983,
3904,
543,
286,
1077,
5206,
821,
284,
425,
6533,
2227,
486,
931,
543,
286,
821,
7030,
445,
1944,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cdata() {
let mut r = Reader::from_str("<![CDATA[test]]>");
r.trim_text(true);
next_eq!(r, CData, b"test");
} | rust_cleaned_test_functions.jsonl/42074 | {
"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,
666,
691,
368,
341,
262,
1077,
5206,
435,
284,
25166,
486,
1499,
2895,
9639,
20703,
54002,
72626,
5053,
15084,
262,
435,
16419,
4326,
3715,
317,
262,
1790,
10714,
10297,
81,
11,
356,
1043,
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 |
#[test]
fn test_f32_event() {
let base_data = vec![0x82, 0x2d, 0x01, 0x00, 0x0d, 0x00];
let f32_data = [
[0x17, 0x00, 0x00, 0x00],
[0x29, 0x00, 0x00, 0x00],
[0x12, 0x00, 0x00, 0x00],
[0x1e, 0x02, 0x00, 0x00],
[0xe8, 0x03, 0x00, 0x00],
... | rust_cleaned_test_functions.jsonl/109406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
18,
17,
6748,
368,
341,
286,
1077,
2331,
1769,
284,
7486,
20703,
15,
87,
23,
17,
11,
220,
15,
87,
17,
67,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_fib_conversion_into_ali() {
use ff::Field;
use crate::Fr;
use crate::air::Fibonacci;
use crate::air::TestTraceSystem;
use crate::air::IntoAIR;
use crate::arp::IntoARP;
use crate::fft::multicore::Worker;
use crate::transcript::Transcript;
let fib = Fibonacci::... | rust_cleaned_test_functions.jsonl/66876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
579,
64132,
45514,
62,
7956,
368,
341,
262,
990,
25539,
486,
1877,
280,
262,
990,
17717,
486,
22560,
280,
262,
990,
17717,
486,
1310,
486,
37,
579,
39345,
280,
262,
990,
17717,
486,
1310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_handle() {
let (s1, _s2) = zx::Socket::create(zx::SocketOpts::STREAM).unwrap();
let (bytes, handles) = TestInterfaceEvent::Handle { arg: s1.into_handle() }
.into_message(SENDER_ID)
.unwrap()
.take();
assert_eq!(bytes, HANDLE_M... | rust_cleaned_test_functions.jsonl/55807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
10630,
368,
341,
286,
1077,
320,
82,
16,
11,
716,
82,
17,
8,
284,
71322,
486,
10286,
486,
3182,
13174,
87,
486,
10286,
43451,
486,
54326,
568,
15454,
543,
286,
1077,
320,
9651,
11,
1346... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_weightedindex_serde1() {
let weighted_index = WeightedIndex::new(vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]).unwrap();
let ser_weighted_index = bincode::serialize(&weighted_index).unwrap();
let de_weighted_index: WeightedIndex<i32> =
bincode::deserialize(&ser_weight... | rust_cleaned_test_functions.jsonl/86247 | {
"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,
15876,
291,
1252,
75861,
450,
16,
368,
341,
286,
1077,
36824,
3560,
284,
16516,
291,
1552,
486,
931,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
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_default_on_null() {
#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct S(#[serde_as(as = "DefaultOnNull<DisplayFromStr>")] u32);
// Normal
is_equal(S(123), expect![[r#""123""#]]);
is_equal(S(0), expect![[r#""0""#]]);
// Null case
check_deseria... | rust_cleaned_test_functions.jsonl/105404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 980
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
4470,
15162,
368,
341,
262,
11506,
47024,
11898,
921,
262,
11506,
27098,
42618,
11,
39900,
11,
48440,
11,
55039,
5563,
262,
2036,
328,
7,
13353,
47024,
11898,
36951,
284,
330,
3675,
1925,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_expr() {
test_walk(
"[1,2,3]",
vec![
"File",
"ExprStmt",
"ArrayExpr",
"IntegerLit",
"IntegerLit",
"IntegerLit",
... | rust_cleaned_test_functions.jsonl/3315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
21915,
368,
341,
310,
1273,
56131,
1006,
394,
10545,
16,
11,
17,
11,
18,
45016,
394,
7486,
90515,
503,
330,
1703,
756,
503,
330,
16041,
31063,
756,
503,
330,
1857,
16041,
756,
503,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_mul_vector_and_scalar() {
let vector = Vector {
x: 1.0,
y: 1.5,
z: 2.0,
};
let scalar = 2.0;
let expected_result = Vector {
x: 2.0,
y: 3.0,
z: 4.0,
};
assert_eq!(vector * sca... | rust_cleaned_test_functions.jsonl/134056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
12247,
8378,
41652,
368,
341,
286,
1077,
4621,
284,
4196,
341,
310,
856,
25,
220,
16,
13,
15,
345,
310,
379,
25,
220,
16,
13,
20,
345,
310,
1147,
25,
220,
17,
13,
15,
345,
286,
2605... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_client_state_with_initreboot_returns_initreboot() {
let mut msg = new_test_request();
msg.options.remove(2);
let got = get_client_state(&msg);
assert_eq!(got, ClientState::InitReboot);
} | rust_cleaned_test_functions.jsonl/61731 | {
"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,
3062,
8179,
4387,
6615,
6137,
265,
4619,
58900,
6137,
265,
4619,
368,
341,
286,
1077,
5206,
3750,
284,
501,
4452,
7893,
543,
286,
3750,
10912,
4850,
7,
17,
626,
286,
1077,
2684,
284,
633,
8179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bits() {
assert!(Flags::from_bits(0) == Some(Flags::empty()));
assert!(Flags::from_bits(0b1) == Some(FlagA));
assert!(Flags::from_bits(0b10) == Some(FlagB));
assert!(Flags::from_bits(0b11) == Some(FlagA | FlagB));
assert!(Flags::from_bits(0b1000) == N... | rust_cleaned_test_functions.jsonl/13423 | {
"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,
5673,
20034,
368,
341,
286,
2060,
10297,
9195,
486,
1499,
20034,
7,
15,
8,
621,
4329,
7,
9195,
486,
3194,
7392,
286,
2060,
10297,
9195,
486,
1499,
20034,
7,
15,
65,
16,
8,
621,
4329,
7,
1213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_for_of_statement() {
expect_printed("for (const a of items) {}", "for (const a of items) {}");
expect_printed("for (var a of items) {}", "for (var a of items) {}");
expect_printed("for (let a of items) {}", "for (let a of items) {}");
expect_printed(
"for (let a of items)... | rust_cleaned_test_functions.jsonl/93426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
3575,
37404,
368,
341,
262,
1720,
10064,
291,
445,
1958,
320,
1024,
264,
315,
3589,
8,
24689,
330,
1958,
320,
1024,
264,
315,
3589,
8,
4687,
797,
262,
1720,
10064,
291,
445,
1958,
320,
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_pop_tail() {
let mut ll = LinkedList::<u8>::new();
let node = ll.push_tail(11);
assert_node!(ll, node, ONLY, 11, 1);
//now pop the tail
assert_eq!(ll.pop_tail(), Some(11));
assert_empty!(ll);
//now push two nodes
ll.push_head(11);
... | rust_cleaned_test_functions.jsonl/59885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
35471,
368,
341,
286,
1077,
5206,
9323,
284,
22917,
27638,
84,
23,
6831,
931,
543,
286,
1077,
2436,
284,
9323,
2552,
35471,
7,
16,
16,
317,
286,
2060,
5084,
10297,
654,
11,
2436,
11,
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_true() {
let gil = Python::acquire_gil();
let py = gil.python();
assert!(PyBool::new(py, true).is_true());
let t: &PyObjectRef = PyBool::new(py, true).into();
assert_eq!(true, t.extract().unwrap());
assert!(true.to_object(py) == PyBool::new(py, tru... | rust_cleaned_test_functions.jsonl/112698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16082,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
2060,
10297,
13828,
11233,
486,
931,
46827,
11,
830,
568,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_chunk_response_waypoint() {
// Create a coordinator for a validator node with waypoint version of 10
let waypoint_ledger_info = create_ledger_info_at_version(10);
let waypoint = Waypoint::new_any(waypoint_ledger_info.ledger_info());
let mut validator_coord... | rust_cleaned_test_functions.jsonl/84051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 977
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
30539,
9655,
48936,
2768,
368,
341,
286,
442,
4230,
264,
30284,
369,
264,
22935,
2436,
448,
65176,
2319,
315,
220,
16,
15,
198,
286,
1077,
65176,
38367,
1389,
3109,
284,
1855,
38367,
1389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optopt() {
let long_args = vec!["--test=20".to_string()];
let mut opts = Options::new();
opts.optopt("t", "test", "testing", "TEST");
match opts.parse(&long_args) {
Ok(ref m) => {
assert!(m.opt_present("test"));
assert_eq!(m.opt_str("test").unwrap(... | rust_cleaned_test_functions.jsonl/52358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
2912,
368,
341,
262,
1077,
1293,
8384,
284,
7486,
0,
1183,
313,
1944,
28,
17,
15,
3263,
983,
3904,
33800,
262,
1077,
5206,
12185,
284,
14566,
486,
931,
543,
262,
12185,
28102,
2912,
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... | 3 |
#[test]
fn test_boolean_equal_nulls() {
let a = BooleanArray::from(vec![Some(false), None, None, Some(true)]);
let a = a.data();
let b = BooleanArray::from(vec![Some(false), None, None, Some(true)]);
let b = b.data();
test_equal(&a, &b, true);
let b = BooleanArra... | rust_cleaned_test_functions.jsonl/24205 | {
"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,
46642,
11478,
15162,
82,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
25592,
20703,
8373,
3576,
701,
2240,
11,
2240,
11,
4329,
3715,
41958,
286,
1077,
264,
284,
264,
2196,
543,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_count_trailing_whitespace() {
assert_eq!(count_trailing_whitespace(" 1 "), 1);
assert_eq!(count_trailing_whitespace(" 2 "), 2);
assert_eq!(count_trailing_whitespace(" 3 \n"), 3);
} | rust_cleaned_test_functions.jsonl/98565 | {
"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,
3180,
3547,
14277,
86175,
368,
341,
286,
2060,
10714,
10297,
1830,
3547,
14277,
86175,
445,
220,
16,
59312,
220,
16,
317,
286,
2060,
10714,
10297,
1830,
3547,
14277,
86175,
445,
220,
17,
220,
5931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vch_jada() {
#[cfg(feature = "v3")]
init_psa_crypto();
let vch = Voucher::try_from(VCH_JADA).unwrap();
assert!(vch.get_signer_cert().is_some());
assert!(vch.validate(None).is_ok());
} | rust_cleaned_test_functions.jsonl/81736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
2273,
331,
5374,
2584,
368,
341,
262,
11506,
14072,
27062,
284,
330,
85,
18,
5422,
262,
2930,
620,
9081,
78298,
1428,
262,
1077,
348,
331,
284,
647,
23937,
486,
1539,
5673,
12410,
2149,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_snippet() {
let snippet = "fn main() { println!(\"hello, world\"); }";
#[cfg(not(windows))]
let expected = "fn main() {\n \
println!(\"hello, world\");\n\
}\n";
#[cfg(windows)]
let expected = "fn ma... | rust_cleaned_test_functions.jsonl/6863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
28022,
21581,
368,
341,
286,
1077,
43065,
284,
330,
8822,
1887,
368,
314,
13751,
10297,
2105,
14990,
11,
1879,
59,
5038,
335,
876,
286,
11506,
14072,
24772,
3622,
1491,
22297,
286,
1077,
360... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_first_available_block() {
let mint_total = 1_000_000_000_000;
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(mint_total);
let (ledger_path, _blockhash) = create_new_tmp_ledger_auto_delete!(&genesis_config);
let blockstore = Blockstore::op... | rust_cleaned_test_functions.jsonl/11709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 572
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12978,
26962,
7113,
368,
341,
286,
1077,
28337,
10784,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
280,
286,
1077,
40788,
2648,
1731,
314,
59366,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_date_subassignment() {
let ymd = NaiveDate::from_ymd;
let mut date = ymd(2016, 10, 11);
date -= Duration::days(10);
assert_eq!(date, ymd(2016, 10, 1));
date -= Duration::days(2);
assert_eq!(date, ymd(2016, 9, 29));
} | rust_cleaned_test_functions.jsonl/4771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
5228,
29951,
368,
341,
286,
1077,
379,
2277,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
280,
286,
1077,
5206,
2400,
284,
379,
2277,
7,
17,
15,
16,
21,
11,
220,
16,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_code_from_conversion() {
let val: i16 = 6;
let erro_code: ErrorCode = val.try_into().expect("convert");
assert_eq!(erro_code, ErrorCode::NotLeaderForPartition);
} | rust_cleaned_test_functions.jsonl/14 | {
"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,
4096,
4136,
5673,
64132,
368,
341,
286,
1077,
1044,
25,
600,
16,
21,
284,
220,
21,
280,
286,
1077,
36310,
4136,
25,
60084,
284,
1044,
48779,
45514,
1005,
17119,
445,
14166,
797,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_insert_vote() {
::libra_logger::Logger::new().environment_only(true).init();
// Set up enough different authors to support different votes for the same block.
let (signers, validator_verifier) = random_validator_verifier(11, Some(10), false);
let my_signer = signers[10].clone();
... | rust_cleaned_test_functions.jsonl/50987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
54360,
368,
341,
262,
3504,
2740,
956,
27413,
486,
7395,
486,
931,
1005,
23294,
18410,
3715,
568,
2327,
543,
262,
442,
2573,
705,
3322,
2155,
12014,
311,
1824,
2155,
12684,
369,
279,
1852,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_set_net_device() {
let mut vm_resources = default_vm_resources();
// Clone the existing net config in order to obtain a new one.
let mut new_net_device_cfg = vm_resources
.network_interface
.iter()
.next()
.unwrap()
... | rust_cleaned_test_functions.jsonl/51474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
19722,
9204,
368,
341,
286,
1077,
5206,
10995,
35569,
284,
1638,
39008,
35569,
1428,
286,
442,
27913,
279,
6350,
4179,
2193,
304,
1973,
311,
6851,
264,
501,
825,
624,
286,
1077,
5206,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ice_protocol_string() {
let tests = vec![
(RTCIceProtocol::Unspecified, "Unspecified"),
(RTCIceProtocol::Udp, "udp"),
(RTCIceProtocol::Tcp, "tcp"),
];
for (proto, expected_string) in tests {
assert_eq!(expected_string, prot... | rust_cleaned_test_functions.jsonl/133806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
558,
34880,
3904,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
5350,
11237,
346,
20689,
486,
1806,
53434,
11,
330,
1806,
53434,
4461,
310,
320,
5350,
11237,
346,
20689,
486,
52,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_make_gaussian_vec_mechanism() -> Fallible<()> {
let measurement = make_base_gaussian::<VectorDomain<_>>(1.0)?;
let arg = vec![0.0, 1.0];
let _ret = measurement.invoke(&arg)?;
assert!(measurement.check(&0.1, &(0.5, 0.00001))?);
Ok(())
} | rust_cleaned_test_functions.jsonl/55701 | {
"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,
28230,
1889,
46972,
13251,
717,
4737,
67813,
368,
1464,
14785,
1238,
71698,
341,
286,
1077,
18662,
284,
1281,
7651,
1889,
46972,
27638,
3781,
13636,
32399,
25526,
16,
13,
15,
40007,
286,
1077,
1392,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scalar_repr_display() {
assert_eq!(
format!(
"{}",
ScalarRepr::new([
0x2829c242fa826143,
0x1f32cf4dd4330917,
0x932e4e479d168cd9,
0x513c77587f563f64
... | rust_cleaned_test_functions.jsonl/56406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 958
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
68535,
14825,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
33673,
394,
35503,
756,
394,
35176,
693,
649,
486,
931,
8956,
503,
220,
15,
87,
17,
23,
17,
24,
66,
17,
19,
17,
3632,
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... | 1 |
#[test]
fn test_fvm_truncated_header() {
let header_invalid_magic = FvmHeader {
magic: FVM_MAGIC,
version: FVM_VERSION,
pslice_count: 1,
slice_size: FVM_BLOCK_SIZE,
fvm_partition_size: FVM_BLOCK_SIZE,
vpartition_table_size: FVM_BLOC... | rust_cleaned_test_functions.jsonl/67407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
7338,
3547,
38007,
8757,
368,
341,
286,
1077,
4247,
31433,
54612,
284,
434,
7338,
4047,
341,
310,
10963,
25,
434,
11187,
49194,
345,
310,
2319,
25,
434,
11187,
10678,
345,
310,
4726,
4754,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_counter() {
let mut c = 0u32;
let (c_get, c_set) = counter_pair(&mut c);
assert_eq!(c_get.get(), 0);
assert_eq!(c_set.get(), 0);
c_set.set(1);
assert_eq!(c_get.get(), 1);
assert_eq!(c_set.get(), 1);
} | rust_cleaned_test_functions.jsonl/106118 | {
"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,
15730,
368,
341,
286,
1077,
5206,
272,
284,
220,
15,
84,
18,
17,
280,
286,
1077,
320,
66,
3062,
11,
272,
2602,
8,
284,
5546,
14445,
2099,
6984,
272,
317,
286,
2060,
10714,
10297,
66,
3062,
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_lower_case_name_icon_match() {
let dir = tempdir();
dir.child(".trash").touch().unwrap();
let test_file = dir.path().join(".trash");
cmd()
.arg("--icon")
.arg("always")
.arg("--ignore-config")
.arg(test_file)
.assert()
.stdout(pred... | rust_cleaned_test_functions.jsonl/647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30425,
19096,
1269,
15648,
10708,
368,
341,
262,
1077,
5419,
284,
2730,
3741,
543,
262,
5419,
17531,
5680,
68826,
1827,
22020,
1005,
15454,
543,
262,
1077,
1273,
2458,
284,
5419,
3875,
1005,
5987,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_radio_mock_set_state() {
let mut radio = MockRadio::new(&[Transaction::set_state(MockState::Idle, None)]);
radio.set_state(MockState::Idle).unwrap();
radio.done();
} | rust_cleaned_test_functions.jsonl/35584 | {
"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,
49740,
34134,
2602,
4387,
368,
341,
286,
1077,
5206,
8887,
284,
14563,
28203,
486,
931,
2099,
58,
8070,
486,
746,
4387,
66436,
1397,
486,
41370,
11,
2240,
7252,
626,
286,
8887,
980,
4387,
66436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let empty = Rope::default();
assert_eq!((empty.slice(..), empty.slice(..)), line(&empty.slice(..)));
let newline = Rope::from("\n");
assert_eq!(
(empty.slice(..), newline.slice(..)),
line(&newline.slice(..))
);
le... | rust_cleaned_test_functions.jsonl/129954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
368,
341,
286,
1077,
4287,
284,
97896,
486,
2258,
543,
286,
2060,
10714,
0,
1188,
3194,
14530,
56422,
701,
4287,
14530,
56422,
5731,
1555,
2099,
3194,
14530,
56422,
22525,
286,
1077,
39027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_perfect_matching() {
let haystack = "111 a 111b".to_string();
let needle = "111 a 111b".to_string();
search_test!(&haystack, &needle, Some(0));
} | rust_cleaned_test_functions.jsonl/19407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5678,
3751,
70763,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
3263,
983,
3904,
543,
286,
1077,
30309,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
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_PoK_multiple_sigs_with_same_msg() {
// Prove knowledge of multiple signatures and the equality of a specific message under both signatures.
// Knowledge of 2 signatures and their corresponding messages is being proven.
// 2nd message in the 1st signature and 5th message i... | rust_cleaned_test_functions.jsonl/62473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1088,
78,
42,
45233,
643,
14462,
6615,
33574,
6483,
368,
341,
286,
442,
1298,
586,
6540,
315,
5248,
32628,
323,
279,
21777,
315,
264,
3151,
1943,
1212,
2176,
32628,
624,
286,
442,
31925,
315,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse() {
assert_eq!(
parse("on x=-20..26,y=-36..17,z=-47..7"),
(
true,
(Cube {
x0: -20,
x1: 26,
y0: -36,
y1: 17,
z0: -47,
... | rust_cleaned_test_functions.jsonl/8202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
445,
263,
856,
10829,
17,
15,
496,
17,
21,
7358,
10829,
18,
21,
496,
16,
22,
22669,
10829,
19,
22,
496,
22,
4461,
310,
2399,
394,
830,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bind_and_run() {
let mut tmp_socket = TempFile::new().unwrap();
tmp_socket.remove().unwrap();
let path_to_socket = tmp_socket.as_path().to_str().unwrap().to_owned();
let api_thread_path_to_socket = path_to_socket.clone();
let vmm_shared_info = Arc::new(Rw... | rust_cleaned_test_functions.jsonl/23179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27461,
8378,
14007,
368,
341,
286,
1077,
5206,
4174,
19555,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
286,
4174,
19555,
4850,
1005,
15454,
543,
286,
1077,
1815,
2346,
19555,
284,
4174,
19555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_minimum_too_high() {
let array = [0u8; 2048];
FastCDC::new(&array, 67_108_867, 256, 1024);
} | rust_cleaned_test_functions.jsonl/32052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84855,
2346,
78,
22680,
368,
341,
286,
1077,
1334,
284,
508,
15,
84,
23,
26,
220,
17,
15,
19,
23,
935,
286,
17288,
73458,
486,
931,
2099,
1653,
11,
220,
21,
22,
62,
16,
15,
23,
62,
23,
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 |
#[test]
fn test_new_key_cmac_with_invalid_input() {
tink_mac::init();
let km = tink_core::registry::get_key_manager(tink_tests::AES_CMAC_TYPE_URL)
.expect("AES CMAC key manager not found");
// invalid key formats
let test_formats = gen_invalid_cmac_key_formats();
for (i, serialized_f... | rust_cleaned_test_functions.jsonl/37674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
3097,
666,
11948,
6615,
31433,
5898,
368,
341,
262,
90584,
22802,
486,
2327,
543,
262,
1077,
13136,
284,
90584,
15467,
486,
29172,
486,
455,
3097,
12144,
1155,
766,
32509,
486,
69168,
920,
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_sql_lexer_numbers() {
use super::Token::*;
assert_eq!(parse("12345"), vec![number("12345")]);
assert_eq!(parse("0.25"), vec![number("0.25")]);
assert_eq!(parse("0.25 + -0.25"), vec![number("0.25"), Plus, Minus, number("0.25")]);
assert_eq!(parse("-0.25 + ... | rust_cleaned_test_functions.jsonl/94436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18063,
62,
38815,
32964,
368,
341,
286,
990,
2256,
486,
3323,
79304,
286,
2060,
10714,
10297,
6400,
445,
16,
17,
18,
19,
20,
3975,
7486,
20703,
4082,
445,
16,
17,
18,
19,
20,
899,
2558,
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_aff_sidh() {
fn aux(a_sk: MyASc, b_sk: MyBSc) {
let a_sk = a_sk.0;
let b_sk = b_sk.0;
let e = (a(), b());
let ab = (paxy(), qaxy());
let bb = (pbxy(), qbxy());
let a_steps = 2; // EA;
let b_steps = 2; // EB;
let (a_e, a_bb) = a_sidh_isogen(a_sk, e, ab, bb, a_steps);
let (b_e, b_ab) ... | rust_cleaned_test_functions.jsonl/11562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48914,
53044,
71,
368,
341,
262,
5168,
10047,
2877,
33811,
25,
3017,
1911,
66,
11,
293,
33811,
25,
3017,
33,
3326,
8,
341,
10217,
264,
33811,
284,
264,
33811,
13,
15,
280,
10217,
293,
33811,
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_raw_node_step() {
setup_for_test();
for msg_t in 0..18 {
let msg_t = MessageType::from_i32(msg_t).unwrap();
if vec![
// Vote messages with term 0 will cause panics.
MessageType::MsgRequestVote,
MessageType::MsgRequestPreVote,
... | rust_cleaned_test_functions.jsonl/50332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5084,
11946,
368,
341,
262,
6505,
5478,
4452,
543,
262,
369,
3750,
528,
304,
220,
15,
496,
16,
23,
341,
286,
1077,
3750,
528,
284,
62336,
486,
1499,
5318,
18,
17,
8119,
528,
568,
15454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_interval_day_time_column_reader() {
let converter = IntervalDayTimeArrayConverter {};
run_single_column_reader_tests::<
FixedLenByteArrayType,
IntervalDayTimeArray,
IntervalDayTimeArrayConverter,
RandFixedLenGen,
>(
... | rust_cleaned_test_functions.jsonl/83375 | {
"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,
20541,
16763,
3009,
8744,
22306,
368,
341,
286,
1077,
27058,
284,
40584,
10159,
1462,
1857,
14920,
9321,
286,
1598,
19487,
8744,
22306,
32509,
27638,
198,
310,
20149,
11271,
18394,
929,
345,
310,
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_fast_scale_and_translate() {
let point = Point2::new(42i8, -34i8);
let transform = Similarity2::from_isometry(
Isometry2::translation(100f32, 150f32),
50f32,
);
let transform = ISimilarity2::from(transform);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/21376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35743,
16727,
8378,
66381,
368,
341,
286,
1077,
1459,
284,
5126,
17,
486,
931,
7,
19,
17,
72,
23,
11,
481,
18,
19,
72,
23,
317,
286,
1077,
5165,
284,
21476,
487,
17,
486,
1499,
6892,
6988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_tuple() {
let bser_v2 =
b"\x00\x02\x00\x00\x00\x00\x05\x11\x00\x00\x00\x00\x03\x02\x02\x03\x03Tom\x02\x03\x05Jerry";
let decoded = from_slice::<TwoBytestrings>(bser_v2).unwrap();
assert_eq!(decoded.0, &b"Tom"[..]);
assert_eq!(decoded.1, &b"Jerry"[..]);
} | rust_cleaned_test_functions.jsonl/34065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
21773,
368,
341,
262,
1077,
293,
799,
2273,
17,
4035,
286,
293,
11934,
87,
15,
15,
3462,
15,
17,
3462,
15,
15,
3462,
15,
15,
3462,
15,
15,
3462,
15,
15,
3462,
15,
20,
3462,
16,
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_flags_from_vec_35() {
let (flags, subcommand, argv) =
flags_from_vec(svec!["deno", "--current-thread", "script.ts"]);
assert_eq!(
flags,
DenoFlags {
current_thread: true,
..DenoFlags::default()
}
);
assert_eq!(subcommand, DenoSubcommand::Ru... | rust_cleaned_test_functions.jsonl/112864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14130,
5673,
13251,
62,
18,
20,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
4035,
414,
8042,
5673,
13251,
1141,
4083,
0,
1183,
5183,
78,
497,
14482,
3231,
60804,
497,
330,
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_read_request() {
let mut r = Reader::new();
r.state = State::Len;
let v = vec![0u8, 0, 0, 13, 6, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1];
let mut data = Cursor::new(&v);
// Test one shot
match r.readable(&mut data).unwrap().unwrap() {
Messa... | rust_cleaned_test_functions.jsonl/46450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
7893,
368,
341,
286,
1077,
5206,
435,
284,
25166,
486,
931,
543,
286,
435,
3467,
284,
3234,
486,
11271,
280,
286,
1077,
348,
284,
7486,
20703,
15,
84,
23,
11,
220,
15,
11,
220,
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... | 2 |
#[test]
fn test_rsplitn() {
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
let split: Vec<&str> = data.rsplitn(2, ' ').collect();
assert_eq!(split, ["lämb\n", "\nMäry häd ä little lämb\nLittle"]);
let split: Vec<&str> = data.rsplitn(2, "lämb").collect();
assert_eq!(split, ["\n", "\n... | rust_cleaned_test_functions.jsonl/17645 | {
"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,
1710,
6960,
77,
368,
341,
262,
1077,
821,
284,
2917,
77,
44,
2305,
884,
305,
30875,
12709,
2632,
30005,
3096,
1699,
38103,
30005,
3096,
1699,
3302,
262,
1077,
6718,
25,
11312,
52244,
495,
29,
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_format_duration_unit_basic() {
let (out_str, out_unit) = format_duration_unit(1.3, None);
assert_eq!("1.300 s", out_str);
assert_eq!(Unit::Second, out_unit);
let (out_str, out_unit) = format_duration_unit(1.0, None);
assert_eq!("1.000 s", out_str);
assert_eq!(Unit::Sec... | rust_cleaned_test_functions.jsonl/30732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
25454,
14832,
34729,
368,
341,
262,
1077,
320,
411,
2895,
11,
700,
14832,
8,
284,
3561,
25454,
14832,
7,
16,
13,
18,
11,
2240,
626,
262,
2060,
10714,
17223,
16,
13,
18,
15,
15,
274,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vrf_group_hash_gen() {
let personalization = constants::VRF_GROUP_HASH_GENERATORS_PERSONALIZATION;
//Gen1
let tag = b"Magnesium Mg 12";
let htc_g1_out = hash_to_curve::<FieldElement, G2>(tag, personalization)
.unwrap()
.into_projective();
... | rust_cleaned_test_functions.jsonl/13383 | {
"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,
2273,
8052,
6288,
8950,
16322,
368,
341,
286,
1077,
4345,
2022,
284,
18021,
486,
53,
17612,
20130,
32309,
18693,
60345,
73428,
969,
49025,
401,
286,
442,
9967,
16,
198,
286,
1077,
4772,
284,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_len_bytes_with_string() {
let mut output = String::new();
let method = StringMethod {
method: "len_bytes",
variable: "\"oh là là\"",
pattern: "",
selection: Select::All,
};
method.handle(&mut output, &VariableE... | rust_cleaned_test_functions.jsonl/85293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6043,
12524,
6615,
3904,
368,
341,
286,
1077,
5206,
2550,
284,
923,
486,
931,
543,
286,
1077,
1714,
284,
923,
3523,
341,
310,
1714,
25,
262,
330,
2892,
12524,
756,
310,
3890,
25,
220,
15898,
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_failing_write() {
use std::io::Write;
let buf = PartialWrite::new(
Vec::new(),
iter::repeat(PartialOp::Err(io::ErrorKind::WouldBlock)),
);
let mut z = Encoder::new(buf, 1).unwrap();
// Fill in enough data to make sure the buffer gets written out.
let inp... | rust_cleaned_test_functions.jsonl/134369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
14277,
9165,
368,
341,
262,
990,
1460,
486,
815,
486,
7985,
401,
262,
1077,
6607,
284,
24552,
7985,
486,
931,
1006,
286,
11312,
486,
931,
3148,
286,
5367,
486,
30624,
5304,
20894,
7125,
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_product_matrix() {
assert_eq!(A * B * C, [A, B, C].iter().product());
assert_eq!(A * B * C, [A, B, C].iter().cloned().product());
} | rust_cleaned_test_functions.jsonl/105429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9840,
10193,
368,
341,
286,
2060,
10714,
10297,
32,
353,
425,
353,
356,
11,
508,
32,
11,
425,
11,
356,
936,
2015,
1005,
3031,
1423,
286,
2060,
10714,
10297,
32,
353,
425,
353,
356,
11,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_image_buffer_copy_within_tl() {
let data = &[
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15,
];
let expected = [
00, 01, 02, 03, 04, 00, 01, 02, 08, 04, 05, 06, 12, 08, 09, 10,
];
let mut image: GrayImage = ImageBuf... | rust_cleaned_test_functions.jsonl/25549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
7776,
16096,
72385,
82970,
368,
341,
286,
1077,
821,
284,
609,
9640,
310,
220,
15,
15,
11,
220,
15,
16,
11,
220,
15,
17,
11,
220,
15,
18,
11,
220,
15,
19,
11,
220,
15,
20,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peer() {
let mut region = metapb::Region::default();
region.set_id(1);
region.mut_peers().push(new_peer(1, 1));
region.mut_peers().push(new_learner_peer(2, 2));
assert!(!find_peer(®ion, 1).unwrap().get_is_learner());
assert!(find_peer(®ion, ... | rust_cleaned_test_functions.jsonl/6849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
368,
341,
286,
1077,
5206,
5537,
284,
2270,
391,
65,
486,
14091,
486,
2258,
543,
286,
5537,
980,
842,
7,
16,
317,
286,
5537,
744,
332,
36367,
388,
1005,
9077,
1755,
45159,
7,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_header() {
use super::*;
let dt = chrono::DateTime::parse_from_rfc2822("Fri, 28 Nov 2014 21:00:09 +0900").unwrap();
let time = format!("{}", dt.format("%a, %d %h %Y %T GMT%Z"));
debug!("time == {}", time);
let mut h = hyper::header::HeaderM... | rust_cleaned_test_functions.jsonl/5197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
8757,
368,
341,
286,
990,
2256,
79304,
286,
1077,
7594,
284,
80372,
486,
7689,
486,
6400,
5673,
1710,
8316,
17,
23,
17,
17,
445,
53884,
11,
220,
17,
23,
4620,
220,
17,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load_accounts_no_loaders() {
let mut accounts: Vec<(Pubkey, Account)> = Vec::new();
let mut error_counters = ErrorCounters::default();
let keypair = Keypair::new();
let key0 = keypair.pubkey();
let key1 = Pubkey::new(&[5u8; 32]);
let mut account ... | rust_cleaned_test_functions.jsonl/50612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
55665,
6536,
12411,
388,
368,
341,
286,
1077,
5206,
9618,
25,
11312,
28706,
29162,
792,
11,
8615,
16018,
284,
11312,
486,
931,
543,
286,
1077,
5206,
1465,
85632,
284,
4600,
2507,
388,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_plan_rewriter_1() -> Result<()> {
use common_planners::*;
use pretty_assertions::assert_eq;
let source = Test::create().generate_source_plan_for_test(10000)?;
let plan = PlanBuilder::from(&source)
.filter(col("number").eq(lit(1i64)))?
.aggregate_partial(&[col("nu... | rust_cleaned_test_functions.jsonl/36071 | {
"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,
26564,
1288,
18189,
62,
16,
368,
1464,
5714,
71698,
341,
262,
990,
4185,
6317,
24003,
56162,
262,
990,
5020,
16553,
908,
486,
2207,
10714,
401,
262,
1077,
2530,
284,
3393,
486,
3182,
1005,
19366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_and_serialize() {
let a = WireGuard::try_from(TEXT).unwrap();
let s = a.render_with_names(None, false, true);
println!("{}", s);
} | rust_cleaned_test_functions.jsonl/13452 | {
"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,
21039,
8378,
88686,
368,
341,
286,
1077,
264,
284,
19378,
20806,
486,
1539,
5673,
46356,
568,
15454,
543,
286,
1077,
274,
284,
264,
8740,
6615,
9187,
26717,
11,
895,
11,
830,
317,
286,
13751,
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 |
#[test]
fn test_marklig_deser() {
let binary_marklig = vec![
// MarkLigPosFormat1
// MarkLigAttachSubTable MarkLigPos subtable definition
0x00, 0x01, // 1 posFormat
0x00, 0x0C, // MarkGlyphsCoverage offset to markCoverage table
0x00, 0x14... | rust_cleaned_test_functions.jsonl/112240 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3749
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
7708,
15768,
261,
368,
341,
286,
1077,
7868,
18924,
7708,
284,
7486,
90515,
310,
442,
4389,
43,
343,
4859,
4061,
16,
198,
310,
442,
4389,
43,
343,
30485,
3136,
2556,
220,
4389,
43,
343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_1920_1080_get_color() {
let mut buf = vec![0; 4];
let iter: u32 = 1920 * 1080;
let start = Instant::now();
for i in 0..iter {
get_color(i as u16, iter as u16, &mut buf);
}
let duration = start.elapsed();
println!("get_col... | rust_cleaned_test_functions.jsonl/30889 | {
"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,
880,
19762,
62,
16,
24,
17,
15,
62,
16,
15,
23,
15,
3062,
6714,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
20703,
15,
26,
220,
19,
935,
286,
1077,
5367,
25,
575,
18,
17,
284,
220,
16,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_titlecase() {
let context = Context::new(String::from("us"), None, Tokens::new(HashMap::new()));
assert_eq!(titlecase(&String::from("Väike-Sõjamäe"), &context), String::from("Väike-Sõjamäe"));
assert_eq!(titlecase(&String::from("Väike-sõjamäe"), &context), String::from("... | rust_cleaned_test_functions.jsonl/51459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6112,
5638,
368,
341,
286,
1077,
2266,
284,
9608,
486,
931,
2242,
486,
1499,
445,
355,
3975,
2240,
11,
58166,
486,
931,
7,
18497,
486,
931,
25138,
286,
2060,
10714,
10297,
2102,
5638,
2099,
703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sourcemap_merged() {
use juno::gen_js::*;
let mut context = Context::new();
let ctx = &mut context;
// original TS source:
// type A = number;
let input_src = r#"function foo() { 1; }"#;
let input_map = sourcemap::SourceMap::from_slice(
br#"{
... | rust_cleaned_test_functions.jsonl/102610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
413,
66,
42040,
90702,
368,
341,
262,
990,
502,
16311,
486,
4370,
26250,
56162,
262,
1077,
5206,
2266,
284,
9608,
486,
931,
543,
262,
1077,
5635,
284,
609,
6984,
2266,
280,
262,
442,
4024,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.