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_replace_2b() {
let data = "ประเทศไทย中华";
let repl = "دولة الكويت";
let b = "ะเ";
let b2 = "ปรدولة الكويتทศไทย中华";
assert_eq!(data.replace(b, repl), b2);
} | rust_cleaned_test_functions.jsonl/2434 | {
"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,
10633,
62,
17,
65,
368,
341,
286,
1077,
821,
284,
330,
130391,
100849,
876,
286,
1077,
5791,
284,
330,
130360,
134385,
3302,
286,
1077,
293,
284,
330,
72267,
27891,
876,
286,
1077,
293,
17,
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_read_directory_files() {
let dir = std::env::current_dir().unwrap();
let path = format!("{}/test", dir.as_path().to_str().unwrap());
let files = read_directory_files(path.as_ref()).unwrap();
assert_eq!(12, files.len())
} | rust_cleaned_test_functions.jsonl/16984 | {
"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,
6443,
14846,
10931,
368,
341,
286,
1077,
5419,
284,
1460,
486,
3160,
486,
3231,
4334,
1005,
15454,
543,
286,
1077,
1815,
284,
3561,
88928,
4472,
1944,
497,
5419,
5357,
2638,
1005,
983,
2895,
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... | 1 |
#[test]
fn test_option_deconstruct() {
// one octet of padding
let opt = Ipv6Option::new_unchecked(&IPV6OPTION_BYTES_PAD1);
assert_eq!(opt.option_type(), Type::Pad1);
// two octets of padding
let bytes: [u8; 2] = [0x1, 0x0];
let opt = Ipv6Option::new_unchecked(&... | rust_cleaned_test_functions.jsonl/130720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 634
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
2259,
7596,
368,
341,
286,
442,
825,
18491,
295,
315,
5300,
198,
286,
1077,
3387,
284,
358,
30168,
21,
5341,
486,
931,
4907,
7549,
2099,
3298,
53,
21,
34057,
40705,
36451,
16,
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_stone() {
assert_query!("14lb to st", 1, st);
assert_query!("(1qr / 2) to st", 1, st);
} | rust_cleaned_test_functions.jsonl/36186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 60
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
603,
368,
341,
262,
2060,
5738,
17223,
16,
19,
21123,
311,
357,
497,
220,
16,
11,
357,
317,
262,
2060,
5738,
17223,
7,
16,
23004,
608,
220,
17,
8,
311,
357,
497,
220,
16,
11,
357,
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 |
#[test]
fn test_mul() {
let a = "1".to_owned() + &repeat('0').take(60).collect::<String>();
let b = "1".to_owned() + &repeat("0").take(60).collect::<String>();
let cases = vec![
("12", "10", Res::Ok("120")),
("0", "-1.1", Res::Ok("0")),
("-123.456", "9... | rust_cleaned_test_functions.jsonl/13666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
341,
286,
1077,
264,
284,
330,
16,
3263,
983,
51973,
368,
488,
609,
30624,
492,
15,
1823,
22769,
7,
21,
15,
568,
17384,
27638,
703,
3913,
286,
1077,
293,
284,
330,
16,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_isometry_inverse() {
let axis = Unit::from_value(Vector3::unit_z());
let angle = Degrees(72_f64);
let distance = Vector3::new(-567_f64, 23_f64, 201_f64);
let isometry = Isometry3::from_axis_angle_translation(&axis, angle, &distance);
let isometry_inv = iso... | rust_cleaned_test_functions.jsonl/77229 | {
"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,
6892,
6988,
63333,
368,
341,
286,
1077,
8024,
284,
7954,
486,
1499,
3142,
20258,
18,
486,
3843,
6415,
1423,
286,
1077,
9210,
284,
92901,
7,
22,
17,
761,
21,
19,
317,
286,
1077,
6010,
284,
4196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stakes_not_delegate() {
let stakes_cache = StakesCache::new(Stakes {
epoch: 4,
..Stakes::default()
});
let ((vote_pubkey, vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
stakes_cache.check_and_... | rust_cleaned_test_functions.jsonl/22041 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
2050,
7913,
55312,
368,
341,
286,
1077,
44425,
11529,
284,
794,
2050,
8233,
486,
931,
7,
623,
2050,
341,
310,
16342,
25,
220,
19,
345,
310,
5241,
623,
2050,
486,
2258,
741,
286,
3011,
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_pdf() {
let pdf = |arg: DVector<f64>| move |x: MultivariateNormal| x.pdf(&arg);
test_case(vec![0., 0.], vec![1., 0., 0., 1.], 0.05854983152431917, pdf(dvec![1., 1.]));
test_almost(vec![0., 0.], vec![1., 0., 0., 1.], 0.013064233284684921, 1e-15, pdf(dvec![1., 2.]));
... | rust_cleaned_test_functions.jsonl/106557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 605
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39948,
368,
341,
286,
1077,
12782,
284,
760,
858,
25,
422,
3781,
63895,
21,
19,
69844,
3271,
760,
87,
25,
22162,
55422,
12206,
91,
856,
15995,
2099,
858,
317,
286,
1273,
19096,
25592,
20703,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_str() {
let s = "0123456789abc";
assert_eq!(sub_str(s, 0, 0), "");
assert_eq!(sub_str(s, 1, 3), "12");
assert_eq!(sub_str(s, 10, 13), "abc");
assert_eq!(sub_str(s, 10, 100), "abc");
} | rust_cleaned_test_functions.jsonl/115397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
2895,
368,
341,
262,
1077,
274,
284,
330,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
13683,
876,
262,
2060,
10714,
10297,
1966,
2895,
1141,
11,
220,
15,
11,
220,
15,
701,
14498,
262,
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_packed_decoder() {
let mut rng = thread_rng();
let len: usize = rng.gen_range(512..1024);
let mut expected = BooleanBufferBuilder::new(len);
let mut encoder = RleEncoder::new(1, 1024);
for _ in 0..len {
let bool = rng.gen_bool(0.8);
... | rust_cleaned_test_functions.jsonl/50832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
11191,
49843,
368,
341,
286,
1077,
5206,
28422,
284,
4516,
66849,
543,
286,
1077,
2422,
25,
22301,
284,
28422,
22822,
9698,
7,
20,
16,
17,
496,
16,
15,
17,
19,
626,
286,
1077,
5206,
3601,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sort_non_finite_numbers() {
let v = to_value(vec![
::std::f64::NEG_INFINITY, // NaN and friends get deserialized as Null by serde.
::std::f64::NAN,
])
.unwrap();
let args = HashMap::new();
let result = sort(&v, &args);
asse... | rust_cleaned_test_functions.jsonl/62054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
21637,
761,
15856,
32964,
368,
341,
286,
1077,
348,
284,
311,
3142,
25592,
90515,
310,
3504,
1834,
486,
69,
21,
19,
486,
97127,
91110,
11,
442,
32178,
323,
4780,
633,
939,
67577,
438,
180... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_preserve_final_newline_when_line_less_than_fold() {
new_ucmd!()
.arg("-b")
.pipe_in("1234\n")
.succeeds()
.stdout_is("1234\n");
} | rust_cleaned_test_functions.jsonl/23305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3710,
83,
24350,
43378,
32116,
5852,
20676,
5921,
1056,
47636,
6528,
50747,
51613,
61187,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
65,
1138,
286,
659,
13768,
1243,
445,
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_quotes() {
assert_eq!(eval(r#""1><2" + "3<>4""#), Ok(to_value("1><23<>4")));
assert_eq!(eval(r#""1==2" + "3--4""#), Ok(to_value("1==23--4")));
assert_eq!(eval(r#""1!=2" + "3>>4""#), Ok(to_value("1!=23>>4")));
assert_eq!(eval(r#""><1!=2" + "3>>4""#), Ok(to_value(">... | rust_cleaned_test_functions.jsonl/28416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75637,
368,
341,
286,
2060,
10714,
10297,
14170,
2601,
2,
3014,
16,
1784,
17,
1,
488,
330,
18,
21122,
19,
3014,
2,
701,
7622,
12186,
3142,
445,
16,
1784,
17,
18,
21122,
19,
17621,
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_list_null() {
let a =
create_list_array(&[Some(&[1, 2]), None, None, Some(&[3, 4]), None, None]);
let b =
create_list_array(&[Some(&[1, 2]), None, None, Some(&[3, 4]), None, None]);
test_equal(a.as_ref(), b.as_ref(), true);
let b = create_... | rust_cleaned_test_functions.jsonl/106082 | {
"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,
2019,
15162,
368,
341,
286,
1077,
264,
4035,
310,
1855,
2019,
3858,
2099,
58,
8373,
2099,
58,
16,
11,
220,
17,
9719,
2240,
11,
2240,
11,
4329,
2099,
58,
18,
11,
220,
19,
9719,
2240,
11,
2240... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_attrs_iter() {
let encoding = Encoding {
format: Format::Dwarf32,
version: 4,
address_size: 4,
};
let unit = UnitHeader::new(
encoding,
7,
DebugAbbrevOffset(0x0807_0605),
EndianSlice::new(... | rust_cleaned_test_functions.jsonl/102063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1983
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39578,
11723,
368,
341,
286,
1077,
11170,
284,
29330,
341,
310,
3561,
25,
15042,
486,
35,
32634,
18,
17,
345,
310,
2319,
25,
220,
19,
345,
310,
2621,
2368,
25,
220,
19,
345,
286,
2605,
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... | 4 |
#[test]
fn test_field_range() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-d", ",", "-f", "2-4", "sed", "s/./_/"])
.write_stdin("AAA,BBB,CCC,DDD\nEEE,FFF,GGG,HHH\n")
.assert()
.stdout("AAA,_BB,_CC,_DD\nEEE,_FF,_... | rust_cleaned_test_functions.jsonl/7922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
9698,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
2099,
1183,
12,
67,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recognize_utf8_boundary_half_debt_one() {
let buf: &[u8] = &[0x61, 0x61, 0xC9, 0x92, 0x0d, 0x0a, 0x0d, 0x0a];
let mut full = buffer_from(buf);
let result = block_on(async { recognize(&mut full).await });
assert_eq!(result.unwrap().find_header("Complex"), Some("aaɒ".to_string()));
} | rust_cleaned_test_functions.jsonl/48189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
3934,
551,
39453,
23,
54004,
40626,
2259,
12755,
11667,
368,
341,
220,
1077,
6607,
25,
44590,
84,
23,
60,
284,
44590,
15,
87,
21,
16,
11,
220,
15,
87,
21,
16,
11,
220,
15,
12125,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_does_not_detect_a_differently_cased_word_as_its_own_anagram() {
let inputs = ["bAnana"];
let outputs: Vec<&str> = vec![];
assert_eq!(anagram::anagrams_for("banana", &inputs), outputs);
} | rust_cleaned_test_functions.jsonl/65514 | {
"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,
96374,
7913,
56457,
4306,
814,
14320,
4402,
666,
1475,
13533,
11898,
62,
1199,
82100,
12008,
5745,
368,
341,
262,
1077,
11127,
284,
4383,
65,
2082,
3362,
6332,
262,
1077,
16275,
25,
11312,
52244,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_parent_dir_if_missing() {
let root_path = Builder::new()
.prefix("test_create_parent_dir_if_missing")
.tempdir()
.unwrap();
let path = root_path.path().join("not_exist_dir");
let mut tikv_cfg = TiKvConfig::default();
tik... | rust_cleaned_test_functions.jsonl/2148 | {
"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,
8657,
15960,
4334,
11119,
40447,
368,
341,
286,
1077,
3704,
2638,
284,
20626,
486,
931,
741,
310,
659,
11849,
445,
1944,
8657,
15960,
4334,
11119,
40447,
1138,
310,
659,
3888,
3741,
741,
310,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kg_and_g() {
let int = &Never::default();
let base_kg = BaseUnit::new("kilogram".into());
let mut hashmap = HashMap::new();
hashmap.insert(base_kg, 1.into());
let kg = NamedUnit::new("k".into(), "g".into(), "g".into(), hashmap.clone(), 1);
le... | rust_cleaned_test_functions.jsonl/73912 | {
"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,
34729,
4698,
70,
8378,
1889,
368,
341,
286,
1077,
526,
284,
609,
26155,
486,
2258,
543,
286,
1077,
2331,
4698,
70,
284,
5351,
4562,
486,
931,
445,
85526,
12958,
3263,
18122,
1423,
286,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_created_time() {
let fs = FileSystem::default();
let file = fs
.new_open_options()
.write(true)
.create_new(true)
.open(path!("/foo.txt"))
.expect("failed to create a new file");
let created_time = file.created_... | rust_cleaned_test_functions.jsonl/52776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27288,
3009,
368,
341,
286,
1077,
8619,
284,
53461,
486,
2258,
1428,
286,
1077,
1034,
284,
8619,
198,
310,
659,
931,
11311,
8743,
741,
310,
659,
4934,
3715,
340,
310,
659,
3182,
5921,
3715,
340,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ecdsa_send_dealings_with_complaints() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
with_test_replica_logger(|logger| {
let (ecdsa_pool, pre_signer) = create_pre_signer_dependencies(pool_config, logger);
let (... | rust_cleaned_test_functions.jsonl/86712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 992
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
13565,
2259,
278,
819,
6615,
2965,
31297,
82,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
448,
4452,
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_nil() {
let text = " {% if var == nil %} true {% else %} false {% endif %} ";
assert_template_result!(" true ", text, v!({ "var": nil }));
let text = " {% if var == null %} true {% else %} false {% endif %} ";
assert_template_result!(" true ", text, v!({ "var": nil }));
} | rust_cleaned_test_functions.jsonl/28137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36175,
368,
341,
262,
1077,
1467,
284,
330,
52261,
421,
762,
621,
2092,
1018,
92,
830,
52261,
770,
1018,
92,
895,
52261,
12330,
1018,
92,
7620,
262,
2060,
8693,
5287,
17223,
220,
830,
220,
3670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mutex_arc_access_in_unwind() {
let arc = Arc::new(Mutex::new(1));
let arc2 = arc.clone();
let _ = thread::spawn(move || -> () {
struct Unwinder {
i: Arc<Mutex<i32>>,
}
impl Drop for Unwinder {
fn drop(&mu... | rust_cleaned_test_functions.jsonl/8921 | {
"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,
14204,
62914,
12759,
1243,
4907,
19154,
368,
341,
286,
1077,
15580,
284,
19689,
486,
931,
3189,
9371,
486,
931,
7,
16,
1106,
286,
1077,
15580,
17,
284,
15580,
15997,
543,
286,
1077,
716,
284,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_login_ok() {
let client = Client::new(rocket()).expect("valid src instance");
let response = client.post("/user/login").body(r#"{ "username": "tester_static", "password": "G00DP4SSW0RD" }"#).dispatch();
assert_eq!(response.status(), Status::Ok);
} | rust_cleaned_test_functions.jsonl/101441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13681,
19817,
368,
341,
286,
1077,
2943,
284,
8423,
486,
931,
7,
46790,
6011,
17119,
445,
1891,
2286,
2867,
797,
286,
1077,
2033,
284,
2943,
6542,
4283,
872,
16543,
1827,
2599,
2601,
2,
14129,
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_parse_socket_address() {
assert_eq!(
parse_socket_address("216.10.234.56", 12345),
"216.10.234.56:12345"
);
assert_eq!(parse_socket_address("0.0.0.0", 12345), "localhost:12345");
assert_eq!(parse_socket_address("::", 12345), "localhost:1234... | rust_cleaned_test_functions.jsonl/2954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19555,
6744,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
19555,
6744,
445,
17,
16,
21,
13,
16,
15,
13,
17,
18,
19,
13,
20,
21,
497,
220,
16,
17,
18,
19,
20,
1326,
310,
330,
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_b_minor_scale() {
assert_eq!(
minor_scale(Note::B),
["B", "C#", "D", "E", "F#", "G", "A"]
);
} | rust_cleaned_test_functions.jsonl/38488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
70861,
16727,
368,
341,
286,
2060,
10714,
33673,
310,
8922,
16727,
89389,
486,
33,
1326,
310,
4383,
33,
497,
330,
34,
75915,
330,
35,
497,
330,
36,
497,
330,
37,
75915,
330,
38,
497,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_entity_vertex_manager() {
let application = init_application();
let entity_type_manager = application.get_entity_type_manager();
let entity_vertex_manager = application.get_entity_vertex_manager();
let graph_database = application.get_graph_database();
let transaction = graph... | rust_cleaned_test_functions.jsonl/112047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 775
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19169,
26611,
12144,
368,
341,
262,
1077,
3766,
284,
2930,
38721,
543,
262,
1077,
5387,
1819,
12144,
284,
3766,
670,
19169,
1819,
12144,
543,
262,
1077,
5387,
26611,
12144,
284,
3766,
670,
19169,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_large_data() {
assert_eq!(
SensitiveBuffer::try_from(vec![0xffu8; SENSITIVE_BUFFER_MAX_SIZE + 1])
.expect_err("Converting a buffer that is to large did not produce an error"),
Error::WrapperError(WrapperErrorKind::WrongParamSize),
"Wrong kind of error w... | rust_cleaned_test_functions.jsonl/90736 | {
"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,
2346,
45228,
1769,
368,
341,
262,
2060,
10714,
33673,
286,
328,
18723,
4095,
486,
1539,
5673,
25592,
20703,
15,
9020,
84,
23,
26,
328,
20359,
44350,
14394,
6806,
4098,
488,
220,
16,
2546,
310,
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_receipt_round_trip() {
let sapling = &*sapling_bls12::SAPLING;
let spender_key: SaplingKey<Bls12> = SaplingKey::generate_key(sapling.clone());
let note = Note::new(
sapling.clone(),
spender_key.generate_public_address(),
42,
... | rust_cleaned_test_functions.jsonl/10712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77974,
29896,
63883,
368,
341,
286,
1077,
34635,
2718,
284,
609,
9,
64613,
2718,
880,
4730,
16,
17,
486,
50,
2537,
74115,
280,
286,
1077,
83888,
3097,
25,
80175,
2718,
1592,
32519,
4730,
16,
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_parse_error_other() {
assert_eq!(
Message::parse(&Bytes::from("4 48 46 I'm a teapot!")),
Some(Message::Response(Response {
message_id: 48,
request_message_id: 46,
data: Err(ErrorKind::Other(Bytes::from("I'm a teapot!"))),
}))
);... | rust_cleaned_test_functions.jsonl/1090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4096,
30456,
368,
341,
262,
2060,
10714,
33673,
286,
4856,
486,
6400,
2099,
7078,
486,
1499,
445,
19,
220,
19,
23,
220,
19,
21,
358,
2776,
264,
1013,
89901,
0,
30154,
286,
4329,
29359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_security() {
let causet = SecurityConfig::default();
// default is disable secure connection.
causet.validate().unwrap();
let mgr = SecurityManager::new(&causet).unwrap();
assert!(mgr.causet.ca_path.is_empty());
assert!(mgr.causet.cert_path.is_empt... | rust_cleaned_test_functions.jsonl/66519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 921
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48726,
368,
341,
286,
1077,
2162,
18187,
284,
8234,
2648,
486,
2258,
543,
286,
442,
1638,
374,
11156,
9767,
3633,
624,
286,
2162,
18187,
19520,
1005,
15454,
543,
286,
1077,
57897,
284,
8234,
2043,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syntax_error_message() {
let result = serde_json::from_str::<cm::Name>("foo").map_err(Error::from);
assert_matches!(result, Err(Error::Parse(_)));
} | rust_cleaned_test_functions.jsonl/62647 | {
"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,
78894,
4096,
6462,
368,
341,
286,
1077,
1102,
284,
61570,
9455,
486,
1499,
2895,
27638,
6226,
486,
675,
13211,
7975,
1827,
2186,
9266,
37396,
486,
1499,
317,
286,
2060,
38344,
10297,
1382,
11,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_with_prefix() {
let separator = [0x00, 0x00];
let mut data = io::Cursor::new(vec![
0xAA, 0xAB, // Prefix
0x00, 0x00, 0x01, 0x02, 0x03, // FullMatch
0x00, 0x00, 0x04, 0x05, 0x06, // FullMatch
0x00, 0x00, 0x07, 0x08 // Suffix... | rust_cleaned_test_functions.jsonl/28677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
13974,
368,
341,
262,
1077,
24792,
284,
508,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
935,
262,
1077,
5206,
821,
284,
6399,
486,
14543,
486,
931,
25592,
90515,
286,
220,
15,
60051,
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_vote_serialization() {
let dt = "2017-12-25T03:00:01.234Z".parse::<DateTime<Utc>>().unwrap();
let t = TimeMsg {
seconds: dt.timestamp(),
nanos: dt.timestamp_subsec_nanos() as i32,
};
let vote = Vote {
vote_type: SignedMsgType::P... | rust_cleaned_test_functions.jsonl/71172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
25602,
2022,
368,
341,
286,
1077,
7594,
284,
330,
17,
15,
16,
22,
12,
16,
17,
12,
17,
20,
51,
15,
18,
25,
15,
15,
25,
15,
16,
13,
17,
18,
19,
57,
3263,
6400,
27638,
7689,
36397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_log() {
let time_now = time::now();
let time_before = time_now - time::Duration::minutes(10);
let time_before = time_before.to_local();
let time_after = time_now + time::Duration::minutes(10);
let time_after = time_after.to_local();
let... | rust_cleaned_test_functions.jsonl/33848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
5224,
368,
341,
286,
1077,
882,
20813,
262,
284,
882,
486,
3328,
543,
286,
1077,
882,
23708,
284,
882,
20813,
481,
882,
486,
12945,
486,
37037,
7,
16,
15,
317,
286,
1077,
882,
23708,
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_example2() {
let input = vec![0, 2, 2, 2, 1, 1, 2, 2, 2, 2, 1, 2, 0, 0, 0, 0];
let layers = parse_space_image_format(&input, 2, 2);
let mut image = Vec::new();
for p in 0..4 {
let color = layers
.iter()
.find(|layer| l... | rust_cleaned_test_functions.jsonl/10793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
17,
368,
341,
286,
1077,
1946,
284,
7486,
20703,
15,
11,
220,
17,
11,
220,
17,
11,
220,
17,
11,
220,
16,
11,
220,
16,
11,
220,
17,
11,
220,
17,
11,
220,
17,
11,
220,
17,
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_type_required_string() {
let schemaReplicant = SchemaReplicant::default();
let causetq = r#"[:find ?x :where [?x _ ?e] [(type ?e :edb.type/string)]]"#;
let SQLCausetQ { allegrosql, args } = translate(&schemaReplicant, causetq);
// Note: strings should use `all_Causets` and not ... | rust_cleaned_test_functions.jsonl/90704 | {
"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,
1819,
18743,
3904,
368,
341,
262,
1077,
10802,
18327,
35237,
284,
12539,
18327,
35237,
486,
2258,
1428,
262,
1077,
2162,
18187,
80,
284,
435,
55543,
3447,
3903,
937,
87,
549,
2870,
508,
30,
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_create_fdt_with_initrd() {
let regions = arch_memory_regions(layout::FDT_MAX_SIZE + 0x1000);
let mem = GuestMemoryMmap::new(®ions).expect("Cannot initialize memory");
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
let gic = create_gic... | rust_cleaned_test_functions.jsonl/90777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
761,
8047,
6615,
6137,
6498,
368,
341,
286,
1077,
13604,
284,
5325,
19195,
58035,
19930,
486,
37,
10599,
6806,
4098,
488,
220,
15,
87,
16,
15,
15,
15,
317,
286,
1077,
1833,
284,
26215,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or_with_one_in_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let query = Operator::Or(
vec![
Operator::In(
TagName::PlainTagName(name1.clone()),
vec![TargetValue::Unencry... | rust_cleaned_test_functions.jsonl/11915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
11667,
1243,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
3239,
284,
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_vec_list_pop_back() {
let mut list = VecList::new();
assert_eq!(list.pop_back(), None);
list.push_back(0);
assert_eq!(list.pop_back(), Some(0));
} | rust_cleaned_test_functions.jsonl/11544 | {
"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,
13251,
2019,
17061,
3895,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
2060,
10714,
10297,
1607,
8288,
3895,
1507,
2240,
626,
286,
1140,
2552,
3895,
7,
15,
317,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_find_all_at_start() {
let text = b"dhjalkjwqnnnannanaflkjdklfj";
let pattern = b"dhjalk";
let kmp = KMP::new(pattern);
assert_eq!(kmp.find_all(text).collect_vec(), [0]);
} | rust_cleaned_test_functions.jsonl/12992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
3752,
4906,
368,
341,
286,
1077,
1467,
284,
293,
1,
30621,
73,
1692,
73,
86,
80,
7370,
77,
1020,
3362,
1489,
74,
88851,
11008,
73,
876,
286,
1077,
5383,
284,
293,
1,
30621,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serversessionmemorycache_overwrites_put() {
let c = ServerSessionMemoryCache::new(4);
assert_eq!(c.put(vec![0x01], vec![0x02]), true);
assert_eq!(c.put(vec![0x01], vec![0x04]), true);
assert_eq!(c.get(&[0x01]), Some(vec![0x04]));
} | rust_cleaned_test_functions.jsonl/8734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67507,
1338,
17269,
9360,
15431,
59079,
15557,
368,
341,
286,
1077,
272,
284,
8422,
5283,
10642,
8233,
486,
931,
7,
19,
317,
286,
2060,
10714,
10297,
66,
3597,
25592,
20703,
15,
87,
15,
16,
1125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stdin_default() {
new_ucmd!()
.pipe_in_fixture(FOOBAR_TXT)
.run()
.stdout_is_fixture("foobar_stdin_default.expected");
} | rust_cleaned_test_functions.jsonl/31118 | {
"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,
15656,
258,
9993,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
13768,
1243,
74409,
7,
3788,
20608,
934,
84411,
340,
286,
659,
6108,
741,
286,
659,
36358,
6892,
74409,
445,
50267,
15656,
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 |
#[test]
fn test_atanh() {
assert_eq!(0.0f32.atanh(), 0.0f32);
assert_eq!((-0.0f32).atanh(), -0.0f32);
let inf32: f32 = Float::infinity();
let neg_inf32: f32 = Float::neg_infinity();
assert_eq!(1.0f32.atanh(), inf32);
assert_eq!((-1.0f32).atanh(), neg_inf32);
... | rust_cleaned_test_functions.jsonl/33110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
27924,
368,
341,
286,
2060,
10714,
10297,
15,
13,
15,
69,
18,
17,
6847,
27924,
1507,
220,
15,
13,
15,
69,
18,
17,
317,
286,
2060,
10714,
0,
54934,
15,
13,
15,
69,
18,
17,
568,
16225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execute_input() {
let mut machine = Machine::new(vec![3,5,3,6,99,0,0]);
machine.input = vec![10, 11];
machine.execute().unwrap();
assert_eq!(machine.mem, vec![3,5,3,6,99,10,11]);
} | rust_cleaned_test_functions.jsonl/43083 | {
"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,
44329,
5898,
368,
341,
10217,
5206,
5662,
284,
12960,
486,
931,
25592,
20703,
18,
11,
20,
11,
18,
11,
21,
11,
24,
24,
11,
15,
11,
15,
2558,
2109,
3814,
10046,
284,
7486,
20703,
16,
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_frozen_account_from_snapshot() {
solana_logger::setup_with_default(RUST_LOG_FILTER);
let validator_identity =
Arc::new(solana_sdk::signature::keypair_from_seed(&[0u8; 32]).unwrap());
let mut snapshot_test_config = setup_snapshot_validator_config(5, 1);
// Freeze the vali... | rust_cleaned_test_functions.jsonl/31905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 667
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
42240,
13500,
5673,
53265,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
6615,
9993,
2785,
8553,
8419,
23728,
317,
262,
1077,
22935,
46244,
4035,
286,
19689,
486,
931,
80608,
3362,
61783,
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_invalid() {
assert_eq!("--129".parse::<i8>().ok(), None);
assert_eq!("++129".parse::<i8>().ok(), None);
assert_eq!("Съешь".parse::<u8>().ok(), None);
} | rust_cleaned_test_functions.jsonl/108504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
368,
341,
262,
2060,
10714,
17223,
313,
16,
17,
24,
3263,
6400,
27638,
72,
23,
10483,
562,
1507,
2240,
317,
262,
2060,
10714,
17223,
1027,
16,
17,
24,
3263,
6400,
27638,
72,
23,
10483,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_key() {
let (salt, encryption_key) = EncryptedKeyStore::derive_key(PASSPHRASE, None).unwrap();
let (second_salt, second_key) =
EncryptedKeyStore::derive_key(PASSPHRASE, Some(salt.as_ref().to_vec())).unwrap();
assert_eq!(
encryption_key, s... | rust_cleaned_test_functions.jsonl/37717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
3097,
368,
341,
286,
1077,
320,
42226,
11,
25463,
3097,
8,
284,
10751,
14026,
1592,
6093,
486,
27098,
3097,
5304,
4939,
10842,
49,
4066,
11,
2240,
568,
15454,
543,
286,
1077,
320,
5569,
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_parse_motherboard_daughterboard() {
assert_eq!(
LastError {
motherboard: ErrorCode::COMMAND_DATA_INCORRECT,
daughterboard: Some(ErrorCode::CHANNEL_INACTIVE),
},
parse(&vec![0x00, 0x02, 0x00, 0x04]).unwrap()
);
... | rust_cleaned_test_functions.jsonl/8383 | {
"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,
21039,
717,
1575,
2482,
47070,
7340,
2482,
368,
341,
286,
2060,
10714,
33673,
310,
7996,
1454,
341,
394,
64243,
25,
60084,
486,
60541,
7896,
39901,
868,
44840,
345,
394,
9803,
2482,
25,
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_decode_strw_imm() {
assert_eq!(
decode_32(0xf8434b04),
Instruction::STR_imm {
params: Reg2FullParams {
rt: Reg::R4,
rn: Reg::R3,
imm32: 4,
index: false,
add: true,
... | rust_cleaned_test_functions.jsonl/64791 | {
"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,
15227,
2895,
86,
71370,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
23,
19,
18,
19,
65,
15,
19,
1326,
286,
29051,
486,
6666,
71370,
341,
310,
3628,
25,
3184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stacked_porep_extract_all_poseidon_sub_8_2() {
test_extract_all::<DiskTree<PoseidonHasher, U8, U2, U0>>();
} | rust_cleaned_test_functions.jsonl/56520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
11191,
620,
460,
79,
39123,
5705,
33201,
90456,
5228,
62,
23,
62,
17,
368,
341,
262,
1273,
39123,
5705,
27638,
47583,
6533,
21604,
960,
90456,
6370,
261,
11,
547,
23,
11,
547,
17,
11,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_serde() {
let value = AuditLog {
entries: Vec::new(),
integrations: Vec::new(),
threads: Vec::new(),
users: Vec::new(),
webhooks: Vec::new(),
};
serde_test::assert_tokens(
&value,
&[
... | rust_cleaned_test_functions.jsonl/34662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
368,
341,
286,
1077,
897,
284,
47646,
2201,
341,
310,
10695,
25,
11312,
486,
931,
3148,
310,
8761,
804,
25,
11312,
486,
931,
3148,
310,
14564,
25,
11312,
486,
931,
3148,
310,
3847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_island_backward() {
let info = EmitInfo::new(settings::Flags::new(settings::builder()));
let mut buf = MachBuffer::new();
let mut state = Default::default();
buf.reserve_labels_for_blocks(4);
buf.bind_label(label(0));
let inst = Inst::Nop4;
... | rust_cleaned_test_functions.jsonl/17889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 776
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
1933,
70477,
368,
341,
286,
1077,
3546,
284,
61537,
1731,
486,
931,
23369,
486,
9195,
486,
931,
23369,
486,
17850,
7392,
286,
1077,
5206,
6607,
284,
18294,
4095,
486,
931,
543,
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... | 2 |
#[test]
fn test_explorer_add_invalid_transaction() {
let (_testkit, api) = init_testkit();
// Send valid transaction.
let keypair = KeyPair::random();
let tx = keypair.reset(SERVICE_ID, ());
let data = hex::encode(tx.to_bytes());
let response = api
.public(ApiKind::Explorer)
... | rust_cleaned_test_functions.jsonl/55303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 499
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
79825,
2891,
31433,
28884,
368,
341,
262,
1077,
5453,
1944,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
1428,
262,
442,
11000,
2697,
7745,
624,
262,
1077,
1376,
12670,
284,
5309,
12443,
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_distributions_iter() {
use crate::distributions::Open01;
let mut rng = crate::test::rng(210);
let distr = Open01;
let mut iter = Distribution::<f32>::sample_iter(distr, &mut rng);
let mut sum: f32 = 0.;
for _ in 0..100 {
sum += iter.nex... | rust_cleaned_test_functions.jsonl/23055 | {
"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,
814,
17994,
11723,
368,
341,
286,
990,
17717,
486,
67,
17994,
486,
5002,
15,
16,
280,
286,
1077,
5206,
28422,
284,
17717,
486,
1944,
486,
69890,
7,
17,
16,
15,
317,
286,
1077,
7905,
284,
5264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_meta() {
parse_macro(
r#"
macro_rules! foo {
($ i:meta) => (
#[$ i]
fn bar() {}
)
}
"#,
)
.assert_expand_items(
r#"foo! { cfg(target_os = "windows") }"#,
r#"# [cfg (target_os = "windows")]... | rust_cleaned_test_functions.jsonl/32683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13381,
368,
341,
262,
4715,
58810,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
600,
25,
5490,
8,
589,
2399,
394,
671,
3442,
600,
921,
394,
5168,
3619,
368,
5613,
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_eq() {
let first = important_cities();
let second = important_cities().into_iter().rev().collect::<DirectIdMap<_, _>>();
assert_eq!(first, second);
} | rust_cleaned_test_functions.jsonl/38658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
368,
341,
262,
1077,
1156,
284,
2989,
666,
1361,
543,
262,
1077,
2086,
284,
2989,
666,
1361,
1005,
18122,
11723,
1005,
7282,
1005,
17384,
27638,
16027,
764,
2227,
27,
6878,
716,
79279,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_deletable_not_readonly() {
with_object(0, |activation, object| {
object.as_script_object().unwrap().define_value(
activation.context.gc_context,
"test",
"initial".into(),
Attribute::DONT_DELETE,
);
... | rust_cleaned_test_functions.jsonl/19715 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
1149,
480,
7913,
6443,
3243,
368,
341,
286,
448,
5314,
7,
15,
11,
760,
23002,
11,
1633,
91,
341,
310,
1633,
5357,
14660,
5314,
1005,
15454,
1005,
1289,
3142,
1006,
394,
15099,
8681,
65554,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accounts_trait_for_vec() {
let program_id = Pubkey::default();
let key = Pubkey::default();
let mut lamports1 = 0;
let mut data1 = vec![0; 10];
let owner = Pubkey::default();
let account1 = AccountInfo::new(
&key,
true,
... | rust_cleaned_test_functions.jsonl/74418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
78491,
5478,
13251,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
2258,
1428,
286,
1077,
1376,
284,
22611,
792,
486,
2258,
543,
286,
1077,
5206,
31603,
3394,
16,
284,
220,
15,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verse_1() {
assert_eq!(beer::verse(1), "1 bottle of beer on the wall, 1 bottle of beer.\nTake it down and pass it around, no more bottles of beer on the wall.\n");
} | rust_cleaned_test_functions.jsonl/32422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4450,
62,
16,
368,
341,
262,
2060,
10714,
10297,
47795,
486,
4450,
7,
16,
701,
330,
16,
16486,
315,
12883,
389,
279,
7002,
11,
220,
16,
16486,
315,
12883,
7110,
77,
17814,
432,
1495,
323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_jwt() {
let signing_key = CoreRsaPrivateSigningKey::from_pem(
TEST_RSA_PRIV_KEY,
Some(JsonWebKeyId::new(
"bilbo.baggins@hobbiton.example".to_string(),
)),
)
.unwrap();
let new_jwt = JsonWebToken::<
... | rust_cleaned_test_functions.jsonl/66761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
95576,
368,
341,
286,
1077,
15971,
3097,
284,
9518,
49,
9081,
16787,
93358,
1592,
486,
1499,
620,
336,
1006,
310,
13602,
76994,
70625,
6600,
345,
310,
4329,
39341,
5981,
81343,
486,
931,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_report_denied_by_policy() {
block_on(async {
let response = json!({"response":{
"server": "prod",
"protocol": "3.0",
"app": [{
"appid": "{00000000-0000-0000-0000-000000000001}",
"status": "ok",
... | rust_cleaned_test_functions.jsonl/59673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 954
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
49522,
1122,
3710,
22773,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2033,
284,
2951,
0,
16864,
2322,
12602,
1060,
330,
4030,
788,
330,
19748,
756,
1060,
330,
17014,
788,
330,
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_del() {
test(b"\x7f", "\u{fffd}\n");
test(
b"\x7fhello\x7fworld\x7f",
"\u{fffd}hello\u{fffd}world\u{fffd}\n",
);
} | rust_cleaned_test_functions.jsonl/36861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18029,
368,
341,
262,
1273,
1883,
11934,
87,
22,
69,
497,
2917,
84,
90,
542,
6902,
11035,
77,
797,
262,
1273,
1006,
286,
293,
11934,
87,
22,
69,
14990,
3462,
22,
69,
14615,
3462,
22,
69,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str_truncate_invalid_len() {
let mut s = String::from("12345");
s.truncate(6);
assert_eq!(s, "12345");
} | rust_cleaned_test_functions.jsonl/3174 | {
"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,
2895,
3547,
26900,
31433,
6043,
368,
341,
262,
1077,
5206,
274,
284,
923,
486,
1499,
445,
16,
17,
18,
19,
20,
797,
262,
274,
5427,
26900,
7,
21,
317,
262,
2060,
10714,
10297,
82,
11,
330,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_create_tx_input_hd_keypaths() {
use bitcoin::util::bip32::{DerivationPath, Fingerprint};
use std::str::FromStr;
let (wallet, _, _) = get_funded_wallet("wpkh([d34db33f/44'/0'/0']tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGx... | rust_cleaned_test_functions.jsonl/11337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
5898,
60111,
3097,
21623,
368,
341,
286,
990,
17873,
486,
1314,
486,
65,
573,
18,
17,
22964,
22171,
39127,
1820,
11,
434,
47918,
2440,
286,
990,
1460,
486,
495,
486,
3830,
2580,
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... | 1 |
#[test]
fn test_sign_hash() {
let pk = PrivateKey { sk: Scalar::from_bytes(&[10, 145, 220, 128, 41, 236, 187, 134, 47, 34, 61, 132, 196, 20, 201, 239, 33, 80, 184, 182, 49, 79, 15, 212, 4, 73, 201, 248, 74, 226, 158, 12]).unwrap() };
let hash = [1, 95, 34, 213, 221, 202, 70, 0, 221, 118, 193, 93, 225, 2... | rust_cleaned_test_functions.jsonl/131748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
8950,
368,
341,
262,
1077,
22458,
284,
9679,
1592,
314,
1901,
25,
35176,
486,
1499,
12524,
2099,
58,
16,
15,
11,
220,
16,
19,
20,
11,
220,
17,
17,
15,
11,
220,
16,
17,
23,
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_change_host() {
let host = StringNonEmpty::static_str("http://localhost:4443");
assert_eq!(
&change_host(&host, &format!("{}/storage/v1/foo", GOOGLE_APIS)).unwrap(),
"http://localhost:4443/storage/v1/foo"
);
let h1 = url::Url::parse(HARDCO... | rust_cleaned_test_functions.jsonl/30683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 755
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
12848,
368,
341,
286,
1077,
3468,
284,
923,
8121,
3522,
486,
1978,
2895,
445,
1254,
1110,
8301,
25,
19,
19,
19,
18,
797,
286,
2060,
10714,
33673,
310,
609,
3373,
12848,
2099,
3790,
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_display() {
let a = BigInt::parse_bytes(b"A", 16).unwrap();
let hello = BigInt::parse_bytes("-22405534230753963835153736737".as_bytes(), 10).unwrap();
assert_eq!(format!("{}", a), "10");
assert_eq!(format!("{}", hello), "-22405534230753963835153736737");
assert_eq!(format!("... | rust_cleaned_test_functions.jsonl/56645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
262,
1077,
264,
284,
62608,
486,
6400,
12524,
1883,
29133,
497,
220,
16,
21,
568,
15454,
543,
262,
1077,
23811,
284,
62608,
486,
6400,
12524,
13645,
17,
17,
19,
15,
20,
20,
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_encode_flight_data() {
let options = arrow::ipc::writer::IpcWriteOptions::default();
let c1 = UInt32Array::from(vec![1, 2, 3, 4, 5, 6]);
let batch = RecordBatch::try_from_iter(vec![("a", Arc::new(c1) as ArrayRef)])
.expect("cannot create record batch");
... | rust_cleaned_test_functions.jsonl/30627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 614
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
90370,
1769,
368,
341,
286,
1077,
2606,
284,
17921,
486,
68281,
486,
18189,
486,
40,
3992,
7985,
3798,
486,
2258,
543,
286,
1077,
272,
16,
284,
22275,
18,
17,
1857,
486,
1499,
25592,
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_smoke() {
let mut comp = TextInputComponent::new(
SharedTheme::default(),
SharedKeyConfig::default(),
"",
"",
false,
);
comp.set_text(String::from("a\nb"));
assert_eq!(comp.cursor_position, 0);
... | rust_cleaned_test_functions.jsonl/771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15874,
4740,
368,
341,
286,
1077,
5206,
1367,
284,
42232,
2189,
486,
931,
1006,
310,
16990,
12594,
486,
2258,
3148,
310,
16990,
1592,
2648,
486,
2258,
3148,
310,
8324,
310,
8324,
310,
895,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sequence_number_cache() {
// checks potential race where StateDB is lagging
let mut pool = setup_mempool().0;
// callback from consensus should set current sequence number for account
pool.remove_transaction(&TestTransaction::get_address(1), 5, false);
// try to add transact... | rust_cleaned_test_functions.jsonl/1802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23735,
5500,
11529,
368,
341,
262,
442,
12341,
4650,
6957,
1380,
3234,
3506,
374,
21454,
3173,
198,
262,
1077,
5206,
7314,
284,
6505,
717,
3262,
1749,
1005,
15,
280,
262,
442,
4822,
504,
23869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_send() {
let mut transport = create_test_transport();
transport.send("127.0.0.1:3000".parse().unwrap(), test_payload());
let packet = &transport.messages[0];
assert_eq!(transport.messages.len(), 1);
assert_eq!(packet.payload, test_payload());
} | rust_cleaned_test_functions.jsonl/62665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
368,
341,
286,
1077,
5206,
7557,
284,
1855,
4452,
46398,
1428,
286,
7557,
5219,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
18,
15,
15,
15,
3263,
6400,
1005,
15454,
1507,
1273,
32813... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_optional_config_val() {
let closure = Url::parse;
let mut config: HashMap<String, String> = HashMap::new();
config.insert("valid".to_string(), DEFAULT_URL.to_string());
config.insert("invalid".to_string(), "invalid_url".to_string());
//Success
... | rust_cleaned_test_functions.jsonl/115825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
74644,
5332,
6189,
368,
341,
286,
1077,
21955,
284,
22840,
486,
6400,
280,
286,
1077,
5206,
2193,
25,
10528,
3464,
11,
923,
29,
284,
10528,
486,
931,
543,
286,
2193,
7030,
445,
1891,
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_ref_str() {
let a = "a";
let b = "b";
let selections = &[a, b];
assert_eq!(
Select::new().default(0).items(&selections[..]).items,
selections
);
} | rust_cleaned_test_functions.jsonl/17348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7793,
2895,
368,
341,
286,
1077,
264,
284,
330,
64,
876,
286,
1077,
293,
284,
330,
65,
3302,
286,
1077,
37399,
284,
44590,
64,
11,
293,
4821,
286,
2060,
10714,
33673,
310,
8427,
486,
931,
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 |
#[test]
fn test_emit_and_read_query() {
let mut message = Message::new();
message
.set_id(10)
.set_message_type(MessageType::Response)
.set_op_code(OpCode::Update)
.set_authoritative(true)
.set_truncated(true)
.set_recursion_desired(true)
.set_recu... | rust_cleaned_test_functions.jsonl/23869 | {
"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,
69082,
8378,
6443,
5738,
368,
341,
262,
1077,
5206,
1943,
284,
4856,
486,
931,
543,
262,
1943,
198,
286,
659,
746,
842,
7,
16,
15,
340,
286,
659,
746,
6462,
1819,
29359,
929,
486,
2582,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_public_key() {
let multiplier = Big::new_int(5);
let mut point = GroupG1::generator();
point = point.mul(&multiplier);
let public_key = PublicKey {
point: point.clone(),
};
let aggregate_public_key = AggregatePublicKey::from_public... | rust_cleaned_test_functions.jsonl/112223 | {
"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,
5673,
27074,
3097,
368,
341,
286,
1077,
30559,
284,
6164,
486,
931,
4042,
7,
20,
317,
286,
1077,
5206,
1459,
284,
5737,
38,
16,
486,
35851,
543,
286,
1459,
284,
1459,
53141,
2099,
26268,
7875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_suffix() {
new_ucmd!()
.args(&["/usr/local/bin/reallylongexecutable.exe", ".exe"])
.succeeds()
.stdout_only("reallylongexecutable\n");
} | rust_cleaned_test_functions.jsonl/82221 | {
"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,
18193,
37151,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
14,
7063,
22270,
8749,
10758,
745,
4825,
95924,
19399,
497,
5933,
46184,
14108,
286,
659,
82,
29264,
82,
741,
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 |
#[test]
fn test_bn128_sign_g1_one() {
let sk = FromHex::from_hex(
"0f6b8785374476a3b3e4bde2c64dfb12964c81c7930d32367c8e318609387872"
).unwrap();
let mut public_key = [0u8; 128];
let expected = FromHex::from_hex(
"\
1bab5671c5107de67fe06007dde... | rust_cleaned_test_functions.jsonl/103164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58112,
16,
17,
23,
11172,
1889,
16,
11667,
368,
341,
286,
1077,
1901,
284,
5542,
20335,
486,
1499,
32655,
1006,
310,
330,
15,
69,
21,
65,
23,
22,
23,
20,
18,
22,
19,
19,
22,
21,
64,
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... | 4 |
#[test]
fn test_merge_single_paths() {
let items = vec![
Path::new("a/b/c"),
Path::new("a/b/d"),
];
//0 a/b/
//1 c
//2 d
let tree =
FileTreeItems::new(&items, &BTreeSet::new()).unwrap();
let mut it = tree
.iterate(0, 10)
.map(|(_, item)| item.info().full_path_str());
ass... | rust_cleaned_test_functions.jsonl/129804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
19487,
24152,
368,
341,
197,
10217,
3589,
284,
7486,
90515,
298,
69640,
486,
931,
445,
64,
3470,
2899,
3975,
715,
298,
69640,
486,
931,
445,
64,
3470,
3446,
3975,
715,
197,
197,
4821,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cstr_mut_write_too_much() {
let mut buf = vec![0; 9];
let mut cstr_mut = unsafe { CStrMut::new(buf.as_mut_ptr(), buf.len()) };
use std::fmt::Write;
let _ = write!(&mut cstr_mut, "test foo ");
} | rust_cleaned_test_functions.jsonl/42138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
495,
29523,
9165,
2346,
78,
717,
1387,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
20703,
15,
26,
220,
24,
935,
286,
1077,
5206,
272,
495,
29523,
284,
19860,
314,
356,
2580,
51440,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reader_rng_fill_bytes() {
let v = [1u8, 2, 3, 4, 5, 6, 7, 8];
let mut w = [0u8, .. 8];
let mut rng = ReaderRng::new(MemReader::new(Vec::from_slice(v)));
rng.fill_bytes(w);
assert!(v == w);
} | rust_cleaned_test_functions.jsonl/37244 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
66849,
30728,
12524,
368,
341,
286,
1077,
348,
284,
508,
16,
84,
23,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
935,
286,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_as_real() {
let cs: Vec<(Json, f64, Option<i32>)> = vec![
(Json::from_object(BTreeMap::default()).unwrap(), 0f64, None),
(Json::from_array(vec![]).unwrap(), 0f64, None),
(Json::from_i64(10).unwrap(), 10f64, None),
(Json::f... | rust_cleaned_test_functions.jsonl/1967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
15266,
368,
341,
286,
1077,
10532,
25,
11312,
28706,
5014,
11,
282,
21,
19,
11,
6959,
21897,
18,
17,
9231,
29,
284,
7486,
90515,
3374,
310,
320,
5014,
486,
1499,
5314,
5349,
6533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_token_disk_parsing() {
let from_disk = Config {
vault: VaultConfig {
namespace: None,
server: "127.0.0.1:8200".to_string(),
ca_certificate: None,
token: Token::FromDisk(TokenFromDisk {
path: P... | rust_cleaned_test_functions.jsonl/134636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
41687,
620,
28598,
368,
341,
286,
1077,
504,
41687,
284,
5532,
341,
310,
34584,
25,
41397,
2648,
341,
394,
4473,
25,
2240,
345,
394,
3538,
25,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_six() {
// Negative dimension
let box1 = &[10, 15, 50, 40];
let box2 = &[12, 16, -30, -20];
assert_eq!(overlaps(&box1, &box2), false);
} | rust_cleaned_test_functions.jsonl/71432 | {
"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,
643,
941,
368,
341,
286,
442,
50857,
12871,
198,
286,
1077,
3745,
16,
284,
44590,
16,
15,
11,
220,
16,
20,
11,
220,
20,
15,
11,
220,
19,
15,
935,
286,
1077,
3745,
17,
284,
44590,
16,
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_fuel_load_req() {
assert_eq!(get_fuel_load_req(12), 2);
assert_eq!(get_fuel_load_req(14), 2);
assert_eq!(get_fuel_load_req(1969), 966);
assert_eq!(get_fuel_load_req(100756), 50346);
} | rust_cleaned_test_functions.jsonl/13580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
761,
4000,
12411,
17644,
368,
341,
286,
2060,
10714,
10297,
455,
761,
4000,
12411,
17644,
7,
16,
17,
701,
220,
17,
317,
286,
2060,
10714,
10297,
455,
761,
4000,
12411,
17644,
7,
16,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid() {
assert_eq!(lex(""), (Token::Invalid, 0));
assert_eq!(lex("$"), (Token::Invalid, 1));
assert_eq!(lex("$$"), (Token::Invalid, 2));
assert_eq!(lex("$0"), (Token::Invalid, 1));
} | rust_cleaned_test_functions.jsonl/80512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
368,
341,
286,
2060,
10714,
10297,
2571,
86076,
320,
3323,
486,
7928,
11,
220,
15,
1106,
286,
2060,
10714,
10297,
2571,
20912,
3975,
320,
3323,
486,
7928,
11,
220,
16,
1106,
286,
2060,
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_block_string_value() {
assert_eq!(block_string_value(""), "");
assert_eq!(block_string_value("\r\n"), "");
assert_eq!(block_string_value("\r\r\r\r\n\n\r\n\r\r"), "");
assert_eq!(block_string_value("abc"), "abc");
assert_eq!(
block_string_value("line 1\r\n line 2\n ... | rust_cleaned_test_functions.jsonl/587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
3904,
3142,
368,
341,
262,
2060,
10714,
10297,
4574,
3904,
3142,
86076,
14498,
262,
2060,
10714,
10297,
4574,
3904,
3142,
4921,
81,
1699,
3975,
14498,
262,
2060,
10714,
10297,
4574,
3904,
3142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty() {
let res = Query::Single("".into()).exec().unwrap();
assert!(
!res.is_any_target(),
"empty query should return non-empty result"
);
} | rust_cleaned_test_functions.jsonl/12671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
368,
341,
286,
1077,
592,
284,
11361,
486,
10888,
445,
3263,
18122,
6011,
11748,
1005,
15454,
543,
286,
2060,
33673,
310,
753,
416,
2079,
37248,
11123,
3148,
310,
330,
3194,
3239,
1265,
470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_add_outbound_peers_if_min_is_not_satisfied() {
let config: GossipsubConfig = GossipsubConfig::default();
// Fill full mesh with inbound peers
let (mut gs, peers, topics) = inject_nodes1()
.peer_no(config.mesh_n_high())
.topics(vec!["test".into()])... | rust_cleaned_test_functions.jsonl/66907 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
6068,
10891,
36367,
388,
11119,
7260,
6892,
7913,
643,
46265,
368,
341,
286,
1077,
2193,
25,
479,
41473,
1966,
2648,
284,
479,
41473,
1966,
2648,
486,
2258,
1428,
286,
442,
21979,
2480,
1129... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_parse_css_border_2() {
assert_eq!(
parse_style_border("double"),
Ok(StyleBorderSide {
border_width: PixelValue::px(3.0),
border_style: BorderStyle::Double,
border_color: ColorU {
r: 0,
... | rust_cleaned_test_functions.jsonl/114001 | {
"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,
21039,
25924,
31940,
62,
17,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
15117,
31940,
445,
4331,
4461,
310,
7622,
7,
2323,
10691,
16384,
341,
394,
3886,
7927,
25,
27469,
1130,
486,
1767,
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... | 1 |
#[test]
fn test_eval_nhwc_2() {
setup_test_logger();
let op = Conv::default().nhwc().hwio().padding(PaddingSpec::SameUpper);
let i = rctensor4(&[[[[0.0f32, 0.0], [1.0, 0.0]]]]);
let k = rctensor4(&[[[[0.0f32], [0.0]], [[1.0], [0.0]]]]);
let e = rctensor4(&[[[[1.0f32], [0.... | rust_cleaned_test_functions.jsonl/51977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
93934,
24028,
62,
17,
368,
341,
286,
6505,
4452,
27413,
543,
286,
1077,
1179,
284,
28988,
486,
2258,
1005,
16719,
24028,
1005,
27827,
815,
1005,
9571,
5304,
2998,
8327,
486,
19198,
14251,
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_peekable() {
let path = TempDir::new("test-raftstore").unwrap();
let engines = new_temp_engine(&path);
let mut r = Region::new();
r.set_id(10);
r.set_start_key(b"key0".to_vec());
r.set_end_key(b"key4".to_vec());
let store = new_peer_storage... | rust_cleaned_test_functions.jsonl/7196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29107,
480,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
445,
1944,
12,
2944,
4314,
1827,
15454,
543,
286,
1077,
21106,
284,
501,
11771,
24823,
2099,
2343,
317,
286,
1077,
5206,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_info_depth() {
let attributes: Vec<UciInfoAttribute> = vec![
UciInfoAttribute::Depth(24)
];
let m = UciMessage::Info(attributes);
assert_eq!(m.serialize(), "info depth 24");
} | rust_cleaned_test_functions.jsonl/19055 | {
"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,
88686,
3109,
19061,
368,
341,
286,
1077,
8201,
25,
11312,
36397,
5855,
1731,
3907,
29,
284,
7486,
90515,
310,
547,
5855,
1731,
3907,
486,
19776,
7,
17,
19,
340,
286,
15424,
286,
1077,
296,
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_from_public_key_credential_rp_entity() {
let cbor_rp_entity = cbor_map! {
"id" => "example.com",
"name" => "Example",
"icon" => "example.com/icon.png",
};
let rp_entity = PublicKeyCredentialRpEntity::try_from(cbor_rp_entity);
le... | rust_cleaned_test_functions.jsonl/48999 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
27074,
3097,
666,
30320,
83440,
19169,
368,
341,
286,
1077,
272,
9368,
83440,
19169,
284,
272,
9368,
5376,
0,
341,
310,
330,
307,
1,
589,
330,
8687,
905,
756,
310,
330,
606,
1,
589,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write() {
const INITIAL: &[u8] = b"abcdef123456";
let wbuf = "CDEF".to_string().into_bytes();
let mut rbuf = Vec::new();
const EXPECT: &[u8] = b"abCDEF123456";
let mut f = tempfile().unwrap();
f.write_all(INITIAL).unwrap();
let mut aiocb = AioCb::from_slice( f.as_raw... | rust_cleaned_test_functions.jsonl/90414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 476
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
368,
341,
262,
733,
56854,
25,
44590,
84,
23,
60,
284,
293,
1,
41202,
16,
17,
18,
19,
20,
21,
876,
262,
1077,
289,
5909,
284,
330,
34,
13649,
3263,
983,
3904,
1005,
18122,
12524,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issue_2() {
// See: https://github.com/sile/libflate/issues/2
assert_encode_decode!([
163, 181, 167, 40, 62, 239, 41, 125, 189, 217, 61, 122, 20, 136, 160, 178, 119, 217,
217, 41, 125, 189, 97, 195, 101, 47, 170,
]);
assert_encode_decode!([... | rust_cleaned_test_functions.jsonl/37991 | {
"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,
53340,
62,
17,
368,
341,
286,
442,
3496,
25,
3703,
1110,
5204,
905,
2687,
457,
8194,
16716,
38745,
14,
17,
198,
286,
2060,
11224,
15227,
0,
8956,
310,
220,
16,
21,
18,
11,
220,
16,
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_array2() {
// 5x3 image
let image = [00, 01, 02, 03, 04, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24];
let image_array = ArrayView2::from_shape((3, 5), &image).unwrap();
assert_eq!(image_array[(0, 0)], 00);
assert_eq!(image_array[(0, 2)], 02);
assert_eq!(image_array[(2, 3)],... | rust_cleaned_test_functions.jsonl/28789 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
17,
368,
341,
262,
442,
220,
20,
87,
18,
2168,
198,
262,
1077,
2168,
284,
508,
15,
15,
11,
220,
15,
16,
11,
220,
15,
17,
11,
220,
15,
18,
11,
220,
15,
19,
11,
220,
16,
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_not_clean() {
let (c, coprocessor_host) = new_test_collector();
start_collecting(&c, 1).unwrap();
// The value is not a valid lock.
let (k, v) = (Key::from_raw(b"k1").into_encoded(), b"v1".to_vec());
let req = make_apply_request(k.clone(), v.clone... | rust_cleaned_test_functions.jsonl/15211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
19573,
368,
341,
286,
1077,
320,
66,
11,
6162,
40848,
269,
12848,
8,
284,
501,
4452,
10211,
27669,
543,
286,
1191,
68140,
287,
2099,
66,
11,
220,
16,
568,
15454,
543,
1789,
286,
442,
576... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status() {
let k = "key123";
assert_done(move || {
let bucket_name = "bucket".to_owned();
let request = Request::new(Method::Status, Some(bucket_name.clone()), Some(k.to_owned()));
let timer = MockTimeGenerator::new(vec![0, 3]);
l... | rust_cleaned_test_functions.jsonl/50364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
368,
341,
286,
1077,
595,
284,
330,
792,
16,
17,
18,
3302,
286,
2060,
24390,
34081,
1369,
341,
310,
1077,
15621,
1269,
284,
330,
30410,
3263,
983,
51973,
543,
310,
1077,
1681,
284,
6145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.