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_drain_filter() {
{
let mut map: HashMap<i32, i32> = (0..8).map(|x| (x, x * 10)).collect();
let drained = map.drain_filter(|&k, _| k % 2 == 0);
let mut out = drained.collect::<Vec<_>>();
out.sort_unstable();
assert_eq!(vec![(0, 0... | rust_cleaned_test_functions.jsonl/26988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
8727,
368,
341,
286,
341,
310,
1077,
5206,
2415,
25,
10528,
21897,
18,
17,
11,
600,
18,
17,
29,
284,
320,
15,
496,
23,
568,
2186,
22428,
87,
91,
320,
87,
11,
856,
353,
220,
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_version_sort() {
let mut versions = vec![
Version::parse("1.2.0.0").unwrap(),
Version::parse("1.2.3.4").unwrap(),
Version::parse("1.2.3.0").unwrap(),
Version::parse("1.0.0.0").unwrap(),
];
versions.sort();
assert_eq... | rust_cleaned_test_functions.jsonl/6356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
18435,
368,
341,
286,
1077,
5206,
10795,
284,
7486,
90515,
310,
6079,
486,
6400,
445,
16,
13,
17,
13,
15,
13,
15,
1827,
15454,
3148,
310,
6079,
486,
6400,
445,
16,
13,
17,
13,
18,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_script() {
let script = empty_script();
let view = BinaryIndexedView::Script(&script);
let location = Spanned::unsafe_no_loc(()).loc;
SourceMapping::new_from_view(view, location)
.expect("unable to build source mapping for empty script");
} | rust_cleaned_test_functions.jsonl/125466 | {
"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,
14660,
368,
341,
262,
1077,
5316,
284,
4287,
14660,
543,
262,
1077,
1651,
284,
17718,
69941,
851,
486,
5910,
2099,
2282,
317,
262,
1077,
3728,
284,
11903,
18694,
486,
38157,
6536,
13400,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fixed_size_binary_json_equal() {
// Test the equal case
let mut builder = FixedSizeBinaryBuilder::new(15, 5);
builder.append_value(b"hello").unwrap();
builder.append_null().unwrap();
builder.append_value(b"world").unwrap();
let arrow_array: FixedSi... | rust_cleaned_test_functions.jsonl/899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37839,
2368,
31761,
9455,
11478,
368,
341,
286,
442,
3393,
279,
6144,
1142,
198,
286,
1077,
5206,
7363,
284,
20149,
1695,
21338,
3297,
486,
931,
7,
16,
20,
11,
220,
20,
317,
286,
7363,
2057,
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_get_cgroup_path() {
let cid = "sample_container_id";
assert_eq!(
get_cgroup_path(&None, cid),
PathBuf::from("/youki/sample_container_id")
);
assert_eq!(
get_cgroup_path(&Some(PathBuf::from("/youki")), cid),
PathBuf::... | rust_cleaned_test_functions.jsonl/55643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
666,
4074,
2638,
368,
341,
286,
1077,
32141,
284,
330,
13611,
15847,
842,
876,
286,
2060,
10714,
33673,
310,
633,
666,
4074,
2638,
2099,
4064,
11,
32141,
1326,
310,
7933,
15064,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_root_mean_squares_rejects_mismatched_dimensions() {
let left = gray_image!(1, 2);
let right = gray_image!(8; 4);
let _ = root_mean_squared_error(&left, &right);
} | rust_cleaned_test_functions.jsonl/38570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
16933,
643,
40856,
1288,
583,
82,
717,
24976,
291,
59699,
368,
341,
286,
1077,
2115,
284,
17545,
4954,
10297,
16,
11,
220,
17,
317,
286,
1077,
1290,
284,
17545,
4954,
10297,
23,
26,
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 |
#[test]
fn test_dedup() {
fn case(a: Vec<i32>, b: Vec<i32>) {
let mut v = a;
v.dedup();
assert_eq!(v, b);
}
case(vec![], vec![]);
case(vec![1], vec![1]);
case(vec![1, 1], vec![1]);
case(vec![1, 2, 3], vec![1, 2, 3]);
case(vec![1, 1, 2, 3], vec![1, 2, 3]);
... | rust_cleaned_test_functions.jsonl/24400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
291,
454,
368,
341,
262,
5168,
1142,
2877,
25,
11312,
21897,
18,
17,
8066,
293,
25,
11312,
21897,
18,
17,
9231,
341,
286,
1077,
5206,
348,
284,
264,
280,
286,
348,
950,
291,
454,
543,
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_load_code_fails_for_func_type_infer_mismatch()
{
let input = "
## foo should take [#] and return a #
func foo(inputs) >>
|([]) -> #empty
|(#whatever;more) -> #whatever
|(_;more) -> foo(more)
--
func ... | rust_cleaned_test_functions.jsonl/64723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
4136,
761,
6209,
5478,
9596,
1819,
1243,
802,
717,
24976,
741,
262,
341,
286,
1077,
1946,
284,
6228,
310,
7704,
15229,
1265,
1896,
83703,
60,
323,
470,
264,
9541,
310,
2915,
15229,
33999,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice() {
fn make_args(start: Option<usize>, end: Option<f64>) -> HashMap<String, Value> {
let mut args = HashMap::new();
if let Some(s) = start {
args.insert("start".to_string(), to_value(s).unwrap());
}
if let Some(e) = en... | rust_cleaned_test_functions.jsonl/62064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
286,
5168,
1281,
8384,
10639,
25,
6959,
90244,
8066,
835,
25,
6959,
63895,
21,
19,
9231,
1464,
10528,
3464,
11,
5162,
29,
341,
310,
1077,
5206,
2827,
284,
10528,
486,
931,
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... | 3 |
#[test]
fn test_from_optional_i32() {
let a = PrimitiveArray::from(vec![Some(1), None, Some(2), Some(3), None]);
assert_eq!(5, a.len());
assert_eq!(2, a.null_count());
// 1 == not null
match a.validity_bitmap() {
&Some(ref validity_bitmap) => {
... | rust_cleaned_test_functions.jsonl/32613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
74644,
5318,
18,
17,
368,
341,
286,
1077,
264,
284,
51460,
1857,
486,
1499,
25592,
20703,
8373,
7,
16,
701,
2240,
11,
4329,
7,
17,
701,
4329,
7,
18,
701,
2240,
2558,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_slice_string() {
let heap = Heap::new();
for example in EXAMPLES {
let s = heap.alloc_str(example).to_value();
for i in -5..=6 {
for j in -5..=6 {
let start = if i == 6 {
None
... | rust_cleaned_test_functions.jsonl/8195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
3904,
368,
341,
286,
1077,
17364,
284,
47307,
486,
931,
543,
286,
369,
3110,
304,
66246,
50,
341,
310,
1077,
274,
284,
17364,
78224,
2895,
66203,
568,
983,
3142,
543,
310,
369,
600,
304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_ascii_into_string() {
assert_eq!(vec2ascii![40, 32, 59].into_string(), "( ;".to_string());
assert_eq!(vec2ascii!(40, 32, 59).into_string(), "( ;".to_string());
} | rust_cleaned_test_functions.jsonl/4330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50238,
45514,
3904,
368,
341,
286,
2060,
10714,
10297,
4083,
17,
23324,
20703,
19,
15,
11,
220,
18,
17,
11,
220,
20,
24,
936,
18122,
3904,
1507,
11993,
2587,
3263,
983,
3904,
1423,
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_flattening_empty_curve() {
use crate::point;
let curve = QuadraticBezierSegment {
from: point(0.0, 0.0),
ctrl: point(0.0, 0.0),
to: point(0.0, 0.0),
};
let mut iter = FlattenedT::new(&curve, 0.1);
assert!(iter.next().is_none());
let mut count: ... | rust_cleaned_test_functions.jsonl/35188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5081,
1587,
6019,
15124,
43407,
368,
341,
262,
990,
17717,
486,
2768,
401,
262,
1077,
15655,
284,
63948,
774,
95050,
21086,
341,
286,
504,
25,
1459,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_iter_as_slice() {
let vec = vec!['a', 'b', 'c'];
let mut into_iter = vec.into_iter();
assert_eq!(into_iter.as_slice(), &['a', 'b', 'c']);
let _ = into_iter.next().unwrap();
assert_eq!(into_iter.as_slice(), &['b', 'c']);
let _ = into_iter.next().unwrap();
let _ = ... | rust_cleaned_test_functions.jsonl/24438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
11898,
26488,
368,
341,
262,
1077,
7486,
284,
7486,
0,
677,
64,
516,
364,
65,
516,
364,
66,
3860,
262,
1077,
5206,
1119,
11723,
284,
7486,
39860,
11723,
543,
262,
2060,
10714,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_diff_nonce_diff_output() {
let keystream1 =
hchacha20(&SecretKey::from_slice(&[0u8; 32]).unwrap(), &[0u8; 16]).unwrap();
let keystream2 =
hchacha20(&SecretKey::from_slice(&[0u8; 32]).unwrap(), &[1u8; 16]).unwrap();
assert!(key... | rust_cleaned_test_functions.jsonl/44661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
48508,
15850,
7645,
368,
341,
310,
1077,
99132,
1237,
16,
4035,
394,
305,
331,
51576,
17,
15,
2099,
19773,
1592,
486,
1499,
26488,
2099,
58,
15,
84,
23,
26,
220,
18,
17,
10697,
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,
1... | 1 |
#[test]
fn test_power_t_zero() {
// So we want to test all three
let mut mi = model_instance::ModelInstance::new_empty().unwrap();
mi.learning_rate = 0.1;
mi.power_t = 0.0;
let vec_in = &lr_vec(vec![HashAndValue{hash: 1, value: 1.0}]);
... | rust_cleaned_test_functions.jsonl/124043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20421,
528,
19359,
368,
341,
1789,
286,
442,
2055,
582,
1366,
311,
1273,
678,
2326,
5872,
286,
1077,
5206,
9497,
284,
1614,
11904,
486,
1712,
2523,
486,
931,
15124,
1005,
15454,
543,
286,
9497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_asset() {
let precision = 2;
let supply = 1024 * 1024;
let caller = Address::from_hex("0x755cdba6ae4f479f7164792b318b2a06c759833b").unwrap();
let mut service = TestService::new();
let ctx = mock_context(caller.clone());
// test create_asset
let asset = create... | rust_cleaned_test_functions.jsonl/27228 | {
"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,
8657,
42299,
368,
341,
262,
1077,
16052,
284,
220,
17,
280,
262,
1077,
8149,
284,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
280,
262,
1077,
19865,
284,
9177,
486,
1499,
32655,
445,
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_setup_console_socket_invalid() {
let init = setup("test_setup_console_socket_invalid");
assert!(init.is_ok());
let (testdir, rundir_path, socket_path) = init.unwrap();
let _socket = File::create(Path::join(&testdir, "console-socket"));
assert!(_socket.is_o... | rust_cleaned_test_functions.jsonl/69947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
51724,
19555,
31433,
368,
341,
286,
1077,
2930,
284,
6505,
445,
1944,
21363,
51724,
19555,
31433,
797,
286,
2060,
10297,
2327,
2079,
19817,
1423,
286,
1077,
320,
1944,
3741,
11,
40897,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_high_priority_no_block() {
let mut config = Config::default();
config.scheduler_worker_pool_size = 1;
let storage = TestStorageBuilder::new().config(config).build().unwrap();
let (tx, rx) = channel();
expect_none(
storage
.async... | rust_cleaned_test_functions.jsonl/22313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 916
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22680,
38161,
6536,
7113,
368,
341,
286,
1077,
5206,
2193,
284,
5532,
486,
2258,
543,
286,
2193,
69113,
40385,
15709,
2368,
284,
220,
16,
280,
286,
1077,
5819,
284,
3393,
5793,
3297,
486,
931,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_connect_stats_success() {
let (mut cobalt_sender, mut cobalt_receiver) = fake_cobalt_sender();
let inspect_tree = fake_inspect_tree();
log_connect_stats(&mut cobalt_sender, inspect_tree.clone(), &fake_connect_stats());
let mut expected_metrics = hashset! {
... | rust_cleaned_test_functions.jsonl/14742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1096
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
15720,
15381,
18632,
368,
341,
286,
1077,
320,
6984,
33828,
3145,
54356,
11,
5206,
33828,
3145,
65691,
8,
284,
12418,
666,
674,
3145,
54356,
543,
286,
1077,
24085,
11663,
284,
12418,
34386,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_info_field_value_with_string_value() -> io::Result<()> {
use vcf::record::info::field;
let mut buf = Vec::new();
let value = field::Value::String(String::from("ndls"));
write_info_field_value(&mut buf, Some(&value))?;
let expected = [0x47, 0x6e, 0x... | rust_cleaned_test_functions.jsonl/6249 | {
"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,
9165,
3109,
5013,
3142,
6615,
3904,
3142,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
990,
348,
9792,
486,
8548,
486,
2733,
486,
2566,
401,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
543,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_i32() {
let val = JsValue::new(42i32);
assert!(val.is_int32());
assert_eq!(val.as_int32(), 42);
} | rust_cleaned_test_functions.jsonl/27902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
18,
17,
368,
341,
286,
1077,
1044,
284,
39122,
1130,
486,
931,
7,
19,
17,
72,
18,
17,
626,
286,
2060,
10297,
831,
2079,
4042,
18,
17,
1423,
286,
2060,
10714,
10297,
831,
5357,
4042,
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 |
#[test]
fn test_space3() {
let text = r#"document(|title = { hello }|)'<+p% comment
{
hello\bold{abc}def
}
+align [
[${}; ${\( 1 + a \) \( 1 + a^2 \) \( 1 + a^{2^2} \)}];
[${}; ${\paren{1 + a} \paren{1 + a^2} \paren{1 + a^{2^2}}}];
];
>"#;
let expect = r#"document(|title = { hello }|)'<
... | rust_cleaned_test_functions.jsonl/99782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14663,
18,
368,
341,
262,
1077,
1467,
284,
435,
55543,
6062,
22428,
2102,
284,
314,
23811,
335,
91,
8,
21524,
10,
79,
4,
3980,
198,
515,
262,
23811,
59,
14824,
90,
13683,
92,
750,
715,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_expr_bool_modifier() -> std::result::Result<(), nom::Err<ParseError<'static>>> {
// bool modifier can be used only with comparison binary op.
#[rustfmt::skip]
let tests = [
("1 > bool 1", "foo"),
("1 == b... | rust_cleaned_test_functions.jsonl/880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
21915,
22159,
61773,
368,
1464,
1460,
486,
1382,
486,
2077,
68843,
9662,
486,
7747,
27,
14463,
1454,
18291,
1978,
20154,
341,
286,
442,
1807,
22739,
646,
387,
1483,
1172,
448,
12313,
7868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prepare_if_nonce_account_not_nonce_pubkey() {
let (
pre_account_pubkey,
pre_account,
mut post_account,
blockhash,
lamports_per_signature,
maybe_fee_account,
) = create_accounts_prepare_if_nonce_account();
... | rust_cleaned_test_functions.jsonl/83523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
11119,
48508,
13500,
7913,
48508,
34014,
792,
368,
341,
286,
1077,
2399,
310,
855,
13500,
34014,
792,
345,
310,
855,
13500,
345,
310,
5206,
1736,
13500,
345,
310,
2504,
8296,
345,
310,
3160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bin_string() {
let value = 1;
let value2 = 255;
let value3 = 65535;
let value4 = 16777215;
let value5 = 2147483647;
let value6 = 2147483648;
let value7: isize = 2147483649;
assert_eq!(" 00000000 00000000 00000000 00000001", format_bin_string(value));
a... | rust_cleaned_test_functions.jsonl/109247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
21816,
3904,
368,
341,
262,
1077,
897,
284,
220,
16,
280,
262,
1077,
897,
17,
284,
220,
17,
20,
20,
280,
262,
1077,
897,
18,
284,
220,
21,
20,
20,
18,
20,
280,
262,
1077,
897,
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_compute_pc() {
let bytes = [0, 1, 2, 3, 4];
let bytecode = &bytes[..];
let ebuf = &EndianSlice::new(bytecode, LittleEndian);
assert_eq!(compute_pc(ebuf, ebuf, 0), Ok(*ebuf));
assert_eq!(
compute_pc(ebuf, ebuf, -1),
Err(Err... | rust_cleaned_test_functions.jsonl/45745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
35612,
368,
341,
1789,
286,
1077,
5820,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
75129,
284,
609,
9651,
95874,
935,
286,
1077,
384,
5909,
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_const() {
const N: Ratio<i32> = Ratio::new_raw(123, 456);
const N_NUMER: &i32 = N.numer();
const N_DENOM: &i32 = N.denom();
assert_eq!(N_NUMER, &123);
assert_eq!(N_DENOM, &456);
let r = N.reduced();
assert_eq!(r.numer(), &(123 / 3));
... | rust_cleaned_test_functions.jsonl/847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13610,
368,
341,
286,
733,
451,
25,
50748,
21897,
18,
17,
29,
284,
50748,
486,
931,
16067,
7,
16,
17,
18,
11,
220,
19,
20,
21,
317,
286,
733,
451,
9631,
640,
25,
609,
72,
18,
17,
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_find_smallest() {
let zone = example_zone_v2();
let mut stack = vec![];
let smallest = zone.find_smallest(&mut stack, None);
assert_eq!(
smallest.0.deref().borrow().label,
Label::from_str("*").unwrap()
);
assert_eq!(stack.le... | rust_cleaned_test_functions.jsonl/29054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
15874,
19236,
368,
341,
286,
1077,
10143,
284,
3110,
28692,
2273,
17,
543,
286,
1077,
5206,
5611,
284,
7486,
0,
15078,
286,
1077,
24632,
284,
10143,
2658,
15874,
19236,
2099,
6984,
5611,
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_Elf_from_hdr_bad_version() {
let slice = &ELF32_DYNAMIC_ELF_HDR_BAD_VERSION[0..];
let elf: Result<Elf<'_, LittleEndian, Elf32>, ElfError> =
Elf::try_from(slice);
assert!(elf.is_err());
assert_eq!(elf.err(), Some(ElfError::BadVersion(0x05)));
} | rust_cleaned_test_functions.jsonl/119483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2089,
11008,
5673,
28238,
34199,
9438,
368,
341,
262,
1077,
15983,
284,
609,
2749,
37,
18,
17,
57356,
2089,
22609,
55765,
30666,
10678,
58,
15,
496,
935,
262,
1077,
40745,
25,
5714,
27,
75832,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permissions_with_allow() {
for permission in &util::PERMISSION_VARIANTS {
let (_, err) = util::run_and_collect_output(
true,
&format!("run --allow-{0} permission_test.ts {0}Required", permission),
None,
None,
false,
);
assert!(!err.contains(util::PERMI... | rust_cleaned_test_functions.jsonl/19947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44767,
6615,
55731,
368,
341,
220,
369,
7882,
304,
609,
1314,
486,
9654,
25245,
2334,
16028,
37125,
341,
262,
1077,
39464,
1848,
8,
284,
4094,
486,
6108,
8378,
68140,
7645,
1006,
414,
830,
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... | 2 |
#[test]
fn test_ignore_drop_behavior() {
let mut db = checked_memory_handle();
let mut tx = db.transaction().unwrap();
{
let mut sp1 = tx.savepoint().unwrap();
insert(1, &sp1);
sp1.rollback().unwrap();
insert(2, &sp1);
{
... | rust_cleaned_test_functions.jsonl/64092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
29584,
74540,
368,
341,
286,
1077,
5206,
2927,
284,
10067,
19195,
10630,
1428,
286,
1077,
5206,
9854,
284,
2927,
25706,
1005,
15454,
543,
286,
341,
310,
1077,
5206,
978,
16,
284,
9854,
5681... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_world_symbols_are_case_sensitive() {
let (analysis, _) = fixture::file(
r#"
fn foo() {}
struct Foo;
"#,
);
let navs = analysis.symbol_search(Query::new("foo".to_string())).unwrap();
assert_eq!(navs.len(), 2)
} | rust_cleaned_test_functions.jsonl/32526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31792,
55752,
56855,
19096,
65324,
368,
341,
286,
1077,
320,
34484,
11,
27439,
284,
12507,
486,
1192,
1006,
310,
435,
2,
698,
8822,
15229,
368,
5613,
1235,
33428,
280,
57676,
345,
286,
3475,
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_move_down() {
execute!(stdout(), MoveTo(0, 0), MoveDown(2)).unwrap();
assert_eq!(position().unwrap(), (0, 2));
} | rust_cleaned_test_functions.jsonl/13975 | {
"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,
17134,
13998,
368,
341,
286,
9026,
10297,
36358,
1507,
14561,
1249,
7,
15,
11,
220,
15,
701,
14561,
4454,
7,
17,
4579,
15454,
1428,
286,
2060,
10714,
10297,
3487,
1005,
15454,
1507,
320,
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 |
#[test]
fn test_rename_for_macro_define_fn() {
test_rename(
r#"
macro_rules! define_fn {($id:ident) => { fn $id{} }}
define_fn!(foo);
fn main() {
fo<|>o();
}"#,
"bar",
r#"
macro_rules! define_fn {($id:ident) => { fn $id{} }}
define_fn!(... | rust_cleaned_test_functions.jsonl/16211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79399,
5478,
58810,
51049,
15246,
368,
341,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
18072,
21407,
0,
6979,
15246,
314,
699,
307,
25,
1713,
8,
589,
314,
5168,
400,
307,
6257,
8096,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compute_stable_interface_identifier() {
// these can be used for the values of the other arguments.
let default_prefix = Ipv6::SITE_LOCAL_UNICAST_SUBNET;
let default_net_iface = &[0, 1, 2];
let default_net_id = &[3, 4, 5];
let default_dad_counter ... | rust_cleaned_test_functions.jsonl/63380 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
1261,
480,
20546,
33176,
368,
341,
1789,
286,
442,
1493,
646,
387,
1483,
369,
279,
2750,
315,
279,
1008,
5977,
624,
286,
1077,
1638,
13974,
284,
358,
30168,
21,
486,
61106,
28399,
6735,
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... | 3 |
#[test]
fn test_decode_escaped_unicode() {
let mut test_cases = vec![
("5e8a", '床'),
("524d", '前'),
("660e", '明'),
("6708", '月'),
("5149", '光'),
];
for (i, (escaped, expected)) in test_cases.drain(..).enumerate() {
l... | rust_cleaned_test_functions.jsonl/6236 | {
"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,
15227,
62,
65826,
54662,
368,
341,
286,
1077,
5206,
1273,
41427,
284,
7486,
90515,
310,
3489,
20,
68,
23,
64,
497,
364,
99830,
3299,
310,
3489,
20,
17,
19,
67,
497,
364,
24562,
3299,
310,
3489... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiplication() {
let mut tmp = Scalar(blst::blst_fr {
l: [
0x6b7e9b8faeefc81a,
0xe30a8463f348ba42,
0xeff3cb67a8279c9c,
0x3d303651bd7c774d,
],
});
tmp *= &Scalar(blst::blst_fr {
... | rust_cleaned_test_functions.jsonl/54658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91802,
1693,
368,
341,
286,
1077,
5206,
4174,
284,
35176,
29811,
267,
486,
2024,
267,
41537,
341,
310,
326,
25,
2278,
394,
220,
15,
87,
21,
65,
22,
68,
24,
65,
23,
3632,
68,
823,
66,
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... | 3 |
#[test]
fn test_get_bits() {
use crate::franklin_crypto::bellman::pairing::bn256::Fr;
let bits = Fr::from_str("12").unwrap().get_bits_le_fixed(3);
assert_eq!(bits, vec![false, false, true]);
let bits = Fr::from_str("0").unwrap().get_bits_le_fixed(512);
assert_e... | rust_cleaned_test_functions.jsonl/112651 | {
"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,
3062,
20034,
368,
341,
286,
990,
17717,
486,
1626,
1180,
3732,
78298,
486,
17250,
1515,
486,
12670,
287,
486,
11081,
17,
20,
21,
486,
22560,
401,
1789,
286,
1077,
9472,
284,
2869,
486,
1499,
289... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_adj_list() {
let g = get_test_graph();
let adj_list = g.adj_list();
let expected: AdjList = [("bb0__0_3", vec!["bb0__1_3"]), (&"bb0__1_3", vec![])]
.iter()
.cloned()
.collect();
assert_eq!(adj_list, expected);
} | rust_cleaned_test_functions.jsonl/17868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42559,
2019,
368,
341,
286,
1077,
342,
284,
633,
4452,
14738,
543,
286,
1077,
12469,
2019,
284,
342,
78851,
2019,
543,
286,
1077,
3601,
25,
62916,
852,
284,
84019,
6066,
15,
563,
15,
62,
18,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_benchmarks_offchain() {
ExtBuilder::default().has_stakers(false).build().execute_with(|| {
assert_ok!(test_benchmark_submit_solution_better::<Test>());
assert_ok!(test_benchmark_submit_solution_weaker::<Test>());
});
} | rust_cleaned_test_functions.jsonl/120493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
15544,
13651,
8819,
368,
341,
197,
76605,
3297,
486,
2258,
1005,
4648,
1261,
8312,
3576,
568,
5834,
1005,
10257,
6615,
79453,
341,
298,
6948,
19817,
10297,
1944,
880,
39381,
31674,
50274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize_zeroes() {
// Test that UdpPacket::serialize properly zeroes memory before serializing
// the header.
let mut buf_0 = [0; 8];
UdpPacketSerializer::new(
TEST_SRC_IPV4,
TEST_DST_IPV4,
NonZeroU16::new(1),
NonZ... | rust_cleaned_test_functions.jsonl/78659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
19359,
288,
368,
341,
286,
442,
3393,
429,
547,
9796,
16679,
486,
24166,
10277,
97443,
4938,
1573,
6146,
4849,
198,
286,
442,
279,
4247,
624,
286,
1077,
5206,
6607,
62,
15,
284,
508,
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_cow_from() {
let borrowed = "borrowed";
let owned = String::from("owned");
match (Cow::from(owned.clone()), Cow::from(borrowed)) {
(Cow::Owned(o), Cow::Borrowed(b)) => assert!(o == owned && b == borrowed),
_ => panic!("invalid `Cow::from`"),
}
} | rust_cleaned_test_functions.jsonl/17662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
363,
5673,
368,
341,
262,
1077,
45564,
284,
330,
71141,
291,
876,
262,
1077,
12938,
284,
923,
486,
1499,
445,
18332,
797,
262,
2432,
320,
89915,
486,
1499,
7,
18332,
15997,
11858,
21851,
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_unknown_type() {
let buff = &mut igmp_invalid_buffers::UNKNOWN_TYPE;
let packet = buff.parse_with::<_, IgmpPacket<_>>(());
// we don't use expect_err here because IgmpPacket does not implement
// std::fmt::Debug
assert_eq!(packet.is_err(), true);
} | rust_cleaned_test_functions.jsonl/65069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
1819,
368,
341,
286,
1077,
11522,
284,
609,
6984,
19373,
1307,
31433,
54591,
486,
51378,
4189,
280,
286,
1077,
10151,
284,
11522,
4632,
6615,
27638,
6878,
38451,
1307,
16679,
32399,
25526,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_healthiness_check_file() -> Result<()> {
let tempdir = TempDir::new("health")?;
let file_path = tempdir.path().join("file.txt");
let healthiness = Healthiness {
file_path: Some(file_path.clone()),
http_endpoint: None,
..Default::default... | rust_cleaned_test_functions.jsonl/37420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45727,
1880,
7200,
2458,
368,
1464,
5714,
71698,
341,
286,
1077,
2730,
3741,
284,
19944,
6184,
486,
931,
445,
12120,
899,
37445,
286,
1077,
1034,
2638,
284,
2730,
3741,
3875,
1005,
5987,
445,
1192... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_open_failure() -> Result<()> {
let filename = "no_such_file.db";
let result =
Connection::open_with_flags(filename, Config::default().access_mode(config::AccessMode::ReadOnly)?);
assert!(!result.is_ok());
let err = result.err().unwrap();
if let... | rust_cleaned_test_functions.jsonl/113046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
43618,
368,
1464,
5714,
71698,
341,
286,
1077,
3899,
284,
330,
2152,
643,
1387,
2458,
7076,
876,
286,
1077,
1102,
4035,
310,
11032,
486,
2508,
6615,
14130,
10961,
11,
5532,
486,
2258,
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... | 3 |
#[test]
fn test_utf8_to_binary() {
assert_eq!(utf8_to_binary("abc"), Ok(vec!['a' as u8, 'b' as u8, 'c' as u8]));
} | rust_cleaned_test_functions.jsonl/115257 | {
"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,
39453,
23,
2346,
31761,
368,
341,
286,
2060,
10714,
10297,
4762,
23,
2346,
31761,
445,
13683,
3975,
7622,
25592,
0,
677,
64,
6,
438,
575,
23,
11,
364,
65,
6,
438,
575,
23,
11,
364,
66,
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 |
#[test]
fn test_style_memory_layout() {
use std::mem;
assert_eq!(mem::size_of::<Style>(), mem::size_of::<sys::ImGuiStyle>());
assert_eq!(mem::align_of::<Style>(), mem::align_of::<sys::ImGuiStyle>());
use sys::ImGuiStyle;
macro_rules! assert_field_offset {
($l:ident, $r:ident) => {
... | rust_cleaned_test_functions.jsonl/13996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15117,
19195,
14466,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
2060,
10714,
10297,
10536,
486,
2141,
3575,
27638,
2323,
39019,
1833,
486,
2141,
3575,
27638,
7791,
486,
37950,
2323,
32872,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_open_channel_msg_fee() {
let original_fee = 253;
let mut fee_est = TestFeeEstimator{fee_est: original_fee };
let secp_ctx = Secp256k1::new();
let seed = [42; 32];
let network = Network::Testnet;
let keys_provider = test_utils::TestKeysInterface::new(&seed, network);
let node_a_nod... | rust_cleaned_test_functions.jsonl/16115 | {
"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,
11311,
14571,
6483,
34305,
368,
341,
197,
10217,
4024,
34305,
284,
220,
17,
20,
18,
280,
197,
10217,
5206,
11060,
18583,
284,
3393,
41941,
13782,
13689,
90,
30017,
18583,
25,
4024,
34305,
2605,
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... | 3 |
#[test]
fn test_dispatch_change() {
use configuration::ConfigManager;
use std::error::Error;
use std::result::Result;
#[derive(Clone)]
struct CfgManager(Arc<Mutex<VioletaBftstoreConfig>>);
impl ConfigManager for CfgManager {
fn dispatch(&mut self, c: ConfigChange) -> Result<(),... | rust_cleaned_test_functions.jsonl/7498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
15947,
368,
341,
262,
990,
6546,
486,
2648,
2043,
280,
262,
990,
1460,
486,
841,
486,
1454,
280,
262,
990,
1460,
486,
1382,
486,
2077,
401,
262,
11506,
27098,
65297,
5563,
262,
2036,
356,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_coordinates_into_mixed() {
let cf = CoordinateFormat::new(2, 4);
let c1 = Coordinates::new(CoordinateNumber::from(1), 2, cf);
let c2 = Coordinates::new(1, 2, cf);
assert_eq!(c1, c2);
} | rust_cleaned_test_functions.jsonl/16461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50084,
45514,
717,
3286,
368,
341,
286,
1077,
24111,
284,
41035,
4061,
486,
931,
7,
17,
11,
220,
19,
317,
286,
1077,
272,
16,
284,
62501,
486,
931,
3025,
78,
8730,
2833,
486,
1499,
7,
16,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_t128() {
init();
let result = t128(false, true, false, 16, &BUILD_MODEL, &*GUID, &BUILD_BRAND);
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104731 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
16,
17,
23,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
16,
17,
23,
3576,
11,
830,
11,
895,
11,
220,
16,
21,
11,
609,
47180,
27551,
11,
609,
9,
41778,
11,
609,
47180,
26543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_swap() {
let mut m = TreeMap::new();
assert_eq!(m.swap(1u, 2i), None);
assert_eq!(m.swap(1u, 3i), Some(2));
assert_eq!(m.swap(1u, 4i), Some(3));
} | rust_cleaned_test_functions.jsonl/66384 | {
"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,
40991,
368,
341,
286,
1077,
5206,
296,
284,
76883,
486,
931,
543,
286,
2060,
10714,
10297,
76,
54537,
7,
16,
84,
11,
220,
17,
72,
701,
2240,
317,
286,
2060,
10714,
10297,
76,
54537,
7,
16,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ordering() {
assert!(req("=1") < req("*"));
assert!(req(">1") < req("*"));
assert!(req(">=1") < req("*"));
assert!(req("<1") < req("*"));
assert!(req("<=1") < req("*"));
assert!(req("~1") < req("*"));
assert!(req("^1") < req("*"));
... | rust_cleaned_test_functions.jsonl/6424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7869,
287,
368,
341,
286,
2060,
10297,
2958,
445,
28,
16,
899,
366,
4232,
29592,
4010,
286,
2060,
10297,
2958,
63853,
16,
899,
366,
4232,
29592,
4010,
286,
2060,
10297,
2958,
445,
9922,
16,
899,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frexp() {
// We have to use from_str until base-2 exponents
// are supported in floating-point literals
let f1: f64 = f64::from_str_radix("1p-123", 16).unwrap();
let f2: f64 = f64::from_str_radix("1p-111", 16).unwrap();
let f3: f64 = f64::from_str_radix("1... | rust_cleaned_test_functions.jsonl/39836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 464
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74179,
35725,
368,
341,
286,
442,
1205,
614,
311,
990,
504,
2895,
3080,
2331,
12,
17,
505,
2700,
198,
286,
442,
525,
7248,
304,
19057,
16574,
75275,
198,
286,
1077,
282,
16,
25,
282,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arg() {
fn test(c: Complex64, arg: f64) {
assert!((c.arg() - arg).abs() < 1.0e-6)
}
test(_1_0i, 0.0);
test(_1_1i, 0.25 * Float::pi());
test(_neg1_1i, 0.75 * Float::pi());
test(_05_05i, 0.25 * Float::pi());
} | rust_cleaned_test_functions.jsonl/133983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6057,
368,
341,
286,
5168,
1273,
1337,
25,
22096,
21,
19,
11,
1392,
25,
282,
21,
19,
8,
341,
310,
2060,
0,
1188,
66,
21186,
368,
481,
1392,
568,
3435,
368,
366,
220,
16,
13,
15,
68,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keymapping_parser() {
let p = string("map")
.skip(whitespace())
.then(KeyMapping::parser(&[]));
let (_, rest) = p.parse("map <tab> :q! {:q}").unwrap();
assert_eq!(rest, "");
let (_, rest) = p
.parse("map <tab> :brush/set erase... | rust_cleaned_test_functions.jsonl/95936 | {
"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,
3097,
40792,
18517,
368,
341,
286,
1077,
281,
284,
914,
445,
2186,
1138,
310,
659,
20599,
7,
1312,
36074,
2398,
310,
659,
3391,
21358,
6807,
486,
9657,
2099,
1294,
3237,
286,
1077,
39464,
2732,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug() {
assert::pass(
r#"assert_eq(
debug([1,2]),
"Value(ListGen(List { content: Cell { value: ValueType(Value(Array { len: 2, capacity: 2, iter_count: 0, content: [Value(1), Value(2)] })) } }))"
)"#,
);
} | rust_cleaned_test_functions.jsonl/37707 | {
"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,
15446,
368,
341,
286,
2060,
486,
6385,
1006,
310,
435,
55543,
2207,
10714,
1006,
394,
7390,
2561,
16,
11,
17,
17036,
394,
330,
1130,
10278,
9967,
10278,
314,
2213,
25,
13972,
314,
897,
25,
55545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dynamic_solve() {
let v = vec![5, 6, 3];
let w = vec![4, 5, 2];
let k = 9;
let problem = crate::build_problem(v, w, k);
let solved = dynamic_solve(problem);
assert_eq!(solved.contained, vec![true, true, false]);
... | rust_cleaned_test_functions.jsonl/69077 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
86246,
368,
341,
310,
1077,
348,
284,
7486,
20703,
20,
11,
220,
21,
11,
220,
18,
935,
310,
1077,
289,
284,
7486,
20703,
19,
11,
220,
20,
11,
220,
17,
935,
310,
1077,
595,
284,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shl() {
fn check(s: &str, shift: uint, ans: &str) {
let opt_biguint: Option<BigUint> = FromStrRadix::from_str_radix(s, 16);
let bu = (opt_biguint.unwrap() << shift).to_str_radix(16);
assert_eq!(bu.as_slice(), ans);
}
check("0", 3, "0")... | rust_cleaned_test_functions.jsonl/96893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 896
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
75,
368,
341,
286,
5168,
1779,
1141,
25,
609,
495,
11,
6407,
25,
2622,
11,
8099,
25,
609,
495,
8,
341,
310,
1077,
3387,
36386,
2496,
25,
6959,
27,
15636,
21570,
29,
284,
5542,
2580,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wrong_header() {
let mut reader = Reader::new(&b"!test\nACGTA\n"[..]);
let mut record = Record::new();
assert!(
reader.read(&mut record).is_err(),
"read() should return Err if FASTA header is malformed"
);
} | rust_cleaned_test_functions.jsonl/62822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
75198,
8757,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
931,
2099,
65,
1,
0,
1944,
1699,
1706,
38,
15204,
1699,
36864,
496,
2558,
286,
1077,
5206,
3255,
284,
13583,
486,
931,
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_prf_empty_data() {
let key = Vec::from_hex("aaaa").unwrap();
let actual = prf(&key[..], "some prefix", "".as_bytes(), 192);
assert_eq!(actual.is_ok(), true);
let expected = Vec::from_hex("785e095774cfea480c267e74130cb86d1e3fc80095b66554").unwrap();
assert... | rust_cleaned_test_functions.jsonl/132289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
69,
15124,
1769,
368,
341,
286,
1077,
1376,
284,
11312,
486,
1499,
32655,
445,
28458,
1827,
15454,
543,
286,
1077,
5042,
284,
548,
69,
2099,
792,
95874,
1125,
330,
14689,
9252,
497,
44907,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_and_then() {
init();
let pv1 = b'a';
let pv2 = b'b';
let p = elm_ref(pv1) + elm_ref(pv2);
let result = p.parse_as_result(b"ab").unwrap();
log::debug!("result = {:?}", result);
let (a, b) = result;
assert_eq!(*a, pv1);
assert_eq!(*b, pv2);
} | rust_cleaned_test_functions.jsonl/16805 | {
"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,
8378,
68367,
368,
341,
262,
2930,
543,
262,
1077,
33491,
16,
284,
293,
25184,
1010,
262,
1077,
33491,
17,
284,
293,
90853,
1010,
262,
1077,
281,
284,
42205,
7793,
1295,
85,
16,
8,
488,
42205,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mark_disabled() {
let mut batch = Packets::default();
batch.packets.push(Packet::default());
let mut batches: Vec<Packets> = vec![batch];
mark_disabled(&mut batches, &[vec![0]]);
assert_eq!(batches[0].packets[0].meta.discard, true);
mark_disabled(&... | rust_cleaned_test_functions.jsonl/34736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
51401,
368,
341,
286,
1077,
5206,
7162,
284,
13795,
1415,
486,
2258,
543,
286,
7162,
556,
18382,
2552,
92222,
486,
2258,
1423,
286,
1077,
5206,
44792,
25,
11312,
21604,
18382,
29,
284,
7486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpcs() {
// require lib-common ic module for the whole test
let _m = libcommon_ic::use_module();
let mut server_reg = RpcRegister::new();
register_user_rpcs(&mut server_reg);
let mut client_reg = RpcRegister::new();
register_custom_rpcs(&mut clie... | rust_cleaned_test_functions.jsonl/121850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
47313,
368,
341,
286,
442,
1373,
3051,
45045,
17902,
4688,
369,
279,
4361,
1273,
198,
286,
1077,
716,
76,
284,
3051,
5464,
32747,
486,
810,
10750,
1428,
286,
1077,
5206,
3538,
4920,
284,
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_basic() {
decode_expect_call(
"f86b8085e8d4a510008227109413978aee95f38490e9769c39b2773ed763d9cd5f872386f26fc10000801ba0eab47c1a49bf2fe5d40e01d313900e19ca485867d462fe06e139e3a536c6d4f4a014a569d327dcda4b29f74f93c0e9729d2f49ad726e703f9cd90dbb0fbf6649f1",
... | rust_cleaned_test_functions.jsonl/110001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 951
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
34729,
368,
341,
1789,
286,
16895,
68918,
13429,
1006,
310,
330,
69,
23,
21,
65,
23,
15,
23,
20,
68,
23,
67,
19,
64,
20,
16,
15,
15,
15,
23,
17,
17,
22,
16,
15,
24,
19,
16,
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_set_ipv4_addr() {
let mut ns = MmdsNetworkStack::new_with_defaults(None);
assert_ne!(ns.ipv4_addr, Ipv4Addr::LOCALHOST);
assert_ne!(ns.tcp_handler.local_ipv4_addr(), Ipv4Addr::LOCALHOST);
ns.set_ipv4_addr(Ipv4Addr::LOCALHOST);
assert_eq!(ns.ipv4_addr, Ipv4... | rust_cleaned_test_functions.jsonl/47951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
49378,
19,
7387,
368,
341,
286,
1077,
5206,
12268,
284,
386,
2277,
82,
12320,
4336,
486,
931,
6615,
42290,
26717,
317,
286,
2060,
13925,
10297,
4412,
87452,
19,
7387,
11,
358,
30168,
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... | 1 |
#[test]
fn test_overlapping() {
assert!(!check_overlapping(10, 7, 3));
assert!(check_overlapping(10, 8, 3));
assert!(check_overlapping(10, 9, 3));
assert!(check_overlapping(10, 10, 3));
assert!(check_overlapping(10, 11, 3));
assert!(check_overlapping(10, 12, 3));
... | rust_cleaned_test_functions.jsonl/35334 | {
"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,
15431,
90619,
368,
341,
286,
2060,
0,
3471,
2028,
15431,
90619,
7,
16,
15,
11,
220,
22,
11,
220,
18,
1106,
286,
2060,
10297,
2028,
15431,
90619,
7,
16,
15,
11,
220,
23,
11,
220,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_nested_multi_import() {
let code = String::from("
import std::{
printi,
println,
ext::{
malloc = alloc,
dealloc,
inner::*
}
};
");
let mut lexer = Token::lexer(code.... | rust_cleaned_test_functions.jsonl/43195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
66279,
25133,
18434,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
70576,
286,
1159,
1460,
74843,
310,
1173,
72,
345,
310,
13751,
345,
310,
1303,
74843,
394,
15731,
284,
5574,
345,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_image_parse_registry() {
assert_eq!(
ImageRef::parse("quay.io/prometheus/node-exporter:v0.18.1"),
ImageRef {
registry: Some("quay.io".into()),
image: "prometheus/node-exporter".into(),
tag: Some("v0.18.1".into()),
hash: None
}
);
ass... | rust_cleaned_test_functions.jsonl/17930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 767
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
21039,
50650,
368,
341,
262,
2060,
10714,
33673,
414,
4654,
3945,
486,
6400,
445,
446,
352,
4245,
76951,
39705,
37211,
65827,
261,
52649,
15,
13,
16,
23,
13,
16,
4461,
414,
4654,
3945,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_signature_tests() {
let pp = PubParam::init_without_seed();
let res = KeyPair::keygen(b"this is a very very long seed for testing", &pp);
assert!(res.is_ok(), "key gen failed");
let (pk, sk, pop) = res.unwrap();
assert!(pk.validate(&pop));
let msg = b"message to sig... | rust_cleaned_test_functions.jsonl/51405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 864
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
39859,
32509,
368,
341,
262,
1077,
11823,
284,
22611,
2001,
486,
2327,
39904,
33809,
543,
262,
1077,
592,
284,
5309,
12443,
486,
792,
4370,
1883,
1,
574,
374,
264,
1602,
1602,
1293,
10320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compile_run() -> Result<(), Box<dyn Error>> {
let dir = env::current_dir()?;
let path = format!("{}/examples", dir.display());
env::set_current_dir(Path::new(&path)).unwrap();
let files = fs::read_dir(path.to_owned())?;
for file in files {
let ... | rust_cleaned_test_functions.jsonl/103707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 505
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
14007,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
5419,
284,
6105,
486,
3231,
4334,
94136,
286,
1077,
1815,
284,
3561,
88928,
4472,
51668,
497,
5419,
8181,
1423,
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... | 7 |
#[test]
fn test_u16_le() {
test_codec!(
get_u16_samples(),
encode_u16_le,
decode_u16_le,
write_u16_le,
read_u16_le,
);
} | rust_cleaned_test_functions.jsonl/56914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
16,
21,
11751,
368,
341,
286,
1273,
51084,
33673,
310,
633,
7300,
16,
21,
18297,
3148,
310,
16164,
7300,
16,
21,
11751,
345,
310,
16895,
7300,
16,
21,
11751,
345,
310,
3270,
7300,
16,
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 |
#[test]
fn test_is_ts_identifier() {
// Valid:
assert!(is_ts_identifier("foobar"));
assert!(is_ts_identifier("FOOBAR"));
assert!(is_ts_identifier("foo_bar"));
assert!(is_ts_identifier("$"));
assert!(is_ts_identifier("foobar1"));
// Invalid:
assert... | rust_cleaned_test_functions.jsonl/31409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
25023,
33176,
368,
341,
286,
442,
7818,
510,
286,
2060,
10297,
285,
25023,
33176,
445,
50267,
4010,
286,
2060,
10297,
285,
25023,
33176,
445,
3788,
20608,
934,
4010,
286,
2060,
10297,
285,
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_include_and_exclude_match_neither() {
let include = Some(vec![String::from("tmpfs")]);
let exclude = Some(vec![String::from("squashfs")]);
let opt = Options {
include,
exclude,
..Default::default()
};... | rust_cleaned_test_functions.jsonl/7073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37878,
8378,
88668,
10708,
13925,
2485,
368,
341,
310,
1077,
2924,
284,
4329,
25592,
20703,
703,
486,
1499,
445,
5173,
3848,
899,
2558,
310,
1077,
21687,
284,
4329,
25592,
20703,
703,
486,
1499,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stx() {
let mut r = Register::new();
let mut b = MockBus::new();
r.set_X(0xFF);
stx(0x11, &mut r, &mut b);
assert_eq!(b.read(0x11), 0xFF)
} | rust_cleaned_test_functions.jsonl/14186 | {
"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,
1261,
87,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
1077,
5206,
293,
284,
14563,
15073,
486,
931,
543,
262,
435,
980,
6859,
7,
15,
9264,
317,
262,
357,
87,
7,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_enum_is_from_tuple_variant() {
check_assist(
generate_enum_is_method,
r#"
enum Variant {
Undefined,
Minor(u32)$0,
Major,
}"#,
r#"enum Variant {
Undefined,
Minor(u32),
Major,
}
impl Variant {
/// Returns `true` if t... | rust_cleaned_test_functions.jsonl/117714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
31054,
6892,
5673,
21773,
46112,
368,
341,
286,
1779,
12083,
380,
1006,
310,
6923,
31054,
6892,
9032,
345,
310,
435,
2,
698,
9018,
39292,
341,
262,
62370,
345,
262,
29793,
8154,
18,
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... | 1 |
#[test]
fn test_output_ordering_untouched() {
let original_tx = ordering_test_tx!();
let mut tx = original_tx.clone();
TxOrdering::Untouched.sort_tx(&mut tx);
assert_eq!(original_tx, tx);
} | rust_cleaned_test_functions.jsonl/5555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
7869,
287,
62,
3850,
33070,
368,
341,
286,
1077,
4024,
17805,
284,
21391,
4452,
17805,
0,
543,
286,
1077,
5206,
9854,
284,
4024,
17805,
15997,
1428,
286,
39850,
4431,
287,
486,
20250,
33070,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_queue_validation() {
let m = &GuestMemoryMmap::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap();
let vq = VirtQueue::new(GuestAddress(0), m, 16);
let mut q = vq.create_queue();
// q is currently valid
assert!(q.is_valid(m));
// shouldn't be v... | rust_cleaned_test_functions.jsonl/3576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10841,
19416,
368,
341,
286,
1077,
296,
284,
609,
37804,
10642,
44,
2186,
486,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
15454,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pubkey_key_agreement() {
let rng = botan::RandomNumberGenerator::new_system().unwrap();
let a_priv = botan::Privkey::create("ECDH", "secp384r1", &rng).unwrap();
let b_priv = botan::Privkey::create("ECDH", "secp384r1", &rng).unwrap();
let a_pub = a_priv.key_agreement_key().unwr... | rust_cleaned_test_functions.jsonl/95308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
792,
3097,
20587,
17150,
368,
1476,
262,
1077,
28422,
284,
10924,
276,
486,
13999,
2833,
12561,
486,
931,
17687,
1005,
15454,
1428,
262,
1077,
264,
24726,
284,
10924,
276,
486,
32124,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unique_name() {
let inspector = Inspector::new();
let name_1 = unique_name("a");
assert_eq!(name_1, "a0");
inspector.root().record_uint(name_1, 1);
let name_2 = unique_name("a");
assert_eq!(name_2, "a1");
inspector.root().record_uint(name... | rust_cleaned_test_functions.jsonl/27578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21218,
1269,
368,
341,
286,
1077,
44725,
284,
44495,
486,
931,
1428,
286,
1077,
829,
62,
16,
284,
4911,
1269,
445,
64,
797,
286,
2060,
10714,
10297,
606,
62,
16,
11,
330,
64,
15,
797,
286,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sub_assign() {
let mut rng = ark_std::test_rng();
for _ in 0..1000 {
let a = Fq::rand(&mut rng);
let b = Fq::rand(&mut rng);
let mut tmp1 = a;
tmp1.sub_assign(&b);
let mut tmp2 = b;
tmp2.sub_assign(&a);
tmp1.add_assi... | rust_cleaned_test_functions.jsonl/3543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
5228,
20688,
368,
341,
262,
1077,
5206,
28422,
284,
55217,
15656,
486,
1944,
66849,
1428,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
341,
1789,
286,
1077,
264,
284,
434,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_false() {
assert_eq!(
crate::rsass(
"a {b: join([c], [d], $bracketed: false)}\
\n"
)
.unwrap(),
"a {\
\n b: c d;\
\n}\
\n"
);
} | rust_cleaned_test_functions.jsonl/71425 | {
"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,
36015,
368,
341,
286,
2060,
10714,
33673,
310,
17717,
486,
5428,
395,
1006,
394,
330,
64,
314,
65,
25,
5138,
2561,
66,
1125,
508,
67,
1125,
400,
1323,
5709,
291,
25,
895,
9139,
5661,
310,
1124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transactions_instruction_error() {
solana_logger::setup();
let lamports = 10_000;
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_slow_genesis_config(lamports);
let bank = Arc::new(Bank::new_n... | rust_cleaned_test_functions.jsonl/15492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
68182,
54923,
4096,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
31603,
3394,
284,
220,
16,
15,
62,
15,
15,
15,
280,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_hugetlb_with_invalid_page_size() {
let tmp = create_temp_dir("test_set_hugetlb_with_invalid_page_size").expect("create temp directory for test");
let hugetlb = LinuxHugepageLimit {
page_size: "3MB".to_owned(),
limit: 16384,
};
let res... | rust_cleaned_test_functions.jsonl/48131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
1523,
84,
455,
21123,
6615,
31433,
6129,
2368,
368,
341,
286,
1077,
4174,
284,
1855,
11771,
4334,
445,
1944,
2602,
1523,
84,
455,
21123,
6615,
31433,
6129,
2368,
1827,
17119,
445,
3182,
2730... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unicase() {
let db = Connection::open_in_memory().unwrap();
db.create_collation("unicase", unicase_compare).unwrap();
collate(db);
} | rust_cleaned_test_functions.jsonl/34899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3525,
519,
368,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
1428,
286,
2927,
2520,
43597,
367,
445,
3525,
519,
497,
87549,
519,
32235,
568,
15454,
1428,
286,
4530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_string() {
Variant::VString("hello".to_string())
.divide(Variant::VString("world".to_string()))
.expect_err("Type mismatch");
} | rust_cleaned_test_functions.jsonl/84619 | {
"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,
3904,
368,
341,
394,
39292,
486,
53,
703,
445,
14990,
3263,
983,
3904,
2398,
503,
659,
59394,
12410,
15341,
486,
53,
703,
445,
14615,
3263,
983,
3904,
12145,
503,
659,
17119,
9266,
445,
929,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_calculate_body() {
let hash = vec![0u8; 32];
let spent_output = SpentOutput::OutputHash(hash);
let input = TransactionInput::new_current_version(
spent_output,
ExecutionStack::new(vec![]),
RistrettoComSig::default(),
);
... | rust_cleaned_test_functions.jsonl/40539 | {
"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,
24005,
11207,
14114,
368,
341,
286,
1077,
5175,
284,
7486,
20703,
15,
84,
23,
26,
220,
18,
17,
935,
286,
1077,
7391,
7645,
284,
3089,
306,
5097,
486,
5097,
6370,
27580,
317,
286,
1077,
1946,
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_dynamic_table_size_update() {
let mut buf = vec![];
DynamicTableSizeUpdate(25).encode(&mut buf);
let mut enc = Cursor::new(&buf);
let mut dec = vec![];
let mut table = build_table_with_size(0);
let res = on_encoder_recv(&mut table.inserter(), &mut... | rust_cleaned_test_functions.jsonl/37418 | {
"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,
45992,
5237,
2368,
8882,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
0,
15078,
286,
21886,
2556,
1695,
4289,
7,
17,
20,
568,
6180,
2099,
6984,
6607,
626,
286,
1077,
5206,
3209,
284,
28067,
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_command_from_line_move_south() {
assert_eq!(
Command::from_line("S42"),
Command::Move(Direction::South, 42)
)
} | rust_cleaned_test_functions.jsonl/114151 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
5673,
6528,
17134,
643,
2898,
368,
341,
286,
2060,
10714,
33673,
310,
7348,
486,
1499,
6528,
445,
50,
19,
17,
4461,
310,
7348,
486,
9860,
81740,
486,
25018,
11,
220,
19,
17,
340,
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 |
#[test]
fn test_user_report_invalid() {
let processor = EnvelopeProcessor::new(Arc::new(Default::default()));
let event_id = EventId::new();
let dsn = "https://e12d836b15bb49d7bbf99e64295d995b:@sentry.io/42"
.parse()
.unwrap();
let request_meta = Request... | rust_cleaned_test_functions.jsonl/82039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 604
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
14813,
31433,
368,
341,
286,
1077,
17654,
284,
2925,
18853,
22946,
486,
931,
4346,
1287,
486,
931,
87874,
486,
2258,
7392,
286,
1077,
1538,
842,
284,
3665,
764,
486,
931,
1428,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_forks_active_banks() {
let GenesisBlockInfo { genesis_block, .. } = create_genesis_block(10_000);
let bank = Bank::new(&genesis_block);
let mut bank_forks = BankForks::new(0, bank);
let child_bank = Bank::new_from_parent(&bank_forks[0u64], &Pubkey::default(),... | rust_cleaned_test_functions.jsonl/36521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
761,
73302,
12930,
880,
4039,
368,
341,
286,
1077,
40788,
4713,
1731,
314,
59366,
7113,
11,
5241,
335,
284,
1855,
16322,
13774,
7113,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
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_update4() {
let (map, bbox) = parse4(CONTENT, 0, 0);
println!("{:?}", map);
let (map, bbox) = update4(&map, &bbox);
println!("{:?}", bbox);
for w in bbox.w_rg.0..bbox.w_rg.1 {
for z in bbox.z_rg.0..bbox.z_rg.1 {
println!("z = ... | rust_cleaned_test_functions.jsonl/34499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
19,
368,
341,
286,
1077,
320,
2186,
11,
29749,
8,
284,
4715,
19,
98747,
1825,
11,
220,
15,
11,
220,
15,
626,
286,
13751,
88928,
25,
52652,
2415,
317,
286,
1077,
320,
2186,
11,
29749,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_ser_de() {
let b = bytes::Bytes::from(&b"bytes"[..]);
assert_tokens(&b, &[Token::Bytes(b"bytes")]);
let b = bytes::BytesMut::from(&b"bytes"[..]);
assert_tokens(&b, &[Token::Bytes(b"bytes")]);
} | rust_cleaned_test_functions.jsonl/20254 | {
"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,
75861,
2259,
368,
341,
262,
1077,
293,
284,
5820,
486,
7078,
486,
1499,
2099,
65,
70591,
36864,
496,
2558,
262,
2060,
28838,
2099,
65,
11,
44590,
3323,
486,
7078,
1883,
70591,
899,
2558,
262,
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_language_casing() {
assert_parsed_language_identifier("Pl", Some("pl"), None, None, None);
assert_parsed_language_identifier("En-uS", Some("en"), None, Some("US"), None);
assert_parsed_language_identifier("eN-lAtN-uS", Some("en"), Some("Latn"), Some("US"), None);
assert_parsed_la... | rust_cleaned_test_functions.jsonl/10760 | {
"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,
29021,
666,
4422,
368,
341,
262,
2060,
75788,
29021,
33176,
445,
2120,
497,
4329,
445,
500,
3975,
2240,
11,
2240,
11,
2240,
317,
262,
2060,
75788,
29021,
33176,
445,
1702,
45381,
50,
497,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_boot_param() {
const KERNEL_BOOT_FLAG_MAGIC: u16 = 0xaa55;
const KERNEL_HDR_MAGIC: u32 = 0x5372_6448;
const KERNEL_LOADER_OTHER: u8 = 0xff;
const KERNEL_MIN_ALIGNMENT_BYTES: u32 = 0x0100_0000; // Must be non-zero.
let mut params: BootParamsWrapper = ... | rust_cleaned_test_functions.jsonl/101591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
52062,
4090,
368,
341,
286,
733,
79691,
57313,
11890,
49194,
25,
575,
16,
21,
284,
220,
15,
43300,
20,
20,
280,
286,
733,
79691,
55765,
49194,
25,
575,
18,
17,
284,
220,
15,
87,
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_hash_3() {
let password = "Correct Horse Battery Staple";
let opslimit = OpsLimit(3);
let memlimit = MemLimit(5000000);
let result = pwhash(password.as_bytes(), opslimit, memlimit);
assert!(result.is_ok(), "failed to hash password (1)");
let out =... | rust_cleaned_test_functions.jsonl/134480 | {
"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,
8950,
62,
18,
368,
341,
286,
1077,
3552,
284,
330,
33092,
33292,
33612,
62506,
273,
876,
286,
1077,
1179,
3226,
2353,
284,
55158,
16527,
7,
18,
317,
286,
1077,
1833,
9506,
284,
13550,
16527,
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_statsd() {
let in_addr = next_addr();
let out_addr = next_addr();
let mut config = config::Config::empty();
config.add_source("in", StatsdConfig { address: in_addr });
config.add_sink(
"out",
&["in"],
PrometheusSinkConf... | rust_cleaned_test_functions.jsonl/27532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
368,
341,
286,
1077,
304,
7387,
284,
1790,
7387,
543,
286,
1077,
700,
7387,
284,
1790,
7387,
1428,
286,
1077,
5206,
2193,
284,
2193,
486,
2648,
486,
3194,
543,
286,
2193,
1364,
10347,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_symlink_and_full_path() {
let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES);
let root = te.system_root();
let prefix = escape(&root.to_string_lossy());
let expected_path = if cfg!(windows) { "symlink" } else { "one/two" };
te.assert_output_subdire... | rust_cleaned_test_functions.jsonl/65619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58530,
44243,
8378,
16372,
2638,
368,
341,
262,
1077,
320,
665,
11,
3647,
2638,
8,
284,
633,
4452,
15879,
6615,
31170,
2638,
43175,
90560,
11,
11955,
48010,
317,
262,
1077,
3704,
284,
1013,
15936,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_expand_to_item_list() {
let tree = parse_macro(
"
macro_rules! structs {
($($i:ident),*) => {
$(struct $i { field: u32 } )*
}
}
",
)
.expand_items("structs!(Foo, Bar);");
assert_eq!(
... | rust_cleaned_test_functions.jsonl/28720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 778
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67875,
2346,
5634,
2019,
368,
341,
262,
1077,
4916,
284,
4715,
58810,
1006,
286,
6228,
310,
18072,
21407,
0,
62845,
341,
394,
1711,
699,
72,
25,
1713,
701,
3764,
589,
341,
503,
4930,
1235,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.