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_add_native_program() {
let (mut genesis_config, _mint_keypair) = create_genesis_config(100_000);
activate_all_features(&mut genesis_config);
let slot = 123;
let program_id = solana_sdk::pubkey::new_rand();
let bank = Arc::new(Bank::new_from_parent(
... | rust_cleaned_test_functions.jsonl/2643 | {
"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,
2891,
44494,
25096,
368,
341,
286,
1077,
320,
6984,
59366,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
15,
62,
15,
15,
15,
317,
286,
20276,
5705,
14965,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_integral_types() {
is_to_sql::<i8>();
is_to_sql::<i16>();
is_to_sql::<i32>();
is_to_sql::<i64>();
is_to_sql::<u8>();
is_to_sql::<u16>();
is_to_sql::<u32>();
} | rust_cleaned_test_functions.jsonl/124013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64076,
9763,
368,
341,
286,
374,
2346,
18063,
27638,
72,
23,
3913,
286,
374,
2346,
18063,
27638,
72,
16,
21,
3913,
286,
374,
2346,
18063,
27638,
72,
18,
17,
3913,
286,
374,
2346,
18063,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_opcode() {
let mut test_vm = VM::new();
test_vm.registers[0].content = 500;
test_vm.registers[1].content = 500;
test_vm.registers[2].content = 0;
test_vm.registers[3].content = 1;
test_vm.registers[4].content = 4;
test_vm.program = vec!... | rust_cleaned_test_functions.jsonl/60341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
71319,
368,
341,
286,
1077,
5206,
1273,
39008,
284,
17792,
486,
931,
543,
286,
1273,
39008,
7031,
9303,
58,
15,
936,
1796,
284,
220,
20,
15,
15,
280,
286,
1273,
39008,
7031,
9303,
58,
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_fatten_works() {
let mut uut = FattenTest::new(WordOrder::MostSignificantFirst);
uut.clock.connect();
uut.fifo.data_in.connect();
uut.fifo.write.connect();
uut.fifo.read.connect();
uut.connect_all();
let mut sim = Simulation::new();
sim.add_clock(5, |x: &mut Box<F... | rust_cleaned_test_functions.jsonl/112111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 842
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
14456,
11498,
82,
368,
341,
262,
1077,
5206,
575,
332,
284,
434,
14456,
2271,
486,
931,
7,
10879,
4431,
486,
13319,
7264,
33728,
5338,
317,
262,
575,
332,
50546,
10800,
543,
262,
575,
332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_init_with_imported_wallet_fails_with_different_params() {
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE, "false");
let wallet_name = "test_init_with_imported_wallet_fails_with_different_params";
settings::set_config_value(s... | rust_cleaned_test_functions.jsonl/19806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
6615,
18434,
291,
62308,
761,
6209,
6615,
82741,
6745,
368,
341,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
11,
330,
3849,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_executor_execute_and_commit_chunk_restart() {
let mut rt = Runtime::new().unwrap();
let first_batch_size = 30;
let second_batch_size = 40;
let (chunks, ledger_info) = {
let first_batch_start = 1;
let second_batch_start = first_batch_start + first_batch_size;
... | rust_cleaned_test_functions.jsonl/54643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 989
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81207,
44329,
8378,
36346,
30539,
69392,
368,
341,
262,
1077,
5206,
16677,
284,
10954,
486,
931,
1005,
15454,
543,
262,
1077,
1156,
14534,
2368,
284,
220,
18,
15,
280,
262,
1077,
2086,
14534,
2368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_connection_customizer() {
static RELEASED: AtomicBool = ATOMIC_BOOL_INIT;
RELEASED.store(false, Ordering::SeqCst);
static DROPPED: AtomicBool = ATOMIC_BOOL_INIT;
DROPPED.store(false, Ordering::SeqCst);
struct Connection(i32);
impl Drop for Connection {
fn drop(... | rust_cleaned_test_functions.jsonl/6407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 811
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15866,
15875,
3135,
368,
341,
262,
1099,
53034,
35,
25,
30316,
11233,
284,
7369,
51793,
32491,
14446,
280,
262,
53034,
35,
16114,
3576,
11,
68621,
486,
20183,
34,
267,
626,
262,
1099,
422,
1285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_system() {
let builder = RomBuilder::new();
assert_eq!(builder.build_rom().system(), System::NES);
let mut builder = RomBuilder::new();
builder.set_vs();
assert_eq!(builder.build_rom().system(), System::Vs);
let mut builder = RomBuilder::... | rust_cleaned_test_functions.jsonl/104408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17687,
368,
972,
286,
1077,
7363,
284,
11774,
3297,
486,
931,
1647,
286,
2060,
10714,
10297,
17850,
13239,
81383,
1005,
8948,
1507,
739,
486,
71758,
3079,
286,
1077,
5206,
7363,
284,
11774,
3297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_borrow() {
let lazycell = LazyCell::new();
assert!(!lazycell.filled());
lazycell.fill(1).unwrap();
assert!(lazycell.filled());
let value = lazycell.borrow();
assert_eq!(value, Some(&1));
let value = lazycell.get();
asser... | rust_cleaned_test_functions.jsonl/5789 | {
"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,
30728,
8378,
880,
7768,
368,
341,
286,
1077,
64436,
3337,
613,
284,
44263,
3599,
486,
931,
1428,
286,
2060,
0,
3471,
75,
1370,
3337,
613,
833,
4374,
1423,
286,
64436,
3337,
613,
12467,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pop() {
macro_rules! t(
(s: $path:expr, $left:expr, $right:expr) => (
{
let pstr = $path;
let mut p = Path::new(pstr);
let result = p.pop();
let left = $left;
a... | rust_cleaned_test_functions.jsonl/102771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17061,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
2359,
96011,
11,
400,
1291,
96011,
8,
589,
2399,
394,
341,
503,
1077,
281,
495,
284,
400,
2343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fn_commit_hook() -> Result<()> {
let db = Connection::open_in_memory()?;
fn hook() -> bool {
true
}
db.commit_hook(Some(hook));
db.execute_batch("BEGIN; CREATE TABLE foo (t TEXT); COMMIT;")
.unwrap_err();
Ok(())
} | rust_cleaned_test_functions.jsonl/34784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
36346,
32005,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
368,
69493,
286,
5168,
9704,
368,
1464,
1807,
341,
310,
830,
198,
286,
555,
286,
2927,
15728,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_real_size() {
let mut map = MemoryMap::new();
map.push_remap(0x1000.into(), 0x1000, 0.into());
map.push_remap(0x3000.into(), 0x1000, 0x2000.into());
map.push_remap(0x6000.into(), 0x2000, 0x3000.into());
assert_eq!(map.real_size(), 0x4000);
} | rust_cleaned_test_functions.jsonl/70014 | {
"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,
15266,
2368,
368,
341,
286,
1077,
5206,
2415,
284,
13850,
2227,
486,
931,
543,
286,
2415,
2552,
1288,
2186,
7,
15,
87,
16,
15,
15,
15,
39860,
1507,
220,
15,
87,
16,
15,
15,
15,
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_request_authorization_with_no_signer() {
let builder = PlainNotificationBuilder::new("test");
let payload = builder.build("a_test_id", Default::default());
let client = Client::new(AlpnConnector::new(), None, Endpoint::Production);
let request = client.build_reque... | rust_cleaned_test_functions.jsonl/109647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
22938,
2022,
6615,
6536,
11172,
261,
368,
341,
286,
1077,
7363,
284,
43199,
11196,
3297,
486,
931,
445,
1944,
797,
286,
1077,
7729,
284,
7363,
13239,
445,
64,
4452,
842,
497,
7899,
486,
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_html_expression() {
let r = Registry::new();
let element = HtmlExpression(Box::new(HelperTemplate::with_path(Path::with_named_paths(
&["hello"],
))));
let mut out = StringOutput::new();
let mut m: BTreeMap<String, String> = BTreeMap::new();
let value = "world";
... | rust_cleaned_test_functions.jsonl/15107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9564,
28068,
368,
341,
262,
1077,
435,
284,
32112,
486,
931,
543,
262,
1077,
2392,
284,
19200,
9595,
67758,
486,
931,
7,
5511,
7275,
486,
4197,
2638,
33030,
486,
4197,
71834,
24152,
1006,
286,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_log_exec_empty() {
let l = Log::<Operation>::default();
let mut f = |_o: Operation, _i: usize| {
assert!(false);
};
l.exec(1, &mut f);
} | rust_cleaned_test_functions.jsonl/101055 | {
"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,
5224,
18430,
15124,
368,
341,
286,
1077,
326,
284,
2835,
27638,
8432,
6831,
2258,
543,
286,
1077,
5206,
282,
284,
70886,
78,
25,
16730,
11,
716,
72,
25,
22301,
91,
341,
310,
2060,
10297,
3849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_seekable_mem_writer() {
let mut writer = Cursor::new(Vec::<u8>::new());
assert_eq!(writer.position(), 0);
assert_eq!(writer.write(&[0]).unwrap(), 1);
assert_eq!(writer.position(), 1);
assert_eq!(writer.write(&[1, 2, 3]).unwrap(), 3);
assert_eq!(wri... | rust_cleaned_test_functions.jsonl/4229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
480,
12976,
28908,
368,
341,
286,
1077,
5206,
6916,
284,
28067,
486,
931,
49923,
27638,
84,
23,
6831,
931,
1423,
286,
2060,
10714,
10297,
18189,
6187,
1507,
220,
15,
317,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_input_err() {
let mut serial = Serial::new_sink(EventFd::new(libc::EFD_NONBLOCK).unwrap());
let input = [0u8; FIFO_SIZE + 1];
serial.raw_input(&input).unwrap_err();
} | rust_cleaned_test_functions.jsonl/37140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5898,
9266,
368,
341,
286,
1077,
5206,
6146,
284,
11215,
486,
931,
51567,
30469,
74476,
486,
931,
44828,
66,
486,
36,
14596,
22128,
39964,
568,
15454,
1423,
286,
1077,
1946,
284,
508,
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 |
#[test]
fn test_all_parameters_blake2b() {
let flags = [
"-b",
"--length=18",
"--key=626172",
"--salt=62617a62617a62617a62617a62617a62",
"--personal=62696e672062696e672062696e672062",
"--fanout=2",
"--max-depth=3",
"--max-leaf-length=67438087",... | rust_cleaned_test_functions.jsonl/14819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
18263,
13141,
726,
17,
65,
368,
341,
262,
1077,
8042,
284,
2278,
286,
6523,
65,
756,
286,
14482,
4129,
28,
16,
23,
756,
286,
14482,
792,
28,
21,
17,
21,
16,
22,
17,
756,
286,
14482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculates_document_range() {
let mut scanner = Scanner::new("<?php ; \n; \n;");
scanner.scan().unwrap();
assert_eq!(NodeRange::new(0, 0, 1, 2), scanner.document_range());
} | rust_cleaned_test_functions.jsonl/52958 | {
"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,
24005,
3314,
973,
26231,
9698,
368,
341,
286,
1077,
5206,
20775,
284,
17170,
486,
931,
98276,
1208,
2587,
1124,
77,
26,
1124,
77,
26,
3071,
286,
20775,
47949,
1005,
15454,
1428,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_missing_renamed_field_struct() {
assert_de_tokens_error::<RenameStruct>(
&[
Token::Struct { name: "Superhero", len: 2 },
Token::Str("a1"),
Token::I32(1),
Token::StructEnd,
],
"missing field `a3`",
);
assert_de... | rust_cleaned_test_functions.jsonl/58622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
1288,
30245,
5013,
15126,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
88757,
9422,
17055,
286,
609,
9640,
310,
9660,
486,
9422,
314,
829,
25,
330,
19284,
17732,
497,
2422,
25,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_assign_fails_on_nan_t_ref() {
let mut a = not_nan(std::f32::INFINITY);
let b = std::f32::NEG_INFINITY;
a += &b;
} | rust_cleaned_test_functions.jsonl/80095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
20688,
761,
6209,
4470,
73936,
528,
7793,
368,
341,
262,
1077,
5206,
264,
284,
537,
73936,
5194,
486,
69,
18,
17,
486,
687,
55990,
317,
262,
1077,
293,
284,
1460,
486,
69,
18,
17,
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 |
#[test]
fn test_runtime_update_balloon_stats_config() {
let req = VmmAction::UpdateBalloonStatistics(BalloonUpdateStatsConfig {
stats_polling_interval_s: 0,
});
check_runtime_request(req, |result, vmm| {
assert_eq!(result, Ok(VmmData::Empty));
assert!(... | rust_cleaned_test_functions.jsonl/44545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33232,
8882,
56441,
31335,
15381,
5332,
368,
341,
286,
1077,
4232,
284,
647,
3821,
2512,
486,
4289,
37889,
31335,
38599,
5349,
278,
31335,
4289,
16635,
2648,
341,
310,
10472,
40002,
287,
20541,
643,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_channel_update_guild() {
let cache = InMemoryCache::new();
let (guild_id, channel_id, channel) = test::guild_channel_text();
cache.update(&ChannelUpdate(Channel::Guild(channel)));
assert_eq!(1, cache.channels_guild.len());
assert!(cache
.guild... | rust_cleaned_test_functions.jsonl/35014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14571,
8882,
1889,
1498,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
543,
286,
1077,
320,
57877,
842,
11,
5496,
842,
11,
5496,
8,
284,
1273,
486,
57877,
14571,
4326,
1428,
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_detect_compiler_kind_clang() {
let f = TestFixture::new();
let creator = new_creator();
let pool = ThreadPool::sized(1);
next_command(&creator, Ok(MockChild::new(exit_status(0), "clang\n", "")));
let c = detect_compiler(creator, &f.bins[0], f.tempdir.path(... | rust_cleaned_test_functions.jsonl/61639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56457,
80910,
33162,
6794,
524,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
1077,
19919,
284,
501,
68532,
543,
286,
1077,
7314,
284,
72716,
486,
82,
1506,
7,
16,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_downcast() {
use std::any::Any;
let r1: Rc<Any> = Rc::new(i32::max_value());
let r2: Rc<Any> = Rc::new("abc");
assert!(r1.clone().downcast::<u32>().is_err());
let r1i32 = r1.downcast::<i32>();
assert!(r1i32.is_ok());
assert_eq!(r1i32.unw... | rust_cleaned_test_functions.jsonl/4679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13998,
3829,
368,
341,
286,
990,
1460,
486,
3767,
486,
8610,
401,
286,
1077,
435,
16,
25,
81463,
86712,
29,
284,
81463,
486,
931,
1956,
18,
17,
486,
2810,
3142,
1423,
286,
1077,
435,
17,
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_update() {
for b in IPV4_HEADERS {
let mut buf = Vec::new();
buf.extend_from_slice(b);
let mut c = Checksum::new();
c.add_bytes(&buf);
assert_eq!(c.checksum(), 0);
// replace the destination IP with the loopback ad... | rust_cleaned_test_functions.jsonl/113594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 783
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
368,
341,
286,
369,
293,
304,
91498,
19,
79428,
341,
310,
1077,
5206,
6607,
284,
11312,
486,
931,
543,
310,
6607,
15831,
5673,
26488,
1883,
626,
310,
1077,
5206,
272,
284,
4248,
1242,
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... | 3 |
#[test]
fn test_date_rfc_3339() {
let scene = TestScenario::new(util_name!());
let mut result = scene.ucmd().arg("--rfc-3339=ns").succeeds();
// Check that the output matches the regexp
let rfc_regexp = r"(\d+)-(0[1-9]|1[012])-(0[1-9]|[12]\d|3[01])\s([01]\d|2[0-3]):([0-5]\d):([0-5]\d|60)(\.\d+... | rust_cleaned_test_functions.jsonl/25488 | {
"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,
4164,
1710,
8316,
62,
18,
18,
18,
24,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
5231,
262,
1077,
5206,
1102,
284,
6109,
56334,
2277,
1005,
858,
21549,
8052,
66,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum_after_space() {
check(
r#"
enum Foo $0{
A,
B(),
C{},
}
fn main() {
let f: Foo;
f = Foo::A;
f = Foo::B();
f = Foo::C{};
}
"#,
expect![[r#"
Foo Enum FileId(0) 0..37 5..8
FileId(0) 74..77
... | rust_cleaned_test_functions.jsonl/60635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
19844,
14663,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9018,
33428,
400,
15,
515,
262,
362,
345,
262,
425,
3148,
262,
356,
38837,
532,
8822,
1887,
368,
341,
262,
1077,
282,
25,
3342... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_writer_dictionary_disabled_v1() {
let props = WriterProperties::builder()
.set_writer_version(WriterVersion::PARQUET_1_0)
.set_dictionary_enabled(false)
.build();
column_roundtrip_random::<Int32Type>(
props,
1024,... | rust_cleaned_test_functions.jsonl/85658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
28908,
42605,
51401,
2273,
16,
368,
341,
286,
1077,
6914,
284,
29404,
7903,
486,
17850,
741,
310,
659,
746,
28908,
9438,
7,
6492,
5637,
486,
16567,
5757,
1348,
62,
16,
62,
15,
340,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retransmit_large() {
let num_nodes = 4000;
let stakes: Vec<_> = (0..num_nodes).collect();
run_simulation(&stakes, 2);
} | rust_cleaned_test_functions.jsonl/64215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
1458,
1763,
45228,
368,
341,
262,
1077,
1629,
14896,
284,
220,
19,
15,
15,
15,
280,
262,
1077,
44425,
25,
11312,
32399,
29,
284,
320,
15,
496,
2413,
14896,
568,
17384,
543,
262,
1598,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_signal_return_expected_object_type() {
let obj = Object::with_type(SimpleObject::static_type(), &[]).expect("Object::new failed");
obj.connect("create-child-object", false, move |_args| {
Some(
Object::with_type(ChildObject::static_type(), &[])
... | rust_cleaned_test_functions.jsonl/9016 | {
"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,
21137,
12511,
32190,
5314,
1819,
368,
341,
286,
1077,
2839,
284,
3002,
486,
4197,
1819,
3759,
6456,
1190,
486,
1978,
1819,
1507,
609,
1294,
568,
17119,
445,
1190,
486,
931,
4641,
3071,
286,
2839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_record_rule_partial() {
let rule: BinProtRule = serde_json::from_str(RECORD_RULE).unwrap();
let example = vec![0x05, 0x00, 0x01];
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct PartialType {
first: u8,
second: Value,
... | rust_cleaned_test_functions.jsonl/134752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
21124,
52068,
368,
341,
286,
1077,
5912,
25,
29344,
12423,
11337,
284,
61570,
9455,
486,
1499,
2895,
43202,
23860,
50495,
568,
15454,
543,
286,
1077,
3110,
284,
7486,
20703,
15,
87,
15,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_ruby_stack_trace_2_1_6() {
let current_thread_addr = 0x562658abd7f0;
let stack_trace = ruby_version::ruby_2_1_6::get_stack_trace::<CoreDump>(
current_thread_addr,
0,
None,
&coredump_2_1_6(),
0,
)
.unw... | rust_cleaned_test_functions.jsonl/715 | {
"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,
3062,
1710,
20028,
15528,
23575,
62,
17,
62,
16,
62,
21,
368,
341,
286,
1077,
1482,
10814,
7387,
284,
220,
15,
87,
20,
21,
17,
21,
20,
23,
85920,
22,
69,
15,
280,
286,
1077,
5611,
23575,
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_change_admin() {
let mut service = TestService::new();
let caller = TestService::caller();
let ctx = mock_context(caller.clone());
let changed = service.change_admin(ctx, ChangeAdminPayload {
addr: caller.clone(),
});
assert!(changed.is_error());
let ctx = m... | rust_cleaned_test_functions.jsonl/27232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
12207,
368,
341,
262,
1077,
5206,
2473,
284,
3393,
1860,
486,
931,
543,
262,
1077,
19865,
284,
3393,
1860,
486,
56126,
543,
262,
1077,
5635,
284,
7860,
8467,
1337,
13956,
15997,
5231,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rand() {
let mut rng = task_rng();
let _n: BigUint = rng.gen_biguint(137);
assert!(rng.gen_biguint(0).is_zero());
} | rust_cleaned_test_functions.jsonl/96914 | {
"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,
33864,
368,
341,
286,
1077,
5206,
28422,
284,
3383,
66849,
543,
286,
1077,
716,
77,
25,
6164,
21570,
284,
28422,
22822,
36386,
2496,
7,
16,
18,
22,
317,
286,
2060,
10297,
69890,
22822,
36386,
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 |
#[test]
fn test_export_bip44() {
let descriptor = "wpkh(xprv9s21ZrQH143K4CTb63EaMxja1YiTnSEWKMbn23uoEnAzxjdUJRQkazCAtzxGm4LSoTSVTptoV9RbchnKPW9HxKtZumdyxyikZFDLhogJ5Uj/44'/0'/0'/0/*)";
let change_descriptor = "wpkh(xprv9s21ZrQH143K4CTb63EaMxja1YiTnSEWKMbn23uoEnAzxjdUJRQkazCAtzxGm4LSoTSVTptoV9Rbc... | rust_cleaned_test_functions.jsonl/21473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27114,
880,
573,
19,
19,
368,
341,
286,
1077,
16414,
284,
330,
8421,
30664,
2075,
649,
85,
24,
82,
17,
16,
57,
81,
48,
39,
16,
19,
18,
42,
19,
1162,
65,
21,
18,
36,
64,
44,
87,
5580,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_signature() {
let (config, key) = config_builder::test_config();
let vm_validator = TestValidator::new(&config);
let mut rng = ::rand::rngs::StdRng::from_seed([1u8; 32]);
let other_private_key = Ed25519PrivateKey::generate(&mut rng);
// Submit with an accoun... | rust_cleaned_test_functions.jsonl/56934 | {
"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,
42681,
31433,
39859,
368,
341,
262,
1077,
320,
1676,
11,
1376,
8,
284,
2193,
28532,
486,
1944,
5332,
543,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
2099,
1676,
626,
262,
1077,
5206,
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_woff2_transformed_glyf_table_composite_glyph_counts() {
with_woff2_glyf_table("tests/fonts/woff2/SFNT-TTF-Composite.woff2", |glyf| {
let glyph_counts = glyf.records.iter().fold(
(0, 0, 0),
|(empty, simple, composite), record| match record {
Gly... | rust_cleaned_test_functions.jsonl/40129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
68585,
17,
18449,
291,
1889,
398,
69,
5237,
2965,
13607,
88703,
25977,
368,
341,
262,
448,
62,
68585,
17,
1889,
398,
69,
5237,
445,
23841,
60667,
14,
68585,
17,
11374,
37,
6408,
9285,
10808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prune_out_of_bounds() {
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Blocktree::open(&blocktree_path).unwrap();
blocktree.prune(5);
drop(blocktree);
Blocktree::destroy(&blocktree_path).expect("Expected successful database destruc... | rust_cleaned_test_functions.jsonl/116899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
2886,
6068,
3575,
36878,
368,
341,
286,
1077,
2504,
9344,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
1077,
2504,
9344,
284,
8362,
9344,
486,
2508,
2099,
4574,
9344,
2638,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_issues() {
let params: NoiseParams = "Noise_NN_25519_AESGCM_SHA256".parse().unwrap();
let mut h_i = Builder::new(params.clone()).build_initiator().unwrap();
let mut h_r = Builder::new(params).build_responder().unwrap();
let mut buffer_msg = [0u8; 200];
let mut buffer_... | rust_cleaned_test_functions.jsonl/27114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
90232,
368,
341,
262,
1077,
3628,
25,
50523,
4870,
284,
330,
61819,
1604,
45,
62,
17,
20,
20,
16,
24,
69381,
38,
9985,
38096,
17,
20,
21,
3263,
6400,
1005,
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_pessimistic_lock_check_epoch() {
let mut cluster = new_server_cluster(0, 2);
cluster.cfg.pessimistic_txn.pipelined = true;
cluster.cfg.pessimistic_txn.in_memory = true;
cluster.run();
cluster.must_transfer_leader(1, new_peer(1, 1));
let region = cluster.get_region(b"");... | rust_cleaned_test_functions.jsonl/8372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 710
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
66733,
4532,
9818,
7200,
20682,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
17,
317,
262,
10652,
30481,
556,
66733,
4532,
92299,
556,
81079,
1589,
284,
830,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_declaration_order() {
let map = important_cities();
let actual_entries = map.iter()
.map(|(&state, &city)| (state, city))
.collect::<Vec<_>>();
let declared_entries = actual_entries.iter()
.cloned()
.sorted()
.collect_vec();
assert_eq!(actu... | rust_cleaned_test_functions.jsonl/38662 | {
"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,
77926,
7869,
368,
341,
262,
1077,
2415,
284,
2989,
666,
1361,
543,
262,
1077,
5042,
26092,
284,
2415,
19471,
741,
286,
659,
2186,
22428,
2099,
2454,
11,
609,
8926,
17935,
320,
2454,
11,
3283,
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_try_from_get_mmds() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
sender
.write_all(http_request("GET", "/mmds", None).as_bytes())
.unwrap();
assert!(connection.try_read().is... | rust_cleaned_test_functions.jsonl/106575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
3062,
717,
2277,
82,
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_cfg_and() {
with_globals(|| {
let mut x = Cfg::False;
x &= Cfg::True;
assert_eq!(x, Cfg::False);
x = word_cfg("test");
x &= Cfg::False;
assert_eq!(x, Cfg::False);
x = word_cfg("test2");
x &=... | rust_cleaned_test_functions.jsonl/53554 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1001
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18343,
8378,
368,
341,
286,
448,
58775,
79453,
341,
310,
1077,
5206,
856,
284,
356,
4817,
486,
4049,
280,
310,
856,
14581,
356,
4817,
486,
2514,
280,
310,
2060,
10714,
10297,
87,
11,
356,
4817,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_let_if() {
let t = LetIfTemplate { cond: true }; // instantiate your struct
assert_eq!("Hello, true false foo!", t.call().unwrap()); // then call it.
} | rust_cleaned_test_functions.jsonl/92837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
1149,
11119,
368,
341,
262,
1077,
259,
284,
6771,
2679,
7275,
314,
9756,
25,
830,
20066,
442,
40902,
697,
2036,
198,
262,
2060,
10714,
17223,
9707,
11,
830,
895,
15229,
18789,
259,
8524,
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 |
#[test]
fn test_do_not_graft_within_backoff_period() {
let config = GossipsubConfigBuilder::default()
.backoff_slack(1)
.heartbeat_interval(Duration::from_millis(100))
.build()
.unwrap();
//only one peer => mesh too small and will try to regraft as... | rust_cleaned_test_functions.jsonl/66900 | {
"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,
26309,
7913,
15682,
64,
723,
72385,
3895,
1847,
20818,
368,
341,
286,
1077,
2193,
284,
479,
41473,
1966,
2648,
3297,
486,
2258,
741,
310,
659,
1419,
1847,
11886,
473,
7,
16,
340,
310,
659,
72471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_box_str() {
use std::string::String;
let s = String::from("foo").into_boxed_str();
let r: Arc<str> = Arc::from(s);
assert_eq!(&r[..], "foo");
} | rust_cleaned_test_functions.jsonl/42729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
10194,
2895,
368,
341,
262,
990,
1460,
486,
917,
486,
703,
401,
262,
1077,
274,
284,
923,
486,
1499,
445,
7975,
1827,
18122,
10194,
291,
2895,
543,
262,
1077,
435,
25,
19689,
27,
495,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_memory_size_primitive_nullable() {
let arr: PrimitiveArray<Int64Type> = (0..128).map(Some).collect();
let empty_with_bitmap = PrimitiveArray::<Int64Type>::from(
ArrayData::builder(arr.data_type().clone())
.add_buffer(MutableBuffer::new(0).into())
... | rust_cleaned_test_functions.jsonl/7997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
2368,
84087,
69743,
368,
341,
286,
1077,
2890,
25,
51460,
1857,
34520,
21,
19,
929,
29,
284,
320,
15,
496,
16,
17,
23,
568,
2186,
65405,
568,
17384,
543,
286,
1077,
4287,
6615,
41527,
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_impl_with_other_type_param() {
check_assist(
introduce_named_lifetime,
"impl<I> fmt::Display for SepByBuilder<'_<|>, I>
where
I: Iterator,
I::Item: fmt::Display,
{",
"impl<I, 'a> fmt::Display for SepByBuilder<'a,... | rust_cleaned_test_functions.jsonl/109550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21007,
6615,
30456,
1819,
4090,
368,
341,
286,
1779,
12083,
380,
1006,
310,
19131,
71834,
98827,
345,
310,
330,
6383,
13332,
29,
8879,
486,
7020,
369,
17449,
1359,
3297,
18291,
41743,
91,
8066,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_pause() {
test_harness(|| unsafe {
library_init();
let session = get_session();
let mut gid = A2Gid::default();
assert_eq!(
add_uri(
session,
&mut gid,
&vec!["http://localhost/1".into()],
... | rust_cleaned_test_functions.jsonl/25964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
59989,
368,
341,
262,
1273,
1523,
23518,
79453,
19860,
341,
286,
6733,
6137,
543,
286,
1077,
3797,
284,
633,
12316,
1428,
286,
1077,
5206,
45863,
284,
362,
17,
38,
307,
486,
2258,
543,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_rev_words() {
let tests = [("", ""),
("a", "a"),
("a b", "b a"),
("cat dog", "dog cat"),
// compressed into a single space.
("cat dog", "dog cat"),
("cat dog frog", "fr... | rust_cleaned_test_functions.jsonl/15902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38082,
18981,
368,
341,
262,
1077,
7032,
284,
508,
19814,
72712,
338,
3489,
64,
497,
330,
64,
4461,
338,
3489,
64,
293,
497,
330,
65,
264,
4461,
338,
3489,
4616,
5562,
497,
330,
18457,
8251,
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... | 2 |
#[test]
fn test_wpa3_sme_auth_config() {
let bss = fake_bss!(Wpa3);
let mut device_info = fake_device_info([0xaa; 6]);
device_info.driver_features = vec![fidl_fuchsia_wlan_common::DriverFeature::SaeSmeAuth];
let auth_config = get_wpa3_auth_config(&device_info, vec![0xbb; 8], &bss... | rust_cleaned_test_functions.jsonl/6074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
6595,
18,
643,
2660,
14014,
5332,
368,
341,
286,
1077,
293,
778,
284,
12418,
880,
778,
10297,
54,
6595,
18,
317,
286,
1077,
5206,
3671,
3109,
284,
12418,
9204,
3109,
2561,
15,
43300,
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_find_roots_one_in_one_out() {
let quad = BoundedQuadratic::new(2.5, 5., 1., -5., 6.);
let extended = quad.extend_domain();
let (quad_x1, quad_x2) = quad.find_roots();
let (ext_x1, ext_x2) = extended.find_roots();
assert_eq!(quad_x1, 3.);
assert!(!q... | rust_cleaned_test_functions.jsonl/19870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
26608,
2412,
11667,
1243,
11667,
6068,
368,
341,
286,
1077,
27082,
284,
425,
13082,
2183,
88678,
486,
931,
7,
17,
13,
20,
11,
220,
20,
2572,
220,
16,
2572,
481,
20,
2572,
220,
21,
58957... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u64() {
let data = [
0x6b, 0x32, 0x01, 0x00, 0x9c, 0x02, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
];
assert_eq!(
parse(&data).unwrap().token_tape,
vec![BinaryToken::Token(0x326b), BinaryToken::U64(128),]
);
} | rust_cleaned_test_functions.jsonl/109424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
21,
19,
368,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
87,
21,
65,
11,
220,
15,
87,
18,
17,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
24,
66,
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_negation_non_zero_modulus() {
let zero: ModInt = ModInt {
value: BigInt::zero(),
modulus: BigInt::from(11),
};
// 0 mod 11 = 0
let neg_zero: ModInt = zero.neg();
assert_eq!(BigInt::from(0), neg_zero.value);
assert_... | rust_cleaned_test_functions.jsonl/126145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
367,
21637,
19359,
7480,
19425,
368,
341,
286,
1077,
7168,
25,
5650,
1072,
284,
5650,
1072,
341,
310,
897,
25,
62608,
486,
14154,
3148,
310,
74024,
25,
62608,
486,
1499,
7,
16,
16,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_marginal_trailer() {
let mut log = new_record_test();
// make a trailer that is exactly the same length as an empty record
let n = BLOCK_SIZE - 2 * HEADER_SIZE;
log.write(big_string("foo", n).as_str());
assert_eq!(BLOCK_SIZE - HEADER_SIZE, log.written_byte... | rust_cleaned_test_functions.jsonl/46682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
858,
977,
3547,
38782,
368,
341,
286,
1077,
5206,
1487,
284,
501,
14192,
4452,
543,
286,
442,
1281,
264,
19253,
429,
374,
6896,
279,
1852,
3084,
438,
458,
4287,
3255,
198,
286,
1077,
308,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_downcast_ref() {
assert_eq!(
"oh no!",
*bail_literal().unwrap_err().downcast_ref::<&str>().unwrap(),
);
assert_eq!(
"oh no!",
bail_fmt().unwrap_err().downcast_ref::<String>().unwrap(),
);
assert_eq!(
"oh no!",
bail_error()
... | rust_cleaned_test_functions.jsonl/69156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13998,
3829,
7793,
368,
341,
262,
2060,
10714,
33673,
286,
330,
2267,
902,
33436,
286,
353,
65,
604,
34100,
1005,
15454,
9266,
1005,
2923,
3829,
7793,
27638,
5,
495,
10483,
15454,
3148,
262,
1439,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_os_rng_huge() {
let mut r = OsRng::new().unwrap();
let mut huge = [0u8; 100_000];
r.fill_bytes(&mut huge);
} | rust_cleaned_test_functions.jsonl/76530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29387,
66849,
1523,
4733,
368,
341,
262,
1077,
5206,
435,
284,
15433,
49,
968,
486,
931,
1005,
15454,
1428,
262,
1077,
5206,
6765,
284,
508,
15,
84,
23,
26,
220,
16,
15,
15,
62,
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 |
#[test]
fn test_ptr_map_cell_none() {
let type_id = TypeId::of::<u32>();
let pm:PtrMapCell<u32> = PtrMapCell::new();
assert_eq!(pm.get(type_id),None);
} | rust_cleaned_test_functions.jsonl/88911 | {
"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,
4348,
5376,
16648,
31488,
368,
341,
286,
1077,
943,
842,
284,
3990,
764,
486,
1055,
27638,
84,
18,
17,
3913,
286,
1077,
8836,
25,
5348,
2227,
3599,
34837,
18,
17,
29,
284,
46409,
2227,
3599,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_introduce_var_for_break_not_applicable() {
check_assist_range_not_applicable(
introduce_variable,
"fn main() { loop { <|>break<|>; }; }",
);
} | rust_cleaned_test_functions.jsonl/5723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
47845,
4612,
5478,
39494,
7913,
8191,
46114,
368,
341,
286,
1779,
12083,
380,
9698,
7913,
8191,
46114,
1006,
310,
19131,
14635,
345,
310,
330,
8822,
1887,
368,
314,
6337,
314,
82639,
29,
896... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_config() {
let (cfg, _dir) = TiKvConfig::with_tmp().unwrap();
let mut cfg_controller = ConfigController::new(cfg);
let mut cfg = cfg_controller.get_current().clone();
// normal update
cfg_controller
.update(change("raftstore.raft-log-gc-threshold", "2000"))
... | rust_cleaned_test_functions.jsonl/63650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
5332,
368,
341,
262,
1077,
320,
14072,
11,
716,
3741,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
262,
1077,
5206,
13286,
21600,
284,
5532,
2051,
486,
931,
28272,
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_binary_examples() {
assert_eq!(eval("1+3"), Ok(Value::Int(4)));
assert_eq!(eval("3+1"), Ok(Value::Int(4)));
assert_eq!(eval("3-5"), Ok(Value::Int(-2)));
assert_eq!(eval("5-3"), Ok(Value::Int(2)));
assert_eq!(eval("5 / 4"), Ok(Value::Int(1)));
assert_eq!(eval("5 *3"), Ok(V... | rust_cleaned_test_functions.jsonl/105338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
45279,
368,
341,
262,
2060,
10714,
10297,
14170,
445,
16,
10,
18,
3975,
7622,
25346,
486,
1072,
7,
19,
4945,
262,
2060,
10714,
10297,
14170,
445,
18,
10,
16,
3975,
7622,
25346,
486,
1072,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_peer_window() {
let mut s = socket_established();
s.remote_mss = 6;
s.send_slice(b"abcdef123456!@#$%^").unwrap();
recv!(s, [TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
payload: &b"abcdef"[..],
... | rust_cleaned_test_functions.jsonl/1775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
45159,
12571,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
274,
34093,
717,
778,
284,
220,
21,
280,
286,
274,
5219,
26488,
1883,
1,
41202,
16,
17,
18,
19,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_message(){
let msg = error_message(&1);
assert_eq!(msg, "Unknown Error");
let msg = error_message(&1002);
assert_eq!(msg, "Error with Connection");
} | rust_cleaned_test_functions.jsonl/19289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
6462,
3032,
286,
1077,
3750,
284,
1465,
6462,
2099,
16,
317,
286,
2060,
10714,
10297,
3236,
11,
330,
13790,
4600,
3071,
286,
1077,
3750,
284,
1465,
6462,
2099,
16,
15,
15,
17,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_normalize_path_merge_slashes() {
let app = App::new()
.resource("/resource1", |r| r.method(Method::GET).f(index))
.resource("/resource1/a/b", |r| r.method(Method::GET).f(index))
.default_resource(|r| r.h(NormalizePath::default()))
.finish()... | rust_cleaned_test_functions.jsonl/38138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1876
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80807,
2638,
20888,
11886,
14051,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
9233,
4283,
9233,
16,
497,
760,
81,
91,
435,
12908,
35419,
486,
3806,
568,
69,
7195,
1171,
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... | 3 |
#[test]
fn test_from_space_track_omm() -> Result<()> {
let elements: Elements = serde_json::from_str(
r#"{"CCSDS_OMM_VERS":"2.0",
"COMMENT":"GENERATED VIA SPACE-TRACK.ORG API",
"CREATION_DATE":"2020-12-13T17:26:09",
"ORIGINATOR":"18 SPCS",
... | rust_cleaned_test_functions.jsonl/74831 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2037
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
14663,
28545,
62,
19786,
368,
1464,
5714,
71698,
341,
286,
1077,
5424,
25,
34157,
284,
61570,
9455,
486,
1499,
2895,
1006,
310,
435,
55543,
4913,
3706,
5491,
50,
83169,
44,
2334,
4321,
3252,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_missing_file() {
cmd()
.arg("noexist")
.assert()
.failure()
.stderr(predicate::str::starts_with(
r#"error: opening noexist: No such file or directory"#,
));
} | rust_cleaned_test_functions.jsonl/120311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
2458,
368,
341,
262,
5439,
741,
286,
659,
858,
445,
2152,
28575,
1138,
286,
659,
2207,
741,
286,
659,
28939,
741,
286,
659,
36422,
76172,
486,
495,
486,
65876,
6615,
1006,
310,
435,
55543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iter() {
let tmpdir = starcoin_config::temp_dir();
let storage = Storage::new(StorageInstance::new_cache_and_db_instance(
CacheStorage::new(None),
DBStorage::new(tmpdir.path(), RocksdbConfig::default(), None).unwrap(),
))
.unwrap();
let transaction_info1 = Ric... | rust_cleaned_test_functions.jsonl/73685 | {
"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,
11723,
368,
341,
262,
1077,
4174,
3741,
284,
6774,
7160,
5332,
486,
3888,
4334,
543,
262,
1077,
5819,
284,
14693,
486,
931,
7,
5793,
2523,
486,
931,
11529,
8378,
8685,
11904,
1006,
286,
19479,
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_config_specifier_enabled() {
let config = setup();
let specifier = resolve_url("file:///a.ts").unwrap();
assert!(!config.specifier_enabled(&specifier));
config
.set_workspace_settings(json!({
"enable": true
}))
.expect("could not update");
assert!(co... | rust_cleaned_test_functions.jsonl/20063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
13594,
3049,
18220,
368,
341,
262,
1077,
2193,
284,
6505,
543,
262,
1077,
97616,
284,
8830,
2903,
445,
1192,
60896,
64,
21288,
1827,
15454,
543,
262,
2060,
0,
3471,
1676,
28326,
3049,
18220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all_bits() {
let mut fb = FooBar(0);
assert_eq!(0, fb.all_bits());
fb.set_all_bits(!0u32);
assert_eq!(!0u32, fb.0);
assert_eq!(!0u32, fb.all_bits());
fb.0 = 0x8000_0001;
assert_eq!(0x8000_0001, fb.all_bits());
} | rust_cleaned_test_functions.jsonl/2273 | {
"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,
5705,
20034,
368,
341,
262,
1077,
5206,
25469,
284,
33428,
3428,
7,
15,
626,
262,
2060,
10714,
10297,
15,
11,
25469,
7670,
20034,
5231,
262,
25469,
980,
5705,
20034,
3471,
15,
84,
18,
17,
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_convert_str_indices_trigger_debug_assertions() {
fn none_ors() -> impl Iterator<Item = NoneOr<i32>> {
iter::once(NoneOr::None).chain((-30..30).map(NoneOr::Other))
}
for s in &["", "a", "abcde", "Телемак"] {
for start in none_ors() {
... | rust_cleaned_test_functions.jsonl/101242 | {
"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,
34910,
2895,
18333,
32925,
15446,
16553,
908,
368,
341,
286,
5168,
6857,
62,
1087,
368,
1464,
11605,
23023,
31857,
284,
2240,
2195,
21897,
18,
17,
2452,
341,
310,
5367,
486,
13184,
26717,
2195,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_task_one() {
assert_eq!(4, first_task_job("#1 @ 1,3: 4x4\n#2 @ 3,1: 4x4\n#3 @ 5,5: 2x2".as_bytes()))
} | rust_cleaned_test_functions.jsonl/35264 | {
"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,
12184,
11667,
368,
341,
286,
2060,
10714,
10297,
19,
11,
1156,
12184,
20298,
3584,
16,
569,
220,
16,
11,
18,
25,
220,
19,
87,
19,
1699,
2,
17,
569,
220,
18,
11,
16,
25,
220,
19,
87,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_date() {
let settings = WorkerSettings::<()>::new(Vec::new(), KeepAlive::Os);
let mut buf1 = BytesMut::with_capacity(DATE_VALUE_LENGTH + 10);
settings.set_date(&mut buf1);
let mut buf2 = BytesMut::with_capacity(DATE_VALUE_LENGTH + 10);
settings.set_date(&m... | rust_cleaned_test_functions.jsonl/1838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
368,
341,
286,
1077,
5003,
284,
33086,
6086,
27638,
368,
6831,
931,
49923,
486,
931,
1507,
13655,
32637,
486,
28867,
317,
286,
1077,
5206,
6607,
16,
284,
30024,
51440,
486,
4197,
35603,
5432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shorter() {
let m1 = mount_info("/dev/foo", "/", "/mnt/bar");
let m2 = mount_info("/dev/foo", "/", "/mnt/bar/baz");
assert!(!mount_info_lt(&m1, &m2));
let m1 = mount_info("/dev/foo", "/root", "/mnt/bar");
let ... | rust_cleaned_test_functions.jsonl/7060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
261,
368,
341,
3374,
310,
1077,
296,
16,
284,
6470,
3109,
4283,
3583,
60555,
497,
64657,
3521,
40882,
49513,
797,
310,
1077,
296,
17,
284,
6470,
3109,
4283,
3583,
60555,
497,
64657,
3521,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_utf8string() {
assert_eq!(
ber_read_content_utf8string("AZaz09 '()+,-./:=?[]{}\0\nüÜ".as_ref(), 28),
Ok((
[].as_ref(),
BerObjectContent::UTF8String("AZaz09 '()+,-./:=?[]{}\0\nüÜ")
)),
);
assert_eq!(
ber_read_content_utf8string(b... | rust_cleaned_test_functions.jsonl/55464 | {
"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,
39453,
23,
917,
368,
341,
262,
2060,
10714,
33673,
286,
10207,
6443,
7495,
39453,
23,
917,
445,
23563,
1370,
15,
24,
364,
17140,
4999,
1725,
14209,
30,
1294,
87963,
15,
1699,
2391,
52491,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_output_simple() {
new_ucmd!()
.args(&["alpha.txt"])
.succeeds()
.stdout_only("abcde\nfghij\nklmno\npqrst\nuvwxyz\n");
} | rust_cleaned_test_functions.jsonl/90923 | {
"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,
7645,
30015,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
7141,
3909,
14108,
286,
659,
82,
29264,
82,
741,
286,
659,
36358,
18410,
445,
13683,
450,
1699,
69,
866,
3172,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_long_lists() {
assert!(check_identity(concat![
"(the-header-is-always-inline\n",
" (first-child with more arguments)\n",
" (next (child (is (nested))))\n",
" (this\n",
" (is nested more)\n",
" (and more)\n",
" (x x x x x x x... | rust_cleaned_test_functions.jsonl/21589 | {
"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,
17799,
37288,
368,
341,
262,
2060,
10297,
2028,
46244,
96360,
90515,
286,
11993,
1782,
9351,
30430,
18779,
2284,
23633,
1699,
756,
286,
330,
220,
320,
3896,
23484,
448,
803,
5977,
10699,
77,
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_empty_dir() {
let tempdir = tempfile::tempdir().unwrap();
let request = Request {
path: tempdir.path().to_path_buf(),
};
let mut session = session::test::Fake::new();
assert!(handle(&mut session, request).is_ok());
assert_eq!(session... | rust_cleaned_test_functions.jsonl/69102 | {
"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,
15124,
4334,
368,
341,
286,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
1428,
286,
1077,
1681,
284,
6145,
341,
310,
1815,
25,
2730,
3741,
3875,
1005,
983,
2638,
10363,
3148,
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_machine_for_test() {
let writer = Writer::new_test(Some(Format::Json));
writer.machine(&"hello").unwrap();
assert_eq!(writer.test_output().unwrap(), "\"hello\"");
} | rust_cleaned_test_functions.jsonl/125540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38695,
5478,
4452,
368,
341,
286,
1077,
6916,
284,
29404,
486,
931,
4452,
65405,
7,
4061,
486,
5014,
1106,
286,
6916,
77726,
2099,
1,
14990,
1827,
15454,
1428,
286,
2060,
10714,
10297,
18189,
5958... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_id() {
let mut repo = Persistent::try_new(None).expect("failed to create context");
let mut output = Vec::with_capacity(10);
let mut stats = Default::default();
let number = HashId::new(10101).unwrap();
serialize_hash_id(number, &mut output, &mut re... | rust_cleaned_test_functions.jsonl/80242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
842,
368,
341,
286,
1077,
5206,
15867,
284,
66544,
486,
1539,
5921,
26717,
568,
17119,
445,
16091,
311,
1855,
2266,
797,
286,
1077,
5206,
2550,
284,
11312,
486,
4197,
35603,
7,
16,
15,
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_invalid() {
let (path, _directory) = support::deploy("invalid");
unsafe {
let mut stkd: StackDescription_t = mem::uninitialized();
let mut analysis: Analysis_t = mem::uninitialized();
let mut output: Output_t = mem::uninitialized();
stack_description_ini... | rust_cleaned_test_functions.jsonl/8135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
368,
341,
262,
1077,
320,
2343,
11,
716,
23037,
8,
284,
1824,
486,
35794,
445,
11808,
3071,
262,
19860,
341,
286,
1077,
5206,
357,
37744,
25,
14284,
5009,
528,
284,
1833,
486,
359,
36161,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_utf8() {
let logger = slog::Logger::root(slog::Discard, slog::o!());
let string_subsystem = Subsystem::new(64, &logger);
let xs = b"hello";
assert_eq!(
Name::from_utf8(xs, &string_subsystem).unwrap(),
Name::new("hello", &string_subsystem)
);
let xs = "ศไทย中华Việt Nam".as_b... | rust_cleaned_test_functions.jsonl/109232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
39453,
23,
368,
341,
197,
10217,
5925,
284,
34949,
486,
7395,
486,
2888,
1141,
839,
486,
23477,
567,
11,
34949,
486,
78,
0,
1423,
197,
10217,
914,
5228,
8948,
284,
3719,
8948,
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_shard_with_string() {
let mut config = Config::default();
config.shard = Some("core".to_string());
let result = util::shard(config);
assert_eq!(result, 30);
} | rust_cleaned_test_functions.jsonl/118179 | {
"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,
3712,
567,
6615,
3904,
368,
341,
286,
1077,
5206,
2193,
284,
5532,
486,
2258,
543,
286,
2193,
2395,
567,
284,
4329,
445,
2153,
3263,
983,
3904,
1423,
286,
1077,
1102,
284,
4094,
486,
927,
567,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_args_iter_no_conflict() {
static ARGS: [ArgInfo<ArgData>; 2] = [flag!("-foo", FooFlag), flag!("-fooz", FooFlag)];
ArgsIter::new(Vec::<OsString>::new().into_iter(), &ARGS[..]);
} | rust_cleaned_test_functions.jsonl/16242 | {
"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,
8384,
11723,
6536,
16059,
21242,
368,
341,
310,
1099,
84149,
25,
508,
2735,
1731,
27,
2735,
1043,
65795,
220,
17,
60,
284,
508,
9903,
0,
13645,
7975,
497,
33428,
12135,
701,
5181,
0,
13645,
7975... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bad_root_hash() {
let bad_digest = Digest([0u8; 32]);
let (cid, pk, payload) = make_certified_delta(
vec![make_change(vec![upsert("key", "value")])],
1..=1,
GarbleResponse::OverrideCertifiedData(bad_digest.clone()),
);
match decode_certified_deltas... | rust_cleaned_test_functions.jsonl/122441 | {
"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,
15227,
34199,
12993,
8950,
368,
341,
262,
1077,
3873,
52994,
284,
53289,
2561,
15,
84,
23,
26,
220,
18,
17,
10149,
262,
1077,
320,
20558,
11,
22458,
11,
7729,
8,
284,
1281,
37097,
1870,
26710,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_pykmip_query_response() {
let response_hex = concat!(
"42007b010000014042007a0100000048420069010000002042006a0200000004000000010000000042006b02000000040",
"00000000000000042009209000000080000000060ff457142000d0200000004000000010000000042000f01000000e842",
... | rust_cleaned_test_functions.jsonl/26633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40291,
16017,
573,
5738,
9655,
368,
341,
286,
1077,
2033,
32655,
284,
33720,
33673,
310,
330,
19,
17,
15,
15,
22,
65,
15,
16,
15,
15,
15,
15,
15,
16,
19,
15,
19,
17,
15,
15,
22,
64,
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... | 2 |
#[test]
fn test_eval_ternary_function() {
#[rpn_fn(nullable)]
fn foo(v1: Option<&i64>, v2: Option<&i64>, v3: Option<&i64>) -> Result<Option<i64>> {
Ok(Some(v1.unwrap() - v2.unwrap() * v3.unwrap()))
}
let mut columns = LazyBatchColumnVec::from(vec![{
... | rust_cleaned_test_functions.jsonl/92670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
62,
4160,
658,
9174,
368,
341,
394,
11506,
81,
19958,
15246,
34885,
5563,
286,
5168,
15229,
3747,
16,
25,
6959,
52244,
72,
21,
19,
8066,
348,
17,
25,
6959,
52244,
72,
21,
19,
8066,
348,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hdfs() {
let dfs = get_dfs();
{
let minidfs_addr = dfs.namenode_addr();
let fs = dfs.get_hdfs().ok().unwrap();
// Test hadoop file
{
let uuid = Uuid::new_v4().to_string();
let test_f... | rust_cleaned_test_functions.jsonl/29890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
34378,
368,
341,
286,
1077,
25792,
284,
633,
814,
3848,
543,
286,
341,
310,
1077,
1308,
307,
3848,
7387,
284,
25792,
1253,
24774,
534,
7387,
543,
310,
1077,
8619,
284,
25792,
670,
1523,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_output_stream_write_raw_little_endian64() {
test_write("f1 e2 d3 c4 b5 a6 07 f8", |os| {
os.write_raw_little_endian64(0xf807a6b5c4d3e2f1)
});
} | rust_cleaned_test_functions.jsonl/104521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
12673,
9165,
16067,
907,
2377,
87193,
21,
19,
368,
341,
286,
1273,
9165,
445,
69,
16,
384,
17,
294,
18,
272,
19,
293,
20,
264,
21,
220,
15,
22,
282,
23,
497,
760,
436,
91,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example_2_1() {
let input = "qzmt-zixmtkozy-ivhz-343[dummy]";
let answer: usize = solve(&input, 2);
assert_eq!(answer, 0);
} | rust_cleaned_test_functions.jsonl/49459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
62,
17,
62,
16,
368,
341,
286,
1077,
1946,
284,
330,
80,
89,
2501,
9141,
941,
2501,
9325,
4246,
12,
344,
37259,
12,
18,
19,
18,
21427,
8574,
59757,
286,
1077,
4226,
25,
22301,
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 |
#[test]
fn test_filter_issue1(){
assert_eq!(filter(&b"age=lt.20&product=eq.134&price=lt.100.0"[..]), IResult::Done(&b""[..],
Filter{
connector: None,
condition: Condition{
left: Operand::Column("age".to_string()),
equality: Equality::L... | rust_cleaned_test_functions.jsonl/114306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 768
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
53340,
16,
3032,
262,
2060,
10714,
10297,
5315,
2099,
65,
1,
424,
28,
4832,
13,
17,
15,
5,
3031,
28,
11006,
13,
16,
18,
19,
5,
6555,
28,
4832,
13,
16,
15,
15,
13,
15,
36864,
496,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_rest_api() {
let bank_forks = create_bank_forks();
assert_eq!(None, process_rest(&bank_forks, "not-a-supported-rest-api"));
assert_eq!(
process_rest(&bank_forks, "/v0/circulating-supply"),
process_rest(&bank_forks, "/v0/total-supply")
... | rust_cleaned_test_functions.jsonl/6867 | {
"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,
11305,
32231,
11697,
368,
341,
286,
1077,
6073,
761,
73302,
284,
1855,
35733,
761,
73302,
1428,
286,
2060,
10714,
10297,
4064,
11,
1882,
32231,
2099,
17033,
761,
73302,
11,
330,
1921,
7409,
87113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shell_version() {
let tested = ShellCompatibilityVersion::new("TEST_CHAIN".to_string(), vec![3, 4], vec![1, 2]);
assert!(matches!(tested.choose_compatible_version(&NetworkVersion::new("TEST_XYZ".to_string(), 0, 0)), Err(NackMotive::UnknownChainName)));
assert!(matches!(t... | rust_cleaned_test_functions.jsonl/511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48945,
9438,
368,
341,
286,
1077,
12510,
284,
29402,
85880,
5637,
486,
931,
445,
10033,
70232,
3263,
983,
3904,
1507,
7486,
20703,
18,
11,
220,
19,
1125,
7486,
20703,
16,
11,
220,
17,
10149,
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_node_merge_with_slow_learner() {
let mut cluster = new_node_cluster(0, 2);
configure_for_merge(&mut cluster);
cluster.cfg.raft_store.raft_log_gc_threshold = 40;
cluster.cfg.raft_store.raft_log_gc_count_limit = 40;
cluster.cfg.raft_store.merge_max_log_gap = 15;
cluster.pd_... | rust_cleaned_test_functions.jsonl/95185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
6615,
82447,
62,
93595,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
17,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
10652,
30481,
13,
294... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hsv2hsl() {
let hsv_vec = vec!["hsv(180,100%,50%)", "hsv(400,100%,50%)"];
let test_result = vec![
vec!["hsl(180.00,100%,25%)", "HSL(180.00,100%,25%)", "hsl(180.00,100%,25%)", "hsla(180.00,100%,25%,1)", "HSL(180.00,100%,25%)", "HSLA(180.00,100%,25%,1)", "hsla(180.00,100%,25%,1)", "HSLA(180... | rust_cleaned_test_functions.jsonl/35856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
3492,
17,
71,
3226,
368,
341,
197,
10217,
82333,
13251,
284,
7486,
0,
1183,
71,
3492,
7,
16,
23,
15,
11,
16,
15,
15,
13384,
20,
15,
11334,
497,
330,
71,
3492,
7,
19,
15,
15,
11,
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... | 3 |
#[test]
fn test_named_wildcard_collide() {
let mut tree = PathTree::<usize>::new();
tree.insert("/git/:org/:repo", 1);
tree.insert("/git/*any", 2);
let node = tree.find("/git/rust-lang/rust");
assert!(node.is_some());
let res = node.unwrap();
assert_eq!(*res.0, 1);
assert_eq!(re... | rust_cleaned_test_functions.jsonl/12990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71834,
1670,
695,
4951,
43597,
577,
368,
341,
262,
1077,
5206,
4916,
284,
7933,
6533,
27638,
51878,
6831,
931,
543,
262,
4916,
7030,
4283,
12882,
11315,
1775,
11315,
23476,
497,
220,
16,
317,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pair_count_hashmap_count() {
let inputs = read_lines("data/day_14_sample.txt");
let (template, rules) = parse_inputs(&inputs);
let rules_map = rules_as_map(&rules);
let (pair_counts, start) = even_faster_expand_iter(&template, &rules_map, 40);
let (min, max) = min_max_from_p... | rust_cleaned_test_functions.jsonl/105370 | {
"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,
14445,
3180,
8950,
2186,
3180,
368,
341,
262,
1077,
11127,
284,
1349,
18323,
445,
691,
44739,
62,
16,
19,
17491,
3909,
797,
262,
1077,
320,
4214,
11,
5601,
8,
284,
4715,
28557,
2099,
24941,
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_addr_key() {
assert_eq!(
addr_key(&net::IpAddr::V4(net::Ipv4Addr::new(255, 0, 3, 4))),
0
);
assert_eq!(
addr_key(&net::IpAddr::V4(net::Ipv4Addr::new(255, 1, 3, 4))),
1
);
assert_eq!(
addr_key(&net... | rust_cleaned_test_functions.jsonl/79211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7387,
3097,
368,
341,
286,
2060,
10714,
33673,
310,
10789,
3097,
2099,
4711,
486,
23378,
13986,
486,
53,
19,
30723,
486,
80656,
19,
13986,
486,
931,
7,
17,
20,
20,
11,
220,
15,
11,
220,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pause_split_when_snap_gen_will_split() {
let is_generating_snapshot = "is_generating_snapshot";
fail::cfg(is_generating_snapshot, "return()").unwrap();
let (region, left, right) = gen_split_region();
assert_ne!(left, right);
assert_eq!(region.get_start_key(), left.get_start... | rust_cleaned_test_functions.jsonl/45464 | {
"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,
59989,
17052,
47636,
74175,
16322,
1670,
483,
17052,
368,
341,
262,
1077,
374,
71963,
1095,
53265,
284,
330,
285,
71963,
1095,
53265,
876,
262,
3690,
486,
14072,
9623,
71963,
1095,
53265,
11,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonexistent_file() {
new_ucmd!()
.arg("nonexistent.txt")
.fails()
.status_code(2)
.stderr_only(
#[cfg(not(windows))]
"sort: cannot read: nonexistent.txt: No such file or directory",
#[cfg(windows)]
"sort: cannot ... | rust_cleaned_test_functions.jsonl/20531 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
64085,
2458,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
445,
6280,
64085,
3909,
1138,
286,
659,
59631,
741,
286,
659,
2829,
4136,
7,
17,
340,
286,
659,
36422,
18410,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.