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_http_response_creation() {
let response_expected = HttpResponse {
version: "HTTP/1.1",
status_code: "404",
status_text: "Not Found",
headers: {
let mut h = HashMap::new();
h.insert("Content-Type", "text/html");
Some(h)
},
body: Some... | rust_cleaned_test_functions.jsonl/109137 | {
"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,
25888,
9655,
46163,
368,
341,
262,
1077,
2033,
32190,
284,
17580,
341,
414,
2319,
25,
330,
9230,
14,
16,
13,
16,
756,
414,
2639,
4136,
25,
330,
19,
15,
19,
756,
414,
2639,
4326,
25,
330,
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_collapse_too_much() {
let items = string_vec_to_status(&[
"a/b",
"a2/c",
]);
//0 a/
//1 b
//2 a2/
//3 c
let mut res = StatusTree::default();
res.update(&items).unwrap();
res.collapse(&String... | rust_cleaned_test_functions.jsonl/34460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
10786,
2346,
78,
717,
1387,
368,
341,
286,
1077,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
310,
330,
64,
3470,
497,
2303,
310,
330,
64,
17,
2899,
497,
715,
286,
22712,
286,
442,
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_proc_cached_option() {
assert!(proc_cached_option(2).is_some());
assert!(proc_cached_option(4).is_some());
assert!(proc_cached_option(1).is_some());
assert!(proc_cached_option(6).is_none());
assert!(proc_cached_option(6).is_none());
assert!(proc_cached_option(2).is_some()... | rust_cleaned_test_functions.jsonl/13133 | {
"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,
24436,
64369,
9672,
368,
341,
262,
2060,
10297,
15782,
64369,
9672,
7,
17,
568,
285,
61855,
1423,
262,
2060,
10297,
15782,
64369,
9672,
7,
19,
568,
285,
61855,
1423,
262,
2060,
10297,
15782,
64369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_long_int() {
assert_eq!(parse_long_int(&[0, 0, 0, 0][..]), Ok((EMPTY, 0)));
assert_eq!(parse_long_int(&[255, 255, 255, 255][..]), Ok((EMPTY, -1)));
} | rust_cleaned_test_functions.jsonl/25453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
17799,
4042,
368,
341,
286,
2060,
10714,
10297,
6400,
17799,
4042,
2099,
58,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
1457,
496,
9719,
7622,
1188,
32858,
11,
220,
15,
4945,
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_ord() {
let cases = vec![
(Some("2"), Some(50i64)),
(Some("23"), Some(50i64)),
(Some("2.3"), Some(50i64)),
(Some(""), Some(0i64)),
(Some("你好"), Some(14990752i64)),
(Some("にほん"), Some(14909867i64)),
(Some(... | rust_cleaned_test_functions.jsonl/19732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 463
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67324,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
8373,
445,
17,
3975,
4329,
7,
20,
15,
72,
21,
19,
6965,
310,
320,
8373,
445,
17,
18,
3975,
4329,
7,
20,
15,
72,
21,
19,
6965,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iter_incomplete_frame_slice() {
assert!(FrameIter::new(&[0, 0, 0, 1], 100).next().is_none());
} | rust_cleaned_test_functions.jsonl/50127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 62
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
1243,
14737,
8929,
26488,
368,
341,
286,
2060,
10297,
4369,
8537,
486,
931,
2099,
58,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
1125,
220,
16,
15,
15,
568,
3600,
1005,
285,
31488,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_align_up() {
assert_eq!(align_up(2, 0).unwrap_err(), Error::InvalidAlignment);
assert_eq!(align_up(2, 1).unwrap(), 2);
assert_eq!(align_up(2, 2).unwrap(), 2);
assert_eq!(align_up(2, 4).unwrap(), 4);
assert_eq!(align_up(2, 3).unwrap_err(), Error::Inva... | rust_cleaned_test_functions.jsonl/90287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
37015,
8237,
368,
341,
286,
2060,
10714,
10297,
6612,
8237,
7,
17,
11,
220,
15,
568,
15454,
9266,
1507,
4600,
486,
7928,
7033,
317,
286,
2060,
10714,
10297,
6612,
8237,
7,
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... | 1 |
#[test]
fn test_if_none_match() {
let mut if_none_match: ::Result<IfNoneMatch>;
let r: Raw = b"*".as_ref().into();
if_none_match = Header::parse_header(&r);
assert_eq!(if_none_match.ok(), Some(IfNoneMatch::Any));
let r: Raw = b"\"foobar\", W/\"weak-etag\"".as_ref().into... | rust_cleaned_test_functions.jsonl/59629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
31488,
10708,
368,
341,
286,
1077,
5206,
421,
31488,
10708,
25,
3504,
2077,
27,
2679,
4064,
8331,
19421,
286,
1077,
435,
25,
23022,
284,
293,
61593,
3263,
300,
7793,
1005,
18122,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply_without_alpha_rgb() {
let mut rgb = Rgb([0, 0, 0]);
rgb.apply_without_alpha(|s| s + 1);
assert_eq!(rgb, Rgb([1, 1, 1]));
} | rust_cleaned_test_functions.jsonl/46643 | {
"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,
36551,
39904,
26633,
37407,
368,
341,
286,
1077,
5206,
17993,
284,
431,
9511,
2561,
15,
11,
220,
15,
11,
220,
15,
2558,
286,
17993,
13045,
39904,
26633,
22428,
82,
91,
274,
488,
220,
16,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_round() {
let pst = FixedOffset::east(8 * 60 * 60);
let dt = pst.ymd(2018, 1, 11).and_hms_nano(10, 5, 13, 084_660_684);
assert_eq!(dt.round_subsecs(10), dt);
assert_eq!(dt.round_subsecs(9), dt);
assert_eq!(dt.round_subsecs(8).nanosecond(), 084_660_680);
... | rust_cleaned_test_functions.jsonl/95657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 721
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
368,
341,
286,
1077,
43802,
284,
20149,
6446,
486,
60501,
7,
23,
353,
220,
21,
15,
353,
220,
21,
15,
317,
286,
1077,
7594,
284,
43802,
13,
1600,
67,
7,
17,
15,
16,
23,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_len1() {
let nums = vec![13];
let mut sap = SumPairs::new(&nums);
assert_eq!(sap.next(), None);
assert_eq!(sap.next(), None);
} | rust_cleaned_test_functions.jsonl/2008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
6043,
16,
368,
341,
286,
1077,
10307,
284,
7486,
20703,
16,
18,
935,
286,
1077,
5206,
34635,
284,
8116,
54228,
486,
931,
2099,
26350,
626,
286,
2060,
10714,
10297,
64613,
4529,
1507,
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,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rejects_unsupported_configurations() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let mut builder = TestMediaTaskBuilder::new_reconfigurable();
let mut stream =
Stream::build(make_sbc_endpoint(1, avdtp::EndpointType::So... | rust_cleaned_test_functions.jsonl/125331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
583,
82,
4907,
18216,
5332,
21449,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
1077,
5206,
7363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_create_tx_set_witness_script_p2wsh() {
use bitcoin::hashes::hex::FromHex;
let (wallet, _, _) =
get_funded_wallet("wsh(pk(cVpPVruEDdmutPzisEsYvtST1usBR3ntr8pXSyt6D2YYqXRyPcFW))");
let addr = wallet.get_new_address().unwrap();
let (psbt, _) = wallet
... | rust_cleaned_test_functions.jsonl/11340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
2602,
1670,
8091,
14660,
620,
17,
86,
927,
368,
341,
286,
990,
17873,
486,
8296,
288,
486,
17308,
486,
3830,
20335,
401,
286,
1077,
320,
35735,
11,
8358,
27439,
4035,
310,
633,
761,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shr() {
assert_eq!(u5(8) >> 1usize, u5(4));
assert_eq!(u5(8) >> 1u8, u5(4));
assert_eq!(u5(8) >> 1u16, u5(4));
assert_eq!(u5(8) >> 1u32, u5(4));
assert_eq!(u5(8) >> 1u64, u5(4));
assert_eq!(u5(8) >> 1isize, u5(4));
assert_eq!(u5(8) >> 1i8, ... | rust_cleaned_test_functions.jsonl/112534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
81,
368,
341,
286,
2060,
10714,
10297,
84,
20,
7,
23,
8,
3578,
220,
16,
51878,
11,
575,
20,
7,
19,
1106,
286,
2060,
10714,
10297,
84,
20,
7,
23,
8,
3578,
220,
16,
84,
23,
11,
575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unknown_field() {
assert_de_tokens_error::<StructDenyUnknown>(
&[
Token::Struct {
name: "StructDenyUnknown",
len: 1,
},
Token::Str("a"),
Token::I32(0),
Token::Str("d"),
],
"unk... | rust_cleaned_test_functions.jsonl/129515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
5013,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
9422,
23619,
88,
13790,
17055,
286,
609,
9640,
310,
9660,
486,
9422,
341,
394,
829,
25,
330,
9422,
23619,
88,
13790,
756,
394,
2422,
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_faulty_vcpu_fd() {
use std::os::unix::io::FromRawFd;
let badf_errno = libc::EBADF;
let faulty_vcpu_fd = VcpuFd {
vcpu: unsafe { File::from_raw_fd(-2) },
kvm_run_ptr: KvmRunWrapper {
kvm_run_ptr: mmap_anonymous(10),
... | rust_cleaned_test_functions.jsonl/92517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2729
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70097,
88,
2273,
16475,
17676,
368,
341,
286,
990,
1460,
486,
436,
486,
56646,
486,
815,
486,
3830,
20015,
74476,
401,
286,
1077,
3873,
69,
37363,
284,
42142,
486,
8264,
91263,
401,
286,
1077,
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_simple_append() {
let mut read_buf: [u8; 1024] = [0; 1024];
let mut hash_function = DefaultHasher::new();
MAIN_KEY.hash(&mut hash_function);
let tickv = AsyncTicKV::<FlashCtrl, 1024>::new(FlashCtrl::new(), &mut read_buf, 0x1000);
let ... | rust_cleaned_test_functions.jsonl/2688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 833
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
26041,
368,
341,
310,
1077,
5206,
1349,
10363,
25,
508,
84,
23,
26,
220,
16,
15,
17,
19,
60,
284,
508,
15,
26,
220,
16,
15,
17,
19,
935,
310,
1077,
5206,
5175,
9174,
284,
7899,
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... | 4 |
#[test]
fn test_crud() {
common::reset_db();
let mut srv = common::start_test_server();
let request = post_request(&mut srv);
let response = srv.execute(request.send()).expect("Failed to execute request send");
assert!(response.status().is_success(), "Sent initial POST, expected SUCCESS");
... | rust_cleaned_test_functions.jsonl/59870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32331,
661,
368,
341,
262,
4185,
486,
9716,
8685,
543,
262,
1077,
5206,
43578,
284,
4185,
486,
2468,
4452,
12015,
1428,
262,
1077,
1681,
284,
1736,
7893,
2099,
6984,
43578,
317,
262,
1077,
2033,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_redundant_learner() -> Result<()> {
let mut set = ProgressSet::new(default_logger());
let default_progress = Progress::new(0, 256);
let mut canary_progress = Progress::new(0, 256);
canary_progress.matched = CANARY;
set.insert_learner(1, default_prog... | rust_cleaned_test_functions.jsonl/48659 | {
"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,
17678,
1288,
1054,
303,
517,
62,
93595,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
738,
284,
16033,
1649,
486,
931,
18978,
27413,
1423,
286,
1077,
1638,
27200,
284,
16033,
486,
931,
7,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_empty_string() {
let arena = Arena::new();
assert_syntaxes(
&parse(&arena, "\"\"", &lang()),
&[Syntax::new_atom(
&arena,
vec![SingleLineSpan {
line: 0.into(),
start_col: 0,
... | rust_cleaned_test_functions.jsonl/52644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15124,
3904,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
1428,
286,
2060,
78894,
288,
1006,
310,
609,
6400,
2099,
30527,
11,
15898,
55853,
609,
5205,
14702,
310,
44590,
33890,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peer_connection() {
const LOCAL_PORT: u32 = 1026;
const PEER_PORT: u32 = 1025;
let mut ctx = MuxerTestContext::new("peer_connection");
// Test peer connection refused.
ctx.init_pkt(LOCAL_PORT, PEER_PORT, uapi::VSOCK_OP_REQUEST);
ctx.send();
... | rust_cleaned_test_functions.jsonl/37600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
15866,
368,
341,
286,
733,
42501,
12377,
25,
575,
18,
17,
284,
220,
16,
15,
17,
21,
280,
286,
733,
21804,
640,
12377,
25,
575,
18,
17,
284,
220,
16,
15,
17,
20,
401,
286,
1077,
5206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_app_error_from_reqwest() {
BlockingClient::builder()
.build()
.unwrap()
.get("http://bad-url")
.send()
.map_or_else(|e| assert!(matches!(AppError::from(e), AppError::Api(_))), |_| panic!());
} | rust_cleaned_test_functions.jsonl/63279 | {
"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,
8191,
4096,
5673,
17644,
11039,
368,
341,
286,
81945,
2959,
486,
17850,
741,
310,
659,
5834,
741,
310,
659,
15454,
741,
310,
659,
455,
445,
1254,
1110,
13855,
25443,
1138,
310,
659,
6681,
741,
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_large_gas_limit() {
figment::Jail::expect_with(|jail| {
let gas = u64::MAX;
jail.create_file(
"foundry.toml",
&format!(
r#"
[default]
gas_limit = "{}"
"#,
... | rust_cleaned_test_functions.jsonl/128668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
82116,
14763,
368,
341,
286,
4144,
478,
486,
41,
604,
486,
17119,
6615,
22428,
73,
604,
91,
341,
310,
1077,
6819,
284,
575,
21,
19,
486,
10586,
280,
310,
17540,
2520,
2458,
1006,
394,
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_create_hardware_spec_duplicate() {
let mut context_builder = ContextBuilder::new();
context_builder.log_in(&[RoleType::SpecCreator]);
let conn = context_builder.db_conn();
// We'll test collisions against this
HardwareSpecFactory::default().name("HW 1").insert(conn);
le... | rust_cleaned_test_functions.jsonl/61183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1523,
37750,
13594,
70434,
368,
341,
262,
1077,
5206,
2266,
28532,
284,
9608,
3297,
486,
931,
543,
262,
2266,
28532,
1665,
1243,
2099,
58,
9030,
929,
486,
8327,
31865,
2558,
262,
1077,
4534,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_color_update() {
let mut node = Node::new(
String::from("a"),
Some("askjhkjh"),
Color::Red,
None,
None,
None,
);
node.update_color(Color::Black);
assert_eq!(Color::Black, node.get_color()... | rust_cleaned_test_functions.jsonl/61992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
6714,
8882,
368,
341,
286,
1077,
5206,
2436,
284,
6018,
486,
931,
1006,
310,
923,
486,
1499,
445,
64,
4461,
310,
4329,
445,
1073,
74306,
74,
74306,
4461,
310,
3478,
486,
6033,
345,
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_is_locked_out_empty() {
let tower = Tower::new(EpochStakes::new_for_tests(2), 0, 0.67);
let descendants = HashMap::new();
assert!(!tower.is_locked_out(0, &descendants));
} | rust_cleaned_test_functions.jsonl/113936 | {
"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,
6892,
60271,
6068,
15124,
368,
341,
286,
1077,
21271,
284,
21938,
486,
931,
10722,
79,
4953,
623,
2050,
486,
931,
5478,
32509,
7,
17,
701,
220,
15,
11,
220,
15,
13,
21,
22,
317,
286,
1077,
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_decode_tst_imm_w() {
assert_eq!(
decode_32(0xf0113f80),
Instruction::TST_imm {
params: RegImmCarryNoSetFlagsParams {
rn: Reg::R1,
imm32: Imm32Carry::Carry {
imm32_c0: (0x80808080, false),
... | rust_cleaned_test_functions.jsonl/64843 | {
"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,
15227,
528,
267,
71370,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
15,
16,
16,
18,
69,
23,
15,
1326,
286,
29051,
486,
51,
784,
71370,
341,
310,
3628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_introspection_string() -> () {
unsafe {
use std::ffi::CStr;
let x = rosidl_typesupport_introspection_c__get_message_type_support_handle__std_msgs__msg__String();
let members = (*x).data as *const rosidl_typesupport_introspection_c__MessageMembers;
... | rust_cleaned_test_functions.jsonl/28019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 633
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
3630,
16076,
3904,
368,
1464,
1719,
341,
286,
19860,
341,
310,
990,
1460,
486,
53799,
486,
34,
2580,
401,
310,
1077,
856,
284,
926,
21027,
75,
9763,
2800,
4042,
3630,
16076,
666,
563,
455,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partial_variable_number() {
use Token::*;
let (tokens, maybe_error) = tokenize_string("add v from");
assert_eq!(tokens, vec![Add]);
assert_eq!(maybe_error.unwrap().kind(), ErrorKind::InvalidData);
} | rust_cleaned_test_functions.jsonl/78246 | {
"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,
52068,
14635,
5500,
368,
341,
286,
990,
9660,
56162,
286,
1077,
320,
30566,
11,
7196,
4096,
8,
284,
77651,
3904,
445,
718,
348,
504,
797,
286,
2060,
10714,
10297,
30566,
11,
7486,
20703,
2212,
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 |
#[test]
fn test_get_filtered_indexed_accounts_limit_exceeded() {
let (genesis_config, _mint_keypair) = create_genesis_config(500);
let mut account_indexes = AccountSecondaryIndexes::default();
account_indexes.indexes.insert(AccountIndex::ProgramId);
let bank = Arc::new(Bank::new_... | rust_cleaned_test_functions.jsonl/28908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
51429,
3560,
291,
55665,
14763,
2702,
94206,
368,
341,
286,
1077,
320,
77894,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
1077,
5206,
2692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hslv_str_parsing() {
// test normal
let hsl = parse_hsl_hsv_tuple("(123, 40%, 40%)").unwrap();
assert_eq!(hsl.0.round() as u8, 123u8);
assert_eq!((hsl.1 * 100.).round() as u8, 40u8);
assert_eq!((hsl.2 * 100.).round() as u8, 40u8);
// test hue angle... | rust_cleaned_test_functions.jsonl/134572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
3226,
85,
2895,
620,
28598,
368,
341,
286,
442,
1273,
4622,
198,
286,
1077,
305,
3226,
284,
4715,
1523,
3226,
1523,
3492,
21773,
31732,
16,
17,
18,
11,
220,
19,
15,
13384,
220,
19,
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_source_code_hash() {
assert_eq!(
"a3e29aece8d35a19bf9da2bb1c086af71fb36ed5",
source_code_hash("hello.ts", b"1+2")
);
// Different source_code should result in different hash.
assert_eq!(
"914352911fc9c85170908ede3df1128d690dda41",
source_code_hash("hello.t... | rust_cleaned_test_functions.jsonl/75244 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10347,
4136,
8950,
368,
341,
262,
2060,
10714,
33673,
414,
330,
64,
18,
68,
17,
24,
5918,
346,
23,
67,
18,
20,
64,
16,
24,
13233,
24,
3235,
17,
6066,
16,
66,
15,
23,
21,
2577,
22,
16,
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_push() {
macro_rules! t(
(s: $path:expr, $join:expr) => (
{
let path = $path;
let join = $join;
let mut p1 = Path::new(path);
let p2 = p1.clone();
p1.push(join)... | rust_cleaned_test_functions.jsonl/102768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 652
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
5987,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
400,
2343,
280,
503,
1077,
5138,
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_no_features() -> Result<()> {
let options = CommonOptions::from_iter_safe(vec!["foo", "--wasm-features=-all"])?;
let WasmFeatures {
reference_types,
multi_value,
bulk_memory,
module_linking,
simd,
threads,
... | rust_cleaned_test_functions.jsonl/73300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
14965,
368,
1464,
5714,
71698,
341,
286,
1077,
2606,
284,
7718,
3798,
486,
1499,
11723,
34067,
25592,
0,
1183,
7975,
497,
14482,
86,
10530,
12,
20304,
10829,
541,
1341,
89720,
286,
1077,
467... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_grouping() {
expression_grouped("(fname > 0)")
.expect("Expecting name > 5");
expression("(fname > 0)")
.expect("Expecting name > 5");
} | rust_cleaned_test_functions.jsonl/114458 | {
"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,
6288,
287,
368,
341,
286,
7493,
6288,
291,
31732,
23993,
861,
220,
15,
19107,
310,
659,
17119,
445,
17536,
287,
829,
861,
220,
20,
797,
286,
7493,
31732,
23993,
861,
220,
15,
19107,
310,
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 |
#[test]
fn test_grid_indices() {
let mut grid = Grid::new(4);
assert_eq!(grid.verts.len(), 16);
assert_eq!(grid.edges.len(), 24);
assert_eq!(grid.faces.len(), 9);
for i in 0..3 {
assert_eq!(grid.edges[i].face_index[0], None);
}
for i in 9..12... | rust_cleaned_test_functions.jsonl/92062 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 860
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15604,
18333,
368,
341,
286,
1077,
5206,
5827,
284,
10587,
486,
931,
7,
19,
317,
286,
2060,
10714,
10297,
4203,
13,
28163,
19406,
1507,
220,
16,
21,
317,
286,
2060,
10714,
10297,
4203,
44354,
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... | 6 |
#[test]
fn test_pruned_different_types() {
test_helpers::maybe_start_logging();
// Ensure pruning works even when different chunks have
// different types for the columns
// column1 < 100
let observer = TestObserver::new();
le... | rust_cleaned_test_functions.jsonl/47402 | {
"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,
5294,
48883,
82741,
9763,
368,
341,
286,
1273,
54473,
486,
36760,
4906,
59982,
543,
286,
442,
29279,
85192,
4278,
1496,
979,
2155,
26757,
614,
198,
286,
442,
2155,
4494,
369,
279,
8147,
271,
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_get_ting_cards() {
let laizi_cards = vec![0x61];
let ml = MahjongLogic {
valid_colors: vec![0, 1, 2],
laizi_cards_set: laizi_cards.clone().into_iter().collect(),
contain_qidui: true,
};
let cards = vec![38,34,34,23,22,21,21,19,19,18,7,5,4,2];
let m =... | rust_cleaned_test_functions.jsonl/22183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
528,
287,
41357,
368,
1476,
262,
1077,
1187,
33235,
41357,
284,
7486,
20703,
15,
87,
21,
16,
935,
262,
1077,
15739,
284,
16171,
98460,
26751,
341,
286,
2697,
33670,
25,
7486,
20703,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tailn() {
let m = list_from(&[0,1,2,3,4,5]);
assert_eq!(m.tailn(0), m);
assert_eq!(m.tailn(3), m.tail().tail().tail());
} | rust_cleaned_test_functions.jsonl/64459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35471,
77,
368,
341,
286,
1077,
296,
284,
1140,
5673,
2099,
58,
15,
11,
16,
11,
17,
11,
18,
11,
19,
11,
20,
2558,
286,
2060,
10714,
10297,
76,
38711,
77,
7,
15,
701,
296,
317,
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 |
#[test]
fn test_from_cow_slice() {
let slice: &[i32] = &[1, 2, 3];
test_from_cow!(slice: &[i32]);
} | rust_cleaned_test_functions.jsonl/122376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 62
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
666,
363,
26488,
368,
341,
262,
1077,
15983,
25,
44590,
72,
18,
17,
60,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
935,
262,
1273,
5673,
666,
363,
10297,
24963,
25,
44590,
72,
18,
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 |
#[test]
fn test_cdq_cqo() {
assert_emit!(0x99; emit_cdq);
assert_emit!(0x48, 0x99; emit_cqo);
} | rust_cleaned_test_functions.jsonl/85451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43074,
80,
666,
80,
78,
368,
341,
286,
2060,
69082,
10297,
15,
87,
24,
24,
26,
16691,
43074,
80,
317,
286,
2060,
69082,
10297,
15,
87,
19,
23,
11,
220,
15,
87,
24,
24,
26,
16691,
666,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_basics() {
let mut x: ChunkedVecBytes = ChunkedVecBytes::with_capacity(0);
x.push(None);
x.push(Some("我好菜啊".as_bytes().to_vec()));
x.push(None);
x.push(Some("我菜爆了".as_bytes().to_vec()));
x.push(Some("我失败了".as_bytes().to_vec()));
assert_eq!(... | rust_cleaned_test_functions.jsonl/105137 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
67981,
368,
341,
286,
1077,
5206,
856,
25,
45513,
291,
10050,
7078,
284,
45513,
291,
10050,
7078,
486,
4197,
35603,
7,
15,
317,
286,
856,
2552,
26717,
317,
286,
856,
2552,
65405,
445,
35946... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rent_complex() {
solana_logger::setup();
let mock_program_id = Pubkey::new(&[2u8; 32]);
#[derive(Serialize, Deserialize)]
enum MockInstruction {
Deduction,
}
fn mock_process_instruction(
_first_instruction_account: usize,
... | rust_cleaned_test_functions.jsonl/28833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
41522,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
7860,
25096,
842,
284,
22611,
792,
486,
931,
2099,
58,
17,
84,
23,
26,
220,
18,
17,
10149,
286,
11506,
27098,
3759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_vec_list_insert_after_panic_index_out_of_bounds() {
let mut list = VecList::new();
let index_1 = list.push_back(0);
list.push_back(1);
let index_2 = list.push_back(2);
list.remove(index_1);
list.pack_to_fit();
list.insert_after(index_2, 3)... | rust_cleaned_test_functions.jsonl/11533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
2019,
17678,
19844,
620,
31270,
3560,
6068,
3575,
36878,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1077,
1922,
62,
16,
284,
1140,
2552,
3895,
7,
15,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bridge_conflict_ty_fn() {
let hdr = indoc! {"
namespace a {
struct Key { int a; };
}
namespace b {
inline void Key() {}
}
"};
let rs = quote! {};
run_test("", hdr, rs, &["a::Key", "b::Key"], &[]);
} | rust_cleaned_test_functions.jsonl/9899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54944,
16059,
21242,
53171,
15246,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
4473,
264,
341,
310,
2036,
5309,
314,
526,
264,
26,
2605,
286,
456,
286,
4473,
293,
341,
310,
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_dropped_task() {
LocalExecutor::default().run(async {
let gate = Gate::new();
let running = Rc::new(Cell::new(false));
let task = gate
.spawn(enclose!((running) async move {
running.set(true);
}))
... | rust_cleaned_test_functions.jsonl/38630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
41716,
12184,
368,
341,
286,
8774,
25255,
486,
2258,
1005,
6108,
18285,
341,
310,
1077,
18126,
284,
29243,
486,
931,
543,
310,
1077,
4303,
284,
81463,
486,
931,
82530,
486,
931,
3576,
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_repeated_join() {
let pool = Pool::<ThunkWorker<()>>::with_name("repeated join test".into(), 8);
let test_count = Arc::new(AtomicUsize::new(0));
for _ in 0..42 {
let test_count = test_count.clone();
pool.execute(Thunk::of(move || {
... | rust_cleaned_test_functions.jsonl/22904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
41954,
31017,
368,
341,
286,
1077,
7314,
284,
22728,
27638,
38223,
21936,
27,
368,
77595,
4197,
1269,
445,
265,
41954,
5138,
1273,
3263,
18122,
1507,
220,
23,
317,
286,
1077,
1273,
3180,
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... | 5 |
#[test]
fn test_search_file_rel_path() {
let sf = SearchFile::new(".".to_string(), "searcher.rs".to_string(), FileType::Code);
assert_eq!(sf.filepath(), "./searcher.rs");
} | rust_cleaned_test_functions.jsonl/113976 | {
"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,
10716,
2458,
13557,
2638,
368,
341,
286,
1077,
13124,
284,
7542,
1703,
486,
931,
445,
36911,
983,
3904,
1507,
330,
1836,
261,
25638,
3263,
983,
3904,
1507,
93238,
486,
2078,
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 |
#[test]
fn test_hardcoded_union_deserialization() {
// We are testing separately representation compatibility between versions for unions as it
// is pretty awkward to implement PartialEq for unions.
// The union instance size at a certain version will be equal with the max size of the available
... | rust_cleaned_test_functions.jsonl/11255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77712,
65530,
51621,
15768,
50563,
368,
341,
262,
442,
1205,
525,
7497,
25156,
13042,
24748,
1948,
10795,
369,
28490,
438,
432,
198,
262,
442,
374,
5020,
28759,
311,
4211,
55039,
369,
28490,
382,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_struct_class() {
Python::with_gil(|py| {
let typeobj = py.get_type::<TupleClass>();
assert!(typeobj.call((), None).is_err());
py_assert!(py, typeobj, "typeobj.__name__ == 'TupleClass'");
});
} | rust_cleaned_test_functions.jsonl/80101 | {
"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,
21773,
15126,
4790,
368,
341,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
286,
1077,
943,
2295,
284,
4510,
670,
1819,
27638,
28681,
1957,
3913,
286,
2060,
10297,
1313,
2295,
8524,
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_set() {
let mut db = InheritedInMemory::default();
let mut vec = OwnedList::create(&mut db, None).unwrap();
for i in 0..100 {
assert_eq!(vec.len(), i);
vec.push(&mut db, Default::default()).unwrap();
}
for i in 0..100 {
vec.set(&mut db, i, i.into()).unwrap();
}
for i in ... | rust_cleaned_test_functions.jsonl/111545 | {
"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,
2602,
368,
341,
197,
10217,
5206,
2927,
284,
758,
48394,
641,
10642,
486,
2258,
543,
197,
10217,
5206,
7486,
284,
20547,
38301,
486,
3182,
2099,
6984,
2927,
11,
2240,
568,
15454,
1428,
197,
2023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transaction_argument_byte_array_canonical_serialization_example() {
let input = TransactionArgument::U8Vector(vec![0xCA, 0xFE, 0xD0, 0x0D]);
let expected_output: Vec<u8> = vec![0x04, 0x04, 0xCA, 0xFE, 0xD0, 0x0D];
let actual_output = to_bytes(&input).unwrap();
assert_eq!(expect... | rust_cleaned_test_functions.jsonl/8056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
9025,
19737,
3858,
27421,
22391,
25602,
2022,
39304,
368,
341,
262,
1077,
1946,
284,
17869,
9171,
486,
52,
23,
3781,
25592,
20703,
15,
86443,
11,
220,
15,
41381,
11,
220,
15,
15764,
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_src_file_to_url_2() {
let (_temp_dir, deno_dir) = test_setup();
assert_eq!("hello", deno_dir.src_file_to_url("hello"));
assert_eq!("/hello", deno_dir.src_file_to_url("/hello"));
let x = deno_dir.deps_https.join("hello/world.txt");
assert_eq!(
"https://hello/world.txt",
... | rust_cleaned_test_functions.jsonl/72749 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16274,
2458,
2346,
2903,
62,
17,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
543,
262,
2060,
10714,
17223,
14990,
497,
3371,
78,
4334,
14681,
2458,
2346,
2903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_assignment_targets() {
assert_syntax_error("2 + 2 = x;");
assert_error_eq("(2 + 2) = x;", ParseError::InvalidAssignmentTarget);
assert_error_eq("++-x;", ParseError::InvalidAssignmentTarget);
assert_error_eq("(x && y)--;", ParseError::InvalidAssignmentTarget);
} | rust_cleaned_test_functions.jsonl/7977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
51891,
41997,
368,
341,
262,
2060,
78894,
4096,
445,
17,
488,
220,
17,
284,
856,
34649,
262,
2060,
4096,
10714,
31732,
17,
488,
220,
17,
8,
284,
856,
32503,
14775,
1454,
486,
7928,
41613,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doesnt_accept_wrong_ip() {
let s = socket_established();
let tcp_repr = TcpRepr {
seq_number: REMOTE_SEQ + 1,
ack_number: Some(LOCAL_SEQ + 1),
payload: &b"abcdef"[..],
..SEND_TEMPL
};
let ip_repr = IpRepr::Unspe... | rust_cleaned_test_functions.jsonl/1792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 745
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96374,
406,
35728,
75198,
10385,
368,
341,
286,
1077,
274,
284,
7575,
18583,
5102,
291,
1428,
286,
1077,
28051,
68535,
284,
64876,
693,
649,
341,
310,
12981,
5500,
25,
25587,
19158,
50045,
488,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_s_expression_empty() -> IonResult<()> {
let mut cursor = ion_cursor_for(&[0xC0]);
assert_eq!(cursor.next()?, Some(Value(IonType::SExpression, false)));
cursor.step_in()?;
assert_eq!(cursor.next()?, None);
cursor.step_out()?;
Ok(())
} | rust_cleaned_test_functions.jsonl/82751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
643,
28068,
15124,
368,
1464,
44805,
2077,
71698,
341,
286,
1077,
5206,
8128,
284,
27672,
28601,
5478,
2099,
58,
15,
12125,
15,
2558,
286,
2060,
10714,
10297,
17437,
4529,
368,
12622,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dedicated_ref() -> () {
let system = KompactConfig::default().build().expect("System");
let cc = system.create_dedicated(CounterComponent::new);
system.start(&cc);
let cc_ref: ActorRef<Box<dyn Any + Send>> = cc.actor_ref();
let dc = system.create_dedicated... | rust_cleaned_test_functions.jsonl/36827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
291,
10089,
7793,
368,
1464,
1719,
341,
286,
1077,
1849,
284,
730,
14435,
531,
2648,
486,
2258,
1005,
5834,
1005,
17119,
445,
2320,
797,
286,
1077,
12527,
284,
1849,
2520,
814,
291,
10089,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_match_body_with_partial_json_string() {
let _m = mock("POST", "/")
.match_body(Matcher::PartialJsonString(
"{\"hello\": \"world\"}".to_string(),
))
.create();
let (status, _, _) = request_with_body("POST /", "", r#"{"hello":"world", "foo": "bar"}"#);
... | rust_cleaned_test_functions.jsonl/82394 | {
"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,
10708,
14114,
6615,
52068,
9455,
3904,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
2946,
497,
3521,
1138,
286,
659,
6347,
14114,
3189,
28058,
486,
37314,
5014,
703,
1006,
310,
54734,
14990,
1169... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_02() {
let x = "x".to_string();
let y = "y".to_string();
// Initiailise heap
let mut heap = SyntacticHeap::<Term>::new();
let e1 = Expr::new(&mut heap,Term::Var(x.clone()));
let e2 = Expr::new(&mut heap,Term::Var(y.clone()));
let e3 = Expr::new(&mut hea... | rust_cleaned_test_functions.jsonl/39132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
62,
15,
17,
368,
341,
262,
1077,
856,
284,
330,
87,
3263,
983,
3904,
543,
262,
1077,
379,
284,
330,
88,
3263,
983,
3904,
543,
262,
442,
31397,
604,
1064,
17364,
198,
262,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_store_client_state_ok() {
let gp_client_id = ClientId::new(ClientType::Grandpa, 0).unwrap();
let gp_client_state = GPClientState::new(
ChainId::new("ibc".to_string(), 0),
Height::default(),
Height::default(),
)
.unwrap();
let gp_client_state = AnyClientState::Grandpa(gp_client_state)... | rust_cleaned_test_functions.jsonl/60058 | {
"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,
14809,
8179,
4387,
19817,
368,
341,
10217,
28705,
8179,
842,
284,
8423,
764,
486,
931,
46851,
929,
486,
40151,
6595,
11,
220,
15,
568,
15454,
1428,
10217,
28705,
8179,
4387,
284,
23690,
2959,
1397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_conjugate() {
let x = Complex::new(3.0, 4.0);
let z: Complex = x.conjugate();
assert_that(3.0, is(close_to(z.get_real(), 1.0e-5)));
assert_that(-4.0, is(close_to(z.get_imaginary(), 1.0e-5)));
} | rust_cleaned_test_functions.jsonl/43836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
47702,
349,
368,
341,
286,
1077,
856,
284,
22096,
486,
931,
7,
18,
13,
15,
11,
220,
19,
13,
15,
317,
286,
1077,
1147,
25,
22096,
284,
856,
2862,
47702,
349,
543,
286,
2060,
70197,
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_color_cast() {
let c1 = Lab::<_, D65>::new(30.0, -50.0, 76.0);
assert_relative_eq!(c1.color_cast(), c1);
assert_relative_eq!(c1.color_cast(), Lab::new(30.0f32, -50.0, 76.0));
assert_relative_eq!(c1.color_cast::<f32>().color_cast(), c1);
} | rust_cleaned_test_functions.jsonl/952 | {
"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,
6714,
5303,
368,
341,
286,
1077,
272,
16,
284,
11607,
27638,
6878,
422,
21,
20,
6831,
931,
7,
18,
15,
13,
15,
11,
481,
20,
15,
13,
15,
11,
220,
22,
21,
13,
15,
317,
286,
2060,
29286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_1024() {
let mut t: Turbine<TestSlot> = Turbine::new(1024);
let e1 = t.ep_new().unwrap();
let _event_processor = t.ep_finalize(e1);
assert!(t.current_pos == 0);
// fill the buffer but don't roll over
for i in 1u64..1023 {
t.wri... | rust_cleaned_test_functions.jsonl/65713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
62,
16,
15,
17,
19,
368,
341,
286,
1077,
5206,
259,
25,
8705,
46561,
71273,
19877,
29,
284,
8705,
46561,
486,
931,
7,
16,
15,
17,
19,
317,
286,
1077,
384,
16,
284,
259,
33376,
5921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qdiscs() {
let qdiscs = Runtime::new().unwrap().block_on(_get_qdiscs());
let qdisc_of_loopback_nic = &qdiscs[0];
assert_eq!(qdisc_of_loopback_nic.header.family, AF_UNSPEC as u8);
assert_eq!(qdisc_of_loopback_nic.header.index, 1);
assert_eq!(qdisc_of_loopback_nic.header.ha... | rust_cleaned_test_functions.jsonl/50942 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8976,
16822,
82,
368,
341,
262,
1077,
2804,
16822,
82,
284,
10954,
486,
931,
1005,
15454,
1005,
4574,
4470,
2490,
455,
8976,
16822,
82,
1423,
262,
1077,
2804,
16822,
3575,
17198,
1419,
1089,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let buffer: [u8; 21] = [
0x62, 0x13, 0x30, 0x39, 0x86, 0x0F, 0x26, 0x00, 0x04, 0x68, 0x61, 0x68, 0x61, 0x00, 0x06,
0x68, 0x65, 0x68, 0x65, 0x38, 0x39,
];
let mut packet = PubrelPacket::<1>::new();
let res = packet.decode(&mut BuffReader::new(&buffer, 21... | rust_cleaned_test_functions.jsonl/112258 | {
"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,
15227,
368,
341,
262,
1077,
4147,
25,
508,
84,
23,
26,
220,
17,
16,
60,
284,
2278,
286,
220,
15,
87,
21,
17,
11,
220,
15,
87,
16,
18,
11,
220,
15,
87,
18,
15,
11,
220,
15,
87,
18,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extract_stream() {
fn run(v: &str) -> String {
extract_stream(&Version::parse(v).unwrap())
}
assert_eq!("main", run("0.1.3"));
assert_eq!("main", run("0.1.0"));
assert_eq!("rc", run("0.1.3-rc"));
assert_eq!("rc", run("0.1.3-rc-1"));
assert_eq!("rc-big", run("0.1.3-rc-big-1"));
... | rust_cleaned_test_functions.jsonl/110094 | {
"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,
39123,
12673,
368,
341,
197,
40095,
1598,
3747,
25,
609,
495,
8,
1464,
923,
341,
298,
8122,
2144,
12673,
2099,
5637,
486,
6400,
3747,
568,
15454,
2398,
197,
197,
630,
197,
6948,
10714,
17223,
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,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_server() {
let tmpdir = TempDir::new().unwrap();
let sock = tmpdir.as_path().to_str().unwrap().to_owned() + "/test_sock1";
let server = Arc::new(Server::new(&sock).unwrap());
assert_eq!(server.state.active_workers.load(Ordering::Relaxed), 0);
Server::... | rust_cleaned_test_functions.jsonl/2121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 630
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
12015,
368,
341,
286,
1077,
4174,
3741,
284,
19944,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
11087,
284,
4174,
3741,
5357,
2638,
1005,
983,
2895,
1005,
15454,
1005,
983,
51973,
368,
488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str() {
context!(ctx, dev);
execute_str!(ctx, b"*STR? 'STRING'" => result, response {
assert_eq!(result, Ok(()));
assert_eq!(response, b"\"STRING\"\n");
});
execute_str!(ctx, b"*STR? CHRDATA" => result, _response {
assert_eq!(re... | rust_cleaned_test_functions.jsonl/82170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
368,
341,
286,
2266,
10297,
3773,
11,
3483,
317,
286,
9026,
2895,
10297,
3773,
11,
293,
61593,
6666,
30,
364,
16468,
14913,
589,
1102,
11,
2033,
341,
310,
2060,
10714,
10297,
1382,
11,
762... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_struct_function_refs_outside_module() {
check(
r#"
mod foo {
pub struct Foo;
impl Foo {
pub fn new<|>() -> Foo { Foo }
}
}
fn main() {
let _f = foo::Foo::new();
}
"#,
expect![[r#"
new Function FileId(0) 54..81 61..64 ... | rust_cleaned_test_functions.jsonl/47784 | {
"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,
21814,
15126,
9174,
60638,
6068,
2929,
10750,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2593,
15229,
341,
262,
6675,
2036,
33428,
401,
262,
11605,
33428,
341,
286,
6675,
5168,
501,
27,
91,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cint_in_pod_struct() {
let hdr = indoc! {"
#include <string>
struct A {
int a;
};
inline uint32_t take_a(A a) {
return a.a;
}
"};
let rs = quote! {
let a = ffi::A {
a: 32,
};
assert_eq... | rust_cleaned_test_functions.jsonl/9864 | {
"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,
666,
396,
1243,
85337,
15126,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
917,
397,
286,
2036,
362,
341,
310,
526,
264,
280,
286,
2605,
286,
7381,
2622,
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_min_abbreviation_2() {
let set = vec!["ap3", "a3e", "2p2", "3le", "3l1", "1p3"]
.into_iter()
.map(String::from)
.collect::<HashSet<String>>();
assert!(set.contains(&Solution::min_abbreviation(
String::from("apple"),
vec!... | rust_cleaned_test_functions.jsonl/120829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
62,
76857,
62,
17,
368,
341,
286,
1077,
738,
284,
7486,
0,
1183,
391,
18,
497,
330,
64,
18,
68,
497,
330,
17,
79,
17,
497,
330,
18,
273,
497,
330,
18,
75,
16,
497,
330,
16,
79,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_by_min_severity() {
timeout_ms(
|| {
let p = setup_default_packet();
let mut p2 = p.clone();
p2.metadata.pid = 0;
p2.metadata.tid = 0;
p2.metadata.severity = LogLevelFilter::Error.into_prim... | rust_cleaned_test_functions.jsonl/76996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 869
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
3710,
7260,
3453,
26472,
368,
341,
286,
9632,
21416,
1006,
310,
1369,
341,
394,
1077,
281,
284,
6505,
9993,
21078,
543,
394,
1077,
5206,
281,
17,
284,
281,
15997,
543,
394,
281,
17,
27544,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_naive_date_time() -> Result<()> {
let db = checked_memory_handle()?;
let date = NaiveDate::from_ymd(2016, 2, 23);
let time = NaiveTime::from_hms(23, 56, 4);
let dt = NaiveDateTime::new(date, time);
db.execute("INSERT INTO foo (t) VALUES (?)", [dt])?;
... | rust_cleaned_test_functions.jsonl/88685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58631,
533,
4164,
3009,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
94136,
286,
1077,
2400,
284,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
16,
21,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_into_iter_debug() {
let mut list = VecList::new();
list.push_back(0);
list.push_back(1);
list.push_back(-1);
list.push_back(2);
list.push_back(-2);
let iter = list.into_iter();
assert_eq!(format!("{:?}", iter), "IntoIter([0, 1, -1,... | rust_cleaned_test_functions.jsonl/11497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
15446,
368,
341,
286,
1077,
5206,
1140,
284,
11312,
852,
486,
931,
543,
286,
1140,
2552,
3895,
7,
15,
317,
286,
1140,
2552,
3895,
7,
16,
317,
286,
1140,
2552,
3895,
4080,
16,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_out_of_range_negative() {
let c: Result<Color, _> = [-10, -256, -1].try_into();
assert!(c.is_err());
} | rust_cleaned_test_functions.jsonl/24501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
6068,
3575,
9698,
53865,
368,
341,
286,
1077,
272,
25,
5714,
88827,
11,
716,
29,
284,
10055,
16,
15,
11,
481,
17,
20,
21,
11,
481,
16,
936,
1539,
45514,
543,
286,
2060,
10297,
66,
2079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_cow_serialize() {
let large_object = vec![1u32, 2, 3, 4, 5, 6];
let mut large_map = HashMap::new();
large_map.insert(1, 2);
#[derive(Serialize, Deserialize, Debug)]
enum Message<'a> {
M1(Cow<'a, Vec<u32>>),
M2(Cow<'a, HashMap<u32, u32>>),
}
// Test ... | rust_cleaned_test_functions.jsonl/11962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
363,
88686,
368,
341,
262,
1077,
3460,
5314,
284,
7486,
20703,
16,
84,
18,
17,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
262,
1077,
5206,
3460,
5376,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_groupby_small_ints() -> Result<()> {
let df = df![
"id_32" => [1i32, 2],
"id_16" => [1i16, 2]
]?;
// https://github.com/pola-rs/polars/issues/1255
let out = df
.lazy()
.groupby([col("id_16"), col("id_32")])
.agg([col("id_16").sum().alias("... | rust_cleaned_test_functions.jsonl/167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
1694,
31966,
4042,
82,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
6764,
90515,
286,
330,
307,
62,
18,
17,
1,
589,
508,
16,
72,
18,
17,
11,
220,
17,
1259,
286,
330,
307,
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... | 5 |
#[test]
fn test_abs_sub() {
assert_eq!((-1f64).abs_sub(1f64), 0f64);
assert_eq!(1f64.abs_sub(1f64), 0f64);
assert_eq!(1f64.abs_sub(0f64), 1f64);
assert_eq!(1f64.abs_sub(-1f64), 2f64);
assert_eq!(NEG_INFINITY.abs_sub(0f64), 0f64);
assert_eq!(INFINITY.abs_sub(1f64),... | rust_cleaned_test_functions.jsonl/7457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31170,
5228,
368,
341,
286,
2060,
10714,
0,
54934,
16,
69,
21,
19,
568,
3435,
5228,
7,
16,
69,
21,
19,
701,
220,
15,
69,
21,
19,
317,
286,
2060,
10714,
10297,
16,
69,
21,
19,
14572,
5228,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_roll() {
let s = "3d6";
let roll: Roll = s.parse().expect("Bad parse");
assert_eq!(roll.dice_count, 3);
assert_eq!(roll.sides, 6);
let mut rng = rand::thread_rng();
let results = roll.roll(&mut rng);
assert_eq!(results.len(), 3);
... | rust_cleaned_test_functions.jsonl/52847 | {
"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,
21039,
57578,
368,
341,
286,
1077,
274,
284,
330,
18,
67,
21,
876,
286,
1077,
6502,
25,
14686,
284,
274,
4632,
1005,
17119,
445,
17082,
4715,
797,
286,
2060,
10714,
10297,
1100,
950,
558,
3180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conf_change_type_str() {
assert_eq!(
conf_change_type_str(ConfChangeType::AddNode),
STR_CONF_CHANGE_ADD_NODE
);
assert_eq!(
conf_change_type_str(ConfChangeType::RemoveNode),
STR_CONF_CHANGE_REMOVE_NODE
);
} | rust_cleaned_test_functions.jsonl/6853 | {
"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,
16059,
15947,
1819,
2895,
368,
341,
286,
2060,
10714,
33673,
310,
2335,
15947,
1819,
2895,
7,
15578,
4072,
929,
486,
2212,
1955,
1326,
310,
12152,
29212,
32523,
8581,
19218,
198,
286,
1439,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_deserialize_move_script_function_id() {
test_serialize_deserialize(
ScriptFunctionId {
module: MoveModuleId {
address: "0x1".parse().unwrap(),
name: "Diem".parse().unwrap(),
},
n... | rust_cleaned_test_functions.jsonl/66280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15768,
9050,
17134,
14660,
9174,
842,
368,
341,
286,
1273,
88686,
15768,
9050,
1006,
310,
13710,
5152,
764,
341,
394,
4688,
25,
14561,
3332,
764,
341,
503,
2621,
25,
330,
15,
87,
16,
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_validate() {
let prompt = Question::float("name").message("message").validate(|i, _| {
if i > 3.0 {
Ok(())
} else {
Err("The number must be more than 3".into())
}
});
let mut backend = helpers::SnapshotOnFlushBackend::new((50, 20).into... | rust_cleaned_test_functions.jsonl/105291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
368,
341,
262,
1077,
9934,
284,
15846,
486,
3649,
445,
606,
1827,
1994,
445,
1994,
1827,
7067,
22428,
72,
11,
85137,
341,
286,
421,
600,
861,
220,
18,
13,
15,
341,
310,
7622,
50432,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bank_deposit() {
let (genesis_block, _mint_keypair) = GenesisBlock::new(100);
let bank = Bank::new(&genesis_block);
// Test new account
let key = Keypair::new();
bank.deposit(&key.pubkey(), 10);
assert_eq!(bank.get_balance(&key.pubkey()), 10);
... | rust_cleaned_test_functions.jsonl/41888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
85798,
368,
341,
286,
1077,
320,
77894,
7113,
11,
716,
67791,
3097,
12670,
8,
284,
40788,
4713,
486,
931,
7,
16,
15,
15,
317,
286,
1077,
6073,
284,
8547,
486,
931,
2099,
77894,
7113,
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_build_rev_states_json() {
init!("true");
let cred1 = CredInfo {
requested_attr: "height".to_string(),
referent: "abc".to_string(),
schema_id: SCHEMA_ID.to_string(),
cred_def_id: CRED_DEF_ID.to_string(),
rev_reg_id: Some... | rust_cleaned_test_functions.jsonl/106031 | {
"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,
20801,
38082,
22972,
9455,
368,
341,
286,
2930,
17223,
1866,
3071,
286,
1077,
4187,
16,
284,
356,
1151,
1731,
341,
310,
11223,
10422,
25,
330,
2563,
3263,
983,
3904,
3148,
310,
8300,
306,
25,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_vector2_parameter() {
let params = match parse_vector2_parameter(FileSpan::new(Rc::new(String::from("\"vector2 test\" [20.5 10]")), Rc::new(String::from("input")))).unwrap().1 {
Parameter::Vector2(i) => i,
_ => panic!()
};
assert_eq!(params.values.len(), 1);
... | rust_cleaned_test_functions.jsonl/68361 | {
"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,
21039,
12247,
17,
24899,
368,
341,
262,
1077,
3628,
284,
2432,
4715,
12247,
17,
24899,
19821,
12485,
486,
931,
2785,
66,
486,
931,
2242,
486,
1499,
38915,
3215,
17,
1273,
2105,
508,
17,
15,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_cmp2() {
assert_eq!(cmp2(1, 2, 3, 4), Less);
assert_eq!(cmp2(3, 2, 3, 4), Less);
assert_eq!(cmp2(5, 2, 3, 4), Greater);
assert_eq!(cmp2(5, 5, 5, 4), Greater);
} | rust_cleaned_test_functions.jsonl/117303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
17,
368,
341,
286,
2060,
10714,
10297,
7293,
17,
7,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
701,
9668,
317,
286,
2060,
10714,
10297,
7293,
17,
7,
18,
11,
220,
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_convert_to_response() {
// Empty Vmm data.
let mut buf: [u8; 66] = [0; 66];
let response = ParsedRequest::convert_to_response(Ok(VmmData::Empty));
assert!(response.write_all(&mut buf.as_mut()).is_ok());
let expected_response = "HTTP/1.1 204 \r\n\
... | rust_cleaned_test_functions.jsonl/43139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
9655,
368,
341,
286,
442,
22228,
647,
3821,
821,
624,
286,
1077,
5206,
6607,
25,
508,
84,
23,
26,
220,
21,
21,
60,
284,
508,
15,
26,
220,
21,
21,
935,
286,
1077,
2033,
284,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_time_less_than_validator_time_in_storage() {
let mut testkit = create_testkit_with_validators(1);
let validator = testkit.network().validators()[0].service_keypair();
let time0 = Utc::now();
let tx0 = validator.report_time(INSTANCE_ID, TxTime::new(time0));
let bl... | rust_cleaned_test_functions.jsonl/21889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
3009,
50747,
51613,
64959,
3009,
1243,
23310,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
1855,
4452,
8226,
6615,
8337,
2973,
7,
16,
317,
262,
1077,
22935,
284,
1273,
8226,
20573,
1005,
594... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resource_path() {
let mut s = String::new();
let resource = ResourceDef::new("/user/{item1}/test");
assert!(resource.resource_path(&mut s, &mut (&["user1"]).iter()));
assert_eq!(s, "/user/user1/test");
let mut s = String::new();
let resource = Res... | rust_cleaned_test_functions.jsonl/2256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 822
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17962,
2638,
368,
341,
286,
1077,
5206,
274,
284,
923,
486,
931,
543,
286,
1077,
5101,
284,
11765,
2620,
486,
931,
4283,
872,
9388,
1203,
16,
4472,
1944,
797,
286,
2060,
10297,
9233,
24013,
2638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ioerror() {
struct Broken;
impl io::Read for Broken {
fn read(&mut self, _buf: &mut [u8]) -> io::Result<usize> {
Err(io::Error::new(io::ErrorKind::BrokenPipe, "uh-oh!"))
}
}
let mut b = io::BufReader::new(Broken);
assert!(read_and_validate(&mut b).... | rust_cleaned_test_functions.jsonl/8307 | {
"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,
16939,
841,
368,
341,
262,
2036,
53583,
280,
262,
11605,
6399,
486,
4418,
369,
53583,
341,
286,
5168,
1349,
2099,
6984,
656,
11,
716,
5909,
25,
609,
6984,
508,
84,
23,
2467,
1464,
6399,
486,
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_render_pkg_readme_w_link() {
let mut pkg = tar::Builder::new(vec![]);
add_file(
&mut pkg,
"foo-0.0.1/Cargo.toml",
br#"
[package]
readme = "README.md"
repository = "https://github.com/foo/foo"
"#,
);
add_file(
&mut pk... | rust_cleaned_test_functions.jsonl/68798 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22781,
64739,
6443,
2660,
1670,
7233,
368,
341,
286,
1077,
5206,
24793,
284,
12183,
486,
3297,
486,
931,
25592,
0,
56703,
286,
912,
2458,
1006,
310,
609,
6984,
24793,
345,
310,
330,
7975,
12,
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_from_duration() {
let d: String = DurationString::try_from(Duration::from_millis(100))
.unwrap()
.into();
assert_eq!(d, String::from("100ms"));
} | rust_cleaned_test_functions.jsonl/97544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
25454,
368,
341,
286,
1077,
294,
25,
923,
284,
21045,
703,
486,
1539,
5673,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
1171,
310,
659,
15454,
741,
310,
659,
18122,
543,
286,
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 |
#[test]
fn test_pacific_atlantic() {
let test_cases = vec![
(vec![
vec![1,2,2,3,5],
vec![3,2,3,4,4],
vec![2,4,5,3,1],
vec![6,7,1,4,5],
vec![5,1,1,2,4]
],
vec![vec![0, 4], vec![1, 3], vec!... | rust_cleaned_test_functions.jsonl/86456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
40483,
3752,
75,
8159,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4083,
90515,
394,
7486,
20703,
16,
11,
17,
11,
17,
11,
18,
11,
20,
1259,
394,
7486,
20703,
18,
11,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_fails_on_nan() {
let a = not_nan(std::f32::INFINITY);
let b = not_nan(std::f32::NEG_INFINITY);
let _c = a + b;
} | rust_cleaned_test_functions.jsonl/80088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
761,
6209,
4470,
73936,
368,
341,
262,
1077,
264,
284,
537,
73936,
5194,
486,
69,
18,
17,
486,
687,
55990,
317,
262,
1077,
293,
284,
537,
73936,
5194,
486,
69,
18,
17,
486,
97127,
91110,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_histogram() {
let image = gray_image!(1u8, 2u8, 3u8, 2u8, 1u8);
let hist = histogram(&image).channels[0];
assert_eq!(hist[0..4], [0, 2, 2, 1]);
} | rust_cleaned_test_functions.jsonl/38566 | {
"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,
68564,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
10297,
16,
84,
23,
11,
220,
17,
84,
23,
11,
220,
18,
84,
23,
11,
220,
17,
84,
23,
11,
220,
16,
84,
23,
317,
286,
1077,
12744,
284,
302... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_package_engines() {
let package_with_engines = r#"{
"engines": {
"node": "8.* || >= 10.*"
}
}"#;
let manifest_engines: RawBinManifest =
serde_json::de::from_str(package_with_engines).expect("Could not deserialize string... | rust_cleaned_test_functions.jsonl/27132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26328,
62102,
1543,
368,
341,
286,
1077,
6328,
6615,
62102,
1543,
284,
435,
55543,
515,
310,
330,
826,
1543,
788,
341,
394,
330,
3509,
788,
330,
23,
4908,
1369,
2604,
220,
16,
15,
4908,
698,
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_call_search_without_args() {
let output = Command::new("./target/release/tio")
.arg("search")
.output()
.expect("failed to search for message");
assert_eq!(String::from_utf8_lossy(&output.stderr), INVALID_SEARCH_ARGS)
} | rust_cleaned_test_functions.jsonl/41468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
10716,
39904,
8384,
368,
341,
286,
1077,
2550,
284,
7348,
486,
931,
13988,
5657,
88648,
5523,
815,
1138,
310,
659,
858,
445,
1836,
1138,
310,
659,
3006,
741,
310,
659,
17119,
445,
16091,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_big() {
let mut rng = weak_rng();
let bitrange_1 = Range::new(14usize, 51);
let mut rand_64 = move || {
let f_bit_1 = bitrange_1.ind_sample(&mut rng);
// how many more bits do we need?
let rem = 64 - f_bit_1;
// we will have a number o... | rust_cleaned_test_functions.jsonl/85354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
36386,
368,
341,
262,
1077,
5206,
28422,
284,
7469,
66849,
543,
262,
1077,
2699,
9669,
62,
16,
284,
16437,
486,
931,
7,
16,
19,
51878,
11,
220,
20,
16,
317,
262,
1077,
5206,
10382,
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... | 6 |
#[test]
fn test_list_all_populated_directory() {
let dir = tempdir();
dir.child("one").touch().unwrap();
dir.child("two").touch().unwrap();
cmd()
.arg("--all")
.arg("--ignore-config")
.arg(dir.path())
.assert()
.stdout(predicate::str::is_match("\\.\n\\.\\.... | rust_cleaned_test_functions.jsonl/626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
5705,
17061,
7757,
14846,
368,
341,
262,
1077,
5419,
284,
2730,
3741,
543,
262,
5419,
17531,
445,
603,
1827,
22020,
1005,
15454,
543,
262,
5419,
17531,
445,
19789,
1827,
22020,
1005,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parent_gt_int32() {
assert_eq!(parent(10_000_000_000), 10_000_000_001);
} | rust_cleaned_test_functions.jsonl/55326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 52
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15960,
37479,
4042,
18,
17,
368,
341,
262,
2060,
10714,
10297,
3765,
7,
16,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
701,
220,
16,
15,
62,
15,
15,
15,
62,
15,
15,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.