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_type() {
assert_eq!(
crate::rsass(
"@use \"sass:meta\";\
\n$a: meta.module-functions(1);\
\n"
)
.unwrap_err(),
"Error: $module: 1 is not a string.\
\n ,\
\n2 | $a: meta.module-fun... | rust_cleaned_test_functions.jsonl/19719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
368,
341,
286,
2060,
10714,
33673,
310,
17717,
486,
5428,
395,
1006,
394,
8428,
810,
7245,
60326,
25,
5490,
2105,
55783,
1797,
1124,
77,
39562,
25,
8823,
10076,
77430,
7,
16,
61968,
1797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scope() {
assert!(CleanupScope::All.is_included_in(&[CleanupScope::All]));
assert!(CleanupScope::Example.is_included_in(&[CleanupScope::Example]));
assert!(CleanupScope::Example.is_included_in(&[CleanupScope::All]));
assert!(CleanupScope::Item.is_included_in(&[Cle... | rust_cleaned_test_functions.jsonl/79953 | {
"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,
23199,
368,
341,
286,
2060,
10297,
67335,
10803,
486,
2403,
2079,
1243,
10181,
1243,
2099,
58,
67335,
10803,
486,
2403,
14382,
286,
2060,
10297,
67335,
10803,
486,
13314,
2079,
1243,
10181,
1243,
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_clear_slot_signatures() {
let sig = Signature::default();
let mut status_cache = BankStatusCache::default();
let blockhash = hash(Hash::default().as_ref());
let blockhash2 = hash(blockhash.as_ref());
status_cache.insert(&blockhash, &sig, 0, ());
st... | rust_cleaned_test_functions.jsonl/23950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 828
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
27563,
11172,
2789,
368,
341,
286,
1077,
8366,
284,
32232,
486,
2258,
543,
286,
1077,
5206,
2639,
11529,
284,
8547,
2522,
8233,
486,
2258,
543,
286,
1077,
2504,
8296,
284,
5175,
7,
6370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lz4_compress_decompress_16_bytes() {
let buf = [
0x1u8, 0x2u8, 0x3u8, 0x4u8, 0x1u8, 0x2u8, 0x3u8, 0x4u8, 0x1u8, 0x2u8, 0x3u8, 0x4u8,
0x1u8, 0x2u8, 0x3u8, 0x4u8,
];
let compressed = lz4_compress(&buf).unwrap();
let mut decompressed = vec![0;... | rust_cleaned_test_functions.jsonl/106793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
89,
19,
87845,
2259,
38360,
62,
16,
21,
12524,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
87,
16,
84,
23,
11,
220,
15,
87,
17,
84,
23,
11,
220,
15,
87,
18,
84,
23,
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... | 1 |
#[test]
fn test_keywords()
{
let mut cursor = Cursor::new("import match");
let mut lexer = Lexer::new("");
let tokens: Vec<Token> = lexer
.read(&mut cursor)
.expect("Lexing failed")
.collect();
assert_eq!(tokens, vec![
tok(Toke... | rust_cleaned_test_functions.jsonl/117354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
741,
262,
341,
286,
1077,
5206,
8128,
284,
28067,
486,
931,
445,
474,
2432,
797,
286,
1077,
5206,
53259,
284,
85082,
486,
931,
13056,
286,
1077,
11211,
25,
11312,
83416,
29,
284,
53259,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select_no_relation() {
let mut ctx = ExecutionContext::local();
let df = ctx.sql("SELECT 1+1").unwrap();
let s = ctx.write_string(df).unwrap();
assert_eq!("2\n", &s);
} | rust_cleaned_test_functions.jsonl/2517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
6536,
46984,
368,
341,
286,
1077,
5206,
5635,
284,
85451,
486,
2438,
543,
286,
1077,
6764,
284,
5635,
10045,
445,
4858,
220,
16,
10,
16,
1827,
15454,
543,
286,
1077,
274,
284,
5635,
3836,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_true_lq_true() {
let text = " {% if 0 > 0 %} true {% else %} false {% endif %} ";
assert_template_result!(" false ", text);
} | rust_cleaned_test_functions.jsonl/28123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16082,
907,
80,
16082,
368,
341,
262,
1077,
1467,
284,
330,
52261,
421,
220,
15,
861,
220,
15,
1018,
92,
830,
52261,
770,
1018,
92,
895,
52261,
12330,
1018,
92,
7620,
262,
2060,
8693,
5287,
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 |
#[test]
fn test_sub() {
let vals = vec![
("12.34", "1.234", "11.106"),
("12.34", "-1.234", "13.574"),
("1234e6", "1234e-6", "1233999999.998766"),
];
for &(x, y, z) in vals.iter() {
let mut a = BigDecimal::from_str(x).unwrap();
... | rust_cleaned_test_functions.jsonl/75812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
341,
286,
1077,
28356,
284,
7486,
90515,
310,
3489,
16,
17,
13,
18,
19,
497,
330,
16,
13,
17,
18,
19,
497,
330,
16,
16,
13,
16,
15,
21,
4461,
310,
3489,
16,
17,
13,
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... | 2 |
#[test]
fn test_single_hand_always_wins() {
test(&["4S 5S 7H 8D JC"], &["4S 5S 7H 8D JC"])
} | rust_cleaned_test_functions.jsonl/49893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 56
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
23194,
8418,
2284,
1670,
1330,
368,
341,
262,
1273,
2099,
1183,
19,
50,
220,
20,
50,
220,
22,
39,
220,
23,
35,
60583,
7914,
609,
1183,
19,
50,
220,
20,
50,
220,
22,
39,
220,
23,
35,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pathconf_limited() {
let path_max = pathconf("/", PathconfVar::PATH_MAX);
assert!(path_max.expect("pathconf failed").expect("PATH_MAX is unlimited") > 0);
} | rust_cleaned_test_functions.jsonl/9000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
6135,
907,
31511,
368,
341,
1066,
262,
1077,
1815,
6345,
284,
1815,
6135,
35460,
7933,
6135,
3962,
486,
13593,
6806,
317,
262,
2060,
10297,
2343,
6345,
25952,
445,
2343,
6135,
4641,
1827,
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 |
#[test]
fn test_regex_line() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-g", "[AB]", "sed", "s/./@/"])
.write_stdin("ABC\nDFE\nBCC\nCCA\n")
.assert()
.stdout("@BC\nDFE\n@CC\n@CA\n");
} | rust_cleaned_test_functions.jsonl/7886 | {
"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,
41832,
6528,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
2099,
1183,
12,
70,
497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_constructor_pod_make_unique() {
let hdr = indoc! {"
#include <stdint.h>
struct A {
uint32_t a;
};
"};
let rs = quote! {
ffi::A::make_unique();
};
run_test("", hdr, rs, &[], &["A"]);
} | rust_cleaned_test_functions.jsonl/9963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
66210,
85337,
28230,
21218,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
31435,
860,
397,
262,
2036,
362,
341,
286,
2622,
18,
17,
528,
264,
280,
262,
2605... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_dbg_keep_semicolon() {
// https://github.com/rust-analyzer/rust-analyzer/issues/5129#issuecomment-651399779
// not quite though
// adding a comment at the end of the line makes
// the ast::MacroCall to include the semicolon at the end
check_assist(
... | rust_cleaned_test_functions.jsonl/13609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
44124,
50293,
3453,
21220,
72269,
368,
341,
286,
442,
3703,
1110,
5204,
905,
7382,
590,
18883,
27165,
7382,
590,
18883,
27165,
38745,
14,
20,
16,
17,
24,
2,
11159,
6182,
12,
21,
20,
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_no_documentation() {
let schema =
Schema::parse_str(r#"{"type": "enum", "name": "Coin", "symbols": ["heads", "tails"]}"#)
.unwrap();
let doc = match schema {
Schema::Enum { doc, .. } => doc,
_ => return,
};
ass... | rust_cleaned_test_functions.jsonl/26534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
26231,
367,
368,
341,
286,
1077,
10802,
4035,
310,
12539,
486,
6400,
2895,
2601,
55543,
4913,
1313,
788,
330,
9018,
497,
330,
606,
788,
330,
41180,
497,
330,
67426,
788,
4383,
35810,
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_datetime_addassignment() {
let ymdhms = |y, m, d, h, n, s| NaiveDate::from_ymd(y, m, d).and_hms(h, n, s);
let mut date = ymdhms(2016, 10, 1, 10, 10, 10);
date += Duration::minutes(10_000_000);
assert_eq!(date, ymdhms(2035, 10, 6, 20, 50, 10));
date += Dura... | rust_cleaned_test_functions.jsonl/76822 | {
"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,
28943,
2891,
29951,
368,
341,
286,
1077,
379,
2277,
71,
1011,
284,
760,
88,
11,
296,
11,
294,
11,
305,
11,
308,
11,
274,
91,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7021,
11,
296,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enable_statistics() {
let mut opts = Options::default();
opts.enable_statistics();
opts.set_stats_dump_period_sec(60);
assert!(opts.get_statistics().is_some());
let opts = Options::default();
assert!(opts.get_statistics().is_none());
} | rust_cleaned_test_functions.jsonl/35262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18988,
49569,
368,
341,
286,
1077,
5206,
12185,
284,
14566,
486,
2258,
543,
286,
12185,
28697,
49569,
543,
286,
12185,
980,
15381,
18296,
20818,
17242,
7,
21,
15,
317,
286,
2060,
10297,
10518,
670... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_elf_debug() -> Result<(), Error> {
let view = ByteView::open(fixture("linux/crash.debug"))?;
let object = Object::parse(&view)?;
insta::assert_debug_snapshot!(object, @r###"
⋮Elf(
⋮ ElfObject {
⋮ code_id: Some(
⋮ CodeId(f1c3bcc0279865fe3058404b2831d9... | rust_cleaned_test_functions.jsonl/82873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 438
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
490,
15446,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
1651,
284,
10906,
851,
486,
2508,
94886,
445,
14210,
2899,
81,
988,
7883,
2761,
37445,
262,
1077,
1633,
284,
3002,
486,
6400,
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... | 3 |
#[test]
fn test_need_to_skip_space() {
// appender can create a file inside
let dir = tempdir().unwrap();
let mut path = dir.path().to_path_buf();
path.push("appender_skip_space");
let appender = MmapedAppendOnlyFile::new(path).unwrap();
for _ ... | rust_cleaned_test_functions.jsonl/114149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71506,
2346,
44830,
14663,
368,
341,
16885,
286,
442,
906,
1659,
646,
1855,
264,
1034,
4766,
198,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
5206,
1815,
284,
5419,
3875,
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... | 2 |
#[test]
fn test_set_symmetric_difference() {
let a = SgSet::from_iter([1, 2, 3, 4, 5]);
let b = SgSet::<_, 5>::from_iter([4, 5, 6, 7, 8]);
assert_eq!(
a.symmetric_difference(&b).copied().collect::<Vec<usize>>(),
vec![1, 2, 3, 6, 7, 8]
);
} | rust_cleaned_test_functions.jsonl/68246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
26825,
15903,
47525,
368,
341,
262,
1077,
264,
284,
328,
70,
1649,
486,
1499,
11723,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
2558,
262,
1077,
293,
284,
328,
70,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_level() {
test_one("10.0.1.1:1234", "10.0.2.1", &[], "10.0.1.1");
test_one("10.0.1.1:1234", "10.0.2.1", &["10.0.2.1"], "10.0.1.1");
test_one("10.0.1.1:1234", "10.0.2.1", &["10.0.2.1/24"], "10.0.1.1");
test_one("10.0.1.1:1234", "10.0.2.1", &["10.0.1.1"], "10... | rust_cleaned_test_functions.jsonl/18401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
8274,
368,
341,
286,
1273,
11667,
445,
16,
15,
13,
15,
13,
16,
13,
16,
25,
16,
17,
18,
19,
497,
330,
16,
15,
13,
15,
13,
17,
13,
16,
497,
609,
12995,
330,
16,
15,
13,
15,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_readme_example_1() {
let ref a = LpInteger::new("a");
let ref b = LpInteger::new("b");
let ref c = LpInteger::new("c");
let mut problem = LpProblem::new("One Problem", LpObjective::Maximize);
problem += 10.0 * a + 20.0 * b;
problem += (500 * a + 1200 * b + 1500 * c).le(... | rust_cleaned_test_functions.jsonl/19663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2660,
39304,
62,
16,
368,
341,
262,
1077,
2053,
264,
284,
444,
79,
3486,
486,
931,
445,
64,
797,
262,
1077,
2053,
293,
284,
444,
79,
3486,
486,
931,
445,
65,
797,
262,
1077,
2053,
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... | 3 |
#[test]
fn test_provide_snap() {
let l = default_logger();
// restore the state machine from a snapshot so it has a compacted log and a snapshot
let s = new_snapshot(11, 11, vec![1, 2]); // magic number
let mut sm = new_test_raft(1, vec![1], 10, 1, new_storage(), &l);
sm.restore(s);
sm... | rust_cleaned_test_functions.jsonl/19141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
19448,
74175,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
442,
14952,
279,
1584,
5662,
504,
264,
16295,
773,
432,
702,
264,
16830,
291,
1487,
323,
264,
16295,
198,
262,
1077,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rollback_hook() -> Result<()> {
let db = Connection::open_in_memory()?;
let mut called = false;
db.rollback_hook(Some(|| {
called = true;
}));
db.execute_batch("BEGIN; CREATE TABLE foo (t TEXT); ROLLBACK;")?;
assert!(called);
O... | rust_cleaned_test_functions.jsonl/34785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
33559,
32005,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
368,
69493,
286,
1077,
5206,
2598,
284,
895,
280,
286,
2927,
58011,
32005,
65405,
79453,
341,
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... | 4 |
#[test]
fn test_call_site() {
let context = Context::create();
let module = context.create_module("testing");
let builder = context.create_builder();
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let function = module.add_function("do_nothing", fn_ty... | rust_cleaned_test_functions.jsonl/122299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
24507,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
8840,
797,
262,
1077,
7363,
284,
2266,
2520,
28532,
1428,
262,
1077,
737,
1819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_vertex_shader_into_spirv() {
let mut c = Compiler::new().unwrap();
let result = c
.compile_into_spirv(VOID_MAIN, ShaderKind::Vertex, "shader.glsl", "main", None)
.unwrap();
assert!(result.len() > 20);
assert!(result.as_binary().firs... | rust_cleaned_test_functions.jsonl/41043 | {
"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,
74170,
26611,
35485,
45514,
643,
5565,
85,
368,
341,
286,
1077,
5206,
272,
284,
45631,
486,
931,
1005,
15454,
543,
286,
1077,
1102,
284,
272,
198,
310,
659,
20433,
45514,
643,
5565,
85,
7,
24053... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_synchsafe() {
assert_eq!(681570, util::synchsafe(176994));
assert_eq!(176994, util::unsynchsafe(681570));
} | rust_cleaned_test_functions.jsonl/59876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51393,
331,
18675,
368,
341,
286,
2060,
10714,
10297,
21,
23,
16,
20,
22,
15,
11,
4094,
486,
20339,
331,
18675,
7,
16,
22,
21,
24,
24,
19,
1106,
286,
2060,
10714,
10297,
16,
22,
21,
24,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_resolve_url_or_path_error() {
use url::ParseError::*;
use ModuleResolutionError::*;
let mut tests = vec![
("https://eggplant:b/c", InvalidUrl(InvalidPort)),
("https://:8080/a/b/c", InvalidUrl(EmptyHost)),
];
if cfg!(target_os = "windows") {
let p = r"\\.\c:... | rust_cleaned_test_functions.jsonl/59603 | {
"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,
77291,
2903,
8734,
2638,
4096,
368,
341,
262,
990,
2515,
486,
14463,
1454,
56162,
262,
990,
13711,
38106,
1454,
79304,
262,
1077,
5206,
7032,
284,
7486,
90515,
414,
3489,
2428,
1110,
28368,
20827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_display_request_error() {
assert_eq!(
format!("{}", RequestError::InvalidHttpMethod("test")),
"Invalid HTTP Method: test"
);
assert_eq!(
format!("{}", RequestError::InvalidUri("test")),
"Invalid URI: test"
);
... | rust_cleaned_test_functions.jsonl/80999 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
7893,
4096,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
79878,
6145,
1454,
486,
7928,
2905,
3523,
445,
1944,
30154,
310,
330,
7928,
10130,
6730,
25,
1273,
698,
286,
1439,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_in_invalid_string() {
let mut params = Map::new();
params.assign("in", Value::String("2".to_owned())).ok();
let mut rules = BTreeMap::new();
rules.insert("in",
vec![Rule::NotIn(vec![Value::String("2".into()), Value::U64(1)])]);
let result = validate(&ru... | rust_cleaned_test_functions.jsonl/104856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
1243,
31433,
3904,
368,
341,
262,
1077,
5206,
3628,
284,
5027,
486,
931,
543,
262,
3628,
17870,
445,
258,
497,
5162,
486,
703,
445,
17,
3263,
983,
51973,
34670,
562,
1428,
262,
1077,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account_data_set_data() {
let key = Pubkey::new_unique();
let (_, mut account) = make_two_accounts(&key);
assert_eq!(account.data(), &vec![0, 0]);
account.set_data(vec![1, 2]);
assert_eq!(account.data(), &vec![1, 2]);
account.set_data(vec![]);
... | rust_cleaned_test_functions.jsonl/48198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
1769,
2602,
1769,
368,
341,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
39464,
5206,
2692,
8,
284,
1281,
23241,
55665,
2099,
792,
317,
286,
2060,
10714,
10297,
4608,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account_ids_after_program_ids() {
solana_logger::setup();
let (genesis_config, mint_keypair) = create_genesis_config(500);
let mut bank = Bank::new(&genesis_config);
let from_pubkey = solana_sdk::pubkey::new_rand();
let to_pubkey = solana_sdk::pubkey::new... | rust_cleaned_test_functions.jsonl/2630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
8077,
19844,
25096,
8077,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_asr_imm() {
match decode_16(0x1212) {
Instruction::ASR_imm { params, thumb32 } => {
assert!(params.rd == Reg::R2);
assert!(params.rm == Reg::R2);
assert!(params.shift_n == 8);
assert!(params.setflags == SetFlags::NotInITBloc... | rust_cleaned_test_functions.jsonl/64766 | {
"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,
15227,
11898,
81,
71370,
368,
341,
1066,
262,
2432,
16895,
62,
16,
21,
7,
15,
87,
16,
17,
16,
17,
8,
341,
286,
29051,
486,
1911,
49,
71370,
314,
3628,
11,
24050,
18,
17,
335,
589,
341,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_highest_card_of_all_hands_wins() {
test(
&["4D 5S 6S 8D 3C", "2S 4C 7S 9H 10H", "3S 4S 5D 6H JH"],
&["3S 4S 5D 6H JH"],
)
} | rust_cleaned_test_functions.jsonl/49895 | {
"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,
1523,
7504,
16888,
3575,
5705,
1523,
2844,
1670,
1330,
368,
341,
262,
1273,
1006,
286,
609,
1183,
19,
35,
220,
20,
50,
220,
21,
50,
220,
23,
35,
220,
18,
34,
497,
330,
17,
50,
220,
19,
34,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_csharp_bincode_runtime_on_simple_data() {
let (dir, _tmp) = create_test_dir("test_csharp_bincode_runtime_on_simple_data");
test_csharp_runtime_on_simple_data(dir, Runtime::Bincode);
} | rust_cleaned_test_functions.jsonl/6523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
52917,
21816,
1851,
33232,
4470,
30015,
1769,
368,
341,
262,
1077,
320,
3741,
11,
716,
5173,
8,
284,
1855,
4452,
4334,
445,
1944,
666,
52917,
21816,
1851,
33232,
4470,
30015,
1769,
797,
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 |
#[test]
fn test_clone() {
let mut m = HashMap::new();
assert_eq!(m.len(), 0);
assert!(m.insert(1, 2).is_none());
assert_eq!(m.len(), 1);
assert!(m.insert(2, 4).is_none());
assert_eq!(m.len(), 2);
let m2 = m.clone();
assert_eq!(*m2.get(&1).unwrap(),... | rust_cleaned_test_functions.jsonl/8496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
931,
543,
286,
2060,
10714,
10297,
76,
19406,
1507,
220,
15,
317,
286,
2060,
10297,
76,
7030,
7,
16,
11,
220,
17,
568,
285,
31488,
1423,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_struct() -> Result<(), Error> {
combined_keys_gen!(sender_combined_key, receiver_combined_key);
let shared_key = SharedKey::generate();
#[derive(PartialEq, Debug, Serialize, Deserialize)]
struct Tuple(i16, i32, i64);
impl SerdeEncryptPublicKey for Tuple {
type ... | rust_cleaned_test_functions.jsonl/31577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
15126,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
10856,
12631,
16322,
10297,
11644,
89945,
3097,
11,
13964,
89945,
3097,
317,
262,
1077,
6094,
3097,
284,
16990,
1592,
486,
19366,
1428,
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... | 5 |
#[test]
fn test_ml_literal_string() {
let p = Parser::new();
assert_eq!(p.ml_literal_string(r#"'''
Abc ÑŸ
'''"#).1,
Done("", r#"
Abc ÑŸ
"#));
} | rust_cleaned_test_functions.jsonl/27410 | {
"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,
76567,
34100,
3904,
368,
341,
262,
1077,
281,
284,
21102,
486,
931,
543,
262,
2060,
10714,
10297,
79,
57409,
34100,
3904,
2601,
55543,
14687,
1920,
3680,
66,
1683,
239,
144316,
198,
1920,
11456,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_date_parser() {
setup();
let str = "2020-11-30T11:33:37.437915952Z";
let date = DateTime::parse_from_rfc3339(str);
assert!(date.is_ok());
} | rust_cleaned_test_functions.jsonl/129416 | {
"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,
4164,
18517,
368,
341,
286,
6505,
1428,
286,
1077,
607,
284,
330,
17,
15,
17,
15,
12,
16,
16,
12,
18,
15,
51,
16,
16,
25,
18,
18,
25,
18,
22,
13,
19,
18,
22,
24,
16,
20,
24,
20,
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_upgrade_enum() {
let src_code = quote! {
#[doc = "GPS fix Type"]
#[ubx_extend]
#[ubx(from, rest_reserved)]
#[repr(u8)]
#[derive(Debug, Copy, Clone)]
enum GpsFix {
NoFix = 0,
DeadReckoningOnly = 1,
Fix2D = 2,
... | rust_cleaned_test_functions.jsonl/16495 | {
"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,
67794,
31054,
368,
341,
262,
1077,
2286,
4136,
284,
12641,
0,
341,
286,
11506,
5236,
284,
330,
63176,
5046,
3990,
7026,
286,
11506,
392,
87,
70265,
921,
286,
11506,
392,
87,
17016,
11,
2732,
749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fq2_mul_nonresidue() {
let mut rng = XorShiftRng::from_seed([0x5dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let nqr = Fq2 {
c0: Fq::one(),
c1: Fq::one(),
};
for _ in 0..1000 {
let mut a = Fq2::rand(&mut rng);
let mut b = a;
a.mul_by_no... | rust_cleaned_test_functions.jsonl/130073 | {
"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,
761,
80,
17,
24944,
21637,
416,
60607,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
20,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_grades_for_several_students_are_sorted() {
let mut s = school::School::new();
s.add(2, "Aimee");
s.add(7, "Logan");
s.add(4, "Blair");
assert_eq!(s.grades(), vec!(2, 4, 7));
} | rust_cleaned_test_functions.jsonl/127488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15682,
3452,
5478,
3453,
17539,
71644,
56855,
41277,
368,
341,
262,
1077,
5206,
274,
284,
2906,
486,
32749,
486,
931,
543,
262,
274,
1364,
7,
17,
11,
330,
32,
545,
68,
797,
262,
274,
1364,
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_time_from_json_nanoseconds() {
let schema = Schema::new(vec![Field::new(
"a",
DataType::Time64(TimeUnit::Nanosecond),
true,
)]);
let builder = ReaderBuilder::new()
.with_schema(Arc::new(schema))
.with_batch_size... | rust_cleaned_test_functions.jsonl/29468 | {
"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,
3009,
5673,
9455,
73936,
75889,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
20703,
1877,
486,
931,
1006,
310,
330,
64,
756,
310,
33172,
486,
1462,
21,
19,
36968,
4562,
486,
45,
276,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compress_pairs_1() {
let src = [HASH_ELEMENT; 2];
let expect = hash_2n_to_n_ret(&HASH_ELEMENT, &HASH_ELEMENT);
let mut dst = [Default::default(); 1];
hash_compress_pairs(&mut dst, &src, 1);
assert_eq!(dst, [expect]);
} | rust_cleaned_test_functions.jsonl/127334 | {
"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,
87845,
36430,
62,
16,
368,
341,
286,
1077,
2286,
284,
508,
70707,
27156,
26,
220,
17,
935,
286,
1077,
1720,
284,
5175,
62,
17,
77,
2346,
1089,
21695,
2099,
70707,
27156,
11,
609,
70707,
27156,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_holding_cell_htlc_upon_free_multihop() {
let chanmon_cfgs = create_chanmon_cfgs(3);
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
let mut config = test_default_channel_config();
config.channel_options.forwarding_fee_base_msat = 196;
let node_chanmgrs = create_node_chanmgrs(3,... | rust_cleaned_test_functions.jsonl/16918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
1523,
14995,
16648,
49086,
17257,
8237,
263,
8905,
26290,
6996,
453,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
18,
317,
10217,
2436,
18343,
82,
284,
185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple_operator_empty_or_to_string() {
let query = Operator::Or(vec![]);
let json = query.to_string();
let expected = "{}";
assert_eq!(json, expected);
} | rust_cleaned_test_functions.jsonl/11874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
40594,
15124,
8734,
2346,
3904,
368,
341,
286,
1077,
3239,
284,
28498,
486,
2195,
25592,
0,
1294,
626,
286,
1077,
2951,
284,
3239,
2389,
3904,
1428,
286,
1077,
3601,
284,
35503,
3302,
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 |
#[test]
fn test_from_str() {
let _file = r#"
<file name="blupp.dat" uuid="1502fdd0-c24e-4acc-984a-7d1e05059ccd" time="2019-01-20-T10:03:54Z" host="Backup2-backup2-get-oldgluster-dp1-2">
<path xml:space="preserve">/oleidinger/Jotta/Sync/test</path>
<abspath xml:space="preserve">/oleidinger/Jotta/Sync/tes... | rust_cleaned_test_functions.jsonl/51533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 729
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
341,
262,
1077,
716,
1192,
284,
435,
2,
698,
27,
1192,
829,
428,
2024,
31832,
9915,
1,
16040,
428,
16,
20,
15,
17,
69,
631,
15,
1786,
17,
19,
68,
12,
19,
4475,
12,
24,
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_eq_same() {
// Given:
let a = Counter::from(vec![1, 2, 3]);
let b = Counter::from(vec![1, 2, 3]);
// Then:
assert_eq!(a, b);
} | rust_cleaned_test_functions.jsonl/79515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
33574,
368,
341,
310,
442,
16246,
510,
310,
1077,
264,
284,
19735,
486,
1499,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
2558,
310,
1077,
293,
284,
19735,
486,
1499,
25592,
20703,
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 |
#[test]
fn test_register() {
assert_ne!(crate::Type::INVALID, MySharedArc::static_type());
assert_ne!(crate::Type::INVALID, MySharedRc::static_type());
} | rust_cleaned_test_functions.jsonl/105010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
368,
341,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
36809,
486,
1978,
1819,
1423,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
49,
66,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_engine() {
// Create the mock engine with this vec so we can refer to it later. Once we put the engine
let calls = Arc::new(Mutex::new(Vec::new()));
// We are going to run two threads to simulate the validator and the driver
let mut mock_engine = MockEng... | rust_cleaned_test_functions.jsonl/73636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24823,
368,
341,
286,
442,
4230,
279,
7860,
4712,
448,
419,
7486,
773,
582,
646,
8300,
311,
432,
2937,
13,
9646,
582,
2182,
279,
4712,
8945,
286,
1077,
6738,
284,
19689,
486,
931,
3189,
9371,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compile_shift_right_wrap_e() {
let compiled = bitwise::compile_shift_right_wrap("E".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b10010111);
} | rust_cleaned_test_functions.jsonl/100624 | {
"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,
74170,
22230,
10539,
38550,
2204,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
22230,
10539,
38550,
445,
36,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
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 |
#[test]
fn test_network_interface_error_conversion() {
// Test `NetworkInterfaceError` conversion
assert_eq!(
error_kind(NetworkInterfaceError::GuestMacAddressInUse(String::new())),
ErrorKind::User
);
assert_eq!(
error_kind(NetworkInterfaceErro... | rust_cleaned_test_functions.jsonl/93131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
20546,
4096,
64132,
368,
341,
286,
442,
3393,
1565,
12320,
5051,
1454,
63,
14409,
198,
286,
2060,
10714,
33673,
310,
1465,
33162,
77623,
5051,
1454,
486,
37804,
19552,
4286,
641,
10253,
2242,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mimc_small_params() {
assert!(
Path::new("./phase1radix2m10").exists(),
"the phase1 file `phase1radix2m10` must be in the crate's top level directory"
);
let constants = (0..MIMC_ROUNDS)
.map(|_| Fr::random(&mut thread_rng()))
.collect::<Vec<_>>();
... | rust_cleaned_test_functions.jsonl/124276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1915
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
318,
66,
31966,
6745,
368,
341,
262,
2060,
33673,
286,
7933,
486,
931,
13988,
25141,
16,
13281,
941,
17,
76,
16,
15,
1827,
16304,
3148,
286,
330,
1782,
10262,
16,
1034,
1565,
25141,
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... | 1 |
#[test]
fn test_array_literal() {
test("([])", "");
test("([1])", "");
test("([a])", "");
test("([foo()])", "foo()");
} | rust_cleaned_test_functions.jsonl/470 | {
"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,
3858,
34100,
368,
341,
262,
1273,
445,
10556,
11583,
14498,
262,
1273,
445,
2561,
16,
2467,
497,
14498,
262,
1273,
445,
2561,
64,
2467,
497,
14498,
262,
1273,
445,
2561,
7975,
368,
2467,
497,
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 |
#[test]
fn test_aes_siv_primitive() {
tink_daead::init();
let km = tink::registry::get_key_manager(tink_testutil::AES_SIV_TYPE_URL)
.expect("cannot obtain AESSIV key manager");
let serialized_key = km.new_key(&[]).unwrap();
let p = km.primitive(&serialized_key).unwrap();
assert!(vali... | rust_cleaned_test_functions.jsonl/64374 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
643,
344,
84087,
368,
341,
262,
90584,
47070,
3149,
486,
2327,
543,
262,
1077,
13136,
284,
90584,
486,
29172,
486,
455,
3097,
12144,
1155,
766,
4452,
1314,
486,
69168,
1098,
3090,
4189,
800... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inference() {
let sim_specs = sim_specs_with_units("parsec");
let units_ctx = Context::new_with_builtins(&[], &sim_specs).unwrap();
// test cases where we should be able to infer all units
let test_cases: &[&[(crate::datamodel::Variable, &'static str)]] = &[
&[
... | rust_cleaned_test_functions.jsonl/18980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
2202,
368,
341,
262,
1077,
1643,
71200,
284,
1643,
71200,
6615,
28345,
445,
1732,
5024,
797,
262,
1077,
8153,
15147,
284,
9608,
486,
931,
6615,
880,
11227,
1330,
2099,
12995,
609,
14781,
712... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version_set_merge_iters() {
let v1 = vec![2, 4, 6, 8, 10];
let v2 = vec![1, 3, 5, 7];
assert_eq!(
vec![1, 2, 3, 4, 5, 6, 7, 8, 10],
merge_iters(v1.into_iter(), v2.into_iter(), |a, b| a.cmp(&b))
);
} | rust_cleaned_test_functions.jsonl/41929 | {
"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,
9438,
2602,
20888,
72866,
368,
341,
286,
1077,
348,
16,
284,
7486,
20703,
17,
11,
220,
19,
11,
220,
21,
11,
220,
23,
11,
220,
16,
15,
935,
286,
1077,
348,
17,
284,
7486,
20703,
16,
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_write_hmtx_table() {
let hmtx_data = include_bytes!("../tests/fonts/opentype/hmtx.bin");
let num_glyphs = 1264;
let num_h_metrics = 1264;
let hmtx = ReadScope::new(hmtx_data)
.read_dep::<HmtxTable<'_>>((num_glyphs, num_h_metrics))
... | rust_cleaned_test_functions.jsonl/76063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
1523,
90310,
5237,
368,
341,
1789,
286,
1077,
305,
90310,
1769,
284,
2924,
12524,
17223,
1244,
23841,
60667,
52000,
306,
499,
7530,
90310,
29394,
797,
286,
1077,
1629,
88703,
82,
284,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inverse_vector() {
let v = Vector3::new(1.0f64, 2.0, 3.0);
let t = Decomposed {
scale: 1.5f64,
rot: Quaternion::new(0.5f64, 0.5, 0.5, 0.5),
disp: Vector3::new(6.0f64, -7.0, 8.0),
};
let vt = t
.inverse_transform_vector(v)
.expect("Expected ... | rust_cleaned_test_functions.jsonl/86460 | {
"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,
63333,
12247,
368,
341,
262,
1077,
348,
284,
4196,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
1077,
259,
284,
96378,
3865,
341,
286,
545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_async_ooo_offchain_updates() {
// Test that if we have multiple offchain updates being persisted and they complete
// ChannelManager.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs... | rust_cleaned_test_functions.jsonl/43159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1874
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
62,
38621,
13651,
8819,
57829,
368,
341,
197,
197,
322,
3393,
429,
421,
582,
614,
5248,
1007,
8819,
8837,
1660,
52995,
323,
807,
4583,
24520,
197,
197,
322,
13434,
2043,
624,
197,
10217,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clean_symbol() {
let symbol = "google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::TypeHandler*::Type google::protobuf::internal::RepeatedPtrFieldBase::Add<google::protobuf::RepeatedPtrField<std::__cxx11::basic_string<char, std:... | rust_cleaned_test_functions.jsonl/25407 | {
"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,
19573,
21179,
368,
341,
262,
1077,
7735,
284,
330,
17485,
486,
32921,
486,
90989,
5348,
1877,
8050,
18606,
89073,
16,
16,
486,
22342,
3904,
21919,
11,
1460,
486,
1762,
39693,
21919,
8066,
1460,
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... | 1 |
#[test]
fn test_train() {
let word_counts: HashMap<String, u32> = [
("the".into(), 25),
("roses".into(), 22),
("are".into(), 24),
("red".into(), 12),
("voilets".into(), 10),
("blue".into(), 16),
]
.iter()
.cl... | rust_cleaned_test_functions.jsonl/91372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 739
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7591,
368,
341,
286,
1077,
3409,
25977,
25,
10528,
3464,
11,
575,
18,
17,
29,
284,
2278,
310,
3489,
1782,
3263,
18122,
1507,
220,
17,
20,
1326,
310,
3489,
3630,
288,
3263,
18122,
1507,
220,
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_lookup_no_size() -> Result<(), Error> {
let buffer = ByteView::open(fixture("libgallium_dri.sym"))?;
let object = Object::parse(&buffer)?;
let mut buffer = Vec::new();
SymCacheWriter::write_object(&object, Cursor::new(&mut buffer))?;
let symcache = SymCache::parse(&buffer)?;... | rust_cleaned_test_functions.jsonl/84094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
6536,
2368,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
4147,
284,
10906,
851,
486,
2508,
94886,
445,
2740,
70,
541,
2356,
814,
461,
50901,
2761,
37445,
262,
1077,
1633,
284,
3002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty_doc() {
let s: String = "".to_owned();
YamlLoader::load_from_str(&s).unwrap();
let s: String = "---".to_owned();
assert_eq!(YamlLoader::load_from_str(&s).unwrap()[0], Yaml::Null);
} | rust_cleaned_test_functions.jsonl/1201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
18869,
368,
341,
286,
1077,
274,
25,
923,
284,
44907,
983,
51973,
543,
286,
809,
9467,
9181,
486,
1078,
5673,
2895,
2099,
82,
568,
15454,
543,
286,
1077,
274,
25,
923,
284,
75894,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_schema_is_send() {
fn send<S: Send>(_s: S) {}
let schema = Schema {
named: vec![],
indices: Default::default(),
top: SchemaPiece::Null.into(),
};
send(schema);
} | rust_cleaned_test_functions.jsonl/2991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25371,
6892,
13565,
368,
341,
286,
5168,
3624,
18858,
25,
11000,
45609,
82,
25,
328,
8,
10086,
286,
1077,
10802,
284,
12539,
341,
310,
6941,
25,
7486,
20703,
1259,
310,
14937,
25,
7899,
486,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_grep_n_match_file_name_with_dashes_and_no_extension() {
// git grep -n
// This fails: we can't parse it currently.
let fake_parent_grep_command =
"/usr/local/bin/git --doesnt-matter grep --nor-this nor_this -- nor_this";
let _args = FakeParentArg... | rust_cleaned_test_functions.jsonl/43041 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1889,
9995,
1089,
10708,
2458,
1269,
6615,
814,
14051,
8378,
6536,
31035,
368,
341,
286,
442,
16345,
20675,
481,
77,
198,
286,
442,
1096,
14525,
25,
582,
646,
944,
4715,
432,
5023,
624,
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_oid_params() {
test_type(
"OID",
&[
(Some(2_147_483_548u32), "2147483548"),
(Some(4_000_000_000), "4000000000"),
(None, "NULL"),
],
);
} | rust_cleaned_test_functions.jsonl/127906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59633,
6745,
368,
341,
262,
1273,
1819,
1006,
286,
330,
29805,
756,
286,
609,
9640,
310,
320,
8373,
7,
17,
62,
16,
19,
22,
62,
19,
23,
18,
62,
20,
19,
23,
84,
18,
17,
701,
330,
17,
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_transaction_with_duplicate_accounts_in_instruction() {
let (genesis_config, mint_keypair) = create_genesis_config(500);
let mut bank = Bank::new(&genesis_config);
fn mock_process_instruction(
_program_id: &Pubkey,
keyed_accounts: &[KeyedAccount],
... | rust_cleaned_test_functions.jsonl/63778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1057
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
6615,
70434,
55665,
1243,
54923,
368,
341,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
1077,
5206,
6073,
284,
8547,
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... | 5 |
#[test]
fn test_maps() {
test_map(b"\xa0", 0, |_| {}, false);
test_map(
b"\xa2\x01\x02\x03\x04",
2,
|val| {
let (key, value) = val.get(0).unwrap();
assert_pos_number(key, 1);
assert_pos_number(value, 2);
let (key, value) = val.get(1... | rust_cleaned_test_functions.jsonl/62591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1709
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46512,
368,
341,
262,
1273,
5376,
1883,
11934,
9591,
15,
497,
220,
15,
11,
66091,
16452,
895,
317,
262,
1273,
5376,
1006,
286,
293,
11934,
9591,
17,
3462,
15,
16,
3462,
15,
17,
3462,
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... | 4 |
#[test]
fn test_bad_kernel_endian() {
// Only little endian is supported.
let gm = create_guest_mem();
let mut bad_image = make_test_bin();
bad_image[0x5] = 2;
assert_eq!(
Err(Error::BigEndianElfOnLittle),
load_kernel(&gm, &mut Cursor::new(&bad_ima... | rust_cleaned_test_functions.jsonl/88247 | {
"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,
34199,
26876,
87193,
368,
341,
286,
442,
8278,
2632,
64688,
374,
7248,
624,
286,
1077,
37879,
284,
1855,
62739,
12976,
543,
286,
1077,
5206,
3873,
4954,
284,
1281,
4452,
21816,
543,
286,
3873,
495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keywords_after_if() {
check(
r#"fn quux() { if true { () } <|> }"#,
expect![[r#"
kw fn
kw use
kw impl
kw trait
kw match
kw while
kw loop
... | rust_cleaned_test_functions.jsonl/126829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
19844,
11119,
368,
341,
286,
1779,
1006,
310,
435,
55543,
8822,
922,
2200,
368,
314,
421,
830,
314,
1719,
335,
82639,
29,
335,
57676,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
29525,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fail_construction() {
const SAMPLE_SIZE: usize = 1_000;
let mut rng = rand::thread_rng();
let keys: Vec<u64> = (0..SAMPLE_SIZE).map(|_| rng.gen()).collect();
let filter = Fuse32::try_from(&keys);
assert!(filter.expect_err("") == "Failed to construct fuse ... | rust_cleaned_test_functions.jsonl/32214 | {
"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,
22121,
3382,
3024,
368,
341,
286,
733,
62420,
4098,
25,
22301,
284,
220,
16,
62,
15,
15,
15,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
6894,
25,
11312,
34837,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nan() {
let vec = to_vec(&::std::f32::NAN).unwrap();
assert_eq!(vec, b"\xf9\x7e\x00");
} | rust_cleaned_test_functions.jsonl/110269 | {
"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,
73936,
368,
341,
262,
1077,
7486,
284,
311,
13251,
2099,
486,
1834,
486,
69,
18,
17,
486,
45,
1093,
568,
15454,
543,
262,
2060,
10714,
10297,
4083,
11,
293,
11934,
5848,
24,
3462,
22,
68,
3462... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_indicators() -> Result<(), DbError> {
let db = Db::download(false)?;
test_indicator(&db, "Dryad Arbor", ColorSet::green());
test_indicator(&db, "Nicol Bolas, the Arisen", ColorSet::grixis());
test_indicator(&db, "Transguild Courier", ColorSet::rainbow());
... | rust_cleaned_test_functions.jsonl/118259 | {
"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,
9122,
42052,
368,
1464,
5714,
68843,
11988,
1454,
29,
341,
286,
1077,
2927,
284,
11988,
486,
12885,
3576,
40007,
286,
1273,
58070,
2099,
1999,
11,
330,
85215,
329,
64539,
497,
3478,
1649,
486,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pathops_concat_cur() {
let actual = Path::new("foo/././..").as_os_str();
let expected = ffi::OsStr::new("foo/././..");
assert_eq!(actual, expected);
let actual = PathBuf::from("././foo/././..")
.concat("../bar")
... | rust_cleaned_test_functions.jsonl/14053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
3721,
57478,
18956,
368,
341,
3374,
310,
1077,
5042,
284,
7933,
486,
931,
445,
7975,
14,
1725,
1725,
496,
1827,
300,
29387,
2895,
543,
310,
1077,
3601,
284,
76956,
486,
28867,
2580,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitpacker() {
test_bitpacker_util(10, 3);
test_bitpacker_util(10, 0);
test_bitpacker_util(10, 1);
test_bitpacker_util(6, 14);
test_bitpacker_util(1000, 14);
} | rust_cleaned_test_functions.jsonl/103584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
4748,
261,
368,
341,
286,
1273,
13996,
4748,
261,
18974,
7,
16,
15,
11,
220,
18,
317,
286,
1273,
13996,
4748,
261,
18974,
7,
16,
15,
11,
220,
15,
317,
286,
1273,
13996,
4748,
261,
189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consis_sharding() {
let servers = vec![
"10.73.63.195:15010",
"10.13.192.12:15010",
"10.73.63.190:15010",
"10.73.63.188:15010",
"10.73.63.187:15010",
];
let servers = servers.iter().map(|s| s.to_string()).collect... | rust_cleaned_test_functions.jsonl/88872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
14406,
3712,
28410,
368,
341,
286,
1077,
16293,
284,
7486,
90515,
310,
330,
16,
15,
13,
22,
18,
13,
21,
18,
13,
16,
24,
20,
25,
16,
20,
15,
16,
15,
756,
310,
330,
16,
15,
13,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_create_credential_invalid_price() {
init!("true");
settings::set_config_value(settings::CONFIG_INSTITUTION_DID, DEFAULT_DID);
let cb = return_types_u32::Return_U32_U32::new().unwrap();
assert_eq!(vcx_issuer_create_credential(cb.command_handle,
... | rust_cleaned_test_functions.jsonl/66777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 631
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
666,
30320,
31433,
9040,
368,
341,
286,
2930,
17223,
1866,
797,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
2158,
25765,
28617,
1557,
915,
11,
11955,
1557,
915,
317,
286,
1077,
9858,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum_with_funcs() {
let cxx = indoc! {"
Bob give_bob() {
return Bob::BOB_VALUE_2;
}
"};
let hdr = indoc! {"
#include <cstdint>
enum Bob {
BOB_VALUE_1,
BOB_VALUE_2,
};
Bob give_bob();
"};
let r... | rust_cleaned_test_functions.jsonl/9753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
6615,
64124,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
14261,
2968,
880,
674,
368,
341,
310,
470,
14261,
486,
4677,
33,
7476,
62,
17,
280,
286,
456,
262,
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_add_f64() {
assert_eq!(
Vec3::new(1.0, 0.0, -1.0) + 233.0,
Vec3::new(234.0, 233.0, 232.0)
)
} | rust_cleaned_test_functions.jsonl/35218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
761,
21,
19,
368,
341,
286,
2060,
10714,
33673,
310,
11312,
18,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
11,
481,
16,
13,
15,
8,
488,
220,
17,
18,
18,
13,
15,
345,
310,
1131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shrink_to_fit() {
let mut builder = Utf8ChunkedBuilder::new("foo", 2048, 100 * 2048);
builder.append_value("foo");
let mut arr = builder.finish();
let before = arr
.chunks()
.iter()
.map(|arr| arrow::compute::aggregate::estimate... | rust_cleaned_test_functions.jsonl/15559 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
34365,
2346,
32416,
368,
341,
286,
1077,
5206,
7363,
284,
43432,
23,
28304,
291,
3297,
486,
931,
445,
7975,
497,
220,
17,
15,
19,
23,
11,
220,
16,
15,
15,
353,
220,
17,
15,
19,
23,
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_katakana_rev() {
let full = "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン";
let half = "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワン";
for (f, h) in full.chars().zip(half.chars()) {
assert_eq!(to_halfwidth(f).unwrap(), h);
}
} | rust_cleaned_test_functions.jsonl/101417 | {
"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,
4698,
68728,
3362,
38082,
368,
341,
262,
1077,
2480,
284,
330,
127000,
64199,
75639,
89862,
70393,
61803,
28120,
124539,
46160,
59768,
56107,
21660,
63710,
124867,
46207,
77359,
124788,
56833,
19674,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_solution() {
assert_eq!(Solution::odd_even_jumps(vec![10, 13, 12, 14, 15]), 2);
assert_eq!(Solution::odd_even_jumps(vec![2, 3, 1, 1, 4]), 3);
assert_eq!(Solution::odd_even_jumps(vec![5, 1, 3, 4, 2]), 3);
assert_eq!(Solution::odd_even_jumps(vec![1, 2, 3, 2, 1, 4, 4... | rust_cleaned_test_functions.jsonl/92223 | {
"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,
50274,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
14556,
68347,
5374,
11793,
25592,
20703,
16,
15,
11,
220,
16,
18,
11,
220,
16,
17,
11,
220,
16,
19,
11,
220,
16,
20,
9719,
220,
17,
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_bgra16() {
// Test encoding an RGBA 16-bit image.
let mut encoded = Vec::new();
let max = std::u16::MAX;
let image: ImageBuffer<Bgra<u16>, _> = ImageBuffer::from_raw(
1, 1, vec![0, max / 2, max, max]).unwrap();
let mut encoder = JpegEn... | rust_cleaned_test_functions.jsonl/4288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
31950,
16,
21,
368,
341,
286,
442,
3393,
11170,
458,
79954,
220,
16,
21,
15257,
2168,
624,
1789,
286,
1077,
5206,
20498,
284,
11312,
486,
931,
543,
286,
1077,
1932,
284,
1460,
486,
84,
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_box_direct() {
let s: Box<str> = "Hello world!".into();
let _s: &[&dyn ToSql] = crate::params![s];
let r = ToSql::to_sql(&s);
assert!(r.is_ok());
} | rust_cleaned_test_functions.jsonl/124017 | {
"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,
10194,
32871,
368,
341,
286,
1077,
274,
25,
8261,
27,
495,
29,
284,
330,
9707,
1879,
92993,
18122,
543,
286,
1077,
716,
82,
25,
44590,
5,
43085,
2014,
8269,
60,
284,
17717,
486,
3519,
20703,
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_vec_skip_error() {
use serde_with::VecSkipError;
#[serde_as]
#[derive(Debug, PartialEq, Deserialize, Serialize)]
struct S {
tag: String,
#[serde_as(as = "VecSkipError<_>")]
values: Vec<u8>,
}
check_deserialization(
S {
tag: "t... | rust_cleaned_test_functions.jsonl/117223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
44830,
4096,
368,
341,
262,
990,
61570,
6615,
486,
10050,
35134,
1454,
401,
262,
11506,
47024,
11898,
921,
262,
11506,
27098,
42618,
11,
55039,
11,
48440,
11,
39900,
5563,
262,
2036,
328,
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_purge_transaction_status() {
let blockstore_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&blockstore_path).unwrap();
let transaction_status_index_cf = blockstore.db.column::<cf::TransactionStatusIndex>();
let slot = 10;
... | rust_cleaned_test_functions.jsonl/38763 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
28884,
4773,
368,
341,
286,
1077,
2504,
4314,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
4574,
4314,
2638,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_construct_coord() {
assert!(Coord::new(90.0, 180.0).is_ok());
assert!(Coord::new(91.0, 180.0).is_err());
assert!(Coord::new(90.0, 181.0).is_err());
assert!(Coord::new(91.0, 181.0).is_err());
} | rust_cleaned_test_functions.jsonl/75482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
30096,
368,
341,
286,
2060,
10297,
19437,
486,
931,
7,
24,
15,
13,
15,
11,
220,
16,
23,
15,
13,
15,
568,
285,
19817,
1423,
286,
2060,
10297,
19437,
486,
931,
7,
24,
16,
13,
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_eval_restore_havent_saved_initial_context() {
let cie = make_test_cie();
let ctx = UnwindContext::new();
let expected = ctx.clone();
let instructions = [(
Err(Error::CfiInstructionInInvalidContext),
CallFrameInstruction::Restore {
... | rust_cleaned_test_functions.jsonl/9363 | {
"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,
21296,
62677,
1523,
402,
306,
53709,
15809,
8467,
368,
341,
286,
1077,
272,
645,
284,
1281,
4452,
666,
645,
543,
286,
1077,
5635,
284,
1230,
19154,
1972,
486,
931,
543,
286,
1077,
3601,
284,
563... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fold_useless_for() {
test("for(;false;) { foo() }", "");
test("for(;void 0;) { foo() }", "");
test("for(;undefined;) { foo() }", "");
test("for(;true;) foo() ", "for(;;) foo() ");
test_same("for(;;) foo()");
test("for(;false;) { var a = 0; }", "var a");
test("for(;fal... | rust_cleaned_test_functions.jsonl/377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
15951,
1717,
5478,
368,
341,
262,
1273,
445,
1958,
54924,
3849,
36174,
314,
15229,
368,
335,
497,
14498,
262,
1273,
445,
1958,
54924,
1004,
220,
15,
36174,
314,
15229,
368,
335,
497,
14498,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_update_localreader_after_removed() {
let mut cluster = new_node_cluster(0, 6);
let pd_client = cluster.pd_client.clone();
// Disable default max peer number check.
pd_client.disable_default_operator();
let r1 = cluster.run_conf_change();
// Add 4 peers.
for i in... | rust_cleaned_test_functions.jsonl/39364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
8882,
13564,
11149,
19844,
68248,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
21,
317,
262,
1077,
7744,
8179,
284,
10652,
556,
67,
8179,
15997,
543,
262,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shift() {
let ca = Int32Chunked::new_from_slice("", &[1, 2, 3]);
let shifted = ca.shift(1, &Some(0)).unwrap();
assert_eq!(shifted.cont_slice().unwrap(), &[0, 1, 2]);
let shifted = ca.shift(1, &None).unwrap();
assert_eq!(Vec::from(&shifted), &[None, Some(1)... | rust_cleaned_test_functions.jsonl/104926 | {
"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,
22230,
368,
341,
286,
1077,
2162,
284,
1333,
18,
17,
28304,
291,
486,
931,
5673,
26488,
19814,
44590,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
1077,
28973,
284,
2162,
29154,
7,
16,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_changed_truncation_symbol() -> io::Result<()> {
test_truncate_length_with_config(
"1337_hello_world",
15,
"1337_hello_worl",
"%",
"truncation_symbol = \"%\"",
)
} | rust_cleaned_test_functions.jsonl/106748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25213,
3547,
1347,
367,
21179,
368,
1464,
6399,
486,
2077,
71698,
341,
262,
1273,
3547,
26900,
5118,
6615,
5332,
1006,
286,
330,
16,
18,
18,
22,
96724,
31792,
756,
286,
220,
16,
20,
345,
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_create_vcpus() {
let vcpu_count = 2;
let guest_memory = create_guest_memory(128).unwrap();
#[allow(unused_mut)]
let mut vm = setup_kvm_vm(&guest_memory, false).unwrap();
let evfd = EventFd::new(libc::EFD_NONBLOCK).unwrap();
#[cfg(target_arch = "x... | rust_cleaned_test_functions.jsonl/117081 | {
"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,
8657,
2273,
4672,
355,
368,
341,
286,
1077,
348,
16475,
3180,
284,
220,
17,
280,
286,
1077,
8640,
19195,
284,
1855,
62739,
19195,
7,
16,
17,
23,
568,
15454,
1428,
286,
11506,
7183,
18364,
2591,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let alphabet = Builder::new()
.with_digits()
.with_uc_letters()
.with_lc_letters()
.with_uc_umlauts()
.with_lc_umlauts()
.with_common_special_chars()
.with_all_other_special_chars()
... | rust_cleaned_test_functions.jsonl/25968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
368,
341,
286,
1077,
27790,
284,
20626,
486,
931,
741,
310,
659,
4197,
41432,
741,
310,
659,
4197,
68887,
67330,
741,
310,
659,
4197,
93057,
67330,
741,
310,
659,
4197,
68887,
62,
42231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nested_dot_lookup() -> TestResult {
let p = Polar::new();
p.load_str(
r#"f(x, y) if x = y.a.b.c;
f(x, y) if x > y.a.b.c and x < y.a.b and y.a.b.c > x;
f(x, y) if x = y.a;
f(x, y) if x = y.a.b;
f(x, y) if x = ... | rust_cleaned_test_functions.jsonl/63041 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
30941,
27464,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
1006,
310,
435,
55543,
69,
2075,
11,
379,
8,
421,
856,
284,
379,
5849,
948,
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... | 9 |
#[test]
fn test_err_swap_no_memory() {
let tmp =
create_temp_dir("test_err_swap_no_memory_v2").expect("create temp directory for test");
set_fixture(&tmp, CGROUP_MEMORY_MAX, "0").expect("set fixture for memory limit");
set_fixture(&tmp, CGROUP_MEMORY_LOW, "0").expect("set fix... | rust_cleaned_test_functions.jsonl/79408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9266,
40991,
6536,
19195,
368,
341,
286,
1077,
4174,
4035,
310,
1855,
11771,
4334,
445,
1944,
9266,
40991,
6536,
19195,
2273,
17,
1827,
17119,
445,
3182,
2730,
6220,
369,
1273,
797,
286,
738,
7440... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_defaults() {
let null = Config::default();
let defaulted = Config::from_defaults();
let mut actual = null;
actual.update(&defaulted);
assert_eq!(actual, defaulted);
} | rust_cleaned_test_functions.jsonl/4426 | {
"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,
8882,
5673,
42290,
368,
341,
286,
1077,
845,
284,
5532,
486,
2258,
543,
286,
1077,
92989,
284,
5532,
486,
1499,
42290,
1428,
286,
1077,
5206,
5042,
284,
845,
280,
286,
5042,
5317,
2099,
2258,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_error_sources_1() {
let err = ParentError::Nested(ChildError::Error1);
let result = err.into_call_result();
match result {
CallResult::Failed {
module,
code,
message: _,
} => {
assert... | rust_cleaned_test_functions.jsonl/44656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 517
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
52896,
62,
16,
368,
341,
286,
1077,
1848,
284,
17022,
1454,
486,
71986,
7,
3652,
1454,
486,
1454,
16,
317,
286,
1077,
1102,
284,
1848,
39860,
13429,
5287,
1428,
286,
2432,
1102,
341,
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_legal_moves_banmen_with_kei_nari_7_squares_gote() {
test_legal_moves_banmen_with_kin_7_squares_gote_impl(GKeiN)
} | rust_cleaned_test_functions.jsonl/81289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
45476,
72,
1089,
2780,
62,
22,
643,
40856,
1889,
1272,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
1889,
1272,
21007,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_preferred() {
assert_preference!("text/*", "text/*");
assert_preference!("text/*, text/html", "text/html");
assert_preference!("text/*; q=0.1, text/html", "text/html");
assert_preference!("text/*; q=1, text/html", "text/html");
assert_preference!("text/htm... | rust_cleaned_test_functions.jsonl/19938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 904
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
5554,
368,
341,
286,
2060,
92718,
17223,
1318,
1057,
497,
330,
1318,
1057,
797,
286,
2060,
92718,
17223,
1318,
1057,
11,
1467,
13739,
497,
330,
1318,
13739,
797,
286,
2060,
92718,
17223,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.