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_is_diagnosable() {
let mut document_cache = DocumentCache::default();
let specifier = resolve_url("file:///a/file.ts").unwrap();
assert!(!document_cache.is_diagnosable(&specifier));
document_cache.open(
specifier.clone(),
1,
LanguageId::TypeScript,
"consol... | rust_cleaned_test_functions.jsonl/56716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
29477,
3246,
436,
480,
368,
341,
262,
1077,
5206,
2197,
11529,
284,
11789,
8233,
486,
2258,
543,
262,
1077,
97616,
284,
8830,
2903,
445,
1192,
60896,
64,
23903,
21288,
1827,
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_insert_into_inline_table() {
given(r#"
a = {a=2, c = 3}
b = {}"#
).running(|root| {
{
let a = root.entry("a");
let a = as_inline_table!(a);
assert_eq!(a.len(), 2);
assert!(a.contains_key("a") && a.get("c").is_some()... | rust_cleaned_test_functions.jsonl/36887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
45514,
41871,
5237,
368,
341,
262,
2661,
2601,
2,
698,
286,
264,
284,
314,
64,
28,
17,
11,
220,
272,
284,
220,
18,
532,
286,
293,
284,
4687,
1,
4956,
262,
7457,
27173,
22428,
2888,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_output_csv() {
let resource_input = "./resources/testing/valid_assessments.csv";
let tmp_file = assert_fs::NamedTempFile::new("outfile.csv").unwrap();
let export = Export {
from: resource_input.into(),
to: tmp_file.path().into(),
forma... | rust_cleaned_test_functions.jsonl/96734 | {
"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,
7645,
14020,
368,
341,
286,
1077,
5101,
5898,
284,
5924,
12745,
28801,
14,
1891,
12083,
433,
1368,
11219,
876,
286,
1077,
4174,
2458,
284,
2060,
34470,
486,
15810,
12151,
1703,
486,
931,
445,
5962... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_mut() {
let mut point = Point3::new(1.0, -4.0, 12.0);
point[0] *= 2.0;
point[1] /= -2.0;
point[2] -= 2.0;
assert_approx_eq!(point[0], 2.0);
assert_approx_eq!(point[1], 2.0);
assert_approx_eq!(point[2], 10.0);
} | rust_cleaned_test_functions.jsonl/131711 | {
"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,
3560,
29523,
368,
341,
286,
1077,
5206,
1459,
284,
5126,
18,
486,
931,
7,
16,
13,
15,
11,
481,
19,
13,
15,
11,
220,
16,
17,
13,
15,
626,
286,
1459,
58,
15,
60,
11404,
220,
17,
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... | 1 |
#[test]
fn test_no_panic_on_format_snippet_and_format_code_block() {
// even when we cannot parse the given snippet.
let snippet = "let";
assert!(format_snippet(snippet, &Config::default()).is_none());
assert!(format_code_block(snippet, &Config::default()).is_none());
... | rust_cleaned_test_functions.jsonl/18556 | {
"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,
6536,
620,
31270,
4470,
8955,
28022,
21581,
8378,
8955,
4136,
7113,
368,
341,
1789,
286,
442,
1496,
979,
582,
4157,
4715,
279,
2661,
43065,
624,
286,
1077,
43065,
284,
330,
1149,
876,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_call_expression_two_args() {
assert_expression!(
"CheckProperty(42, \"age\")",
Expression::func(
"CheckProperty",
vec![42.as_lit_expr(1, 21), "age".as_lit_expr(1, 25)]
)
);
... | rust_cleaned_test_functions.jsonl/102647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
13429,
28068,
23241,
8384,
368,
341,
310,
2060,
28068,
33673,
394,
330,
3973,
3052,
7,
19,
17,
11,
7245,
424,
62705,
756,
394,
16378,
486,
2830,
1006,
503,
330,
3973,
3052,
756,
503,
7486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_pattern_hashtag_list_inside_tuple()
{
let mut t = Inferator::new("burritos");
let tvar =
Type::Tuple(Struple(vec![(None, Type::Var(Lstr::Sref("Taco")))]));
let ilistpatt = list::cons(
Val::Hashtag(Lstr::Sref("leema")),
Val::Id... | rust_cleaned_test_functions.jsonl/15075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
21260,
21778,
34311,
2019,
72860,
21773,
741,
262,
341,
286,
1077,
5206,
259,
284,
62658,
850,
486,
931,
445,
11240,
94012,
797,
286,
1077,
259,
947,
4035,
310,
3990,
486,
28681,
92084,
606... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty() {
let rpc_predicate = RPCPredicate { root: None };
let res = PredicateBuilder::default().rpc_predicate(Some(rpc_predicate));
let expected_error = "Unexpected empty predicate: Node";
let actual_error = res.unwrap_err().to_string();
... | rust_cleaned_test_functions.jsonl/79152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
97474,
15124,
368,
341,
286,
1077,
35596,
97474,
284,
34008,
36329,
314,
3704,
25,
2240,
3634,
286,
1077,
592,
284,
49827,
3297,
486,
2258,
1005,
29414,
97474,
65405,
2601,
3992,
97474,
3237,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_address_hash_scriptsig() {
let raw_tx = "0100000001c15041a06deb6b3818b022fac558da4ce2097f0860c8f642105bbad9d29be02a010000006c493046022100cfd2a2d332b29adce119c55a9fadd3c073332024b7e272513e51623ca15993480221009b482d7f7b4d479aff62bdcdaea54667737d56f8d4d63dd03ec3ef651ed9a25401210325f... | rust_cleaned_test_functions.jsonl/132199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
6744,
8950,
14660,
21339,
368,
341,
286,
1077,
7112,
17805,
284,
330,
15,
16,
15,
15,
15,
15,
15,
15,
15,
16,
66,
16,
20,
15,
19,
16,
64,
15,
21,
37935,
21,
65,
18,
23,
16,
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_collect_accounts() {
let keypair0 = Keypair::new();
let keypair1 = Keypair::new();
let pubkey = Pubkey::new_rand();
let instructions = vec![CompiledInstruction::new(2, &(), vec![0, 1])];
let message = Message::new_with_compiled_instructions(
1... | rust_cleaned_test_functions.jsonl/104356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
55665,
368,
341,
286,
1077,
1376,
12670,
15,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1376,
12670,
16,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
95116,
284,
22611,
792,
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_is_normal() {
let a = Complex::new(0f64, f64::NAN);
let b = Complex::new(2f64, f64::INFINITY);
assert!(!a.is_normal());
assert!(!b.is_normal());
assert!(_1_1i.is_normal());
} | rust_cleaned_test_functions.jsonl/105668 | {
"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,
6892,
13973,
368,
341,
286,
1077,
264,
284,
22096,
486,
931,
7,
15,
69,
21,
19,
11,
282,
21,
19,
486,
45,
1093,
317,
286,
1077,
293,
284,
22096,
486,
931,
7,
17,
69,
21,
19,
11,
282,
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... | 1 |
#[test]
fn test_consensus_serialization() {
let example_key = TendermintKey::ConsensusKey(
PublicKey::from_raw_ed25519(&hex::decode_upper(EXAMPLE_CONSENSUS_KEY).unwrap())
.unwrap(),
);
assert_eq!(
example_key.to_bech32("cosmosvalconspub"),... | rust_cleaned_test_functions.jsonl/31558 | {
"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,
31971,
13626,
25602,
2022,
368,
341,
286,
1077,
3110,
3097,
284,
93867,
67791,
1592,
486,
15220,
13626,
1592,
1006,
310,
70280,
486,
1499,
16067,
32370,
17,
20,
20,
16,
24,
2099,
17308,
486,
18196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part1() {
let input = include_str!("../tests.txt");
let (numbers, mut boards) = crate::parse(input);
assert_eq!(4512, part1(&numbers, &mut boards));
} | rust_cleaned_test_functions.jsonl/3402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
1077,
1946,
284,
2924,
2895,
17223,
1244,
23841,
3909,
797,
286,
1077,
320,
37378,
11,
5206,
20490,
8,
284,
17717,
486,
6400,
5384,
626,
286,
2060,
10714,
10297,
19,
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 |
#[test]
fn test_partition_checkpoint() {
let pckpt = part_ckpt!("table_1", "partition_1", {1 => (10, 20), 2 => (5, 15)});
assert_eq!(pckpt.table_name(), "table_1");
assert_eq!(pckpt.partition_key(), "partition_1");
assert_eq!(
pckpt.sequencer_numbers(1).unwrap(),
... | rust_cleaned_test_functions.jsonl/6750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43840,
55208,
368,
341,
286,
1077,
281,
68175,
284,
949,
62,
68175,
17223,
2005,
62,
16,
497,
330,
40998,
62,
16,
497,
314,
16,
589,
320,
16,
15,
11,
220,
17,
15,
701,
220,
17,
589,
320,
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_poh_recorder_reset_clears_cache() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_ge... | rust_cleaned_test_functions.jsonl/106260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
7080,
1358,
18983,
21811,
82,
11529,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
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_chain_handler_error() {
test_chain(
// Error in handler
(vec![Fine, Fine, Fine], Prob, vec![Prob, Prob, Prob]),
(vec![Fine, Fine, Fine], Fine, vec![Prob, Prob, Prob]),
);
} | rust_cleaned_test_functions.jsonl/39005 | {
"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,
30583,
10183,
4096,
368,
341,
262,
1273,
30583,
1006,
286,
442,
4600,
304,
7013,
198,
286,
320,
4083,
20703,
63716,
11,
30153,
11,
30153,
1125,
25627,
11,
7486,
20703,
36980,
11,
25627,
11,
25627,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mount_fs_type_from_file() {
#[derive(Debug)]
struct TestData<'a> {
// Create file with the specified contents
contents: &'a str,
mount_point: &'a str,
// else assume no error.
error_contain... | rust_cleaned_test_functions.jsonl/32169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1891
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
57593,
34470,
1819,
5673,
2458,
368,
341,
286,
11506,
27098,
42618,
5563,
286,
2036,
93200,
18291,
64,
29,
341,
310,
442,
4230,
1034,
448,
279,
5189,
8794,
18574,
310,
8794,
25,
30136,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_download_sst_with_key_rewrite_ts_default() {
// performs the download.
let importer_dir = tempfile::tempdir().unwrap();
let importer = SSTImporter::new(&importer_dir, None).unwrap();
// creates a sample SST file.
let (_ext_sst_dir, backend, meta) = create... | rust_cleaned_test_functions.jsonl/4964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35939,
643,
267,
6615,
3097,
74052,
25023,
9993,
368,
341,
286,
442,
26674,
279,
4139,
624,
286,
1077,
62561,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
62561,
284,
91416,
772... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_result_from_ffi_result_ok() {
let ffi_res = FfiResult::Ok(util::into_raw(123));
let res = Fallible::from(ffi_res);
assert_eq!(res, Ok(123));
} | rust_cleaned_test_functions.jsonl/31442 | {
"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,
5287,
5673,
62,
53799,
5287,
19817,
368,
341,
286,
1077,
76956,
4918,
284,
434,
9983,
2077,
486,
11578,
67811,
486,
18122,
16067,
7,
16,
17,
18,
1106,
286,
1077,
592,
284,
14785,
1238,
486,
1499... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_const_evaluator_now() {
let ts_nanos = 1599566400000000000i64;
let time = chrono::Utc.timestamp_nanos(ts_nanos);
let ts_string = "2020-09-08T12:05:00+00:00";
test_evaluate_with_start_time(now_expr(), lit_timestamp_nano(ts_nanos), &time);
... | rust_cleaned_test_functions.jsonl/19691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13610,
21296,
45162,
20813,
368,
341,
286,
1077,
10591,
1089,
43605,
284,
220,
16,
20,
24,
24,
20,
21,
21,
19,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
72,
21,
19,
280,
286,
1077,
882... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submodule_contains_untracked_content() {
let config = integration_test_utils::make_config_from_args(&[]);
let output =
integration_test_utils::run_delta(SUBMODULE_CONTAINS_UNTRACKED_CONTENT_INPUT, &config);
let output = strip_ansi_codes(&output);
asser... | rust_cleaned_test_functions.jsonl/70050 | {
"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,
5228,
4352,
63598,
4907,
58381,
7495,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
56703,
286,
1077,
2550,
4035,
310,
17590,
4452,
17309,
486,
6108,
26710,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_touch_set_date() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "test_touch_set_date";
ucmd.args(&["-d", "Thu Jan 01 12:34:00 2015", file])
.succeeds()
.no_stderr();
assert!(at.file_exists(file));
let start_of_year = str_to_filetime("%Y%m%d%H%M", "201501... | rust_cleaned_test_functions.jsonl/41032 | {
"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,
60840,
2602,
4164,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
284,
330,
1944,
60840,
2602,
4164,
3302,
262,
575,
8710,
16365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skip_var_octet_string() {
let tests: &[(Vec<u8>, usize)] = &[
(ZERO_LENGTH_VARSTR.clone(), 1),
(ONE_BYTE_VARSTR.clone(), 2),
(TWO_BYTE_VARSTR.clone(), 3),
(SIZE_128_VARSTR.clone(), SIZE_128_VARSTR.len()),
(SIZE_5678_VARSTR.clone... | rust_cleaned_test_functions.jsonl/14911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 537
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
4612,
70135,
295,
3904,
368,
341,
286,
1077,
7032,
25,
609,
9697,
10050,
34837,
23,
8066,
22301,
7252,
284,
609,
9640,
310,
320,
73956,
15023,
25750,
6666,
15997,
1507,
220,
16,
1326,
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_base_url() {
let url = Gravatar::new("email@example.com").image_url();
assert_eq!(
url.as_str(),
"https://secure.gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e"
);
} | rust_cleaned_test_functions.jsonl/61375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7651,
2903,
368,
341,
262,
1077,
2515,
284,
2825,
11962,
486,
931,
445,
2332,
35487,
905,
1827,
1805,
2903,
543,
262,
2060,
10714,
33673,
286,
2515,
5357,
2895,
3148,
286,
330,
2428,
1110,
25132,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signature_unsubscribe() {
let GenesisConfigInfo {
genesis_config,
mint_keypair: alice,
..
} = create_genesis_config(10_000);
let bob_pubkey = Pubkey::new_rand();
let bank = Bank::new(&genesis_config);
let blockhash = ban... | rust_cleaned_test_functions.jsonl/16577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
4907,
9384,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
25,
70433,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
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_value() {
let mut mock = Mock::default();
let mut ctx = mock.create_ctx();
let x = ctx.value::<u64>("module.TestKey").get();
assert_eq!(x, None);
ctx.value::<u64>("module.TestKey").set(42);
let y = ctx.value::<u64>("module.TestKey").get();
... | rust_cleaned_test_functions.jsonl/105375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
368,
341,
286,
1077,
5206,
7860,
284,
14563,
486,
2258,
543,
286,
1077,
5206,
5635,
284,
7860,
2520,
15147,
1428,
286,
1077,
856,
284,
5635,
2824,
27638,
84,
21,
19,
13211,
4352,
8787,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_event_time_format() {
let timespec = Timespec::new(1494245571, 0);
let time = time::at(timespec);
let event_time = EventTime::new(time);
let mut buf = vec![];
let _ = event_time
.serialize(&mut Serializer::new(&mut buf))
.unwrap();
... | rust_cleaned_test_functions.jsonl/50367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6748,
3009,
8955,
368,
341,
286,
1077,
71156,
284,
8523,
992,
486,
931,
7,
16,
19,
24,
19,
17,
19,
20,
20,
22,
16,
11,
220,
15,
317,
286,
1077,
882,
284,
882,
486,
266,
61118,
992,
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_version_parse() {
use super::Component::*;
assert_eq!(Version("v0.4.1-28-gfba00d7")
.components().collect::<Vec<_>>(),
[Numeric(0), Numeric(4), Numeric(1),
Numeric(28), String("gfba00d7")]);
assert_eq!(Version("v0.4.1+trusty1")
... | rust_cleaned_test_functions.jsonl/15850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
21039,
368,
341,
286,
990,
2256,
486,
2189,
56162,
286,
2060,
10714,
10297,
5637,
445,
85,
15,
13,
19,
13,
16,
12,
17,
23,
2371,
69,
4645,
15,
15,
67,
22,
1138,
310,
659,
5149,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_addr_iter_single() {
let localhost = SocketAddr::from((IpAddr::from(Ipv4Addr::LOCALHOST), 8080));
let mut iter = AddrsIter::One(localhost);
assert_eq!(iter.next(), Some(localhost));
assert_eq!(iter.next(), None);
let mut iter = AddrsIter::None;
a... | rust_cleaned_test_functions.jsonl/32859 | {
"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,
7387,
11723,
19487,
368,
341,
286,
1077,
47422,
284,
20954,
13986,
486,
1499,
1188,
23378,
13986,
486,
1499,
8972,
30168,
19,
13986,
486,
39081,
28687,
701,
220,
23,
15,
23,
15,
3237,
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_normal_ops() {
let mut vm: VimMachine<KeyEvent> = VimMachine::default();
let mut ctx = VimContext::default();
let mov = mv!(MoveType::WordBegin(WordStyle::Little, MoveDir1D::Next));
ctx.action.operation = EditAction::Yank;
vm.input_key(key!('y'));
... | rust_cleaned_test_functions.jsonl/74572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2050
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13973,
21959,
368,
341,
286,
1077,
5206,
10995,
25,
94484,
21605,
42003,
1556,
29,
284,
94484,
21605,
486,
2258,
543,
286,
1077,
5206,
5635,
284,
94484,
1972,
486,
2258,
1428,
286,
1077,
1974,
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_header_serialised_length() {
let nonce = vec![1,2,3,4,5];
let salt = _get_test_salt();
let header = Header::new(1, "TEST_ENCRYPTION_METHOD", &nonce, salt);
let serialised_header = header.serialise().unwrap();
assert_eq!(serialised_header.len(), 2 + 12 + 2... | rust_cleaned_test_functions.jsonl/106122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8757,
25602,
4056,
5118,
368,
341,
286,
1077,
39676,
284,
7486,
20703,
16,
11,
17,
11,
18,
11,
19,
11,
20,
935,
286,
1077,
12021,
284,
716,
455,
4452,
92280,
543,
286,
1077,
4247,
284,
12104,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tracee_died() -> Result<()> {
let cmd = Command::new("true");
let mut tracer = Ptracer::new();
let mut child = tracer.spawn(cmd)?;
let mut died = false;
while let Some(tracee) = tracer.wait()? {
child.kill()?;
if let Err(err) = tracer.restart(trac... | rust_cleaned_test_functions.jsonl/92935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23575,
68,
814,
1122,
368,
1464,
5714,
71698,
341,
262,
1077,
5439,
284,
7348,
486,
931,
445,
1866,
3071,
262,
1077,
5206,
64306,
284,
46409,
9584,
486,
931,
543,
262,
1077,
5206,
1682,
284,
643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_bounds_new_valid() {
let b = Bounds::new(-2.0, 2.0);
assert_eq!(b.a, -2.0);
assert_eq!(b.b, 2.0);
let b = Bounds::new(2.0, 2.0);
assert_eq!(b.a, 2.0);
assert_eq!(b.b, 2.0);
} | rust_cleaned_test_functions.jsonl/7148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36878,
5921,
8337,
368,
341,
286,
1077,
293,
284,
69130,
486,
931,
4080,
17,
13,
15,
11,
220,
17,
13,
15,
317,
286,
2060,
10714,
10297,
65,
5849,
11,
481,
17,
13,
15,
317,
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_ecdsa_adaptor_signature_encrypt_no_aux_rand() {
test_ecdsa_adaptor_signature_helper(|msg, sk, adaptor, _| {
EcdsaAdaptorSignature::encrypt_no_aux_rand(&SECP256K1, msg, sk, adaptor)
})
} | rust_cleaned_test_functions.jsonl/62233 | {
"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,
36844,
96780,
10027,
32657,
39859,
66593,
6536,
30468,
33864,
368,
341,
286,
1273,
36844,
96780,
10027,
32657,
39859,
10418,
22428,
3236,
11,
1901,
11,
91941,
11,
85137,
341,
310,
468,
4385,
9081,
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_decode() {
assert_eq!("a,c", DictionaryBuilder::decode("a\\u002cc"));
assert_eq!("a,c", DictionaryBuilder::decode("a\\u{002c}c"));
assert_eq!("a𠮟c", DictionaryBuilder::decode("a\\u{20b9f}c"));
} | rust_cleaned_test_functions.jsonl/134076 | {
"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,
15227,
368,
341,
262,
2060,
10714,
17223,
64,
10109,
497,
10466,
3297,
486,
18196,
445,
64,
3422,
84,
15,
15,
17,
638,
4010,
262,
2060,
10714,
17223,
64,
10109,
497,
10466,
3297,
486,
18196,
445... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_projects() {
let file_name: &str = "data/projects_test.txt";
remove_file(file_name.to_string());
let mut all_projects = fetch_all_projects(file_name.to_string(), &String::new());
println!("{:#?}", all_projects);
let test_project = Project::create(
&mut all_projects,... | rust_cleaned_test_functions.jsonl/50011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1640
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58774,
368,
341,
262,
1077,
1034,
1269,
25,
609,
495,
284,
330,
691,
39606,
4452,
3909,
876,
262,
4057,
2458,
4866,
1269,
2389,
3904,
5231,
262,
1077,
5206,
678,
58774,
284,
7807,
5705,
58774,
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_string_to_pattern_untagged_value() {
let a_pattern = r"[a-zA-Z0-9 ]";
assert_eq!(
a_pattern.to_pattern_untagged_value(),
UntaggedValue::glob_pattern(a_pattern)
);
} | rust_cleaned_test_functions.jsonl/124320 | {
"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,
3904,
2346,
21260,
62,
3850,
96476,
3142,
368,
341,
286,
1077,
264,
21260,
284,
435,
36864,
64,
21088,
11171,
15,
12,
24,
2279,
876,
286,
2060,
10714,
33673,
310,
264,
21260,
2389,
21260,
62,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_mime_fmt() {
let mime = TEXT_PLAIN;
assert_eq!(mime.to_string(), "text/plain");
let mime = TEXT_PLAIN_UTF_8;
assert_eq!(mime.to_string(), "text/plain; charset=utf-8");
} | rust_cleaned_test_functions.jsonl/99125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83624,
38128,
368,
341,
286,
1077,
45270,
284,
15762,
11082,
6836,
280,
286,
2060,
10714,
10297,
49588,
2389,
3904,
1507,
330,
1318,
36971,
797,
286,
1077,
45270,
284,
15762,
11082,
6836,
55061,
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 |
#[test]
fn test_combine_vecs() {
let v1 = vec![1, 2, 3];
let v2 = vec![4, 5];
let mut v3 = combine_vecs(v1, v2);
assert_eq!(Some(1), v3.next());
assert_eq!(Some(2), v3.next());
assert_eq!(Some(3), v3.next());
assert_eq!(Some(4), v3.next());
assert_... | rust_cleaned_test_functions.jsonl/83602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72374,
13251,
82,
368,
341,
286,
1077,
348,
16,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
348,
17,
284,
7486,
20703,
19,
11,
220,
20,
935,
286,
1077,
5206,
348,
18,
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_decrypt_small() {
let expected_plaintext = b"Hello, world!";
let key_data = get_key_data();
let expected_sender = key_data.alice_public;
let recipient = key_data.bob_private;
let ciphertext = encrypt_small();
let mut plaintext = Vec::new();
... | rust_cleaned_test_functions.jsonl/37917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80764,
31966,
368,
341,
286,
1077,
3601,
6317,
1641,
427,
284,
293,
1,
9707,
11,
1879,
26782,
286,
1077,
1376,
1769,
284,
633,
3097,
1769,
543,
286,
1077,
3601,
54356,
284,
1376,
1769,
12168,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_character() {
let mut lexer = Cursor::new("#\\a");
assert_eq!(lexer.get_token(), Some(Token::new(Character, 3)));
let mut lexer = Cursor::new("#\\");
assert_eq!(lexer.get_token(), None);
let mut lexer = Cursor::new("#\\newline");
assert_eq!... | rust_cleaned_test_functions.jsonl/25327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
40988,
368,
341,
286,
1077,
5206,
53259,
284,
28067,
486,
931,
3584,
3422,
64,
797,
286,
2060,
10714,
10297,
38815,
670,
6458,
1507,
4329,
38584,
486,
931,
71119,
11,
220,
18,
22525,
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_empty_tags_removed() {
let mut event = Annotated::new(Event {
tags: Annotated::new(Tags(PairList(vec![
Annotated::new(TagEntry(
Annotated::new("".to_string()),
Annotated::new("foo".to_string()),
)),
Annotated::new(Ta... | rust_cleaned_test_functions.jsonl/14094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 501
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
16333,
68248,
368,
341,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
341,
286,
9492,
25,
1527,
87029,
486,
931,
4140,
2032,
5304,
1310,
852,
25592,
90515,
310,
1527,
87029,
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_max_dot_product() {
let test_cases = vec![
(vec![-3,-8,3,-10,1,3,9],vec![9,2,3,7,-9,1,-8,5,-1,-1],200),
(vec![2,1,-2,5], vec![3,0,-6], 18),
(vec![3, -2], vec![2,-6,7], 21),
(vec![-1,-1],vec![1,1], -1),
];
for (nums1, nums2, ... | rust_cleaned_test_functions.jsonl/64730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
30941,
9840,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4083,
0,
7609,
18,
4999,
23,
11,
18,
4999,
16,
15,
11,
16,
11,
18,
11,
24,
1125,
4083,
20703,
24,
11,
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... | 2 |
#[test]
fn test_is_nan() {
assert!(!_1_1i.is_nan());
let a = Complex::new(f64::NAN, f64::NAN);
assert!(a.is_nan());
} | rust_cleaned_test_functions.jsonl/105664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
73936,
368,
341,
286,
2060,
0,
67097,
16,
62,
16,
72,
2079,
73936,
1423,
286,
1077,
264,
284,
22096,
486,
931,
955,
21,
19,
486,
45,
1093,
11,
282,
21,
19,
486,
45,
1093,
317,
286,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pitch_yaw_roll_pos_1() {
check_euler(Euler {
x: Rad(1f32),
y: Rad(1f32),
z: Rad(1f32),
});
} | rust_cleaned_test_functions.jsonl/38251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51959,
80183,
57578,
6479,
62,
16,
368,
341,
286,
1779,
2204,
8479,
10722,
8479,
341,
310,
856,
25,
20605,
7,
16,
69,
18,
17,
1326,
310,
379,
25,
20605,
7,
16,
69,
18,
17,
1326,
310,
1147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bit_set_cmp() {
let a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b10100010]));
let b = BitSet::from_bit_vec(BitVec::from_bytes(&[0b00000000]));
let c = BitSet::new();
assert_eq!(a.cmp(&b), Greater);
assert_eq!(a.cmp(&c), Greater);
assert_eq!(b.c... | rust_cleaned_test_functions.jsonl/76237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
2602,
35193,
368,
341,
286,
1077,
264,
284,
57227,
486,
1499,
13996,
13251,
68653,
10050,
486,
1499,
12524,
2099,
58,
15,
65,
16,
15,
16,
15,
15,
15,
16,
15,
14382,
286,
1077,
293,
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_poll_async_immediate_ops() {
run_in_task(|| {
let (mut isolate, dispatch_count) = setup(Mode::AsyncImmediate);
js_check(isolate.execute(
"setup2.js",
r#"
let nrecv = 0;
Deno.core.setAsyncHandler((buf) => {
nrecv++;
});
"#... | rust_cleaned_test_functions.jsonl/93569 | {
"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,
40002,
28346,
17895,
14636,
21959,
368,
341,
262,
1598,
1243,
12184,
79453,
341,
414,
1077,
320,
6984,
42123,
11,
6845,
3180,
8,
284,
6505,
3189,
534,
486,
6525,
52734,
626,
414,
6994,
7200,
82669... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_established_bad_seq() {
let mut s = socket_established();
// Data outside of receive window.
send!(s, TcpRepr {
seq_number: REMOTE_SEQ + 1 + 256,
ack_number: Some(LOCAL_SEQ + 1),
..SEND_TEMPL
}, Ok(Some(TcpRepr {
seq... | rust_cleaned_test_functions.jsonl/1727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
34199,
14486,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
442,
2885,
4889,
315,
5258,
3241,
624,
286,
3624,
10297,
82,
11,
64876,
693,
649,
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... | 1 |
#[test]
fn test_addition() {
let mut tmp = LARGEST;
tmp += &LARGEST;
assert_eq!(
tmp,
Scalar([
0xfffffffeffffffff,
0x53bda402fffe5bfe,
0x3339d80809a1d805,
0x73eda753299d7d48
])
);
let mut tmp = LARGEST;
tmp += &Sca... | rust_cleaned_test_functions.jsonl/90467 | {
"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,
2891,
680,
368,
341,
262,
1077,
5206,
4174,
284,
444,
7581,
5177,
280,
262,
4174,
1421,
609,
43,
7581,
5177,
401,
262,
2060,
10714,
33673,
286,
4174,
345,
286,
35176,
8956,
310,
220,
15,
68247,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_spqlios_poly_mul_1024() {
let mut plan = FFTPlan::new(1024);
let mut rng = rand::thread_rng();
for _i in 0..100 {
let mut a = [0u32; 1024];
let mut b = [0u32; 1024];
a.iter_mut().for_each(|e| *e = rng.gen::<u32>());
b.iter_m... | rust_cleaned_test_functions.jsonl/109567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
6905,
436,
36133,
24944,
62,
16,
15,
17,
19,
368,
341,
286,
1077,
5206,
3119,
284,
60036,
20485,
486,
931,
7,
16,
15,
17,
19,
317,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_register_int_counter_vec() {
use crate::Registry;
use std::collections::HashMap;
let opts = opts!("test_opts_int_counter_vec_1", "help");
let res = register_int_counter_vec!(opts, &["a", "b"]);
assert!(res.is_ok());
let res = register_int_counter_vec!("test_opts_int_cou... | rust_cleaned_test_functions.jsonl/86368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 715
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
4042,
15730,
13251,
368,
341,
262,
990,
17717,
486,
15603,
280,
262,
990,
1460,
486,
51137,
486,
18497,
401,
262,
1077,
12185,
284,
12185,
17223,
1944,
32354,
4042,
15730,
13251,
62,
16,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stemming_filter() {
assert_eq!(
vec![
"d".to_string(),
"e".to_string(),
"f".to_string(),
"g".to_string(),
],
helper("a b c d e f g")
);
} | rust_cleaned_test_functions.jsonl/33311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
336,
5311,
8727,
368,
341,
286,
2060,
10714,
33673,
310,
7486,
90515,
394,
330,
67,
3263,
983,
3904,
3148,
394,
330,
68,
3263,
983,
3904,
3148,
394,
330,
69,
3263,
983,
3904,
3148,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_comment_of_items() {
let file = SourceFile::parse(
r#"
//! doc
// non-doc
mod foo {}
"#,
)
.ok()
.unwrap();
let module = file.syntax().descendants().find_map(Module::cast).unwrap();
assert_eq!("doc", module.doc_comment_text().un... | rust_cleaned_test_functions.jsonl/50910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
17638,
3575,
12134,
368,
341,
262,
1077,
1034,
284,
8748,
1703,
486,
6400,
1006,
286,
435,
2,
698,
286,
17664,
4629,
198,
286,
442,
2477,
11527,
198,
286,
1463,
15229,
5613,
286,
5869,
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_nanosecond() {
assert_eq!(nanosecond("nanoseconds"), Ok(("", "nanoseconds")));
assert_eq!(nanosecond("nanosecond"), Ok(("", "nanosecond")));
assert_eq!(nanosecond("ns"), Ok(("", "ns")));
} | rust_cleaned_test_functions.jsonl/71149 | {
"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,
73936,
960,
1297,
368,
341,
310,
2060,
10714,
10297,
18759,
960,
1297,
445,
18759,
75889,
3975,
7622,
7,
19814,
330,
18759,
75889,
17621,
310,
2060,
10714,
10297,
18759,
960,
1297,
445,
18759,
960,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_soa() {
let name = Name::from_str("example.com.").unwrap();
let record_type = RecordType::SOA;
let mut rr_set = RecordSet::new(&name, record_type, 0);
let insert = Record::new()
.set_name(name.clone())
.set_ttl(3600)
.se... | rust_cleaned_test_functions.jsonl/119978 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1542
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
643,
19533,
368,
341,
286,
1077,
829,
284,
3988,
486,
1499,
2895,
445,
8687,
905,
98401,
15454,
543,
286,
1077,
3255,
1819,
284,
13583,
929,
486,
13880,
32,
280,
286,
1077,
5206,
34393,
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... | 7 |
#[test]
fn test_nnz_zip_iter() {
let vec1 = test_vec1();
let vec2 = test_vec2();
let mut iter = vec1.iter().nnz_zip(vec2.iter());
assert_eq!(iter.next().unwrap(), (0, &0., &0.5));
assert_eq!(iter.next().unwrap(), (4, &4., &4.5));
assert_eq!(iter.next().unwrap(), (... | rust_cleaned_test_functions.jsonl/3966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
50824,
42131,
11723,
368,
341,
286,
1077,
7486,
16,
284,
1273,
13251,
16,
543,
286,
1077,
7486,
17,
284,
1273,
13251,
17,
543,
286,
1077,
5206,
5367,
284,
7486,
16,
19471,
1005,
7370,
89,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cli_get_config_unknown_field_json() {
let json = r#"{
"unknown": "unknown"
}"#;
let mut tmpfile = NamedTempFile::new().expect("Failed to create tmp file");
writeln!(tmpfile, "{}", json).expect("Failed to write to tmp file");
let cli = Cli {
... | rust_cleaned_test_functions.jsonl/115807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47147,
3062,
5332,
57507,
5013,
9455,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
310,
330,
16088,
788,
330,
16088,
698,
286,
335,
57676,
401,
286,
1077,
5206,
4174,
1192,
284,
40459,
12151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enums() {
test_enum16::<ProtocolVersion>(ProtocolVersion::SSLv2, ProtocolVersion::TLSv1_3);
test_enum8::<HashAlgorithm>(HashAlgorithm::NONE, HashAlgorithm::SHA512);
test_enum8::<SignatureAlgorithm>(SignatureAlgorithm::Anonymous, SignatureAlgorithm::ECDSA);
test_enum8::<ClientCert... | rust_cleaned_test_functions.jsonl/54855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
6237,
368,
341,
262,
1273,
31054,
16,
21,
27638,
20689,
5637,
2235,
20689,
5637,
486,
22594,
85,
17,
11,
24572,
5637,
486,
45439,
85,
16,
62,
18,
317,
262,
1273,
31054,
23,
27638,
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_emit_jcc_unsigned_less_or_equal() {
let mut buf = MacroAssembler::new();
let lbl = buf.create_label();
emit_jcc(&mut buf, CondCode::UnsignedLessEq, lbl);
emit_nop(&mut buf);
buf.bind_label(lbl);
assert_eq!(vec![0x0f, 0x86, 1, 0, 0, 0, 0x90], buf.da... | rust_cleaned_test_functions.jsonl/85434 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
5374,
638,
67830,
50747,
8734,
11478,
368,
341,
286,
1077,
5206,
6607,
284,
53317,
77858,
486,
931,
543,
286,
1077,
16421,
284,
6607,
2520,
6106,
543,
286,
16691,
5374,
638,
2099,
6984,
660... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next() {
let mut atr = AverageTrueRange::new(3).unwrap();
let bar1 = Bar::new().high(10).low(7.5).close(9);
let bar2 = Bar::new().high(11).low(9).close(9.5);
let bar3 = Bar::new().high(9).low(5).close(8);
assert_eq!(atr.next(&bar1), 2.5);
assert_... | rust_cleaned_test_functions.jsonl/23547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
368,
341,
286,
1077,
5206,
29570,
284,
23565,
2514,
6046,
486,
931,
7,
18,
568,
15454,
1428,
286,
1077,
3619,
16,
284,
4716,
486,
931,
1005,
11892,
7,
16,
15,
568,
10303,
7,
22,
13,
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_empty_body() {
::init_log();
// empty body contains closing boundary only
let mut body: &[u8] = b"--boundary--";
let ref mut buf = String::new();
let mut reader = BoundaryReader::from_reader(&mut body, BOUNDARY);
debug!("Consume 1");
ass... | rust_cleaned_test_functions.jsonl/80589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
14114,
368,
341,
286,
3504,
2327,
5224,
1428,
286,
442,
4287,
2487,
5610,
15316,
18732,
1172,
198,
286,
1077,
5206,
2487,
25,
44590,
84,
23,
60,
284,
293,
74757,
65180,
313,
3302,
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_drain_fused() {
let mut list: VecList<i32> = VecList::new();
list.push_back(0);
let mut drain = list.drain();
assert_eq!(drain.next(), Some(0));
assert_eq!(drain.next(), None);
assert_eq!(drain.next(), None);
assert_eq!(drain.next(), None);... | rust_cleaned_test_functions.jsonl/11488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
761,
2591,
368,
341,
286,
1077,
5206,
1140,
25,
11312,
852,
21897,
18,
17,
29,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
3895,
7,
15,
317,
286,
1077,
5206,
23727,
284,
1140,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_protoentry_all_supported_single_protocol_single_version() {
let protocol: UnvalidatedProtoEntry = "Cons=1".parse().unwrap();
let unsupported: Option<UnvalidatedProtoEntry> = protocol.all_supported();
assert_eq!(true, unsupported.is_none());
} | rust_cleaned_test_functions.jsonl/5151 | {
"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,
37689,
4085,
5705,
57885,
19487,
34880,
19487,
9438,
368,
341,
286,
1077,
11507,
25,
1230,
59590,
31549,
5874,
284,
330,
15220,
28,
16,
3263,
6400,
1005,
15454,
543,
286,
1077,
40409,
25,
6959,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_override_works_with_default() {
let toml = r#"
use_small_heuristics = "Default"
array_width = 20
attr_fn_like_width = 40
chain_width = 20
fn_call_width = 90
single_line_if_else_max_width =... | rust_cleaned_test_functions.jsonl/130648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48576,
11498,
82,
6615,
9993,
368,
341,
310,
1077,
311,
1014,
284,
435,
2,
698,
394,
990,
31966,
41876,
324,
5589,
284,
330,
3675,
698,
394,
1334,
7927,
284,
220,
17,
15,
198,
394,
6376,
15246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parser_bytestring() {
let line = ".byte \"foo bar baz\"";
let stmt = parse_statement(line).expect("failed to parse statement");
let printed = format!("{}", stmt);
assert_eq!(".byte \"foo bar baz\"", printed.trim());
} | rust_cleaned_test_functions.jsonl/77742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
3710,
1944,
12640,
368,
341,
286,
1077,
1555,
284,
5933,
3782,
7245,
7975,
3619,
50247,
95349,
286,
1077,
20020,
284,
4715,
37404,
8797,
568,
17119,
445,
16091,
311,
4715,
5114,
797,
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_ecdsa_p256() {
generic_test(
confg_toml(),
"tests/named_test_configs/dnssec/ecdsa_p256.pem",
KeyFormat::Pem,
Algorithm::ECDSAP256SHA256,
);
} | rust_cleaned_test_functions.jsonl/110028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
620,
17,
20,
21,
368,
341,
262,
13954,
4452,
1006,
286,
2335,
70,
528,
316,
75,
3148,
286,
330,
23841,
9612,
3606,
4452,
59150,
3446,
4412,
5024,
73058,
96780,
620,
17,
20,
21,
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_int_lit() {
match int_lit().easy_parse("$1234") {
Ok((num, _)) => assert_eq!(num, 1234i16),
Err(_) => assert!(false),
}
match int_lit().easy_parse("-$1234") {
Ok((num, _)) => assert_eq!(num, -1234i16),
Err(_) => assert!(fals... | rust_cleaned_test_functions.jsonl/103367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
98399,
368,
341,
286,
2432,
526,
98399,
1005,
45022,
21039,
20912,
16,
17,
18,
19,
899,
341,
310,
7622,
1188,
2413,
11,
716,
593,
589,
2060,
10714,
10297,
2413,
11,
220,
16,
17,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_from_str_without_assembly() -> Result<(), ParseError> {
let s = r#"##fileformat=VCFv4.3
#CHROM POS ID REF ALT QUAL FILTER INFO
"#;
let header = parse(s)?;
assert!(header.assembly().is_none());
Ok(())
} | rust_cleaned_test_functions.jsonl/62671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
39904,
11898,
5642,
368,
1464,
5714,
68843,
14775,
1454,
29,
341,
286,
1077,
274,
284,
435,
55543,
565,
1192,
2243,
28,
53,
9650,
85,
19,
13,
18,
198,
2,
2149,
3361,
197,
17456,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extend2() {
let cmd = RelayCmd::EXTEND2;
assert_eq!(Into::<u8>::into(cmd), 14_u8);
// TODO: test one with more link specifiers.
let body =
"02
00 06 7F0000011388
02 14 03479E93EBF3FF2C58C1C9DBF2DE9DE9C2801B3E
0002 0054
03479E93EBF3FF2... | rust_cleaned_test_functions.jsonl/66343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 697
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
17,
368,
341,
262,
1077,
5439,
284,
46172,
15613,
486,
5722,
4689,
17,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
220,
16,
19,
7300,
23,
626,
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_add_fixed_dim_error_fixed_dim_with_zero_size() {
const DIM_NAME: &str = "dim_1";
const DIM_SIZE: usize = 0;
let mut data_set = DataSet::new();
assert_eq!(0, data_set.num_dims());
assert_eq!(false, data_set.has_dim(DIM_NAME));
assert_eq!(None, ... | rust_cleaned_test_functions.jsonl/40523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
37839,
10791,
4096,
37839,
10791,
6615,
19359,
2368,
368,
1476,
262,
733,
50859,
4708,
25,
609,
495,
284,
330,
12927,
62,
16,
876,
262,
733,
50859,
4098,
25,
22301,
284,
220,
15,
401,
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_concat_primitive_arrays() -> Result<()> {
let arr = concat(&[
&PrimitiveArray::<Int64Type>::from(vec![
Some(-1),
Some(-1),
Some(2),
None,
None,
]),
&PrimitiveArray::<Int64T... | rust_cleaned_test_functions.jsonl/25089 | {
"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,
57478,
84087,
68983,
368,
1464,
5714,
71698,
341,
286,
1077,
2890,
284,
33720,
2099,
9640,
310,
609,
33313,
1857,
27638,
1072,
21,
19,
929,
6831,
1499,
25592,
90515,
394,
4329,
4080,
16,
1326,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_double_spend_inputs() {
let (tx1, _, _) = tx!(MicroTari(5_000), fee: MicroTari(50), inputs: 1, outputs: 1);
const INPUT_AMOUNT: MicroTari = MicroTari(5_000);
let (tx2, inputs, _) = tx!(INPUT_AMOUNT, fee: MicroTari(20), inputs: 1, outputs: 1);
let test_params = Te... | rust_cleaned_test_functions.jsonl/131751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1048
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
643,
3740,
28557,
368,
341,
286,
1077,
320,
3998,
16,
11,
8358,
27439,
284,
9854,
10297,
34609,
51,
2780,
7,
20,
62,
15,
15,
15,
701,
11060,
25,
18157,
51,
2780,
7,
20,
15,
701,
11127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_that_cpp_code_compiles_and_demo_runs() {
let registry = get_starcoin_registry();
let abis = get_stdlib_script_abis();
let dir = tempdir().unwrap();
let installer = serdegen::cpp::Installer::new(dir.path().to_path_buf());
// lcs_installer
let config =... | rust_cleaned_test_functions.jsonl/73567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70197,
59686,
4136,
18177,
3658,
8378,
47830,
67352,
368,
341,
262,
1077,
19424,
284,
633,
31681,
7160,
50650,
543,
262,
1077,
668,
285,
284,
633,
15656,
2740,
14660,
62,
15367,
543,
262,
1077,
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_slice_from() {
let vec: &[int] = &[1, 2, 3, 4];
assert_eq!(vec[0..], vec);
let b: &[int] = &[3, 4];
assert_eq!(vec[2..], b);
let b: &[int] = &[];
assert_eq!(vec[4..], b);
} | rust_cleaned_test_functions.jsonl/31829 | {
"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,
26488,
5673,
368,
341,
286,
1077,
7486,
25,
44590,
396,
60,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
2060,
10714,
10297,
4083,
58,
15,
496,
1125,
7486,
317,
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_redc() {
let a = u256h!("0548c135e26faa9c977fb2eda057b54b2e0baa9a77a0be7c80278f4f03462d4c");
let b = u256h!("024385f6bebc1c496e09955db534ef4b1eaff9a78e27d4093cfa8f7c8f886f6b");
let c = u256h!("012e440f0965e7029c218b64f1010006b5c4ba8b1497c4174a32fec025c197bc");
ass... | rust_cleaned_test_functions.jsonl/52049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26058,
66,
368,
341,
286,
1077,
264,
284,
575,
17,
20,
21,
71,
17223,
15,
20,
19,
23,
66,
16,
18,
20,
68,
17,
21,
3632,
64,
24,
66,
24,
22,
22,
10798,
17,
13830,
15,
20,
22,
65,
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_which_all() {
let f = TestFixture::new();
let actual = _which_all(&f, BIN_NAME)
.unwrap()
.map(|c| c.unwrap())
.collect::<Vec<_>>();
let mut expected = f
.bins
.iter()
.map(|p| p.canonicalize().unwrap())
.collect::<Vec<_>>();
... | rust_cleaned_test_functions.jsonl/13401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
8206,
5705,
368,
341,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
5042,
284,
716,
8206,
5705,
2099,
69,
11,
82609,
4708,
340,
286,
659,
15454,
741,
286,
659,
2186,
22428,
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... | 2 |
#[test]
fn test_modpow_big() {
let b = BigInt::from_str_radix(super::BIG_B, 16).unwrap();
let e = BigInt::from_str_radix(super::BIG_E, 16).unwrap();
let m = BigInt::from_str_radix(super::BIG_M, 16).unwrap();
let r = BigInt::from_str_radix(super::BIG_R, 16).unwrap();
chec... | rust_cleaned_test_functions.jsonl/16018 | {
"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,
7480,
21743,
36386,
368,
341,
286,
1077,
293,
284,
62608,
486,
1499,
2895,
39764,
941,
56040,
486,
67017,
1668,
11,
220,
16,
21,
568,
15454,
543,
286,
1077,
384,
284,
62608,
486,
1499,
2895,
397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_with_unnamed_parameters() {
let ir = ir_from_cc("int f(int, int);").unwrap();
assert_ir_matches!(
ir,
quote! {
Func {
name: "f", ...
mangled_name: "_Z1fii", ...
params: [
FuncParam {
... | rust_cleaned_test_functions.jsonl/37152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
6615,
4907,
30245,
18263,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
445,
396,
282,
1548,
11,
526,
1215,
1827,
15454,
543,
262,
2060,
51433,
38344,
33673,
286,
6216,
345,
286,
12641,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_function_call_4() {
let input = vec![Token::Ident("f".to_string()),
Token::LParen,
Token::Integer(1),
Token::Comma,
Token::LParen,
Token::Integer(2)... | rust_cleaned_test_functions.jsonl/55684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9174,
13429,
62,
19,
368,
341,
1789,
286,
1077,
1946,
284,
7486,
20703,
3323,
486,
28301,
445,
69,
3263,
983,
3904,
14702,
5108,
9660,
486,
12567,
9151,
345,
5108,
9660,
486,
3486,
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_iskoola() {
run_test(
&TEST_DATA,
"harfbuzz/good-iskoola.si",
"sinhala/iskpota.ttf",
&[JOINER_GLYPH_INDEX],
2110,
);
} | rust_cleaned_test_functions.jsonl/91191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3187,
45980,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
12,
3187,
45980,
91132,
756,
503,
330,
15940,
71,
6053,
14,
3187,
79,
6089... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mag_from_declination() {
// verify that the output of mag_field_from_declination_inclination matches expected from NOAA
for i in 0..ALL_SAMPLE_CITIES.len() {
let (estimated, expected) = gen_mag_comparison_pair(&ALL_SAMPLE_CITIES[i]);
assert_approx_eq!(est... | rust_cleaned_test_functions.jsonl/18364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48310,
5673,
35814,
2554,
368,
341,
286,
442,
10146,
429,
279,
2550,
315,
4878,
5013,
5673,
35814,
2554,
1243,
564,
2554,
9071,
3601,
504,
85648,
271,
286,
369,
600,
304,
220,
15,
496,
3919,
414... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_object_store_url() {
let listing = ListingTableUrl::parse("file:///").unwrap();
let store = listing.object_store();
assert_eq!(store.as_str(), "file:///");
let file = ObjectStoreUrl::parse("file://").unwrap();
assert_eq!(file.as_str(), "file:///");
... | rust_cleaned_test_functions.jsonl/96527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 682
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
14809,
2903,
368,
341,
286,
1077,
14838,
284,
38764,
2556,
2864,
486,
6400,
445,
1192,
60896,
1827,
15454,
543,
286,
1077,
3553,
284,
14838,
6035,
14809,
543,
286,
2060,
10714,
10297,
4314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
mod zerocopy {
pub use crate::*;
}
#[derive(FromBytes, AsBytes)]
#[repr(C)]
struct Foo {
a: [u16; 33],
}
let foo = Foo { a: [0xFFFF; 33] };
let expected = [0xFFu8; 66];
assert_eq!(... | rust_cleaned_test_functions.jsonl/18904 | {
"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,
3858,
368,
341,
1789,
286,
1463,
76178,
509,
1266,
341,
310,
6675,
990,
17717,
56162,
286,
456,
286,
11506,
27098,
7,
3830,
7078,
11,
1634,
7078,
5563,
286,
11506,
30837,
3025,
5563,
286,
2036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_unicast_in_subnet() {
// Valid unicast in subnet
assert!(Ipv4Addr::new([1, 2, 3, 4])
.is_unicast_in_subnet(&Subnet::new(Ipv4Addr::new([1, 2, 0, 0]), 16).unwrap()));
assert!(Ipv6Addr::new([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1])
.is_unic... | rust_cleaned_test_functions.jsonl/59636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62,
3525,
559,
1243,
95681,
368,
341,
286,
442,
7818,
650,
35446,
304,
51457,
198,
286,
2060,
10297,
80656,
19,
13986,
486,
931,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_pointer() {
assert_eq!(is_pointer(VALUE_F_PTR_OBJ), true);
assert_eq!(is_pointer(VALUE_F_SYM_STR), false);
assert_eq!(is_pointer(VALUE_F_SYM_OBJ), false);
assert_eq!(is_pointer(VALUE_T_PTR_STR), true);
assert_eq!(is_pointer(VALUE_T_PTR_OBJ), true);
assert_eq!(is_pointer(VALUE_T_SY... | rust_cleaned_test_functions.jsonl/109923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
21425,
368,
341,
197,
6948,
10714,
10297,
285,
21425,
98893,
1400,
20657,
27559,
701,
830,
317,
197,
6948,
10714,
10297,
285,
21425,
98893,
1400,
82933,
7159,
701,
895,
317,
197,
6948,
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_boring_error() {
let _ = CStackWrapper::cbs_with_temp_buffer(&[], |cbs| {
should_fail(
CHeapWrapper::evp_parse_public_key(cbs),
"boringssl::EVP_parse_public_key",
"public key routines:OPENSSL_internal:DECODE_ERROR",
... | rust_cleaned_test_functions.jsonl/105167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
5503,
4096,
368,
341,
286,
1077,
716,
284,
356,
4336,
11542,
486,
66,
1279,
6615,
11771,
7776,
2099,
12995,
760,
66,
1279,
91,
341,
310,
1265,
22121,
1006,
394,
356,
27909,
11542,
486,
5120... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arrays() {
let dict = sample_dict("abcd");
let keys = dict.keys_array();
assert_eq!(keys.len(), 1);
autoreleasepool(|pool| {
assert_eq!(keys[0].as_str(pool), "abcd");
});
} | rust_cleaned_test_functions.jsonl/108473 | {
"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,
68983,
368,
341,
286,
1077,
6451,
284,
6077,
5243,
445,
68644,
3071,
286,
1077,
6894,
284,
6451,
9123,
3858,
543,
286,
2060,
10714,
10297,
10563,
19406,
1507,
220,
16,
317,
286,
74566,
10285,
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_into_from_raw_unsized() {
use std::fmt::Display;
use std::string::ToString;
let rc: Rc<str> = Rc::from("foo");
let ptr = Rc::into_raw(rc.clone());
let rc2 = unsafe { Rc::from_raw(ptr) };
assert_eq!(unsafe { &*ptr }, "foo");
assert_eq!(rc, rc2);
let rc: Rc<dyn ... | rust_cleaned_test_functions.jsonl/40037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
5673,
16067,
4907,
82,
1506,
368,
341,
262,
990,
1460,
486,
12501,
486,
7020,
280,
262,
990,
1460,
486,
917,
486,
5870,
401,
262,
1077,
10192,
25,
81463,
27,
495,
29,
284,
81463,
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_create_date_time() {
let tz = Tz::Zulu;
let column =
Vec::column_from::<ArcColumnWrapper>(vec![tz.ymd(2016, 10, 22).and_hms(12, 0, 0)]);
assert_eq!(format!("{}", column.at(0)), "2016-10-22 12:00:00");
} | rust_cleaned_test_functions.jsonl/126824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
4164,
3009,
368,
341,
286,
1077,
42528,
284,
350,
89,
486,
57,
24411,
280,
286,
1077,
3250,
4035,
310,
11312,
486,
6229,
5673,
27638,
36809,
2933,
11542,
2235,
4083,
20703,
37592,
13,
1600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intern_key_split() {
let key1 = InternalKey {
key: "10outer_keys/inner_key".to_owned(),
};
let (outer, inner) = key1.split();
assert_eq!(outer, "outer_keys".to_owned());
assert_eq!(inner.expect("should contain inner key"), "inner_key".to_owned(... | rust_cleaned_test_functions.jsonl/90779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
932,
3097,
17052,
368,
341,
286,
1077,
1376,
16,
284,
15412,
1592,
341,
310,
1376,
25,
330,
16,
15,
2676,
12631,
14,
4382,
3097,
3263,
983,
51973,
3148,
286,
2605,
286,
1077,
320,
2676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_space_token() {
match space_token('h').easy_parse(" h ") {
Ok((tok, _)) => assert_eq!(tok, 'h'),
Err(_) => assert!(false),
}
} | rust_cleaned_test_functions.jsonl/103362 | {
"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,
14663,
6458,
368,
341,
286,
2432,
3550,
6458,
492,
71,
1823,
45022,
21039,
445,
256,
305,
220,
12310,
341,
310,
7622,
1188,
29594,
11,
716,
593,
589,
2060,
10714,
10297,
29594,
11,
364,
71,
3299... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_info_response() {
let (sender_name, sender_key) = get_key_pair();
let transfer = Transfer {
sender: sender_name,
recipient: Address::Primary(dbg_addr(0x20)),
amount: Amount::from(5),
sequence_number: SequenceNumber::new(),
user_data: UserData::defa... | rust_cleaned_test_functions.jsonl/99649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1010
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3109,
9655,
368,
341,
262,
1077,
320,
11644,
1269,
11,
4646,
3097,
8,
284,
633,
3097,
14445,
543,
262,
1077,
8317,
284,
23200,
341,
286,
4646,
25,
4646,
1269,
345,
286,
21713,
25,
9177,
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... | 4 |
#[test]
fn test_api_deposit() {
let denom: Denomination = Denomination::from_str("TEST").unwrap();
let mut mock = mock::Mock::default();
let mut ctx = mock.create_ctx();
let mut meta = Metadata {
..Default::default()
};
let genesis = Default::default();
Module::<Accounts, Co... | rust_cleaned_test_functions.jsonl/52595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1877
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11697,
85798,
368,
341,
262,
1077,
49744,
25,
9774,
80380,
284,
9774,
80380,
486,
1499,
2895,
445,
10033,
1827,
15454,
543,
262,
1077,
5206,
7860,
284,
7860,
486,
11571,
486,
2258,
543,
262,
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_event_chain_functions() {
::init().unwrap();
let pad = ::Pad::new(Some("sink"), ::PadDirection::Sink);
let events = Arc::new(Mutex::new(Vec::new()));
let events_clone = events.clone();
pad.set_event_function(move |_, _, event| {
let mut event... | rust_cleaned_test_functions.jsonl/126039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6748,
30583,
31708,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
1077,
11016,
284,
3504,
13731,
486,
931,
65405,
445,
66738,
3975,
3504,
13731,
9268,
486,
45094,
626,
286,
1077,
4357,
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... | 3 |
#[test]
fn test_legal_moves_banmen_with_gin_nari_7_squares_sente() {
test_legal_moves_banmen_with_kin_7_squares_sente_impl(SGinN)
} | rust_cleaned_test_functions.jsonl/81301 | {
"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,
82324,
45390,
880,
276,
5676,
6615,
1889,
258,
1089,
2780,
62,
22,
643,
40856,
643,
6817,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
643,
6817,
21007,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iterate() {
let mut m = HashMap::with_capacity(4);
for i in 0..32 {
assert!(m.insert(i, i * 2).is_none());
}
assert_eq!(m.len(), 32);
let observed = AtomicUsize::new(0);
m.par_iter().for_each(|(k, v)| {
assert_eq!(*v, *k *... | rust_cleaned_test_functions.jsonl/45213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
4197,
35603,
7,
19,
317,
286,
369,
600,
304,
220,
15,
496,
18,
17,
341,
310,
2060,
10297,
76,
7030,
1956,
11,
600,
353,
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... | 2 |
#[test]
fn test_validate_xml_body() {
let expected = r#"<a>
hello123
</a>"#;
let actual = "<a>hello123</a>";
validate_body(&actual, expected, MediaType::Xml).expect("inputs match as XML");
let expected = r#"<a>
hello123
</a>"#;
let actual =... | rust_cleaned_test_functions.jsonl/12138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
23855,
14114,
368,
341,
286,
1077,
3601,
284,
435,
2,
22476,
64,
397,
286,
23811,
16,
17,
18,
198,
286,
690,
64,
9877,
2,
280,
286,
1077,
5042,
284,
4055,
64,
29,
14990,
16,
17,
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_nested_ifs() {
let template = compile(
"{{ if boolean }}Hi, {{ if null }}there!{{ else }}Hello!{{ endif }}{{ endif }}",
);
let context = context();
let template_registry = other_templates();
let formatter_registry = formatters();
... | rust_cleaned_test_functions.jsonl/2381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
11119,
82,
368,
972,
286,
1077,
3811,
284,
19192,
7805,
310,
47219,
421,
2710,
3869,
13048,
11,
5867,
421,
845,
3869,
18532,
0,
2979,
770,
3869,
9707,
0,
2979,
12330,
3869,
2979,
12330,
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_input_handler_left_event() {
let mut app = App::default();
app.input = str_to_vec_char("My text");
let input_len = app.input.len().try_into().unwrap();
app.input_idx = app.input.len();
app.input_cursor_position = input_len;
handler(Key::Left, &mut app);
assert_eq!(a... | rust_cleaned_test_functions.jsonl/5102 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
10183,
9579,
6748,
368,
341,
262,
1077,
5206,
906,
284,
1845,
486,
2258,
1428,
262,
906,
10046,
284,
607,
2346,
13251,
9232,
445,
5050,
1467,
797,
262,
1077,
1946,
6043,
284,
906,
10046,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_record_schema_with_currently_parsing_schema_named_enum() {
let schema = Schema::parse_str(
r#"
{
"type" : "record",
"name" : "record",
"fields" : [
{
"type" : "enum",
... | rust_cleaned_test_functions.jsonl/116696 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1635
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
25371,
6615,
11080,
398,
620,
28598,
25371,
71834,
31054,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
2,
698,
310,
341,
1060,
330,
1313,
1,
549,
330,
8548,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.