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_lock() {
let mut locks = vec![
Lock::new(
LockType::Put,
b"pk".to_vec(),
1.into(),
10,
None,
TimeStamp::zero(),
0,
TimeStamp::zero(),
... | rust_cleaned_test_functions.jsonl/20088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3048
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
368,
341,
1789,
286,
1077,
5206,
31676,
284,
7486,
90515,
310,
15701,
486,
931,
1006,
394,
15701,
929,
486,
19103,
345,
394,
293,
1,
20819,
3263,
983,
13251,
3148,
394,
220,
16,
39860,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_code_cache() {
let (_temp_dir, deno_dir) = test_setup();
let filename = "hello.js";
let source_code = b"1+2";
let output_code = b"1+2 // output code";
let source_map = b"{}";
let hash = source_code_hash(filename, source_code, version::DENO);
let (cache_path, source_m... | rust_cleaned_test_functions.jsonl/83864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
11529,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
262,
1077,
3899,
284,
330,
14990,
2857,
876,
262,
1077,
2530,
4136,
284,
293,
1,
16,
10,
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_process_empty_entry_is_registered() {
solana_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(2);
let bank = Arc::new(Bank::new_for_tests(&genesis_config));
let keypair... | rust_cleaned_test_functions.jsonl/46801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
15124,
9078,
6892,
72683,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
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_serialise_body() {
#[cfg(not(feature = "component"))]
let elem: Element = "<message xmlns='jabber:client' to='coucou@example.org' type='chat'><body>Hello world!</body></message>".parse().unwrap();
#[cfg(feature = "component")]
let elem: Element = "<message xmlns='... | rust_cleaned_test_functions.jsonl/112973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
1064,
14114,
368,
341,
286,
11506,
14072,
24772,
27062,
284,
330,
8571,
2761,
921,
286,
1077,
11750,
25,
8543,
284,
4055,
1994,
24967,
1131,
38916,
652,
25,
2972,
6,
311,
1131,
22249,
22249... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lt_eq_dyn_utf8_scalar() {
let array = StringArray::from(vec!["abc", "def", "xyz"]);
let a_eq = lt_eq_dyn_utf8_scalar(&array, "def").unwrap();
assert_eq!(
a_eq,
BooleanArray::from(vec![Some(true), Some(true), Some(false)])
);
} | rust_cleaned_test_functions.jsonl/98236 | {
"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,
39164,
10714,
69213,
39453,
23,
41652,
368,
341,
286,
1077,
1334,
284,
923,
1857,
486,
1499,
25592,
0,
1183,
13683,
497,
330,
750,
497,
330,
28854,
15049,
286,
1077,
264,
10714,
284,
25175,
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_stable_entries() {
let ents = vec![new_entry(5, 1), new_entry(5, 2), new_entry(6, 3)];
let mut u = Unstable {
entries: ents.clone(),
offset: 5,
snapshot: Some(new_snapshot(4, 1)),
logger: crate::default_logger(),
};
... | rust_cleaned_test_functions.jsonl/80455 | {
"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,
1261,
480,
26092,
368,
341,
286,
1077,
36852,
284,
7486,
20703,
931,
9078,
7,
20,
11,
220,
16,
701,
501,
9078,
7,
20,
11,
220,
17,
701,
501,
9078,
7,
21,
11,
220,
18,
12587,
286,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tokenizer_1word() {
let test_str = "hello";
let tokens: Vec<Token> = Tokens::from_str(test_str).collect();
assert_eq!(tokens, vec![Token::Word("hello".to_string())]);
} | rust_cleaned_test_functions.jsonl/109314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
62,
16,
1158,
368,
341,
262,
1077,
1273,
2895,
284,
330,
14990,
876,
262,
1077,
11211,
25,
11312,
83416,
29,
284,
58166,
486,
1499,
2895,
8623,
2895,
568,
17384,
543,
262,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_null_array_indices_out_of_bounds() {
let values = NullArray::new(5);
let indices = UInt32Array::from(vec![Some(0), None, Some(15)]);
let result = take(&values, &indices, Some(TakeOptions { check_bounds: true }));
assert_eq!(
result.unwrap_err().to_str... | rust_cleaned_test_functions.jsonl/27067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
3858,
18333,
6068,
3575,
36878,
368,
341,
286,
1077,
2750,
284,
18084,
1857,
486,
931,
7,
20,
317,
286,
1077,
14937,
284,
22275,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
15,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_detect_compiler_kind_clang() {
let f = TestFixture::new();
let creator = new_creator();
let pool = ThreadPool::sized(1);
next_command(
&creator,
Ok(MockChild::new(exit_status(0), "clang\nfoo", "")),
);
let c = detect_compile... | rust_cleaned_test_functions.jsonl/89213 | {
"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,
56457,
80910,
33162,
6794,
524,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
1077,
19919,
284,
501,
68532,
543,
286,
1077,
7314,
284,
72716,
486,
82,
1506,
7,
16,
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_union_of_records() {
use std::iter::FromIterator;
// A and B are the same except the name.
let schema_str_a = r#"{
"name": "A",
"type": "record",
"fields": [
{"name": "field_one", "type": "float"}
]
... | rust_cleaned_test_functions.jsonl/108433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 932
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
3575,
31279,
368,
341,
286,
990,
1460,
486,
2015,
486,
3830,
11951,
401,
286,
442,
362,
323,
425,
525,
279,
1852,
3650,
279,
829,
624,
286,
1077,
10802,
2895,
4306,
284,
435,
55543,
515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3a_min_max() {
let a = vec3a(-1.0, 2.0, -3.0);
let b = vec3a(1.0, -2.0, 3.0);
assert_eq!((-1.0, -2.0, -3.0), a.min(b).into());
assert_eq!((-1.0, -2.0, -3.0), b.min(a).into());
assert_eq!((1.0, 2.0, 3.0), a.max(b).into());
assert_eq!((1.0, 2.0, 3.0), b.max(a).into());
} | rust_cleaned_test_functions.jsonl/23486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
64,
7260,
6345,
368,
341,
262,
1077,
264,
284,
7486,
18,
64,
4080,
16,
13,
15,
11,
220,
17,
13,
15,
11,
481,
18,
13,
15,
317,
262,
1077,
293,
284,
7486,
18,
64,
7,
16,
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... | 1 |
#[test]
fn test_all_smems() {
let text = b"ATTCGGGG$CCCCGAAT$";
let alphabet = dna::n_alphabet();
let sa = suffix_array(text);
let bwt = bwt(text, &sa);
let less = less(&bwt, &alphabet);
let occ = Occ::new(&bwt, 3, &alphabet);
let fm = FMIndex::new(&bwt, &... | rust_cleaned_test_functions.jsonl/50357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 702
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
643,
10536,
82,
368,
341,
286,
1077,
1467,
284,
293,
1,
828,
7749,
22254,
22254,
3,
47932,
16128,
828,
3,
876,
286,
1077,
27790,
284,
75334,
486,
77,
8418,
18485,
543,
286,
1077,
822,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_return_stmt() {
test_walk(
"() => {return 1}",
vec![
"File",
"ExprStmt",
"FunctionExpr",
"Block",
"ReturnStmt",
"IntegerLit",
],
)
} | rust_cleaned_test_functions.jsonl/133868 | {
"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,
12511,
21824,
368,
341,
262,
1273,
56131,
1006,
286,
67411,
589,
314,
689,
220,
16,
24375,
286,
7486,
90515,
310,
330,
1703,
756,
310,
330,
16041,
31063,
756,
310,
330,
5152,
16041,
756,
310,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ops() {
let a = 1;
let b = 1;
let a = a ^ (b << 1);
assert_eq!(a, 3);
} | rust_cleaned_test_functions.jsonl/20025 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21959,
368,
341,
286,
1077,
264,
284,
220,
16,
280,
286,
1077,
293,
284,
220,
16,
280,
286,
1077,
264,
284,
264,
6306,
320,
65,
1115,
220,
16,
317,
286,
2060,
10714,
10297,
64,
11,
220,
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 |
#[test]
fn test_virtio_fs_hotplug_dax_on_w_virtiofsd_rs_daemon() {
test_virtio_fs(true, None, "none", &prepare_virtofsd_rs_daemon, true)
} | rust_cleaned_test_functions.jsonl/29388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
34470,
33433,
47474,
814,
706,
4470,
1670,
2273,
2106,
815,
3848,
67,
47115,
47070,
7291,
368,
341,
310,
1273,
2273,
2106,
815,
34470,
3715,
11,
2240,
11,
330,
6697,
497,
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 |
#[test]
fn test_with_document() {
let schema = json!({"$ref": "http://example.json/schema.json#/rule"});
let compiled = JSONSchema::options()
.with_document(
"http://example.json/schema.json".to_string(),
json!({"rule": {"minLength": 5}}),
... | rust_cleaned_test_functions.jsonl/89820 | {
"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,
6615,
26231,
368,
341,
286,
1077,
10802,
284,
2951,
0,
16864,
3,
1097,
788,
330,
1254,
1110,
8687,
4323,
61142,
4323,
69467,
12937,
27316,
286,
1077,
19697,
284,
4718,
8632,
486,
2875,
741,
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_max_events_in_batch() {
let mut qb = QueuedBatches::default();
for _ in 0..MAX_EVENTS_IN_BATCH {
qb.add_event(InputLogEvent {
..Default::default()
})
.unwrap();
// All of these events should fit in one batch
... | rust_cleaned_test_functions.jsonl/96495 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
19691,
1243,
14534,
368,
341,
286,
1077,
5206,
75807,
284,
9418,
3260,
33,
9118,
486,
2258,
543,
286,
369,
716,
304,
220,
15,
496,
10586,
61357,
2158,
74009,
341,
310,
75807,
1364,
6748,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_rsa_encryption() {
let key = Key::new("220819465310378335405242605806607740322074765211971211287403587614863647634670878287668739723380190789768549865310764847727717353997014245661770399268553567194977364392894552862772021139005095542660573024665289852536483183141292468252196401973561656... | rust_cleaned_test_functions.jsonl/83477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82522,
13781,
15597,
368,
341,
286,
1077,
1376,
284,
5309,
486,
931,
445,
17,
17,
15,
23,
16,
24,
19,
21,
20,
18,
16,
15,
18,
22,
23,
18,
18,
20,
19,
15,
20,
17,
19,
17,
21,
15,
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_read_map() {
assert_eq!(
read_map(&cbor_int!(123)),
Err(CTAP2_ERR_CBOR_UNEXPECTED_TYPE)
);
assert_eq!(
read_map(&cbor_bool!(true)),
Err(CTAP2_ERR_CBOR_UNEXPECTED_TYPE)
);
assert_eq!(
read_map(&cbo... | rust_cleaned_test_functions.jsonl/51440 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 768
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
5376,
368,
341,
286,
2060,
10714,
33673,
310,
1349,
5376,
2099,
7221,
269,
4042,
10297,
16,
17,
18,
6965,
310,
15495,
7,
1162,
2537,
17,
9875,
48933,
868,
6735,
80002,
4189,
340,
286,
1439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_notarization_conversion() {
let artifact = Notarization::fake(NotarizationContent::new(
Height::from(22),
CryptoHashOf::from(CryptoHash(vec![1, 2, 3])),
));
let mut buf = Vec::new();
pb::Notarization::from(&artifact).encode(&mut buf).unwrap... | rust_cleaned_test_functions.jsonl/92529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
277,
2022,
64132,
368,
341,
286,
1077,
36639,
284,
2806,
277,
2022,
486,
30570,
7,
2623,
277,
2022,
2762,
486,
931,
1006,
310,
21432,
486,
1499,
7,
17,
17,
1326,
310,
32886,
6370,
2124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ray_intersection() {
let l = Arc::new(Lambert {
color: Vector3::new(1., 0., 0.),
});
let s = Sphere::new(1., Isometry3::identity(), l);
let ray = Ray {
origin: Point3::new(0., 0., 3.),
dir: Vector3::new(0., 0., -1.),
};
... | rust_cleaned_test_functions.jsonl/84662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72690,
82558,
368,
341,
286,
1077,
326,
284,
19689,
486,
931,
4957,
2969,
529,
341,
310,
1894,
25,
4196,
18,
486,
931,
7,
16,
2572,
220,
15,
2572,
220,
15,
13,
1326,
286,
1625,
286,
1077,
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... | 1 |
#[test]
fn test_proc_args_to_command() {
let proc = ProcArgs(Vec::from(EXAMPLE));
assert_eq!(
OsStr::from_bytes(b"./process_current -a -b --co=2"),
&proc.to_command()
);
} | rust_cleaned_test_functions.jsonl/76698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24436,
8384,
2346,
10811,
368,
341,
286,
1077,
13674,
284,
41087,
4117,
49923,
486,
1499,
25409,
18918,
3237,
286,
2060,
10714,
33673,
310,
15433,
2580,
486,
1499,
12524,
1883,
95092,
4630,
11080,
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 |
#[test]
fn test_sel() {
assert_eq!(1.0, sel(true, 1.0, 2.0));
assert_eq!(2.0, sel(false, 1.0, 2.0));
} | rust_cleaned_test_functions.jsonl/50097 | {
"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,
34153,
368,
341,
262,
2060,
10714,
10297,
16,
13,
15,
11,
11806,
3715,
11,
220,
16,
13,
15,
11,
220,
17,
13,
15,
1106,
262,
2060,
10714,
10297,
17,
13,
15,
11,
11806,
3576,
11,
220,
16,
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 |
#[test]
fn test_exec_set_basic_block() {
let header = make_test_header(EndianSlice::new(&[], LittleEndian));
let mut initial_registers = LineRow::new(&header);
initial_registers.basic_block = false;
let opcode = LineInstruction::SetBasicBlock;
let mut expected_register... | rust_cleaned_test_functions.jsonl/3376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
2602,
34729,
7113,
368,
341,
286,
1077,
4247,
284,
1281,
4452,
8757,
7,
43231,
33236,
486,
931,
2099,
12995,
14671,
43231,
3237,
286,
1077,
5206,
2856,
78360,
284,
7083,
3102,
486,
931,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_option() {
let (inspector, mut node) = inspector_and_list_node();
inspect_log!(node, some?: Some("a"));
inspect_log!(node, none?: None as Option<String>);
assert_inspect_tree!(inspector, root: {
list_node: {
"0": { "@time": AnyPro... | rust_cleaned_test_functions.jsonl/90895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
9672,
368,
341,
286,
1077,
320,
1330,
18997,
11,
5206,
2436,
8,
284,
44725,
8378,
2019,
5084,
1428,
286,
24085,
5224,
10297,
3509,
11,
1045,
4820,
4329,
445,
64,
4010,
286,
24085,
5224,
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... | 3 |
#[test]
fn test_read_user() {
let user: User = read_test_file("user");
check_user_kwrobot(&user.clone().into());
assert_eq!(
user.created_at.unwrap(),
datetime((2015, 2, 26), (15, 58, 34, 670)),
);
assert_eq!(user.is_admin, None);
assert_eq!(user.highest_role, Some(Acces... | rust_cleaned_test_functions.jsonl/12954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
3317,
368,
341,
262,
1077,
1196,
25,
2657,
284,
1349,
4452,
2458,
445,
872,
3071,
262,
1779,
3317,
64496,
18247,
2099,
872,
15997,
1005,
18122,
1423,
262,
2060,
10714,
33673,
286,
1196,
2306... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
struct Foo;
impl Debug for Foo {
fn fmt(&self, fmt: &mut Formatter) {
fmt.debug_struct("Foo")
.field("bar", &true)
.field("baz", &format_args!("{}/{}", 10, 20))
.finish()
... | rust_cleaned_test_functions.jsonl/124736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
368,
341,
286,
2036,
33428,
401,
286,
11605,
11091,
369,
33428,
341,
310,
5168,
8879,
2099,
721,
11,
8879,
25,
609,
6984,
81387,
8,
341,
394,
8879,
7883,
15126,
445,
40923,
1138,
503,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_set_tz() {
let original = Time {
hour: 0,
minute: 0,
second: 0,
millisecond: 0,
tz_offset_hours: 0,
tz_offset_minutes: 0,
};
let expected = Time {
hour: 0,
minute: 0,
second: 0,
millisecond: 0,
... | rust_cleaned_test_functions.jsonl/16739 | {
"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,
3009,
2602,
528,
89,
368,
341,
262,
1077,
4024,
284,
4120,
341,
286,
6460,
25,
220,
15,
345,
286,
9383,
25,
220,
15,
345,
286,
2086,
25,
220,
15,
345,
286,
2544,
45866,
25,
220,
15,
345,
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_queue_error_display() {
let err = UsedRing(GuestMemoryError::InvalidGuestAddress(GuestAddress(0)));
let _ = format!("{}{:?}", err, err);
let err = DescIndexOutOfBounds(1);
let _ = format!("{}{:?}", err, err);
} | rust_cleaned_test_functions.jsonl/134257 | {
"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,
10841,
4096,
14825,
368,
341,
286,
1077,
1848,
284,
12199,
43466,
6699,
3045,
10642,
1454,
486,
7928,
37804,
4286,
6699,
3045,
4286,
7,
15,
4945,
286,
1077,
716,
284,
3561,
17223,
6257,
44986,
526... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_correct_key() {
let program_id = Pubkey::default();
let keypair0 = Keypair::new();
let id0 = keypair0.pubkey();
let ix = Instruction::new_with_bincode(program_id, &0, vec![AccountMeta::new(id0, true)]);
let message = Message::new(&[ix], Some(&i... | rust_cleaned_test_functions.jsonl/11242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
31550,
3097,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
2258,
543,
286,
1077,
1376,
12670,
15,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
877,
15,
284,
1376,
12670,
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_data_kind_info_try_from() {
assert_eq!(
DataKindInfo::try_from(DATA_KIND_SKIPPED).unwrap().to_kind().unwrap(),
DataKind::Skipped
);
assert_eq!(
DataKindInfo::try_from(DATA_KIND_ZEROES).unwrap().to_kind().unwrap(),
DataKind::... | rust_cleaned_test_functions.jsonl/51126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
33162,
3109,
53283,
5673,
368,
341,
286,
2060,
10714,
33673,
310,
2885,
10629,
1731,
486,
1539,
5673,
59093,
72959,
34464,
35759,
1479,
568,
15454,
1005,
983,
33162,
1005,
15454,
3148,
310,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_entry() {
let tx1 = build_tx(vec![(&Byte32::zero(), 1), (&Byte32::zero(), 2)], 1);
let tx1_hash = tx1.hash();
let tx2 = build_tx(vec![(&tx1_hash, 0)], 1);
let mut pool = ProposedPool::new(DEFAULT_MAX_ANCESTORS_SIZE);
pool.add_entry(TxEntry::new(
... | rust_cleaned_test_functions.jsonl/50519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
9078,
368,
341,
286,
1077,
9854,
16,
284,
1936,
17805,
25592,
20703,
2099,
7153,
18,
17,
486,
14154,
1507,
220,
16,
701,
15899,
7153,
18,
17,
486,
14154,
1507,
220,
17,
25035,
220,
16,
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_parse_client_final_missing_fields() {
assert_eq!(
parse_client_final("c=whatever,r=something").unwrap_err(),
Error::Protocol(Kind::ExpectedField(Field::Proof))
);
assert_eq!(
parse_client_final("c=whatever,p=words").unwrap_err(),
... | rust_cleaned_test_functions.jsonl/10295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8179,
20676,
40447,
12132,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
8179,
20676,
445,
66,
28,
68286,
15883,
14149,
11532,
1827,
15454,
9266,
3148,
310,
4600,
486,
20689,
7,
10629,
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_increment_and_persist_all() {
let counter = DownloadsCounter::new();
let conn = crate::db::test_conn();
let mut state = State::new(&conn);
let v1 = state.new_version(&conn);
let v2 = state.new_version(&conn);
let v3 = state.new_version(&conn);
... | rust_cleaned_test_functions.jsonl/71843 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51482,
8378,
620,
4975,
5705,
368,
341,
286,
1077,
5546,
284,
49161,
14099,
486,
931,
543,
286,
1077,
4534,
284,
17717,
486,
1999,
486,
1944,
17241,
543,
286,
1077,
5206,
1584,
284,
3234,
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... | 3 |
#[test]
fn test_create_stakes() {
// 2 unlocks
let rent = Rent {
lamports_per_byte_year: 1,
exemption_threshold: 1.0,
..Rent::default()
};
let reserve = StakeState::get_rent_exempt_reserve(&rent);
let staker_reserve = rent.minimum_bal... | rust_cleaned_test_functions.jsonl/36426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1261,
2050,
368,
341,
286,
442,
220,
17,
73191,
271,
286,
1077,
8016,
284,
29737,
341,
310,
31603,
3394,
5678,
19737,
14645,
25,
220,
16,
345,
310,
44698,
21858,
25,
220,
16,
13,
15,
345... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_call_expr() {
test_walk(
"b(a:1)",
vec![
"File",
"ExprStmt",
"CallExpr",
"IdentifierExpr",
"Property",
"Identifier",
... | rust_cleaned_test_functions.jsonl/3326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
21915,
368,
341,
310,
1273,
56131,
1006,
394,
330,
65,
2877,
25,
16,
15752,
394,
7486,
90515,
503,
330,
1703,
756,
503,
330,
16041,
31063,
756,
503,
330,
7220,
16041,
756,
503,
330,
8714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_mul_mismatched_length() {
let a = Primitive::from_slice(vec![5, 6]).to(DataType::Int32);
let b = Primitive::from_slice(vec![5]).to(DataType::Int32);
mul(&a, &b)
.err()
.expect("should have failed due to different lengths");
} | rust_cleaned_test_functions.jsonl/12700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
717,
24976,
291,
5118,
368,
341,
286,
1077,
264,
284,
51460,
486,
1499,
26488,
25592,
20703,
20,
11,
220,
21,
10697,
983,
63941,
486,
1072,
18,
17,
317,
286,
1077,
293,
284,
51460,
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_cast_i64_to_bool() {
let t_i64: Tensor = tensor1(&[0i64]);
t_i64.cast_to::<bool>().unwrap();
} | rust_cleaned_test_functions.jsonl/4233 | {
"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,
5303,
5318,
21,
19,
2346,
22159,
368,
341,
286,
1077,
259,
5318,
21,
19,
25,
26036,
284,
15626,
16,
2099,
58,
15,
72,
21,
19,
2558,
286,
259,
5318,
21,
19,
35091,
2346,
27638,
2641,
10483,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_wigner_6j() {
let tj_max = 15;
let mut f = md5::Context::new();
get_6tjs(tj_max, &mut |w6j| {
let w = w6j.value();
write!(
f,
"{}\t{}\t{}\t{}\t{}\t{}\t{}\n",
w6j.tj1, w6j.tj2, w6j.tj3,
w6j.tj4, w6j.tj5, w6j.tj6,
... | rust_cleaned_test_functions.jsonl/80983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
77656,
62,
21,
73,
368,
341,
262,
1077,
65254,
6345,
284,
220,
16,
20,
280,
262,
1077,
5206,
282,
284,
10688,
20,
486,
1972,
486,
931,
543,
262,
633,
62,
21,
83,
2519,
1155,
73,
6345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_builder() {
// Test building a primitive array with ArrayData builder and offset
let buf = Buffer::from(&[0, 1, 2, 3, 4].to_byte_slice());
let buf2 = buf.clone();
let data = ArrayData::builder(DataType::Int32)
.len(5)
.offse... | rust_cleaned_test_functions.jsonl/11598 | {
"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,
84087,
3858,
28532,
368,
341,
286,
442,
3393,
4752,
264,
27594,
1334,
448,
2910,
1043,
7363,
323,
4347,
198,
286,
1077,
6607,
284,
10312,
486,
1499,
2099,
58,
15,
11,
220,
16,
11,
220,
17,
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... | 2 |
#[test]
fn test_add_and_find()
{
let mut t = Inferator::new("burritos");
t.bind_vartype(&Lstr::Sref("a"), &Type::Int, 18).unwrap();
assert_eq!(Type::Int, t.vartype("a").unwrap());
} | rust_cleaned_test_functions.jsonl/15069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
8378,
21814,
741,
262,
341,
286,
1077,
5206,
259,
284,
62658,
850,
486,
931,
445,
11240,
94012,
797,
286,
259,
6090,
2273,
471,
499,
2099,
43,
495,
486,
50,
1097,
445,
64,
3975,
609,
929... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jarsigner() {
// Creates a temporary directory
let tempdir = tempfile::tempdir().unwrap();
let aab_build_dir = tempdir.path();
// Assigns configuration for aab generation
let sdk = AndroidSdk::from_env().unwrap();
let package_name = "minimal_unsig... | rust_cleaned_test_functions.jsonl/79248 | {
"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,
5374,
1561,
77656,
368,
341,
286,
442,
14684,
264,
13340,
6220,
198,
286,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
264,
370,
20801,
4334,
284,
2730,
3741,
3875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select_only_values() -> Result<()> {
let values = SqlBuilder::select_values(&["10", "e("100")]).sql()?;
assert_eq!("SELECT 10, '100';", &values);
Ok(())
} | rust_cleaned_test_functions.jsonl/12585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
18410,
9146,
368,
1464,
5714,
71698,
341,
286,
1077,
2750,
284,
7224,
3297,
486,
1742,
9146,
2099,
1183,
16,
15,
497,
609,
2949,
445,
16,
15,
15,
899,
10697,
3544,
368,
69493,
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
] | 2 |
#[test]
fn test_get_networking_status() {
let (client, single) = Client::init().unwrap();
std::thread::spawn(move || single.run_callbacks());
let utils = client.networking_utils();
let status = utils.detailed_relay_network_status();
println!(
"status: {:?}, n... | rust_cleaned_test_functions.jsonl/94956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 593
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
20966,
287,
4773,
368,
341,
286,
1077,
320,
2972,
11,
3175,
8,
284,
8423,
486,
2327,
1005,
15454,
543,
286,
1460,
486,
4528,
486,
46087,
34081,
1369,
3175,
7634,
60148,
5231,
286,
1077,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_program_bpf_call_depth() {
solana_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(50);
let mut bank = Bank::new_for_tests(&genesis_config);
let (name, id, entrypoint) = solana_bpf_loader_program!();
... | rust_cleaned_test_functions.jsonl/5745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
880,
15897,
13429,
19061,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
40788,
2648,
1731,
341,
286,
59366,
5332,
345,
286,
28337,
3097,
12670,
345,
286,
54538,
262,
335,
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_onix3_oapen_contributions() {
let mut test_contribution = WorkContributions {
contribution_type: ContributionType::AUTHOR,
first_name: Some("Author".to_string()),
last_name: "1".to_string(),
full_name: "Author 1".to_string(),
ma... | rust_cleaned_test_functions.jsonl/67619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4470,
941,
18,
14179,
391,
268,
92581,
3977,
368,
341,
286,
1077,
5206,
1273,
3382,
31140,
284,
5547,
52984,
3977,
341,
310,
18527,
1819,
25,
93528,
929,
486,
26694,
868,
345,
310,
1156,
1269,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_normalized_newlines_stdout_is() {
let res = CmdResult {
bin_path: "".into(),
util_name: None,
tmpd: None,
code: None,
success: true,
stdout: "A\r\nB\nC".into(),
stderr: "".into(),
};
res.... | rust_cleaned_test_functions.jsonl/12800 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80006,
5921,
7969,
67416,
6892,
368,
341,
286,
1077,
592,
284,
40210,
2077,
341,
310,
9544,
2638,
25,
44907,
18122,
3148,
310,
4094,
1269,
25,
2240,
345,
310,
4174,
67,
25,
2240,
345,
310,
2038,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_rpc_protocol() {
let address = format!("0.0.0.0:{}", utils::get_available_port());
let mock_db = mock_db();
let mp_sender = channel(1024).0;
let _runtime = bootstrap(address.parse().unwrap(), Arc::new(mock_db), mp_sender);
let client = reqwest::blocking::Client::new();
... | rust_cleaned_test_functions.jsonl/72850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 795
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
60799,
34880,
368,
341,
262,
1077,
2621,
284,
3561,
17223,
15,
13,
15,
13,
15,
13,
15,
25,
42351,
12439,
486,
455,
26962,
8716,
1423,
262,
1077,
7860,
8685,
284,
7860,
8685,
543,
262,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_emit_movsx() {
assert_emit!(0x48, 0x63, 0xc0; emit_movsx(RAX, RAX));
assert_emit!(0x4c, 0x63, 0xc8; emit_movsx(RAX, R9));
assert_emit!(0x4c, 0x63, 0xf8; emit_movsx(RAX, R15));
assert_emit!(0x49, 0x63, 0xc2; emit_movsx(R10, RAX));
assert_emit!(0x4d, 0x63, 0... | rust_cleaned_test_functions.jsonl/85482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
55798,
48612,
368,
341,
286,
2060,
69082,
10297,
15,
87,
19,
23,
11,
220,
15,
87,
21,
18,
11,
220,
15,
8148,
15,
26,
16691,
55798,
48612,
2785,
2954,
11,
431,
2954,
1106,
286,
2060,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_inner_poison() {
let m = Arc::new(RwLock::new(NonCopy(10)));
let m2 = m.clone();
let _ = thread::spawn(move || {
let _lock = m2.write().unwrap();
panic!("test panic in inner thread to poison RwLock");
}).join();
assert!(m.is_p... | rust_cleaned_test_functions.jsonl/5888 | {
"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,
45514,
34345,
61814,
3335,
368,
341,
286,
1077,
296,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
7,
8121,
12106,
7,
16,
15,
4945,
286,
1077,
296,
17,
284,
296,
15997,
543,
286,
1077,
716,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_from_angle_y_rotate_vector1() {
let rotation = Rotation3::from_angle_y(Degrees(90_f64));
let vector = Vector3::unit_z();
let expected = Vector3::unit_x();
let result = rotation.rotate_vector(&vector);
assert!(relative_eq!(result, expected, epsilon = 1e-8)... | rust_cleaned_test_functions.jsonl/70491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
4178,
60834,
12247,
16,
368,
341,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
4178,
5432,
791,
7858,
7,
24,
15,
761,
21,
19,
1106,
286,
1077,
4621,
284,
4196,
18,
486,
384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all() {
let src = r#"
This is the headline.
This is the description.
## Parameters
- this is _parameter_ 1.
Description of one.
- this is parameter 2.
Description of two.
## Examples
### Example 1
Subtraction:
```
3 - 2
```
### Example 2
Addition:
```
1 + 1
`... | rust_cleaned_test_functions.jsonl/10008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 785
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
5705,
368,
341,
286,
1077,
2286,
284,
435,
2,
698,
1986,
374,
279,
31163,
382,
1986,
374,
279,
4008,
382,
565,
13522,
271,
12,
419,
374,
716,
16181,
62,
220,
16,
382,
262,
7662,
315,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_expired_proposal() {
let mut context = VMContextBuilder::new();
testing_env!(context.predecessor_account_id(accounts(1)).build());
let mut contract = Contract::new(
Config::test_config(),
VersionedPolicy::Default(vec![accounts(1).into()]),
... | rust_cleaned_test_functions.jsonl/16637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
80221,
21663,
32556,
368,
341,
286,
1077,
5206,
2266,
284,
17792,
1972,
3297,
486,
931,
543,
286,
7497,
15879,
10297,
2147,
6225,
26911,
269,
13500,
842,
91868,
7,
16,
4579,
5834,
1423,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hex_from_string() {
assert_eq_dbg!(Addr(0), "0".parse().unwrap());
assert_eq_dbg!(Addr(42), "42".parse().unwrap());
assert_eq_dbg!(Addr(42), "0x2a".parse().unwrap());
assert_eq_dbg!(Addr(42), "0X2A".parse().unwrap());
} | rust_cleaned_test_functions.jsonl/57485 | {
"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,
32655,
5673,
3904,
368,
341,
262,
2060,
10714,
44124,
10297,
13986,
7,
15,
701,
330,
15,
3263,
6400,
1005,
15454,
1423,
262,
2060,
10714,
44124,
10297,
13986,
7,
19,
17,
701,
330,
19,
17,
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_election_post_circuit_poseidon() {
test_election_post_circuit::<LCTree<PoseidonHasher, U8, U0, U0>>(22_940);
} | rust_cleaned_test_functions.jsonl/105079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
1170,
6333,
666,
37268,
33201,
90456,
368,
341,
262,
1273,
2204,
1170,
6333,
666,
37268,
27638,
43,
1162,
765,
21604,
960,
90456,
6370,
261,
11,
547,
23,
11,
547,
15,
11,
547,
15,
25526,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_gauge() -> Result<(), MetricForwarderError> {
let input = [
"MONITORING",
"cool_service",
"2017-04-26T10:41:09.023Z",
"some_\tstr:12345.6|g",
];
let expected = Metric::Gauge(Gauge {
value: 12345.6,
sa... | rust_cleaned_test_functions.jsonl/132009 | {
"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,
1889,
19392,
368,
1464,
5714,
68843,
52458,
25925,
261,
1454,
29,
341,
286,
1077,
1946,
284,
2278,
310,
330,
21344,
44556,
1718,
756,
310,
330,
42196,
12267,
756,
310,
330,
17,
15,
16,
22,
12,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_host_slaac_and_manual_address_and_prefix_conflict() {
// SLAAC should not overwrite any manually added addresses that may
// conflict with the generated SLAAC address.
let config = Ipv6::DUMMY_CONFIG;
let mut ctx = DummyEventDispatcherBuilder::default().build::<D... | rust_cleaned_test_functions.jsonl/82828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1537
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12848,
643,
4260,
580,
8378,
75428,
6744,
8378,
13974,
16059,
21242,
368,
341,
286,
442,
16797,
96710,
1265,
537,
32216,
894,
20083,
3694,
14230,
429,
1231,
198,
286,
442,
12055,
448,
279,
7907,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_supplicant_wpa2_ccmp128_psk() {
// Create ESS Security Association
let mut supplicant = test_util::get_wpa2_supplicant();
supplicant.start().expect("Failed starting Supplicant");
// Send first message
let (result, updates) = send_fourway_msg1(&mut supplic... | rust_cleaned_test_functions.jsonl/21804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2718
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91480,
35237,
1670,
6595,
17,
28955,
1307,
16,
17,
23,
620,
4886,
368,
341,
286,
442,
4230,
468,
1220,
8234,
10024,
198,
286,
1077,
5206,
90035,
35237,
284,
1273,
18974,
486,
455,
1670,
6595,
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_get_committed_head_one_committed() {
let mut block_tree = create_block_tree();
block_tree.mark_as_committed(id(7), ()).unwrap();
assert_eq!(
block_tree.get_committed_head(&block_tree.heads),
Some(id(6)),
);
} | rust_cleaned_test_functions.jsonl/87725 | {
"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,
3062,
2965,
5483,
13138,
11667,
2965,
5483,
368,
341,
262,
1077,
5206,
2504,
11663,
284,
1855,
7113,
11663,
543,
262,
2504,
11663,
18406,
11898,
2965,
5483,
3724,
7,
22,
701,
1719,
568,
15454,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mkfifo_directory() {
// mkfifo should fail if a directory is given
assert!(mkfifo(&env::temp_dir(), Mode::S_IRUSR).is_err());
} | rust_cleaned_test_functions.jsonl/8987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64861,
74031,
14846,
368,
341,
262,
442,
23789,
74031,
1265,
3690,
421,
264,
6220,
374,
2661,
198,
262,
2060,
10297,
24452,
74031,
2099,
3160,
486,
3888,
4334,
1507,
14562,
486,
50,
17138,
49558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_assignment_expression() {
expect_printed("a = 1", "a = 1;\n");
expect_printed("a = 3 * 3", "a = 3 * 3;\n");
expect_printed("a += 1", "a += 1;\n");
expect_printed("a += 3 * 3", "a += 3 * 3;\n");
expect_printed("a -= 1", "a -= 1;\n");
expect_printed("a -= 3 * 3", "a -= 3 * ... | rust_cleaned_test_functions.jsonl/93428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 744
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51891,
28068,
368,
341,
262,
1720,
10064,
291,
445,
64,
284,
220,
16,
497,
330,
64,
284,
220,
16,
17882,
77,
797,
262,
1720,
10064,
291,
445,
64,
284,
220,
18,
353,
220,
18,
497,
330,
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_from_cash_addr2() -> Result<()> {
let addr =
Address::from_cash_addr("simpleledger:qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq9gud9630")?;
assert_eq!(addr.addr_type(), AddressType::P2PKH);
assert_eq!(
addr.cash_addr(),
"simpleledger:qqqqqqqqqqqq... | rust_cleaned_test_functions.jsonl/16402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
64363,
7387,
17,
368,
1464,
5714,
71698,
341,
286,
1077,
10789,
4035,
310,
9177,
486,
1499,
64363,
7387,
445,
22944,
50704,
25,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
27579,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_literals() {
let doc = paste! {
get_doc!(#[doc = "int=" 0x1 " bool=" true " float=" 0.01])
};
let expected = "int=0x1 bool=true float=0.01";
assert_eq!(doc, expected);
} | rust_cleaned_test_functions.jsonl/36572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49643,
368,
341,
262,
1077,
4629,
284,
24937,
0,
341,
286,
633,
18869,
10297,
13353,
5236,
284,
330,
396,
428,
220,
15,
87,
16,
330,
1807,
428,
830,
330,
2224,
428,
220,
15,
13,
15,
16,
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_read() {
const INITIAL: &'static [u8] = b"abcdef123456";
let rbuf = Rc::new(vec![0; 4].into_boxed_slice());
const EXPECT: &'static [u8] = b"cdef";
let mut f = tempfile().unwrap();
f.write(INITIAL).unwrap();
{
let mut aiocb = AioCb::from_boxed_slice( f.as_raw_fd(),... | rust_cleaned_test_functions.jsonl/7357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
368,
341,
262,
733,
56854,
25,
30136,
1978,
508,
84,
23,
60,
284,
293,
1,
41202,
16,
17,
18,
19,
20,
21,
876,
262,
1077,
435,
5909,
284,
81463,
486,
931,
25592,
20703,
15,
26,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overflow() {
assert_parser_err!("PRINT &H-10", QError::Overflow);
assert_parser_err!("PRINT &H100000000", QError::Overflow);
} | rust_cleaned_test_functions.jsonl/102668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79073,
368,
341,
310,
2060,
18517,
9266,
17223,
24372,
609,
39,
12,
16,
15,
497,
1207,
1454,
486,
42124,
317,
310,
2060,
18517,
9266,
17223,
24372,
609,
39,
16,
15,
15,
15,
15,
15,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_virtio_fs_hotplug_dax_on() {
test_virtio_fs(true, None, "none", &prepare_virtiofsd, true, None)
} | rust_cleaned_test_functions.jsonl/26136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
34470,
33433,
47474,
814,
706,
4470,
368,
341,
286,
1273,
2273,
2106,
815,
34470,
3715,
11,
2240,
11,
330,
6697,
497,
609,
13609,
2273,
2106,
815,
3848,
67,
11,
830,
11,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_keys() {
let mut map = VecMap::new();
map.insert(1, 'a');
map.insert(2, 'b');
map.insert(3, 'c');
let keys = map.keys().collect::<Vec<uint>>();
assert_eq!(keys.len(), 3);
assert!(keys.contains(&1));
assert!(keys.contains(&2));
... | rust_cleaned_test_functions.jsonl/108790 | {
"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,
12631,
368,
341,
286,
1077,
5206,
2415,
284,
11312,
2227,
486,
931,
543,
286,
2415,
7030,
7,
16,
11,
364,
64,
1157,
286,
2415,
7030,
7,
17,
11,
364,
65,
1157,
286,
2415,
7030,
7,
18,
11,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_terse_fs_format() {
let args = ["-f", "-t", "/proc"];
new_ucmd!().args(&args)
.run()
.stdout_is(expected_result(&args));
} | rust_cleaned_test_functions.jsonl/36717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72493,
325,
34470,
8955,
368,
341,
262,
1077,
2827,
284,
4383,
12,
69,
497,
6523,
83,
497,
3521,
15782,
6332,
262,
501,
68887,
2277,
0,
1005,
2116,
2099,
2116,
340,
286,
659,
6108,
741,
286,
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 |
#[test]
fn test_entropy_to_word_number_compatibility() {
for size in (16..32).step_by(4) {
let entropy = vec![1; size];
let mnemonic = Mnemonic::mnemonic(&entropy).unwrap();
let mnemonic_string = mnemonic.to_string();
let mnemonic_from_string = Mnemonic::from(&mnemonic_string... | rust_cleaned_test_functions.jsonl/21414 | {
"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,
50374,
2346,
13533,
5500,
2965,
53053,
368,
341,
262,
369,
1379,
304,
320,
16,
21,
496,
18,
17,
568,
9520,
3710,
7,
19,
8,
341,
286,
1077,
47502,
284,
7486,
20703,
16,
26,
1379,
935,
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... | 2 |
#[test]
fn test_process_make_credential_credential_with_cred_protect() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
let test_policy = CredentialProtectionPolicy::UserVerificat... | rust_cleaned_test_functions.jsonl/35311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1099
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
28230,
666,
30320,
666,
30320,
6615,
73475,
22357,
439,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
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_secret_sharing_3_out_of_5_at_indices() {
let secret: FE = ECScalar::new_random();
let parties = [1, 2, 4, 5, 6];
let (vss_scheme, secret_shares) = VerifiableSS::share_at_indices(3, 5, &secret, &parties);
let mut shares_vec = Vec::new();
shares_vec.push(se... | rust_cleaned_test_functions.jsonl/62238 | {
"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,
21962,
3712,
3249,
62,
18,
6068,
3575,
62,
20,
3752,
18333,
368,
341,
286,
1077,
6234,
25,
27931,
284,
20633,
20639,
486,
931,
22644,
543,
286,
1077,
9677,
284,
508,
16,
11,
220,
17,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint() {
#[derive(Deserialize)]
struct TestUInt {
v: u32,
}
let regex = r"^(?P<v>\+?\d+)$";
assert_eq!(123, from_str::<TestUInt>("123", regex).unwrap().v);
assert_eq!(123, from_str::<TestUInt>("+123", regex).unwrap().v);
asser... | rust_cleaned_test_functions.jsonl/133423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
368,
341,
286,
11506,
27098,
7,
64465,
5563,
286,
2036,
3393,
18777,
341,
310,
348,
25,
575,
18,
17,
345,
286,
555,
286,
1077,
20180,
284,
435,
1,
13268,
30,
47,
39297,
8449,
10,
32620,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recovery_with_expanded_coding_shreds() {
for num_tx in 0..50 {
run_recovery_with_expanded_coding_shreds(num_tx, false);
run_recovery_with_expanded_coding_shreds(num_tx, true);
}
} | rust_cleaned_test_functions.jsonl/22335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91475,
6615,
14214,
6465,
666,
3700,
3712,
53369,
368,
341,
286,
369,
1629,
17805,
304,
220,
15,
496,
20,
15,
341,
310,
1598,
91475,
6615,
14214,
6465,
666,
3700,
3712,
53369,
8068,
17805,
11,
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
] | 2 |
#[test]
fn test_delay() {
let mut d = Delay::new(std::time::Duration::from_secs_f64(0.5));
run_modifier(&mut d, "delay.wav");
} | rust_cleaned_test_functions.jsonl/67271 | {
"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,
22198,
368,
341,
286,
1077,
5206,
294,
284,
39793,
486,
931,
5194,
486,
1678,
486,
12945,
486,
1499,
68718,
761,
21,
19,
7,
15,
13,
20,
3237,
286,
1598,
61773,
2099,
6984,
294,
11,
330,
22263,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_examples() {
let src = r#"
// Package foo does a thing.
//
// This is a description.
//
// ## Examples
//
// ### Using foo
//
// ```
// import "foo"
//
// foo.a
// ```
package ... | rust_cleaned_test_functions.jsonl/9989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3012
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45279,
368,
341,
286,
1077,
2286,
284,
435,
2,
698,
286,
442,
16906,
15229,
1558,
264,
3166,
624,
286,
6475,
286,
442,
1096,
374,
264,
4008,
624,
286,
6475,
286,
442,
7704,
25311,
198,
286,
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_neq_differnt_length() {
// Given:
let a = Counter::from(vec![1, 2]);
let b = Counter::from(vec![1, 2, 3]);
// Then:
assert!(a != b);
} | rust_cleaned_test_functions.jsonl/79517 | {
"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,
13925,
80,
814,
14320,
406,
5118,
368,
341,
310,
442,
16246,
510,
310,
1077,
264,
284,
19735,
486,
1499,
25592,
20703,
16,
11,
220,
17,
2558,
310,
1077,
293,
284,
19735,
486,
1499,
25592,
20703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_basic_functionality() {
let recorder1 = DebuggingRecorder::new();
let snapshotter1 = recorder1.snapshotter();
let recorder2 = DebuggingRecorder::new();
let snapshotter2 = recorder2.snapshotter();
let fanout = FanoutBuilder::default()
.add_recor... | rust_cleaned_test_functions.jsonl/113619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
9174,
2719,
368,
341,
286,
1077,
48835,
16,
284,
11091,
3173,
47023,
486,
931,
543,
286,
1077,
16295,
465,
16,
284,
48835,
16,
52677,
465,
543,
286,
1077,
48835,
17,
284,
11091,
3173,
470... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vcx_disclosed_proof_release() {
let _setup = SetupMocks::init();
let handle = _vcx_disclosed_proof_create_with_request_c_closure(::utils::constants::PROOF_REQUEST_JSON).unwrap();
assert_eq!(vcx_disclosed_proof_release(handle + 1), error::INVALID_DISCLOSED_PROOF_HANDLE.co... | rust_cleaned_test_functions.jsonl/104425 | {
"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,
2273,
25844,
37745,
9259,
86757,
24577,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
3705,
284,
716,
7362,
87,
37745,
9259,
86757,
8657,
6615,
7893,
666,
72823,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resp_array_macro() {
let resp_object = resp_array!["SET", "x"];
let bytes = obj_to_bytes(resp_object);
assert_eq!(b"*2\r\n$3\r\nSET\r\n$1\r\nx\r\n", bytes.as_slice());
let resp_object = resp_array!["RPUSH", "wyz"].append(vec!["a", "b"]);
let bytes = obj_t... | rust_cleaned_test_functions.jsonl/22224 | {
"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,
35160,
3858,
58810,
368,
341,
286,
1077,
9039,
5314,
284,
9039,
3858,
0,
1183,
5884,
497,
330,
87,
6332,
286,
1077,
5820,
284,
2839,
2346,
12524,
20267,
5314,
317,
286,
2060,
10714,
10297,
65,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct() {
let my_struct = MyStruct { x: 4.0, y: 7.0 };
assert_eq!(Ok(my_struct), from_str("MyStruct(x:4,y:7,)"));
assert_eq!(Ok(my_struct), from_str("(x:4,y:7)"));
#[derive(Debug, PartialEq, Deserialize)]
struct NewType(i32);
assert_eq!(Ok(NewType(42)), from_str("NewT... | rust_cleaned_test_functions.jsonl/1658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
368,
341,
262,
1077,
847,
15126,
284,
3017,
9422,
314,
856,
25,
220,
19,
13,
15,
11,
379,
25,
220,
22,
13,
15,
3634,
262,
2060,
10714,
10297,
11578,
13941,
15126,
701,
504,
2895,
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_basic() {
DelayPlusPoolProblem {
input: vec![0.0, 0.0, 0.0, 0.0, 1.0],
pulse: 2,
delay: 0,
stride: 1,
pool_window: 2,
}
.run()
.unwrap()
} | rust_cleaned_test_functions.jsonl/125714 | {
"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,
34729,
368,
341,
262,
39793,
21807,
10551,
31198,
341,
286,
1946,
25,
7486,
20703,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
16,
13,
15,
1259,
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_range_proof_gadget() {
use rand::rngs::OsRng;
use rand::Rng;
let mut rng = OsRng::new().unwrap();
let min = 10;
let max = 100;
let v = rng.gen_range(min, max);
println!("v is {}", &v);
assert!(range_proof_helper(v, min, max).is_ok... | rust_cleaned_test_functions.jsonl/113490 | {
"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,
9698,
86757,
1889,
50931,
368,
341,
286,
990,
10382,
486,
69890,
82,
486,
28867,
49,
968,
280,
286,
990,
10382,
486,
49,
968,
401,
286,
1077,
5206,
28422,
284,
15433,
49,
968,
486,
931,
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_add_instruction_processor_for_invalid_account() {
let (genesis_config, mint_keypair) = create_genesis_config(500);
let mut bank = Bank::new(&genesis_config);
fn mock_ix_processor(
_pubkey: &Pubkey,
_ka: &[KeyedAccount],
_data: &[u8],
... | rust_cleaned_test_functions.jsonl/42428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
54923,
50127,
5478,
31433,
13500,
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... | 1 |
#[test]
fn test_decode_asr_w() {
assert_eq!(
decode_32(0xea4f39e2),
Instruction::ASR_imm {
params: Reg2ShiftNParams {
rd: Reg::R9,
rm: Reg::R2,
shift_n: 15,
setflags: SetFlags::False,
},
... | rust_cleaned_test_functions.jsonl/64818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
11898,
81,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
56570,
19,
69,
18,
24,
68,
17,
1326,
286,
29051,
486,
1911,
49,
71370,
341,
310,
3628,
25,
318... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_for_in_statement() {
expect_printed("for (const a in items) {}", "for (const a in items) {}");
expect_printed("for (var a in items) {}", "for (var a in items) {}");
expect_printed("for (let a in items) {}", "for (let a in items) {}");
expect_printed("for (a in items) {}", "for (a... | rust_cleaned_test_functions.jsonl/93425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
1243,
37404,
368,
341,
262,
1720,
10064,
291,
445,
1958,
320,
1024,
264,
304,
3589,
8,
24689,
330,
1958,
320,
1024,
264,
304,
3589,
8,
4687,
797,
262,
1720,
10064,
291,
445,
1958,
320,
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_struct_matching() {
assert_eq! {
rune! { i64 =>
struct Foo { a, b }
pub fn main() {
let foo = Foo {
a: 1,
b: 2,
};
match foo {
Foo { a, b } => a + b,
... | rust_cleaned_test_functions.jsonl/34514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
70763,
368,
341,
262,
2060,
10714,
0,
341,
286,
63499,
0,
314,
600,
21,
19,
6274,
310,
2036,
33428,
314,
264,
11,
293,
555,
310,
6675,
5168,
1887,
368,
341,
394,
1077,
15229,
284,
33428... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stack_guard() {
let engine = TestEngineBuilder::new().build().unwrap();
let read_pool = ReadPool::from(build_read_pool_for_test(
&CoprReadPoolConfig::default_for_test(),
engine,
));
let cm = ConcurrencyManager::new(1.into());
let mu... | rust_cleaned_test_functions.jsonl/83652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 650
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15528,
36796,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
1349,
15709,
284,
4457,
10551,
486,
1499,
43333,
6443,
15709,
5478,
4452,
1006,
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... | 2 |
#[test]
fn test_enum_schema_duplicate() {
// Duplicate "diamonds"
let schema = Schema::parse_str(
r#"{"type": "enum", "name": "Suit", "symbols": ["diamonds", "spades", "clubs", "diamonds"]}"#,
);
assert!(schema.is_err());
} | rust_cleaned_test_functions.jsonl/108441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
25371,
70434,
368,
341,
286,
442,
71071,
330,
88576,
82,
698,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
55543,
4913,
1313,
788,
330,
9018,
497,
330,
606,
788,
330,
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_encrypt_decrypt_credential() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let private_key = crypto::ecdsa::SecKey::gensk(&mut rng);
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
l... | rust_cleaned_test_functions.jsonl/35320 | {
"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,
66593,
80764,
666,
30320,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
7,
1423,
286,
1077,
869,
3097,
284,
1902... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generic_i64_set() {
let t1 = Generic { data: 2i64 };
assert_eq!(
rune_n! {
make_native_module().expect("failed making native module"),
( t1, ),
i64 =>
pub fn main(v) { v.data = 10; v.data }
},
10
);
} | rust_cleaned_test_functions.jsonl/77915 | {
"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,
41232,
5318,
21,
19,
2602,
368,
341,
262,
1077,
259,
16,
284,
21281,
314,
821,
25,
220,
17,
72,
21,
19,
2605,
262,
2060,
10714,
33673,
286,
63499,
1089,
0,
341,
310,
1281,
44494,
10750,
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_encoding_network_failure() {
// Bitcoin Network structure do not support "Other" networks
bitcoin::Network::strict_decode(&[0xA1u8, 0xA2u8, 0xA3u8, 0xA4u8][..])
.unwrap();
} | rust_cleaned_test_functions.jsonl/43966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
20966,
43618,
368,
341,
286,
442,
13127,
8141,
5944,
653,
537,
1824,
330,
11409,
1,
14155,
198,
286,
17873,
486,
12320,
486,
6627,
15227,
2099,
58,
15,
14673,
16,
84,
23,
11,
220,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issue_264() {
let hdr = indoc! {"
namespace a {
typedef int b;
inline namespace c {}
template <typename> class aa;
namespace c {
template <typename d, typename = d, typename = aa<d>> class e;
}
typedef e<char> f;
template <t... | rust_cleaned_test_functions.jsonl/9880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
17,
21,
19,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
4473,
264,
341,
286,
13501,
526,
293,
280,
286,
7381,
4473,
272,
5613,
286,
3811,
366,
9031,
29,
536,
290... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dir_with_dirs() {
let tempdir = tempfile::tempdir().unwrap();
std::fs::create_dir(tempdir.path().join("abc")).unwrap();
std::fs::create_dir(tempdir.path().join("def")).unwrap();
let request = Request {
path: tempdir.path().to_path_buf(),
};
... | rust_cleaned_test_functions.jsonl/69104 | {
"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,
4334,
6615,
44869,
368,
341,
286,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1460,
486,
3848,
486,
3182,
4334,
9758,
3741,
3875,
1005,
5987,
445,
13683,
15197,
15454,
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_null_terminator_index() {
let bytes = vec![b'\0'; 48];
assert_eq!(null_terminator_index(bytes.as_slice()), 0);
let bytes = vec![b'h', b'i', b'\0'];
assert_eq!(null_terminator_index(bytes.as_slice()), 2);
let bytes = vec![b'h', b'i', b'\0', b'\0'];
... | rust_cleaned_test_functions.jsonl/98280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
62,
22969,
850,
3560,
368,
341,
286,
1077,
5820,
284,
7486,
20703,
65,
15777,
15,
6967,
220,
19,
23,
935,
286,
2060,
10714,
10297,
2921,
62,
22969,
850,
3560,
23158,
5357,
26488,
11858,
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_ripmd160() {
assert_eq!(
ripemd160(b"hello, world"),
[
163, 32, 31, 130, 252, 160, 52, 228, 109, 16, 205, 123, 39, 225, 116, 151, 110, 36,
29, 162
]
);
} | rust_cleaned_test_functions.jsonl/17834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4561,
2277,
16,
21,
15,
368,
341,
286,
2060,
10714,
33673,
310,
23288,
94110,
16,
21,
15,
1883,
1,
14990,
11,
1879,
4461,
310,
2278,
394,
220,
16,
21,
18,
11,
220,
18,
17,
11,
220,
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_helpers() {
common::setup();
let mut test = OsoTest::new();
test.load_file(file!(), "test_file.polar").unwrap();
assert_eq!(
test.query("f(x)"),
vec![
hashmap! { "x" => 1, },
hashmap! { "x" => 2, },
hashmap! { "x" => 3, },
... | rust_cleaned_test_functions.jsonl/30383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54473,
368,
341,
262,
4185,
486,
15188,
1428,
262,
1077,
5206,
1273,
284,
506,
704,
2271,
486,
931,
543,
262,
1273,
5104,
2458,
4866,
0,
1507,
330,
1944,
2458,
556,
7417,
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_extract_chars() {
assert_eq!(extract_chars("", &[0..1]), "".to_string());
assert_eq!(extract_chars("ábc", &[0..1]), "á".to_string());
assert_eq!(extract_chars("ábc", &[0..1, 2..3]), "ác".to_string());
assert_eq!(extract_chars("ábc", &[0..3]), "ábc".to_string());
... | rust_cleaned_test_functions.jsonl/34700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
37418,
368,
341,
286,
2060,
10714,
10297,
23493,
37418,
19814,
44590,
15,
496,
16,
9719,
44907,
983,
3904,
1423,
286,
2060,
10714,
10297,
23493,
37418,
445,
1953,
8904,
497,
44590,
15,
496,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_header() -> io::Result<()> {
let data = [0x00, 0x25, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00];
let mut reader = &data[..];
assert_eq!(read_header(&mut reader)?, (Order::Zero, 37, 7));
Ok(())
} | rust_cleaned_test_functions.jsonl/121772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
8757,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
508,
15,
87,
15,
15,
11,
220,
15,
87,
17,
20,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_error_messages() {
use super::VsockConfigError::*;
use std::io;
let err = CreateVsockDevice(devices::virtio::VsockError::EventFd(
io::Error::from_raw_os_error(0),
));
let _ = format!("{}{:?}", err, err);
} | rust_cleaned_test_functions.jsonl/124164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
23428,
368,
341,
286,
990,
2256,
486,
53,
13199,
2648,
1454,
56162,
286,
990,
1460,
486,
815,
401,
286,
1077,
1848,
284,
4230,
53,
13199,
6985,
17622,
1216,
486,
47381,
815,
486,
53,
13199... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_uint() {
let val = 0xdeadbeef_deadbeef_u64;
assert!(hash(&(val as u64)) != hash(&(val as uint)));
assert_eq!(hash(&(val as u32)), hash(&(val as uint)));
} | rust_cleaned_test_functions.jsonl/7554 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
15807,
368,
341,
286,
1077,
1044,
284,
220,
15,
87,
33754,
1371,
823,
53427,
1371,
823,
7300,
21,
19,
280,
286,
2060,
10297,
8296,
29089,
831,
438,
575,
21,
19,
593,
961,
5175,
29089,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.