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_exec_unknown_standard_n() {
let header = make_test_header(EndianSlice::new(&[], LittleEndian));
let initial_registers = LineRow::new(&header);
let opcode = LineInstruction::UnknownStandardN(
constants::DwLns(111),
EndianSlice::new(&[2, 2, 2], Littl... | rust_cleaned_test_functions.jsonl/3383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
57507,
48688,
1089,
368,
341,
286,
1077,
4247,
284,
1281,
4452,
8757,
7,
43231,
33236,
486,
931,
2099,
12995,
14671,
43231,
1106,
286,
1077,
2856,
78360,
284,
7083,
3102,
486,
931,
2099,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde() {
let contents: Vec<u8> = vec![0, 1, 2];
let mutex = RwLock::new(contents.clone());
let serialized = serialize(&mutex).unwrap();
let deserialized: RwLock<Vec<u8>> = deserialize(&serialized).unwrap();
assert_eq!(*(mutex.read()), *(deserialized.rea... | rust_cleaned_test_functions.jsonl/15764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
368,
341,
286,
1077,
8794,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
935,
286,
1077,
30863,
284,
55294,
11989,
486,
931,
46964,
15997,
5231,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subscribe_and_graft_with_negative_score() {
//simulate a communication between two gossipsub instances
let (mut gs1, _, topic_hashes) = inject_nodes1()
.topics(vec!["test".into()])
.scoring(Some((
PeerScoreParams::default(),
... | rust_cleaned_test_functions.jsonl/66951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88935,
8378,
15682,
64,
723,
6615,
53865,
10405,
368,
341,
286,
442,
86711,
264,
10535,
1948,
1378,
57487,
1966,
13121,
198,
286,
1077,
320,
6984,
28081,
16,
11,
8358,
8544,
91616,
8,
284,
15551,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compaction_side_effects() {
let last_index = 1000u64;
let unstable_index = 750u64;
let last_term = last_index;
let storage = MemStorage::new();
for i in 1..=unstable_index {
storage
.wl()
.append(&[new_entry(i as... | rust_cleaned_test_functions.jsonl/48408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 875
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
1311,
30862,
83171,
368,
341,
286,
1077,
1537,
3560,
284,
220,
16,
15,
15,
15,
84,
21,
19,
280,
286,
1077,
44211,
3560,
284,
220,
22,
20,
15,
84,
21,
19,
280,
286,
1077,
1537,
17464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_complex_array() {
let schema = r#"
{
"type":"record",
"name":"TestComplexArray",
"fields":[
{
"name":"a",
"type": {
"type":"array",
"items":... | rust_cleaned_test_functions.jsonl/27822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1046
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41522,
3858,
368,
341,
286,
1077,
10802,
284,
435,
2,
698,
286,
341,
310,
330,
1313,
3252,
8548,
756,
310,
330,
606,
3252,
2271,
31137,
1857,
756,
310,
330,
9007,
8899,
198,
394,
341,
503,
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_recv_msg_unreachable() {
let l = default_logger();
let previous_ents = vec![empty_entry(1, 1), empty_entry(1, 2), empty_entry(1, 3)];
let s = new_storage();
s.wl().append(&previous_ents).unwrap();
let mut r = new_test_raft(1, vec![1, 2], 10, 1, s, &l);
r.become_candidate(... | rust_cleaned_test_functions.jsonl/19138 | {
"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,
36118,
6483,
4907,
46550,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
3681,
62,
805,
284,
7486,
20703,
3194,
9078,
7,
16,
11,
220,
16,
701,
4287,
9078,
7,
16,
11,
220,
17,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_product() {
let mut transaction_context = MockTransactionContext::default();
let state = ProductState::new(&mut transaction_context);
assert!(state.set_product(PRODUCT_ID, make_product()).is_ok());
let result = state.get_product(PRODUCT_ID).unwrap();
... | rust_cleaned_test_functions.jsonl/20317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
9840,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
14563,
8070,
1972,
486,
2258,
543,
286,
1077,
1584,
284,
5643,
1397,
486,
931,
2099,
6984,
7745,
8467,
626,
286,
2060,
10297,
2454,
980,
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_get_hash_index() {
let s = "This is a test string";
let i: u32 = 32;
assert_eq!(BloomFilter::get_hash_index(i, &s, 10), 4);
} | rust_cleaned_test_functions.jsonl/89166 | {
"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,
3062,
8950,
3560,
368,
341,
286,
1077,
274,
284,
330,
1986,
374,
264,
1273,
914,
876,
286,
1077,
600,
25,
575,
18,
17,
284,
220,
18,
17,
280,
286,
2060,
10714,
10297,
33,
18474,
5632,
486,
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 |
#[test]
fn test_arrow_reader_all_columns() {
let json_values = get_json_array("parquet/generated_simple_numerics/blogs.json");
let parquet_file_reader =
get_test_reader("parquet/generated_simple_numerics/blogs.parquet");
let max_len = parquet_file_reader.metadata().file_met... | rust_cleaned_test_functions.jsonl/83370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46566,
22306,
5705,
22590,
368,
341,
286,
1077,
2951,
9146,
284,
633,
9455,
3858,
445,
1732,
23300,
79372,
30015,
99001,
1211,
3470,
22081,
4323,
3071,
286,
1077,
1346,
23300,
2458,
22306,
4035,
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_collect_token_balance_from_account() {
let (mut genesis_config, _mint_keypair) = create_genesis_config(500);
let account = Account::new(42, 55, &Pubkey::new_unique());
let mint_data = Mint {
name: "Test Token".to_string(),
symbol: "TST".... | rust_cleaned_test_functions.jsonl/32860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
6458,
29396,
5673,
13500,
368,
341,
286,
1077,
320,
6984,
59366,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
626,
1789,
286,
1077,
2692,
284,
8615,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duplicate_shred_max_payload_size() {
let mut rng = rand::thread_rng();
let leader = Arc::new(Keypair::new());
let keypair = Keypair::new();
let (slot, parent_slot, reference_tick, version) = (53084024, 53084023, 0, 0);
let shredder =
Shredder::... | rust_cleaned_test_functions.jsonl/11654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 809
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
3712,
1151,
6345,
32813,
2368,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
7653,
284,
19689,
486,
931,
7,
6608,
1082,
1310,
486,
931,
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... | 3 |
#[test]
fn test_left_string() {
assert_condition_err!("\"hello\" < 3.14", 26);
assert_condition_err!("\"hello\" < 3", 26);
assert_condition_err!("\"hello\" < 3.14#", 26);
assert_condition_false!("\"def\" < \"abc\"");
assert_condition_false!("\"def\" <... | rust_cleaned_test_functions.jsonl/22663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9579,
3904,
368,
341,
310,
2060,
27656,
9266,
17223,
2105,
14990,
2105,
366,
220,
18,
13,
16,
19,
497,
220,
17,
21,
317,
310,
2060,
27656,
9266,
17223,
2105,
14990,
2105,
366,
220,
18,
497,
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_iterator() {
let r = Cursor::new(Vec::from(TESTDATA.as_bytes()));
let mut entries = Entries::new(r);
assert_eq!(entries.next().unwrap().unwrap().message(), "1");
assert_eq!(entries.next().unwrap().unwrap().message(), "2");
assert_eq!(entries.next().unwrap... | rust_cleaned_test_functions.jsonl/63155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
368,
341,
286,
1077,
435,
284,
28067,
486,
931,
49923,
486,
1499,
50320,
17777,
5357,
12524,
7392,
286,
1077,
5206,
10695,
284,
65193,
486,
931,
2601,
626,
286,
2060,
10714,
10297,
12940,
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_edge_oneshot_triggered() {
let poll = Poll::new().unwrap();
let mut events = Events::with_capacity(1024);
let mut timer = Timer::default();
poll.register(
&timer,
Token(0),
Ready::readable(),
PollOpt::edge() | PollOpt::oneshot(),
)
.unwrap... | rust_cleaned_test_functions.jsonl/95276 | {
"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,
17932,
62,
3154,
10622,
78678,
368,
341,
262,
1077,
7085,
284,
24385,
486,
931,
1005,
15454,
543,
262,
1077,
5206,
4357,
284,
17627,
486,
4197,
35603,
7,
16,
15,
17,
19,
317,
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... | 4 |
#[test]
fn test_record_key_values_builder() {
use super::Record;
use kv::{self, Visitor};
struct TestVisitor {
seen_pairs: usize,
}
impl<'kvs> Visitor<'kvs> for TestVisitor {
fn visit_pair(
&mut self,
_: kv::Key<'k... | rust_cleaned_test_functions.jsonl/71742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
3097,
9146,
28532,
368,
341,
286,
990,
2256,
486,
6471,
280,
286,
990,
16178,
22964,
721,
11,
55882,
2315,
286,
2036,
3393,
16796,
341,
310,
3884,
36430,
25,
22301,
345,
286,
555,
286,
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_sexp_encode() {
const SEXP_STRING: &'static str =
r#"(("data" "quoted data" 123 4.5) ("data" ("!@#" (4.5) "(more" "data)")))"#;
assert_eq!(Ok(SEXP_STRING.to_string()), try_encode());
} | rust_cleaned_test_functions.jsonl/6881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
35725,
11224,
368,
341,
262,
733,
86040,
12283,
25,
30136,
1978,
607,
4035,
286,
435,
2,
29209,
445,
691,
1,
330,
63725,
821,
1,
220,
16,
17,
18,
220,
19,
13,
20,
8,
3489,
691,
1,
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... | 1 |
#[test]
fn test_snapshot_restore() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let kernel_path = direct_kernel_boot_path();
let api_socket = temp_api_path(&guest.tmp_dir);
let net_id = "... | rust_cleaned_test_functions.jsonl/29416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3791
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53265,
62677,
368,
341,
310,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
310,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
955,
3683,
1106,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sql_lexer_query1() {
use super::Token::*;
assert_eq!(parse(" SeLECT a, b as alias1 , c alias2, d ` alias three ` fRoM table1 WHERE a='Hello World'; ").unwrap(),
vec![
Select, id("a"), Comma, id("b"), As, id("alias1"), Comma,
id("c")... | rust_cleaned_test_functions.jsonl/80065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18063,
62,
38815,
5738,
16,
368,
341,
286,
990,
2256,
486,
3323,
79304,
286,
2060,
10714,
10297,
6400,
445,
1345,
3965,
264,
11,
262,
293,
438,
15534,
16,
1154,
272,
15534,
17,
11,
294,
1565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_nimble_package_version() -> io::Result<()> {
let config_name = "test_project.nimble";
let config_content = r##"
version = "0.1.0"
author = "Mr. nimble"
description = "A new awesome nimble package"
license = "MIT"
"##;
let project_dir = create_project_dir()?;
... | rust_cleaned_test_functions.jsonl/100099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 733
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
1089,
318,
891,
26328,
9438,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
1944,
16352,
1253,
318,
891,
3302,
286,
1077,
2193,
7495,
284,
435,
565,
698,
4366,
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... | 3 |
#[test]
fn test_statsd_client_as_histogrammed_packed_f64() {
let client: Box<dyn Histogrammed<Vec<f64>>> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.histogram("some.histogram", vec![4.0, 5.0, 6.0]).unwrap();
} | rust_cleaned_test_functions.jsonl/10623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
11898,
68564,
2061,
620,
11191,
761,
21,
19,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
82138,
2061,
50439,
63895,
21,
19,
20154,
284,
8261,
486,
931,
7,
16635,
67,
2959,
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_buffer_enqueue_dequeue_one_with() {
let mut ring = RingBuffer::new(vec![0; 5]);
assert_eq!(
ring.dequeue_one_with(|_| unreachable!()) as Result<()>,
Err(Error::Exhausted)
);
ring.enqueue_one_with(Ok).unwrap();
assert!(!ring.is_empt... | rust_cleaned_test_functions.jsonl/37261 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
28395,
2259,
4584,
11667,
6615,
368,
341,
286,
1077,
5206,
10058,
284,
21525,
4095,
486,
931,
25592,
20703,
15,
26,
220,
20,
2558,
286,
2060,
10714,
33673,
310,
10058,
93789,
11667,
6615,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_qa() {
assert_eq!(qaqb("9").0, String::from("5158916779"));
assert_eq!(qaqb("5").0, String::from("0124515891"));
assert_eq!(qaqb("18").0, String::from("9251071085"));
assert_eq!(qaqb("2018").0, String::from("5941429882"));
} | rust_cleaned_test_functions.jsonl/130382 | {
"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,
8976,
64,
368,
341,
286,
2060,
10714,
10297,
15445,
49698,
445,
24,
1827,
15,
11,
923,
486,
1499,
445,
20,
16,
20,
23,
24,
16,
21,
22,
22,
24,
4010,
286,
2060,
10714,
10297,
15445,
49698,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_bits() {
let bits = [0b1001_0110, 0b0011_1100, 0b0100_0010, 0b1000_0001].as_ref();
assert_eq!(split_bits((bits, 0), 0), ((bits, 0), (&[][..], 0)));
assert_eq!(
split_bits((bits, 0), 1),
((bits, 1), (&[0b1001_0110][..], 0))
);
... | rust_cleaned_test_functions.jsonl/37945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
20034,
368,
341,
286,
1077,
9472,
284,
508,
15,
65,
16,
15,
15,
16,
62,
15,
16,
16,
15,
11,
220,
15,
65,
15,
15,
16,
16,
62,
16,
16,
15,
15,
11,
220,
15,
65,
15,
16,
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_phrasal_queries_negative() {
// Different positions
assert_eq!(
search(
"\"lorem ipsum\"",
TermPostingsListsBuilder::new()
.with("lorem", "[[3,[1,12,31]]]")
.with("ipsum", "[[3,[11,14,33]]]")
... | rust_cleaned_test_functions.jsonl/31882 | {
"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,
57729,
300,
278,
65588,
53865,
368,
341,
286,
442,
33396,
9892,
198,
286,
2060,
10714,
33673,
310,
2711,
1006,
394,
15898,
385,
1826,
26342,
95901,
394,
17519,
4133,
819,
37848,
3297,
486,
931,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prewrite_check_max_commit_ts() {
let mut cluster = new_server_cluster(0, 1);
cluster.run();
let cm = cluster.sim.read().unwrap().get_concurrency_manager(1);
cm.update_max_ts(100.into());
let (client, ctx) = build_client(&cluster);
let mut req = PrewriteRequest::default... | rust_cleaned_test_functions.jsonl/50238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
52473,
7200,
6345,
36346,
25023,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
16,
317,
262,
10652,
7634,
1428,
262,
1077,
9961,
284,
10652,
28616,
4125,
1005,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retry() {
let mut handle = RetryDnsHandle::new(
TestClient {
last_succeed: true,
retries: 1,
attempts: Arc::new(AtomicU16::new(0)),
},
2,
);
let test1 = Message::new();
let result ... | rust_cleaned_test_functions.jsonl/90300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62745,
368,
341,
286,
1077,
5206,
3705,
284,
78870,
35,
4412,
6999,
486,
931,
1006,
310,
3393,
2959,
341,
394,
1537,
643,
29264,
25,
830,
345,
394,
60601,
25,
220,
16,
345,
394,
13553,
25,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pop_t3_w() {
match decode_32(0xf85deb04) {
Instruction::POP { registers, thumb32 } => {
let elems: Vec<_> = registers.iter().collect();
assert_eq!(vec![Reg::LR], elems);
assert_eq!(thumb32, true);
}
_ => {
as... | rust_cleaned_test_functions.jsonl/64850 | {
"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,
15227,
17061,
528,
18,
1670,
368,
341,
1066,
262,
2432,
16895,
62,
18,
17,
7,
15,
5848,
23,
20,
37935,
15,
19,
8,
341,
286,
29051,
486,
47262,
314,
24740,
11,
24050,
18,
17,
335,
589,
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_swap_remove() {
let mut v = vec![1i, 2, 3, 4, 5];
let mut e = v.swap_remove(0);
assert_eq!(e, Some(1));
assert_eq!(v, vec![5i, 2, 3, 4]);
e = v.swap_remove(3);
assert_eq!(e, Some(4));
assert_eq!(v, vec![5i, 2, 3]);
e = v.swap_remov... | rust_cleaned_test_functions.jsonl/33136 | {
"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,
40991,
18193,
368,
341,
286,
1077,
5206,
348,
284,
7486,
20703,
16,
72,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
5206,
384,
284,
348,
54537,
18193,
7,
15,
317,
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_zero_plus_matrix_equals_matrix() {
let zero_mat1x3 = Matrix1x3::zero();
let matrix = Matrix1x3::new(3684_i32, 42746_i32, 345_i32);
assert_eq!(zero_mat1x3 + matrix, matrix);
} | rust_cleaned_test_functions.jsonl/129171 | {
"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,
19359,
28043,
10193,
61664,
10193,
368,
341,
286,
1077,
7168,
16610,
16,
87,
18,
284,
11631,
16,
87,
18,
486,
14154,
543,
286,
1077,
6172,
284,
11631,
16,
87,
18,
486,
931,
7,
18,
21,
23,
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_basic() {
let input = r#"
T = [Int, Real, Double],
match foo() {
EvalType::T => { panic!("{}", EvalType::T); },
EvalType::Other => unreachable!(),
}
"#;
let expect_output = r#"
match foo() {
... | rust_cleaned_test_functions.jsonl/87503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
286,
1077,
1946,
284,
435,
2,
698,
310,
350,
284,
508,
1072,
11,
8800,
11,
7093,
1259,
310,
2432,
15229,
368,
341,
394,
58239,
929,
486,
51,
589,
314,
21975,
79878,
58239,
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_ignore_struct_typedef_from_decl_context_redecl() {
let ir = ir_from_cc(
r#"
namespace test_namespace_bindings { struct MyStruct {}; }
namespace test_namespace_bindings { typedef MyStruct MyStruct; }
"#,
)
.unwrap();
assert_ir_matches!(ir, quote! { Reco... | rust_cleaned_test_functions.jsonl/37189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
15126,
42111,
4219,
5673,
35814,
8467,
1288,
10005,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
435,
2,
698,
286,
4473,
1273,
41571,
94516,
314,
2036,
3017,
9422,
52166,
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_post() {
let api = api();
let req = Request::new(Method::Post)
.with_path_segs(&["foo"])
.with_json(&Comment { metadata: HashMap::new(), content: "Panda!".to_owned() })
.unwrap();
let _ = test_ok(&api, req);
let req = Request::new(Method::Get)
.wit... | rust_cleaned_test_functions.jsonl/125382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6333,
368,
341,
262,
1077,
6330,
284,
6330,
543,
262,
1077,
4232,
284,
6145,
486,
931,
35419,
486,
4133,
340,
286,
659,
4197,
2638,
3453,
5857,
2099,
1183,
7975,
14108,
286,
659,
4197,
9455,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transfer_to_self() {
// Input data.
let accounts = vec![WitnessTestAccount::new(1, 10)];
let account = &accounts[0];
let transfer_op = TransferOp {
tx: account
.zksync_account
.sign_transfer(
0,
"",
B... | rust_cleaned_test_functions.jsonl/56187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 608
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
2346,
25637,
368,
341,
262,
442,
5571,
821,
624,
262,
1077,
9618,
284,
7486,
20703,
98413,
2271,
7365,
486,
931,
7,
16,
11,
220,
16,
15,
12587,
262,
1077,
2692,
284,
609,
26206,
58,
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_master_branch_exists() {
let hdr: MapxOrdRawKeyVs<usize> = MapxOrdRawKeyVs::new();
assert!(hdr.branch_exists(INITIAL_BRANCH_NAME));
} | rust_cleaned_test_functions.jsonl/53973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24582,
28031,
9766,
368,
341,
262,
1077,
36615,
25,
5027,
87,
24621,
20015,
1592,
51737,
90244,
29,
284,
5027,
87,
24621,
20015,
1592,
51737,
486,
931,
543,
262,
2060,
10297,
28785,
52560,
9766,
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 |
#[test]
fn test_given_fruits_are_not_modified() {
let mut basket = get_fruit_basket();
fruit_basket(&mut basket);
assert_eq!(*basket.get(&Fruit::Apple).unwrap(), 4);
assert_eq!(*basket.get(&Fruit::Mango).unwrap(), 2);
assert_eq!(*basket.get(&Fruit::Lychee).unwrap(), 5);
... | rust_cleaned_test_functions.jsonl/5209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57653,
761,
67898,
56855,
7913,
37749,
368,
341,
286,
1077,
5206,
14024,
284,
633,
761,
21026,
880,
9553,
543,
286,
13779,
880,
9553,
2099,
6984,
14024,
317,
286,
2060,
10714,
0,
4071,
59764,
670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_anime() {
let mut core = Core::new().unwrap();
let connector = HttpsConnector::new(1, &core.handle()).unwrap();
let client = Client::configure()
.connector(connector)
.build(&core.handle());
let runner = client.get_anime(1).unwrap().and_then(|res| {
... | rust_cleaned_test_functions.jsonl/47203 | {
"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,
3062,
12008,
545,
368,
341,
262,
1077,
5206,
6200,
284,
9518,
486,
931,
1005,
15454,
1428,
262,
1077,
26989,
284,
4823,
82,
35954,
486,
931,
7,
16,
11,
609,
2153,
10132,
6011,
15454,
543,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kafka_producer_invalid_socket() {
let kafka: Kafka = Kafka{configuration: Ok( Configurations{ socket: INVALID_SOCKET.to_string(),
topic: TOPIC.to_string()})};;
assert_eq!(kafka_producer(kafka, TEST_BUFFER.to_string()), SOCKET_ERROR);
} | rust_cleaned_test_functions.jsonl/81757 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
21883,
2540,
28938,
31433,
19555,
368,
341,
286,
1077,
67852,
25,
57025,
284,
57025,
90,
21138,
25,
7622,
7,
5532,
21449,
90,
7575,
25,
32269,
39736,
2389,
3904,
3148,
310,
8544,
25,
25012,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_roots() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
let chained_slots = vec![0, 2, 4, 7, 12, 15];
assert_eq!(blockstore.last_root(), 0);
blockstore.set_roots(chained_slots.ite... | rust_cleaned_test_functions.jsonl/9549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
26608,
2412,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
7,
50704,
2638,
3875,
6011,
15454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_valid_eth_hardcoded() {
let eth_address = EthereumAddress(hex!("176FD6F90730E02D2AF55681c65a115C174bA2C7"));
let eth_account =
EthKey::parse(&hex!("29134835563739bae90483ee3d80945edf2c87a9b55c9193a694291cfdf23a05"))
.unwrap();
assert_eq!(ethereum_address(ð_account), eth_address);
/... | rust_cleaned_test_functions.jsonl/41098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
57757,
77712,
65530,
368,
341,
10217,
8372,
6744,
284,
33946,
4286,
44660,
17223,
16,
22,
21,
14596,
21,
37,
24,
15,
22,
18,
15,
36,
15,
17,
35,
17,
8276,
20,
20,
21,
23,
16,
66,
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... | 2 |
#[test]
fn test_user_alias_broken_regex() -> io::Result<()> {
base_test_user_alias(
"input",
toml::toml! {
[kubernetes]
disabled = false
format = "[$symbol$context( \\($user\\))]($style) in "
[kubernetes.user_aliases... | rust_cleaned_test_functions.jsonl/53538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
35947,
880,
81709,
41832,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
2331,
4452,
3317,
35947,
1006,
310,
330,
1355,
756,
310,
311,
1014,
486,
37401,
75,
0,
341,
394,
508,
74,
29827,
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... | 1 |
#[test]
fn test_tokio_waker() {
let scheduler = Scheduler::new(2);
// A tokio runtime
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_time()
.build()
.unwrap();
// A pipeline that dispatches to a tokio worker
let p... | rust_cleaned_test_functions.jsonl/119094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76162,
815,
1670,
4407,
368,
341,
286,
1077,
28809,
284,
44759,
486,
931,
7,
17,
626,
286,
442,
362,
9628,
815,
15592,
198,
286,
1077,
15592,
284,
9628,
815,
486,
22255,
486,
3297,
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... | 1 |
#[test]
fn test_line_end_on_rope() {
use crate::commandline;
let (rope, s) = commandline::from_path(Some("./KJV.txt".to_string()));
assert_eq!(s, Some("./KJV.txt".to_string()));
let v = rope.line(0).as_str().unwrap_or("\n").chars().collect::<Vec<char>>();
eprintln!("len of line: {}", v.len()... | rust_cleaned_test_functions.jsonl/131724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
6213,
4470,
26608,
375,
368,
341,
262,
990,
17717,
486,
5631,
1056,
280,
262,
1077,
320,
299,
375,
11,
274,
8,
284,
3210,
1056,
486,
1499,
2638,
65405,
13988,
42,
77891,
3909,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cookie_name_string_is_added() {
let cookie = CookieOptions {
cookie_name: "key".to_string(),
cookie_value: None,
max_age: None,
domain: None,
path: None,
secure: false,
http_only: false,
same_... | rust_cleaned_test_functions.jsonl/101595 | {
"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,
38663,
1269,
3904,
6892,
37653,
368,
341,
286,
1077,
12544,
284,
24356,
3798,
341,
310,
12544,
1269,
25,
330,
792,
3263,
983,
3904,
3148,
310,
12544,
3142,
25,
2240,
345,
310,
1932,
32053,
25,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_or_data_bytes() {
let tmp_dir = TempDir::new("kube-client-config-test").unwrap();
let file_path = tmp_dir.path().join("data-file");
let invalid_path = tmp_dir.path().join("invalid-filename");
let file_content = b"file content";
let data_content = b"da... | rust_cleaned_test_functions.jsonl/4239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
8734,
1769,
12524,
368,
341,
286,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
445,
97717,
30011,
25130,
16839,
1827,
15454,
543,
286,
1077,
1034,
2638,
284,
4174,
4334,
3875,
1005,
5987,
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_real_multiply() {
let should_pass = vec![(1.01001, -0.01, Real::new(-0.0101001).ok())];
for (lhs, rhs, expected) in should_pass {
assert_eq!(
expected,
RpnFnScalarEvaluator::new()
.push_param(lhs)
... | rust_cleaned_test_functions.jsonl/5295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 639
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
93054,
368,
341,
286,
1077,
1265,
15464,
284,
7486,
0,
9697,
16,
13,
15,
16,
15,
15,
16,
11,
481,
15,
13,
15,
16,
11,
8800,
486,
931,
4080,
15,
13,
15,
16,
15,
16,
15,
15,
16,
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... | 3 |
#[test]
fn test_get_element_attributes_command_encode_some_attributes() {
let b = GetElementAttributesCommand::from_attributes(&[
MediaAttributeId::Title,
MediaAttributeId::ArtistName,
]);
assert_eq!(b.pdu_id(), PduId::GetElementAttributes);
assert_eq!(b.c... | rust_cleaned_test_functions.jsonl/93002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 481
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7894,
18240,
10811,
11224,
61855,
18240,
368,
341,
286,
1077,
293,
284,
2126,
1691,
10516,
4062,
486,
1499,
18240,
2099,
9640,
310,
7816,
3907,
764,
486,
3851,
345,
310,
7816,
3907,
764,
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_remove_account() {
let cycles_limit = 1024 * 1024 * 1024;
let caller = Address::from_hex("0x755cdba6ae4f479f7164792b318b2a06c759833b").unwrap();
let context = mock_context(cycles_limit, caller);
let tx_hash = context.get_tx_hash().unwrap();
let mut service = new_multi_signa... | rust_cleaned_test_functions.jsonl/130836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 963
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
13500,
368,
341,
262,
1077,
24484,
14763,
284,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
26,
715,
262,
1077,
19865,
284,
9177,
486,
1499,
32655,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_hints_if_a_mix_between_public_and_private_channel_exists() {
let chanmon_cfgs = create_chanmon_cfgs(3);
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None, None, None]);
let nodes = create_network(3, &node_cfgs, &node_cha... | rust_cleaned_test_functions.jsonl/65874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
1523,
21042,
11119,
4306,
67729,
48302,
27074,
8378,
26249,
14571,
9766,
368,
341,
197,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
18,
317,
197,
10217,
2436,
18343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_response() {
let value = InteractionResponse::ChannelMessageWithSource(CallbackData {
allowed_mentions: None,
content: Some("test".into()),
components: None,
embeds: None,
flags: Some(MessageFlags::EPHEMERAL),
tts: N... | rust_cleaned_test_functions.jsonl/122486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9655,
368,
341,
286,
1077,
897,
284,
42707,
2582,
486,
9629,
2052,
2354,
3608,
3025,
3420,
1043,
341,
310,
5420,
30063,
25,
2240,
345,
310,
2213,
25,
4329,
445,
1944,
3263,
18122,
14702,
310,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_or_hl() {
let compiled = bitwise::compile_or("HL".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b11011001);
} | rust_cleaned_test_functions.jsonl/100591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
8734,
1523,
75,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
8734,
445,
13485,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iterator_nth_back() {
let v: &[_] = &[0, 1, 2, 3, 4];
for i in 0..v.len() {
assert_eq!(v.iter().nth_back(i).unwrap(), &v[v.len() - i - 1]);
}
assert_eq!(v.iter().nth_back(v.len()), None);
let mut iter = v.iter();
assert_eq!(iter.nth_back(2).unwrap(), &v[2]);
... | rust_cleaned_test_functions.jsonl/9615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
78342,
3895,
368,
341,
262,
1077,
348,
25,
609,
13496,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
369,
600,
304,
220,
15,
496,
85,
19406,
368,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_remote_getenv() {
let home = remote_getenv("echo", "example.com", "HOME").unwrap();
assert_eq!("example.com echo -n $HOME\n", home,);
} | rust_cleaned_test_functions.jsonl/42256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36425,
3062,
3160,
368,
341,
286,
1077,
2114,
284,
8699,
3062,
3160,
445,
3047,
497,
330,
8687,
905,
497,
330,
27546,
1827,
15454,
543,
286,
2060,
10714,
17223,
8687,
905,
1687,
481,
77,
400,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_method_08() {
let ast = check_parse("bool f(i32 i, bool b) {}");
assert_eq!(ast.get(0),&Node::BoolType);
check_name(ast.get(1),"f");
assert_eq!(ast.get(2),&Node::IntType(true,32));
check_name(ast.get(3),"i");
assert_eq!(ast.get(4),&Node::BoolType);
check_name(ast.get(... | rust_cleaned_test_functions.jsonl/96557 | {
"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,
9032,
62,
15,
23,
368,
341,
262,
1077,
11763,
284,
1779,
21039,
445,
2641,
282,
1956,
18,
17,
600,
11,
1807,
293,
8,
4687,
797,
262,
2060,
10714,
10297,
559,
670,
7,
15,
701,
5,
1955,
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_touch_set_both_time_and_reference() {
let (at, mut ucmd) = at_and_ucmd!();
let ref_file = "test_touch_reference";
let file = "test_touch_set_both_time_and_reference";
let start_of_year = str_to_filetime("%Y%m%d%H%M", "201501010000");
at.touch(ref_file);
set_file_times(&... | rust_cleaned_test_functions.jsonl/41026 | {
"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,
60840,
2602,
88819,
3009,
8378,
25433,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
2053,
2458,
284,
330,
1944,
60840,
25433,
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... | 1 |
#[test]
fn test_experiment_key_is_none_when_empty() -> Result<(), Error> {
let result: ProxyMap = parse2(quote! {})?;
assert_eq!(result.experiment_key, None);
Ok(())
} | rust_cleaned_test_functions.jsonl/85719 | {
"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,
82302,
3097,
6892,
31488,
47636,
15124,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1102,
25,
32778,
2227,
284,
4715,
17,
7,
2949,
0,
4687,
40007,
286,
2060,
10714,
10297,
1382,
2223,
14329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_right() {
let cases = vec![
(
Datum::Bytes(b"hello".to_vec()),
Datum::I64(0),
Datum::Bytes(b"".to_vec()),
),
(
Datum::Bytes(b"hello".to_vec()),
Datum::I64(1),
... | rust_cleaned_test_functions.jsonl/9094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10539,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
68459,
486,
7078,
1883,
1,
14990,
3263,
983,
13251,
14702,
394,
68459,
486,
40,
21,
19,
7,
15,
1326,
394,
68459,
486,
7078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slave_fs_cache_recv_negative() {
let (p1, p2) = UnixStream::pair().unwrap();
let fs_cache = SlaveFsCacheReq::from_stream(p1);
let mut master = Endpoint::<SlaveReq>::from_stream(p2);
let len = mem::size_of::<VhostUserFSSlaveMsg>();
let mut hdr = VhostUserM... | rust_cleaned_test_functions.jsonl/123043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65320,
34470,
11529,
36118,
53865,
368,
341,
286,
1077,
320,
79,
16,
11,
281,
17,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
8619,
11529,
284,
59368,
48300,
8233,
27234,
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_dynamic_partition() {
let mut context = Scope::new();
let x = context
.constant(&[10_i32, 20, 30, 40, 50], [5].as_ref(), "x")
.unwrap();
let op = dynamic_partition(&mut context, x, [0_i32, 0, 1, 1, 0].as_ref(), 2, "").unwrap();
assert_eq!(op.len(), 2);
let a... | rust_cleaned_test_functions.jsonl/17127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
43840,
368,
341,
262,
1077,
5206,
2266,
284,
34920,
486,
931,
543,
262,
1077,
856,
284,
2266,
198,
286,
659,
18077,
2099,
58,
16,
15,
5318,
18,
17,
11,
220,
17,
15,
11,
220,
18,
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_pessimistic_lock_memory_size() {
let lock = PessimisticLock {
primary: b"primary".to_vec().into_boxed_slice(),
start_ts: 5.into(),
ttl: 1000,
for_update_ts: 10.into(),
min_commit_ts: 20.into(),
};
assert... | rust_cleaned_test_functions.jsonl/71666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
66733,
4532,
9818,
19195,
2368,
368,
341,
286,
1077,
5296,
284,
393,
66733,
4532,
11989,
341,
310,
6028,
25,
293,
1,
6545,
3263,
983,
13251,
1005,
18122,
10194,
291,
26488,
3148,
310,
1191,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_it_compiles_2() {
fn check<'j>(mut cx: FunctionContext<'j>) -> JsResult<'j, JsValue> {
let result: () = {
let arg: Option<Handle<'j, JsValue>> = cx.argument_opt(0);
let () = from_value_opt(&mut cx, arg)?;
()
};
... | rust_cleaned_test_functions.jsonl/78993 | {
"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,
14631,
18177,
3658,
62,
17,
368,
341,
286,
5168,
1779,
18291,
73,
2235,
6984,
20716,
25,
5712,
1972,
18291,
73,
9231,
1464,
39122,
2077,
18291,
73,
11,
39122,
1130,
29,
341,
310,
1077,
1102,
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... | 2 |
#[test]
fn test_pitch_yaw_roll_neg_1() {
check_euler(Euler {
x: Rad(-1f32),
y: Rad(-1f32),
z: Rad(-1f32),
});
} | rust_cleaned_test_functions.jsonl/38252 | {
"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,
51959,
80183,
57578,
28209,
62,
16,
368,
341,
286,
1779,
2204,
8479,
10722,
8479,
341,
310,
856,
25,
20605,
4080,
16,
69,
18,
17,
1326,
310,
379,
25,
20605,
4080,
16,
69,
18,
17,
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 |
#[test]
fn test_incompatible_node_auto_split_region() {
let count = 5;
let mut cluster = new_incompatible_node_cluster(0, count);
test_auto_split_region(&mut cluster);
} | rust_cleaned_test_functions.jsonl/25767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
34842,
5084,
27740,
17052,
20627,
368,
341,
262,
1077,
1760,
284,
220,
20,
280,
262,
1077,
5206,
10652,
284,
501,
1243,
34842,
5084,
28441,
7,
15,
11,
1760,
317,
262,
1273,
27740,
17052,
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 |
#[test]
fn test_case_sensitive() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(&["--case-sensitive", "c.foo"], "one/two/c.foo");
te.assert_output(&["--case-sensitive", "C.Foo"], "one/two/C.Foo2");
te.assert_output(
&["--ignore-case", "--case-sensitive", "C.Foo... | rust_cleaned_test_functions.jsonl/10853 | {
"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,
19096,
65324,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
1013,
3713,
7645,
2099,
1183,
313,
5638,
56667,
497,
330,
66,
58432,
7914,
330,
603,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nocurses_with_num_double_digits() -> Result<()> {
let mut p = spawn_bash(Some(20))?;
p.execute(&prompt_string_nocurses(), "Select a network")?;
p.send_line("14")?;
p.exp_string("TEST NETWORK PLEASE IGNORE")?;
p.wait_for_prompt()?;
Ok(())
} | rust_cleaned_test_functions.jsonl/87581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
509,
56857,
6615,
4273,
24598,
41432,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
281,
284,
18042,
880,
988,
65405,
7,
17,
15,
593,
37445,
262,
281,
7769,
2099,
40581,
3904,
1089,
509,
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... | 6 |
#[test]
fn test_handle_and_sign_vote() {
let chain_id = "test_chain_id";
let (pub_key, _) = test_key();
let dt = "2018-02-11T07:09:22.765Z".parse::<DateTime<Utc>>().unwrap();
let t = TimeMsg {
seconds: dt.timestamp(),
nanos: dt.timestamp_subsec_nanos() as i32,
};
Protoc... | rust_cleaned_test_functions.jsonl/100205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
8378,
11172,
54360,
368,
341,
262,
1077,
8781,
842,
284,
330,
1944,
30583,
842,
876,
262,
1077,
320,
9585,
3097,
11,
27439,
284,
1273,
3097,
1428,
262,
1077,
7594,
284,
330,
17,
15,
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_update() {
let hint = SizeHint::new();
for size in 1..=100 {
let cap = hint.get();
assert!(size <= cap);
assert!(cap <= size + size / 8 + 75);
hint.update(size);
}
} | rust_cleaned_test_functions.jsonl/13094 | {
"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,
8882,
368,
341,
262,
1077,
13012,
284,
8478,
26987,
486,
931,
1428,
262,
369,
1379,
304,
220,
16,
496,
28,
16,
15,
15,
341,
286,
1077,
2062,
284,
13012,
670,
543,
286,
2060,
10297,
2141,
2651,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_delete_channel() {
let route = Route::DeleteChannel {
channel_id: CHANNEL_ID,
};
assert_eq!(
route.to_string(),
format!("channels/{channel_id}", channel_id = CHANNEL_ID)
);
} | rust_cleaned_test_functions.jsonl/119881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
14571,
368,
341,
286,
1077,
6021,
284,
9572,
486,
6435,
9629,
341,
310,
5496,
842,
25,
58756,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
310,
3561,
17223,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_memory_size() {
let program = Program::new_for_tests(Vec::new(), 0, 0);
let mut processor = Processor::new_empty(program, 20);
memory_size(&mut processor).expect("[1] The method must succeed");
assert_eq!(
processor.stack_pointer(),
4,
... | rust_cleaned_test_functions.jsonl/94617 | {
"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,
19195,
2368,
368,
341,
286,
1077,
2025,
284,
6687,
486,
931,
5478,
32509,
49923,
486,
931,
1507,
220,
15,
11,
220,
15,
317,
286,
1077,
5206,
17654,
284,
43377,
486,
931,
15124,
36827,
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_setup_identity_mapping() {
let gm = GuestMemoryMmap::from_ranges(&[(GuestAddress(0), 0x10000)]).unwrap();
setup_identity_mapping(&gm).unwrap();
assert_eq!(0xa003, read_u64(&gm, PML4_START));
assert_eq!(0xb003, read_u64(&gm, PDPTE_START));
for i in 0..512 {... | rust_cleaned_test_functions.jsonl/101590 | {
"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,
21363,
46244,
26930,
368,
341,
286,
1077,
37879,
284,
26215,
10642,
44,
2186,
486,
1499,
58748,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
15454,
543,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_user_follow_users() {
let mut oauth = SpotifyOAuth::default().scope("user-follow-modify").build();
match get_token(&mut oauth) {
Some(token_info) => {
let client_credential = SpotifyClientCredentials::default()
.token_info(token_info)
.... | rust_cleaned_test_functions.jsonl/79284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3317,
43490,
16348,
368,
341,
262,
1077,
5206,
46415,
284,
40537,
57850,
486,
2258,
1005,
4186,
445,
872,
92585,
17078,
1437,
1827,
5834,
543,
262,
2432,
633,
6458,
2099,
6984,
46415,
8,
341,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bootstrap_config_from_cli_and_load_configuration() {
let temp_dir = TempDir::new(string(8).as_str()).unwrap();
let dir = &temp_dir.path().to_path_buf();
// Create test folder
dir_utils::create_data_directory(Some(dir)).unwrap();
// Create command line tes... | rust_cleaned_test_functions.jsonl/9033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88424,
5332,
5673,
47147,
8378,
12411,
35726,
368,
341,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
931,
3609,
7,
23,
568,
300,
2895,
6011,
15454,
543,
286,
1077,
5419,
284,
609,
3888,
4334,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_incomplete_array() {
let data = [0x63, 0x28, 0x01, 0x00, 0x03, 0x00, 0x63, 0x28, 0x63, 0x28];
assert!(parse(&data[..]).is_err());
} | rust_cleaned_test_functions.jsonl/109429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
14737,
3858,
368,
341,
286,
1077,
821,
284,
508,
15,
87,
21,
18,
11,
220,
15,
87,
17,
23,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
18,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_share_with_expiration_by_general_owner() {
let user = test_model::new_general_user();
let (file, _) = test_model::new_file(user.id().clone());
let scope = FileSharingScope::Public;
let expires_at = DateTime::from_utc(chrono::Utc::now() + chrono::Duration::days(1))... | rust_cleaned_test_functions.jsonl/5066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38272,
6615,
2702,
28479,
3710,
39177,
29027,
368,
341,
286,
1077,
1196,
284,
1273,
5047,
486,
931,
39177,
3317,
543,
286,
1077,
320,
1192,
11,
27439,
284,
1273,
5047,
486,
931,
2458,
4277,
1764,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cwd() {
// Ensure that the cwd is correct.
let runtime_cwd = env::current_dir().expect("should be able to read current dir");
let compile_time_cwd = Path::new(env!("CARGO_MANIFEST_DIR"));
assert_eq!(runtime_cwd, compile_time_cwd, "current dir matches");
} | rust_cleaned_test_functions.jsonl/77293 | {
"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,
666,
6377,
368,
341,
262,
442,
29279,
429,
279,
46938,
374,
4396,
624,
262,
1077,
15592,
666,
6377,
284,
6105,
486,
3231,
4334,
1005,
17119,
445,
5445,
387,
2952,
311,
1349,
1482,
5419,
797,
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_vectors() {
let x: Vec<int> = vec![];
assert_eq!(x.to_string(), "[]");
assert_eq!((vec![1i]).to_string(), "[1]");
assert_eq!((vec![1i, 2, 3]).to_string(), "[1, 2, 3]");
assert!((vec![vec![], vec![1i], vec![1i, 1]]).to_string() ==
"[[], [1], ... | rust_cleaned_test_functions.jsonl/61 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49158,
368,
341,
286,
1077,
856,
25,
11312,
4159,
29,
284,
7486,
0,
15078,
286,
2060,
10714,
10297,
87,
2389,
3904,
1507,
330,
1294,
797,
286,
2060,
10714,
0,
1188,
4083,
20703,
16,
72,
10697,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assignment_operators() {
let mut m1 = Flags::empty();
let e1 = FlagA | FlagC;
// union
m1 |= FlagA;
assert!(m1 == FlagA);
// intersection
m1 &= e1;
assert!(m1 == FlagA);
// set difference
m1 -= m1;
assert!(m1... | rust_cleaned_test_functions.jsonl/60697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51891,
25634,
2973,
368,
341,
286,
1077,
5206,
296,
16,
284,
33205,
486,
3194,
543,
286,
1077,
384,
16,
284,
22666,
32,
760,
22666,
34,
280,
286,
442,
11300,
198,
286,
296,
16,
8662,
22666,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_document() {
let data = "[1, 2, 3]";
let parser = parser::YamlByteParser::init(data.as_bytes(), YamlUtf8Encoding);
let docs_res:Result<Vec<Box<YamlDocument>>, YamlError> = parser.load().collect();
match docs_res {
Err(e) => panic!("unexpected result: ... | rust_cleaned_test_functions.jsonl/58260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26231,
368,
341,
286,
1077,
821,
284,
10545,
16,
11,
220,
17,
11,
220,
18,
59757,
286,
1077,
6729,
284,
6729,
486,
56,
9467,
7153,
6570,
486,
2327,
2592,
5357,
12524,
1507,
809,
9467,
38980,
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... | 4 |
#[test]
fn test_resolvesservercertusingsni_handles_unknown_name() {
let rscsni = ResolvesServerCertUsingSNI::new();
let name = webpki::DNSNameRef::try_from_ascii_str("hello.com").unwrap();
assert!(rscsni.resolve(ClientHello::new(Some(name), &[], None)).is_none());
} | rust_cleaned_test_functions.jsonl/8739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4918,
35315,
433,
2836,
12246,
355,
819,
7751,
68017,
57507,
1269,
368,
341,
286,
1077,
435,
2388,
82,
7751,
284,
1800,
18186,
5475,
36934,
16429,
50,
14912,
486,
931,
543,
286,
1077,
829,
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_byte() -> Result<()> {
test_opt(DhcpOption::DefaultIpTtl(10), vec![23, 1, 10])?;
Ok(())
} | rust_cleaned_test_functions.jsonl/41166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
368,
1464,
5714,
71698,
341,
286,
1273,
15032,
5432,
62169,
5341,
486,
3675,
23378,
51,
11544,
7,
16,
15,
701,
7486,
20703,
17,
18,
11,
220,
16,
11,
220,
16,
15,
2467,
69493,
286,
7622,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_expr() {
fm::<syn::Expr>(quote!(ignore = "x + y"));
fm::<syn::Expr>(quote!(ignore = "an_object.method_call()"));
fm::<syn::Expr>(quote!(ignore = "{ a_statement(); in_a_block }"));
} | rust_cleaned_test_functions.jsonl/89492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21915,
368,
341,
286,
31121,
27638,
20339,
486,
16041,
2235,
2949,
10297,
13130,
284,
330,
87,
488,
379,
4010,
286,
31121,
27638,
20339,
486,
16041,
2235,
2949,
10297,
13130,
284,
330,
276,
5314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_idents_by_stripping_dot_git() {
let ident1 = ident(&src("https://github.com/PistonDevelopers/piston"));
let ident2 = ident(&src("https://github.com/PistonDevelopers/piston.git"));
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/127467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
842,
805,
3710,
1261,
461,
10732,
30941,
68801,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
3548,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
4010,
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_cast_duration_as_json() {
let mut ctx = EvalContext::new(Arc::new(EvalConfig::default_for_test()));
let dur_str = "11:12:08";
let dur_str_expect = "11:12:08.000000";
let cases = vec![
(
vec![Datum::Dur(Duration::parse(dur_str.as_bytes(... | rust_cleaned_test_functions.jsonl/2970 | {
"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,
5303,
25454,
11898,
9455,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
931,
4346,
1287,
486,
931,
10722,
831,
2648,
486,
2258,
5478,
4452,
7392,
286,
1077,
10651,
2895,
284,
330,
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_match_literal() {
let rules = create_rules(
r#"
macro_rules! foo {
('(') => {
fn foo() {}
}
}
"#,
);
assert_expansion(MacroKind::Items, &rules, "foo! ['('];", "fn foo () {}");
} | rust_cleaned_test_functions.jsonl/14707 | {
"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,
10708,
34100,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
262,
18072,
21407,
0,
15229,
341,
286,
4319,
492,
8,
589,
341,
310,
5168,
15229,
368,
5613,
286,
456,
262,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reverse_empty_path() {
let p1 = Path::builder().build();
let mut builder = Path::builder();
reverse_path(p1.as_slice(), &mut builder);
let p2 = builder.build();
assert_eq!(p2.iter().next(), None);
} | rust_cleaned_test_functions.jsonl/19891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43277,
15124,
2638,
368,
341,
262,
1077,
281,
16,
284,
7933,
486,
17850,
1005,
5834,
543,
262,
1077,
5206,
7363,
284,
7933,
486,
17850,
543,
262,
9931,
2638,
1295,
16,
5357,
26488,
1507,
609,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_maybe_parsed_map() {
assert_eq!(
MaybeParsed::<&str, ()>::Complete("hello").map(|x| format!("{} you", x)).unwrap(),
"hello you".to_string()
);
assert_eq!(
MaybeParsed::<(), &str>::Incomplete("hello")
.map(|_| panic!("map... | rust_cleaned_test_functions.jsonl/59730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
49791,
75788,
5376,
368,
341,
286,
2060,
10714,
33673,
310,
10696,
82959,
27638,
5,
495,
11,
1719,
6831,
12548,
445,
14990,
1827,
2186,
22428,
87,
91,
3561,
17223,
6257,
498,
497,
856,
4579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hold_range_in_memory() {
let accts = Accounts::default_for_tests();
let range = Pubkey::new(&[0; 32])..=Pubkey::new(&[0xff; 32]);
accts.hold_range_in_memory(&range, true);
accts.hold_range_in_memory(&range, false);
accts.hold_range_in_memory(&range, true);... | rust_cleaned_test_functions.jsonl/63348 | {
"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,
65824,
9698,
1243,
19195,
368,
341,
286,
1077,
1613,
60903,
284,
40655,
486,
2258,
5478,
32509,
543,
286,
1077,
2088,
284,
22611,
792,
486,
931,
2099,
58,
15,
26,
220,
18,
17,
2467,
496,
28,
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_receiving_router_advertisement_source_link_layer_option() {
let config = get_dummy_config::<Ipv6Addr>();
let mut ctx = DummyEventDispatcherBuilder::from_config(config.clone())
.build::<DummyEventDispatcher>();
let device = Some(DeviceId::new_ethernet(0));
... | rust_cleaned_test_functions.jsonl/16144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
46344,
55587,
10027,
44424,
10347,
7233,
12680,
9672,
368,
341,
286,
1077,
2193,
284,
633,
60321,
5332,
27638,
80656,
21,
13986,
3913,
286,
1077,
5206,
5635,
284,
50567,
1556,
21839,
3297,
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_evm_call_wasm(){
// 1. Get wasm and evm contract bin
let (wasm, wasm_code_hash) = contract_module::<Test>("erc20.wasm", true).unwrap();
let (evm, _evm_code_hash) = contract_module::<Test>("erc20_evm_bytecode.txt", false).unwrap();
ExtBuilder::default()
.existential_deposit(100)
.build(... | rust_cleaned_test_functions.jsonl/111952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2010
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
7338,
13429,
1670,
10530,
19328,
197,
322,
220,
16,
13,
220,
2126,
98263,
323,
3637,
76,
5116,
9544,
198,
10217,
320,
86,
10530,
11,
98263,
4136,
8950,
8,
284,
5116,
10750,
27638,
2271,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_purge_slots() {
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Blocktree::open(&blocktree_path).unwrap();
let (shreds, _) = make_many_slot_entries(0, 50, 5);
blocktree.insert_shreds(shreds, None, false).unwrap();
blocktree.purge_slots(0, Som... | rust_cleaned_test_functions.jsonl/116897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
54161,
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,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_big_clear() {
let mut b = Bitv::new(140, true);
b.clear();
b.ones(|i| {
fail!("found 1 at {:?}", i)
});
} | rust_cleaned_test_functions.jsonl/12154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36386,
21811,
368,
341,
286,
1077,
5206,
293,
284,
6495,
85,
486,
931,
7,
16,
19,
15,
11,
830,
317,
286,
293,
7426,
543,
286,
293,
31790,
22428,
72,
91,
341,
310,
3690,
17223,
15105,
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 |
#[test]
fn test_report_record() {
let mut report = Report::new(HashMap::new());
let stack_trace = StackTrace::new(None, None, None, vec![]);
assert!(report.record(stack_trace).is_ok());
assert_eq!(report.data.len(), 1);
} | rust_cleaned_test_functions.jsonl/124441 | {
"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,
14813,
14192,
368,
341,
262,
1077,
5206,
1895,
284,
8259,
486,
931,
7,
18497,
486,
931,
5231,
262,
1077,
5611,
23575,
284,
14284,
6550,
486,
931,
26717,
11,
2240,
11,
2240,
11,
7486,
0,
1294,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dynamic() {
assert!(!ParamType::Address.is_dynamic());
assert!(ParamType::Bytes.is_dynamic());
assert!(!ParamType::FixedBytes(32).is_dynamic());
assert!(!ParamType::Uint(256).is_dynamic());
assert!(!ParamType::Int(64).is_dynamic());
assert!(!ParamType::Bool.is_dynamic());
assert... | rust_cleaned_test_functions.jsonl/42148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
45992,
368,
341,
197,
6948,
0,
3471,
2001,
929,
486,
4286,
2079,
45992,
1423,
197,
6948,
10297,
2001,
929,
486,
7078,
2079,
45992,
1423,
197,
6948,
0,
3471,
2001,
929,
486,
13520,
7078,
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_empty_single_task() {
let runner = SingleTaskRunner::default();
let rt = runner.startup().unwrap();
thread::spawn(move || {
loop {
if let Err(e) = runner.run() {
println!("!!!!!!run failed, reason: {:?}", e);
break;
... | rust_cleaned_test_functions.jsonl/62455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
19487,
12184,
368,
972,
262,
1077,
22259,
284,
11327,
6262,
19486,
486,
2258,
1647,
262,
1077,
16677,
284,
22259,
4962,
454,
1005,
15454,
7317,
262,
4516,
486,
46087,
34081,
1369,
972,
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... | 5 |
#[test]
fn test_slice_infer() {
let a = array![1., 2.];
let b = array![[3., 4.], [5., 6.]];
b.slice(s![..-1, ..]).dot(&a);
} | rust_cleaned_test_functions.jsonl/92593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
1243,
802,
368,
341,
262,
1077,
264,
284,
1334,
20703,
16,
2572,
220,
17,
13,
935,
262,
1077,
293,
284,
1334,
0,
15505,
18,
2572,
220,
19,
13,
1125,
508,
20,
2572,
220,
21,
13,
13204,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_borrow_in_map_key() {
#[derive(Deserialize, Debug)]
struct Outer {
map: BTreeMap<MyMapKey, ()>,
}
#[derive(Ord, PartialOrd, Eq, PartialEq, Debug)]
struct MyMapKey(usize);
impl<'de> Deserialize<'de> for MyMapKey {
fn deserialize<D>(deserializer: D) -> Res... | rust_cleaned_test_functions.jsonl/92402 | {
"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,
880,
7768,
1243,
5376,
3097,
368,
341,
262,
11506,
27098,
7,
64465,
11,
11091,
5563,
262,
2036,
55197,
341,
286,
2415,
25,
425,
6533,
2227,
79333,
2227,
1592,
11,
1719,
12520,
262,
555,
262,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_content_type() {
let req = TestRequest::with_header("content-type", "text/plain").finish();
assert_eq!(req.content_type(), "text/plain");
let req =
TestRequest::with_header("content-type", "application/json; charset=utf=8")
.finish();
a... | rust_cleaned_test_functions.jsonl/7647 | {
"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,
7495,
1819,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
4197,
8757,
445,
1796,
10604,
497,
330,
1318,
36971,
1827,
30150,
543,
286,
2060,
10714,
10297,
2958,
5406,
1819,
1507,
330,
1318,
3697... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_setup_works() {
new_test_ext(1).execute_with(|| {
assert_eq!(Sudo::key(), 1u64);
assert!(Logger::i32_log().is_empty());
assert!(Logger::account_log().is_empty());
});
} | rust_cleaned_test_functions.jsonl/17519 | {
"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,
21363,
11498,
82,
368,
341,
1572,
8638,
4452,
9927,
7,
16,
568,
10257,
6615,
79453,
341,
197,
6948,
10714,
10297,
50,
7680,
486,
792,
1507,
220,
220,
16,
84,
21,
19,
317,
197,
6948,
10297,
739... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lazy_df_aggregations() {
let df = load_df();
assert!(df
.clone()
.lazy()
.min()
.collect()
.unwrap()
.frame_equal_missing(&df.min()));
assert!(df
.clone()
.lazy()
... | rust_cleaned_test_functions.jsonl/14676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
10894,
20587,
7998,
804,
368,
341,
286,
1077,
6764,
284,
2795,
10894,
1428,
286,
2060,
10297,
2940,
198,
310,
659,
19982,
741,
310,
659,
49013,
741,
310,
659,
1065,
741,
310,
659,
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_extract_session_metrics_duration() {
let mut metrics = vec![];
let session = SessionUpdate::parse(
r#"{
"init": false,
"started": "2021-04-26T08:00:00+0100",
"attrs": {
"release": "1.0.0"
},
... | rust_cleaned_test_functions.jsonl/63641 | {
"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,
39123,
12316,
37686,
25454,
368,
341,
286,
1077,
5206,
16734,
284,
7486,
0,
40901,
286,
1077,
3797,
284,
9164,
4289,
486,
6400,
1006,
310,
435,
55543,
515,
310,
330,
2327,
788,
895,
345,
310,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_typecheck_prog_happy() {
let exp = parse(
&lexpr::from_str(
r#"(let ((f (lambda ((x : int)) : (-> int int)
(lambda ((y : int)) : int (+ x y)))))
((f 4) 3))"#,
)
.unwrap(),
)
.unwrap();
let cc_exp = closure_convert(&exp).unwrap();
... | rust_cleaned_test_functions.jsonl/98588 | {
"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,
1819,
2028,
60390,
1523,
11144,
368,
341,
262,
1077,
1343,
284,
4715,
1006,
286,
609,
2571,
649,
486,
1499,
2895,
1006,
310,
435,
2,
29209,
1149,
1781,
69,
320,
12935,
1781,
87,
549,
526,
593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.