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_unexpected_token() {
match Json::from_str("{\"\":\"\",\"\":{\"\":\"\",\"\":[{\"\":\"\",}}}") {
Err(e) => assert_eq!(e, SyntaxError(InvalidSyntax, 1, 32)),
_ => ()
};
} | rust_cleaned_test_functions.jsonl/22770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
7325,
6458,
368,
341,
286,
2432,
8308,
486,
1499,
2895,
99141,
23488,
34333,
92729,
23488,
16215,
22245,
8899,
64238,
23488,
16215,
3417,
55961,
341,
310,
15495,
2026,
8,
589,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_msi_interrupt_group() {
let vmfd = Arc::new(create_vm_fd());
vmfd.create_irq_chip().unwrap();
let rounting = Arc::new(KvmIrqRouting::new(vmfd.clone()));
rounting.initialize().unwrap();
let base = 168;
let count = 32;
let group = MsiIrq::n... | rust_cleaned_test_functions.jsonl/106064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
6321,
42606,
6288,
368,
341,
286,
1077,
10995,
6902,
284,
19689,
486,
931,
32602,
39008,
17676,
1423,
286,
10995,
6902,
2520,
22623,
49514,
1005,
15454,
1428,
286,
1077,
435,
629,
287,
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... | 4 |
#[test]
fn test_try_recv() {
let data = data_lots_of_data().take(100).collect::<Vec<_>>();
// Populate a queue:
let mut sender = SenderBuilder::new()
.segment_size(512)
.open("data/try-recv")
.unwrap();
sender.try_send_batch(&data[..25]).unwr... | rust_cleaned_test_functions.jsonl/95836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
36118,
368,
341,
286,
1077,
821,
284,
821,
907,
2412,
3575,
1769,
1005,
22769,
7,
16,
15,
15,
568,
17384,
27638,
10050,
32399,
79279,
286,
442,
70938,
264,
7177,
510,
286,
1077,
5206,
464... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_service() {
#[derive(Serialize, Deserialize, Debug)]
struct TestServicePayload {
name: String,
age: u64,
sex: bool,
}
#[derive(Serialize, Deserialize, Debug, Default)]
struct TestServiceResponse {
pub message: String,
}
struct Tests<... | rust_cleaned_test_functions.jsonl/11475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12267,
368,
341,
262,
11506,
27098,
3759,
9050,
11,
48440,
11,
11091,
5563,
262,
2036,
3393,
1860,
29683,
341,
286,
829,
25,
923,
345,
286,
4231,
25,
220,
575,
21,
19,
345,
286,
1839,
25,
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_latest_entry_check_gc_fence() {
let engine = TestEngineBuilder::new().build().unwrap();
let (read_ts, expected_result) = prepare_test_data_for_check_gc_fence(&engine);
let expected_result: Vec<_> = expected_result
.into_iter()
.filter_map(|(key, v... | rust_cleaned_test_functions.jsonl/88841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64880,
9078,
7200,
49423,
81073,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
286,
1077,
320,
878,
25023,
11,
3601,
5287,
8,
284,
10549,
4452,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date() {
assert_eq!(
Ok(Date::YMD {
year: 2015,
month: 6,
day: 26,
}),
date("2015-06-26")
);
assert_eq!(
Ok(Date::YMD {
year: -333,
month: 7,
day: 11,
}),
date("-03... | rust_cleaned_test_functions.jsonl/16736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
368,
341,
262,
2060,
10714,
33673,
286,
7622,
19987,
486,
56,
6076,
341,
310,
1042,
25,
220,
17,
15,
16,
20,
345,
310,
2254,
25,
220,
21,
345,
310,
1899,
25,
220,
17,
21,
345,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intervals_firstwords_bold() {
let words = vec!["a", "b", "c", "d", "e"]
.iter()
.map(|x| x.to_string())
.collect();
let intervals = vec![(0, 1)].to_interval_set();
assert_eq!(
get_boldtext_segments_from_intervals(&words, &in... | rust_cleaned_test_functions.jsonl/119099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90807,
12978,
5761,
95677,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
64,
497,
330,
65,
497,
330,
66,
497,
330,
67,
497,
330,
68,
7026,
310,
659,
2015,
741,
310,
659,
2186,
22428,
87,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_strh_reg_w() {
assert_eq!(
decode_32(0xf826c019),
Instruction::STRH_reg {
params: Reg3FullParams {
rt: Reg::R12,
rn: Reg::R6,
rm: Reg::R9,
index: true,
add: true,
... | rust_cleaned_test_functions.jsonl/64831 | {
"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,
15227,
2895,
71,
4920,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
23,
17,
21,
66,
15,
16,
24,
1326,
286,
29051,
486,
6666,
39,
4920,
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_tokenizer_empty() {
let test_str = "";
let tokens: Vec<Token> = Tokens::from_str(test_str).collect();
assert_eq!(tokens, vec![]);
} | rust_cleaned_test_functions.jsonl/109313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
15124,
368,
341,
262,
1077,
1273,
2895,
284,
5438,
262,
1077,
11211,
25,
11312,
83416,
29,
284,
58166,
486,
1499,
2895,
8623,
2895,
568,
17384,
543,
262,
2060,
10714,
10297,
30566,
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 |
#[test]
fn test_no_options_big_input() {
for &n in &[
0,
1,
42,
16 * 1024 - 7,
16 * 1024 - 1,
16 * 1024,
16 * 1024 + 1,
16 * 1024 + 3,
32 * 1024,
64 * 1024,
80 * 1024,
96 * 1024,
112 * 1024,
128 *... | rust_cleaned_test_functions.jsonl/90925 | {
"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,
6536,
8743,
36386,
5898,
368,
341,
262,
369,
609,
77,
304,
609,
9640,
286,
220,
15,
345,
286,
220,
16,
345,
286,
220,
19,
17,
345,
286,
220,
16,
21,
353,
220,
16,
15,
17,
19,
481,
220,
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_extract_fields() {
let rec = StringRecord::from(vec!["Captain", "Sham", "12345"]);
assert_eq!(extract_fields(&rec, &[0..1]), &["Captain"]);
assert_eq!(extract_fields(&rec, &[1..2]), &["Sham"]);
assert_eq!(
extract_fields(&rec, &[0..1, 2..3]),
... | rust_cleaned_test_functions.jsonl/34699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
12132,
368,
341,
286,
1077,
1395,
284,
923,
6471,
486,
1499,
25592,
0,
1183,
61058,
497,
330,
2016,
309,
497,
330,
16,
17,
18,
19,
20,
15049,
286,
2060,
10714,
10297,
23493,
12132,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eth_offset() {
let offsets = SecpSignatureOffsets {
eth_address_offset: std::u16::MAX,
..SecpSignatureOffsets::default()
};
assert_eq!(
test_case(1, &offsets),
Err(Secp256k1Error::InvalidSignature)
);
let of... | rust_cleaned_test_functions.jsonl/47859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57757,
6917,
368,
341,
286,
1077,
35046,
284,
4520,
79,
25088,
81095,
341,
310,
8372,
6744,
6917,
25,
1460,
486,
84,
16,
21,
486,
10586,
345,
310,
5241,
8430,
79,
25088,
81095,
486,
2258,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_contains_failing() {
let mut output = String::new();
let method = StringMethod {
method: "contains",
variable: "$FOO",
pattern: "\"OBI\"",
selection: Select::All,
};
method.handle(&mut output, &VariableExpander... | rust_cleaned_test_functions.jsonl/85270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
761,
14277,
368,
341,
286,
1077,
5206,
2550,
284,
923,
486,
931,
543,
286,
1077,
1714,
284,
923,
3523,
341,
310,
1714,
25,
262,
330,
13372,
756,
310,
3890,
25,
220,
5201,
3788,
46,
756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vrq_f2_00_02() {
#[cfg(feature = "v3")]
init_psa_crypto();
assert!(Voucher::try_from(VRQ_F2_00_02)
.unwrap()
.validate(Some(DEVICE_CRT_F2_00_02))
.is_ok());
} | rust_cleaned_test_functions.jsonl/81743 | {
"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,
42681,
2273,
52189,
761,
17,
62,
15,
15,
62,
15,
17,
368,
341,
262,
11506,
14072,
27062,
284,
330,
85,
18,
5422,
262,
2930,
620,
9081,
78298,
1428,
262,
2060,
10297,
53,
23937,
486,
1539,
5673... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_add_columns() {
let values = vec![Array::new(vec![1, 2, 3]), Array::new(vec![4., 5., 6.])];
let mut df = DataFrame::from_vec(values, vec!["A", "BB", "CC"], vec!["X", "Y"]);
assert_eq!(df.len(), 3);
df.insert(Array::new(vec![10, 11, 12]), "Z");
let e... | rust_cleaned_test_functions.jsonl/33493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
2891,
22590,
368,
341,
286,
1077,
2750,
284,
7486,
20703,
1857,
486,
931,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
9719,
2910,
486,
931,
25592,
20703,
19,
2572,
220,
20,
2572,
220,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_name() -> io::Result<()> {
let mut buf = Vec::new();
let data = b"@r0\n";
let mut reader = &data[..];
buf.clear();
read_name(&mut reader, &mut buf)?;
assert_eq!(buf, b"r0");
let data = b"r0\n";
let mut reader = &data[..];
... | rust_cleaned_test_functions.jsonl/28635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
1269,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
1428,
286,
1077,
821,
284,
293,
96270,
81,
15,
1699,
876,
286,
1077,
5206,
6604,
284,
609,
691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_dep_info_abs_paths() {
let deps = "/foo/foo: /foo/baz.rs /foo/abc.rs /foo/bar.rs
/foo/baz.rs:
/foo/abc.rs:
/foo/bar.rs:
";
assert_eq!(
pathvec!["/foo/abc.rs", "/foo/bar.rs", "/foo/baz.rs"],
parse_dep_info(&deps, "/bar/")
);
} | rust_cleaned_test_functions.jsonl/8168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
49258,
3109,
31170,
24152,
368,
341,
286,
1077,
48178,
284,
3521,
7975,
60555,
25,
608,
7975,
3470,
1370,
25638,
608,
7975,
14,
13683,
25638,
608,
7975,
49513,
25638,
271,
60555,
3470,
1370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gcd() {
assert_eq!(0, 0u8.gcd(0));
assert_eq!(10, 10u8.gcd(0));
assert_eq!(10, 0u8.gcd(10));
assert_eq!(10, 10u8.gcd(20));
assert_eq!(44, 2024u32.gcd(748));
} | rust_cleaned_test_functions.jsonl/106055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
4385,
368,
341,
286,
2060,
10714,
10297,
15,
11,
220,
15,
84,
23,
1302,
4385,
7,
15,
1106,
286,
2060,
10714,
10297,
16,
15,
11,
220,
16,
15,
84,
23,
1302,
4385,
7,
15,
1106,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hierarchy_outgoing_in_different_files() {
check_hierarchy(
r#"
//- /lib.rs
mod foo;
use foo::callee;
fn call$0er() {
callee();
}
//- /foo/mod.rs
pub fn callee() {}
"#,
expect![["caller Function FileId(0) 27..56 30..36"]],
expect![[]],
... | rust_cleaned_test_functions.jsonl/38291 | {
"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,
13429,
95043,
6068,
9546,
1243,
82741,
10931,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
2593,
15229,
280,
810,
15229,
486,
86476,
401,
8822,
1618,
3,
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_snmp_v1_trap_coldstart() {
let bytes = SNMPV1_TRAP_COLDSTART;
match parse_snmp_v1(bytes) {
Ok((rem,pdu)) => {
assert!(rem.is_empty());
assert_eq!(pdu.version, 0);
assert_eq!(&pdu.community as &str, "public");
assert_eq!... | rust_cleaned_test_functions.jsonl/46706 | {
"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,
28022,
1307,
2273,
16,
88536,
666,
813,
2468,
368,
341,
262,
1077,
5820,
284,
88133,
53,
16,
6410,
2537,
920,
7863,
22564,
280,
262,
2432,
4715,
28022,
1307,
2273,
16,
23158,
8,
341,
286,
7622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_ndarray_rgb() {
let test_file = dicom_test_files::path("pydicom/SC_rgb_16bit.dcm").unwrap();
let obj = open_file(test_file).unwrap();
let ndarray = obj
.decode_pixel_data()
.unwrap()
.to_ndarray::<u16>()
.unwrap();
... | rust_cleaned_test_functions.jsonl/22480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
43544,
1653,
37407,
368,
341,
286,
1077,
1273,
2458,
284,
21249,
316,
4452,
10931,
486,
2343,
445,
3288,
29680,
316,
14,
3540,
37407,
62,
16,
21,
4489,
950,
6226,
1827,
15454,
543,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_username_from_url() {
assert_eq!(
extract_cred_from_url("https://user@github.com"),
BasicAuthCredential::new(Some("user".to_owned()), None)
);
} | rust_cleaned_test_functions.jsonl/101750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
21588,
5673,
2903,
368,
341,
197,
6948,
10714,
33673,
298,
8122,
2144,
73475,
5673,
2903,
445,
2428,
1110,
872,
31,
5204,
905,
4461,
298,
12791,
5971,
5087,
48265,
486,
931,
65405,
445,
872... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_splice() {
const CONTENTS: &[u8] = b"abcdef123456";
let mut tmp = tempfile().unwrap();
tmp.write_all(CONTENTS).unwrap();
let (rd, wr) = pipe().unwrap();
let mut offset: loff_t = 5;
let res = splice(tmp.as_raw_fd(), Some(&mut offset),
w... | rust_cleaned_test_functions.jsonl/91358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
4754,
368,
341,
286,
733,
35768,
50,
25,
44590,
84,
23,
60,
284,
293,
1,
41202,
16,
17,
18,
19,
20,
21,
876,
286,
1077,
5206,
4174,
284,
54819,
1005,
15454,
543,
286,
4174,
3836,
5705... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_state_with_pending_credential_request() {
init!("true");
let connection_handle = build_test_connection();
let credential_req:CredentialRequest = CredentialRequest::from_str(CREDENTIAL_REQ_STRING).unwrap();
let (credential_offer, _) = ::credential::parse_jso... | rust_cleaned_test_functions.jsonl/104599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 963
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
4387,
6615,
37861,
666,
30320,
7893,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
3633,
10630,
284,
1936,
4452,
15866,
543,
286,
1077,
40207,
17644,
25,
48265,
1900,
284,
93379,
1900,
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_sha256_with_empty_context_and_nonempty_input() {
let context = TestContext::new(&[]);
let data = b"data";
let mut state = Sha256::new_with_context(&context);
state.write(data);
let digest = state.finish();
assert_eq!(
digest,
[
0x3a, 0x6... | rust_cleaned_test_functions.jsonl/10227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
17,
20,
21,
6615,
15124,
8467,
8378,
21637,
3194,
5898,
368,
341,
262,
1077,
2266,
284,
3393,
1972,
486,
931,
2099,
56703,
262,
1077,
821,
284,
293,
97115,
3302,
262,
1077,
5206,
1584,
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_push_request_new() {
let endpoint = "https://example.com/push/endpoint";
let keys = Keys::new("anetohias===", "oeatssah=");
let req = AddPushRequest::new(endpoint, &keys);
assert_eq!(
req,
AddPushRequest {
endpoint: "htt... | rust_cleaned_test_functions.jsonl/116572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
14218,
7893,
5921,
368,
341,
286,
1077,
14887,
284,
330,
2428,
1110,
8687,
905,
4322,
1116,
14,
32540,
876,
286,
1077,
6894,
284,
24133,
486,
931,
445,
276,
295,
2267,
3473,
418,
21369,
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_carry_into_fractional_with_digits_to_right() {
assert_eq!(decimal("0.0901") + decimal("0.01"), decimal("0.1001"))
} | rust_cleaned_test_functions.jsonl/58128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 64
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
11433,
45514,
59023,
278,
6615,
41432,
2346,
10539,
368,
341,
262,
2060,
10714,
10297,
23289,
445,
15,
13,
15,
24,
15,
16,
899,
488,
12122,
445,
15,
13,
15,
16,
3975,
12122,
445,
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 |
#[test]
fn test_integration_with_table_map() {
let mut rt = Runtime::new().unwrap();
let config = ClientConfigBuilder::default()
.connection_type(ConnectionType::Mock(MockType::Happy))
.mock(true)
.controller_uri(PravegaNodeUri::from("127.0.0.2:9091".to_string... | rust_cleaned_test_functions.jsonl/90784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90250,
6615,
5237,
5376,
368,
341,
286,
1077,
5206,
16677,
284,
10954,
486,
931,
1005,
15454,
543,
286,
1077,
2193,
284,
8423,
2648,
3297,
486,
2258,
741,
310,
659,
7742,
1819,
47218,
929,
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... | 2 |
#[test]
fn test_do_not_import_static_member_functions_when_record_not_supported_yet() {
// only using nested struct as an example of a record we cannot import yet.
let ir = ir_from_cc(
"
struct SomeStruct {
struct NestedStruct {
static void StaticMemberFunction();
... | rust_cleaned_test_functions.jsonl/37200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26309,
7913,
18434,
25360,
19388,
31708,
47636,
14192,
7913,
57885,
4178,
295,
368,
341,
262,
442,
1172,
1667,
24034,
2036,
438,
458,
3110,
315,
264,
3255,
582,
4157,
1159,
3602,
624,
262,
1077,
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_hash_less_values_than_block_size() {
hash_less_values_than_block_size(Sha256::new(), INPUT_BLOCK_SIZE_SHA256);
hash_less_values_than_block_size(Sha512::new(), INPUT_BLOCK_SIZE_SHA512);
hash_less_values_than_block_size(Sha384::new(), INPUT_BLOCK_SIZE_SHA384);
} | rust_cleaned_test_functions.jsonl/23444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
50747,
9146,
51613,
7113,
2368,
368,
341,
286,
5175,
50747,
9146,
51613,
7113,
2368,
7,
62316,
17,
20,
21,
486,
931,
1507,
26149,
18756,
4098,
38096,
17,
20,
21,
317,
286,
5175,
50747,
914... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proof_path_is_branch() {
let b = ProofPath::from_raw(*b"\x00qwertyuiopasdfghjklzxcvbnm123456\xFF");
assert_eq!(b.len(), 255);
assert_eq!(b.is_leaf(), false);
} | rust_cleaned_test_functions.jsonl/25544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
2638,
6892,
28031,
368,
341,
262,
1077,
293,
284,
36991,
1820,
486,
1499,
16067,
4071,
65,
11934,
87,
15,
15,
69291,
1344,
1963,
453,
76615,
866,
73,
10561,
89,
8148,
85,
11081,
76,
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_ptrace_setoptions() {
require_capability!("test_ptrace_setoptions", CAP_SYS_PTRACE);
let err = ptrace::setoptions(getpid(), Options::PTRACE_O_TRACESYSGOOD).unwrap_err();
assert!(err != Errno::EOPNOTSUPP);
} | rust_cleaned_test_functions.jsonl/33734 | {
"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,
4348,
578,
2602,
2875,
368,
341,
262,
1373,
89686,
17223,
1944,
4348,
578,
2602,
2875,
497,
26101,
26783,
20657,
5576,
317,
262,
1077,
1848,
284,
10087,
578,
486,
746,
2875,
5433,
10412,
1507,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_relative_shrink() {
let drawing_area = create_mocked_drawing_area(1000, 1200, |m| {
m.check_draw_rect(move |_, _, _, u, d| {
assert_eq!((100, 100), u);
assert_eq!((300 - 1, 700 - 1), d);
});
m.drop_check(|b| {
... | rust_cleaned_test_functions.jsonl/81502 | {
"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,
29286,
3712,
34365,
368,
341,
286,
1077,
13330,
15030,
284,
1855,
34134,
291,
814,
1696,
15030,
7,
16,
15,
15,
15,
11,
220,
16,
17,
15,
15,
11,
760,
76,
91,
341,
310,
296,
9093,
23021,
16979... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_content_type_media_type_with_no_extension() {
// Media Type
assert_eq!(
map_content_type(Path::new("foo/bar"), Some("application/typescript")),
msg::MediaType::TypeScript
);
assert_eq!(
map_content_type(Path::new("foo/bar"), Some("text/typescript")),
m... | rust_cleaned_test_functions.jsonl/16768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 715
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
7495,
1819,
29173,
1819,
6615,
6536,
31035,
368,
341,
262,
442,
7816,
3990,
198,
262,
2060,
10714,
33673,
414,
2415,
7495,
1819,
33030,
486,
931,
445,
7975,
49513,
3975,
4329,
445,
5132,
203... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aggsig_fuzz() {
let secp = Secp256k1::with_caps(ContextFlag::Full);
let (sk, pk) = secp.generate_keypair(&mut thread_rng()).unwrap();
println!(
"Performing aggsig single context with seckey, pubkey: {:?},{:?}",
sk, pk
);
let mut msg = [0u8; 32];
thread_rng().fill(&mut msg);
... | rust_cleaned_test_functions.jsonl/15036 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
5857,
343,
761,
8889,
368,
341,
197,
10217,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
4197,
52955,
14001,
12135,
486,
9432,
317,
197,
10217,
320,
4886,
11,
22458,
8,
284,
511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prepare_sst_for_ingestion_titan() {
let mut db_opts = DBOptions::new();
let mut titan_opts = TitanDBOptions::new();
// Force all values write out to blob files.
titan_opts.set_min_blob_size(0);
db_opts.set_titandb_options(&titan_opts);
let mut cf_o... | rust_cleaned_test_functions.jsonl/111083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
643,
267,
5478,
59112,
42498,
528,
12849,
368,
341,
286,
1077,
5206,
2927,
32354,
284,
5952,
3798,
486,
931,
543,
286,
1077,
5206,
85512,
32354,
284,
27447,
3506,
3798,
486,
931,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_override_dep() {
Package::new("bar", "0.1.0").publish();
let bar = git::repo(&paths::root().join("override"))
.file("Cargo.toml", &basic_manifest("bar", "0.1.0"))
.file("src/lib.rs", "pub fn bar() {}")
.build();
let p = project()
.file(
"... | rust_cleaned_test_functions.jsonl/81998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 576
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48576,
49258,
368,
341,
262,
16906,
486,
931,
445,
2257,
497,
330,
15,
13,
16,
13,
15,
1827,
27502,
1428,
262,
1077,
3619,
284,
16345,
486,
23476,
2099,
21623,
486,
2888,
1005,
5987,
445,
9199,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool() {
#[derive(Deserialize)]
struct TestBool {
v: bool,
}
let regex = r"^(?P<v>(?i)(true|false))$";
assert!(from_str::<TestBool>("true", regex).unwrap().v);
assert!(!from_str::<TestBool>("false", regex).unwrap().v);
assert!... | rust_cleaned_test_functions.jsonl/133422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
368,
341,
286,
11506,
27098,
7,
64465,
5563,
286,
2036,
3393,
11233,
341,
310,
348,
25,
1807,
345,
286,
555,
286,
1077,
20180,
284,
435,
1,
13268,
30,
47,
39297,
2235,
30,
72,
2376,
186... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_has_extra() {
let deserialized: Value = serde_json::from_str(r#"{ "a": 1, "b": { "c": 2 } }"#).unwrap();
let v: Value = serde_json::from_str(r#"{ "a": 1, "b": { "c": 2, "d": "hi" } }"#).unwrap();
assert!(check(&v, &deserialized).is_err());
} | rust_cleaned_test_functions.jsonl/52333 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
21778,
31858,
368,
341,
286,
1077,
939,
67577,
25,
5162,
284,
61570,
9455,
486,
1499,
2895,
2601,
2,
14129,
330,
64,
788,
220,
16,
11,
330,
65,
788,
314,
330,
66,
788,
220,
17,
335,
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_col_concat() {
let mat1 = m!(1, 2; 3, 4);
let mat2 = m!(5, 6; 7, 8);
let mat3 = mat1.col_concat(mat2);
assert_eq!(mat3, m!(1, 2, 5, 6; 3, 4, 7, 8));
} | rust_cleaned_test_functions.jsonl/61508 | {
"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,
10211,
57478,
368,
341,
286,
1077,
5517,
16,
284,
296,
10297,
16,
11,
220,
17,
26,
220,
18,
11,
220,
19,
317,
286,
1077,
5517,
17,
284,
296,
10297,
20,
11,
220,
21,
26,
220,
22,
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_load_functions_macos() -> Result<(), Error> {
let buffer = ByteView::open("../testutils/fixtures/symcache/current/macos.symc")?;
let symcache = SymCache::parse(&buffer)?;
insta::assert_debug_snapshot_matches!("functions_macos", FunctionsDebug(&symcache));
Ok(())
} | rust_cleaned_test_functions.jsonl/30030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
31708,
22802,
436,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
4147,
284,
10906,
851,
486,
2508,
17409,
1944,
6031,
94275,
2687,
1600,
9360,
74053,
3183,
41647,
50901,
66,
899,
37445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_db_vector() {
use std::mem;
let len: size_t = 4;
let data: *mut u8 = unsafe { libc::calloc(len, mem::size_of::<u8>()) as *mut u8 };
let v = unsafe { DBVector::from_c(data, len) };
let ctrl = [0u8, 0, 0, 0];
assert_eq!(&*v, &ctrl[..]);
} | rust_cleaned_test_functions.jsonl/36612 | {
"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,
8685,
12247,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
1077,
2422,
25,
1379,
528,
284,
220,
19,
280,
262,
1077,
821,
25,
353,
6984,
575,
23,
284,
19860,
314,
42142,
486,
65488,
6901,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_optional() {
assert_parses_cb(
&[
(Ok((Some(true), None)), b"\x01\x01\xff"),
(Ok((Some(false), None)), b"\x01\x01\x00"),
(Ok((None, Some(18))), b"\x02\x01\x12"),
(Ok((Some(true), Some(18))), b"\x01\x01\xff\... | rust_cleaned_test_functions.jsonl/40841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
74644,
368,
341,
286,
2060,
77113,
288,
16450,
1006,
310,
609,
9640,
394,
320,
11578,
1188,
8373,
3715,
701,
2240,
5731,
293,
11934,
87,
15,
16,
3462,
15,
16,
86977,
4461,
394,
320,
11578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_batch_values_def_levels() {
test_read_batch_int32(16, &mut vec![0; 10], Some(&mut vec![0; 10]), None);
test_read_batch_int32(16, &mut vec![0; 16], Some(&mut vec![0; 16]), None);
test_read_batch_int32(16, &mut vec![0; 51], Some(&mut vec![0; 51]), None);
} | rust_cleaned_test_functions.jsonl/64661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
14534,
9146,
7844,
37819,
368,
341,
286,
1273,
6443,
14534,
4042,
18,
17,
7,
16,
21,
11,
609,
6984,
7486,
20703,
15,
26,
220,
16,
15,
1125,
4329,
2099,
6984,
7486,
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 |
#[test]
fn test_de() {
let json = r#"
{
"field": "story_insights",
"value": {
"media_id": "17887498072083520",
"impressions": 444,
"reach": 44,
"taps_forward": 4,
"taps_back": 3,
... | rust_cleaned_test_functions.jsonl/35690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
368,
341,
286,
1077,
2951,
284,
435,
2,
698,
286,
341,
310,
330,
2566,
788,
330,
26485,
34386,
2796,
756,
310,
330,
957,
788,
341,
394,
330,
7399,
842,
788,
330,
16,
22,
23,
23,
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... | 3 |
#[test]
fn test_csp_tags_stripe() {
// This is a regression test for potential PII in stripe URLs. PII stripping used to skip
let json = r#"{
"csp-report": {
"document-uri": "https://example.com",
"blocked-uri": "https://api.stripe.com/v1/tok... | rust_cleaned_test_functions.jsonl/4026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 607
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2154,
16333,
1261,
51091,
368,
341,
286,
442,
1096,
374,
264,
30549,
1273,
369,
4650,
393,
5543,
304,
45542,
35006,
13,
393,
5543,
66670,
1483,
311,
10706,
198,
23459,
286,
1077,
2951,
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_units_minute() {
let vm = &mut VM::new();
vm.set_source("1.0E minute");
vm.evaluate_input();
assert_eq!(vm.last_error(), None);
assert_eq!(vm.f_stack().len(), 1);
let t = vm.f_stack().pop();
assert!(double_value_check(t, 60.0));
} | rust_cleaned_test_functions.jsonl/29591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28345,
76944,
368,
341,
286,
1077,
10995,
284,
609,
6984,
17792,
486,
931,
543,
286,
10995,
980,
10347,
445,
16,
13,
15,
36,
9383,
797,
286,
10995,
36036,
5898,
543,
286,
2060,
10714,
10297,
733... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scan() {
// test the type inference
fn add(old: &mut isize, new: &usize) -> Option<f64> {
*old += *new as isize;
Some(*old as f64)
}
let xs = [0, 1, 2, 3, 4];
let ys = [0f64, 1.0, 3.0, 6.0, 10.0];
let it = xs.iter().scan(0, add);
let mut i = ... | rust_cleaned_test_functions.jsonl/25915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
28857,
368,
341,
262,
442,
1273,
279,
943,
44378,
198,
262,
5168,
912,
21972,
25,
609,
6984,
91373,
11,
501,
25,
609,
51878,
8,
1464,
6959,
63895,
21,
19,
29,
341,
286,
353,
813,
1421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_within() {
fn t(s: &str, i: uint, u: &[String]) {
let mut v = Vec::new();
each_split_within(s, i, |s| { v.push(s.to_string()); true });
assert!(v.iter().zip(u.iter()).all(|(a,b)| a == b));
}
t("", 0, &[]);
t("", 15, &[]);
t("hello", 15, &["hello"... | rust_cleaned_test_functions.jsonl/11174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
72385,
368,
341,
262,
5168,
259,
1141,
25,
609,
495,
11,
600,
25,
2622,
11,
575,
25,
44590,
703,
2467,
341,
286,
1077,
5206,
348,
284,
11312,
486,
931,
543,
286,
1817,
17052,
72385,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dft_assoc() -> Result<(), Box<dyn Error>> {
let parameters = GcPcSaftFunctionalParameters::from_json_segments(
&["1-pentanol"],
"parameters/gc_substances.json",
"parameters/sauer2014_hetero.json",
None,
IdentifierOption::Name,
)
.unwrap();
... | rust_cleaned_test_functions.jsonl/61407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 701
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
723,
18891,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
1077,
5029,
284,
479,
66,
47,
66,
52279,
723,
71271,
9706,
486,
1499,
9455,
55735,
1006,
286,
609,
1183,
16,
2268,
306... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_human_block_sizes2() {
for human_numeric_sort_param in &["-h", "--human-numeric-sort", "--sort=human-numeric"] {
let input = "8981K\n909991M\n-8T\n21G\n0.8M";
new_ucmd!()
.arg(human_numeric_sort_param)
.pipe_in(input)
.succeeds()
... | rust_cleaned_test_functions.jsonl/131589 | {
"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,
86247,
7113,
32159,
17,
368,
341,
262,
369,
3738,
29418,
18435,
4090,
304,
609,
1183,
12,
71,
497,
14482,
25312,
12,
19600,
46540,
497,
14482,
6860,
28,
25312,
12,
19600,
1341,
341,
286,
1077,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_none_or_up_to_none_large() {
let occurence: Occurrences = Occurrences::NoneOrMore;
occurence.check(core::u16::MAX).unwrap();
} | rust_cleaned_test_functions.jsonl/45934 | {
"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,
31488,
8734,
8237,
2346,
31488,
45228,
368,
341,
286,
1077,
2983,
86937,
25,
19927,
33246,
284,
19927,
33246,
486,
4064,
2195,
7661,
280,
286,
2983,
86937,
9093,
47867,
486,
84,
16,
21,
486,
10586... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_polar() {
const N: usize = 10000;
let mut polar = Polar::new(MT19937::new(Some(77027465)));
let v = polar.get_n(N);
println!("{} {}", N, v.iter().sum::<f64>());
assert!(v.iter().sum::<f64>() < (N as f64).sqrt());
} | rust_cleaned_test_functions.jsonl/46979 | {
"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,
620,
7417,
368,
341,
262,
733,
451,
25,
22301,
284,
220,
16,
15,
15,
15,
15,
280,
30779,
30779,
18611,
262,
1077,
5206,
24660,
284,
55896,
486,
931,
3189,
51,
16,
24,
24,
18,
22,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transfer_lamports() {
let from = Pubkey::new_unique();
let from_account = AccountSharedData::new(100, 0, &Pubkey::new(&[2; 32])); // account owner should not matter
let to = Pubkey::new(&[3; 32]);
let to_account = AccountSharedData::new(1, 0, &to); // account owne... | rust_cleaned_test_functions.jsonl/95883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
907,
309,
3394,
368,
341,
286,
1077,
504,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
504,
13500,
284,
8615,
16997,
1043,
486,
931,
7,
16,
15,
15,
11,
220,
15,
11,
609,
29162,
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_visibility_general_other() {
let user = test_model::new_general_user();
let other = test_model::new_general_user();
let (file, _) = test_model::new_file(other.id().clone());
assert!(!file.is_visible_to(&user));
} | rust_cleaned_test_functions.jsonl/5056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71256,
39177,
30456,
368,
341,
286,
1077,
1196,
284,
1273,
5047,
486,
931,
39177,
3317,
543,
286,
1077,
1008,
284,
1273,
5047,
486,
931,
39177,
3317,
543,
286,
1077,
320,
1192,
11,
27439,
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... | 1 |
#[test]
fn test_create_program_address() {
// These tests duplicate the direct tests in solana_program::pubkey
prepare_mockup!(
invoke_context,
transaction_context,
program_id,
bpf_loader::id(),
);
let address = bpf_loader_upgradea... | rust_cleaned_test_functions.jsonl/69894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
25096,
6744,
368,
341,
286,
442,
4220,
7032,
22513,
279,
2118,
7032,
304,
2048,
3362,
25096,
486,
9585,
792,
271,
286,
10549,
34134,
454,
33673,
310,
19873,
8467,
345,
310,
7745,
8467,
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_zlib_flate() {
let bytes = vec!(1, 2, 3, 4, 5);
let deflated = deflate_bytes(bytes.as_slice()).expect("deflation failed");
let inflated = inflate_bytes(deflated.as_slice()).expect("inflation failed");
assert_eq!(inflated.as_slice(), bytes.as_slice());
} | rust_cleaned_test_functions.jsonl/13030 | {
"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,
6415,
2740,
761,
5075,
368,
341,
286,
1077,
5820,
284,
7486,
10297,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
317,
286,
1077,
707,
22076,
284,
92689,
12524,
23158,
5357,
26488,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rfold() {
{
let mut a = Array1::<i32>::default(256);
a += 1;
let mut iter = a.iter();
iter.next();
assert_eq!(iter.rfold(0, |acc, &x| acc + x), a.sum() - 1);
}
// Test strided arrays
{
let mut a = Array1::<i32>::default(256);
... | rust_cleaned_test_functions.jsonl/63383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 675
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
19961,
368,
341,
262,
341,
286,
1077,
5206,
264,
284,
2910,
16,
27638,
72,
18,
17,
6831,
2258,
7,
17,
20,
21,
317,
286,
264,
1421,
220,
16,
280,
286,
1077,
5206,
5367,
284,
264,
19471,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intersection() {
let mut a = HashSet::new();
let mut b = HashSet::new();
assert!(a.intersection(&b).next().is_none());
assert!(a.insert(11));
assert!(a.insert(1));
assert!(a.insert(3));
assert!(a.insert(77));
assert!(a.insert(103))... | rust_cleaned_test_functions.jsonl/24135 | {
"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,
82558,
368,
341,
286,
1077,
5206,
264,
284,
18931,
486,
931,
543,
286,
1077,
5206,
293,
284,
18931,
486,
931,
543,
286,
2060,
10297,
64,
97075,
2099,
65,
568,
3600,
1005,
285,
31488,
5231,
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... | 4 |
#[test]
fn test_bool_from_str() {
assert_eq!(from_str::<bool>("true"), Some(true));
assert_eq!(from_str::<bool>("false"), Some(false));
assert_eq!(from_str::<bool>("not even a boolean"), None);
} | rust_cleaned_test_functions.jsonl/35009 | {
"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,
22159,
5673,
2895,
368,
341,
286,
2060,
10714,
10297,
1499,
2895,
27638,
2641,
13211,
1866,
3975,
4329,
3715,
1106,
286,
2060,
10714,
10297,
1499,
2895,
27638,
2641,
13211,
3849,
3975,
4329,
3576,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_multi_return_func() {
let isa = lookup(triple!("x86_64"))
.expect("expect x86 ISA")
.as_builder()
.finish(Flags::new(builder()));
let mut context = Context::for_function(create_multi_return_function(CallConv::SystemV));
context.func.co... | rust_cleaned_test_functions.jsonl/103558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
12511,
9596,
368,
341,
286,
1077,
51335,
284,
18615,
7624,
3778,
17223,
87,
23,
21,
62,
21,
19,
5455,
310,
659,
17119,
445,
17119,
856,
23,
21,
84290,
1138,
310,
659,
300,
28532,
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_next_random_socket() {
// use env_logger;
let mut io_loop = Runtime::new().unwrap();
let (stream, _) = MdnsStream::new(
SocketAddr::new(*TEST_MDNS_IPV4, BASE_TEST_PORT),
MdnsQueryType::OneShot,
Some(1),
None,
... | rust_cleaned_test_functions.jsonl/23776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
22644,
19555,
368,
341,
286,
442,
990,
6105,
27413,
280,
23459,
286,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1005,
15454,
543,
286,
1077,
320,
4027,
11,
27439,
284,
386,
45226,
3027,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_checksum_in_address() {
let verkey = gen_random_base58_verkey();
let address = unqualified_address_from_verkey(&verkey).unwrap();
let addr_len = address.len();
// Mess up the checksum
let mut bad_addr = replace_char_at(&address, addr_len-1, 'a');
... | rust_cleaned_test_functions.jsonl/72544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
64038,
1243,
6744,
368,
341,
286,
1077,
2739,
792,
284,
4081,
22644,
7651,
20,
23,
26042,
792,
543,
286,
1077,
2621,
284,
650,
36335,
6744,
5673,
26042,
792,
2099,
423,
792,
568,
15454,
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_memory_export_nonexistent() {
let wasm: Vec<u8> = vec![
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x60, 0x00, 0x00,
0x03, 0x02, 0x01, 0x00, 0x07, 0x08, 0x01, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x00, 0x00,
0x0a, 0x04, 0x01, 0x02, 0x00... | rust_cleaned_test_functions.jsonl/10746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
27114,
21637,
64085,
368,
341,
286,
1077,
98263,
25,
11312,
34837,
23,
29,
284,
7486,
90515,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
22,
18,
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 |
#[test]
fn test_install_target_new_file_with_group() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "file";
let dir = "target_dir";
let gid = get_effective_gid();
at.touch(file);
at.mkdir(dir);
let result = ucmd
.arg(file)
.arg("--group")
.arg(gid.to_strin... | rust_cleaned_test_functions.jsonl/47026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
11123,
5921,
2458,
6615,
6288,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
284,
330,
1192,
876,
262,
1077,
5419,
284,
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... | 3 |
#[test]
fn test_invalid_value_type() {
let mut bytecode: Vec<u8> = BIND_HEADER.to_vec();
append_section_header(&mut bytecode, SYMB_MAGIC_NUM, 0);
let instructions = [0x01, 0x01, 0, 0, 0, 0x05, 0x10, 0, 0, 0, 0];
append_section_header(&mut bytecode, INSTRUCTION_MAGIC_NUM, instruc... | rust_cleaned_test_functions.jsonl/24034 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
3142,
1819,
368,
341,
286,
1077,
5206,
75129,
25,
11312,
34837,
23,
29,
284,
91370,
20330,
2389,
13251,
543,
286,
8737,
16221,
8757,
2099,
6984,
75129,
11,
16079,
8412,
49194,
9631,
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_stacked_porep_resume_seal() {
type Tree = DiskTree<PoseidonHasher, U8, U8, U2>;
let rng = &mut XorShiftRng::from_seed(TEST_SEED);
let replica_id = <PoseidonHasher as Hasher>::Domain::random(rng);
let nodes = 64 * get_base_tree_count::<Tree>();
let data: Vec<u8> = (0..... | rust_cleaned_test_functions.jsonl/56522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1787
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
11191,
620,
460,
79,
58132,
3453,
278,
368,
341,
14808,
262,
943,
8942,
284,
38868,
6533,
21604,
960,
90456,
6370,
261,
11,
547,
23,
11,
547,
23,
11,
547,
17,
19421,
262,
1077,
28422,
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... | 6 |
#[test]
fn test_superset() {
let mut e1: EnumSet<Foo> = EnumSet::new();
e1.insert(A);
let mut e2: EnumSet<Foo> = EnumSet::new();
e2.insert(A);
e2.insert(B);
let mut e3: EnumSet<Foo> = EnumSet::new();
e3.insert(C);
assert!(e1.is_subset(&e2));
... | rust_cleaned_test_functions.jsonl/2755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23723,
44146,
368,
341,
286,
1077,
5206,
384,
16,
25,
14086,
1649,
30499,
2624,
29,
284,
14086,
1649,
486,
931,
543,
286,
384,
16,
7030,
4346,
626,
286,
1077,
5206,
384,
17,
25,
14086,
1649,
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_init_can_be_called_with_no_pool_config() {
vcx_shutdown(true);
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE,"false");
settings::set_config_value(settings::CONFIG_WALLET_KEY,settings::TEST_WALLET_KEY);
let wallet_name = "test_init_with_config";
... | rust_cleaned_test_functions.jsonl/19798 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
27421,
21263,
27859,
6615,
6536,
15709,
5332,
368,
341,
286,
24553,
87,
54804,
3715,
317,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
1335,
3849,
797,
286,
5003,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_audio_mode_connection() {
let mut exec = fasync::TestExecutor::new().expect("executor should build");
let (peers, _profile_stream) = setup_connected_peers();
let (proxy, stream) = create_proxy_and_stream::<a2dp::AudioModeMarker>()
.expect("AudioMode proxy sho... | rust_cleaned_test_functions.jsonl/69382 | {
"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,
29688,
7302,
15866,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
80787,
1265,
1936,
797,
286,
1077,
320,
375,
388,
11,
716,
5365,
12673,
8,
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_genesis_storage(){
new_test_ext().execute_with(||{
let native_asset = <NativeAssetId<Test>>::get();
let asset_info: AssetInfo<Test> = <Assets<Test>>::get(native_asset);
assert_eq!(asset_info.total_issuance,FixedU128::from(3000_000_000_000));
let test_acc1: Acc... | rust_cleaned_test_functions.jsonl/100188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
13774,
23310,
3032,
262,
501,
4452,
9927,
1005,
10257,
6615,
79453,
515,
286,
1077,
9867,
42299,
284,
366,
20800,
16604,
764,
71273,
77595,
455,
543,
286,
1077,
9329,
3109,
25,
22605,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cast_date32_to_date64() {
let a = Date32Array::from(vec![10000, 17890]);
let array = Arc::new(a) as ArrayRef;
let b = cast(&array, &DataType::Date64).unwrap();
let c = b.as_any().downcast_ref::<Date64Array>().unwrap();
assert_eq!(864000000000, c.value(0));... | rust_cleaned_test_functions.jsonl/45415 | {
"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,
5303,
4164,
18,
17,
2346,
4164,
21,
19,
368,
341,
286,
1077,
264,
284,
2631,
18,
17,
1857,
486,
1499,
25592,
20703,
16,
15,
15,
15,
15,
11,
220,
16,
22,
23,
24,
15,
2558,
286,
1077,
1334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_replace_add_use_other_anchor_indent() {
check_assist(
replace_qualified_name_with_use,
"
impl std::fmt::Debug<|> for Foo {
}
",
"
use std::fmt::Debug;
impl Debug<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/19566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
2891,
15951,
30456,
56532,
69045,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8290,
62,
36335,
1269,
6615,
15951,
345,
310,
6228,
262,
11605,
1460,
486,
12501,
486,
7939,
27,
91,
29,
369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_char_iterator_no_trailing() {
let data = "\nMäry häd ä little lämb\nLittle lämb\n";
let split: Vec<&str> = data.split('\n').collect();
assert_eq!(split, ["", "Märy häd ä little lämb", "Little lämb", ""]);
let split: Vec<&str> = data.split_terminator('\n').collect();
a... | rust_cleaned_test_functions.jsonl/11133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
9232,
13491,
6536,
3547,
14277,
368,
341,
262,
1077,
821,
284,
2917,
77,
44,
2305,
884,
305,
30875,
12709,
2632,
30005,
3096,
1699,
38103,
30005,
3096,
1699,
3302,
262,
1077,
6718,
25,
1131... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recovery() {
// test that this message can be inserted
let conn = Connection::open_in_memory().expect("could not create in memory DB");
let mut journal = Journal::new(conn).unwrap();
journal.schema_up().unwrap();
let mut authority = create_example();
authority.set_journa... | rust_cleaned_test_functions.jsonl/48173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1018
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91475,
368,
341,
262,
442,
1273,
429,
419,
1943,
646,
387,
21578,
198,
262,
1077,
4534,
284,
11032,
486,
2508,
1243,
19195,
1005,
17119,
445,
28077,
537,
1855,
304,
4938,
5952,
797,
262,
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... | 5 |
#[test]
fn test_stream_round_trip_import() -> Result<()> {
let array = Int32Array::from(vec![Some(2), None, Some(1), None]);
let array: Arc<dyn Array> = Arc::new(array);
_test_round_trip_import(vec![array.clone(), array.clone(), array])
} | rust_cleaned_test_functions.jsonl/107884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
29896,
63883,
18434,
368,
1464,
5714,
71698,
341,
286,
1077,
1334,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
17,
701,
2240,
11,
4329,
7,
16,
701,
2240,
2558,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mv_multiple_folders() {
let (at, mut ucmd) = at_and_ucmd!();
let target_dir = "test_mv_multiple_dirs_dir";
let dir_a = "test_mv_multiple_dir_a";
let dir_b = "test_mv_multiple_dir_b";
at.mkdir(target_dir);
at.mkdir(dir_a);
at.mkdir(dir_b);
ucmd.arg(dir_a)
... | rust_cleaned_test_functions.jsonl/41609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
45233,
83928,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
2169,
4334,
284,
330,
1944,
73187,
45233,
44869,
4334,
876,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shutdown_drop() {
let (_tx_initiate_shutdown, rx_initiate_shutdown) = oneshot::channel();
let (tx_shutdown_event, rx_shutdown_event) = oneshot::channel();
let shutdown = ShutdownHandler::new(rx_initiate_shutdown, tx_shutdown_event);
assert_eq!(shutdown.state(), Sh... | rust_cleaned_test_functions.jsonl/36422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54804,
29584,
368,
341,
286,
1077,
5453,
3998,
6137,
6493,
54804,
11,
19111,
6137,
6493,
54804,
8,
284,
389,
4288,
354,
486,
10119,
543,
286,
1077,
320,
3998,
54804,
6748,
11,
19111,
54804,
6748,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_processing() {
use color_processing::Color;
let hex = "#26dafd";
let base = Color::new_string(hex).unwrap();
println!("base: {}", base.to_rgb_string());
assert_eq!(base.to_rgb_string(), "rgb(38, 218, 253)");
let brighten = base.brighten(0.2... | rust_cleaned_test_functions.jsonl/69880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6714,
58209,
368,
341,
286,
990,
1894,
58209,
486,
1636,
280,
286,
1077,
12371,
284,
5869,
17,
21,
85733,
67,
876,
286,
1077,
2331,
284,
3478,
486,
931,
3904,
44660,
568,
15454,
1428,
286,
13751... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_forbid_response_with_whitespace_between_header_name_and_colon() {
let mut headers = [EMPTY_HEADER; 1];
let mut response = Response::new(&mut headers[..]);
let result = response.parse(RESPONSE_WITH_WHITESPACE_BETWEEN_HEADER_NAME_AND_COLON);
assert_eq!(result, Err(... | rust_cleaned_test_functions.jsonl/125612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
20648,
9655,
6615,
86175,
48302,
8757,
1269,
8378,
10211,
263,
368,
341,
286,
1077,
5206,
7102,
284,
508,
32858,
20330,
26,
220,
16,
935,
286,
1077,
5206,
2033,
284,
5949,
486,
931,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_application() {
let app = glib::Object::new::<SimpleApplication>(&[
("application-id", &"org.gtk-rs.SimpleApplication"),
("flags", &crate::ApplicationFlags::empty()),
])
.unwrap()
.upcast::<crate::Application>();
app.set_ina... | rust_cleaned_test_functions.jsonl/77198 | {
"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,
30015,
38721,
368,
341,
286,
1077,
906,
284,
342,
2740,
486,
1190,
486,
931,
27638,
16374,
4988,
44784,
9640,
310,
3489,
5132,
12897,
497,
609,
1,
1775,
1302,
6242,
3795,
82,
24252,
4988,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fill_struct_fields_default() {
check_fix(
r#"
//- minicore: default
struct TestWithDefault(usize);
impl Default for TestWithDefault {
pub fn default() -> Self {
Self(0)
}
}
struct TestStruct { one: i32, two: TestWithDefault }
fn test_fn() {
let s = TestSt... | rust_cleaned_test_functions.jsonl/127193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
15126,
12132,
9993,
368,
341,
286,
1779,
36060,
1006,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
1638,
198,
1235,
3393,
2354,
3675,
7,
51878,
317,
6383,
7899,
369,
3393,
2354,
3675,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decoding_luma_op() {
let mut state = State::new();
let pixel_a = Pixel { r: 100, g: 100, b: 100, a: 255 };
let pixel_b = Pixel { r: 100, g: 108, b: 100, a: 255 };
let mut source = Vec::new();
state.prev_pixel = pixel_a;
match pixel_b.diff(&pixel_a) {
Some(PixelDif... | rust_cleaned_test_functions.jsonl/69402 | {
"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,
13783,
3700,
907,
13416,
10287,
368,
341,
262,
1077,
5206,
1584,
284,
3234,
486,
931,
543,
262,
1077,
12955,
4306,
284,
27469,
314,
435,
25,
220,
16,
15,
15,
11,
342,
25,
220,
16,
15,
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_root_branch() {
let template = compile("{{ if @root }}Hello World!{{ endif }}");
let context = true;
let context = ::serde_json::to_value(&context).unwrap();
let template_registry = other_templates();
let formatter_registry = formatters();
let stri... | rust_cleaned_test_functions.jsonl/76687 | {
"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,
12993,
28031,
368,
341,
286,
1077,
3811,
284,
19192,
445,
2979,
421,
569,
2888,
3869,
9707,
4337,
0,
2979,
12330,
3869,
797,
286,
1077,
2266,
284,
830,
280,
286,
1077,
2266,
284,
3504,
47024,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eh_frame_fde_out_of_bounds() {
let mut cie = make_test_cie();
cie.version = 1;
let end_of_cie = Label::new();
let mut fde = FrameDescriptionEntry {
offset: 0,
length: 0,
format: Format::Dwarf64,
cie: cie.clone(),
... | rust_cleaned_test_functions.jsonl/9386 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
761,
450,
6068,
3575,
36878,
368,
341,
286,
1077,
5206,
272,
645,
284,
1281,
4452,
666,
645,
543,
286,
272,
645,
19484,
284,
220,
16,
401,
286,
1077,
835,
3575,
666,
645,
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_tags_python() {
let language = get_language("python");
let tags_config = TagsConfiguration::new(language, PYTHON_TAG_QUERY, "").unwrap();
let mut tag_context = TagsContext::new();
let source = br#"
class Customer:
"""
Data about a customer
"""
... | rust_cleaned_test_functions.jsonl/66035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16333,
55869,
368,
341,
262,
1077,
4128,
284,
633,
29021,
445,
12669,
797,
262,
1077,
9492,
5332,
284,
27683,
7688,
486,
931,
60740,
11,
76678,
16592,
31585,
11,
35229,
15454,
543,
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_serialize_bytes() {
assert_eq!(FeatureProposal::Expired.try_to_vec().unwrap(), vec![3]);
assert_eq!(
FeatureProposal::Pending(AcceptanceCriteria {
tokens_required: 0xdeadbeefdeadbeef,
deadline: -1,
})
.try_to_ve... | rust_cleaned_test_functions.jsonl/52892 | {
"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,
88686,
12524,
368,
341,
286,
2060,
10714,
10297,
13859,
98637,
486,
54349,
48779,
2346,
13251,
1005,
15454,
1507,
7486,
20703,
18,
10149,
286,
2060,
10714,
33673,
310,
19998,
98637,
486,
32027,
4346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_owned_nested() {
let gil = Python::acquire_gil();
let py = gil.python();
let obj = get_object(py);
// Ensure that obj does not get freed
let _ref = obj.clone_ref(py);
let obj_ptr = obj.as_ptr();
unsafe {
{
let _... | rust_cleaned_test_functions.jsonl/25426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51973,
66279,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
2839,
284,
633,
5314,
46827,
317,
286,
442,
29279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_module_export() {
let path = std::path::PathBuf::from(env!("WASMEDGE_DIR"))
.join("bindings/rust/wasmedge-sys/tests/data/import.wasm");
let result = Config::create();
assert!(result.is_ok());
let mut config = result.unwrap();
config.bulk_memor... | rust_cleaned_test_functions.jsonl/62634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
27114,
368,
341,
286,
1077,
1815,
284,
1460,
486,
2343,
486,
1820,
15064,
486,
1499,
16978,
17223,
54,
52584,
83693,
8291,
5455,
310,
659,
5987,
445,
65495,
7382,
590,
6324,
300,
2061,
709,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timeout() {
let addr = next_test_ip4();
let listener = t!(TcpListener::bind(&addr));
let mut stream = t!(TcpStream::connect(&("localhost", addr.port())));
t!(stream.set_read_timeout(Some(Duration::from_millis(1000))));
let mut buf = [0; 10];
... | rust_cleaned_test_functions.jsonl/26646 | {
"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,
6443,
20537,
368,
341,
286,
1077,
10789,
284,
1790,
4452,
10385,
19,
543,
286,
1077,
11446,
284,
259,
10297,
77536,
2743,
486,
7666,
2099,
6214,
3237,
286,
1077,
5206,
4269,
284,
259,
10297,
77536... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_join_for_different_types() {
test_join!("a-b", ["a", "b"], "-");
let hyphen = "-".to_string();
test_join!("a-b", [s("a"), s("b")], &*hyphen);
test_join!("a-b", vec!["a", "b"], &*hyphen);
test_join!("a-b", &*vec!["a", "b"], "-");
test_join!("a-b", vec![s("a"), s("b")], "-"... | rust_cleaned_test_functions.jsonl/17589 | {
"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,
31017,
5478,
82741,
9763,
368,
341,
262,
1273,
31017,
17223,
64,
1455,
497,
4383,
64,
497,
330,
65,
7914,
6523,
797,
262,
1077,
6275,
14769,
284,
6523,
3263,
983,
3904,
543,
262,
1273,
31017,
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_full_date() {
let p = Parser::new();
assert_eq!(p.date("1942-12-07").1,
Done("", Date::new_str("1942", "12", "07"))
);
} | rust_cleaned_test_functions.jsonl/27417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
4164,
368,
341,
262,
1077,
281,
284,
21102,
486,
931,
543,
262,
2060,
10714,
10297,
79,
9907,
445,
16,
24,
19,
17,
12,
16,
17,
12,
15,
22,
1827,
16,
345,
414,
27357,
19814,
2631,
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_device_token_access_denied() {
let details = new_device_auth_details(2);
assert_eq!("12345", details.device_code().secret());
assert_eq!("https://verify/here", details.verification_uri().as_str());
assert_eq!("abcde", details.user_code().secret().as_str());
assert_eq!(
... | rust_cleaned_test_functions.jsonl/18631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1030
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9204,
6458,
12759,
49522,
1122,
368,
341,
262,
1077,
3565,
284,
501,
9204,
14014,
13260,
7,
17,
317,
262,
2060,
10714,
17223,
16,
17,
18,
19,
20,
497,
3565,
18355,
4136,
1005,
20474,
1423,
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... | 2 |
#[test]
fn test_extract_too_many_parts() {
let mut map: HashMap<String, String> = HashMap::new();
map.set(
JAEGER_HEADER,
format!("{}:{}:0:1:aa", LONG_TRACE_ID_STR, SPAN_ID_STR),
);
let propagator = Propagator::new();
le... | rust_cleaned_test_functions.jsonl/62660 | {
"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,
2346,
78,
22101,
33217,
368,
341,
310,
1077,
5206,
2415,
25,
10528,
3464,
11,
923,
29,
284,
10528,
486,
931,
543,
310,
2415,
980,
1006,
394,
619,
13669,
8738,
20330,
345,
394,
3561,
17223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_euc_kr_decode() {
// Empty
decode_euc_kr(b"", &"");
// ASCII
decode_euc_kr(b"\x61\x62", "\u{0061}\u{0062}");
decode_euc_kr(b"\x81\x41", "\u{AC02}");
decode_euc_kr(b"\x81\x5B", "\u{FFFD}\x5B");
decode_euc_kr(b"\xFD\xFE", "\u{8A70}");
... | rust_cleaned_test_functions.jsonl/65317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
1754,
4698,
81,
15227,
368,
341,
286,
442,
22228,
198,
286,
16895,
2204,
1754,
4698,
81,
1883,
56323,
609,
3014,
626,
286,
442,
39316,
198,
286,
16895,
2204,
1754,
4698,
81,
1883,
11934,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer_and_range_extend_backwards() {
let buf = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
let mut buf = BufferAndRange::new_from(&buf, 2..8);
assert_eq!(buf.range(), 2..8);
assert_eq!(buf.as_ref(), [2, 3, 4, 5, 6, 7]);
buf.extend_backwards(1);
... | rust_cleaned_test_functions.jsonl/15738 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
8378,
9698,
70265,
3895,
4014,
368,
341,
310,
1077,
6607,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
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_strengthen_four_elem_arr() {
let to_test = vec![0, 1, 2, 3];
let expected = [0, 1, 2, 3, 0, 0, 0, 0];
assert_eq!(strengthen(to_test), expected);
} | rust_cleaned_test_functions.jsonl/54013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
265,
18465,
56142,
28179,
11210,
368,
341,
286,
1077,
311,
4452,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
3601,
284,
508,
15,
11,
220,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_range_includes() {
let range = Range {
specifier: ModuleSpecifier::parse("file:///a.ts").unwrap(),
start: Position {
line: 1,
character: 20,
},
end: Position {
line: 1,
character: 30,
},
};
assert!(range.includes(&Position... | rust_cleaned_test_functions.jsonl/26848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
1243,
7396,
368,
341,
262,
1077,
2088,
284,
16437,
341,
414,
97616,
25,
13711,
87297,
486,
6400,
445,
1192,
60896,
64,
21288,
1827,
15454,
3148,
414,
1191,
25,
12380,
341,
286,
1555,
25,
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_vec3_fmt() {
let a = Vec3::new(1.0, 2.0, 3.0);
assert_eq!(format!("{:?}", a), "Vec3(1.0, 2.0, 3.0)");
assert_eq!(format!("{}", a), "[1, 2, 3]");
} | rust_cleaned_test_functions.jsonl/75029 | {
"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,
13251,
18,
38128,
368,
341,
262,
1077,
264,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
2060,
10714,
10297,
2243,
88928,
25,
52652,
264,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_comment() {
let p = TOMLParser::new();
assert_eq!(p.table_comment(" [table.\"ƭáβℓè\"] #úñïçôřñřôβôƭ\n").1,
Done("\n",
Expression::new(WSSep::new_str(" ", " "), None, Some(Rc::new(TableType::Standard(Table::new_str(
WSSep::new_str("", ""), "table", vec![
... | rust_cleaned_test_functions.jsonl/95654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
17638,
368,
341,
262,
1077,
281,
284,
82465,
43,
6570,
486,
931,
543,
262,
2060,
10714,
10297,
79,
10336,
17638,
445,
508,
2005,
86865,
130,
255,
1953,
51255,
145033,
4458,
75104,
671,
6654,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.