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_simple_succinct_sonic() {
use crate::pairing::ff::{Field, PrimeField};
use crate::pairing::{Engine, CurveAffine, CurveProjective};
use crate::pairing::bls12_381::{Bls12, Fr};
use std::time::{Instant};
use crate::sonic::srs::SRS;
use crate::sonic::cs::{Circuit, ConstraintS... | rust_cleaned_test_functions.jsonl/751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2815
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
70758,
7800,
643,
14011,
368,
341,
262,
990,
17717,
486,
12670,
287,
486,
542,
22964,
1877,
11,
12518,
1877,
2440,
262,
990,
17717,
486,
12670,
287,
22964,
4571,
11,
53677,
25841,
482,
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... | 3 |
#[test]
fn test_wire_size_basic_types() {
assert_eq!((42 as u8).wire_size(), 1);
assert_eq!((42 as u32).wire_size(), 4);
assert_eq!((42 as i32).wire_size(), 4);
assert_eq!((42 as u64).wire_size(), 8);
assert_eq!((42 as i64).wire_size(), 8);
... | rust_cleaned_test_functions.jsonl/38920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75206,
2368,
34729,
9763,
368,
341,
310,
2060,
10714,
0,
1188,
19,
17,
438,
575,
23,
568,
35531,
2368,
1507,
220,
16,
317,
310,
2060,
10714,
0,
1188,
19,
17,
438,
575,
18,
17,
568,
35531,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ns_new_with_defaults() {
let ns = MmdsNetworkStack::new_with_defaults(None);
assert_eq!(ns.mac_addr, MacAddr::parse_str(DEFAULT_MAC_ADDR).unwrap());
assert_eq!(ns.ipv4_addr, Ipv4Addr::from(DEFAULT_IPV4_ADDR));
let ns = MmdsNetworkStack::new_with_defaults(Some(Ipv... | rust_cleaned_test_functions.jsonl/47949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34728,
5921,
6615,
42290,
368,
341,
286,
1077,
12268,
284,
386,
2277,
82,
12320,
4336,
486,
931,
6615,
42290,
26717,
317,
286,
2060,
10714,
10297,
4412,
61825,
7387,
11,
7401,
13986,
486,
6400,
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_hint_from_value_and_back() {
for value in 0..243 {
let hint = Hints::from(value);
println!("{} = {}", hint, value);
assert_eq!(value, Hints::from(value).value());
}
} | rust_cleaned_test_functions.jsonl/57277 | {
"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,
45825,
5673,
3142,
8378,
3895,
368,
341,
262,
369,
897,
304,
220,
15,
496,
17,
19,
18,
341,
286,
1077,
13012,
284,
472,
21042,
486,
1499,
3679,
317,
286,
13751,
17223,
6257,
284,
24689,
13012,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_runnables_doc_test() {
let (analysis, pos) = analysis_and_position(
r#"
//- /lib.rs
<|> //empty
fn main() {}
/// ```
/// let x = 5;
/// ```
fn foo() {}
"#,
);
let runnables = analysis.runnables(p... | rust_cleaned_test_functions.jsonl/115128 | {
"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,
14007,
77,
4788,
18869,
4452,
368,
341,
286,
1077,
320,
34484,
11,
1133,
8,
284,
6358,
8378,
9661,
1006,
310,
435,
2,
698,
286,
78406,
608,
2740,
25638,
198,
286,
82639,
29,
442,
3194,
198,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chunks_sign() {
use randombytes::randombytes;
let (pk, sk) = gen_keypair();
let mut creation_state = State::init();
let mut validator_state = State::init();
for i in 0..64usize {
let chunk = randombytes(i);
creation_state.update(&ch... | rust_cleaned_test_functions.jsonl/11407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65470,
11172,
368,
341,
286,
990,
4194,
9651,
486,
11463,
9651,
280,
286,
1077,
320,
20819,
11,
1901,
8,
284,
4081,
3097,
12670,
543,
286,
1077,
5206,
9688,
4387,
284,
3234,
486,
2327,
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_include_bytes_expand() {
check(
r#"
#[rustc_builtin_macro]
macro_rules! include_bytes {
($file:expr) => {{ /* compiler built-in */ }};
($file:expr,) => {{ /* compiler built-in */ }};
}
fn main() { include_bytes("foo"); }
"#,
expect![[r##"
#[rustc_builtin_macro]
macro... | rust_cleaned_test_functions.jsonl/59820 | {
"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,
37878,
12524,
67875,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
13353,
35788,
66,
73829,
58810,
921,
32606,
21407,
0,
2924,
12524,
341,
262,
1711,
1192,
96011,
8,
589,
5867,
1391,
19415,
5798,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_vertex_prop_has_key() {
let mut has_key_compare = message::LogicalCompare::new();
has_key_compare.set_prop_id(PROP_KEY);
has_key_compare.set_compare(message::CompareType::EQ);
let mut value_k = Value::new();
value_k.set_str_value("age".to_owned());
... | rust_cleaned_test_functions.jsonl/43856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 790
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
26611,
21663,
21778,
3097,
368,
341,
286,
1077,
5206,
702,
3097,
32235,
284,
1943,
486,
64312,
27374,
486,
931,
543,
286,
702,
3097,
32235,
980,
21663,
842,
5304,
19272,
6600,
317,
286,
702,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contains() {
let mut mask = SigSet::empty();
mask.add(SIGUSR1);
assert!(mask.contains(SIGUSR1));
assert!(!mask.contains(SIGUSR2));
let all = SigSet::all();
assert!(all.contains(SIGUSR1));
assert!(all.contains(SIGUSR2));
} | rust_cleaned_test_functions.jsonl/8923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
368,
341,
286,
1077,
5206,
6911,
284,
41560,
1649,
486,
3194,
543,
286,
6911,
1364,
52516,
49558,
16,
626,
286,
2060,
10297,
11258,
8786,
52516,
49558,
16,
1106,
286,
2060,
0,
3471,
11258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3mask_eq() {
let a = Vec3Mask::new(true, false, true);
let b = Vec3Mask::new(true, false, true);
let c = Vec3Mask::new(false, true, true);
assert_eq!(a, b);
assert_eq!(b, a);
assert_ne!(a, c);
assert_ne!(b, c);
assert!(a > c);
assert!(c < a);
} | rust_cleaned_test_functions.jsonl/75052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
11258,
10714,
368,
341,
262,
1077,
264,
284,
11312,
18,
12686,
486,
931,
3715,
11,
895,
11,
830,
317,
262,
1077,
293,
284,
11312,
18,
12686,
486,
931,
3715,
11,
895,
11,
830,
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_fasttext() {
let f = File::open("testdata/fasttext.bin").unwrap();
let mut reader = BufReader::new(f);
let embeddings = Embeddings::read_fasttext(&mut reader).unwrap();
let results = embeddings.word_similarity("über", 3).unwrap();
assert_eq!(results[0... | rust_cleaned_test_functions.jsonl/28569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
35743,
1318,
368,
341,
286,
1077,
282,
284,
2887,
486,
2508,
445,
92425,
92351,
1318,
29394,
1827,
15454,
543,
286,
1077,
5206,
6604,
284,
69013,
5062,
486,
931,
955,
317,
286,
1077,
70547,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_date() -> Result<()> {
let mut ctx = EvalContext::from(TimeEnv {
no_zero_date: true,
..TimeEnv::default()
});
let _ = Time::parse_datetime(&mut ctx, "0000-00-00 00:00:00", 0, false)?;
assert!(ctx.warnings.warning_cnt > 0)... | rust_cleaned_test_functions.jsonl/40462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
19359,
4164,
368,
1464,
5714,
71698,
341,
1789,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
1499,
36968,
14359,
341,
310,
902,
19359,
4164,
25,
830,
345,
310,
5241,
1462,
14359,
486,
2258,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_search_file_abs_path() {
let sf = SearchFile::new(
"/Users/cary/src/xsearch/rust/rssearch/src".to_string(),
"searcher.rs".to_string(),
FileType::Code,
);
assert_eq!(
sf.filepath(),
"/Users/cary/src/xsearch/rust/r... | rust_cleaned_test_functions.jsonl/113975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
2458,
31170,
2638,
368,
341,
286,
1077,
13124,
284,
7542,
1703,
486,
931,
1006,
310,
3521,
7137,
2899,
658,
13437,
10776,
1836,
7382,
590,
91885,
1836,
13437,
3263,
983,
3904,
3148,
310,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_autowired_batch() {
let mut worker = Builder::new("test-worker-batch").batch_size(10).create();
let (tx, rx) = mpsc::channel();
worker.start(StepRunner { ch: tx }).unwrap();
for _ in 0..20 {
worker.schedule(50).unwrap();
}
worker.stop()... | rust_cleaned_test_functions.jsonl/84781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32808,
363,
2690,
14534,
368,
341,
286,
1077,
5206,
11864,
284,
20626,
486,
931,
445,
1944,
65516,
1455,
754,
1827,
14049,
2368,
7,
16,
15,
568,
3182,
543,
286,
1077,
320,
3998,
11,
19111,
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... | 3 |
#[test]
fn test_indexed_path() {
let text = "{ foo.0.bar }";
let instructions = compile(text).unwrap();
assert_eq!(1, instructions.len());
assert_eq!(
&Value(vec![
PathStep::Name("foo"),
PathStep::Index("0", 0),
... | rust_cleaned_test_functions.jsonl/18171 | {
"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,
3560,
291,
2638,
368,
972,
286,
1077,
1467,
284,
13868,
15229,
13,
15,
22001,
335,
3534,
286,
1077,
11221,
284,
19192,
7235,
568,
15454,
1647,
286,
2060,
10714,
10297,
16,
11,
11221,
19406,
6201,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unchanged_ranges_insert_in_middle() {
assert_eq!(
unchanged_ranges(
b"a b b c",
b"a b X b c",
&[0..1, 2..3, 4..5, 6..7],
&[0..1, 2..3, 4..5, 6..7, 8..9],
),
vec![(0..1, 0..1), (2..3, 2..3)... | rust_cleaned_test_functions.jsonl/89249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3185,
3726,
58748,
17678,
1243,
62580,
368,
341,
286,
2060,
10714,
33673,
310,
34857,
58748,
1006,
394,
293,
56693,
293,
293,
272,
756,
394,
293,
56693,
293,
1599,
293,
272,
756,
394,
44590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_response_for_ticker() {
let mock_transport = MockRequest::new(
"{\"status\":\"success\",\"data\":[{\"high\":\"6888\",\"volume\":\"13.03\",\"low\":\"6303\",\"ask\":\"6887\",\"timestamp\":\"2017-08-2915:44:17.267526\",\"bid\":\"6416\",\"last_price\":\"6610\",\"market\":\"ETHARS... | rust_cleaned_test_functions.jsonl/75229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 673
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9655,
5478,
528,
5215,
368,
341,
286,
1077,
7860,
46398,
284,
14563,
1900,
486,
931,
1006,
310,
54734,
2829,
23488,
5630,
34333,
691,
59,
8899,
64238,
11892,
23488,
21,
23,
23,
23,
34333,
25060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decompression() {
use std::vec::Vec;
for sz in [600_usize, 1024, 6000, 65000, 650000].iter() {
let mut orig: Vec<u8> = Vec::with_capacity(*sz);
unsafe {
orig.set_len(*sz);
{
//it's sort of rand... | rust_cleaned_test_functions.jsonl/34956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
83192,
368,
341,
286,
990,
1460,
486,
4083,
486,
10050,
280,
23459,
286,
369,
10038,
304,
508,
21,
15,
15,
11306,
551,
11,
220,
16,
15,
17,
19,
11,
220,
21,
15,
15,
15,
11,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_consistency_check() {
let path = Builder::new().prefix("tikv-store-test").tempdir().unwrap();
let db = new_engine(
path.path().to_str().unwrap(),
None,
&[CF_DEFAULT, CF_RAFT],
None,
)
.unwrap();
let mut regi... | rust_cleaned_test_functions.jsonl/18719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
47094,
7200,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
1005,
11849,
445,
83,
1579,
85,
33252,
16839,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
2927,
284,
501,
24823,
1006,
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... | 3 |
#[test]
fn test_uint_from_sub_no_panic() {
assert_eq!(
Uint256::from(1u32).sub(Uint256::from(1u8)),
Uint256::from(0u32)
);
} | rust_cleaned_test_functions.jsonl/118515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
5673,
5228,
6536,
620,
31270,
368,
341,
262,
2060,
10714,
33673,
286,
27883,
17,
20,
21,
486,
1499,
7,
16,
84,
18,
17,
568,
1966,
12317,
396,
17,
20,
21,
486,
1499,
7,
16,
84,
23,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_problem() {
{
let mut problem = Problem::new(5, 3);
problem.set_clue(ClueLoc::Top, 1, Clue(1));
let field = Field::from_problem(&problem);
assert_eq!(field.cand[P(0, 1)], Cand(2));
assert_eq!(field.cand[P(4, 1)], Cand(5));
... | rust_cleaned_test_functions.jsonl/72396 | {
"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,
60139,
368,
341,
286,
341,
310,
1077,
5206,
3491,
284,
22079,
486,
931,
7,
20,
11,
220,
18,
317,
310,
3491,
980,
6794,
361,
43644,
361,
9152,
486,
5366,
11,
220,
16,
11,
2435,
361,
7,
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_reaction_without_member() {
let expected = Reaction {
channel_id: ChannelId(2),
emoji: ReactionType::Unicode {
name: "🙂".to_owned(),
},
guild_id: None,
member: None,
message_id: MessageId(3),
... | rust_cleaned_test_functions.jsonl/10392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 873
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96631,
39904,
19388,
368,
341,
286,
1077,
3601,
284,
66841,
341,
310,
5496,
842,
25,
13434,
764,
7,
17,
1326,
310,
42365,
25,
66841,
929,
486,
33920,
341,
394,
829,
25,
330,
145080,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cp_parents() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.arg("--parents")
.arg(TEST_COPY_FROM_FOLDER_FILE)
.arg(TEST_COPY_TO_FOLDER)
.succeeds();
assert_eq!(
at.read(&format!(
"{}/{}",
TEST_COPY_TO_FOLDER, TEST_COPY_FROM_FOLDE... | rust_cleaned_test_functions.jsonl/21267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39811,
81719,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
575,
8710,
21186,
21549,
25456,
1138,
286,
659,
858,
50320,
35556,
27108,
33637,
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_stream_instant() {
let a = StreamInstant::new(2, 0);
let b = StreamInstant::new(-2, 0);
let min = StreamInstant::new(std::i64::MIN, 0);
let max = StreamInstant::new(std::i64::MAX, 0);
assert_eq!(
a.sub(Duration::from_secs(1)),
Some(StreamInstant::new(1, 0))
... | rust_cleaned_test_functions.jsonl/32481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
1243,
4706,
368,
341,
262,
1077,
264,
284,
9203,
30340,
486,
931,
7,
17,
11,
220,
15,
317,
262,
1077,
293,
284,
9203,
30340,
486,
931,
4080,
17,
11,
220,
15,
317,
262,
1077,
1308,
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_assert_setup() {
// Defaults
{
let tmpdir = assert_setup!();
assert_dir!(&tmpdir);
assert_eq!(&tmpdir, &PathBuf::from(TEST_TEMP_DIR).mash("test_assert_setup"));
assert_remove_all!(&tmpdir);
}
// Alternate func name
... | rust_cleaned_test_functions.jsonl/92820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
21363,
368,
341,
286,
442,
35990,
198,
286,
341,
310,
1077,
4174,
3741,
284,
2060,
21363,
0,
543,
310,
2060,
4334,
0,
2099,
5173,
3741,
317,
310,
2060,
10714,
0,
2099,
5173,
3741,
11,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_start_not_a_number() {
let model =
"a";
match DFAReader::new_from_string(model) {
Err(DFAReaderError::Parse(_,line)) => assert!(line == 1),
_ => assert!(false, "Parse expected."),
}
} | rust_cleaned_test_functions.jsonl/47826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
7913,
4306,
5500,
368,
341,
286,
1077,
1614,
4035,
310,
330,
64,
876,
286,
2432,
93631,
5062,
486,
931,
5673,
3904,
7635,
8,
341,
310,
15495,
5432,
3627,
5062,
1454,
486,
14463,
41117,
105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_realm_get_from() -> Result<()> {
let mut m = Message::new();
let v = "realm".to_owned();
m.add(ATTR_REALM, v.as_bytes());
m.write_header();
let mut m2 = Message {
raw: Vec::with_capacity(256),
..Default::default()
};
let result = TextAttribute::get_f... | rust_cleaned_test_functions.jsonl/57158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
7673,
3062,
5673,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
296,
284,
4856,
486,
931,
543,
262,
1077,
348,
284,
330,
69897,
3263,
983,
51973,
543,
262,
296,
1364,
7,
27880,
30111,
44,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_case_part_2_easy() {
let input = "acedgfb cdfbe gcdfa fbcad dab cefabd cdfgeb eafb cagedb ab | cdfeb fcadb cdfeb cdbaf\n";
assert_eq!(5353, part2(input).unwrap())
} | rust_cleaned_test_functions.jsonl/119557 | {
"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,
19096,
10495,
62,
17,
59091,
368,
341,
286,
1077,
1946,
284,
330,
4435,
70,
10798,
272,
2940,
1371,
22122,
97549,
282,
8904,
329,
82768,
272,
823,
85920,
272,
2940,
42153,
384,
96834,
272,
3279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aggregate() {
let ip_nets = make_ipnet_vec![
"10.0.0.0/24", "10.0.1.0/24", "10.0.1.1/24", "10.0.1.2/24",
"10.0.2.0/24",
"10.1.0.0/24", "10.1.1.0/24",
"192.168.0.0/24", "192.168.1.0/24", "192.168.2.0/24", "192.168.3.0/24",
"fd00:... | rust_cleaned_test_functions.jsonl/6885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 793
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
14240,
368,
341,
286,
1077,
5997,
1089,
1415,
284,
1281,
10385,
4711,
13251,
90515,
310,
330,
16,
15,
13,
15,
13,
15,
13,
15,
14,
17,
19,
497,
330,
16,
15,
13,
15,
13,
16,
13,
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... | 5 |
#[test]
fn test_ipv6_duplicate_solicited_node_address() {
// Test that we still receive packets destined to a solicited-node multicast address of an
// the same solicited-node multicast address.
let config = Ipv6::DUMMY_CONFIG;
let mut ctx = DummyEvent... | rust_cleaned_test_functions.jsonl/114203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
70434,
643,
91104,
5084,
6744,
368,
341,
1789,
286,
442,
3393,
429,
582,
2058,
5258,
27035,
50587,
311,
264,
29744,
1608,
39054,
79534,
2621,
315,
458,
8945,
286,
442,
279,
1852,
29744,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_account_transaction() {
let (mock_db, client, mut runtime) = create_database_client_and_runtime();
for (acc, blob) in mock_db.all_accounts.iter() {
let ar = AccountResource::try_from(blob).unwrap();
for seq in 1..ar.sequence_number() {
let mut batch = Jso... | rust_cleaned_test_functions.jsonl/4632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13500,
28884,
368,
341,
262,
1077,
320,
16712,
8685,
11,
2943,
11,
5206,
15592,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
369,
320,
4475,
11,
23404,
8,
304,
7860,
8685,
7670,
5566... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_args_multiplexed_connection() {
let ctx = TestContext::new();
block_on_all_using_async_std(async move {
ctx.multiplexed_async_connection_async_std()
.and_then(|con| {
let cmds = (0..100).map(move |i| test_cmd(&con, i));
future::try_join... | rust_cleaned_test_functions.jsonl/105563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
91802,
2571,
291,
15866,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
2504,
4470,
5705,
75180,
28346,
15656,
18285,
3271,
341,
286,
5635,
744,
9845,
2571,
291,
28346,
1586... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_push_error_panic_uninitialized() {
let state = MockBufferSharedState::uninitialized();
let error = "foo".to_string().into();
state.push_error(error, 0);
} | rust_cleaned_test_functions.jsonl/53066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
14218,
4096,
620,
31270,
4907,
36161,
368,
341,
286,
1077,
1584,
284,
14563,
4095,
16997,
1397,
486,
359,
36161,
543,
286,
1077,
1465,
284,
330,
7975,
3263,
983,
3904,
1005,
18122,
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 |
#[test]
fn test_product() {
let ua_parser = UserAgentParser::from_path("uap-core/regexes.yaml").unwrap();
let yaml = fs::read_to_string("uap-core/tests/test_ua.yaml").unwrap();
let yamls = YamlLoader::load_from_str(&yaml).unwrap();
let yaml = &yamls[0];
let test_cases = yaml
.as_h... | rust_cleaned_test_functions.jsonl/111010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 661
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9840,
368,
341,
262,
1077,
45559,
18517,
284,
2657,
16810,
6570,
486,
1499,
2638,
445,
84,
391,
23460,
14,
26387,
288,
33406,
1827,
15454,
1428,
262,
1077,
32246,
284,
8619,
486,
878,
2346,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_exchange_code_successful_with_pkce_and_extension() {
let client = new_client()
.set_auth_type(AuthType::BasicAuth)
.set_redirect_uri(RedirectUrl::new("https://redirect/here".to_string()).unwrap());
let token = client
.exchange_code(AuthorizationCode::new("ccc".to... | rust_cleaned_test_functions.jsonl/18601 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
4136,
92951,
6615,
33321,
346,
8378,
31035,
368,
341,
262,
1077,
2943,
284,
501,
8179,
741,
286,
659,
746,
14014,
1819,
37640,
929,
486,
15944,
5087,
340,
286,
659,
746,
30043,
15572,
2785,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collections() {
// List
let value = json!([1, 2, "3"]);
let result = deserializer_v1(&value).expect("Failed to deserialize a List");
assert_eq!(
result,
GValue::List(
vec![
GValue::Int64(1),
... | rust_cleaned_test_functions.jsonl/115553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89742,
368,
341,
286,
442,
1759,
198,
286,
1077,
897,
284,
2951,
0,
2561,
16,
11,
220,
17,
11,
330,
18,
55919,
286,
1077,
1102,
284,
939,
41939,
2273,
16,
2099,
957,
568,
17119,
445,
9408,
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_big5_decode() {
// Empty
decode_big5(b"", &"");
// ASCII
decode_big5(&[0x61u8, 0x62u8], &"\u{0061}\u{0062}");
// Edge cases
decode_big5(&[0x87u8, 0x40u8], &"\u{43F0}");
decode_big5(&[0xFEu8, 0xFEu8], &"\u{79D4}");
decode_big5(&[0x... | rust_cleaned_test_functions.jsonl/20629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1953
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36386,
20,
15227,
368,
341,
286,
442,
22228,
198,
286,
16895,
36386,
20,
1883,
56323,
609,
3014,
626,
286,
442,
39316,
198,
286,
16895,
36386,
20,
2099,
58,
15,
87,
21,
16,
84,
23,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bench_tps_bank_client() {
let (genesis_config, id) = create_genesis_config(10_000);
let bank = Bank::new_for_tests(&genesis_config);
let client = Arc::new(BankClient::new(bank));
let config = Config {
id,
tx_count: 10,
duration... | rust_cleaned_test_functions.jsonl/10465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
528,
1690,
35733,
8179,
368,
341,
286,
1077,
320,
77894,
5332,
11,
877,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aabb_intersects_ray() {
let a = AABB::new(vec3(-1.0, -1.0, -1.0), Vec3::ONE);
assert_eq!(
a.intersects_ray(vec3(10.0, 10.0, 10.0), vec3(0.0, 1.0, 0.0)),
-1.0
);
assert_eq!(
a.intersects_ray(vec3(10.0, 0.0, 0.0), vec3(-1.0, 0.0... | rust_cleaned_test_functions.jsonl/95799 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
12523,
15318,
54429,
72690,
368,
341,
286,
1077,
264,
284,
88580,
486,
931,
25592,
18,
4080,
16,
13,
15,
11,
481,
16,
13,
15,
11,
481,
16,
13,
15,
701,
11312,
18,
486,
5225,
626,
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_into() {
let raw_pk: [u8; PUBLIC_KEY_LENGTH] = [
0xaf, 0xf3, 0x94, 0xc5, 0xb7, 0x5c, 0xfb, 0xd, 0xd9, 0x28, 0xe5, 0x8a, 0x92, 0xdd,
0x76, 0x55, 0x2b, 0x2e, 0x8d, 0x19, 0x6f, 0xe9, 0x12, 0x14, 0x50, 0x80, 0x6b, 0xd0,
0xd9, 0x3f, 0xd0, 0xcb,
];
... | rust_cleaned_test_functions.jsonl/22293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 622
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
368,
341,
286,
1077,
7112,
33321,
25,
508,
84,
23,
26,
31416,
6600,
15023,
60,
284,
2278,
310,
220,
15,
54795,
11,
220,
15,
5848,
18,
11,
220,
15,
87,
24,
19,
11,
220,
15,
8148,
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_raft_log_sort() {
let tbls = vec![
(1, 1, 1, 2, Ordering::Less),
(2, 1, 1, 2, Ordering::Greater),
(1, 1, 1, 1, Ordering::Equal),
];
for (lid, l_log_id, rid, r_log_id, order) in tbls {
let lhs = raft_log_key(lid, l_log_id);
... | rust_cleaned_test_functions.jsonl/44169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2944,
5224,
18435,
368,
341,
286,
1077,
21173,
82,
284,
7486,
90515,
310,
320,
16,
11,
220,
16,
11,
220,
16,
11,
220,
17,
11,
68621,
486,
27451,
1326,
310,
320,
17,
11,
220,
16,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_projective_group() {
let a = rand::random();
let b = rand::random();
for _i in 0..100 {
group_test::<EdwardsProjective>(a, b);
}
} | rust_cleaned_test_functions.jsonl/128403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16352,
533,
6288,
368,
341,
262,
1077,
264,
284,
10382,
486,
11463,
543,
262,
1077,
293,
284,
10382,
486,
11463,
543,
262,
369,
716,
72,
304,
220,
15,
496,
16,
15,
15,
341,
286,
1874,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_add_bytes_to_bits_tuple_ok3() {
assert!(add_bytes_to_bits_tuple::<u64>((5, 0), 0x4000000000000001) == (7, 8));
} | rust_cleaned_test_functions.jsonl/51860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
12524,
2346,
20034,
21773,
19817,
18,
368,
341,
286,
2060,
10297,
718,
12524,
2346,
20034,
21773,
27638,
84,
21,
19,
47453,
20,
11,
220,
15,
701,
220,
15,
87,
19,
15,
15,
15,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bls381() {
let (n, t) = (5, 3);
// create the private key polynomial
let private_poly = Poly::<<SigScheme as Scheme>::Private>::new(t - 1);
// Evaluate it at `n` points to generate the shares
let shares = (0..n)
.map(|i| {
let ... | rust_cleaned_test_functions.jsonl/110893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
4730,
18,
23,
16,
368,
341,
286,
1077,
320,
77,
11,
259,
8,
284,
320,
20,
11,
220,
18,
317,
286,
442,
1855,
279,
869,
1376,
47311,
198,
286,
1077,
869,
36133,
284,
18767,
486,
2442,
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_root_mean_squared_error_grayscale() {
let left = gray_image!(
1, 2, 3;
4, 5, 6);
let right = gray_image!(
8, 4, 7;
6, 9, 1);
let rms = root_mean_squared_error(&left, &right);
let expected = (114f64 / 6f64).sqrt();
... | rust_cleaned_test_functions.jsonl/38568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
16933,
54641,
4096,
15682,
50348,
368,
341,
286,
1077,
2115,
284,
17545,
4954,
33673,
310,
220,
16,
11,
220,
17,
11,
220,
18,
280,
310,
220,
19,
11,
220,
20,
11,
220,
21,
626,
286,
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_prevote_with_split_vote() {
setup_for_test();
let peers = (1..=3).map(|id| {
let mut raft = new_test_raft_with_prevote(id, vec![1, 2, 3], 10, 1, new_storage(), true);
raft.become_follower(1, INVALID_ID);
Some(raft)
});
let mut network = Network::new(peers.... | rust_cleaned_test_functions.jsonl/107192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 633
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25566,
1272,
6615,
17052,
54360,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
25029,
284,
320,
16,
496,
28,
18,
568,
2186,
22428,
307,
91,
341,
286,
1077,
5206,
52455,
284,
501,
4452,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_best_common_ancestors() -> BitResult<()> {
BitRepo::with_empty_repo(|repo| {
let mut dag = DagBuilder::default();
let [a, b, c, d, e, f, g, h, i, j] = dag.mk_nodes();
dag.add_parents([
(j, i),
(i, e),
(i, c),
(c, b),
... | rust_cleaned_test_functions.jsonl/94146 | {
"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,
33101,
21107,
62,
681,
267,
1087,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
15124,
37784,
22428,
23476,
91,
341,
286,
1077,
5206,
28069,
284,
77027,
3297,
486,
2258,
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_none_as_empty_string() {
#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct S(#[serde_as(as = "NoneAsEmptyString")] Option<String>);
is_equal(S(None), expect![[r#""""#]]);
is_equal(S(Some("Hello".to_string())), expect![[r#""Hello""#]]);
#[serde_as]
... | rust_cleaned_test_functions.jsonl/105397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 487
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
11898,
15124,
3904,
368,
341,
262,
11506,
47024,
11898,
921,
262,
11506,
27098,
42618,
11,
39900,
11,
48440,
11,
55039,
5563,
262,
2036,
328,
7,
13353,
47024,
11898,
36951,
284,
330,
4064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kill_partition_switch_threshold_no_progress() {
let max_switch_threshold_failure_pct = 1.0 - 2.0 * SWITCH_FORK_THRESHOLD;
let total_stake = 10_000;
let max_failures_stake = (max_switch_threshold_failure_pct * total_stake as f64) as u64;
let failures_stake = max_failures_stake;
... | rust_cleaned_test_functions.jsonl/31757 | {
"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,
73327,
43840,
27652,
21858,
6536,
27200,
368,
341,
262,
1077,
1932,
27652,
21858,
43618,
71512,
284,
220,
16,
13,
15,
481,
220,
17,
13,
15,
353,
72543,
1400,
10647,
44405,
280,
262,
1077,
2790,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_list_push_back() {
let mut list = VecList::new();
list.push_back(0);
assert_eq!(list.back(), Some(&0));
list.push_back(1);
assert_eq!(list.back(), Some(&1));
list.push_back(2);
assert_eq!(list.back(), Some(&2));
} | rust_cleaned_test_functions.jsonl/11546 | {
"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,
13251,
2019,
14218,
3895,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
3895,
7,
15,
317,
286,
2060,
10714,
10297,
1607,
7335,
1507,
4329,
2099,
15,
1106,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_evaluation_line_to_path_evaluation() {
assert_eq!(
parse_evaluation_line("evaluating file '/nix/store/zqxha3ax0w771jf25qdblakka83660gr-source/lib/systems/for-meta.nix'"),
LogDatum::Source(PathBuf::from("/nix/store/zqxha3ax0w771jf25qdblakka83660gr-source/lib/system... | rust_cleaned_test_functions.jsonl/8377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 894
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86505,
6528,
2346,
2638,
86505,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
86505,
6528,
445,
14170,
53543,
1034,
3353,
77,
941,
31320,
31082,
88735,
4223,
18,
706,
15,
86,
22,
22,
16,
96423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multinomial() {
macro_rules! check_binomial {
($t:ty, $k:expr) => { {
let n: $t = $k.iter().fold(0, |acc, &x| acc + x);
let k: &[$t] = $k;
assert_eq!(k.len(), 2);
assert_eq!(multinomial(k), binomial(n, k[0]));
} }
}
che... | rust_cleaned_test_functions.jsonl/5340 | {
"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,
26290,
258,
20855,
368,
341,
262,
18072,
21407,
0,
1779,
21816,
20855,
341,
286,
1711,
83,
25,
1881,
11,
400,
74,
96011,
8,
589,
314,
341,
310,
1077,
308,
25,
400,
83,
284,
400,
74,
19471,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_material_set() {
let tests = test_cases();
for test in tests.iter() {
let mut parser = Parser::new(&test.data);
let result = parser.parse_mtlset().unwrap();
assert_eq!(result, test.expected);
}
} | rust_cleaned_test_functions.jsonl/53115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
33884,
2602,
368,
341,
262,
1077,
7032,
284,
1273,
41427,
543,
1066,
262,
369,
1273,
304,
7032,
19471,
368,
341,
286,
1077,
5206,
6729,
284,
21102,
486,
931,
2099,
1944,
2196,
317,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_column_i64() {
let fields = vec![
field_type(types::TINY),
field_type(types::SHORT),
field_type(types::INT24),
field_type(types::LONG),
field_type(types::LONG_LONG),
field_type(types::YEAR),
];
let da... | rust_cleaned_test_functions.jsonl/69572 | {
"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,
8744,
5318,
21,
19,
368,
341,
286,
1077,
5043,
284,
7486,
90515,
310,
2070,
1819,
52613,
486,
51,
64953,
1326,
310,
2070,
1819,
52613,
486,
87918,
1326,
310,
2070,
1819,
52613,
486,
3221,
17,
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... | 4 |
#[test]
fn test_parse_errors_obsolete() {
assert_eq!(obsolete("-5n"), Some(Err(ParseError::Syntax)));
assert_eq!(obsolete("-5c5"), Some(Err(ParseError::Syntax)));
} | rust_cleaned_test_functions.jsonl/32885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
20196,
36322,
27246,
368,
341,
286,
2060,
10714,
10297,
55015,
13645,
20,
77,
3975,
4329,
7,
7747,
71812,
1454,
486,
33890,
4945,
286,
2060,
10714,
10297,
55015,
13645,
20,
66,
20,
3975,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_json_coord_encode() {
let value = Value::make_coord(Coord {
lat: 45.0,
long: 23.0,
});
let json = serde_json::to_string(&value);
assert_eq!(json.unwrap(), r#"{"_kind":"coord","lat":45.0,"lng":23.0}"#);
} | rust_cleaned_test_functions.jsonl/589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
30096,
11224,
368,
341,
262,
1077,
897,
284,
5162,
486,
6927,
30096,
3025,
81437,
341,
286,
6844,
25,
220,
19,
20,
13,
15,
345,
286,
1293,
25,
220,
17,
18,
13,
15,
345,
262,
3011,
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_host_name_for() {
#[cfg(target_os = "linux")]
{
std::assert_eq!(host_name_for("id"), "id");
std::assert_eq!(host_name_for("groups"), "groups");
std::assert_eq!(host_name_for("who"), "who");
}
#[cfg(not(target_os = "linux"))]
... | rust_cleaned_test_functions.jsonl/12805 | {
"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,
12848,
1269,
5478,
368,
341,
286,
11506,
14072,
8637,
29387,
284,
330,
14210,
5422,
286,
341,
310,
1460,
486,
2207,
10714,
10297,
3790,
1269,
5478,
445,
307,
3975,
330,
307,
797,
310,
1460,
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_convert_predicate_good() {
let (comparison, expected_expr) = make_host_comparison();
let rpc_predicate = RPCPredicate {
root: Some(comparison),
};
let predicate = PredicateBuilder::default()
.rpc_predicate(Some(rpc_predicate))
... | rust_cleaned_test_functions.jsonl/79153 | {
"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,
34910,
97474,
44781,
368,
341,
286,
1077,
320,
54705,
11,
3601,
21915,
8,
284,
1281,
12848,
90797,
1428,
286,
1077,
35596,
97474,
284,
34008,
36329,
341,
310,
3704,
25,
4329,
14094,
35542,
1326,
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_literal() {
assert!(literal(b"{3}\r\n123").is_ok());
assert!(literal(b"{3}\r\n1\x003").is_err());
let (rem, val) = literal(b"{3}\r\n123xxx").unwrap();
assert_eq!(rem, b"xxx");
assert_eq!(val, LiteralRef::from_bytes(b"123").unwrap());
} | rust_cleaned_test_functions.jsonl/78686 | {
"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,
34100,
368,
341,
286,
2060,
10297,
35785,
1883,
14129,
18,
11035,
81,
1699,
16,
17,
18,
1827,
285,
19817,
1423,
286,
2060,
10297,
35785,
1883,
14129,
18,
11035,
81,
1699,
16,
3462,
15,
15,
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_guild_create_channels_have_guild_ids() {
let channels = Vec::from([GuildChannel::Text(TextChannel {
id: ChannelId(111),
guild_id: None,
kind: ChannelType::GuildText,
last_message_id: None,
last_pin_timestamp: None,
n... | rust_cleaned_test_functions.jsonl/86438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
1498,
8657,
19291,
67301,
1889,
1498,
8077,
368,
341,
286,
1077,
11744,
284,
11312,
486,
1499,
2561,
72574,
9629,
486,
1178,
34082,
9629,
341,
310,
877,
25,
13434,
764,
7,
16,
16,
16,
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... | 2 |
#[test]
fn test_spmm_csr() {
{
let a = DMatrix::from_row_slice(2, 2, &[1, 0, 0, 3]);
let b = DMatrix::from_row_slice(2, 1, &[3, -1]);
let c = DMatrix::from_row_slice(2, 1, &[1, 1]);
let a = CsrMatrix::from(&a);
let b = CsrMatrix::from(&b);
let mut c = CsrMatr... | rust_cleaned_test_functions.jsonl/33878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
3821,
666,
15094,
368,
341,
262,
341,
286,
1077,
264,
284,
422,
6689,
486,
1499,
8530,
26488,
7,
17,
11,
220,
17,
11,
44590,
16,
11,
220,
15,
11,
220,
15,
11,
220,
18,
2558,
286,
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_parse_arguments_explicit_dep_target() {
let args =
stringvec!["-c", "foo.c", "-MT", "depfile", "-fabc", "-MF", "file", "-o", "foo.o"];
let ParsedArguments {
input,
language,
outputs,
dependency_args,
msvc_sho... | rust_cleaned_test_functions.jsonl/17749 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
14214,
6026,
49258,
11123,
368,
341,
286,
1077,
2827,
4035,
310,
914,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
497,
6523,
8505,
497,
330,
14891,
1192,
497,
6523,
69,
13683,
497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_double_underscores_fn_namespace() {
let hdr = indoc! {"
namespace __B {
inline void a() {}
};
"};
run_test_ex(
"",
hdr,
quote! {},
quote! { generate_all!() },
None,
None,
None,
);
} | rust_cleaned_test_functions.jsonl/9878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
62,
31009,
7701,
15246,
41571,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
4473,
1304,
33,
341,
286,
7381,
737,
264,
368,
5613,
262,
2605,
262,
330,
2440,
262,
1598,
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_get_paths() {
let user_cfg = "/data/my/user.cfg";
let factory_cfg = "/data/my/factory.cfg";
let device_schema = "/data/my/device_schema.cfg";
let test_config = create_test_config(user_cfg, factory_cfg, device_schema);
assert_eq!(test_config.device_config.... | rust_cleaned_test_functions.jsonl/83803 | {
"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,
3062,
24152,
368,
341,
286,
1077,
1196,
18343,
284,
3521,
691,
34198,
11739,
30481,
876,
286,
1077,
8633,
18343,
284,
3521,
691,
34198,
6663,
2919,
30481,
876,
286,
1077,
3671,
25371,
284,
3521,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_padded() {
let mut data: Vec<u8> = vec![255u8; 151];
let buf = Vec::new();
let mut cursor = Cursor::new(buf);
let written = write_padded(&mut data[..].as_ref(), &mut cursor).unwrap();
let padded = cursor.into_inner();
assert_eq!(written, 151)... | rust_cleaned_test_functions.jsonl/32994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
620,
16828,
368,
341,
286,
1077,
5206,
821,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
17,
20,
20,
84,
23,
26,
220,
16,
20,
16,
935,
286,
1077,
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... | 1 |
#[test]
fn test_headers_split_field() {
let mut buf = BytesMut::from("GET /test HTTP/1.1\r\n");
let mut reader = MessageDecoder::<Request>::default();
assert! { reader.decode(&mut buf).unwrap().is_none() }
buf.extend(b"t");
assert! { reader.decode(&mut buf).unwrap().is_... | rust_cleaned_test_functions.jsonl/22263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26719,
17052,
5013,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
445,
3806,
608,
1944,
10130,
14,
16,
13,
16,
12016,
1699,
3071,
286,
1077,
5206,
6604,
284,
4856,
20732,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bl_t1() {
// BL -130
assert_eq!(decode_32(0xf7ffffbf), Instruction::BL { imm32: -130 });
// BL -5694
assert_eq!(decode_32(0xf7fefce1), Instruction::BL { imm32: -5694 });
} | rust_cleaned_test_functions.jsonl/64789 | {
"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,
15227,
13141,
528,
16,
368,
341,
262,
442,
14850,
481,
16,
18,
15,
198,
262,
2060,
10714,
10297,
18196,
62,
18,
17,
7,
15,
5848,
22,
7238,
13233,
701,
29051,
486,
9389,
314,
4893,
18,
17,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bond() {
let b: Bond = Bond { kind: purr::feature::BondKind::Aromatic, kind_value: 5, tid: 3, is_breaking_symmetry: false };
assert_eq!(b.fixed_hash_value(), 50);
} | rust_cleaned_test_functions.jsonl/69018 | {
"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,
880,
2111,
368,
341,
286,
1077,
293,
25,
23618,
284,
23618,
314,
3093,
25,
3999,
81,
486,
12753,
486,
89844,
10629,
486,
32,
98766,
11,
3093,
3142,
25,
220,
20,
11,
13112,
25,
220,
18,
11,
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_failed_pending_batch() {
let _guard = super::setup_fail();
let mut suite = TestSuite::new(3);
let incremental_scan_fp = "before_schedule_incremental_scan";
fail::cfg(incremental_scan_fp, "pause").unwrap();
let region = suite.cluster.get_region(&[]);
let mut req = Change... | rust_cleaned_test_functions.jsonl/3784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 862
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35060,
37861,
14534,
368,
341,
262,
1077,
716,
26098,
284,
2256,
486,
15188,
22121,
543,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
18,
626,
262,
1077,
52299,
28857,
34160,
284,
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_get_credential_intervals_from_proof_req() {
let proof_req = json!({
"nonce": "123432421212",
"name": "proof_req_1",
"version": "0.1",
"requested_attributes": {
"address1_1": {
"name": "address1",
... | rust_cleaned_test_functions.jsonl/106037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
666,
30320,
90807,
5673,
86757,
17644,
368,
341,
286,
1077,
11064,
17644,
284,
2951,
0,
2262,
310,
330,
39593,
788,
330,
16,
17,
18,
19,
18,
17,
19,
17,
16,
17,
16,
17,
756,
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_str_components() {
macro_rules! t(
(s: $path:expr, $exp:expr) => (
{
let path = Path::new($path);
let comps = path.str_components().map(|x|x.unwrap())
.collect::<Vec<&str>>();
... | rust_cleaned_test_functions.jsonl/102784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
23258,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933,
486,
931,
699,
2343,
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_finalize_run_with_pass() {
let env = ConfigSpec::new_with_pass();
env::set_var(DEFAULT_MASTER_PASS_ENV_VAR, "some passphrase");
env.copy_node_config_to_output(0);
let node_config = env.output_node_config(0);
env.command("finalize")
.with_arg(env.output_private_config... | rust_cleaned_test_functions.jsonl/97980 | {
"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,
70616,
14007,
6615,
15464,
368,
341,
262,
1077,
6105,
284,
5532,
8327,
486,
931,
6615,
15464,
1428,
262,
6105,
486,
746,
4612,
43175,
47068,
34351,
22027,
25750,
11,
330,
14689,
75493,
797,
262,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subscription() {
let oracle = 1;
let alice = 2;
let bob = 3;
new_test_ext().execute_with(|| {
Timestamp::set_timestamp(1600438152000);
assert_ok!(RWS::set_oracle(Origin::root(), oracle));
let call = Call::from(datalog::Call::... | rust_cleaned_test_functions.jsonl/101698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 648
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59838,
368,
341,
286,
1077,
52741,
284,
220,
16,
280,
286,
1077,
70433,
284,
220,
17,
280,
286,
1077,
35192,
284,
220,
18,
401,
286,
501,
4452,
9927,
1005,
10257,
6615,
79453,
341,
310,
32758,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_vec_vec_value() {
let vvv = vec![
vec![value!(11), value!("Jacob"), value!("A"), value!(10)],
vec![value!(21), value!("Sam"), value!("A"), value!(9)],
vec![value!(31), value!("James"), value!("A"), value!(9)],
];
let df = Fabrix::... | rust_cleaned_test_functions.jsonl/38860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
13251,
13251,
3142,
368,
341,
286,
1077,
348,
33075,
284,
7486,
90515,
310,
7486,
20703,
957,
10297,
16,
16,
701,
897,
17223,
94167,
3975,
897,
17223,
32,
3975,
897,
10297,
16,
15,
30749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_len() {
let mut bv = BitVec::new(0);
assert_eq!(bv.len(), 0);
bv.push(true);
assert_eq!(bv.len(), 1);
} | rust_cleaned_test_functions.jsonl/128606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6043,
368,
341,
286,
1077,
5206,
56937,
284,
6495,
10050,
486,
931,
7,
15,
626,
286,
2060,
10714,
10297,
54929,
19406,
1507,
220,
15,
626,
286,
56937,
2552,
3715,
317,
286,
2060,
10714,
10297,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_dashmap_secondary_index() {
let (key_start, key_end, secondary_indexes) = create_dashmap_secondary_index_state();
let index = AccountsIndex::<bool>::default_for_tests();
for token_id in [inline_spl_token::id(), inline_spl_token_2022::id()] {
run_test_spl_token... | rust_cleaned_test_functions.jsonl/71349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84585,
2186,
77759,
3560,
368,
341,
286,
1077,
320,
792,
4906,
11,
1376,
6213,
11,
14246,
50161,
8,
284,
1855,
84585,
2186,
77759,
3560,
4387,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_default_is_initial_digit_value() {
// Given:
let actual = Counter::default();
// Then:
let expected = Counter::from(vec![UINT_MIN]);
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/79502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
6892,
15809,
48403,
3142,
368,
341,
310,
442,
16246,
510,
310,
1077,
5042,
284,
19735,
486,
2258,
1428,
310,
442,
5005,
510,
310,
1077,
3601,
284,
19735,
486,
1499,
25592,
20703,
25712,
1182... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ls_long_ctime() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch("test-long-ctime-1");
for arg in &["-c", "--time=ctime", "--time=status"] {
let result = scene.ucmd().arg("-l").arg(arg).succeeds();
#[cfg(unix)]
... | rust_cleaned_test_functions.jsonl/71206 | {
"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,
53174,
17799,
26134,
545,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
401,
262,
518,
42129,
445,
1944,
23791,
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_empty_tuple() {
assert_eq!((), ());
assert_eq!(().partial_cmp(&()), Some(Ordering::Equal));
assert_eq!(().cmp(&()), Ordering::Equal);
assert_eq!(Default::<()>::default(), ());
} | rust_cleaned_test_functions.jsonl/123994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
21773,
368,
341,
262,
2060,
10714,
10297,
1507,
49323,
262,
2060,
10714,
10297,
1005,
37420,
35193,
2099,
11858,
4329,
39692,
287,
486,
2993,
1106,
262,
2060,
10714,
10297,
1005,
7293,
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 |
#[test]
fn test_bad_index() {
let map: TypedHandleMap<Foobar> = TypedHandleMap::new();
assert_eq!(
map.get(TypedHandle::<Foobar>::from_raw_parts(
100,
2,
map.as_untyped_map().map_id()
)),
None
);
} | rust_cleaned_test_functions.jsonl/15923 | {
"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,
34199,
3560,
368,
341,
286,
1077,
2415,
25,
50554,
6999,
2227,
30499,
78,
31393,
29,
284,
50554,
6999,
2227,
486,
931,
543,
286,
2060,
10714,
33673,
310,
2415,
670,
4140,
32501,
6999,
27638,
91879... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_valid_inputs() {
let ip = NetworkAddress::from_str("/ip4/127.0.0.1/tcp/1234").unwrap();
let dns = NetworkAddress::from_str("/dns4/localhost/tcp/1234").unwrap();
validate_address("ip", &ip).expect("IP failed to validate");
validate_address("dns", &dns).expect("DNS... | rust_cleaned_test_functions.jsonl/80839 | {
"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,
8337,
28557,
368,
341,
286,
1077,
5997,
284,
8141,
4286,
486,
1499,
2895,
4283,
573,
19,
14,
16,
17,
22,
13,
15,
13,
15,
13,
16,
95958,
14,
16,
17,
18,
19,
1827,
15454,
543,
286,
1077,
440... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_field_to_bytes(){
let fields = DefinitionFields::new();
let expiration: Vec<u8> = fields.field_to_bytes("Expiration".to_string(),Value::from(595640108)).unwrap();
assert_eq!(expiration, [42, 35, 128, 191, 44]);
} | rust_cleaned_test_functions.jsonl/15173 | {
"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,
5013,
2346,
12524,
3032,
414,
1077,
5043,
284,
19709,
8941,
486,
931,
543,
414,
1077,
31692,
25,
11312,
34837,
23,
29,
284,
5043,
16454,
2346,
12524,
445,
66301,
3263,
983,
3904,
1507,
1130,
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_plain_scalar_starting_with_indicators_in_flow() {
character= "{a: :b}";
let mut p = Scanner::new(s.chars());
next!(p, StreamStart(..));
next!(p, FlowMappingStart);
next!(p, Key);
next_scalar!(p, TScalarStyle::Plain, "a");
next!(p, ... | rust_cleaned_test_functions.jsonl/91013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41015,
41652,
4906,
287,
6615,
9122,
42052,
1243,
27441,
368,
341,
1789,
286,
3668,
28,
13868,
64,
25,
549,
65,
26259,
286,
1077,
5206,
281,
284,
17170,
486,
931,
1141,
85062,
1423,
286,
1790,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 mut graph = Graph::new(4, 4);
graph.add_edge(0, 1);
graph.add_edge(1, 2);
graph.add_edge(1, 3);
graph.add_edge(3, 0);
let adj: Vec<(usize, usize)> = graph.adj_list(1).collect();
assert_eq!(adj, vec![(2, 3), (1, 2)]);
... | rust_cleaned_test_functions.jsonl/789 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42559,
2019,
368,
341,
286,
1077,
5206,
4771,
284,
12165,
486,
931,
7,
19,
11,
220,
19,
317,
286,
4771,
1364,
17932,
7,
15,
11,
220,
16,
317,
286,
4771,
1364,
17932,
7,
16,
11,
220,
17,
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_query_matches_with_alternatives_under_fields() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
r#"
(assignment_expression
left: [
(identifier) @vari... | rust_cleaned_test_functions.jsonl/25170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
79728,
5859,
58228,
12132,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
4128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bool() -> Result<()> {
let b = Basic {
b: true,
b2: false,
..Default::default()
};
// serialize it and assert that it serializes correctly
let s = String::from_utf8(serialize(&b).to_vec()).unwrap();
// Assert that deserialize builts the exact same str... | rust_cleaned_test_functions.jsonl/122580 | {
"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,
22159,
368,
1464,
5714,
71698,
341,
262,
1077,
293,
284,
14625,
341,
286,
293,
25,
830,
345,
286,
293,
17,
25,
895,
345,
286,
5241,
3675,
486,
2258,
741,
262,
2605,
262,
442,
24235,
432,
323,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ota_update_channel_config_new() {
assert_eq!(
OtaUpdateChannelConfig::new("channel", "tuf").unwrap(),
OtaUpdateChannelConfig {
channel_name: "channel".to_string(),
tuf_config_name: "tuf".to_string(),
}
);
} | rust_cleaned_test_functions.jsonl/43613 | {
"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,
62,
6089,
8882,
14571,
5332,
5921,
368,
341,
286,
2060,
10714,
33673,
310,
506,
2565,
4289,
9629,
2648,
486,
931,
445,
10119,
497,
330,
83,
1704,
1827,
15454,
3148,
310,
506,
2565,
4289,
9629,
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_mut_rchunks_exact_0() {
let mut v = [1, 2, 3, 4];
let _it = v.rchunks_exact_mut(0);
} | rust_cleaned_test_functions.jsonl/12933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
1710,
84263,
71084,
62,
15,
368,
341,
262,
1077,
5206,
348,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
1077,
716,
275,
284,
348,
1746,
84263,
71084,
29523,
7,
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 |
#[test]
fn test_map() {
assert_eq!(
Val::Map(hashmap! {
"xxx".to_owned() => Val::Int(123),
"yyy".to_owned() => Val::Float(3.14),
})
.type_of(),
Type::Map(hashmap! {
"xxx".to_owned() => Type::Int,
... | rust_cleaned_test_functions.jsonl/113308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
368,
341,
286,
2060,
10714,
33673,
310,
4104,
486,
2227,
27580,
2186,
0,
341,
394,
330,
24048,
3263,
983,
51973,
368,
589,
4104,
486,
1072,
7,
16,
17,
18,
1326,
394,
330,
39319,
3263,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_name_again() {
CustomerTestFramework::default()
.given(vec![
CustomerEvent::NameAdded(NameAdded {
changed_name: "John Doe".to_string()
})
])
.when(AddCustomerName { changed_name: "John Doe".to_str... | rust_cleaned_test_functions.jsonl/100168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
1269,
62427,
368,
341,
286,
12277,
2271,
14837,
486,
2258,
741,
310,
659,
41968,
25592,
90515,
394,
12277,
1556,
486,
675,
19337,
21182,
19337,
341,
503,
5497,
1269,
25,
330,
13079,
49628,
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_no_detection_of_rejected_wpa1_or_wpa2_credentials() {
let failure = ConnectFailure::ScanFailure(fidl_mlme::ScanResultCode::InternalError);
assert!(!failure.likely_due_to_credential_rejected());
let failure = ConnectFailure::AssociationFailure(AssociationFailure {
... | rust_cleaned_test_functions.jsonl/33061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
57505,
3575,
1288,
28303,
1670,
6595,
16,
8734,
1670,
6595,
17,
47396,
368,
341,
286,
1077,
7901,
284,
13015,
17507,
486,
26570,
17507,
40556,
75,
76567,
2660,
486,
26570,
2077,
2078,
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... | 1 |
#[test]
fn test_michelso_std() {
let result = get_actual_result("test_csvs/Michelso.csv", "stddev");
assert_abs_diff_eq!(result, 0.0790105478190518, epsilon = stddev_epsilon());
} | rust_cleaned_test_functions.jsonl/80540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
90240,
704,
15656,
368,
341,
262,
1077,
1102,
284,
633,
40149,
5287,
445,
1944,
14020,
82,
10270,
90240,
704,
11219,
497,
330,
1834,
3583,
797,
262,
2060,
31170,
15850,
10714,
10297,
1382,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_matching_fields() {
let re = Regex::new(",").unwrap();
// bytes:3 3 3 3
assert_eq!(
super::parse_matching_fields(
&re,
&"中,华,人,民,E,F",
&vec![Single(2), Single(4), Single(-1), Single(-7)]
... | rust_cleaned_test_functions.jsonl/82620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
70763,
12132,
368,
341,
1789,
286,
1077,
312,
284,
26146,
486,
931,
47503,
568,
15454,
1428,
286,
442,
5820,
25,
18,
220,
220,
18,
220,
220,
18,
220,
18,
198,
688,
2060,
10714,
33673,
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_and_with_multiple_like_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let name2 = _random_vector(10);
let value2 = _random_string(10);
let name3 = _random_vector(10);
let value3 = _random_string(10);
let que... | rust_cleaned_test_functions.jsonl/11904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 747
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
6615,
45233,
25535,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
829,
17,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip() {
let stuff1 = MyStuff {
data: MyStuffType::Ver1 { x: 2.5, y: 2.5 },
};
let data_bytes = serde_cbor::to_vec(&stuff1).unwrap();
let stuff2 = serde_cbor::from_slice(&data_bytes).unwrap();
assert_eq!(stuff1, stuff2);
} | rust_cleaned_test_functions.jsonl/60474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
368,
341,
286,
1077,
6259,
16,
284,
3017,
86622,
341,
310,
821,
25,
3017,
86622,
929,
486,
10141,
16,
314,
856,
25,
220,
17,
13,
20,
11,
379,
25,
220,
17,
13,
20,
1153,
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_fetch_has_value_sync() {
let fetcher = TestFileFetcher::new();
let en_us: LanguageIdentifier = "en-US".parse().unwrap();
let path = FTL_RESOURCE_PRESENT;
let path_missing = FTL_RESOURCE_MISSING;
let fs1 = fetcher.get_test_file_source("toolkit", vec![en_us.clone()], "toolkit/... | rust_cleaned_test_functions.jsonl/133059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
21778,
3142,
23008,
368,
341,
262,
1077,
7807,
261,
284,
3393,
1703,
97492,
486,
931,
543,
262,
1077,
662,
11306,
25,
11434,
8714,
284,
330,
268,
32340,
3263,
6400,
1005,
15454,
543,
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_versionize_union_with_array() {
#[derive(Versionize)]
union TestUnion {
a: [u32; SIZE],
b: [u8; dummy_mod::SIZE],
}
impl Default for TestUnion {
fn default() -> Self {
TestUnion { a: [3; SIZE] }
}
}
impl Debug for TestUnion {
... | rust_cleaned_test_functions.jsonl/11259 | {
"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,
9438,
551,
51621,
6615,
3858,
368,
341,
262,
11506,
27098,
7,
5637,
551,
5563,
262,
11300,
3393,
32658,
341,
286,
264,
25,
508,
84,
18,
17,
26,
25341,
1259,
286,
293,
25,
508,
84,
23,
26,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bytes_basics() -> std::io::Result<()> {
task::block_on(async move {
let raw: Vec<u8> = vec![0, 1, 2, 3, 4, 5, 6, 7, 8];
let source: io::Cursor<Vec<u8>> = io::Cursor::new(raw.clone());
let mut s = source.bytes();
let mut resul... | rust_cleaned_test_functions.jsonl/109639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
880,
67981,
368,
1464,
1460,
486,
815,
486,
2077,
71698,
341,
286,
3383,
486,
4574,
4470,
18285,
3271,
341,
310,
1077,
7112,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
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... | 3 |
#[test]
fn test_directory_writable_succeeds_if_writable() {
let temp_dir = TempDir::new("writable").expect("could not create tempdir");
let path = temp_dir.into_path();
test_directory_writable("test", &path).expect("could not write to directory");
} | rust_cleaned_test_functions.jsonl/80499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14846,
1670,
22533,
643,
29264,
82,
11119,
1670,
22533,
368,
341,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
931,
445,
86,
22533,
1827,
17119,
445,
28077,
537,
1855,
2730,
3741,
797,
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_fail_unclosed_array_with_comment() {
let src_data = b"(test) [\\comment]";
assert!(yass_parser::parse(yass_parser::ParserLimits::unlimited(), src_data).is_err());
} | rust_cleaned_test_functions.jsonl/126504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
76576,
9259,
3858,
6615,
17638,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
8,
508,
3422,
6182,
59757,
262,
2060,
10297,
88,
395,
18517,
486,
6400,
7021,
395,
18517,
486,
6570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.