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_deserialize_array() {
let request = TestInterfaceRequest::from_args(
6, /* opcode */
vec![Arg::Array(ARRAY_VALUE.to_vec().into())],
)
.unwrap();
assert_match!(request, TestInterfaceRequest::Array{arg} => assert_eq!(arg.into_vec(), ARRAY_VA... | rust_cleaned_test_functions.jsonl/55806 | {
"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,
15768,
9050,
3858,
368,
341,
286,
1077,
1681,
284,
3393,
5051,
1900,
486,
1499,
8384,
1006,
310,
220,
21,
11,
1391,
30028,
735,
310,
7486,
20703,
2735,
486,
1857,
7,
14893,
7476,
2389,
13251,
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_locator() {
let (chain_controller, shared) = start_chain(None);
let num = 200;
let index = [
199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 188, 184, 176, 160, 128, 64,
];
for i in 1..num {
insert_block(&chain_controller, &shar... | rust_cleaned_test_functions.jsonl/95012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75344,
368,
341,
286,
1077,
320,
8819,
21600,
11,
6094,
8,
284,
1191,
30583,
26717,
626,
286,
1077,
1629,
284,
220,
17,
15,
15,
280,
286,
1077,
1922,
284,
2278,
310,
220,
16,
24,
24,
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... | 3 |
#[test]
fn test_clone_map() {
let mut map: HashMap<Key, Value> = HashMap::new();
let key1 = Key {
key: "a".to_owned(),
key_version: 0,
};
let data = serialize(&"value".to_owned()).expect("serialize");
let value1 = Value {
type_id: "Str... | rust_cleaned_test_functions.jsonl/90782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
5376,
368,
341,
286,
1077,
5206,
2415,
25,
10528,
42003,
11,
5162,
29,
284,
10528,
486,
931,
543,
286,
1077,
1376,
16,
284,
5309,
341,
310,
1376,
25,
330,
64,
3263,
983,
51973,
3148,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_groupby_threaded() {
for slice in &[
vec![1, 2, 3, 4, 4, 4, 2, 1],
vec![1, 2, 3, 4, 4, 4, 2, 1, 1],
vec![1, 2, 3, 4, 4, 4],
] {
let ca = UInt32Chunked::new("", slice);
let split = split_ca(&ca, 4).unwrap();
... | rust_cleaned_test_functions.jsonl/68998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
1694,
10814,
291,
368,
341,
286,
369,
15983,
304,
609,
9640,
310,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
19,
11,
220,
19,
11,
220,
17,
11,
220,
16,
1259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsing_proper_del_statement() {
let statement = get_statement!("DEL MY_KEY");
assert_eq!(
statement,
Statement {
stype: StatementType::Del,
key: Some("MY_KEY".to_owned()),
value: ... | rust_cleaned_test_functions.jsonl/104585 | {
"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,
620,
28598,
2540,
712,
18029,
37404,
368,
341,
310,
1077,
5114,
284,
633,
37404,
17223,
38332,
18224,
6600,
797,
310,
2060,
10714,
33673,
394,
5114,
345,
394,
21756,
341,
503,
357,
499,
25,
21756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_join_lines_mod_comments() {
check_join_lines(
r"
fn foo() {
//! Hello<|>
//! world!
}
",
r"
fn foo() {
//! Hello<|> world!
}
",
);
} | rust_cleaned_test_functions.jsonl/79944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
18323,
7480,
30359,
368,
341,
286,
1779,
31017,
18323,
1006,
310,
435,
698,
8822,
15229,
368,
341,
262,
17664,
21927,
27,
91,
397,
262,
17664,
1879,
4894,
532,
756,
310,
435,
698,
8822,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_region_meta_key() {
let ids = vec![1, 1024, u64::max_value()];
for id in ids {
let prefix = region_meta_prefix(id);
let info_key = region_state_key(id);
assert!(info_key.starts_with(&prefix));
assert_eq!(
decode_reg... | rust_cleaned_test_functions.jsonl/44170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20627,
13381,
3097,
368,
341,
286,
1077,
14151,
284,
7486,
20703,
16,
11,
220,
16,
15,
17,
19,
11,
575,
21,
19,
486,
2810,
3142,
33800,
286,
369,
877,
304,
14151,
341,
310,
1077,
9252,
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... | 3 |
#[test]
fn test_warp_timestamp_with_a_vengeance() {
let leader_pubkey = solana_sdk::pubkey::new_rand();
let GenesisConfigInfo {
mut genesis_config,
voting_keypair,
..
} = create_genesis_config_with_leader(5, &leader_pubkey, 3);
genesis_config
... | rust_cleaned_test_functions.jsonl/28975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
7876,
23073,
6615,
4306,
62,
52205,
681,
368,
341,
286,
1077,
7653,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
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_renew_retransmit() {
let mut s = socket_bound();
recv!(s, []);
recv!(s, time 500_000, [(IP_SEND, UDP_SEND, DHCP_RENEW)]);
recv!(s, time 749_000, []);
recv!(s, time 750_000, [(IP_SEND, UDP_SEND, DHCP_RENEW)]);
recv!(s, time 874_000, []);
re... | rust_cleaned_test_functions.jsonl/90238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
931,
1288,
1458,
1763,
368,
341,
286,
1077,
5206,
274,
284,
7575,
19447,
1428,
286,
27006,
10297,
82,
11,
42197,
286,
27006,
10297,
82,
11,
882,
220,
20,
15,
15,
62,
15,
15,
15,
11,
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... | 2 |
#[test]
fn test_iter() {
let mut buffer = CircleBuffer::with_capacity(3);
buffer.push(1);
buffer.push(2);
buffer.push(3);
let add1: Vec<i32> = buffer.iter().map(|x| x + 1).collect();
assert_eq!(add1, vec![2, 3, 4]);
buffer.push(4);
buffer.push(5);... | rust_cleaned_test_functions.jsonl/51005 | {
"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,
11723,
368,
341,
286,
1077,
5206,
4147,
284,
21224,
4095,
486,
4197,
35603,
7,
18,
317,
286,
4147,
2552,
7,
16,
317,
286,
4147,
2552,
7,
17,
317,
286,
4147,
2552,
7,
18,
317,
286,
1077,
912,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_vars_unset() {
env::set_var("SET_TO_BE_UNSET", "val");
env::remove_var("UNSET_TO_BE_UNSET");
// Check test preconditions
assert_eq!(env::var("SET_TO_BE_UNSET"), Ok("val".to_string()));
assert_eq!(env::var("UNSET_TO_BE_UNSET"), Err(VarError::NotPresent... | rust_cleaned_test_functions.jsonl/49886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
11168,
98109,
368,
341,
286,
6105,
486,
746,
4612,
445,
5884,
8650,
27168,
6735,
5884,
497,
330,
831,
797,
286,
6105,
486,
5399,
4612,
445,
1861,
5884,
8650,
27168,
6735,
5884,
797,
286,
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_object_list_keys() {
let mut object = BTreeMap::new();
object.insert(vec![0i64], ());
object.insert(vec![100i64], ());
object.insert(vec![-1i64], ());
object.insert(vec![-2i64], ());
object.insert(vec![0i64, 0i64], ());
object.insert(vec![0i64, -1i64], ());
let ve... | rust_cleaned_test_functions.jsonl/110263 | {
"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,
5314,
2019,
12631,
368,
341,
262,
1077,
5206,
1633,
284,
425,
6533,
2227,
486,
931,
543,
262,
1633,
7030,
25592,
20703,
15,
72,
21,
19,
1125,
49323,
262,
1633,
7030,
25592,
20703,
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_fib() -> TestResult {
let p = polar();
p.load_str(
r#"fib(0, 1) if cut;
fib(1, 1) if cut;
fib(n, a+b) if fib(n-1, a) and fib(n-2, b);"#,
)?;
qvar(&p, r#"fib(0, x)"#, "x", values![1]);
qvar(&p, r#"fib(1, x)"#, "x", values![1]);
qvar(&p, r#"fib... | rust_cleaned_test_functions.jsonl/68157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
579,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
75326,
7,
15,
11,
220,
16,
8,
421,
3931,
280,
1843,
15801,
7,
16,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_serialize_zeroes() {
// Test that UdpPacket::serialize properly zeroes memory before serializing
// the header.
let mut buf_0 = [0; HEADER_BYTES];
let _: Buf<&mut [u8]> = Buf::new(&mut buf_0[..], HEADER_BYTES..)
.encapsulate(UdpPacketBuilder::new(
... | rust_cleaned_test_functions.jsonl/112489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
19359,
288,
368,
341,
286,
442,
3393,
429,
547,
9796,
16679,
486,
24166,
10277,
97443,
4938,
1573,
6146,
4849,
198,
286,
442,
279,
4247,
624,
286,
1077,
5206,
6607,
62,
15,
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,
1... | 1 |
#[test]
fn test_relation() {
with_graph(|graph| {
graph.mutate("CREATE (src)-[rel:RelationType { prop: 42 }]->(dst)").unwrap();
let relation: Relation = graph.query("MATCH (src)-[rel]->(dst) RETURN rel").unwrap();
assert_eq!(relation, Relation {
type_name: "RelationType".... | rust_cleaned_test_functions.jsonl/73412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46984,
368,
341,
262,
448,
14738,
22428,
4439,
91,
341,
286,
4771,
744,
332,
349,
445,
22599,
320,
3548,
7287,
58,
3748,
25,
33790,
929,
314,
2004,
25,
220,
19,
17,
335,
6294,
7,
15658,
63554,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_types() {
test_roundtrip_flow("number | boolean & string");
test_roundtrip_flow("type A = number");
test_roundtrip_flow("type A = ?number");
test_roundtrip_flow("type A = string");
test_roundtrip_flow("type A = 'foo'");
test_roundtrip_flow("type A = 3");
test_roundtri... | rust_cleaned_test_functions.jsonl/102606 | {
"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,
9763,
368,
341,
262,
1273,
29896,
32981,
27441,
445,
4082,
760,
2710,
609,
914,
797,
262,
1273,
29896,
32981,
27441,
445,
1313,
362,
284,
1372,
797,
262,
1273,
29896,
32981,
27441,
445,
1313,
362,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve_module_7() {
let (_temp_dir, deno_dir) = test_setup();
let specifier = "http_test.ts";
let referrer = add_root!("/Users/rld/src/deno_net/");
let expected_module_name =
add_root!("/Users/rld/src/deno_net/http_test.ts");
let expected_filename = add_root!("/Users/... | rust_cleaned_test_functions.jsonl/72758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
10750,
62,
22,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
262,
1077,
97616,
284,
330,
1254,
4452,
21288,
876,
262,
1077,
2053,
30929,
284,
912,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_systemtime_overflow_struct() {
assert_de_tokens_error::<SystemTime>(
&[
Token::Struct {
name: "SystemTime",
len: 2,
},
Token::Str("secs_since_epoch"),
Token::U64(u64::max_value()),
Token::Str(... | rust_cleaned_test_functions.jsonl/129552 | {
"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,
17687,
1678,
79073,
15126,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
2320,
1462,
17055,
286,
609,
9640,
310,
9660,
486,
9422,
341,
394,
829,
25,
330,
2320,
1462,
756,
394,
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_get_meta() {
gst::init().unwrap();
let mut buffer = gst::Buffer::new();
let port = 5000;
let inet_addr = gio::InetAddress::from_string("127.0.0.1");
let expected_addr = &gio::InetSocketAddress::new(&inet_addr, port);
let expected_inet_addr =... | rust_cleaned_test_functions.jsonl/112429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 679
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
3062,
13381,
368,
341,
286,
43769,
486,
2327,
1005,
15454,
1428,
286,
1077,
5206,
4147,
284,
43769,
486,
4095,
486,
931,
543,
286,
1077,
2635,
284,
220,
20,
15,
15,
15,
280,
286,
1077,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_managed_directory_gc_while_mmapped() {
let test_path1: &'static Path = Path::new("some_path_for_test");
let tempdir = TempDir::new().unwrap();
let tempdir_path = PathBuf::from(tempdir.path());
let living_files = HashSet::new();
let mmap_directory = MmapD... | rust_cleaned_test_functions.jsonl/744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79889,
14846,
49423,
86069,
35599,
5677,
368,
341,
286,
1077,
1273,
2638,
16,
25,
30136,
1978,
7933,
284,
7933,
486,
931,
445,
14689,
2638,
5478,
4452,
3071,
286,
1077,
2730,
3741,
284,
19944,
618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_correct_value_single() {
let mut map = TypedHandleMap::new();
let handle = map.insert(Foobar(1234));
assert_eq!(map.get(handle).unwrap(), &Foobar(1234));
map.remove(handle).unwrap();
assert_eq!(map.get(handle), None);
let handle = map.as_mut_untype... | rust_cleaned_test_functions.jsonl/15919 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31550,
3142,
19487,
368,
341,
286,
1077,
5206,
2415,
284,
50554,
6999,
2227,
486,
931,
543,
286,
1077,
3705,
284,
2415,
7030,
7832,
78,
31393,
7,
16,
17,
18,
19,
1106,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_commit_ts() {
let engine = TestEngineBuilder::new().build().unwrap();
let (k, v) = (b"k", b"v");
// Shortcuts
let ts = TimeStamp::compose;
let uncommitted = |ttl, min_commit_ts| {
move |s| {
if let TxnStatus::Uncommitted {... | rust_cleaned_test_functions.jsonl/47474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
36346,
25023,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
286,
1077,
320,
74,
11,
348,
8,
284,
320,
65,
62911,
497,
293,
1,
85,
3071,
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... | 3 |
#[test]
fn test_p2pkh_address_58() {
let addr = Address {
network: Bitcoin,
payload: Payload::PubkeyHash(hex_pubkeyhash!("162c5ea71c0b23f5b9022ef047c4a86470a5b070")),
};
assert_eq!(
addr.script_pubkey(),
hex_script!("76a914162c5ea71c0b23f5... | rust_cleaned_test_functions.jsonl/59112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
17,
20819,
71,
6744,
62,
20,
23,
368,
341,
286,
1077,
10789,
284,
9177,
341,
310,
3922,
25,
13127,
345,
310,
7729,
25,
52916,
486,
29162,
792,
6370,
44660,
34014,
792,
8296,
17223,
16,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nfa_builder_missing_finals() {
let nfa = NFABuilder::new()
.add_start(0)
.add_transition('a', 0, 1)
.finalize();
match nfa {
Err(NFAError::MissingFinalStates) => assert!(true),
_ => assert!(false, "MissingFinalStates exp... | rust_cleaned_test_functions.jsonl/77588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
3632,
28532,
40447,
20676,
82,
368,
341,
286,
1077,
308,
3632,
284,
44727,
1867,
2511,
486,
931,
741,
310,
659,
718,
4906,
7,
15,
340,
310,
659,
718,
53593,
492,
64,
516,
220,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_import_graph_def() {
let mut g = Graph::new();
let opts = ImportGraphDefOptions::new();
let status = g.import_graph_def(&[], &opts);
assert!(status.is_ok());
} | rust_cleaned_test_functions.jsonl/89522 | {
"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,
18434,
14738,
7844,
368,
341,
286,
1077,
5206,
342,
284,
12165,
486,
931,
543,
286,
1077,
12185,
284,
13213,
11212,
2620,
3798,
486,
931,
543,
1789,
286,
1077,
2639,
284,
342,
34897,
14738,
7844,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unquoted_key() {
let p = Parser::new();
assert_eq!(p.unquoted_key("Un-Quoted_Key").1, Done("", "Un-Quoted_Key"));
} | rust_cleaned_test_functions.jsonl/27419 | {
"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,
4907,
63725,
3097,
368,
341,
262,
1077,
281,
284,
21102,
486,
931,
543,
262,
2060,
10714,
10297,
79,
6307,
63725,
3097,
445,
1806,
12,
2183,
9253,
35253,
1827,
16,
11,
27357,
19814,
330,
1806,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_lazy_ternary_predicate_pushdown() -> Result<()> {
let df = df![
"a" => &[10, 1, 2, 3]
]?;
let out = df
.lazy()
.select([when(col("a").eq(lit(10)))
.then(Null {}.lit())
.otherwise(col("a"))])
.drop_nulls(None)
.collect()... | rust_cleaned_test_functions.jsonl/163 | {
"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,
49646,
62,
4160,
658,
97474,
14218,
2923,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
6764,
90515,
286,
330,
64,
1,
589,
44590,
16,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
921,
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... | 4 |
#[test]
fn test_duet() {
let program = Program::load(
"snd 1\n\
snd 2\n\
snd p\n\
rcv a\n\
rcv b\n\
rcv c\n\
rcv d\n",
);
assert_eq!(program.run_duet(), [3, 3]);
} | rust_cleaned_test_functions.jsonl/34181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
13807,
368,
341,
262,
1077,
2025,
284,
6687,
486,
1078,
1006,
286,
330,
46395,
220,
16,
1699,
5661,
260,
28612,
220,
17,
1699,
5661,
260,
28612,
281,
1699,
5661,
260,
10192,
85,
264,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scm_rights_single_cmsg_multiple_fds() {
use std::os::unix::net::UnixDatagram;
use std::os::unix::io::{RawFd, AsRawFd};
use std::thread;
use nix::sys::socket::{ControlMessage, ControlMessageOwned, MsgFlags,
sendmsg, recvmsg};
use nix::sys::uio::IoVec;
let (send, r... | rust_cleaned_test_functions.jsonl/134662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 835
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
6226,
98053,
19487,
666,
3236,
45233,
90438,
368,
341,
262,
990,
1460,
486,
436,
486,
56646,
486,
4711,
486,
55832,
45696,
5745,
280,
262,
990,
1460,
486,
436,
486,
56646,
486,
815,
22964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extra_whitespace() {
assert_eq!(
parse_str("domain example.com.").get_domain(),
Some(String::from("example.com.")).as_ref()
);
assert_eq!(
parse_str("domain example.com. ").get_domain(),
Some(String::from("example.com.")).as_ref()
);
... | rust_cleaned_test_functions.jsonl/121156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31858,
86175,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
2895,
445,
12204,
981,
3110,
905,
98401,
455,
20111,
3148,
286,
4329,
2242,
486,
1499,
445,
8687,
905,
13,
15197,
300,
7793,
741,
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_ipv6_icmp_parameter_problem_non_must() {
let mut ctx = DummyEventDispatcherBuilder::from_config(DUMMY_CONFIG_V6)
.build::<DummyEventDispatcher>();
let device = DeviceId::new_ethernet(0);
// Test parsing an IPv6 packet with invalid next header value w... | rust_cleaned_test_functions.jsonl/94399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
32747,
1307,
24899,
60139,
21637,
717,
590,
368,
341,
286,
1077,
5206,
5635,
284,
50567,
1556,
21839,
3297,
486,
1499,
5332,
5432,
58673,
12568,
2334,
21,
340,
310,
659,
5834,
27638,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_error() {
let ite1 = IteratorError::Eof;
assert!(ite1.is_eof());
let ite3 = IteratorError::Error("23333".to_string());
assert!(!ite3.is_eof());
} | rust_cleaned_test_functions.jsonl/73148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
4096,
368,
341,
286,
1077,
432,
68,
16,
284,
23023,
1454,
486,
36,
1055,
280,
286,
2060,
10297,
632,
16,
2079,
90792,
5231,
286,
1077,
432,
68,
18,
284,
23023,
1454,
486,
1454,
445,
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 |
#[test]
fn test_custom_search_path() {
let conn_string = format!(
"postgresql://{}:{}@{}:{}/{}?schema=musti-test",
env::var("TEST_PG_USER").unwrap(),
env::var("TEST_PG_PASSWORD").unwrap(),
env::var("TEST_PG_HOST").unwrap(),
env::var("TEST_PG_PO... | rust_cleaned_test_functions.jsonl/87525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
10716,
2638,
368,
341,
286,
1077,
4534,
3904,
284,
3561,
33673,
310,
330,
88470,
1110,
6257,
79411,
31,
6257,
12547,
4472,
6257,
30,
17349,
28,
24812,
72,
16839,
756,
310,
6105,
486,
947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_float() {
assert_eq!(
Float {
value: 1.0,
encoded: "1.0".to_string()
}
.to_string(),
"1.0"
);
assert_eq!(
Float {
value: 1.01,
encoded: "1.01".to_st... | rust_cleaned_test_functions.jsonl/123028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17586,
368,
341,
286,
2060,
10714,
33673,
310,
13001,
341,
394,
897,
25,
220,
16,
13,
15,
345,
394,
20498,
25,
330,
16,
13,
15,
3263,
983,
3904,
741,
310,
456,
310,
659,
983,
3904,
3148,
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_from_make_credential_extensions() {
let cbor_extensions = cbor_map! {
"hmac-secret" => true,
"credProtect" => CredentialProtectionPolicy::UserVerificationRequired,
};
let extensions = MakeCredentialExtensions::try_from(cbor_extensions);
let... | rust_cleaned_test_functions.jsonl/49008 | {
"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,
5673,
28230,
666,
30320,
60498,
368,
341,
286,
1077,
272,
9368,
60498,
284,
272,
9368,
5376,
0,
341,
310,
330,
71,
11948,
68892,
1,
589,
830,
345,
310,
330,
10844,
61547,
1,
589,
93379,
78998,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_increase_dissolve_delay() {
let principal_id = 1;
let fake_driver = fake::FakeDriver::default();
let fixture: GovernanceProto = GovernanceProto {
economics: Some(NetworkEconomics::default()),
neurons: [
(
1,
Neuron {
... | rust_cleaned_test_functions.jsonl/1191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73807,
814,
1038,
3948,
22198,
368,
341,
262,
1077,
12435,
842,
284,
220,
16,
280,
262,
1077,
12418,
20602,
284,
12418,
486,
52317,
11349,
486,
2258,
543,
262,
1077,
12507,
25,
80589,
31549,
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_connectivity() {
sc_service_test::connectivity(
integration_test_config_with_two_authorities(),
|config| {
let NewFullBase { task_manager, client, network, transaction_pool, .. }
= new_full_base(config,|_, _| ())?;
... | rust_cleaned_test_functions.jsonl/134128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
1927,
368,
341,
286,
1136,
12267,
4452,
486,
6459,
1927,
1006,
310,
17590,
4452,
5332,
6615,
23241,
22938,
1361,
3148,
310,
760,
1676,
91,
341,
394,
1077,
1532,
9432,
3978,
314,
3383,
12144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_u24() {
assert_eq!(eval_binary("<< 66051:24 >>"), [1, 2, 3]);
assert_eq!(eval_binary("<< 66051:24/little >>"), [3, 2, 1]);
assert_eq!(eval_binary("<< 66051:24/big >>"), [1, 2, 3]);
} | rust_cleaned_test_functions.jsonl/83842 | {
"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,
7300,
17,
19,
368,
341,
286,
2060,
10714,
10297,
14170,
31761,
445,
2442,
220,
21,
21,
15,
20,
16,
25,
17,
19,
3578,
3975,
508,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extra_rollback() {
let db = CheckpointDb::new(MemoryDB::new());
let handler = db.handler();
handler.checkpoint();
handler.checkpoint();
handler.rollback();
handler.rollback();
handler.rollback();
} | rust_cleaned_test_functions.jsonl/69292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31858,
62,
33559,
368,
341,
286,
1077,
2927,
284,
4248,
2768,
7994,
486,
931,
3189,
4731,
3506,
486,
931,
1423,
286,
1077,
7013,
284,
2927,
31171,
1428,
286,
7013,
9093,
2768,
543,
286,
7013,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_array (){
let bytes = [0u8; 64];
let data: Data2 = bytes.pread_with(0, LE).unwrap();
println!("data: {:?}", &data);
} | rust_cleaned_test_functions.jsonl/51394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
40653,
262,
1077,
5820,
284,
508,
15,
84,
23,
26,
220,
21,
19,
935,
262,
1077,
821,
25,
2885,
17,
284,
5820,
556,
878,
6615,
7,
15,
11,
11148,
568,
15454,
543,
262,
13751,
17223,
691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_format_python_named() {
let mut logentry = LogEntry {
message: Annotated::new("hello, %(name)s!".to_string().into()),
params: Annotated::new(Value::Object({
let mut object = Object::new();
object.insert(
"name".to_string(),
... | rust_cleaned_test_functions.jsonl/84675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
55869,
71834,
368,
341,
262,
1077,
5206,
1487,
4085,
284,
2835,
5874,
341,
286,
1943,
25,
1527,
87029,
486,
931,
445,
14990,
11,
21227,
606,
16466,
92993,
983,
3904,
1005,
18122,
14702,
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_from_static_custom_long() {
let a = HeaderName {
inner: Repr::Custom(Custom(ByteStr::from_static(
"longer-than-63--thisheaderislongerthansixtythreecharactersandthushandleddifferent",
))),
};
let b = HeaderName::from_static(
... | rust_cleaned_test_functions.jsonl/3413 | {
"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,
5673,
25360,
15875,
17799,
368,
341,
286,
1077,
264,
284,
12104,
675,
341,
310,
9179,
25,
1032,
649,
486,
10268,
3025,
1450,
55823,
2580,
486,
1499,
25360,
1006,
394,
330,
4825,
261,
47654,
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_decode_two_bytes_as_signed_16_bit() {
let mut byte_array = [255, 56].to_vec();
let value: i16 = decode_short(byte_array.pop().unwrap(), byte_array.pop().unwrap());
assert_eq!(value, -200);
} | rust_cleaned_test_functions.jsonl/16123 | {
"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,
15227,
23241,
12524,
11898,
55617,
62,
16,
21,
13996,
368,
341,
262,
1077,
5206,
4922,
3858,
284,
508,
17,
20,
20,
11,
220,
20,
21,
936,
983,
13251,
1428,
262,
1077,
897,
25,
600,
16,
21,
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_storage_latest_proof_insert() {
let storage = ImplStorage::new(Arc::new(MemoryAdapter::new()));
let block_hash = Hash::digest(get_random_bytes(10));
let proof = mock_proof(block_hash);
exec!(storage.update_latest_proof(proof.clone()));
let proof_2 = exec!(storage.get_latest... | rust_cleaned_test_functions.jsonl/5470 | {
"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,
23310,
64880,
86757,
17678,
368,
341,
262,
1077,
5819,
284,
88092,
5793,
486,
931,
4346,
1287,
486,
931,
3189,
4731,
5940,
486,
931,
25138,
262,
1077,
2504,
8950,
284,
6531,
486,
36339,
5433,
2264... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatch_with_init_boot_request_correct_address_returns_ack() {
let mut req = new_test_request();
req.options.remove(2);
let requested_ip_addr = get_requested_ip_addr(&req).unwrap();
let mut server = new_test_server(|| 42);
server.cache.insert(
... | rust_cleaned_test_functions.jsonl/61724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6615,
6137,
52062,
7893,
31550,
6744,
58900,
48447,
368,
341,
286,
1077,
5206,
4232,
284,
501,
4452,
7893,
543,
286,
4232,
10912,
4850,
7,
17,
317,
286,
1077,
11223,
10385,
7387,
284,
633,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_string_with_newline() {
let mut reader = Lexer::from_str("\"abc\ndef\"");
assert_tok(&mut reader, TokenKind::StringTail("abc\ndef".into()), 1, 1);
} | rust_cleaned_test_functions.jsonl/101131 | {
"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,
3904,
6615,
5921,
1056,
368,
341,
286,
1077,
5206,
6604,
284,
85082,
486,
1499,
2895,
38915,
13683,
59,
5037,
88385,
286,
2060,
76162,
2099,
6984,
6604,
11,
9660,
10629,
486,
703,
44795,
445,
1368... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_final_eol() {
// This test verifies that the parser doesn't choke when the end of a value is also the end of the file.
#[derive(Debug, Eq, PartialEq, Deserialize)]
struct TestWithNoFinalEol {
value1: String,
value2: String
}
let ts: TestWithNoFinalEol = aa::from_bytes(b"value1: Hel... | rust_cleaned_test_functions.jsonl/112409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
20676,
2204,
337,
368,
341,
197,
322,
1096,
1273,
87856,
429,
279,
6729,
3171,
944,
64036,
979,
279,
835,
315,
264,
897,
374,
1083,
279,
835,
315,
279,
1034,
382,
197,
13353,
27098,
42618,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_unsigned() {
// Attempt to create an account without signing the transfer
let new_owner = Pubkey::new(&[9; 32]);
let from = solana_sdk::pubkey::new_rand();
let from_account = AccountSharedData::new_ref(100, 0, &system_program::id());
let owned_key ... | rust_cleaned_test_functions.jsonl/73044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 972
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
67830,
368,
341,
286,
442,
43517,
311,
1855,
458,
2692,
2041,
15971,
279,
8317,
198,
286,
1077,
501,
29027,
284,
22611,
792,
486,
931,
2099,
58,
24,
26,
220,
18,
17,
2558,
286,
1077,
504... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_version() {
let output = include_str!("../test/version.json");
let o: Result<Version, serde_json::error::Error> = serde_json::from_str(output);
assert!(o.is_ok());
} | rust_cleaned_test_functions.jsonl/56074 | {
"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,
9438,
368,
341,
286,
1077,
2550,
284,
2924,
2895,
17223,
1244,
1944,
64413,
4323,
797,
286,
1077,
297,
25,
5714,
27,
5637,
11,
61570,
9455,
486,
841,
486,
1454,
29,
284,
61570,
9455,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_doc_index() {
Command::cargo_bin("specdown")
.unwrap()
.arg("--no-colour")
.arg("run")
.arg("--running-dir")
.arg(".specdown")
.arg("docs/index.md")
.assert()
.success();
} | rust_cleaned_test_functions.jsonl/104092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
3560,
368,
341,
262,
7348,
486,
66715,
21816,
445,
9535,
2923,
1138,
286,
659,
15454,
741,
286,
659,
858,
21549,
2152,
19459,
413,
1138,
286,
659,
858,
445,
6108,
1138,
286,
659,
858,
215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verified_vote_packets_validator_gossip_votes_iterator_wrong_fork() {
let (s, r) = unbounded();
let vote_simulator = VoteSimulator::new(1);
let my_leader_bank = vote_simulator.bank_forks.read().unwrap().root_bank();
let vote_account_key = vote_simulator.vote_pubkey... | rust_cleaned_test_functions.jsonl/22008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 719
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71871,
54360,
63569,
64959,
1889,
41473,
65116,
13491,
75198,
761,
669,
368,
341,
286,
1077,
320,
82,
11,
435,
8,
284,
650,
65686,
543,
286,
1077,
6910,
18314,
10511,
284,
34034,
14027,
10511,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_tx_buffering() {
// Test case:
// the TX buf.
{
let mut ctx = CsmTestContext::new_established();
let mut stream = TestStream::new();
stream.write_state = StreamState::WouldBlock;
ctx.set_stream(stream);
... | rust_cleaned_test_functions.jsonl/83294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 589
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
7776,
287,
368,
341,
286,
442,
3393,
1142,
510,
16885,
286,
442,
256,
279,
17031,
6607,
624,
286,
341,
310,
1077,
5206,
5635,
284,
356,
3563,
2271,
1972,
486,
931,
18583,
5102,
291,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_purge_exact_dashmap_secondary_index() {
let (key_start, key_end, account_index) = create_dashmap_secondary_index_state();
let index = AccountsIndex::<bool>::default();
run_test_purge_exact_secondary_index(
&index,
&index.spl_token_mint_index,
... | rust_cleaned_test_functions.jsonl/2239 | {
"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,
620,
39823,
71084,
84585,
2186,
77759,
3560,
368,
341,
286,
1077,
320,
792,
4906,
11,
1376,
6213,
11,
2692,
3560,
8,
284,
1855,
84585,
2186,
77759,
3560,
4387,
543,
286,
1077,
1922,
284,
40655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_facet_fuchsia_test_facet_wrong_type() -> Result<(), Error> {
let meta = json!({
"facets": {
"fuchsia.test": []
}
});
let f = test_facet(&meta);
assert!(f.is_err());
Ok(())
} | rust_cleaned_test_functions.jsonl/120020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41589,
295,
761,
73391,
4452,
41589,
295,
75198,
1819,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
8823,
284,
2951,
0,
2262,
688,
330,
22185,
1415,
788,
341,
310,
330,
69,
73391,
5958,
788... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stxw() {
test_interpreter_and_jit_asm!(
"
mov32 r2, 0x44332211
stxw [r1+2], r2
ldxw r0, [r1+2]
exit",
[
0xaa, 0xbb, 0xff, 0xff, 0xff, 0xff, 0xcc, 0xdd,
],
(),
{ |_vm, res: Result| { res.unwrap() == 0x4433221... | rust_cleaned_test_functions.jsonl/58999 | {
"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,
1261,
87,
86,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
18,
17,
435,
17,
11,
220,
15,
87,
19,
19,
18,
18,
17,
17,
16,
16,
198,
286,
357,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_composite_or_pattern() {
let mut grok = Grok::empty();
grok.insert_definition("MAC", r"(?:%{CISCOMAC}|%{WINDOWSMAC}|%{COMMONMAC})");
grok.insert_definition("CISCOMAC", r"(?:(?:[A-Fa-f0-9]{4}\.){2}[A-Fa-f0-9]{4})");
grok.insert_definition("WINDOWSMAC", r"(?:(?:[A-F... | rust_cleaned_test_functions.jsonl/117568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
13607,
8734,
21260,
368,
341,
286,
1077,
5206,
10487,
74,
284,
17888,
74,
486,
3194,
543,
286,
10487,
74,
7030,
31698,
445,
25788,
497,
435,
29209,
4820,
4,
90,
34,
1637,
8696,
1706,
52398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commit_decommit() {
let (verifier_ek, verifier_dk) = test_keypair().keys();
let (com, r, e) = Paillier::verifier_commit(&verifier_ek);
// 2. prover is playing verifier for zk correct_key protocol to make sure verifier_ek was generated correctly:
let (chal... | rust_cleaned_test_functions.jsonl/60721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
2259,
17413,
368,
341,
286,
1077,
320,
423,
3049,
62,
1225,
11,
88737,
814,
74,
8,
284,
1273,
3097,
12670,
1005,
10563,
543,
286,
1077,
320,
874,
11,
435,
11,
384,
8,
284,
15681,
483,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frontmatter_always() {
let tmp_dir = TempDir::new().expect("failed to make tempdir");
let mut exporter = Exporter::new(
PathBuf::from("tests/testdata/input/main-samples/"),
tmp_dir.path().to_path_buf(),
);
exporter.frontmatter_strategy(FrontmatterStrategy::Always)... | rust_cleaned_test_functions.jsonl/116594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22926,
58965,
8418,
2284,
368,
341,
262,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
1005,
17119,
445,
16091,
311,
1281,
2730,
3741,
797,
262,
1077,
5206,
57378,
284,
22191,
261,
486,
931,
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 |
#[test]
fn test_rules_consistency() {
let various_rules = [
toy_rules(),
Rules::new(RegularCliquesIterator::new(2, 3)),
Rules::new(RegularCliquesIterator::new(5, 4)),
Rules::new_standard(4).unwrap(),
Rules::new_standard(9).unwrap(),
... | rust_cleaned_test_functions.jsonl/98912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21407,
31971,
47094,
368,
341,
286,
1077,
5257,
21407,
284,
2278,
310,
21357,
21407,
3148,
310,
22847,
486,
931,
7,
30404,
87014,
13968,
11951,
486,
931,
7,
17,
11,
220,
18,
6965,
310,
22847,
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... | 6 |
#[test]
fn test_insert_invalid_block() {
let (shared, chain) = build_chain(2);
let invalid_block = {
let active_chain = shared.active_chain();
let tip_number = active_chain.tip_number();
let tip_hash = active_chain.tip_hash();
let invalid_cellbase =
always_suc... | rust_cleaned_test_functions.jsonl/109273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
31433,
7113,
368,
341,
262,
1077,
320,
6100,
11,
8781,
8,
284,
1936,
30583,
7,
17,
317,
262,
1077,
8318,
7113,
284,
341,
286,
1077,
4541,
30583,
284,
6094,
13616,
30583,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ikev2_payload_sa() {
let bytes = IKEV2_PAYLOAD_SA;
let expected1 = IkeV2GenericPayload{
hdr: IkeV2PayloadHeader {
next_payload_type: IkePayloadType::KeyExchange,
critical: false,
reserved: 0,
payload_length: 40,
},
p... | rust_cleaned_test_functions.jsonl/114854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2970,
85,
17,
32813,
66443,
368,
341,
262,
1077,
5820,
284,
84364,
53,
17,
79493,
81219,
280,
262,
1077,
3601,
16,
284,
98634,
53,
17,
19964,
29683,
515,
286,
36615,
25,
98634,
53,
17,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_managed_directory() {
let tempdir = TempDir::new().unwrap();
let tempdir_path = PathBuf::from(tempdir.path());
let test_path1: &'static Path = Path::new("some_path_for_test");
let test_path2: &'static Path = Path::new("some_path_for_test_2");
{
... | rust_cleaned_test_functions.jsonl/743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 786
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79889,
14846,
368,
341,
286,
1077,
2730,
3741,
284,
19944,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
2730,
3741,
2638,
284,
7933,
15064,
486,
1499,
9758,
3741,
3875,
5231,
286,
1077,
1273,
2638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_stakes_vote_account_disappear_reappear() {
let stakes_cache = StakesCache::new(Stakes {
epoch: 4,
..Stakes::default()
});
let ((vote_pubkey, mut vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
... | rust_cleaned_test_functions.jsonl/22037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
2050,
54360,
13500,
9932,
40766,
1288,
40766,
368,
341,
286,
1077,
44425,
11529,
284,
794,
2050,
8233,
486,
931,
7,
623,
2050,
341,
310,
16342,
25,
220,
19,
345,
310,
5241,
623,
2050,
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_parse_invitation_acceptance_details() {
let payload = vec![129, 172, 115, 101, 110, 100, 101, 114, 68, 101, 116, 97, 105, 108, 131, 163, 68, 73, 68, 182, 67, 113, 85, 88, 113, 53, 114, 76, 105, 117, 82, 111, 100, 55, 68, 67, 52, 97, 86, 84, 97, 115, 166, 118, 101, 114, 75, 101, 121, 217,... | rust_cleaned_test_functions.jsonl/43021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19996,
7556,
35728,
681,
13260,
368,
341,
286,
1077,
7729,
284,
7486,
20703,
16,
17,
24,
11,
220,
16,
22,
17,
11,
220,
16,
16,
20,
11,
220,
16,
15,
16,
11,
220,
16,
16,
15,
11,
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_emit_movb_imm_memscaleq() {
assert_emit!(0xC6, 0x04, 0x37, 0x00;
emit_movb_imm_memscaleq(0, RDI, RSI, 0));
assert_emit!(0x41, 0xC6, 0x04, 0x30, 0x00;
emit_movb_imm_memscaleq(0, R8, RSI, 0));
assert_emit!(0x42, 0xC6, 0x04, 0x0F, 0x... | rust_cleaned_test_functions.jsonl/85513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
55798,
65,
71370,
717,
11852,
2246,
80,
368,
341,
286,
2060,
69082,
10297,
15,
12125,
21,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
18,
22,
11,
220,
15,
87,
15,
15,
280,
3824,
16691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optimize_switch_with_labelled_break() {
test(
concat!(
"function f() {",
" label:",
" switch('x') {",
" case 'x': break label;",
" case 'y': throw f;",
" }",
"}",
),
"function... | rust_cleaned_test_functions.jsonl/397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
11853,
27652,
6615,
6106,
832,
39494,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
330,
1688,
282,
368,
314,
756,
310,
330,
220,
2383,
55120,
310,
330,
220,
3398,
492,
87,
863,
314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let req = Request::new(Method::Get)
.with_path_segs(&["foo"]);
let comments = test_ok(&api(), req);
check_type(&comments, "application", "json");
check_content(&comments, DEFAULT_JSON);
} | rust_cleaned_test_functions.jsonl/125372 | {
"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,
3062,
368,
341,
262,
1077,
4232,
284,
6145,
486,
931,
35419,
486,
1949,
340,
286,
659,
4197,
2638,
3453,
5857,
2099,
1183,
7975,
15049,
262,
1077,
6042,
284,
1273,
19817,
2099,
2068,
1507,
4232,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq2_basics() {
assert_eq!(
Fq2 {
c0: Fq::zero(),
c1: Fq::zero(),
},
Fq2::zero()
);
assert_eq!(
Fq2 {
c0: Fq::one(),
c1: Fq::zero(),
},
Fq2::one()
);
assert!(Fq2::zero().is_zero());... | rust_cleaned_test_functions.jsonl/45340 | {
"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,
761,
80,
17,
880,
67981,
368,
341,
262,
2060,
10714,
33673,
286,
434,
80,
17,
341,
310,
272,
15,
25,
434,
80,
486,
14154,
3148,
310,
272,
16,
25,
434,
80,
486,
14154,
3148,
286,
1153,
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_wal_txs_codec() {
for _ in 0..10 {
let txs = FixedSignedTxs::new(mock_wal_txs());
assert_eq!(
FixedSignedTxs::decode_sync(txs.encode_sync().unwrap()).unwrap(),
txs
);
}
} | rust_cleaned_test_functions.jsonl/122489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
278,
17805,
82,
51084,
368,
341,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
1077,
9854,
82,
284,
20149,
49312,
51,
18561,
486,
931,
30389,
1670,
278,
17805,
82,
1423,
310,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_trip_reverse() {
let mut trip = Trip::new();
trip.travel(200);
trip.reverse(100);
assert_eq!(100, trip.miles_traveled());
} | rust_cleaned_test_functions.jsonl/44524 | {
"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,
63883,
43277,
368,
341,
286,
1077,
5206,
8411,
284,
26754,
486,
931,
543,
286,
8411,
91554,
7,
17,
15,
15,
317,
286,
8411,
32081,
7,
16,
15,
15,
317,
286,
2060,
10714,
10297,
16,
15,
15,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_alignment() {
let instructions = vec![
(3, vec![0xaa, 0, 0, 0, 10, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 30, 0, 0, 0, 31]),
(0, vec![0xaa, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 20, 0, 0, 0, 21, 0, 0, 0, 30, 0, 0, 0, 31]),
];
let expected = Ok((
&[][..],
Instruct... | rust_cleaned_test_functions.jsonl/62170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51006,
368,
341,
262,
1077,
11221,
284,
7486,
90515,
286,
320,
18,
11,
7486,
20703,
15,
43300,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
15,
11,
220,
15,
11,
220,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_serialize_bool() {
let inputs = vec![(true, "true"), (false, "false")];
for (src, should_be) in inputs {
let mut buffer = Vec::new();
{
let mut ser = Serializer::new(&mut buffer);
ser.serialize_bool(src).unwrap();
... | rust_cleaned_test_functions.jsonl/107662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
22159,
368,
341,
286,
1077,
11127,
284,
7486,
0,
9697,
1866,
11,
330,
1866,
3975,
320,
3849,
11,
330,
3849,
899,
4821,
286,
369,
320,
3548,
11,
1265,
21263,
8,
304,
11127,
341,
310,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_puts_gets_deletes() {
init_logging();
let bucket_name = format!("test-bucket-{}-{}", "default".to_owned(), get_time().sec);
let test_client = TestS3Client::new(bucket_name.clone());
test_client.create_test_bucket_with_acl(bucket_name.clone(), Some("public-read".to_owned()));
... | rust_cleaned_test_functions.jsonl/112573 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88574,
3062,
82,
2259,
13881,
368,
341,
262,
2930,
59982,
1428,
262,
1077,
15621,
1269,
284,
3561,
17223,
1944,
1455,
11152,
12,
6257,
12,
42351,
330,
2258,
3263,
983,
51973,
1507,
633,
3009,
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... | 6 |
#[test]
fn test_cursor_and_file_has_the_same_behaviour() {
let mut buf: Vec<u8> = Vec::new();
get_test_file("alltypes_plain.parquet")
.read_to_end(&mut buf)
.unwrap();
let cursor = SliceableCursor::new(buf);
let read_from_cursor = SerializedFileReader::new... | rust_cleaned_test_functions.jsonl/27256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28601,
8378,
2458,
21778,
16068,
33574,
43241,
8897,
368,
341,
286,
1077,
5206,
6607,
25,
11312,
34837,
23,
29,
284,
11312,
486,
931,
543,
286,
633,
4452,
2458,
445,
541,
9242,
41015,
33277,
23300... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ptr_raw() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new();
#[allow(deprecated)]
engine
.register_fn("mul", |x: &mut INT, y: INT| *x *= y)
.register_raw_fn(
"bar",
&[
TypeId::of::<INT>(),
Ty... | rust_cleaned_test_functions.jsonl/5442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1084
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
4348,
16067,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
5206,
4712,
284,
8200,
486,
931,
1428,
262,
11506,
7183,
12797,
19889,
5563,
262,
4712,
198,
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... | 5 |
#[test]
fn test_add_getter() {
let a = Ts {jaf: 4, field_1: 0, field_2: String::from("hello")};
assert_eq!(a.get_field_2(), &String::from("hello"));
} | rust_cleaned_test_functions.jsonl/24668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
3062,
465,
368,
341,
262,
1077,
264,
284,
25076,
314,
73,
2577,
25,
220,
19,
11,
2070,
62,
16,
25,
220,
15,
11,
2070,
62,
17,
25,
923,
486,
1499,
445,
14990,
899,
2440,
262,
2060,
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 |
#[test]
fn test_variable_array_variable_len_struct() {
let mut buf = BytesMut::new();
buf.put_u32(2); // 2 structs
buf.put_u32(2); // This struct has 2 values
buf.put_u32(1); // Struct 1
buf.put_u32(2); // Struct 2
buf.put_u32(2); // This... | rust_cleaned_test_functions.jsonl/38923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14635,
3858,
14635,
6043,
15126,
368,
341,
310,
1077,
5206,
6607,
284,
30024,
51440,
486,
931,
543,
310,
6607,
3597,
7300,
18,
17,
7,
17,
1215,
442,
220,
17,
62845,
271,
310,
6607,
3597,
7300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_time() {
assert_eq!(parse_time("10:30:44 +0000"), Ok((10, 30, Some(44), 0, "")));
assert_eq!(parse_time("10:30 EDT"), Ok((10, 30, None, -400, "")));
assert!(parse_time("").is_err());
} | rust_cleaned_test_functions.jsonl/100506 | {
"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,
21039,
3009,
368,
341,
286,
2060,
10714,
10297,
6400,
3009,
445,
16,
15,
25,
18,
15,
25,
19,
19,
488,
15,
15,
15,
15,
3975,
7622,
1188,
16,
15,
11,
220,
18,
15,
11,
4329,
7,
19,
19,
701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_container_decl() {
let code = String::from("
cont: Integer {
inner: int;
}
");
let mut lexer = Token::lexer(code.as_str());
let parser = Parser::new(code.clone());
let decl_res = parser.parse_container_decl(&mut lexer);
assert!(decl_res... | rust_cleaned_test_functions.jsonl/43197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
15847,
35814,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
70576,
286,
683,
25,
4440,
341,
310,
9179,
25,
526,
280,
286,
456,
262,
39887,
262,
1077,
5206,
53259,
284,
9660,
486,
38815,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_macros_conv() {
let mut conv_map = parse(
"macros",
r#"
mod swig_foreign_types_map {
#![swig_foreigner_type="byte"]
#![swig_rust_type="jbyte"]
#![swig_foreigner_type="short"]
#![swig_rust_type="jshort"]
}
#[swig_code = "let {to_var}: {to_var... | rust_cleaned_test_functions.jsonl/54598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
85904,
22716,
368,
341,
286,
1077,
5206,
5686,
5376,
284,
4715,
1006,
310,
330,
86398,
756,
310,
435,
2,
698,
2593,
2021,
343,
78983,
9763,
5376,
341,
262,
671,
20703,
2280,
343,
35563,
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_delay_second_test_case() {
let first_line = "R98,U47,R26,D63,R33,U87,L62,D20,R33,U53,R51";
let second_line = "U98,R91,D20,R16,D67,R40,U7,R15,U6,R7";
assert_eq!(410, get_minimum_signal_delay_intersection(first_line, second_line));
} | rust_cleaned_test_functions.jsonl/45006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22198,
29644,
4452,
19096,
368,
341,
286,
1077,
1156,
6528,
284,
330,
49,
24,
23,
50481,
19,
22,
23508,
17,
21,
27266,
21,
18,
23508,
18,
18,
50481,
23,
22,
30114,
21,
17,
27266,
17,
15,
235... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_doc_spec_chunk() {
crate::tests::test_write_doc_spec_chunk(
TEST_CHUNK_I16_LZ4.as_ref(),
CompressionType::Lz4(Lz4Compression::default()),
);
} | rust_cleaned_test_functions.jsonl/40667 | {
"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,
9165,
18869,
13594,
30539,
368,
341,
286,
17717,
486,
23841,
486,
1944,
9165,
18869,
13594,
30539,
1006,
310,
13602,
70508,
7959,
16,
21,
2351,
57,
19,
5357,
7793,
3148,
310,
66161,
929,
486,
43,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_result() {
let mut results = IpResults::new(Some(false));
results.add_result(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), Utc::now());
assert_eq!(
results.get_latest_ip().unwrap(),
IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1))
);
} | rust_cleaned_test_functions.jsonl/86294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5287,
368,
341,
286,
1077,
5206,
3059,
284,
35033,
9801,
486,
931,
65405,
3576,
3237,
286,
3059,
1364,
5287,
8972,
79,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
16,
17,
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_hsl_cross_fifo_synthesizes() {
let mut uut: CrossWiden<4, 5, 6, 16, 3, 4> = CrossWiden::new(WordOrder::LeastSignificantFirst);
uut.wide_bus.read.connect();
uut.wide_clock.connect();
uut.narrow_bus.write.connect();
uut.narrow_bus.data.connect();
uut.narrow_clock.connect();... | rust_cleaned_test_functions.jsonl/118558 | {
"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,
1523,
3226,
35284,
56590,
51393,
6375,
4756,
368,
341,
262,
1077,
5206,
575,
332,
25,
11261,
54,
12487,
27,
19,
11,
220,
20,
11,
220,
21,
11,
220,
16,
21,
11,
220,
18,
11,
220,
19,
29,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_redirection_to_current_dir() {
let (at, mut ucmd) = at_and_ucmd!();
// Create a 256-character path to current directory
let dir = path_concat!(".", ..128);
ucmd.arg("-n")
.arg("-m")
.arg(dir)
.run()
.stdout_is(at.root_dir_resolved());
} | rust_cleaned_test_functions.jsonl/37403 | {
"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,
17799,
26058,
2866,
2346,
11080,
4334,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
442,
4230,
264,
220,
17,
20,
21,
79225,
1815,
311,
1482,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_age() {
let p: Person = Person::from("Mark,");
assert_eq!(p.name, "John");
assert_eq!(p.age, 30);
} | rust_cleaned_test_functions.jsonl/1614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
32053,
368,
341,
286,
1077,
281,
25,
7357,
284,
7357,
486,
1499,
445,
8949,
88349,
286,
2060,
10714,
10297,
79,
2644,
11,
330,
13079,
797,
286,
2060,
10714,
10297,
79,
30810,
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 |
#[test]
fn test_not() {
assert_eq!(!u7(42), u7(85));
assert_eq!(!u7(0x7F), u7(0));
assert_eq!(!u7(0), u7(0x7F));
assert_eq!(!u7(56), u7(71));
} | rust_cleaned_test_functions.jsonl/112544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
368,
341,
286,
2060,
10714,
0,
3471,
84,
22,
7,
19,
17,
701,
575,
22,
7,
23,
20,
1106,
286,
2060,
10714,
0,
3471,
84,
22,
7,
15,
87,
22,
37,
701,
575,
22,
7,
15,
1106,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arg_number() {
let _ = tracing_subscriber::fmt::try_init();
#[derive(PolarClass)]
struct Foo;
impl Foo {
fn three(&self, one: i32, two: i32, three: i32) -> i32 {
one + two + three
}
fn many_method(
&self,
one: i32,
... | rust_cleaned_test_functions.jsonl/30397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 698
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6057,
5500,
368,
341,
262,
1077,
716,
284,
45415,
5228,
20351,
486,
12501,
486,
1539,
6137,
543,
262,
11506,
27098,
5304,
7417,
1957,
5563,
262,
2036,
33428,
401,
262,
11605,
33428,
341,
286,
5168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_strings_not_equal() {
let text = " {% if 'test' != 'test' %} true {% else %} false {% endif %} ";
assert_template_result!(" false ", text);
} | rust_cleaned_test_functions.jsonl/28130 | {
"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,
33500,
7913,
11478,
368,
341,
262,
1077,
1467,
284,
330,
52261,
421,
364,
1944,
6,
961,
364,
1944,
6,
1018,
92,
830,
52261,
770,
1018,
92,
895,
52261,
12330,
1018,
92,
7620,
262,
2060,
8693,
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 |
#[test]
fn test_continue_confirmation_bad_input() {
let (ctx, is, os) = create_normal_test_context("foo\nYes\n");
let result = continue_confirmation(is, os, TEST_CONTINUE_DESCRIPTION).unwrap();
assert!(result);
assert!(ctx.has_default_attributes());
assert_eq!(
format!(
... | rust_cleaned_test_functions.jsonl/110994 | {
"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,
75297,
37681,
34199,
5898,
368,
341,
262,
1077,
320,
3773,
11,
374,
11,
2643,
8,
284,
1855,
13973,
4452,
8467,
445,
7975,
1699,
9454,
1699,
797,
262,
1077,
1102,
284,
3060,
37681,
9623,
11,
2643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nft_configure_not_same_error() {
let (mut context, tx) = create_test_context(
Action::Update(UpdateCase::Claim),
NftError::NFTConfigureNotSame,
);
let tx = context.complete_tx(tx);
// run
let err = context.verify_tx(&tx, MAX_CYCLES).unwrap_err();
l... | rust_cleaned_test_functions.jsonl/33588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
1089,
723,
75887,
7913,
33574,
4096,
368,
341,
262,
1077,
320,
6984,
2266,
11,
9854,
8,
284,
1855,
4452,
8467,
1006,
286,
5586,
486,
4289,
7,
4289,
4207,
486,
45544,
1326,
286,
451,
723,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uncommented() {
fn check(haystack: &str, needle: &str, expected: Option<usize>) {
assert_eq!(expected, haystack.find_uncommented(needle));
}
check("/*/ */test", "test", Some(6));
check("//test\ntest", "test", Some(7));
check("/* comment o... | rust_cleaned_test_functions.jsonl/44604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
4907,
6182,
291,
368,
341,
286,
5168,
1779,
3203,
352,
7693,
25,
609,
495,
11,
30309,
25,
609,
495,
11,
3601,
25,
6959,
90244,
9231,
341,
310,
2060,
10714,
10297,
7325,
11,
88447,
2658,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keeps_track_of_rendered_languages() {
let mut file = NamedTempFile::new().unwrap();
writeln!(file, "``` vim" ).unwrap();
writeln!(file, "```" ).unwrap();
writeln!(file, "" ).unwrap();
writeln!(file, " ignored" ).unwrap();
writeln!(file, "" ... | rust_cleaned_test_functions.jsonl/95426 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45476,
7124,
28545,
3575,
22781,
291,
77576,
368,
341,
262,
1077,
5206,
1034,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
1428,
262,
80947,
10297,
1192,
11,
330,
73594,
36157,
1,
257,
7457,
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_deserialize_with_variant() {
assert_de_tokens(
&WithVariant::Unit,
&[
Token::NewtypeVariant { name: "WithVariant", variant: "Unit" },
Token::I8(0),
],
);
assert_de_tokens(
&WithVariant::Newtype(123),
&[
Toke... | rust_cleaned_test_functions.jsonl/58619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 461
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
6615,
46112,
368,
341,
262,
2060,
2259,
28838,
1006,
286,
609,
2354,
20746,
486,
4562,
345,
286,
609,
9640,
310,
9660,
486,
3564,
1313,
20746,
314,
829,
25,
330,
2354,
20746,
497,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple() {
let mut buffer = buffer();
buffer.enqueue(6, ()).unwrap().copy_from_slice(b"abcdef");
assert_eq!(buffer.enqueue(16, ()), Err(Error::Exhausted));
assert_eq!(buffer.metadata_ring.len(), 1);
assert_eq!(buffer.dequeue().unwrap().1, &b"abcdef"[..]);
... | rust_cleaned_test_functions.jsonl/101974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
286,
1077,
5206,
4147,
284,
4147,
543,
286,
4147,
47468,
7,
21,
11,
1719,
568,
15454,
1005,
8560,
5673,
26488,
1883,
1,
41202,
797,
286,
2060,
10714,
10297,
7573,
47468,
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_subtract_outer() {
let x = array![2., 3., 4.];
let y = array![1., 5., 2.];
let z = subtract_outer(&x, &y);
assert_eq!(z, array![[1., -3., 0.], [2., -2., 1.], [3., -1., 2.]]);
} | rust_cleaned_test_functions.jsonl/75000 | {
"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,
5228,
2144,
67258,
368,
341,
197,
10217,
856,
284,
1334,
20703,
17,
2572,
220,
18,
2572,
220,
19,
13,
935,
197,
10217,
379,
284,
1334,
20703,
16,
2572,
220,
20,
2572,
220,
17,
13,
935,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_floor_to_pow_of_2() {
let t = [
(1 as usize, 1 as usize),
(2, 2),
(3, 2),
(4, 4),
(5, 4),
(15, 8),
(31, 16),
(33, 32),
(1000, 512),
(1500, 1024),
(2300, 204... | rust_cleaned_test_functions.jsonl/6015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60044,
2346,
56183,
3575,
62,
17,
368,
341,
286,
1077,
259,
284,
2278,
310,
320,
16,
438,
22301,
11,
220,
16,
438,
22301,
1326,
310,
320,
17,
11,
220,
17,
1326,
310,
320,
18,
11,
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... | 2 |
#[test]
fn test_convert_to_duration() {
let cases = vec![
("2012-12-31 11:30:45.123456", 4, "11:30:45.1235"),
("2012-12-31 11:30:45.123456", 6, "11:30:45.123456"),
("2012-12-31 11:30:45.123456", 0, "11:30:45"),
("2012-12-31 11:30:45.999999", 0, "11:30:46")... | rust_cleaned_test_functions.jsonl/58468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
25454,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
17,
12,
16,
17,
12,
18,
16,
220,
16,
16,
25,
18,
15,
25,
19,
20,
13,
16,
17,
18,
19,
20,
21,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_list_builder() {
let values_builder = Int32Array::builder(10);
let mut builder = LargeListPrimitiveChunkedBuilder::new("a", values_builder, 10);
// create a series containing two chunks
let mut s1 = Int32Chunked::new_from_slice("a", &[1, 2, 3]).into_series();
... | rust_cleaned_test_functions.jsonl/5954 | {
"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,
2019,
28532,
368,
341,
286,
1077,
2750,
28532,
284,
1333,
18,
17,
1857,
486,
17850,
7,
16,
15,
317,
286,
1077,
5206,
7363,
284,
20286,
852,
33313,
28304,
291,
3297,
486,
931,
445,
64,
497,
275... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_num_conditional_reversal() {
let mut rng = XorShiftRng::from_seed([0x3dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
{
let mut cs = TestConstraintSystem::<Bls12>::new();
let a = AllocatedNum::alloc(cs.namespace(|| "a"), || Ok(rng.gen())).unwrap();
... | rust_cleaned_test_functions.jsonl/39690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 646
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4273,
24433,
3005,
1288,
3004,
278,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
18,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
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... | 9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.