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_read_interested() {
let mut r = Reader::new();
r.state = State::Len;
let data = vec![0u8, 0, 0, 1, 2];
test_message(data, Message::Interested);
} | rust_cleaned_test_functions.jsonl/46446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
15318,
9980,
368,
341,
286,
1077,
5206,
435,
284,
25166,
486,
931,
543,
286,
435,
3467,
284,
3234,
486,
11271,
280,
286,
1077,
821,
284,
7486,
20703,
15,
84,
23,
11,
220,
15,
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 |
#[test]
fn test_set() {
assert_eq!(0xFFu8.with_bits(4..8, 2), 0x2F);
assert_eq!(0xFFu8.with_bits(4.., 2), 0x2F);
assert_eq!(0xFFu8.with_bits(0..4, 2), 0xF2);
assert_eq!(0xFFu8.with_bits(..4, 2), 0xF2);
assert_eq!(0xFFu8.with_bits(8..8, 0), 0xFF);
assert_eq!(0xFFu8.with_bits(8.., 0), 0xFF);
assert_eq!(0u3... | rust_cleaned_test_functions.jsonl/52223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
368,
341,
6948,
10714,
10297,
15,
9264,
84,
23,
18164,
20034,
7,
19,
496,
23,
11,
220,
17,
701,
220,
15,
87,
17,
37,
317,
6948,
10714,
10297,
15,
9264,
84,
23,
18164,
20034,
7,
19,
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_generic_argument() {
ok("class A[T](val: T)");
ok("class A[T](var val: T)");
ok("class A[T](let val: T)");
} | rust_cleaned_test_functions.jsonl/84185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
9025,
368,
341,
286,
5394,
445,
1040,
362,
20340,
9533,
831,
25,
350,
20996,
286,
5394,
445,
1040,
362,
20340,
9533,
947,
1044,
25,
350,
20996,
286,
5394,
445,
1040,
362,
20340,
9533,
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 |
#[test]
fn test_weighted_choice() {
// this makes assumptions about the internal implementation of
macro_rules! t {
($items:expr, $expected:expr) => {{
let mut items = $items;
let wc = WeightedChoice::new(&mut items);
... | rust_cleaned_test_functions.jsonl/34897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 979
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
31936,
368,
341,
286,
442,
419,
3643,
31846,
911,
279,
5306,
8129,
315,
79133,
23459,
286,
18072,
21407,
0,
259,
341,
310,
1711,
3615,
96011,
11,
400,
7325,
96011,
8,
589,
80505,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_mut_slice_from() {
let mut values = Vec::from_slice([1u8,2,3,4,5]);
{
let slice = values.mut_slice_from(2);
assert!(slice == [3, 4, 5]);
for p in slice.mut_iter() {
*p += 2;
}
}
assert!(values.as_sli... | rust_cleaned_test_functions.jsonl/58449 | {
"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,
29523,
26488,
5673,
368,
341,
286,
1077,
5206,
2750,
284,
11312,
486,
1499,
26488,
2561,
16,
84,
23,
11,
17,
11,
18,
11,
19,
11,
20,
2558,
286,
341,
310,
1077,
15983,
284,
2750,
744,
332,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_int_decimal_strings() {
let tests: Vec<(&str, i64)> = vec![
("0", 0),
("-5", -5),
("9223372036854775807", i64::max_value()),
("0b1010", 0),
("1.23", 1),
];
for (input, expected) in tests {
let args = ... | rust_cleaned_test_functions.jsonl/119660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
74429,
33500,
368,
341,
286,
1077,
7032,
25,
11312,
27,
2099,
495,
11,
600,
21,
19,
16018,
284,
7486,
90515,
310,
3489,
15,
497,
220,
15,
1326,
310,
98670,
20,
497,
481,
20,
1326,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_diagnostic_timer_format() {
let mut profile_timer = DiagnosticTimer::now();
println!("Debug Format: ");
for _ in 0..20 {
std::thread::spawn(move || {
println!("{:?}", profile_timer);
});
profile_timer.start_record();
... | rust_cleaned_test_functions.jsonl/46223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29477,
11953,
16255,
8955,
368,
341,
286,
1077,
5206,
5526,
16255,
284,
49988,
10105,
486,
3328,
1428,
286,
13751,
17223,
7939,
15042,
25,
7318,
286,
369,
716,
304,
220,
15,
496,
17,
15,
341,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_create_without_indexes() {
let tmp_dir = tempfile::tempdir().unwrap();
let path = tmp_dir.path().join("test_create_without_indexes");
let name = path.to_str().unwrap();
assert!(
DocumentStore::open(name, vec![]).is_err(),
"should not have b... | rust_cleaned_test_functions.jsonl/110730 | {
"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,
8657,
39904,
50161,
368,
341,
286,
1077,
4174,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
4174,
4334,
3875,
1005,
5987,
445,
1944,
8657,
39904,
50161,
797,
286,
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_rsquared() {
let rng = &mut ::rand::thread_rng();
for _ in 0..1000 {
let a = Fr::random(rng);
let b: U256 = a.into();
let c = Fr::new(b).unwrap();
assert_eq!(a, c);
}
for _ in 0..1000 {
let a = Fq::random(rng);
let b: U256 = a.in... | rust_cleaned_test_functions.jsonl/64633 | {
"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,
47115,
34249,
368,
341,
262,
1077,
28422,
284,
609,
6984,
3504,
11335,
486,
4528,
66849,
1428,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
341,
286,
1077,
264,
284,
2869,
486,
11463,
875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_broadcast_dependencies() {
let (mut smp, peers) =
SharedMempoolNetwork::bootstrap_validator_network(2, 1, None, None, false);
let (peer_a, peer_b) = (peers.get(0).unwrap(), peers.get(1).unwrap());
// Peer A has transactions with sequence numbers 0 and 2
smp.add_txns(
... | rust_cleaned_test_functions.jsonl/54558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74923,
71841,
368,
341,
262,
1077,
320,
6984,
274,
1307,
11,
25029,
8,
4035,
286,
16990,
44,
3262,
1749,
12320,
486,
6281,
64959,
20966,
7,
17,
11,
220,
16,
11,
2240,
11,
2240,
11,
895,
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_zinc_symbol_encode() {
let value: Value = Value::make_symbol("test");
assert_eq!(value, Value::make_symbol("test"));
assert_eq!(value.to_zinc_string(), Ok("^test".into()));
} | rust_cleaned_test_functions.jsonl/77328 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
2840,
21179,
11224,
368,
341,
262,
1077,
897,
25,
5162,
284,
5162,
486,
6927,
21179,
445,
1944,
797,
262,
2060,
10714,
10297,
957,
11,
5162,
486,
6927,
21179,
445,
1944,
14929,
262,
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 |
#[test]
fn test_zipmap_compress() {
struct TestRdbHandler {
map: HashMap<String, String>,
}
impl EventHandler for TestRdbHandler {
fn handle(&mut self, data: Event) {
match data {
Event::RDB(rdb) => match rdb {
Object::Hash(hash) => {
... | rust_cleaned_test_functions.jsonl/93097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 774
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
2186,
87845,
368,
341,
262,
2036,
3393,
49,
1999,
3050,
341,
286,
2415,
25,
10528,
3464,
11,
923,
12520,
262,
555,
262,
11605,
31957,
369,
3393,
49,
1999,
3050,
341,
286,
5168,
3705,
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... | 4 |
#[test]
fn test_call_giver() -> Result<(), Box<dyn std::error::Error>> {
let giver_abi_name = "tests/samples/giver.abi.json";
let mut cmd = Command::cargo_bin(BIN_NAME)?;
cmd.arg("config")
.arg("--url")
.arg(&*NETWORK)
.assert()
.success();
let mut cmd = Command::... | rust_cleaned_test_functions.jsonl/118312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
1889,
1524,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
94515,
22885,
72,
1269,
284,
330,
23841,
2687,
4023,
4846,
1524,
22048,
72,
4323,
876,
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... | 3 |
#[test]
fn test_and() {
let compiled = compile("SET B 255\nSET C 345\nAND B C");
let out_cpu = test_program(compiled);
assert_eq!(out_cpu.a.value, 0);
assert_eq!(out_cpu.b.value, 89);
assert_eq!(out_cpu.c.value, 345);
assert_eq!(out_cpu.f.value, 0);
} | rust_cleaned_test_functions.jsonl/63156 | {
"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,
8378,
368,
341,
262,
1077,
19697,
284,
19192,
445,
5884,
425,
220,
17,
20,
20,
1699,
5884,
356,
220,
18,
19,
20,
1699,
3976,
425,
356,
797,
262,
1077,
700,
21795,
284,
1273,
25096,
30008,
2181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default() {
let c = TableCellProperty::new();
let b = c.build();
assert_eq!(str::from_utf8(&b).unwrap(), r#"<w:tcPr />"#);
} | rust_cleaned_test_functions.jsonl/22959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
368,
341,
286,
1077,
272,
284,
84370,
3052,
486,
931,
543,
286,
1077,
293,
284,
272,
13239,
543,
286,
2060,
10714,
10297,
495,
486,
1499,
39453,
23,
2099,
65,
568,
15454,
1507,
435,
2,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_gen_compact_code_blocks() -> io::Result<()> {
let entities = setup();
const ENTITY_FILES: [&str; 6] = [
include_str!("../../tests/compact/cake.rs"),
include_str!("../../tests/compact/cake_filling.rs"),
include_str!("../../tests/compact/filling.... | rust_cleaned_test_functions.jsonl/76351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
18177,
531,
4136,
25201,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
14744,
284,
6505,
543,
286,
733,
73871,
48010,
25,
34336,
495,
26,
220,
21,
60,
284,
2278,
310,
2924,
2895,
172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_text() {
let mut schema_builder = Schema::builder();
let name = schema_builder.add_text_field("name", TEXT);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
{
let mut index_writer = index.writer_for_tests().unwra... | rust_cleaned_test_functions.jsonl/62189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 674
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4326,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
829,
284,
10802,
28532,
1364,
4326,
5013,
445,
606,
497,
15762,
317,
286,
1077,
10802,
284,
10802,
28532,
132... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filling() {
let drawing_area = create_mocked_drawing_area(1024, 768, |m| {
m.check_draw_rect(|c, _, f, u, d| {
assert_eq!(c, WHITE.to_rgba());
assert_eq!(f, true);
assert_eq!(u, (0, 0));
assert_eq!(d, (1023, 767)... | rust_cleaned_test_functions.jsonl/81492 | {
"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,
761,
9400,
368,
341,
286,
1077,
13330,
15030,
284,
1855,
34134,
291,
814,
1696,
15030,
7,
16,
15,
17,
19,
11,
220,
22,
21,
23,
11,
760,
76,
91,
341,
310,
296,
9093,
23021,
16979,
22428,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aes256_ccm_verify_fail() {
let key = "7f4af6765cad1d511db07e33aaafd57646ec279db629048aa6770af24849aa0d";
let nonce = "dde2a362ce81b2b6913abc3095";
let aad = "404f5df97ece7431987bc098cce994fc3c063b519ffa47b0365226a0015ef695";
let ct = "353022db9c568bd7183a13c40b1b... | rust_cleaned_test_functions.jsonl/110562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
17,
20,
21,
28955,
76,
35638,
22121,
368,
341,
286,
1077,
1376,
284,
330,
22,
69,
19,
2577,
21,
22,
21,
20,
34455,
16,
67,
20,
16,
16,
1999,
15,
22,
68,
18,
18,
5305,
92139,
20,
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_selector_pseudo_nth_of_type() -> Result {
let html = r#"
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>:nth-of-type</title>
</head>
<body>
<dl>
<dt>dt1</dt>
<dd>dd1</dd>
<dd>dd2</dd>
<dd>... | rust_cleaned_test_functions.jsonl/58029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 778
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28890,
620,
21952,
78342,
3575,
1819,
368,
1464,
5714,
341,
10217,
5272,
284,
435,
2,
698,
262,
71341,
50139,
5272,
397,
262,
366,
1551,
8688,
428,
268,
881,
414,
366,
1983,
397,
286,
366,
5490,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_program_little_endian() {
const NUM: u32 = 0x12345678;
const LE_BYTES: [u8; 4] = [0x78, 0x56, 0x34, 0x12];
let mut mem = Memory::new(1024);
mem.program_le_bytes(&LE_BYTES).unwrap();
assert_eq!(NUM, mem.read_word(0).unwrap());
} | rust_cleaned_test_functions.jsonl/92785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
907,
2377,
87193,
368,
341,
286,
733,
15943,
25,
575,
18,
17,
284,
220,
15,
87,
16,
17,
18,
19,
20,
21,
22,
23,
280,
286,
733,
11148,
40705,
25,
508,
84,
23,
26,
220,
19,
60,
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_multipart_type_type_parsing() {
let tests = vec![
MultipartParseTest {
mime_type: ("multipart", "mixed"),
result: Some(MimeMultipartType::Mixed),
},
MultipartParseTest {
mime_type: ("multipart", "alternat... | rust_cleaned_test_functions.jsonl/112547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 965
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
18204,
1819,
1819,
620,
28598,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
386,
18204,
14463,
2271,
341,
394,
45270,
1819,
25,
3489,
29542,
497,
330,
56685,
4461,
394,
1102,
25,
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... | 2 |
#[test]
fn test_map_append() {
let mut a = SgMap::new();
a.insert(1, "1");
a.insert(2, "2");
a.insert(3, "3");
let mut b = SgMap::<_, _, DEFAULT_CAPACITY>::new();
b.insert(4, "4");
b.insert(5, "5");
b.insert(6, "6");
a.append(&mut b);
assert!(b.is_empty());
assert... | rust_cleaned_test_functions.jsonl/18651 | {
"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,
5376,
26041,
368,
341,
262,
1077,
5206,
264,
284,
328,
70,
2227,
486,
931,
1428,
262,
264,
7030,
7,
16,
11,
330,
16,
797,
262,
264,
7030,
7,
17,
11,
330,
17,
797,
262,
264,
7030,
7,
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_fp2_mul() {
let mut a = Fp2::new(
Fp::from_u64s_le(&[
0x85c9f989e1461f03,
0xa2e33c333449a1d6,
0x41e461154a7354a3,
0x9ee53e7e84d7532e,
0x1c202d8ed97afb45,
0x51d3f9253e2516f,
... | rust_cleaned_test_functions.jsonl/62481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34160,
17,
24944,
368,
341,
286,
1077,
5206,
264,
284,
434,
79,
17,
486,
931,
1006,
310,
434,
79,
486,
1499,
7300,
21,
19,
82,
11751,
2099,
9640,
394,
220,
15,
87,
23,
20,
66,
24,
69,
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... | 1 |
#[test]
fn test_pod_spec_creation_with_multiple_containers() {
let mut placeholder_limits1: ResourceQuantityType = BTreeMap::new();
placeholder_limits1.insert(RESOURCE_REQUIREMENTS_KEY.to_string(), Default::default());
placeholder_limits1.insert("do-not-change-this".to_string(), Default:... | rust_cleaned_test_functions.jsonl/1226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 759
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
85337,
13594,
46163,
6615,
45233,
10260,
20568,
368,
341,
286,
1077,
5206,
5878,
31820,
16,
25,
11765,
17342,
929,
284,
425,
6533,
2227,
486,
931,
543,
286,
5878,
31820,
16,
7030,
7,
54260,
53927,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let dir = TempDir::new("storage_dir").unwrap();
let mut id_tracker = SimpleIdTracker::open(dir.path()).unwrap();
id_tracker.set_link(200.into(), 0).unwrap();
id_tracker.set_link(100.into(), 1).unwrap();
id_tracker.set_link(150.into(), 2).unw... | rust_cleaned_test_functions.jsonl/2114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
16172,
4334,
1827,
15454,
1428,
286,
1077,
5206,
877,
50264,
284,
8993,
764,
31133,
486,
2508,
14161,
3875,
6011,
15454,
1428,
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_dh_generate_key_compute_key() {
let dh1 = Dh::get_2048_224().unwrap().generate_key().unwrap();
let dh2 = Dh::get_2048_224().unwrap().generate_key().unwrap();
let shared_a = dh1.compute_key(dh2.public_key()).unwrap();
let shared_b = dh2.compute_key(dh1.public_key(... | rust_cleaned_test_functions.jsonl/54787 | {
"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,
814,
71,
48851,
3097,
57028,
3097,
368,
341,
286,
1077,
34096,
16,
284,
43227,
486,
455,
62,
17,
15,
19,
23,
62,
17,
17,
19,
1005,
15454,
1005,
19366,
3097,
1005,
15454,
543,
286,
1077,
34096,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raycast() {
use crate::geom::euclid::approxeq::ApproxEq;
use crate::path::Path;
let mut builder = Path::builder();
builder.move_to(point(0.0, 0.0));
builder.line_to(point(1.0, 0.0));
builder.line_to(point(1.0, 1.0));
builder.line_to(point(0.0, 1.0));
builder.clos... | rust_cleaned_test_functions.jsonl/128686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 913
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
51287,
368,
341,
262,
990,
17717,
486,
41916,
486,
20128,
75044,
486,
15707,
8371,
80,
486,
28588,
12606,
80,
280,
262,
990,
17717,
486,
2343,
486,
1820,
401,
262,
1077,
5206,
7363,
284,
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_mount_does_not_upgrade() -> anyhow::Result<()> {
let (_kernel, current_task) = create_kernel_and_task();
let root_fs = TmpFs::new();
let root_node = Arc::clone(root_fs.root());
let _dev_node = root_node.create_dir(b"dev").expect("failed to mkdir dev");
let... | rust_cleaned_test_functions.jsonl/80 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 692
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57593,
96374,
7913,
67794,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1077,
5453,
23248,
11,
1482,
12184,
8,
284,
1855,
26876,
8378,
12184,
543,
286,
1077,
3704,
34470,
284,
350,
1307,
48300,
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_scalar_multiplication() {
let result: Matrix4x4<f64> = (1_f64 / 32_f64) * Matrix4x4::new(
7_f64, -1_f64, -1_f64, -1_f64,
-1_f64, 7_f64, -1_f64, -1_f64,
-1_f64, -1_f64, 7_f64, -1_f64,
-1_f64, -1_f64, -1_f64, 7_f64
);
let expect... | rust_cleaned_test_functions.jsonl/129090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
91802,
1693,
368,
341,
286,
1077,
1102,
25,
11631,
19,
87,
19,
63895,
21,
19,
29,
284,
320,
16,
761,
21,
19,
608,
220,
18,
17,
761,
21,
19,
8,
353,
11631,
19,
87,
19,
486,
931,
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_is_ascii_success() {
let mut src: Vec<u8> = Vec::with_capacity(128);
src.resize(128, 0);
for i in 0..src.len() {
src[i] = i as u8;
}
for i in 0..src.len() {
assert!(is_ascii(&src[i..]));
}
} | rust_cleaned_test_functions.jsonl/27296 | {
"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,
6892,
50238,
18632,
368,
341,
286,
1077,
5206,
2286,
25,
11312,
34837,
23,
29,
284,
11312,
486,
4197,
35603,
7,
16,
17,
23,
317,
286,
2286,
17382,
7,
16,
17,
23,
11,
220,
15,
317,
286,
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... | 3 |
#[test]
fn test_service_config_discard_single_apply_panic() {
let mut testkit = testkit_with_supervisor_and_service(1);
let initiator_id = testkit.network().us().validator_id().unwrap();
let params = "apply_panic".to_owned();
let propose = ConfigProposeBuilder::new(CFG_CHANGE_HEIGHT)
.e... | rust_cleaned_test_functions.jsonl/93845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12267,
5332,
37745,
567,
19487,
36551,
620,
31270,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
1273,
8226,
6615,
23723,
31396,
8378,
12267,
7,
16,
317,
262,
1077,
98040,
842,
284,
1273,
8226,
2057... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version_filetype_from_str() {
assert_eq!(
VersionFiletype::from_str("package.json").unwrap(),
VersionFiletype::JSON
);
assert_eq!(
VersionFiletype::from_str("version.json").unwrap(),
VersionFiletype::JSON
);
... | rust_cleaned_test_functions.jsonl/46661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
2458,
1313,
5673,
2895,
368,
341,
286,
2060,
10714,
33673,
310,
6079,
1703,
1313,
486,
1499,
2895,
445,
1722,
4323,
1827,
15454,
3148,
310,
6079,
1703,
1313,
486,
5370,
198,
286,
1439,
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_logging_statistics() {
let mut runner = Runner::new();
let _query = runner.proxy.start_logging(
"test",
&mut vec![&mut Metric::Temperature(Temperature {
sampling_interval_ms: 100,
statistics_args: Some(Box::new(StatisticsAr... | rust_cleaned_test_functions.jsonl/66709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59982,
49569,
368,
341,
286,
1077,
5206,
22259,
284,
44946,
486,
931,
1428,
286,
1077,
716,
1631,
284,
22259,
41103,
4962,
59982,
1006,
310,
330,
1944,
756,
310,
609,
6984,
7486,
20703,
5,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let memo_instruction = CompiledInstruction {
program_id_index: 0,
accounts: vec![],
data: vec![240, 159, 166, 150],
};
let expected_json = json!({
"spl-memo": "🦖"
});
assert_eq!(
parse(... | rust_cleaned_test_functions.jsonl/121422 | {
"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,
21039,
368,
341,
286,
1077,
21438,
54923,
284,
96471,
16664,
341,
310,
2025,
842,
3560,
25,
220,
15,
345,
310,
9618,
25,
7486,
20703,
1259,
310,
821,
25,
7486,
20703,
17,
19,
15,
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_only_clips() {
let x = b"GGAAAAAAAAAAAAA";
let y = b"TTTTAATTTGTGTAAAAAATAATA";
let base_score = Scoring::from_scores(-4, -4, 4, -7);
let scoring = Scoring {
xclip_prefix: 0,
xclip_suffix: 0,
yclip_suffix: 0,
..base_... | rust_cleaned_test_functions.jsonl/16856 | {
"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,
18410,
6794,
3077,
368,
341,
286,
1077,
856,
284,
293,
1,
22254,
57905,
25699,
32,
876,
286,
1077,
379,
284,
293,
1,
14903,
14903,
32,
828,
14903,
25388,
25388,
25699,
32,
4485,
4485,
876,
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_make_base_gaussian() -> Fallible<()> {
let measurement = Result::from(opendp_meas__make_base_gaussian(
util::into_raw(0.0) as *const c_void, "AllDomain<f64>".to_char_p()))?;
let arg = AnyObject::new_raw(1.0);
let res = core::opendp_core__measurement_invoke(&me... | rust_cleaned_test_functions.jsonl/80688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
7651,
1889,
46972,
368,
1464,
14785,
1238,
71698,
341,
286,
1077,
18662,
284,
5714,
486,
1499,
17096,
408,
79,
95786,
563,
6927,
7651,
1889,
46972,
1006,
310,
4094,
486,
18122,
16067,
7,
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... | 4 |
#[test]
fn test_concatenation()
{
let a0 = DecimationNode::new(Complex::from(0.0), 1, 0, false);
let a4 = DecimationNode::new(Complex::from(4.0), 1, 1, true);
let a2 = DecimationNode::new(Complex::from(2.0), 1, 0, false);
let a6 = DecimationNode::new(Complex::from(6.0), 1, 1,... | rust_cleaned_test_functions.jsonl/586 | {
"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,
57478,
268,
367,
741,
262,
341,
286,
1077,
264,
15,
284,
3714,
5465,
1955,
486,
931,
7,
31137,
486,
1499,
7,
15,
13,
15,
701,
220,
16,
11,
220,
15,
11,
895,
317,
286,
1077,
264,
19,
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_cp_arg_symlink() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.arg(TEST_HELLO_WORLD_SOURCE)
.arg("--symbolic-link")
.arg(TEST_HELLO_WORLD_DEST)
.succeeds();
assert!(at.is_symlink(TEST_HELLO_WORLD_DEST));
} | rust_cleaned_test_functions.jsonl/21242 | {
"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,
39811,
6057,
58530,
44243,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
575,
8710,
21186,
50320,
69235,
1593,
38913,
25430,
340,
286,
659,
858... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_commands() {
let td: Vec<String> = vec![
"nop +0".to_string(),
"acc +1".to_string(),
"jmp -4".to_string(),
];
let commands = read_commands(&td).unwrap();
assert_eq!(commands[0], Command::Nop(0));
assert_eq!(command... | rust_cleaned_test_functions.jsonl/50506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
44151,
368,
341,
286,
1077,
17941,
25,
11312,
3464,
29,
284,
7486,
90515,
310,
330,
62813,
488,
15,
3263,
983,
3904,
3148,
310,
330,
4475,
488,
16,
3263,
983,
3904,
3148,
310,
330,
61055,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_root_error_is_not_swallowed_on_parse_error() -> Result<(), String> {
init();
let raw_schema = r#"/not/a/real/file"#;
let error = Schema::parse_str(raw_schema).unwrap_err();
if let Error::ParseSchemaJson(e) = error {
assert!(
e.to_string().contains("expected ... | rust_cleaned_test_functions.jsonl/69042 | {
"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,
12993,
4096,
6892,
7913,
32581,
20967,
4470,
21039,
4096,
368,
1464,
5714,
68843,
923,
29,
341,
262,
2930,
1428,
262,
1077,
7112,
25371,
284,
435,
2,
3115,
1921,
14186,
14,
7951,
23903,
57676,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty_can_be_expanded() {
let mut r = Reader::from_str("<a />");
r.trim_text(true).expand_empty_elements(true);
next_eq!(r, Start, b"a", End, b"a");
} | rust_cleaned_test_functions.jsonl/42067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
27421,
21263,
14214,
6465,
368,
341,
262,
1077,
5206,
435,
284,
25166,
486,
1499,
2895,
9639,
64,
6206,
797,
262,
435,
16419,
4326,
3715,
568,
32317,
15124,
22801,
3715,
317,
262,
1790,
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 |
#[test]
fn test_handle_burn_from() {
let (init_result, mut deps) = init_helper_with_config(
vec![InitialBalance {
address: HumanAddr("bob".to_string()),
amount: Uint128(10000),
}],
false,
false,
false,
... | rust_cleaned_test_functions.jsonl/69609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1927
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
880,
399,
5673,
368,
341,
286,
1077,
320,
2327,
5287,
11,
5206,
48178,
8,
284,
2930,
10418,
6615,
5332,
1006,
310,
7486,
20703,
6341,
21190,
341,
394,
2621,
25,
11097,
13986,
445,
47086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_undefined_default_parameter_removed() {
test(
"function f(x=undefined,y) { }",
"function f(x,y) { }",
);
test(
"function f(x,y=undefined,z) { }",
"function f(x,y ,z) { }",
);
test(
"function f(x=undefined,y=un... | rust_cleaned_test_functions.jsonl/484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
9614,
9993,
24899,
68248,
368,
341,
262,
1273,
1006,
286,
330,
1688,
282,
2075,
28,
9614,
7358,
8,
314,
220,
335,
497,
715,
286,
330,
1688,
282,
2075,
7358,
8,
1797,
314,
220,
335,
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_strict_mode_dup_func_parameters() {
// Checks that a function cannot contain duplicate parameter
let scenario = r#"
'use strict';
function f(a, b, b) {}
"#;
check_output(&[TestAction::TestStartsWith(
scenario,
"Uncaught \"SyntaxError\": ",
)]);
... | rust_cleaned_test_functions.jsonl/42876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
849,
7302,
51932,
9596,
18263,
368,
341,
262,
442,
24843,
429,
264,
729,
4157,
6644,
22513,
5733,
87079,
262,
1077,
15048,
284,
435,
2,
698,
262,
364,
810,
7304,
1010,
262,
729,
282,
2877,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interaction_response() {
let value = InteractionResponse {
kind: InteractionResponseType::ChannelMessageWithSource,
data: Some(InteractionResponseData {
allowed_mentions: None,
attachments: None,
choices: None,
... | rust_cleaned_test_functions.jsonl/9464 | {
"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,
97394,
9655,
368,
341,
286,
1077,
897,
284,
42707,
2582,
341,
310,
3093,
25,
42707,
53388,
486,
9629,
2052,
2354,
3608,
345,
310,
821,
25,
4329,
7,
31311,
2582,
1043,
341,
394,
5420,
30063,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version_priority_ord() {
// sorting makes sense from a "greater than" generation perspective:
assert!(Version::Stable(2).priority() > Version::Stable(1).priority());
assert!(Version::Stable(1).priority() > Version::Beta(1, None).priority());
assert!(Version::Stabl... | rust_cleaned_test_functions.jsonl/116491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
38161,
67324,
368,
341,
286,
442,
28273,
3643,
5530,
504,
264,
330,
65235,
1091,
1,
9471,
13057,
510,
286,
2060,
10297,
5637,
486,
623,
480,
7,
17,
568,
23582,
368,
861,
6079,
486,
623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_moduleinfo_from_json() {
let info = super::ModuleInfo::try_from(MODULE_FOO_JSON).unwrap();
assert_eq!(info.module_name, "foo");
assert_eq!(info.path.len(), 1);
assert_eq!(info.installed.len(), 2);
} | rust_cleaned_test_functions.jsonl/18375 | {
"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,
10750,
2733,
5673,
9455,
368,
341,
286,
1077,
3546,
284,
2256,
486,
3332,
1731,
486,
1539,
5673,
3189,
9648,
1400,
19499,
25356,
568,
15454,
543,
286,
2060,
10714,
10297,
2733,
10076,
1269,
11,
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_binary_expr_operator_precedence(
) -> std::result::Result<(), nom::Err<ParseError<'static>>> {
#[rustfmt::skip]
let tests = [
("42 + bar", vec![BinaryOp::Add]),
("42.42 + bar", vec![BinaryOp::Add]),
("42.42 + bar % 9000", vec![BinaryOp::Mod... | rust_cleaned_test_functions.jsonl/879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 821
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
21915,
40594,
10442,
1998,
763,
1006,
262,
873,
1464,
1460,
486,
1382,
486,
2077,
68843,
9662,
486,
7747,
27,
14463,
1454,
18291,
1978,
20154,
341,
286,
11506,
35788,
12501,
486,
20599,
921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_coalesce_none() {
let mut v = vec![(1, 1), (3, 3)];
v.coalesce(1, (2, 2));
assert_eq!(v, [(1, 1), (2, 2), (3, 3)])
} | rust_cleaned_test_functions.jsonl/57406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11393,
73250,
31488,
368,
341,
262,
1077,
5206,
348,
284,
7486,
0,
9697,
16,
11,
220,
16,
701,
320,
18,
11,
220,
18,
12587,
262,
348,
6830,
73250,
7,
16,
11,
320,
17,
11,
220,
17,
1106,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_get_machine_config() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
sender
.write_all(b"GET /machine-config HTTP/1.1\r\n\r\n")
.unwrap();
assert!(connection.try_read(... | rust_cleaned_test_functions.jsonl/43141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
3062,
38695,
5332,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
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_v1() -> Result<(), Error> {
let buffer = ByteView::open(fixture("symcache/compat/v1.symc"))?;
let symcache = SymCache::parse(&buffer)?;
// The symcache ID has changed from UUID to DebugId
assert_eq!(
symcache.debug_id(),
"67e9247c-814e-392b-a027-dbde6748fcbf".par... | rust_cleaned_test_functions.jsonl/16065 | {
"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,
2273,
16,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
4147,
284,
10906,
851,
486,
2508,
94886,
445,
23802,
9360,
14,
18331,
5457,
16,
50901,
66,
2761,
37445,
262,
1077,
7886,
9360,
284,
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... | 4 |
#[test]
fn test_verify_bank_hash() {
use BankHashVerificationError::*;
solana_logger::setup();
let db = AccountsDb::new(Vec::new(), &ClusterType::Development);
let key = solana_sdk::pubkey::new_rand();
let some_data_len = 0;
let some_slot: Slot = 0;
let a... | rust_cleaned_test_functions.jsonl/1379 | {
"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,
35638,
35733,
8950,
368,
341,
286,
990,
8547,
6370,
62339,
1454,
56162,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2927,
284,
40655,
7994,
486,
931,
49923,
486,
931,
1507,
609,
28678,
929... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_gtk_too_small_buffer() {
Writer::new(FixedSizedTestBuffer::new(10))
.write_gtk(&Gtk::new(2, GtkInfoTx::BothRxTx, &vec![24; 5]))
.expect_err("expected failure writing GTK KDE");
} | rust_cleaned_test_functions.jsonl/52434 | {
"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,
9165,
1889,
6242,
2346,
78,
31966,
7776,
368,
341,
286,
29404,
486,
931,
7832,
3286,
50,
1506,
2271,
4095,
486,
931,
7,
16,
15,
1171,
310,
659,
4934,
1889,
6242,
2099,
45103,
486,
931,
7,
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_encode() {
let input = "Hello, World!";
new_ucmd!()
.pipe_in(input)
.succeeds()
.stdout_only("JBSWY3DPFQQFO33SNRSCC===\n"); // spell-checker:disable-line
// Using '-' as our file
new_ucmd!()
.arg("-")
.pipe_in(input)
.succeeds()
... | rust_cleaned_test_functions.jsonl/23687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
368,
341,
262,
1077,
1946,
284,
330,
9707,
11,
4337,
26782,
262,
501,
68887,
2277,
0,
741,
286,
659,
13768,
1243,
5384,
340,
286,
659,
82,
29264,
82,
741,
286,
659,
36358,
18410,
445,
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_matrix_transpose() {
let matrix = Matrix2x3::new(
1_i32, 2_i32,
3_i32, 4_i32,
5_i32, 6_i32
);
let expected = Matrix3x2::new(
1_i32, 3_i32, 5_i32,
2_i32, 4_i32, 6_i32
);
let result = matrix.transp... | rust_cleaned_test_functions.jsonl/129208 | {
"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,
10193,
7965,
2900,
368,
341,
286,
1077,
6172,
284,
11631,
17,
87,
18,
486,
931,
1006,
310,
220,
16,
5318,
18,
17,
11,
220,
17,
5318,
18,
17,
11,
715,
310,
220,
18,
5318,
18,
17,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update() {
let db = &Database::new(Config::default()).unwrap();
let result = db.update(|txn| -> Result<()> {
assert!(txn.update("1", Data::Int(1)).is_none());
assert_eq!(&Data::Int(1), txn.get("1").unwrap());
... | rust_cleaned_test_functions.jsonl/86758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
368,
341,
262,
1077,
2927,
284,
609,
5988,
486,
931,
33687,
486,
2258,
6011,
15454,
543,
262,
1077,
1102,
284,
2927,
5317,
22428,
73370,
91,
1464,
5714,
71698,
341,
7561,
2060,
10297,
73370,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterate_into_string() {
let words = vec!["hello", " ", "world"];
let capitalized_words = words.iter().fold(String::default(), |acc, word| {
format!("{}{}", acc, capitalize_first(word))
});
assert_eq!(capitalized_words, "Hello World");
} | rust_cleaned_test_functions.jsonl/80479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
45514,
3904,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
3670,
330,
14615,
6332,
286,
1077,
97321,
18981,
284,
4244,
19471,
1005,
19961,
2242,
486,
2258,
1507,
760,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fail_struct_too_big() {
let src_data = b"(test) a {a 1 b 2 c 3}";
let mut limits = yass_parser::ParserLimits::unlimited();
limits.max_struct_size = 2;
let expected_error = yass_parser::ParserError::StructTooBig { pos: yass::Pos::new(0, 18) };
assert_eq!(yass_parser::parse(lim... | rust_cleaned_test_functions.jsonl/126512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
15126,
2346,
78,
36386,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
8,
264,
314,
64,
220,
16,
293,
220,
17,
272,
220,
18,
26259,
262,
1077,
5206,
13388,
284,
379,
395,
18517... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_root_slot_child_pass() {
let mut tower = Tower::new_for_tests(0, 0.67);
let ancestors = vec![(1, vec![0].into_iter().collect())]
.into_iter()
.collect();
tower.lockouts.root_slot = Some(0);
assert!(!tower.is_locked_out(1, &anc... | rust_cleaned_test_functions.jsonl/77027 | {
"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,
6892,
60271,
6068,
12993,
27563,
17268,
15464,
368,
341,
286,
1077,
5206,
21271,
284,
21938,
486,
931,
5478,
32509,
7,
15,
11,
220,
15,
13,
21,
22,
317,
286,
1077,
37518,
284,
7486,
0,
9697,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timer_no_binding() {
let (met_tx, met_rx) = mpsc::channel();
let mut rec = MetricsRecorder::new(met_tx, true);
// use Timer to make one timing
let _rv = {
// no binding means Timer does not live past the first line
Timer::new(&mut rec, "cmd");
sleep_secs(... | rust_cleaned_test_functions.jsonl/122145 | {
"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,
16255,
6536,
60815,
368,
341,
262,
1077,
320,
4059,
17805,
11,
2270,
24330,
8,
284,
296,
81984,
486,
10119,
543,
262,
1077,
5206,
1395,
284,
54190,
47023,
486,
931,
1255,
295,
17805,
11,
830,
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_upfront_shutdown_script() {
// enforce it at shutdown message
let mut config = UserConfig::default();
config.channel_options.announced_channel = true;
config.peer_channel_config_limits.force_announced_channel_preference = false;
config.channel_options.commit_upfront_shutdown_pubkey = fal... | rust_cleaned_test_functions.jsonl/28342 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1968
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8237,
6951,
54804,
14660,
368,
341,
1572,
197,
322,
28162,
432,
518,
23766,
1943,
271,
10217,
5206,
2193,
284,
2657,
2648,
486,
2258,
543,
25873,
16195,
8743,
13,
1020,
19453,
14571,
284,
830,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_remove_line_continuations_empty() {
let example: Vec<char> = "".to_string().chars().collect();
let without_comments = chars_to_string(&remove_line_continuations(&example));
assert_eq!("", without_comments);
} | rust_cleaned_test_functions.jsonl/126892 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
6528,
68948,
37070,
15124,
368,
341,
286,
1077,
3110,
25,
11312,
21919,
29,
284,
44907,
983,
3904,
1005,
19255,
1005,
17384,
543,
286,
1077,
2041,
30359,
284,
23000,
2346,
3904,
2099,
5399,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ref_to_fixed_array() {
let ary : &[u8; 32] = &[
1,0,1,2,1,0,1,2,
3,0,3,4,3,0,3,4,
5,0,5,6,5,0,5,6,
7,0,7,8,7,0,7,8
];
let big : U256 = ary.into();
// the numbers are each row of 8 bytes reversed and cast to u64
assert_eq!(big, U256([504410889324070664, 360293493601469702, 21617... | rust_cleaned_test_functions.jsonl/45780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
7793,
2346,
37839,
3858,
368,
341,
10217,
72921,
549,
44590,
84,
23,
26,
220,
18,
17,
60,
284,
609,
9640,
197,
197,
16,
11,
15,
11,
16,
11,
17,
11,
16,
11,
15,
11,
16,
11,
17,
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_read_position() {
let data = BaseEntityData {
position: [1.0, 2.0, 3.0].into(),
rotation: [4.0, 5.0].into(),
velocity: [6.0, 7.0, 8.0].into(),
};
let pos = data.read_position().unwrap();
assert!(pos.x - 1.0 < std::f64::EPSILON)... | rust_cleaned_test_functions.jsonl/50447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
9661,
368,
341,
286,
1077,
821,
284,
74082,
1043,
341,
310,
2309,
25,
508,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
936,
18122,
3148,
310,
12695,
25,
508,
19,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_ban() {
let route = Route::GetBan {
guild_id: GUILD_ID,
user_id: USER_ID,
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/bans/{user_id}",
guild_id = GUILD_ID,
... | rust_cleaned_test_functions.jsonl/119880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
880,
276,
368,
341,
286,
1077,
6021,
284,
9572,
486,
1949,
50241,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
1196,
842,
25,
13872,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_data_loss_protect() {
// We want to be sure that :
// * we don't broadcast our Local Commitment Tx in case of fallen behind
// * we close channel in case of detecting other being fallen behind
// * we are able to claim our own outputs thanks to to_remote being static
// TODO: this test is... | rust_cleaned_test_functions.jsonl/16941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1769,
11193,
22357,
439,
368,
341,
197,
322,
1205,
1366,
311,
387,
2704,
429,
6260,
197,
322,
353,
582,
1513,
944,
12899,
1039,
8774,
9205,
478,
39850,
304,
1142,
315,
20866,
4815,
17642,
197,
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... | 6 |
#[test]
fn test_separable_filter_integer_kernel() {
let image = gray_image!(
1, 2, 3;
4, 5, 6;
7, 8, 9);
let expected = gray_image!(
21, 27, 33;
39, 45, 51;
57, 63, 69);
let kernel = vec![1i32; 3];
let filt... | rust_cleaned_test_functions.jsonl/35603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
49156,
8727,
31725,
26876,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
16,
11,
220,
17,
11,
220,
18,
280,
310,
220,
19,
11,
220,
20,
11,
220,
21,
280,
310,
220,
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_column_name_in_error() -> Result<()> {
use crate::{types::Type, Error};
let db = Connection::open_in_memory()?;
db.execute_batch(
"BEGIN;
CREATE TABLE foo(x INTEGER, y TEXT);
INSERT INTO foo VALUES(4, NULL);
END;",
... | rust_cleaned_test_functions.jsonl/96472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 685
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
1269,
1243,
4096,
368,
1464,
5714,
71698,
341,
286,
990,
17717,
22964,
9242,
486,
929,
11,
4600,
2440,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
94136,
286,
2927,
7769,
14534,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_nft_state_with_issuer_success() {
let (mut context, tx) =
create_test_context(Action::Update(UpdateCase::UpdateStateWithIssuer), NftError::NoError);
let tx = context.complete_tx(tx);
// run
let cycles = context
.verify_tx(&tx, MAX_CYCLES)
.expect("... | rust_cleaned_test_functions.jsonl/33580 | {
"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,
8882,
1089,
723,
4387,
6615,
62,
66817,
18632,
368,
341,
262,
1077,
320,
6984,
2266,
11,
9854,
8,
4035,
286,
1855,
4452,
8467,
21905,
486,
4289,
7,
4289,
4207,
486,
4289,
1397,
2354,
98902,
701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_w1_1() {
let mut scheduler = WorkstealingScheduler::default();
submit_graph_simple(&mut scheduler);
connect_workers(&mut scheduler, 1, 1);
scheduler.sanity_check();
let n = run_schedule_get_task_ids(&mut scheduler);
assert_eq!(n.len(), 1);
... | rust_cleaned_test_functions.jsonl/27851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
1670,
16,
62,
16,
368,
341,
286,
1077,
5206,
28809,
284,
5547,
5342,
6132,
38878,
486,
2258,
543,
286,
9318,
14738,
30015,
2099,
6984,
28809,
317,
286,
4564,
43557,
2099,
6984,
28809,
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_read_request_header() {
let mem = create_anon_guest_memory(&[(GuestAddress(0), 0x1000)], false).unwrap();
let addr = GuestAddress(0);
let sector = 123_454_321;
// Test that all supported request types are read correctly from memory.
let supported_request_... | rust_cleaned_test_functions.jsonl/84864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
7893,
8757,
368,
341,
286,
1077,
1833,
284,
1855,
12008,
263,
62739,
19195,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
25035,
895,
568,
15454,
543,
286,
1077,
1078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_debug() {
assert_eq!(
format!("{:?}", Scalar::zero()),
"0x0000000000000000000000000000000000000000000000000000000000000000"
);
assert_eq!(
format!("{:?}", Scalar::one()),
"0x00000000000000000000000000000000000000000000000000... | rust_cleaned_test_functions.jsonl/14273 | {
"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,
15446,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
88928,
25,
52652,
35176,
486,
14154,
14702,
310,
330,
15,
87,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proccess_op_or_with_nested_and() {
let filter = filter();
let mut op = Operator::Or(vec![
Operator::And(vec![
Operator::Eq(schema_id_tag(), unencrypted_target("Not Here".to_string())),
Operator::Eq(cred_def_id_tag(), unencrypted_target(... | rust_cleaned_test_functions.jsonl/71872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
1322,
10287,
8734,
6615,
66279,
8378,
368,
341,
286,
1077,
4051,
284,
4051,
543,
286,
1077,
5206,
1179,
284,
28498,
486,
2195,
25592,
90515,
310,
28498,
486,
3036,
25592,
90515,
394,
28498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_start_stop() {
let table_id = 1;
let pks = vec![1, 2, 3, 4, 5, 7, 10, 15, 20, 25, 26, 27];
let values: Vec<_> = pks
.iter()
.map(|pk| format!("value{}", pk).into_bytes())
.collect();
let test_data: Vec<_> = pks
... | rust_cleaned_test_functions.jsonl/121697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1527
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
4906,
19039,
368,
341,
286,
1077,
1965,
842,
284,
220,
16,
280,
286,
1077,
281,
2787,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
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... | 7 |
#[test]
fn test_metrics_report_update_check_failure_reason_omaha() {
block_on(async {
let config = config_generator();
let mut state_machine = StateMachineBuilder::new(
StubPolicyEngine,
StubHttpRequest,
StubInstaller::default(),
... | rust_cleaned_test_functions.jsonl/126407 | {
"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,
37686,
14813,
8882,
7200,
43618,
38229,
62,
316,
13546,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
5206,
1584,
38695,
284,
3234,
21605,
3297,
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_t202() {
init();
let result = t202(&WIFI_BSSID, &WIFI_SSID);
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104749 | {
"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,
528,
17,
15,
17,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
17,
15,
17,
2099,
54,
33988,
1668,
75100,
11,
609,
54,
33988,
1098,
36499,
317,
286,
13751,
79878,
1102,
19406,
1423,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parser_invalid_signature() {
let signature = "()Ljava/lang/List"; // no semicolon
let res = JavaType::from_str(signature);
match res {
Ok(any) => {
panic!("Unexpected result: {}", any);
}
Err(err) => {
l... | rust_cleaned_test_functions.jsonl/100802 | {
"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,
18517,
31433,
39859,
368,
341,
286,
1077,
11957,
284,
67411,
37924,
25253,
76397,
5123,
442,
902,
5234,
38517,
198,
286,
1077,
592,
284,
7943,
929,
486,
1499,
2895,
92650,
626,
286,
2432,
592,
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... | 2 |
#[test]
fn test_next_token() {
let input = "let five = 5;
let ten = 10;
let add = fn(x, y) {
x + y;
};
let result = add(five, ten);
";
let tests = [
token::Token{ ttype: token::LET, literal: String::from("let") },
token::Token{ ttype: token... | rust_cleaned_test_functions.jsonl/17194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
6458,
368,
341,
286,
1077,
1946,
284,
330,
1149,
4236,
284,
220,
20,
280,
1149,
5779,
284,
220,
16,
15,
401,
1149,
912,
284,
5168,
2075,
11,
379,
8,
341,
262,
856,
488,
379,
280,
2315... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_rooted_block() {
let slot = 10;
let entries = make_slot_entries_with_transactions(100);
let blockhash = get_last_hash(entries.iter()).unwrap();
let shreds = entries_to_test_shreds(entries.clone(), slot, slot - 1, true, 0);
let more_shreds = entries_to_... | rust_cleaned_test_functions.jsonl/9556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12993,
291,
7113,
368,
341,
286,
1077,
9446,
284,
220,
16,
15,
280,
286,
1077,
10695,
284,
1281,
27563,
26092,
6615,
68182,
7,
16,
15,
15,
317,
286,
1077,
2504,
8296,
284,
633,
12195,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_nfd_chars() {
macro_rules! t {
($input: expr, $expected: expr) => {
assert_eq!($input.nfd_chars().collect::<String>(), $expected.into_string());
}
}
t!("abc", "abc");
t!("\u1e0b\u01c4", "d\u0307\u01c4");
t!("\u2026",... | rust_cleaned_test_functions.jsonl/56855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
6902,
37418,
368,
341,
286,
18072,
21407,
0,
259,
341,
310,
1711,
1355,
25,
15169,
11,
400,
7325,
25,
15169,
8,
589,
341,
394,
2060,
10714,
0,
699,
1355,
1253,
6902,
37418,
1005,
17384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_difference_bv1_longer() {
let mut bv1: BitVec<usize> = BitVec::new();
let mut bv2: BitVec<usize> = BitVec::new();
bv1.set(8, true);
bv2.set(0, true);
bv1.difference(&bv2);
assert!(!bv1.get(0));
assert!(bv1.get(8));
} | rust_cleaned_test_functions.jsonl/204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47525,
880,
85,
16,
17799,
261,
368,
341,
286,
1077,
5206,
56937,
16,
25,
6495,
10050,
90244,
29,
284,
6495,
10050,
486,
931,
543,
286,
1077,
5206,
56937,
17,
25,
6495,
10050,
90244,
29,
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_cmp() {
let data: Vec<BigUint> = [ &[], &[1], &[2], &[-1], &[0, 1], &[2, 1], &[1, 1, 1] ]
.iter().map(|v| BigUint::from_slice(*v)).collect();
for (i, ni) in data.iter().enumerate() {
for (j0, nj) in data.slice(i, data.len()).iter().enumerate() {
... | rust_cleaned_test_functions.jsonl/96889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 879
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
368,
341,
286,
1077,
821,
25,
11312,
27,
15636,
21570,
29,
284,
508,
609,
12995,
44590,
16,
1125,
44590,
17,
1125,
609,
7609,
16,
1125,
44590,
15,
11,
220,
16,
1125,
44590,
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... | 4 |
#[test]
fn test_verify() {
let secp256k1 = Secp256k1::new();
let message_arr = [5u8; 32];
let (privkey, pubkey) = secp256k1.generate_keypair(&mut thread_rng()).unwrap();
let message = SecpMessage::from_slice(&message_arr).unwrap();
let signature = secp256k1.sign(&message, &privkey).unwrap()... | rust_cleaned_test_functions.jsonl/129806 | {
"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,
35638,
368,
341,
262,
1077,
511,
4672,
17,
20,
21,
74,
16,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
1428,
262,
1077,
1943,
11210,
284,
508,
20,
84,
23,
26,
220,
18,
17,
935,
262,
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... | 5 |
#[test]
fn test_enum_conversion() {
test_file! {
#[diplomat::bridge]
mod ffi {
enum MyEnum {
A, B, C
}
struct MyStruct {
a: u8,
b: MyEnum,
}
... | rust_cleaned_test_functions.jsonl/80567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
64132,
368,
341,
286,
1273,
2458,
0,
341,
310,
11506,
8579,
500,
80768,
486,
13709,
921,
310,
1463,
76956,
341,
394,
7618,
3017,
10766,
341,
503,
362,
11,
425,
11,
356,
198,
394,
456,
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_status_ping_request_decode() {
let mut cursor =
Cursor::new(include_bytes!("../test/packet/status/ping_request.dat").to_vec());
let ping_request = PingRequest::decode(&mut cursor).unwrap();
assert_eq!(ping_request.time, 1577735845610);
} | rust_cleaned_test_functions.jsonl/84709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
71661,
7893,
15227,
368,
341,
286,
1077,
5206,
8128,
4035,
310,
28067,
486,
931,
77863,
12524,
17223,
1244,
1944,
4322,
5709,
32518,
4322,
287,
7893,
9915,
1827,
983,
13251,
1423,
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_costoflife() {
let txs = vec![
// insert one entry
TxRecord::new("Test#1", "10.2311321").unwrap(),
TxRecord::new("Test#2", "10.5441231").unwrap(),
TxRecord::new("Test#3", "70.199231321").unwrap(),
];
// simple insert
... | rust_cleaned_test_functions.jsonl/60254 | {
"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,
15890,
1055,
14450,
368,
341,
286,
1077,
9854,
82,
284,
7486,
90515,
310,
442,
5656,
825,
4343,
198,
310,
39850,
6471,
486,
931,
445,
2271,
2,
16,
497,
330,
16,
15,
13,
17,
18,
16,
16,
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_char() {
let mut rng = crate::new();
// Any failures manifest as a panic when debug assertions are enabled
for _ in 0..9000 {
let _: char = Standard.sample(&mut rng);
}
} | rust_cleaned_test_functions.jsonl/85583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9232,
368,
341,
10217,
5206,
28422,
284,
17717,
486,
931,
1428,
197,
322,
5765,
27850,
14455,
438,
264,
21975,
979,
7390,
54836,
525,
8970,
198,
2023,
716,
304,
220,
15,
496,
24,
15,
15,
15,
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
] | 2 |
#[test]
fn test_search(){
let json_value = from_str("{\"dog\":{\"cat\": {\"mouse\" : \"cheese\"}}}").unwrap();
let found_str = json_value.search("mouse").and_then(|j| j.as_string());
assert!(found_str.unwrap() == "cheese");
} | rust_cleaned_test_functions.jsonl/6563 | {
"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,
10716,
3032,
286,
1077,
2951,
3142,
284,
504,
2895,
99141,
18457,
92729,
4616,
11693,
314,
2105,
13237,
2105,
549,
7245,
1528,
2367,
2105,
75542,
1827,
15454,
543,
286,
1077,
1730,
2895,
284,
2951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_message_specific_reaction() {
let emoji = emoji();
let route = Route::DeleteMessageSpecificReaction {
channel_id: CHANNEL_ID,
message_id: MESSAGE_ID,
emoji: &emoji,
};
assert_eq!(
route.to_string(),
... | rust_cleaned_test_functions.jsonl/119902 | {
"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,
11353,
6462,
56592,
96631,
368,
341,
286,
1077,
42365,
284,
42365,
1428,
286,
1077,
6021,
284,
9572,
486,
6435,
2052,
47514,
87236,
341,
310,
5496,
842,
25,
58756,
3450,
345,
310,
1943,
842,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_digest_of_canonical_request() {
let creq = test_canonical_request("get-vanilla-query-order-key-case");
let expected = "816cd5b414d056048ba4f7c5386d6e0533120fb1fcfa93762cf0fc39e2cf19e0";
let actual = sha256_hex_string(creq.as_bytes());
assert_eq!(expected, actual);... | rust_cleaned_test_functions.jsonl/83741 | {
"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,
52994,
3575,
27421,
22391,
7893,
368,
341,
286,
1077,
1884,
80,
284,
1273,
27421,
22391,
7893,
445,
455,
8273,
276,
6241,
65489,
23810,
16173,
38485,
797,
286,
1077,
3601,
284,
330,
23,
16,
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_program_entry_debug() {
#[allow(clippy::unnecessary_wraps)]
fn mock_process_instruction(
_first_instruction_account: usize,
_data: &[u8],
_invoke_context: &mut InvokeContext,
) -> Result<(), InstructionError> {
Ok(())
... | rust_cleaned_test_functions.jsonl/14507 | {
"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,
25096,
9078,
15446,
368,
341,
286,
11506,
7183,
9849,
45749,
486,
14931,
20122,
44074,
2625,
5563,
286,
5168,
7860,
11305,
54923,
1006,
310,
716,
3896,
54923,
13500,
25,
22301,
345,
310,
716,
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... | 1 |
#[test]
fn test_proof_failure() -> Result<(), HwError> {
let value = BigUint::from_u32(378).unwrap();
let threshold = BigUint::from_u32(402).unwrap();
assert_eq!(true, prove_and_verify(4, 32, &value, &threshold).is_err());
Ok(())
} | rust_cleaned_test_functions.jsonl/32788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
43618,
368,
1464,
5714,
68843,
472,
86,
1454,
29,
341,
286,
1077,
897,
284,
6164,
21570,
486,
1499,
7300,
18,
17,
7,
18,
22,
23,
568,
15454,
543,
286,
1077,
12171,
284,
6164,
21570,
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_strip_accents() {
let test_tuples = [
("No accent here", "No accent here"),
("çà", "ca"),
("àgbọ̀n", "agbon"),
("cùis", "cuis"),
("Tiếng Việt", "Tieng Viet"),
("château", "chateau"),
("München", "Munchen"... | rust_cleaned_test_functions.jsonl/13632 | {
"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,
66130,
17737,
805,
368,
341,
286,
1077,
1273,
89269,
284,
2278,
310,
3489,
2753,
29100,
1588,
497,
330,
2753,
29100,
1588,
4461,
310,
3489,
3131,
6362,
497,
330,
924,
4461,
310,
3489,
6362,
9511,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_operator_lt_plaintext_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let query = Operator::Lt(
TagName::PlainTagName(name1.clone()),
TargetValue::Unencrypted(value1.clone())
);
let json = que... | rust_cleaned_test_functions.jsonl/11882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
40594,
39164,
6317,
1641,
427,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
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_0459_example_2() {
let s = "aba".to_string();
let result = false;
assert_eq!(Solution::repeated_substring_pattern(s), result);
} | rust_cleaned_test_functions.jsonl/91321 | {
"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,
62,
15,
19,
20,
24,
39304,
62,
17,
368,
341,
286,
1077,
274,
284,
330,
12004,
3263,
983,
3904,
543,
286,
1077,
1102,
284,
895,
401,
286,
2060,
10714,
10297,
36842,
486,
265,
41954,
5228,
917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str_latin1_fail() {
let len = if cfg!(miri) { 32 } else { 256 }; // Miri is too slow
let mut src: Vec<u16> = Vec::with_capacity(len);
src.resize(len, 0);
for i in 0..src.len() {
src[i] = i as u16;
}
for i in 0..src.len() {
... | rust_cleaned_test_functions.jsonl/27303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
2895,
907,
14768,
16,
22121,
368,
341,
286,
1077,
2422,
284,
421,
13286,
10297,
19936,
72,
8,
314,
220,
18,
17,
335,
770,
314,
220,
17,
20,
21,
20066,
442,
14268,
72,
374,
2238,
6301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_util_read_float() {
let mut p = Tokenizer::new("abc");
assert_eq!(None, read_float(&mut p));
assert_eq!(Some('a'), p.peek());
let mut p = Tokenizer::new("-abc");
assert_eq!(None, read_float(&mut p));
assert_eq!(Some('-'), p.peek());
let m... | rust_cleaned_test_functions.jsonl/274 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 991
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18974,
6443,
17586,
368,
341,
286,
1077,
5206,
281,
284,
9660,
3135,
486,
931,
445,
13683,
797,
286,
2060,
10714,
10297,
4064,
11,
1349,
17586,
2099,
6984,
281,
1106,
286,
2060,
10714,
10297,
8373... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_externally_tagged_enum_containing_flatten() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]
enum Data {
A {
a: i32,
#[serde(flatten)]
flat: Flat,
},
}
#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct Flat {
... | rust_cleaned_test_functions.jsonl/59169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4301,
745,
9372,
3556,
31054,
10260,
2056,
5081,
14456,
368,
341,
262,
11506,
27098,
3759,
9050,
11,
48440,
11,
55039,
11,
11091,
5563,
262,
7618,
2885,
341,
286,
362,
341,
310,
264,
25,
600... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mgp_copy() {
mock_mgp_once!(mgp_path_copy_context, |_, _, _| {
mgp_error::MGP_ERROR_UNABLE_TO_ALLOCATE
});
with_dummy!(|memgraph: &Memgraph| {
unsafe {
let path = Path::mgp_copy(std::ptr::null_mut(), &memgraph);
assert!(path.is_err());
... | rust_cleaned_test_functions.jsonl/101741 | {
"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,
717,
21888,
16096,
368,
341,
262,
7860,
717,
21888,
7630,
10297,
12311,
79,
2638,
16096,
8467,
11,
760,
6878,
8358,
85137,
341,
286,
13742,
79,
4096,
486,
44,
24430,
5414,
6735,
3494,
8650,
39333,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.