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_version_long() {
let (r, sioe) = do_execute!(&["--version"]);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(buff!(sioe, sout), version_msg!());
assert_eq!(r.is_ok(), true);
} | rust_cleaned_test_functions.jsonl/62176 | {
"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,
9438,
17799,
368,
341,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
313,
4366,
15049,
286,
2060,
10714,
10297,
25976,
10297,
82,
815,
68,
11,
61934,
701,
14498,
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_part1() {
assert_eq!(solve_part1(5), 0124515891);
assert_eq!(solve_part1(18), 9251071085);
assert_eq!(solve_part1(2018), 5941429882);
} | rust_cleaned_test_functions.jsonl/24673 | {
"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,
10495,
16,
368,
341,
286,
2060,
10714,
10297,
59419,
10495,
16,
7,
20,
701,
220,
15,
16,
17,
19,
20,
16,
20,
23,
24,
16,
317,
286,
2060,
10714,
10297,
59419,
10495,
16,
7,
16,
23,
701,
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_is_subsequence() {
let candidate = "foobaaar";
assert!(is_subsequence(candidate, "foobar", MatchCase::No).is_some());
assert!(is_subsequence(candidate, "foobaaar", MatchCase::No).is_some());
assert!(is_subsequence(candidate, "foOBAaar", MatchCase::No).is_some());
... | rust_cleaned_test_functions.jsonl/88765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
5228,
15512,
368,
341,
286,
1077,
9144,
284,
330,
824,
674,
5305,
277,
876,
286,
2060,
10297,
285,
5228,
15512,
72021,
11,
330,
50267,
497,
14152,
4207,
486,
2753,
568,
285,
61855,
1423,
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_append_by_appending_string() {
let initial_str = "Iñtërnâtiônàlizætiøn";
let to_append = "_more_strings";
let expected = concat!("Iñtërnâtiônàlizætiøn", "_more_strings");
unsafe {
let built = NSString::alloc(nil).init_str(initial_st... | rust_cleaned_test_functions.jsonl/78766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
3710,
8191,
2459,
3904,
368,
341,
310,
1077,
2856,
2895,
284,
330,
40,
5653,
83,
12179,
35622,
8835,
10251,
61452,
6362,
75,
449,
9191,
10251,
6151,
77,
876,
310,
1077,
311,
26041,
284,
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_primitive_array_abs_i32() {
let a = Int32Array::from(vec![-5, -6, 7, -8, -0]);
let c: &PrimitiveArray<Int32Type> = &ScalarFunctions::abs(vec![&a]).unwrap()[0];
assert_eq!(5, c.value(0));
assert_eq!(6, c.value(1));
assert_eq!(7, c.value(2));
assert_... | rust_cleaned_test_functions.jsonl/96115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
31170,
5318,
18,
17,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
0,
7609,
20,
11,
481,
21,
11,
220,
22,
11,
481,
23,
11,
481,
15,
2558,
286,
1077,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_all_versions() {
use super::*;
let paths = ProjectPathsConfig::builder()
.root("./test-data/test-contract-versions")
.sources("./test-data/test-contract-versions")
.build()
.unwrap();
let project = Project::builder().... | rust_cleaned_test_functions.jsonl/26853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
5705,
65148,
368,
341,
286,
990,
2256,
79304,
286,
1077,
12716,
284,
5787,
26901,
2648,
486,
17850,
741,
310,
659,
2888,
13988,
1944,
13945,
12697,
14859,
2144,
12,
28290,
1138,
310,
659,
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_bfs_with_graph() {
let mut graph: Vec<Vec<usize>> = Vec::new();
graph.resize(4, vec![]);
add_edge(&mut graph, 0, 1);
add_edge(&mut graph, 0, 2);
add_edge(&mut graph, 1, 2);
add_edge(&mut graph, 2, 0);
add_edge(&mut graph, 2, 3);
add_edge(&mut graph, 3, 3);
p... | rust_cleaned_test_functions.jsonl/4654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
3848,
6615,
14738,
368,
341,
262,
1077,
5206,
4771,
25,
11312,
50439,
90244,
2452,
284,
11312,
486,
931,
543,
262,
4771,
17382,
7,
19,
11,
7486,
0,
1294,
626,
262,
912,
17932,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer() {
static mut DATA: [u8; 64] = [0u8; 64];
let b = unsafe {
let b = &mut *(DATA.as_mut_ptr() as *mut Buffer);
b.header = BufferHeader {
len: (DATA.len() - mem::size_of::<BufferHeader>()) as u32,
pos: 0,
};... | rust_cleaned_test_functions.jsonl/14940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
368,
341,
286,
1099,
5206,
14112,
25,
508,
84,
23,
26,
220,
21,
19,
60,
284,
508,
15,
84,
23,
26,
220,
21,
19,
935,
286,
1077,
293,
284,
19860,
341,
310,
1077,
293,
284,
609,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_weightedindex() {
let mut r = ::test::rng(700);
const N_REPS: u32 = 5000;
let weights = [1u32, 2, 3, 0, 5, 6, 7, 1, 2, 3, 4, 5, 6, 7];
let total_weight = weights.iter().sum::<u32>() as f32;
let verify = |result: [i32; 14]| {
for (i, count) in ... | rust_cleaned_test_functions.jsonl/47382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1072
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
1252,
368,
341,
286,
1077,
5206,
435,
284,
3504,
1944,
486,
69890,
7,
22,
15,
15,
317,
286,
733,
451,
2192,
5012,
25,
575,
18,
17,
284,
220,
20,
15,
15,
15,
280,
286,
1077,
143... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_memoized_factorial_correctness() {
let mut memo = HashMap::new();
assert_eq!(memoized_factorial(4, &mut memo), 24);
assert_eq!(memo.get(&0), Some(&24));
assert_eq!(memo.get(&1), Some(&24));
assert_eq!(memo.get(&2), Some(&12));
assert_eq!(memo.get(&3), Some(&4));
asse... | rust_cleaned_test_functions.jsonl/57068 | {
"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,
717,
6726,
1506,
18588,
530,
31550,
2090,
368,
341,
262,
1077,
5206,
21438,
284,
10528,
486,
931,
1428,
262,
2060,
10714,
10297,
55409,
1506,
18588,
530,
7,
19,
11,
609,
6984,
21438,
701,
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... | 1 |
#[test]
fn test_rposition() {
let b = [1, 2, 3, 5, 5];
assert!(b.iter().rposition(|&v| v == 9) == None);
assert!(b.iter().rposition(|&v| v == 5) == Some(4));
assert!(b.iter().rposition(|&v| v == 3) == Some(2));
assert!(b.iter().rposition(|&v| v == 0) == None);
} | rust_cleaned_test_functions.jsonl/8436 | {
"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,
1710,
3487,
368,
341,
262,
1077,
293,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
11,
220,
20,
935,
262,
2060,
10297,
65,
19471,
1005,
81,
3487,
22428,
5,
85,
91,
348,
621,
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_serialize_serde() {
let s = Secp256k1::new();
for _ in 0..500 {
let (sk, pk) = s.generate_keypair(&mut thread_rng()).unwrap();
round_trip_serde!(sk);
round_trip_serde!(pk);
}
} | rust_cleaned_test_functions.jsonl/41399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
75861,
450,
368,
341,
286,
1077,
274,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
369,
716,
304,
220,
15,
496,
20,
15,
15,
341,
310,
1077,
320,
4886,
11,
22458,
8,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_verifier_new() {
let _setup = SetupAriesMocks::init();
let verifier_sm = _verifier_sm();
assert_match!(VerifierState::Initiated(_), verifier_sm.state);
assert_eq!(source_id(), verifier_sm.source_id());
} | rust_cleaned_test_functions.jsonl/57243 | {
"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,
26042,
3049,
5921,
368,
341,
310,
1077,
716,
15188,
284,
18626,
32,
4019,
72577,
486,
2327,
1428,
310,
1077,
88737,
15874,
284,
716,
423,
3049,
15874,
1428,
310,
2060,
10708,
10297,
82394,
1397,
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 |
#[test]
fn test_no_row() {
#[derive(Debug, AggrFunction)]
#[aggr_function(state = AggrFnFooState)]
struct AggrFnFoo;
#[derive(Debug)]
struct AggrFnFooState;
impl ConcreteAggrFunctionState for AggrFnFooState {
type ParameterType = Real;
f... | rust_cleaned_test_functions.jsonl/56099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
8530,
368,
341,
286,
11506,
27098,
42618,
11,
4598,
901,
5152,
5563,
286,
11506,
351,
901,
9174,
8390,
284,
4598,
901,
24911,
40923,
1397,
5563,
286,
2036,
4598,
901,
24911,
40923,
401,
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_destroy_input_stream_after_unplugging_a_default_input_device() {
test_unplug_a_device_on_an_active_stream(StreamType::INPUT, Scope::Input, true, 0);
} | rust_cleaned_test_functions.jsonl/23853 | {
"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,
18066,
5898,
12673,
19844,
4907,
500,
35268,
4306,
9993,
5898,
9204,
368,
341,
262,
1273,
4907,
47474,
4306,
9204,
4470,
12008,
12930,
12673,
52011,
929,
486,
29421,
11,
34920,
486,
2505,
11,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_long_long_int() {
assert_eq!(
parse_long_long_int(&[0, 0, 0, 0, 0, 0, 0, 0][..]),
Ok((EMPTY, 0))
);
assert_eq!(
parse_long_long_int(&[255, 255, 255, 255, 255, 255, 255, 255][..]),
Ok((EMPTY, -1))
);
} | rust_cleaned_test_functions.jsonl/25455 | {
"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,
21039,
17799,
17799,
4042,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
17799,
17799,
4042,
2099,
58,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_ping_packets() {
assert_decode_packet(b"\xc0\x00", Packet::PingRequest);
assert_decode_packet(b"\xd0\x00", Packet::PingResponse);
} | rust_cleaned_test_functions.jsonl/19930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
71661,
63569,
368,
341,
286,
2060,
15227,
21078,
1883,
11934,
8148,
15,
3462,
15,
15,
497,
28889,
486,
69883,
1900,
317,
286,
2060,
15227,
21078,
1883,
11934,
9703,
15,
3462,
15,
15,
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 |
#[test]
fn test_update_at() {
let e = List::one(3).cons(4).cons(1).cons(2);
let e = e.update_at(1, 5);
assert_eq!(e.tail().head(), &5);
} | rust_cleaned_test_functions.jsonl/40672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
3752,
368,
341,
1789,
286,
1077,
384,
284,
1759,
486,
603,
7,
18,
568,
6254,
7,
19,
568,
6254,
7,
16,
568,
6254,
7,
17,
317,
1789,
286,
1077,
384,
284,
384,
5317,
3752,
7,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_list_array_invalid_buffer_len() {
let value_data = ArrayData::builder(DataType::Int32)
.len(8)
.add_buffer(Buffer::from(&[0, 1, 2, 3, 4, 5, 6, 7].to_byte_slice()))
.build();
let list_data_type = DataType::List(Box::new(DataType::Int32));
... | rust_cleaned_test_functions.jsonl/11613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
3858,
31433,
7776,
6043,
368,
341,
286,
1077,
897,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
1072,
18,
17,
340,
310,
659,
2892,
7,
23,
340,
310,
659,
718,
7776,
55574,
486,
1499,
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_unescape_str_good() {
fn check(literal_text: &str, expected: &str) {
let mut buf = Ok(String::with_capacity(literal_text.len()));
unescape_str(literal_text, &mut |range, c| {
if let Ok(b) = &mut buf {
match c {
... | rust_cleaned_test_functions.jsonl/61421 | {
"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,
4907,
12998,
2895,
44781,
368,
341,
286,
5168,
1779,
2333,
9953,
4326,
25,
609,
495,
11,
3601,
25,
609,
495,
8,
341,
310,
1077,
5206,
6607,
284,
7622,
2242,
486,
4197,
35603,
2333,
9953,
4326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arguments_explicit_dep_target() {
let args = stringvec!["-c", "foo.c", "-MT", "depfile", "-fabc", "-MF", "file", "-o", "foo.o"];
let ParsedArguments {
input,
language,
depfile: _,
outputs,
preprocessor_args,
... | rust_cleaned_test_functions.jsonl/15018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
14214,
6026,
49258,
11123,
368,
341,
286,
1077,
2827,
284,
914,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
497,
6523,
8505,
497,
330,
14891,
1192,
497,
6523,
69,
13683,
497,
6523,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_coinbase_serialize_bytes() {
use crypto::random::Random;
for _ in 0..10 {
let address = Address::random().unwrap();
let distance = Random::u64_range(1, 10).unwrap();
let difficulty = Random::u64_range(1, 10).unwrap();
let coinbase_a = Coinbase::new(&addre... | rust_cleaned_test_functions.jsonl/70436 | {
"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,
75718,
3152,
88686,
12524,
368,
341,
262,
990,
19028,
486,
11463,
486,
13999,
401,
262,
369,
716,
304,
220,
15,
496,
16,
15,
341,
286,
1077,
2621,
284,
9177,
486,
11463,
1005,
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... | 2 |
#[test]
fn test_boolean_equal() {
let a = BooleanArray::from(vec![false, false, true]);
let a = a.data();
let b = BooleanArray::from(vec![false, false, true]);
let b = b.data();
test_equal(&a, &b, true);
let b = BooleanArray::from(vec![false, false, false]);
... | rust_cleaned_test_functions.jsonl/24204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
11478,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
25592,
20703,
3849,
11,
895,
11,
830,
2558,
286,
1077,
264,
284,
264,
2196,
543,
286,
1077,
293,
284,
6992,
1857,
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_ort_status() {
setup_runtime();
let status = create_status(OrtErrorCode_ORT_MODEL_LOADED, "OKOKOKO".to_string());
assert_eq!(9, get_error_code(status));
release_status(status as *mut OrtStatus);
} | rust_cleaned_test_functions.jsonl/21166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
371,
4773,
368,
341,
286,
6505,
33232,
543,
286,
1077,
2639,
284,
1855,
4773,
7,
2195,
83,
30748,
62,
2868,
27551,
89917,
11,
330,
3925,
3925,
3925,
46,
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_topological_sort() {
let edges_list = vec![
vec![(5, 2), (5, 0), (4, 0), (4, 1), (2, 3), (3, 1)],
vec![(0, 1), (1, 2), (2, 3), (3, 4)],
vec![
(0, 1),
(0, 2),
(0, 3),
(0, 4),
... | rust_cleaned_test_functions.jsonl/64951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
5729,
18435,
368,
341,
286,
1077,
12822,
2019,
284,
7486,
90515,
310,
7486,
0,
9697,
20,
11,
220,
17,
701,
320,
20,
11,
220,
15,
701,
320,
19,
11,
220,
15,
701,
320,
19,
11,
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... | 2 |
#[test]
fn test_varcon_same_locale() {
let dict = BuiltIn::new(crate::config::Locale::EnUs);
let correction = dict.correct_word(typos::tokens::Word::new_unchecked(
"finalizes",
typos::tokens::Case::Lower,
0,
));
assert_eq!(correction, Some(Stat... | rust_cleaned_test_functions.jsonl/62318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
443,
33574,
55518,
368,
341,
286,
1077,
6451,
284,
33054,
641,
486,
931,
54907,
486,
1676,
486,
19231,
486,
1702,
3558,
317,
286,
1077,
26262,
284,
6451,
81497,
13533,
1155,
88,
966,
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_set_guild_commands() {
let route = Route::SetGuildCommands {
application_id: APPLICATION_ID,
guild_id: GUILD_ID,
};
assert_eq!(
route.to_string(),
format!(
"applications/{application_id}/guilds/{guild_id}/com... | rust_cleaned_test_functions.jsonl/119853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
1889,
1498,
44151,
368,
341,
286,
1077,
6021,
284,
9572,
486,
1649,
72574,
30479,
341,
310,
3766,
842,
25,
59237,
3450,
345,
310,
26411,
842,
25,
479,
18023,
3450,
345,
286,
2605,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cached_path_remote_file() {
// For debugging:
let server = MockServer::start();
// Setup cache.
let cache_dir = tempdir().unwrap();
let cache = Cache::builder()
.dir(cache_dir.path().to_owned())
.progress_bar(None)
.freshness_lifetime(300)
... | rust_cleaned_test_functions.jsonl/38006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1098
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64369,
2638,
36425,
2458,
368,
341,
262,
442,
1752,
27703,
510,
1066,
262,
1077,
3538,
284,
14563,
5475,
486,
2468,
1428,
262,
442,
18626,
6500,
624,
262,
1077,
6500,
4334,
284,
2730,
3741,
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_duplicate_payment_hash_one_failure_one_success() {
// Topology : A --> B --> C
let chanmon_cfgs = create_chanmon_cfgs(3);
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None, None, None]);
let mut nodes = create_network(3, &no... | rust_cleaned_test_functions.jsonl/28314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
26696,
8950,
11667,
43618,
11667,
18632,
368,
341,
197,
322,
6909,
2449,
549,
362,
3844,
425,
3844,
356,
17642,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
18,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_decrypt_first_segment() {
let mut rc4_key = [0u8; 255];
for (i, p) in rc4_key.iter_mut().enumerate() {
*p = i as u8
}
let crypto = QMCStreamRC4Crypto::new(&rc4_key);
let mut data = [0u8; 16];
crypto.decrypt(0, &mut data);
assert... | rust_cleaned_test_functions.jsonl/37644 | {
"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,
80764,
12978,
28061,
368,
341,
286,
1077,
5206,
10192,
19,
3097,
284,
508,
15,
84,
23,
26,
220,
17,
20,
20,
935,
286,
369,
320,
72,
11,
281,
8,
304,
10192,
19,
3097,
19471,
29523,
1005,
7656... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parser_headline() {
let src = r#"
This is the first paragraph.
It has multiple sentences.
Each on their own line.
But it is still a single paragraph.
"#;
assert_parser(src, vec![Token::Headline(src.trim())]);
} | rust_cleaned_test_functions.jsonl/10003 | {
"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,
18517,
13138,
1056,
368,
341,
286,
1077,
2286,
284,
435,
2,
1837,
1986,
374,
279,
1156,
14311,
624,
2132,
702,
5248,
22870,
624,
4854,
389,
862,
1828,
1555,
624,
3983,
432,
374,
2058,
264,
3175,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rng_32_seeded() {
let seed: &[_] = &[1, 23, 456, 7890, 12345];
let mut ra: IsaacRng = SeedableRng::from_seed(seed);
let mut rb: IsaacRng = SeedableRng::from_seed(seed);
assert!(ra.gen_ascii_chars()
.take(100)
.eq(rb.gen_ascii_ch... | rust_cleaned_test_functions.jsonl/42029 | {
"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,
66849,
62,
18,
17,
3453,
29935,
368,
341,
286,
1077,
10320,
25,
609,
13496,
60,
284,
44590,
16,
11,
220,
17,
18,
11,
220,
19,
20,
21,
11,
220,
22,
23,
24,
15,
11,
220,
16,
17,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_new_chain() {
let tmp_dir = tempfile::tempdir().unwrap();
let chain_dir = tmp_dir.path().join("foo.test");
let block = MetadataFactory::metadata_block()
.seed_random()
.source(MetadataFactory::dataset_source_root().build())
.build();
let (chain, _... | rust_cleaned_test_functions.jsonl/119227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
5921,
30583,
368,
341,
262,
1077,
4174,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
8781,
4334,
284,
4174,
4334,
3875,
1005,
5987,
445,
7975,
5958,
3071,
262,
1077,
2504,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha256() {
let input = rand_bytes(100);
let mut hasher = sha2::Sha256::default();
hasher.update(&input);
let output = hasher.finalize().to_vec();
test_precompile!(Sha256, &input, output, 108);
} | rust_cleaned_test_functions.jsonl/51963 | {
"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,
48836,
17,
20,
21,
368,
341,
262,
1077,
1946,
284,
10382,
12524,
7,
16,
15,
15,
317,
262,
1077,
5206,
90819,
284,
15870,
17,
486,
62316,
17,
20,
21,
486,
2258,
543,
262,
90819,
5317,
2099,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_node_restart() {
setup_for_test();
let entries = vec![empty_entry(1, 1), new_entry(1, 2, Some("foo"))];
let st = hard_state(1, 1, 0);
let store = new_storage();
store.wl().set_hardstate(st);
store.wl().append(&entries).expect("");
let mut raw_node = new_raw_node(... | rust_cleaned_test_functions.jsonl/2061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5084,
69392,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
10695,
284,
7486,
20703,
3194,
9078,
7,
16,
11,
220,
16,
701,
501,
9078,
7,
16,
11,
220,
17,
11,
4329,
445,
7975,
2761,
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_rle_consume_flush_buffer() {
let data = vec![1, 1, 1, 2, 2, 3, 3, 3];
let mut encoder1 = RleEncoder::new(3, 256);
let mut encoder2 = RleEncoder::new(3, 256);
for value in data {
encoder1.put(value as u64).unwrap();
encoder2.put(value as u64... | rust_cleaned_test_functions.jsonl/72787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
273,
3382,
31323,
39213,
7776,
368,
341,
286,
1077,
821,
284,
7486,
20703,
16,
11,
220,
16,
11,
220,
16,
11,
220,
17,
11,
220,
17,
11,
220,
18,
11,
220,
18,
11,
220,
18,
935,
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_is_url() {
assert!(is_url("http://example.org/"));
assert!(is_url("https://example.org/"));
assert!(is_url("file:///tmp/filename"));
assert!(is_url(
"applewebdata://00000000-0000-1000-8080-808080808080"
));
assert!(!is_url("app:///index.bundle")); // react native
... | rust_cleaned_test_functions.jsonl/107909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
2903,
368,
341,
262,
2060,
10297,
285,
2903,
445,
1254,
1110,
8687,
2659,
14,
4010,
262,
2060,
10297,
285,
2903,
445,
2428,
1110,
8687,
2659,
14,
4010,
262,
2060,
10297,
285,
2903,
445,
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_spqlios_poly_mul() {
let n = 1024;
let mut plan = FFTPlan::new(n);
let mut rng = rand::thread_rng();
let mut a: Vec<u32> = vec![0u32; n];
let mut b: Vec<u32> = vec![0u32; n];
a.iter_mut().for_each(|e| *e = rng.gen::<u32>());
b.iter_mut()
... | rust_cleaned_test_functions.jsonl/109565 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
6905,
436,
36133,
24944,
368,
341,
286,
1077,
308,
284,
220,
16,
15,
17,
19,
280,
286,
1077,
5206,
3119,
284,
60036,
20485,
486,
931,
1445,
317,
286,
1077,
5206,
28422,
284,
10382,
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... | 3 |
#[test]
fn test_register_app() {
use crate::config;
use config::Config;
let _ = env_logger::try_init();
// Init apps from test-fixtures/webapps and verify in test-apps-dir.
let current = env::current_dir().unwrap();
let root_path = format!("{}/test-fixtures/webapps", current.display())... | rust_cleaned_test_functions.jsonl/114194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2065
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
8191,
368,
341,
262,
990,
17717,
486,
1676,
280,
262,
990,
2193,
486,
2648,
401,
262,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
1428,
262,
442,
15690,
10500,
504,
1273,
70913,
18513,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_crud() {
let db_name = format!("{}.sqlite3", random::string(8).as_str());
let temp_dir = tempdir().unwrap();
let db_folder = temp_dir.path().to_str().unwrap().to_string();
let db_path = format!("{}{}", db_folder, db_name);
embed_migrations!("./migrations"... | rust_cleaned_test_functions.jsonl/83080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32331,
661,
368,
341,
286,
1077,
2927,
1269,
284,
3561,
17223,
46391,
37042,
18,
497,
4194,
486,
917,
7,
23,
568,
300,
2895,
1423,
286,
1077,
2730,
4334,
284,
2730,
3741,
1005,
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... | 3 |
#[test]
fn test_template() {
let tera = &create_tera(TEMPLATES.to_vec(), None).unwrap();
let package_urn = Urn::from("Package");
let module_a_urn = Urn::from("Package/ModuleA");
let module_b_urn = Urn::from("Package/ModuleB");
let generator = PackageDocumentationTask {
... | rust_cleaned_test_functions.jsonl/40135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8693,
368,
341,
286,
1077,
1982,
64,
284,
609,
3182,
62,
50037,
7,
56408,
30304,
2389,
13251,
1507,
2240,
568,
15454,
543,
286,
1077,
6328,
62,
399,
284,
16809,
77,
486,
1499,
445,
13100,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tya() {
let mut r = Register::new();
r.set_Y(0xFF);
tya(&mut r);
assert_eq!(r.get_A(),0xFF)
} | rust_cleaned_test_functions.jsonl/14193 | {
"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,
528,
7755,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
435,
980,
10626,
7,
15,
9264,
317,
262,
259,
7755,
2099,
6984,
435,
317,
262,
2060,
10714,
10297,
81,
670,
1566,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_config_bad_owner() {
let from_pubkey = Pubkey::new_unique();
let config_pubkey = Pubkey::new_unique();
let new_config = MyConfig::new(84);
let signer0_pubkey = Pubkey::new_unique();
let signer0_account = AccountSharedData::new_ref(0, 0, &Pubkey::new_unique... | rust_cleaned_test_functions.jsonl/36703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
34199,
29027,
368,
341,
286,
1077,
504,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
2193,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
501,
5332,
284,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alloc_commons() {
the_same::<Vec<u32>>(vec![1, 2, 3, 4, 5]);
the_same(String::from("Hello world"));
the_same(Box::<u32>::new(5));
the_same(Box::<[u32]>::from(vec![1, 2, 3, 4, 5]));
the_same(Cow::<u32>::Owned(5));
the_same(Cow::<u32>::Borrowed(&5));
the_same(Rc::<u32>:... | rust_cleaned_test_functions.jsonl/70638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14802,
21107,
82,
368,
341,
262,
279,
33574,
27638,
10050,
34837,
18,
17,
25526,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
2558,
262,
279,
33574,
2242,
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_add_sub() {
let q = Secp256r1Scalar::q();
let start: Secp256r1Scalar = ECScalar::new_random();
let b: Secp256r1Scalar = ECScalar::new_random();
let tmp = BigInt::mod_add(&start.to_big_int(), &b.to_big_int(), &q);
let end = BigInt::mod_sub(&tmp, &b.to_big_i... | rust_cleaned_test_functions.jsonl/12361 | {
"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,
2891,
5228,
368,
341,
286,
1077,
2804,
284,
4520,
79,
17,
20,
21,
81,
16,
20639,
486,
80,
543,
286,
1077,
1191,
25,
4520,
79,
17,
20,
21,
81,
16,
20639,
284,
20633,
20639,
486,
931,
22644,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_server_stop_sending_encoder_stream() {
let (mut hconn, mut peer_conn) = connect();
peer_conn
.stream_stop_sending(SERVER_SIDE_ENCODER_STREAM_ID, Error::HttpNoError.code())
.unwrap();
let out = peer_conn.process(None, now());
hconn.process(o... | rust_cleaned_test_functions.jsonl/52199 | {
"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,
12015,
19039,
643,
2459,
39068,
12673,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
8,
284,
4564,
543,
286,
14397,
17241,
198,
310,
659,
4027,
19039,
643,
2459,
3759,
8417,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_header() {
let header = IppHeader::new(IppVersion::Ipp21, 0x1234, 0xaa55aa55);
let mut buf = Vec::new();
assert!(header.write(&mut Cursor::new(&mut buf)).is_ok());
assert_eq!(buf, vec![0x02, 0x01, 0x12, 0x34, 0xaa, 0x55, 0xaa, 0x55]);
} | rust_cleaned_test_functions.jsonl/127284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
8757,
368,
341,
286,
1077,
4247,
284,
358,
602,
4047,
486,
931,
8972,
602,
5637,
486,
40,
602,
17,
16,
11,
220,
15,
87,
16,
17,
18,
19,
11,
220,
15,
43300,
20,
20,
5305,
20,
20,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_excess_length() {
let v = vec![0, 0, 0, 0];
assert_eq!(Color::try_from(&v[..]), Err(IntoColorError::BadLen));
} | rust_cleaned_test_functions.jsonl/764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
2702,
1120,
5118,
368,
341,
286,
1077,
348,
284,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
935,
286,
2060,
10714,
10297,
1636,
486,
1539,
5673,
2099,
85,
95874,
9719,
1549... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_singular() {
let len = SINGULAR_INFLECTIONS.read().unwrap().len();
add_singular("aaaaa", "aaaaa");
assert_eq!(len + 1, SINGULAR_INFLECTIONS.read().unwrap().len());
} | rust_cleaned_test_functions.jsonl/42792 | {
"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,
2891,
93240,
368,
341,
286,
1077,
2422,
284,
328,
1718,
7081,
65487,
28017,
50,
4125,
1005,
15454,
1005,
2892,
543,
286,
912,
93240,
445,
28458,
64,
497,
330,
28458,
64,
797,
286,
2060,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_persist_context_remove_poll_interval() {
block_on(async {
let mut storage = MemStorage::new();
let last_update_time = i64_to_time(123456789);
storage.set_int(SERVER_DICTATED_POLL_INTERVAL, 987654).await.unwrap();
let context = Context {
... | rust_cleaned_test_functions.jsonl/69584 | {
"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,
4975,
8467,
18193,
40002,
20541,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
5206,
5819,
284,
13550,
5793,
486,
931,
543,
310,
1077,
1537,
8882,
3009,
284,
600,
21,
19,
2346,
3009,
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_delete_messages() {
let route = Route::DeleteMessages {
channel_id: CHANNEL_ID,
};
assert_eq!(
route.to_string(),
format!(
"channels/{channel_id}/messages/bulk-delete",
channel_id = CHANNEL_ID
... | rust_cleaned_test_functions.jsonl/119906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
23428,
368,
341,
286,
1077,
6021,
284,
9572,
486,
6435,
15820,
341,
310,
5496,
842,
25,
58756,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
310,
3561,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tif() {
let info = Infer::new();
assert_eq!(infer::Type {
mime: String::from("image/tiff"),
ext: String::from("tif"),
},
info.get(&fs::read("testdata/sample.tif").unwrap()).unwrap());
} | rust_cleaned_test_functions.jsonl/110132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
333,
368,
341,
262,
1077,
3546,
284,
62658,
486,
931,
1428,
262,
2060,
10714,
10297,
89559,
486,
929,
314,
715,
286,
45270,
25,
923,
486,
1499,
445,
1805,
5523,
3092,
3975,
715,
286,
1303,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ryu() {
check!(0.3);
check!(1234000000000.0);
check!(1.234e13);
check!(2.71828);
check!(1.1e32);
check!(1.1e-32);
check!(2.7182817);
check!(1e-45);
check!(3.4028235e38);
check!(-0.001234);
} | rust_cleaned_test_functions.jsonl/58231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
884,
84,
368,
341,
262,
1779,
10297,
15,
13,
18,
317,
262,
1779,
10297,
16,
17,
18,
19,
15,
15,
15,
15,
15,
15,
15,
15,
15,
13,
15,
317,
262,
1779,
10297,
16,
13,
17,
18,
19,
68,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_latm_get_value() {
let input: BitsCtx<'_> = (&[0x40, 0x40, 0x40], 0usize);
assert_matches!(parse_latm_get_value(input), Ok(((&[0x40], 2), 0x101)));
let input: BitsCtx<'_> = (&[0x3f, 0xc0], 0usize);
assert_matches!(parse_latm_get_value(input), Ok... | rust_cleaned_test_functions.jsonl/34683 | {
"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,
26174,
76,
3062,
3142,
368,
341,
1789,
286,
1077,
1946,
25,
49457,
23684,
18291,
98377,
284,
15899,
58,
15,
87,
19,
15,
11,
220,
15,
87,
19,
15,
11,
220,
15,
87,
19,
15,
1125,
220,
15,
518... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hibernated_region() {
let mut cluster = new_node_cluster(0, 3);
// Initialize the cluster.
configure_for_lease_read(&mut cluster, Some(100), Some(8));
cluster.cfg.raft_store.raft_store_max_leader_lease = ReadableDuration(Duration::from_millis(1));
cluster.pd_client.disab... | rust_cleaned_test_functions.jsonl/100487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1034
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
1523,
17660,
657,
20627,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
442,
9008,
279,
10652,
624,
262,
14411,
5478,
62,
1623,
6443,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_consuming_line() {
let empty = Rope::default();
assert_eq!(
(empty.slice(..), empty.slice(..)),
consuming_line(&empty.slice(..))
);
let newline = Rope::from("\n");
assert_eq!(
(empty.slice(..), empty.slice(..)),
... | rust_cleaned_test_functions.jsonl/129955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 596
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
61117,
6528,
368,
341,
286,
1077,
4287,
284,
97896,
486,
2258,
543,
286,
2060,
10714,
33673,
310,
320,
3194,
14530,
56422,
701,
4287,
14530,
56422,
6965,
310,
34108,
6528,
2099,
3194,
14530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_service() {
let mut service = SimpleService { a: 0 };
match service.process_request(service::Request::Add(13)) {
Some(service::Response::Add(13)) => {},
_ => panic!("invalid response for `Add()`"),
};
match service.process_request(service:... | rust_cleaned_test_functions.jsonl/28682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12267,
368,
341,
286,
1077,
5206,
2473,
284,
8993,
1860,
314,
264,
25,
220,
15,
2605,
286,
2432,
2473,
16988,
7893,
21656,
486,
1900,
486,
2212,
7,
16,
18,
593,
341,
310,
4329,
21656,
486,
258... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_write_dictionary() -> Result<()> {
// define a schema.
let field_type = DataType::Dictionary(Box::new(DataType::Int32), Box::new(DataType::Utf8));
let schema = Arc::new(Schema::new(vec![Field::new("d1", field_type, true)]));
let array = DictionaryPrimitive::<i32,... | rust_cleaned_test_functions.jsonl/39713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
42605,
368,
1464,
5714,
71698,
341,
286,
442,
6979,
264,
10802,
624,
286,
1077,
2070,
1819,
284,
33172,
486,
8517,
67758,
486,
931,
63941,
486,
1072,
18,
17,
701,
8261,
486,
931,
63941,
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_get_txn_commit_info() {
let path = TempDir::new("_test_storage_mvcc_reader_get_txn_commit_info").expect("");
let path = path.path().to_str().unwrap();
let region = make_region(1, vec![], vec![]);
let db = open_db(path, true);
let mut engine = RegionEngine:... | rust_cleaned_test_functions.jsonl/85951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
92299,
36346,
3109,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
1944,
23310,
73187,
638,
22306,
3062,
92299,
36346,
3109,
1827,
17119,
13056,
286,
1077,
1815,
284,
1815,
3875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fetch() {
let tmp_dir = tempfile::tempdir().unwrap();
let path = tmp_dir.path().join("test_fetch");
let name = path.to_str().unwrap();
let index = "index";
let field = "mostSignificantField";
let i = IndexSpec::new(index, vec![field]);
let ... | rust_cleaned_test_functions.jsonl/110736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
368,
341,
286,
1077,
4174,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
4174,
4334,
3875,
1005,
5987,
445,
1944,
11803,
797,
286,
1077,
829,
284,
1815,
2389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chain_iterator() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
let time_source = FastForwardTimeSource::new();
let subnet_id = subnet_test_id(1);
let committee = vec![node_test_id(0)];
let dkg_interv... | rust_cleaned_test_functions.jsonl/118229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
30583,
13491,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
1077,
882,
10347,
284,
17288,
25925,
1462,
3608,
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_record_schema_with_cyclic_references() {
let schema = Schema::parse_str(
r#"
{
"type": "record",
"name": "test",
"fields": [{
"name": "recordField",
"type": {
"... | rust_cleaned_test_functions.jsonl/69043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
25371,
6615,
666,
65304,
92702,
368,
341,
262,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
286,
435,
2,
698,
310,
341,
394,
330,
1313,
788,
330,
8548,
756,
394,
330,
606,
788,
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... | 4 |
#[test]
fn test_basic_atoms() {
let test_cases = vec![
("(atom 5)", atom_with_value(Number(5))),
("(atom? (atom 5))", Bool(true)),
("(atom? nil)", Bool(false)),
("(atom? 1)", Bool(false)),
("(def! a (atom 5)) (deref a)", Number(5)),
... | rust_cleaned_test_functions.jsonl/114214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
67755,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
3489,
7,
21855,
220,
20,
11583,
19124,
6615,
3142,
42999,
7,
20,
41749,
310,
3489,
7,
21855,
30,
320,
21855,
220,
20,
593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolution() {
let mut stream = LinearUpSamplingStream::new(15625, 44100, Resolution::RangePerTick);
println!("{}", stream.output_sampling_step);
// LinearUpSamplingStream lags by one sample.
assert!(stream.is_tick() == Tick::One);
stream.push(0_f32, 0_f... | rust_cleaned_test_functions.jsonl/121685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39849,
368,
341,
286,
1077,
5206,
4269,
284,
28263,
2324,
98622,
3027,
486,
931,
7,
16,
20,
21,
17,
20,
11,
220,
19,
19,
16,
15,
15,
11,
37116,
486,
6046,
3889,
22213,
317,
286,
13751,
79878... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_data_type() {
let input = to_chars("s32");
let ret = data_type().parse(&input).expect("must be parsed");
println!("{:#?}", ret);
assert_eq!(ret, DataType::S32);
} | rust_cleaned_test_functions.jsonl/57919 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
1819,
368,
341,
286,
1077,
1946,
284,
311,
37418,
445,
82,
18,
17,
797,
286,
1077,
2112,
284,
821,
1819,
1005,
6400,
2099,
1355,
568,
17119,
445,
24812,
387,
15676,
797,
286,
13751,
88928,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_request_more_than_allowed_data_length() {
let mut transaction_context = TransactionContext::new(Vec::new(), 1);
let invoke_context = InvokeContext::new_mock(&mut transaction_context, &[]);
let from_account = RefCell::new(AccountSharedData::new(100, 0, &system_program::id(... | rust_cleaned_test_functions.jsonl/106192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 851
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
36664,
51613,
42155,
1769,
5118,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
17869,
1972,
486,
931,
49923,
486,
931,
1507,
220,
16,
317,
286,
1077,
19873,
8467,
284,
39667,
1972,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intraday_dealts_401_failed() {
let it = crawler::IntradayBuilder::new().token("").build();
assert_err!(it.dealts("2884").call(), Err(FugleError::Unauthorized));
} | rust_cleaned_test_functions.jsonl/49449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
47026,
352,
2259,
278,
2576,
62,
19,
15,
16,
35060,
368,
341,
262,
1077,
432,
284,
73094,
486,
641,
47026,
352,
3297,
486,
931,
1005,
5839,
80821,
5834,
543,
262,
2060,
9266,
10297,
275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_transforms_with_kafka_meta() {
let mut test_value = json!({
"name": "A",
"modified": "2021-03-16T14:38:58Z",
});
let test_message = OwnedMessage::new(
Some(test_value.to_string().into_bytes()),
None,
"test".to_s... | rust_cleaned_test_functions.jsonl/124212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18449,
82,
6615,
4698,
21883,
13381,
368,
341,
286,
1077,
5206,
1273,
3142,
284,
2951,
0,
2262,
310,
330,
606,
788,
330,
32,
756,
310,
330,
27162,
788,
330,
17,
15,
17,
16,
12,
15,
18,
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... | 2 |
#[test]
fn test_overrides() {
let user_config = table_from_toml_str(r#"tab_size = 42"#).unwrap();
let rust_config = table_from_toml_str(r#"tab_size = 31"#).unwrap();
let lang_def = rust_lang_def(None);
let rust_id: LanguageId = "Rust".into();
let buf_id_1 = BufferId(1);... | rust_cleaned_test_functions.jsonl/105405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15431,
18245,
368,
341,
286,
1077,
1196,
5332,
284,
1965,
5673,
528,
316,
75,
2895,
2601,
55543,
6192,
2368,
284,
220,
19,
17,
57676,
568,
15454,
543,
286,
1077,
23071,
5332,
284,
1965,
5673,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_out_of_sync() {
let client = TestClient::new_with_config(Value::Null);
let error = client.request_json("setup",
json!({
"baseUrl": TestClient::get_network_address(),
"outOfSyncThreshold": -1
})).unwrap_err();
assert_eq!(error.code, 1013);
} | rust_cleaned_test_functions.jsonl/69936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6068,
3575,
23008,
368,
341,
262,
1077,
2943,
284,
3393,
2959,
486,
931,
6615,
5332,
25346,
486,
3280,
626,
262,
1077,
1465,
284,
2943,
8223,
9455,
445,
15188,
756,
286,
2951,
0,
2262,
310,
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_run_string_fsm() {
let mut lexer = Lexer::new("'this is a string' or 'this is another string'");
match lexer.next_token() {
Ok(tok) => assert_eq!(tok.content, "'this is a string'"),
Err(_msg) => assert!(false),
}
match lexer.next_token() {
... | rust_cleaned_test_functions.jsonl/30854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
3904,
97069,
368,
341,
286,
1077,
5206,
53259,
284,
85082,
486,
931,
45456,
574,
374,
264,
914,
6,
476,
364,
574,
374,
2441,
914,
28116,
286,
2432,
53259,
4529,
6458,
368,
341,
310,
7622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_agent_fails() {
init!("true");
let json_string = r#"{"agency_url":"https://enym-eagency.pdev.evernym.com","agency_did":"Ab8TvZa3Q19VNkQVzAWVL7","agency_verkey":"5LXaR43B1aQyeh94VBP8LG1Sgvjk7aNfqiksBCSjwqbf","wallet_name":"test_provision_agent","agent_seed":null,"enterpris... | rust_cleaned_test_functions.jsonl/19369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
25730,
761,
6209,
368,
341,
286,
2930,
17223,
1866,
3071,
286,
1077,
2951,
3904,
284,
435,
55543,
4913,
55565,
2903,
3252,
2428,
1110,
268,
1600,
5655,
55565,
556,
3583,
1734,
423,
48121,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw() {
let current_dir = std::env::current_dir().unwrap();
let path = RootLocation::from("path").path().unwrap();
assert_eq!(path, current_dir.join("path"));
} | rust_cleaned_test_functions.jsonl/92109 | {
"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,
16067,
368,
341,
310,
1077,
1482,
4334,
284,
1460,
486,
3160,
486,
3231,
4334,
1005,
15454,
543,
310,
1077,
1815,
284,
18854,
4707,
486,
1499,
445,
2343,
1827,
2343,
1005,
15454,
543,
310,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fn_signature_with_docs_impl() {
check(
r#"
struct addr;
impl addr {
/// Adds one to the number given.
///
/// # Examples
///
/// ```
/// let five = 5;
///
/// assert_eq!(6, my_crate::add_one(5));
/// ```
pub fn add_one(x: i32) -> i32 {
... | rust_cleaned_test_functions.jsonl/75016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
6615,
49692,
21007,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
1235,
10789,
280,
6383,
10789,
341,
262,
1048,
24475,
825,
311,
279,
1372,
2661,
624,
262,
17057,
262,
1048,
671,
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_activate_epoch() {
let stakes_cache = StakesCache::default();
let ((vote_pubkey, vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
stakes_cache.check_and_store(&vote_pubkey, &vote_account);
stakes_cache.check_and_store(... | rust_cleaned_test_functions.jsonl/22040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67894,
20682,
368,
341,
286,
1077,
44425,
11529,
284,
794,
2050,
8233,
486,
2258,
1428,
286,
1077,
1781,
29358,
34014,
792,
11,
6910,
13500,
701,
320,
267,
726,
34014,
792,
11,
18279,
13500,
593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_delete_range() {
test_raw_delete_range_impl(ApiVersion::V1);
test_raw_delete_range_impl(ApiVersion::V1ttl);
test_raw_delete_range_impl(ApiVersion::V2);
} | rust_cleaned_test_functions.jsonl/133279 | {
"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,
16067,
11353,
9698,
368,
341,
286,
1273,
16067,
11353,
9698,
21007,
65830,
5637,
486,
53,
16,
317,
286,
1273,
16067,
11353,
9698,
21007,
65830,
5637,
486,
53,
16,
62858,
317,
286,
1273,
16067,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_grounding_1() -> TestResult {
test_grounding(
"f(x) if x in y and x > 0 and y = [1, 2, 3] and x = 1;",
term!(call!("f", [sym!("x")])),
&[|r: Bindings| {
assert_eq!(r.get(&sym!("x")).unwrap(), &term!(1));
Ok(())
... | rust_cleaned_test_functions.jsonl/63049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72492,
287,
62,
16,
368,
1464,
3393,
2077,
341,
286,
1273,
72492,
287,
1006,
310,
330,
69,
2075,
8,
421,
856,
304,
379,
323,
856,
861,
220,
15,
323,
379,
284,
508,
16,
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... | 1 |
#[test]
fn test_get_variable_info_with_inherited_fields() {
let variable_info = get_variable_info(
&build_syntax_grammar(
vec![
SyntaxVariable {
name: "rule0".to_string(),
kind: VariableType::Named,
... | rust_cleaned_test_functions.jsonl/54398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
14635,
3109,
6615,
1243,
48394,
12132,
368,
341,
286,
1077,
3890,
3109,
284,
633,
14635,
3109,
1006,
310,
609,
5834,
78894,
62,
41094,
1006,
394,
7486,
90515,
503,
32117,
7827,
341,
664,
829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_reduce_reduce() {
let grm = YaccGrammar::new(YaccKind::Original(YaccOriginalActionKind::GenericParseTree), &"
%start A
%%
A : B 'x' | C 'x' 'x';
B : 'a';
C : 'a';
").unwrap();
let sg = pager_stategraph(... | rust_cleaned_test_functions.jsonl/38020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
64596,
64596,
368,
341,
286,
1077,
1081,
76,
284,
809,
4475,
97178,
486,
931,
20206,
4475,
10629,
486,
18395,
20206,
4475,
18395,
2512,
10629,
486,
19964,
14463,
6533,
701,
609,
698,
310,
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_json_file() {
let n = File {
base: BaseNode::default(),
package: Some(PackageClause {
base: BaseNode::default(),
name: Identifier {
base: Default::default(),
name: "foo".to_string(),
},
}),
im... | rust_cleaned_test_functions.jsonl/40416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 749
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
2458,
368,
341,
262,
1077,
308,
284,
2887,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
6328,
25,
4329,
5304,
1434,
28482,
341,
310,
2331,
25,
5351,
1955,
486,
2258,
3148,
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_css_pseudo_selector_parse() {
let ok_res = [
("first", CssPathPseudoSelector::First),
("last", CssPathPseudoSelector::Last),
("nth-child(4)", CssPathPseudoSelector::NthChild(4)),
("hover", CssPathPseudoSelector::Hover),
("active", CssPathPseudoSe... | rust_cleaned_test_functions.jsonl/22820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25924,
620,
21952,
28890,
21039,
368,
972,
262,
1077,
5394,
4918,
284,
23637,
286,
3489,
3896,
497,
79214,
1820,
47,
21952,
5877,
486,
5338,
9912,
286,
3489,
4259,
497,
79214,
1820,
47,
21952,
587... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mut_splitator() {
let mut xs = [0, 1, 0, 2, 3, 0, 0, 4, 5, 0];
assert_eq!(xs.split_mut(|x| *x == 0).count(), 6);
for slice in xs.split_mut(|x| *x == 0) {
slice.reverse();
}
assert!(xs == [0, 1, 0, 3, 2, 0, 0, 5, 4, 0]);
let mut xs = [0, 1, 0, 2, 3, 0, 0, 4, 5, 0,... | rust_cleaned_test_functions.jsonl/12919 | {
"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,
29523,
17052,
850,
368,
341,
262,
1077,
5206,
11943,
284,
508,
15,
11,
220,
16,
11,
220,
15,
11,
220,
17,
11,
220,
18,
11,
220,
15,
11,
220,
15,
11,
220,
19,
11,
220,
20,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_deserialization() {
type ClientMessage = super::ClientMessage<DefaultScalarValue>;
assert_eq!(
ClientMessage::ConnectionInit {
payload: [("foo".to_string(), InputValue::scalar("bar"))]
.iter()
.cloned()
... | rust_cleaned_test_functions.jsonl/27161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
50563,
368,
341,
286,
943,
8423,
2052,
284,
2256,
486,
2959,
2052,
27,
3675,
20639,
1130,
19421,
286,
2060,
10714,
33673,
310,
8423,
2052,
486,
4526,
3803,
341,
394,
7729,
25,
84019,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_wpa_psk() {
let bss = fake_wpa1_bss_description(b"foo_bss".to_vec());
let credential = fidl_sme::Credential::Psk(vec![0xAA; 32]);
get_legacy_wpa_association(&fake_device_info(CLIENT_ADDR), &credential, &bss)
.expect("expected successful RSNA with valid PSK... | rust_cleaned_test_functions.jsonl/23529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1670,
6595,
620,
4886,
368,
341,
286,
1077,
293,
778,
284,
12418,
1670,
6595,
16,
880,
778,
11448,
1883,
1,
7975,
880,
778,
3263,
983,
13251,
1423,
286,
1077,
40207,
284,
32104,
75,
643,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_misused_facet_collector() {
let mut facet_collector = FacetCollector::for_field(Field::from_field_id(0));
facet_collector.add_facet(Facet::from("/country"));
facet_collector.add_facet(Facet::from("/country/europe"));
} | rust_cleaned_test_functions.jsonl/10752 | {
"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,
717,
285,
2591,
41589,
295,
10211,
27669,
368,
341,
286,
1077,
5206,
44507,
10211,
27669,
284,
16945,
295,
53694,
486,
1958,
5013,
57788,
486,
1499,
5013,
842,
7,
15,
1106,
286,
44507,
10211,
2766... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let name = &[
0x09, 0x72, 0x75, 0x73, 0x74, 0x2d, 0x6c, 0x61, 0x6e, 0x67, 0x03, 0x6f, 0x72, 0x67,
0x00,
];
let repr = Repr {
transaction_id: 0x1234,
flags: Flags::RECURSION_DESIRED,
opcode: Opcode::Quer... | rust_cleaned_test_functions.jsonl/88887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 557
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
368,
341,
286,
1077,
829,
284,
609,
9640,
310,
220,
15,
87,
15,
24,
11,
220,
15,
87,
22,
17,
11,
220,
15,
87,
22,
20,
11,
220,
15,
87,
22,
18,
11,
220,
15,
87,
22,
19,
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_p2wsh() {
// stolen from Bitcoin transaction 5df912fda4becb1c29e928bec8d64d93e9ba8efa9b5b405bd683c86fd2c65667
let script = hex_script!("52210375e00eb72e29da82b89367947f29ef34afb75e8654f6ea368e0acdfd92976b7c2103a1b26313f430c4b15bb1fdce663207659d8cac749a0e53d70eff01874496feff2103c9... | rust_cleaned_test_functions.jsonl/63231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
17,
86,
927,
368,
341,
286,
442,
22329,
504,
13127,
7745,
220,
20,
2940,
24,
16,
17,
69,
3235,
19,
16692,
65,
16,
66,
17,
24,
68,
24,
17,
23,
16692,
23,
67,
21,
19,
67,
24,
18,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hsv_string_parsing() {
let red_hsv: HSVColor = "hsv(0, 120%, 50%)".parse().unwrap();
assert!(red_hsv.h.abs() <= 0.0001);
assert!((red_hsv.s - 1.0) <= 0.0001);
assert!((red_hsv.v - 0.5) <= 0.0001);
let lavender_hsv: HSVColor = "hsv(-445, 24%, 1000%)".parse(... | rust_cleaned_test_functions.jsonl/40397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
3492,
3904,
620,
28598,
368,
341,
286,
1077,
2518,
1523,
3492,
25,
80311,
1636,
284,
330,
71,
3492,
7,
15,
11,
220,
16,
17,
15,
13384,
220,
20,
15,
11334,
3263,
6400,
1005,
15454,
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_lex_keywords() -> Result<(), LexError> {
let mut lexer = Lexer::new("true false let in if then else match with fun rec");
let tokens = lexer.lex()?;
assert_eq!(
tokens,
&vec![
Token::True,
Token::False,
... | rust_cleaned_test_functions.jsonl/50972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74547,
51354,
368,
1464,
5714,
68843,
26819,
1454,
29,
341,
286,
1077,
5206,
53259,
284,
85082,
486,
931,
445,
1866,
895,
1077,
304,
421,
1221,
770,
2432,
448,
2464,
1395,
797,
286,
1077,
11211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_base64() {
let content = "halsdjflwefjklasdjflkasdjf";
let e = encrypt_config(content.as_bytes(), CipherType::ChaCha20Ietf, "test").unwrap();
let d = decrypt_config(e.as_bytes(), CipherType::ChaCha20Ietf, "test").unwrap();
assert_eq!(content, String::from_utf8(d).... | rust_cleaned_test_functions.jsonl/56168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7651,
21,
19,
368,
341,
286,
1077,
2213,
284,
330,
71,
1127,
77504,
1489,
86,
823,
73,
10561,
300,
77504,
1489,
62899,
77504,
69,
876,
286,
1077,
384,
284,
29625,
5332,
15063,
5357,
12524,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_chunk2() {
let index = vec![0_usize, 0, 5];
assert_eq!(find_chunk(&index, 0), 1);
assert_eq!(find_chunk(&index, 1), 1);
assert_eq!(find_chunk(&index, 2), 1);
assert_eq!(find_chunk(&index, 3), 1);
assert_eq!(find_chunk(&index, 4), 1);
assert_eq!(find_chunk(&index,... | rust_cleaned_test_functions.jsonl/64637 | {
"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,
21814,
30539,
17,
368,
341,
262,
1077,
1922,
284,
7486,
20703,
15,
11306,
551,
11,
220,
15,
11,
220,
20,
935,
262,
2060,
10714,
10297,
3903,
30539,
2099,
1252,
11,
220,
15,
701,
220,
16,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_channel_config_wrong_data_checksum() {
let mut data = vec![
0xa4, 0x9e, 0x79, 0x5a, // magic
1, 0, // version
55, 0, // data_len
0xcd, 0xa3, 0xdd, 0xeb, // data_checksum
0x2b, 0x94, 0xe6, 0xef, // header_checksum
];... | rust_cleaned_test_functions.jsonl/43609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
14571,
5332,
75198,
1769,
64038,
368,
341,
286,
1077,
5206,
821,
284,
7486,
90515,
310,
220,
15,
9591,
19,
11,
220,
15,
87,
24,
68,
11,
220,
15,
87,
22,
24,
11,
220,
15,
87,
20,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subsequence() {
let sequence =
"GGGUUUGCGGUGUAAGUGCAGCCCGUCUUACACCGUGCGGCACAGGCACUAGUACUGAUGUCGUAUACAGGGCUUUUGACAU";
let bpw = BasePairWeights {
AU: 2.0,
GC: 3.0,
GU: 1.0,
};
let encoded = EncodedSequence::with_basep... | rust_cleaned_test_functions.jsonl/7882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
15512,
368,
341,
286,
1077,
8500,
4035,
310,
330,
22254,
54695,
52,
2941,
8798,
38,
2941,
17782,
1890,
60902,
1890,
3706,
8798,
5459,
86564,
1706,
1706,
8798,
2941,
8798,
22863,
1706,
1890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_align_to_simple() {
let bytes = [1u8, 2, 3, 4, 5, 6, 7];
let (prefix, aligned, suffix) = unsafe { bytes.align_to::<u16>() };
assert_eq!(aligned.len(), 3);
assert!(prefix == [1] || suffix == [7]);
let expect1 = [1 << 8 | 2, 3 << 8 | 4, 5 << 8 | 6];
let expect2 = [1 | 2 << ... | rust_cleaned_test_functions.jsonl/8468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37015,
2346,
30015,
368,
341,
262,
1077,
5820,
284,
508,
16,
84,
23,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
935,
262,
1077,
320,
11849,
11,
26118,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_rtp_extensions_from_media_description() -> Result<()> {
let extensions = rtp_extensions_from_media_description(&MediaDescription {
media_name: MediaName {
media: "audio".to_owned(),
formats: vec!["111".to_owned()],
..Default::default()
},
... | rust_cleaned_test_functions.jsonl/12076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
790,
60498,
5673,
29173,
11448,
368,
1464,
5714,
71698,
341,
262,
1077,
19721,
284,
435,
790,
60498,
5673,
29173,
11448,
2099,
12661,
5009,
341,
286,
3687,
1269,
25,
7816,
675,
341,
310,
368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_release_date() {
assert_eq!(parse_release_date("2018/02/07").unwrap(), "2018-02-07");
assert!(parse_release_date("").is_err());
assert!(parse_release_date("2018").is_err());
} | rust_cleaned_test_functions.jsonl/134382 | {
"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,
21039,
24577,
4164,
368,
341,
286,
2060,
10714,
10297,
6400,
24577,
4164,
445,
17,
15,
16,
23,
14,
15,
17,
14,
15,
22,
1827,
15454,
1507,
330,
17,
15,
16,
23,
12,
15,
17,
12,
15,
22,
3071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_triplet_optional_map_column() {
let path = vec!["a", "key_value", "value", "key_value", "key"];
let values = vec![
Field::Int(1),
Field::Int(2),
Field::Int(1),
Field::Int(1),
Field::Int(3),
Field::Int(4),
... | rust_cleaned_test_functions.jsonl/43018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63883,
1149,
74644,
5376,
8744,
368,
341,
286,
1077,
1815,
284,
7486,
0,
1183,
64,
497,
330,
792,
3142,
497,
330,
957,
497,
330,
792,
3142,
497,
330,
792,
6332,
286,
1077,
2750,
284,
7486,
905... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lex_simple() {
let tokens = Lexer::new().lex("1+2").unwrap();
assert_eq!(tokens,
vec![Token::Integer(1), Token::Plus, Token::Integer(2)]);
} | rust_cleaned_test_functions.jsonl/33555 | {
"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,
74547,
30015,
368,
341,
286,
1077,
11211,
284,
85082,
486,
931,
1005,
2571,
445,
16,
10,
17,
1827,
15454,
543,
286,
2060,
10714,
10297,
30566,
345,
4293,
7486,
20703,
3323,
486,
3486,
7,
16,
701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_mandali() {
run_test(
&TEST_DATA,
"harfbuzz/good-mandali.te",
"telugu/Mandali-Regular.ttf",
&[JOINER_GLYPH_INDEX],
8,
);
} | rust_cleaned_test_functions.jsonl/91176 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
437,
7956,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
1448,
437,
7956,
31853,
756,
503,
330,
22924,
29785,
10270,
437,
7956,
87591,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_multi_signatures() {
let kp = Keypair::new();
let tx =
Transaction::new_signed_with_payer(&[], Some(&kp.pubkey()), &[&kp], Hash::default());
let entries = vec![Entry::new(&Hash::default(), 1, vec![tx.clone()])];
let signatures = CompletedDataSetsServic... | rust_cleaned_test_functions.jsonl/29108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
11172,
2789,
368,
341,
286,
1077,
60319,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
9854,
4035,
310,
17869,
486,
931,
55617,
6615,
620,
1135,
2099,
12995,
4329,
2099,
48495,
47773,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.