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_initialize_mint_account() {
let program_id = crate::id();
let account_key = Pubkey::new_unique();
let mut account_account = SolanaAccount::new(42, Account::get_packed_len(), &program_id);
let owner_key = Pubkey::new_unique();
let mut owner_account = Solana... | rust_cleaned_test_functions.jsonl/64285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1713
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
717,
396,
13500,
368,
341,
286,
1077,
2025,
842,
284,
17717,
486,
307,
543,
286,
1077,
2692,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
2692,
13500,
284,
11473,
3362,
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_scan_white_four() {
let result = Sequence::scan(White, Four, 0b01111, 0b10000, 5, 0);
let expected = [Sequence::new(0, 4, Some(4), None)];
assert_eq!(result, expected);
let result = Sequence::scan(White, Four, 0b10111, 0b01000, 5, 0);
let expected = [Sequ... | rust_cleaned_test_functions.jsonl/56145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 732
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
44431,
56142,
368,
341,
286,
1077,
1102,
284,
28871,
486,
16405,
7,
14075,
11,
13322,
11,
220,
15,
65,
15,
16,
16,
16,
16,
11,
220,
15,
65,
16,
15,
15,
15,
15,
11,
220,
20,
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_affine_niels_point_identity() {
assert_eq!(
AffineNielsPoint::identity().v_plus_u,
AffinePoint::identity().to_niels().v_plus_u
);
assert_eq!(
AffineNielsPoint::identity().v_minus_u,
AffinePoint::identity().to_niels().v_minus_u
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/103796 | {
"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,
48914,
482,
1089,
72,
2010,
6085,
46244,
368,
341,
262,
2060,
10714,
33673,
286,
9748,
482,
56494,
2010,
2609,
486,
16912,
1005,
85,
28043,
7300,
345,
286,
9748,
482,
2609,
486,
16912,
1005,
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_bit_mask_fuzz() {
let mut mask = BitSet::new();
let mut all_bools = vec![];
let mut rng = make_rng();
for _ in 0..100 {
let mask_length = (rng.next_u32() % 50) as usize;
let bools: Vec<_> = std::iter::from_fn(|| Some(rng.next_u32() & 1 == ... | rust_cleaned_test_functions.jsonl/29078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 761
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
9999,
761,
8889,
368,
341,
286,
1077,
5206,
6911,
284,
57227,
486,
931,
543,
286,
1077,
5206,
678,
22159,
82,
284,
7486,
0,
15078,
286,
1077,
5206,
28422,
284,
1281,
66849,
1428,
286,
369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_parse_query_to_ast_binary_op() {
test_parse_query_to_ast_helper("a AND b", "(+\"a\" +\"b\")");
test_parse_query_to_ast_helper("a OR b", "(?\"a\" ?\"b\")");
test_parse_query_to_ast_helper("a OR b AND c", "(?\"a\" ?(+\"b\" +\"c\"))");
test_parse_query_to_ast_helper(... | rust_cleaned_test_functions.jsonl/64407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5738,
2346,
48019,
31761,
10287,
368,
341,
286,
1273,
21039,
5738,
2346,
48019,
10418,
445,
64,
3567,
293,
497,
11993,
10,
2105,
64,
2105,
488,
2105,
65,
62705,
797,
286,
1273,
21039,
5738,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_server_request_with_body_send_stop_sending() {
let (mut hconn, mut peer_conn) = connect();
let stream_id = peer_conn.stream_create(StreamType::BiDi).unwrap();
// Send only request headers for now.
peer_conn
.stream_send(stream_id, &REQUEST_WITH_BODY[.... | rust_cleaned_test_functions.jsonl/52193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12015,
7893,
6615,
14114,
13565,
19039,
643,
2459,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
8,
284,
4564,
1428,
286,
1077,
4269,
842,
284,
14397,
17241,
14958,
8657,
5201... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_config() {
let config = load_ssh_config("./tests/test_config").expect("failed to parse config");
assert_eq!(11, config.len());
assert_eq!(
config.keys().cloned().collect::<Vec<_>>(),
vec![
"homework-server",
"nixcra... | rust_cleaned_test_functions.jsonl/118811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
368,
341,
286,
1077,
2193,
284,
2795,
82805,
5332,
13988,
23841,
12697,
5332,
1827,
17119,
445,
16091,
311,
4715,
2193,
797,
286,
2060,
10714,
10297,
16,
16,
11,
2193,
19406,
5231,
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_ser_de_empty() {
let string = ArrayString::<[u8; 0]>::new();
assert_tokens(&string, &[
Token::Str(""),
]);
} | rust_cleaned_test_functions.jsonl/67023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
2259,
15124,
368,
341,
286,
1077,
914,
284,
2910,
703,
27638,
58,
84,
23,
26,
220,
15,
60,
6831,
931,
1428,
286,
2060,
28838,
2099,
917,
11,
609,
9640,
310,
9660,
486,
2580,
445,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_take_values() {
let mut c = ContextImpl(vec![]);
c.push(wrap(10i32));
assert_eq!(1, c.take_after(0, &mut |v| ()));
} | rust_cleaned_test_functions.jsonl/7107 | {
"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,
73261,
9146,
368,
341,
286,
1077,
5206,
272,
284,
9608,
9673,
25592,
0,
56703,
286,
272,
2552,
3622,
4611,
7,
16,
15,
72,
18,
17,
1106,
286,
2060,
10714,
10297,
16,
11,
272,
40161,
19844,
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 |
#[test]
fn test_partial_parse() {
use core::ops::Deref as _;
// Try to get something with only the flow header:
let buf = [0, 0, 1, 2, 10, 20];
let mut bv = &buf[..];
let packet =
bv.parse_with::<_, UdpPacketRaw<_>>(IpVersionMarker::<Ipv4>::default()).unwrap(... | rust_cleaned_test_functions.jsonl/112493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1654
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
21039,
368,
341,
286,
990,
6200,
486,
3721,
486,
35,
43970,
438,
716,
401,
286,
442,
9735,
311,
633,
2494,
448,
1172,
279,
6396,
4247,
510,
286,
1077,
6607,
284,
508,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_for_apply_index() {
let _guard = crate::setup();
let mut cluster = new_server_cluster(0, 3);
// Increase the election tick to make this test case running reliably.
configure_for_lease_read(&mut cluster, Some(50), Some(10_000));
let pd_client = Arc::clone(&cluster.pd_cli... | rust_cleaned_test_functions.jsonl/19970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
5478,
36551,
3560,
368,
341,
262,
1077,
716,
26098,
284,
17717,
486,
15188,
543,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
18,
626,
262,
442,
39633,
279,
6223,
9341,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_topn_heap_with_cmp_error() {
let mut order_cols = Vec::new();
order_cols.push(new_order_by(0, false));
order_cols.push(new_order_by(1, true));
let order_cols = Rc::new(order_cols);
let ctx = Rc::new(EvalContext::default());
let mut topn_heap = TopN... | rust_cleaned_test_functions.jsonl/114478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1011
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
77,
33059,
6615,
35193,
4096,
368,
341,
286,
1077,
5206,
1973,
25347,
284,
11312,
486,
931,
543,
286,
1973,
25347,
2552,
1755,
7869,
3710,
7,
15,
11,
895,
1106,
286,
1973,
25347,
2552,
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_try_from_char() {
assert_eq!(
TypeQualifier::try_from('!').unwrap(),
TypeQualifier::BangSingle
);
assert_eq!(
TypeQualifier::try_from('#').unwrap(),
TypeQualifier::HashDouble
);
assert_eq!(
TypeQu... | rust_cleaned_test_functions.jsonl/56121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
9232,
368,
341,
286,
2060,
10714,
33673,
310,
3990,
83491,
486,
1539,
5673,
492,
0,
1823,
15454,
3148,
310,
3990,
83491,
486,
62819,
10888,
198,
286,
1439,
286,
2060,
10714,
33673,
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_mutiple_key() {
for mut test in new_test_suits().drain(..) {
test.add(b"abc", b"v");
test.add(b"abcd", b"v");
test.add(b"ac", b"v2");
test.do_test();
}
} | rust_cleaned_test_functions.jsonl/22549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
3778,
3097,
368,
341,
286,
369,
5206,
1273,
304,
501,
4452,
643,
11797,
1005,
3612,
466,
56422,
8,
341,
310,
1273,
1364,
1883,
1,
13683,
497,
293,
1,
85,
797,
310,
1273,
1364,
1883,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merge_overwriting_list() {
let mut upper = Env::new();
let mut lower = Env::new();
lower.insert(
"mykey".to_string(),
EnvKey::List(vector![
"lower_value_1".to_string(),
"lower_value_2".to_string(),
]),
... | rust_cleaned_test_functions.jsonl/131134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
15431,
25304,
2019,
368,
341,
286,
1077,
5206,
8416,
284,
37039,
486,
931,
543,
286,
1077,
5206,
4722,
284,
37039,
486,
931,
543,
286,
4722,
7030,
1006,
310,
330,
2408,
792,
3263,
983,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_updates_since_multiple_batches() {
let path = DBPath::new("_rust_rocksdb_test_get_updates_since_multiple_batches");
let db = DB::open_default(&path).unwrap();
// verify 3 batches of 1 put each were done
db.put(b"key1", b"value1").unwrap();
let seq1 = db.latest_sequen... | rust_cleaned_test_functions.jsonl/91350 | {
"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,
3062,
57829,
56262,
45233,
57755,
368,
341,
262,
1077,
1815,
284,
5952,
1820,
486,
931,
16975,
35788,
26608,
14553,
1999,
4452,
3062,
57829,
56262,
45233,
57755,
797,
262,
1077,
2927,
284,
5952,
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_var_lifting() {
test("if(true)var a", "var a");
test("if(false)var a", "var a");
// More var lifting tests in PeepholeIntegrationTests
} | rust_cleaned_test_functions.jsonl/375 | {
"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,
4612,
907,
17680,
368,
341,
262,
1273,
445,
333,
3715,
8,
947,
264,
497,
330,
947,
264,
797,
262,
1273,
445,
333,
3576,
8,
947,
264,
497,
330,
947,
264,
3071,
262,
442,
4398,
762,
32410,
703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_expect_continue() {
let srv = TestServer::new(|| {
HttpService::build()
.expect(service_fn(|req: Request| {
if req.head().uri.query() == Some("yes=") {
Ok(req)
} else {
Err(error::ErrorPreconditionFai... | rust_cleaned_test_functions.jsonl/102533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68918,
75297,
368,
341,
262,
1077,
43578,
284,
3393,
5475,
486,
931,
79453,
341,
286,
4823,
1860,
486,
5834,
741,
310,
659,
17119,
21656,
15246,
22428,
2958,
25,
6145,
91,
341,
394,
421,
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... | 3 |
#[test]
fn test_fetch() {
let mut bcf = IndexedReader::from_path(&"test/test.bcf").expect("Error opening file.");
bcf.set_threads(2).unwrap();
let rid = bcf
.header()
.name2rid(b"1")
.expect("Translating from contig '1' to ID failed.");
bcf.fet... | rust_cleaned_test_functions.jsonl/8762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
368,
341,
286,
1077,
5206,
293,
9792,
284,
8008,
17120,
486,
1499,
2638,
2099,
1,
1944,
12697,
948,
9792,
1827,
17119,
445,
1454,
8568,
1034,
7320,
286,
293,
9792,
980,
29725,
7,
17,
568,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_in_seq() {
check(vec![Vec::<usize>::new()], Some(8));
check(vec![vec![1i64, 3, 5], vec![-1, -3, -5]], Some(64));
} | rust_cleaned_test_functions.jsonl/79667 | {
"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,
14486,
1243,
14486,
368,
341,
262,
1779,
25592,
20703,
10050,
27638,
51878,
6831,
931,
79558,
4329,
7,
23,
1106,
262,
1779,
25592,
20703,
4083,
20703,
16,
72,
21,
19,
11,
220,
18,
11,
220,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_drop() -> Result<()> {
// dropping all columns is a special case. It may fail because a projection
// that projects nothing could be misinterpreted as select all.
let out = df![
"a" => [1],
]?
.lazy()
.drop_columns(["a"])
.collect()?;
assert_eq!(out.width(... | rust_cleaned_test_functions.jsonl/5216 | {
"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,
29584,
368,
1464,
5714,
71698,
341,
262,
442,
25100,
678,
8147,
374,
264,
3281,
1142,
13,
1084,
1231,
3690,
1576,
264,
21615,
198,
262,
442,
429,
7079,
4302,
1410,
387,
5786,
93461,
438,
3293,
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... | 3 |
#[test]
fn test_token() {
let mut core = Core::<RopeyCoreBuffer>::from_reader("token".as_bytes()).unwrap();
core.set_cursor(Cursor { row: 0, col: 5 });
assert_eq!(Insert::token(&core), "token".to_string());
let mut core = Core::<RopeyCoreBuffer>::from_reader("tokenblah".as_bytes(... | rust_cleaned_test_functions.jsonl/103801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
368,
341,
286,
1077,
5206,
6200,
284,
9518,
27638,
49,
2792,
88,
5386,
4095,
6831,
1499,
22306,
445,
5839,
3263,
300,
12524,
6011,
15454,
543,
286,
6200,
980,
28601,
3025,
3823,
314,
2802,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gen_importing_cluster_slots() {
let cluster_name = ClusterName::try_from("test_cluster_name").unwrap();
let m = HashMap::new();
let slot_ranges = gen_testing_migration_slot_ranges(false);
let output = gen_cluster_slots_helper(&cluster_name, &slot_ranges, &m).unwra... | rust_cleaned_test_functions.jsonl/79237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
18434,
287,
28441,
54161,
368,
341,
286,
1077,
10652,
1269,
284,
35380,
675,
486,
1539,
5673,
445,
1944,
28441,
1269,
1827,
15454,
543,
286,
1077,
296,
284,
10528,
486,
931,
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_insert_wrong_ancestors() {
let key = Keypair::new();
let index = AccountsIndex::<bool>::default();
let mut gc = Vec::new();
index.upsert(
0,
&key.pubkey(),
&Pubkey::default(),
&[],
&HashSet::new(),
... | rust_cleaned_test_functions.jsonl/2224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
75198,
62,
681,
267,
1087,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1077,
5206,
22122,
284,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_route_from_forwarding_entry() {
assert_eq!(
Route::from(&ForwardingEntry {
subnet: fnet::Subnet {
addr: fnet::IpAddress::Ipv4(fnet::Ipv4Address { addr: [1, 2, 3, 0] }),
prefix_len: 23,
},
... | rust_cleaned_test_functions.jsonl/87691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1982
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28109,
5673,
32121,
287,
9078,
368,
341,
286,
2060,
10714,
33673,
310,
9572,
486,
1499,
2099,
25925,
287,
5874,
341,
394,
51457,
25,
282,
4711,
486,
3136,
4711,
341,
503,
10789,
25,
282,
4711,
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_unsetenv() {
let n = make_rand_name();
setenv(&n, "VALUE");
unsetenv(&n);
assert_eq!(getenv(&n), None);
} | rust_cleaned_test_functions.jsonl/72103 | {
"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,
98109,
3160,
368,
341,
286,
1077,
308,
284,
1281,
33864,
1269,
543,
286,
738,
3160,
2099,
77,
11,
330,
23832,
797,
286,
18000,
3160,
2099,
77,
317,
286,
2060,
10714,
10297,
455,
3160,
2099,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_replace_option_unwrap_with_match() {
check_assist(
replace_unwrap_with_match,
r"
enum Option<T> { Some(T), None }
fn i<T>(a: T) -> T { a }
fn main() {
let x = Option::Some(92);
let y = i(x).<|>unwrap();
}
",
r"
enum Option<T> { Some... | rust_cleaned_test_functions.jsonl/67849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
9672,
4907,
10097,
6615,
10708,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8290,
4907,
10097,
6615,
10708,
345,
310,
435,
698,
9018,
6959,
3125,
29,
314,
4329,
4140,
701,
2240,
456,
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,
1,
1,
1,
1... | 1 |
#[test]
fn test_wfq_constant_flipping() {
let initial_expiration_seconds = 2 * ONE_DAY_SECONDS;
let mut neuron_votes: Vec<NeuronVote> = vec![NeuronVote {
vote_and_time: Some((Vote::Yes, 1)),
stake: 10,
}];
for i in 1..ONE_DAY_SECONDS / 10 {
let vote: Vote;
if i %... | rust_cleaned_test_functions.jsonl/1198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
63919,
34967,
5081,
5654,
368,
341,
262,
1077,
2856,
2702,
28479,
34825,
284,
220,
17,
353,
24038,
43566,
75351,
280,
262,
1077,
5206,
48284,
65116,
25,
11312,
27,
8813,
36090,
41412,
29,
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... | 3 |
#[test]
fn test_interior_nul_in_progname_is_error() {
match Command::new("has-some-\0\0s-inside").spawn() {
Err(e) => assert_eq!(e.kind(), ErrorKind::InvalidInput),
Ok(_) => panic!(),
}
} | rust_cleaned_test_functions.jsonl/5489 | {
"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,
15318,
2462,
1089,
360,
1243,
60390,
606,
6892,
4096,
368,
341,
286,
2432,
7348,
486,
931,
445,
4648,
1331,
635,
30529,
15,
59,
15,
82,
21853,
577,
1827,
46087,
368,
341,
310,
15495,
2026,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_len_with_variable() {
let mut output = String::new();
let method = StringMethod {
method: "len",
variable: "$FOO",
pattern: "",
selection: Select::All,
};
method.handle(&mut output, &VariableExpander);
... | rust_cleaned_test_functions.jsonl/85291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6043,
6615,
14635,
368,
341,
286,
1077,
5206,
2550,
284,
923,
486,
931,
543,
286,
1077,
1714,
284,
923,
3523,
341,
310,
1714,
25,
262,
330,
2892,
756,
310,
3890,
25,
220,
5201,
3788,
46,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_driver_features() {
let features = banjo_ddk_wlaninfo::WlanInfoDriverFeature::SCAN_OFFLOAD
| banjo_ddk_wlaninfo::WlanInfoDriverFeature::RATE_SELECTION
| banjo_ddk_wlaninfo::WlanInfoDriverFeature::SYNTH
| banjo_ddk_wlaninfo::WlanInfoDriverFeatur... | rust_cleaned_test_functions.jsonl/122392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
20602,
14965,
368,
341,
286,
1077,
4419,
284,
8943,
7305,
43174,
74,
1670,
10715,
2733,
486,
54,
10715,
1731,
11349,
13859,
486,
92559,
11987,
12988,
198,
310,
760,
8943,
7305,
43174,
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... | 1 |
#[test]
fn test_conversion_between_newtypes() {
let s = "Foo".to_string();
let nt = TypeWrapper(s.clone());
let nt2: TypeWrapper2 = nt.transmogrify();
assert_eq!(nt2.0, s);
} | rust_cleaned_test_functions.jsonl/32225 | {
"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,
64132,
48302,
5921,
9242,
368,
341,
262,
1077,
274,
284,
330,
40923,
3263,
983,
3904,
543,
262,
1077,
31412,
284,
3990,
11542,
1141,
15997,
1423,
262,
1077,
31412,
17,
25,
3990,
11542,
17,
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 |
#[test]
fn test_t05() {
// Array selection
let (r, sioe) = do_execute!(&["-s", "\"primes\".[]"], super::IN_DAT_05);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(buff!(sioe, sout), "[7,11,13]\n",);
assert_eq!(r.is_ok(), true);
let (r, sioe) = do_execute!(... | rust_cleaned_test_functions.jsonl/118360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
15,
20,
368,
341,
286,
442,
2910,
6589,
198,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
12,
82,
497,
15898,
649,
1733,
2105,
13,
1294,
7914,
2256,
486,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_client_hello() {
let mut ctx: CCPContext = CCPContext::new();
let mut buf: [u8; CCP_MAX_PACKET_SIZE] = [0; CCP_MAX_PACKET_SIZE];
let mut ret = ctx.mk_client_hello(&mut buf,
PUBLICKEY, SECRETKEY,
... | rust_cleaned_test_functions.jsonl/100572 | {
"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,
8179,
96724,
368,
341,
286,
1077,
5206,
5635,
25,
75921,
1972,
284,
75921,
1972,
486,
931,
543,
286,
1077,
5206,
6607,
25,
508,
84,
23,
26,
75921,
6806,
40328,
4098,
60,
284,
508,
15,
26,
7592... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_browserdll_romfs_iter() {
println!("NCA test...");
let keyset = key::Keyset::from(File::open("prod.keys").unwrap()).unwrap();
for entry in read_dir("registered").unwrap() {
if let Ok(dir_entry) = entry {
println!("Reading system NCA: {:?}", d... | rust_cleaned_test_functions.jsonl/80666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53414,
67159,
81383,
3848,
11723,
368,
341,
286,
13751,
17223,
45,
5049,
1273,
93047,
286,
1077,
1376,
746,
284,
1376,
486,
1592,
746,
486,
1499,
19821,
486,
2508,
445,
19748,
9123,
1827,
15454,
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... | 9 |
#[test]
fn test_tokenize_backtrack() {
let mut iter = Tokenizer::from_str("abc;");
assert_eq!(iter.next(), Some("abc"));
assert_eq!(iter.next(), Some(";"));
iter.backtrack();
assert_eq!(iter.next(), Some(";"));
assert_eq!(iter.next(), None);
} | rust_cleaned_test_functions.jsonl/37566 | {
"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,
86508,
3895,
13131,
368,
341,
286,
1077,
5206,
5367,
284,
9660,
3135,
486,
1499,
2895,
445,
13683,
34649,
286,
2060,
10714,
10297,
2015,
4529,
1507,
4329,
445,
13683,
4010,
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_ElfMut_from_hdr_15_bytes() {
let mut buf = ELF32_DYNAMIC_ELF_HDR.clone();
let elf: Result<ElfMut<'_, LittleEndian, Elf32>, ElfError> =
ElfMut::try_from(&mut buf[0 .. 15]);
assert!(elf.is_err());
assert_eq!(elf.err(), Some(ElfError::TooShort));
} | rust_cleaned_test_functions.jsonl/119503 | {
"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,
2089,
11008,
51440,
5673,
28238,
62,
16,
20,
12524,
368,
341,
262,
1077,
5206,
6607,
284,
72568,
18,
17,
57356,
2089,
22609,
55765,
15997,
543,
262,
1077,
40745,
25,
5714,
27,
75832,
51440,
18291,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_base_36() {
fn test(n: u64) {
assert_eq!(Ok(n), u64::from_str_radix(&encode_base_36(n)[..], 36));
}
test(0);
test(1);
test(35);
test(36);
test(37);
test(u64::max_value());
for i in 0 .. 1_000 {
test(i * 983);
}
} | rust_cleaned_test_functions.jsonl/21672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
7651,
62,
18,
21,
368,
341,
262,
5168,
1273,
1445,
25,
575,
21,
19,
8,
341,
286,
2060,
10714,
10297,
11578,
1445,
701,
575,
21,
19,
486,
1499,
2895,
39764,
941,
2099,
6180,
7651,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_remove_item() {
let mut v = vec![1, 2, 3, 4, 5, 4, 3];
let count = v.remove_every(&3);
assert_eq!(v, vec![1, 2, 4, 5, 4]);
assert_eq!(count, 2);
let count = v.remove_every(&4);
assert_eq!(v, vec![1, 2, 5]);
assert_eq!(count, 2);
let count = v.remove_every(&9);... | rust_cleaned_test_functions.jsonl/95400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18193,
5634,
368,
341,
262,
1077,
5206,
348,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
19,
11,
220,
18,
935,
262,
1077,
1760,
284,
348,
4850... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signature_with_docs_impl() {
let (desc, param) = get_signature(
r#"
struct addr;
impl addr {
/// Adds one to the number given.
///
/// # Examples
///
/// ```
/// let five = 5;
///
/// assert_eq!(6, my_crate::add_one(5));
/// ```
pub fn add_o... | rust_cleaned_test_functions.jsonl/75859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15246,
39859,
6615,
49692,
21007,
368,
341,
262,
1077,
320,
8614,
11,
1685,
8,
284,
633,
39859,
1006,
286,
435,
2,
698,
1235,
10789,
280,
6383,
10789,
341,
262,
1048,
24475,
825,
311,
279,
1372,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expect_one_one() {
assert_eq!(1i, SmallVector::one(1i).expect_one(""));
assert_eq!(1i, SmallVector::many(vec!(1i)).expect_one(""));
} | rust_cleaned_test_functions.jsonl/52129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68918,
11667,
11667,
368,
341,
286,
2060,
10714,
10297,
16,
72,
11,
14994,
3781,
486,
603,
7,
16,
72,
568,
17119,
11667,
89744,
286,
2060,
10714,
10297,
16,
72,
11,
14994,
3781,
486,
34576,
2559... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prototype_get2() {
test(
"var a = {};a.prototype.b = 1;a.prototype.b",
"var a = {};a.prototype.b = 1",
);
} | rust_cleaned_test_functions.jsonl/409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
22357,
4156,
3062,
17,
368,
341,
262,
1273,
1006,
286,
330,
947,
264,
284,
52166,
64,
6003,
948,
284,
220,
16,
48222,
6003,
948,
756,
286,
330,
947,
264,
284,
52166,
64,
6003,
948,
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 |
#[test]
fn test_dedupe() {
assert::pass(
r#"
assert_eq(dedupe([1,2,3]), [1,2,3])
assert_eq(dedupe([1,2,3,2,1]), [1,2,3])
a = [1]
b = [1]
assert_eq(dedupe([a,b,a]), [a,b])
"#,
);
} | rust_cleaned_test_functions.jsonl/37708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
55101,
375,
368,
341,
286,
2060,
486,
6385,
1006,
310,
435,
2,
698,
2207,
10714,
1500,
55101,
375,
2561,
16,
11,
17,
11,
18,
9719,
508,
16,
11,
17,
11,
18,
2546,
2207,
10714,
1500,
5510... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_parses() {
assert_no_parse!("*&_/*)()");
assert_no_parse!("/json");
assert_no_parse!("text/");
assert_no_parse!("text//");
assert_no_parse!("/");
assert_no_parse!("*/");
assert_no_parse!("/*");
assert_no_parse!("///");
a... | rust_cleaned_test_functions.jsonl/128659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
77113,
288,
368,
341,
286,
2060,
6536,
21039,
17223,
66100,
62,
1057,
8,
45961,
286,
2060,
6536,
21039,
0,
4283,
2236,
797,
286,
2060,
6536,
21039,
17223,
1318,
49897,
286,
2060,
6536,
2103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_sequence() {
let entry_head = default_head();
let entry_body = default_body();
let invalid_sequences = vec!["][", "[]", "><", "<>", "]username[", ">tab<"];
for sequence in invalid_sequences {
let _ = AutoTypeSequenceParser::parse_sequen... | rust_cleaned_test_functions.jsonl/67302 | {
"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,
21039,
31433,
23735,
368,
341,
286,
1077,
4343,
13138,
284,
1638,
13138,
543,
286,
1077,
4343,
14114,
284,
1638,
14114,
1428,
286,
1077,
8318,
58732,
284,
7486,
0,
1183,
1457,
497,
330,
1294,
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_types() {
let s0 = Atom::from_slice("");
assert!(s0.get_type_and_inline_len() == (Static, 0));
let s1 = Atom::from_slice("id");
assert!(s1.get_type_and_inline_len() == (Static, 0));
let i0 = Atom::from_slice("z");
assert!(i0.get_type_and_inline_l... | rust_cleaned_test_functions.jsonl/15250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 596
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9763,
368,
341,
286,
1077,
274,
15,
284,
39516,
486,
1499,
26488,
13056,
286,
2060,
10297,
82,
15,
670,
1819,
8378,
41871,
6043,
368,
621,
320,
11690,
11,
220,
15,
3237,
286,
1077,
274,
16,
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_solve_n_queens() {
let test_cases = vec![
(1, vec![vec!["Q"]]),
(3, vec![]),
(4, vec![
vec![
".Q..",
"...Q",
"Q...",
"..Q.",
],
... | rust_cleaned_test_functions.jsonl/120788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86246,
1089,
47342,
724,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
16,
11,
7486,
20703,
4083,
0,
1183,
48,
1341,
17036,
310,
320,
18,
11,
7486,
0,
1294,
1326,
310,
320,
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... | 2 |
#[test]
fn test_timestamps_with_different_fractional_second_precision_are_not_equal() -> IonResult<()> {
let builder = Timestamp::with_ymd_hms(2021, 2, 5, 16, 43, 51);
let timestamp1 = builder
.clone()
.with_milliseconds(192)
.build_at_offset(5 * 60)?;
... | rust_cleaned_test_functions.jsonl/13955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
82,
6615,
82741,
59023,
278,
29644,
54618,
56855,
7913,
11478,
368,
1464,
44805,
2077,
71698,
341,
286,
1077,
7363,
284,
32758,
486,
4197,
62,
1600,
67,
1523,
1011,
7,
17,
15,
17,
16,
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... | 3 |
#[test]
fn test_vector_1() {
let secp = Secp256k1::new();
let seed = "000102030405060708090a0b0c0d0e0f".from_hex().unwrap();
// m
test_path(&secp, Bitcoin, &seed, &[],
"xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGt... | rust_cleaned_test_functions.jsonl/21599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1633
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
16,
368,
341,
286,
1077,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
1077,
10320,
284,
330,
15,
15,
15,
16,
15,
17,
15,
18,
15,
19,
15,
20,
15,
21,
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_create_duplicate_fails(){
use settings;
init!("ledger");
let did = settings::get_config_value(settings::CONFIG_INSTITUTION_DID).unwrap();
let data = r#"["address1","address2","zip","city","state"]"#.to_string();
let schema_name: String = rand::thread_rng(... | rust_cleaned_test_functions.jsonl/29695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
70434,
761,
6209,
3032,
286,
990,
5003,
280,
286,
2930,
17223,
50704,
797,
286,
1077,
1521,
284,
5003,
486,
455,
5332,
3142,
23369,
486,
24652,
2158,
25765,
28617,
1557,
915,
568,
15454,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_tolerance() {
assert!(
GaussianMixtureModel::params(1)
.with_tolerance(0.)
.fit(&DatasetBase::from(array![[0.]]))
.is_err(),
"tolerance must be strictly positive"
);
} | rust_cleaned_test_functions.jsonl/10373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
92069,
368,
341,
286,
2060,
33673,
310,
48568,
44,
12735,
1712,
486,
3519,
7,
16,
340,
394,
659,
4197,
92069,
7,
15,
28175,
394,
659,
6276,
2099,
33363,
3978,
486,
1499,
6110,
0,
15505,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debugging_options_tracking_hash() {
let reference = Options::default();
let mut opts = Options::default();
// Make sure the changing an [UNTRACKED] option leaves the hash unchanged
opts.debugging_opts.verbose = true;
assert_eq!(reference.dep_tracking_hash... | rust_cleaned_test_functions.jsonl/73110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2969
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
3173,
8743,
66105,
8950,
368,
341,
286,
1077,
5785,
284,
14566,
486,
2258,
543,
286,
1077,
5206,
12185,
284,
14566,
486,
2258,
1428,
286,
442,
7405,
2704,
279,
10018,
458,
508,
1861,
88872,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_transaction_for_nonce_missing_ix_pubkey_fail() {
let (bank, _mint_keypair, custodian_keypair, nonce_keypair) =
setup_nonce_with_bank(10_000_000, |_| {}, 5_000_000, 250_000, None).unwrap();
let custodian_pubkey = custodian_keypair.pubkey();
let nonce_pubk... | rust_cleaned_test_functions.jsonl/87322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
28884,
5478,
48508,
40447,
62686,
34014,
792,
22121,
368,
341,
286,
1077,
320,
17033,
11,
716,
67791,
3097,
12670,
11,
16564,
63849,
3097,
12670,
11,
39676,
3097,
12670,
8,
4035,
310,
6505,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interpolate() {
let mut rng = rand::thread_rng();
for deg in 0..5 {
println!("deg = {}", deg);
let comm = Poly::random(deg, &mut rng).commitment();
let mut values = Vec::new();
let mut x = 0;
for _ in 0..=deg {
... | rust_cleaned_test_functions.jsonl/30563 | {
"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,
15318,
45429,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
369,
5254,
304,
220,
15,
496,
20,
341,
310,
13751,
17223,
16508,
284,
24689,
5254,
317,
310,
1077,
1063,
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_index() {
let s = rvec![1, 2, 3, 4, 5];
assert_eq!(s.index(0), &1);
assert_eq!(s.index(4), &5);
assert_eq!(s.index(..2), rvec![1, 2]);
assert_eq!(s.index(1..2), rvec![2]);
assert_eq!(s.index(3..), rvec![4, 5]);
} | rust_cleaned_test_functions.jsonl/27984 | {
"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,
3560,
368,
341,
286,
1077,
274,
284,
435,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
2060,
10714,
10297,
82,
5154,
7,
15,
701,
609,
16,
317,
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_serial_raw_input() {
let intr_evt = EventFd::new(libc::EFD_NONBLOCK).unwrap();
let serial_out = SharedBuffer::new();
let mut serial = Serial::new_out(intr_evt.try_clone().unwrap(), Box::new(serial_out));
assert!(intr_evt.write(1).is_ok());
... | rust_cleaned_test_functions.jsonl/37133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
16067,
5898,
368,
341,
286,
1077,
10582,
60019,
284,
3665,
74476,
486,
931,
44828,
66,
486,
36,
14596,
22128,
39964,
568,
15454,
543,
286,
1077,
6146,
6068,
284,
16990,
4095,
486,
931,
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_object_typename() {
let doc = r#"
{
human(id: "1000") {
__typename
}
}"#;
let database = Database::new();
let schema = RootNode::new(&database, EmptyMutation::<Database>::new());
assert_eq!(
::execute(doc, None, &sc... | rust_cleaned_test_functions.jsonl/35474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
42111,
1840,
368,
341,
262,
1077,
4629,
284,
435,
2,
698,
286,
341,
310,
3738,
3724,
25,
330,
16,
15,
15,
15,
899,
341,
394,
1304,
9031,
198,
310,
456,
286,
335,
57676,
280,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_greatest_time() {
let cases = vec![
(vec![None, None], None),
(
vec![
Some(b"2012-12-12 12:00:39".to_owned().to_vec()),
Some(b"2012-12-24 12:00:39".to_owned().to_vec()),
None,
... | rust_cleaned_test_functions.jsonl/75990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
11175,
3009,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
4083,
20703,
4064,
11,
2240,
1125,
2240,
1326,
310,
2399,
394,
7486,
90515,
503,
4329,
1883,
1,
17,
15,
16,
17,
12,
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... | 2 |
#[test]
fn test_leading_slash() {
let file = build_ignore("/*.c");
assert!(file.is_excluded(&base_dir().join("cat-file.c")));
assert!(!file.is_excluded(&base_dir().join("mozilla-sha1").join("sha1.c")));
} | rust_cleaned_test_functions.jsonl/9287 | {
"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,
11751,
2228,
11886,
988,
368,
341,
286,
1077,
1034,
284,
1936,
58493,
445,
23540,
66,
3071,
286,
2060,
10297,
1192,
2079,
2702,
10181,
2099,
3152,
4334,
1005,
5987,
445,
4616,
14203,
520,
17621,
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_version() {
// We don't make assertions about the build SHA because caching in CI can
// cause the test binary and `materialized` to have different embedded SHAs.
let expected_version = materialized::BUILD_INFO.version;
assert!(!expected_version.is_empty());
cmd()
.ar... | rust_cleaned_test_functions.jsonl/115541 | {
"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,
9438,
368,
341,
262,
442,
1205,
1513,
944,
1281,
54836,
911,
279,
1936,
21721,
1576,
47430,
304,
20694,
646,
198,
262,
442,
5240,
279,
1273,
7868,
323,
1565,
8243,
1506,
63,
311,
614,
2155,
2286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negation() {
let bp = EdwardsPoint::basepoint();
let minus_bp = -&bp;
let maybe_neutral = &bp + &minus_bp;
assert_eq!(maybe_neutral, EdwardsPoint::neutral_element());
} | rust_cleaned_test_functions.jsonl/36539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
367,
368,
341,
286,
1077,
26685,
284,
36763,
2609,
486,
3152,
2768,
543,
286,
1077,
27283,
57106,
284,
481,
5,
17808,
280,
286,
1077,
7196,
13925,
14253,
284,
609,
17808,
488,
609,
38365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pop_value_failure() {
let size = 1;
let mut stack = super::Stack::init(size);
let poppped = match stack.pop() {
Some(val) => val,
None => String::from("")
};
assert_eq!(poppped, String::from(""));
} | rust_cleaned_test_functions.jsonl/70596 | {
"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,
17061,
3142,
43618,
368,
341,
262,
1077,
1379,
284,
220,
16,
280,
262,
1077,
5206,
5611,
284,
2256,
486,
4336,
486,
2327,
6856,
317,
262,
1077,
2420,
6924,
284,
2432,
5611,
8288,
368,
341,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_state_proof() {
let (mock_db, client, _runtime) = create_database_client_and_runtime();
let version = mock_db.version;
let proof = client.get_state_proof(version).unwrap().into_inner();
let li: LedgerInfoWithSignatures = bcs::from_bytes(&proof.ledger_info_with_signatures).un... | rust_cleaned_test_functions.jsonl/102716 | {
"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,
3062,
4387,
86757,
368,
341,
262,
1077,
320,
16712,
8685,
11,
2943,
11,
716,
22255,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
1077,
2319,
284,
7860,
8685,
19484,
280,
262,
1077,
11064,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonce_chaining() {
let (mut connected_peer, _remote_peer) = setup_peers();
let message = Vec::<u8>::from_hex("68656c6c6f").unwrap();
let encrypted_message = connected_peer.encrypt_buf(&message).unwrap();
assert_eq!(encrypted_message, Vec::<u8>::from_hex("cf2b30dd... | rust_cleaned_test_functions.jsonl/39155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48508,
4138,
2056,
368,
341,
286,
1077,
320,
6984,
8433,
45159,
11,
716,
18147,
45159,
8,
284,
6505,
36367,
388,
543,
286,
1077,
1943,
284,
11312,
27638,
84,
23,
6831,
1499,
32655,
445,
21,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status_code() {
assert_eq!(StatusCode::Continue.raw(), b"100");
assert_eq!(StatusCode::OK.raw(), b"200");
assert_eq!(StatusCode::NoContent.raw(), b"204");
assert_eq!(StatusCode::BadRequest.raw(), b"400");
assert_eq!(StatusCode::NotFound.raw(), b"404");
... | rust_cleaned_test_functions.jsonl/33881 | {
"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,
4773,
4136,
368,
341,
286,
2060,
10714,
10297,
15872,
486,
23526,
18152,
1507,
293,
1,
16,
15,
15,
797,
286,
2060,
10714,
10297,
15872,
486,
3925,
18152,
1507,
293,
1,
17,
15,
15,
797,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_package_txs_with_deps() {
let (_, _, always_success_script) = always_success_cell();
let always_success_tx = create_always_success_tx();
let issue_tx = TransactionBuilder::default()
.input(CellInput::new(OutPoint::null(), 0))
.output(
CellOutputBuilder::de... | rust_cleaned_test_functions.jsonl/70032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1970
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26328,
17805,
82,
6615,
76489,
368,
341,
262,
1077,
39464,
8358,
2677,
18632,
14660,
8,
284,
2677,
18632,
16648,
543,
262,
1077,
2677,
18632,
17805,
284,
1855,
8418,
2284,
18632,
17805,
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... | 7 |
#[test]
fn test_prepare_but_rollback() {
let mut schema_builder = schema::Schema::builder();
let text_field = schema_builder.add_text_field("text", schema::TEXT);
let index = Index::create_in_ram(schema_builder.build());
{
// writing the segment
let mut i... | rust_cleaned_test_functions.jsonl/58889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
86874,
62,
33559,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
497,
10802,
486,
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... | 3 |
#[test]
fn test_shorten_ray_left() {
let rect = Rect::new(2, 3, 2, 2);
let mut segment = Segment {
point: (0., 3.),
vector: Vector2D { x: 4., y: 0. },
};
let side = shorten_ray(&mut segment, &rect);
assert_eq!(side, Some(CollisionSide::Left));
... | rust_cleaned_test_functions.jsonl/110314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
268,
72690,
9579,
368,
341,
286,
1077,
7608,
284,
11920,
486,
931,
7,
17,
11,
220,
18,
11,
220,
17,
11,
220,
17,
317,
286,
1077,
5206,
10238,
284,
37103,
341,
310,
1459,
25,
320,
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_prevote_with_check_quorum() {
setup_for_test();
let bootstrap = |id| {
let mut cfg = new_test_config(id, vec![1, 2, 3], 10, 1);
cfg.pre_vote = true;
cfg.check_quorum = true;
let mut raft = Raft::new(&cfg, new_storage()).unwrap();
raft.become_follow... | rust_cleaned_test_functions.jsonl/107193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 991
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25566,
1272,
6615,
7200,
11280,
33006,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
26925,
284,
760,
307,
91,
341,
286,
1077,
5206,
13286,
284,
501,
4452,
5332,
3724,
11,
7486,
20703,
16,
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_benchmark_update() {
let mut b = Benchmark {
p_init: 100,
p_instant: 0,
iterations: 0,
mining_start_time: 0,
challenge_time_last: 0,
};
// Normal
assert!(b.update(100, 1000, 90).is_ok());
assert_eq!(
b,
Benchmark {
p_init: 100,
p_instant: 60,
... | rust_cleaned_test_functions.jsonl/86891 | {
"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,
880,
39381,
8882,
368,
341,
298,
10217,
5206,
293,
284,
61622,
341,
571,
3223,
6137,
25,
220,
16,
15,
15,
345,
571,
3223,
1243,
4706,
25,
220,
15,
345,
571,
197,
67584,
25,
220,
15,
345,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_lenght_not_16_gives_error() {
let bad_key = Some("13579BDF");
assert!(verify_key(bad_key).is_err());
} | rust_cleaned_test_functions.jsonl/39160 | {
"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,
3097,
907,
70078,
7913,
62,
16,
21,
1889,
1886,
4096,
368,
341,
286,
1077,
3873,
3097,
284,
4329,
445,
16,
18,
20,
22,
24,
33,
5262,
797,
286,
2060,
10297,
12446,
3097,
1883,
329,
3097,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_lmdb_kvstore() {
let database_name = "test_lmdb_kvstore"; // Note: every test should have unique database
{
let datastore = init_datastore(database_name).unwrap();
let db = datastore.get_handle(database_name).unwrap();
let db = LMDBWrapper::new... | rust_cleaned_test_functions.jsonl/89968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
78127,
97066,
4314,
368,
341,
286,
1077,
4625,
1269,
284,
330,
1944,
907,
78127,
97066,
4314,
5123,
442,
7036,
25,
1449,
1273,
1265,
614,
4911,
4625,
198,
286,
341,
310,
1077,
64986,
284,
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_recvmmsg_timestampns() {
use nix::sys::socket::*;
use nix::sys::uio::IoVec;
use nix::sys::time::*;
use std::time::*;
// Set up
let message = "Ohayō!".as_bytes();
let in_socket = socket(
AddressFamily::Inet,
SockType::Datagram,
SockFlag::empty(... | rust_cleaned_test_functions.jsonl/134667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 817
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
7338,
3236,
23073,
4412,
368,
341,
262,
990,
308,
941,
486,
7791,
486,
9556,
56162,
262,
990,
308,
941,
486,
7791,
486,
84,
815,
486,
42799,
10050,
280,
262,
990,
308,
941,
486,
7791,
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... | 2 |
#[test]
fn test_enum() {
assert!(display("enum { A, B = 2, C };").contains("enum { A, B = 2, C }"));
assert!(display("enum E { A, B = 2, C };").contains("enum E "));
assert!(decl("enum;").is_ok());
} | rust_cleaned_test_functions.jsonl/80713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
286,
2060,
10297,
5493,
445,
9018,
314,
362,
11,
425,
284,
220,
17,
11,
356,
20066,
1827,
13372,
445,
9018,
314,
362,
11,
425,
284,
220,
17,
11,
356,
335,
4010,
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... | 1 |
#[test]
fn test_parsing_on_multiple_threads() {
// Parse this source file so that each thread has a non-trivial amount of
// work to do.
let this_file_source = include_str!("parser_test.rs");
let mut parser = Parser::new();
parser.set_language(get_language("rust")).unwrap();
let tree = ... | rust_cleaned_test_functions.jsonl/7388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 866
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
4470,
45233,
29725,
368,
341,
262,
442,
14775,
419,
2530,
1034,
773,
429,
1817,
4516,
702,
264,
2477,
10188,
26658,
3311,
315,
198,
262,
442,
975,
311,
653,
624,
262,
1077,
419,
2458... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_field_table() {
let mut table = FieldTable::default();
table.insert("test".into(), AMQPValue::LongString("test".into()));
table.insert("tt".into(), AMQPValue::Void);
assert_eq!(
parse_field_table(&[0, 0, 0, 0][..]),
Ok((EMPTY, FieldTa... | rust_cleaned_test_functions.jsonl/25464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5013,
5237,
368,
341,
286,
1077,
5206,
1965,
284,
8601,
2556,
486,
2258,
543,
286,
1965,
7030,
445,
1944,
3263,
18122,
1507,
6769,
66520,
1130,
486,
6583,
703,
445,
1944,
3263,
18122,
7392,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_print() {
let mut vm = VM::new();
let mut context = Context::default();
let p = interpreter::InterpreterParser::new();
let o = p.parse(1, &mut vm, &mut context, "print flags");
assert!(o.is_ok());
assert_eq!(o.unwrap(), State::PRINT);
let o = p.parse(1, &mut vm, &mu... | rust_cleaned_test_functions.jsonl/43504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
368,
341,
262,
1077,
5206,
10995,
284,
17792,
486,
931,
543,
262,
1077,
5206,
2266,
284,
9608,
486,
2258,
543,
262,
1077,
281,
284,
39299,
486,
58426,
6570,
486,
931,
1428,
262,
1077,
297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boxed_source() {
let source = Box::new(io::Error::new(io::ErrorKind::Other, "oh no!"));
let error = BoxedSource { source };
error.source().unwrap().downcast_ref::<io::Error>().unwrap();
} | rust_cleaned_test_functions.jsonl/42665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10194,
291,
10347,
368,
341,
262,
1077,
2530,
284,
8261,
486,
931,
37258,
486,
1454,
486,
931,
37258,
486,
1454,
10629,
486,
11409,
11,
330,
2267,
902,
0,
4010,
262,
1077,
1465,
284,
8261,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_post() {
let mut buf = BytesMut::from("POST /test2 HTTP/1.0\r\n\r\n");
let mut reader = MessageDecoder::<Request>::default();
let (req, _) = reader.decode(&mut buf).unwrap().unwrap();
assert_eq!(req.version(), Version::HTTP_10);
assert_eq!(*req.meth... | rust_cleaned_test_functions.jsonl/22259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6333,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
445,
2946,
608,
1944,
17,
10130,
14,
16,
13,
15,
12016,
1699,
12016,
1699,
3071,
286,
1077,
5206,
6604,
284,
4856,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_persistent_pool_path_is_cleanedup_after_tests() {
let tmp =
ic_test_utilities::artifact_pool_config::with_test_rocksdb_pool_config(|config| {
let path = config.persistent_pool_validated_persistent_db_path.clone();
let rb_ops = random_beacon_ops... | rust_cleaned_test_functions.jsonl/24996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
13931,
15709,
2638,
6892,
19573,
291,
454,
19844,
32509,
368,
341,
286,
1077,
4174,
4035,
310,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
26608,
14553,
1999,
15709,
5332,
224... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_slots_are_valid_vote_empty_slot_hashes() {
let vote_state = VoteState::default();
let vote = Vote::new(vec![0], Hash::default());
assert_eq!(
vote_state.check_slots_are_valid(&vote, &[]),
Err(VoteError::VoteTooOld)
);
} | rust_cleaned_test_functions.jsonl/43740 | {
"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,
7200,
54161,
56855,
8337,
54360,
15124,
27563,
91616,
368,
341,
286,
1077,
6910,
4387,
284,
34034,
1397,
486,
2258,
1428,
286,
1077,
6910,
284,
34034,
486,
931,
25592,
20703,
15,
1125,
6531,
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_tokenize_delimiters() {
let mut iter = Tokenizer::from_str(",;{}()=");
assert_eq!(iter.next(), Some(","));
assert_eq!(iter.next(), Some(";"));
assert_eq!(iter.next(), Some("{"));
assert_eq!(iter.next(), Some("}"));
assert_eq!(iter.next(), Some("(")... | rust_cleaned_test_functions.jsonl/37563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
18029,
67645,
368,
341,
286,
1077,
5206,
5367,
284,
9660,
3135,
486,
1499,
2895,
12918,
26,
6257,
368,
45219,
286,
2060,
10714,
10297,
2015,
4529,
1507,
4329,
12918,
4010,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_meta_github_ssh() {
let (actual_uri, user, repo) = meta("git@github.com:denisidoro/navi.git");
assert_eq!(actual_uri, "git@github.com:denisidoro/navi.git".to_string());
assert_eq!(user, "denisidoro".to_string());
assert_eq!(repo, "navi".to_string());
} | rust_cleaned_test_functions.jsonl/30119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13381,
1889,
3827,
82805,
368,
341,
286,
1077,
320,
11944,
15572,
11,
1196,
11,
15867,
8,
284,
8823,
445,
12882,
31,
5204,
905,
25,
5183,
285,
307,
18307,
68236,
72,
32799,
797,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_day_7() {
let input = input();
assert_eq!(part_1(&input), "dgoocsw");
assert_eq!(part_2(&input), 1275);
} | rust_cleaned_test_functions.jsonl/44087 | {
"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,
16763,
62,
22,
368,
341,
286,
1077,
1946,
284,
1946,
543,
286,
2060,
10714,
10297,
4480,
62,
16,
2099,
1355,
701,
330,
67,
3346,
509,
2280,
797,
286,
2060,
10714,
10297,
4480,
62,
17,
2099,
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 |
#[test]
fn test_add_datetime_and_string() {
let mut ctx = EvalContext::default();
let cases = vec![
// null cases
(None, None, None),
(None, Some("11:30:45.123456"), None),
(Some("2019-01-01 01:00:00"), None, None),
// normal cases
... | rust_cleaned_test_functions.jsonl/36245 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 941
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
28943,
8378,
3904,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
5048,
284,
7486,
90515,
310,
442,
845,
5048,
198,
310,
320,
4064,
11,
2240,
11,
2240,
1326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_once() -> io::Result<()> {
let mut reader = make_reader(vec![vec![1, 2, 3, 4]]);
let out = do_read(&mut reader, 4)?;
assert_eq!(out, vec![1, 2, 3, 4]);
Ok(())
} | rust_cleaned_test_functions.jsonl/8706 | {
"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,
6443,
7630,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
6604,
284,
1281,
22306,
25592,
20703,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
49854,
286,
1077,
700,
284,
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... | 2 |
#[test]
fn test_args() {
let url = "foo.cm";
let mut expected_args = Args { test_url: url.to_string(), ..Default::default() };
expected_args.test_url = url.to_string();
let args = Args::from_args(&["cmd"], &[url]).unwrap();
assert_eq!(args, expected_args);
let a... | rust_cleaned_test_functions.jsonl/90828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
368,
341,
286,
1077,
2515,
284,
330,
7975,
53046,
876,
286,
1077,
5206,
3601,
8384,
284,
17693,
314,
1273,
2903,
25,
2515,
2389,
3904,
1507,
5241,
3675,
486,
2258,
368,
2605,
286,
3601,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_counting_writer() {
let buffer: Vec<u8> = vec![];
let mut counting_writer = CountingWriter::wrap(buffer);
let bytes = (0u8..10u8).collect::<Vec<u8>>();
counting_writer.write_all(&bytes).unwrap();
let (w, len): (Vec<u8>, u64) = counting_writer.finish().unwr... | rust_cleaned_test_functions.jsonl/47138 | {
"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,
3180,
287,
28908,
368,
341,
286,
1077,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
0,
15078,
286,
1077,
5206,
25009,
28908,
284,
4504,
287,
6492,
486,
10097,
12584,
317,
286,
1077,
5820,
284,
320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flush_wal() {
let path = tempdir_with_prefix("_rust_rocksdb_test_flush_wal");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
opts.manual_wal_flush(true);
let db = DB::open(opts, path.path().to_str().unwrap()).unwrap();
db.put(b"key", b"value").unwrap();
... | rust_cleaned_test_functions.jsonl/34093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39213,
1670,
278,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
4452,
39213,
1670,
278,
797,
262,
1077,
5206,
12185,
284,
5952,
3798,
486,
931,
543,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_unquote() {
let cases = vec![
(None, None, true),
(Some(r#"""#), Some(r#"""#), true),
(Some(r"a"), Some("a"), true),
(Some(r#""3"#), Some(r#""3"#), true),
(Some(r#"{"a": "b"}"#), Some(r#"{"a": "b"}"#), true),
... | rust_cleaned_test_functions.jsonl/95855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
4907,
2949,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
11,
830,
1326,
310,
320,
8373,
2601,
2,
12599,
2,
701,
4329,
2601,
2,
12599,
2,
701,
830,
1326,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_successful_update_triggers_reboot() {
let mut pool = LocalPool::new();
let spawner = pool.spawner();
let response = json!({"response":{
"server": "prod",
"protocol": "3.0",
"app": [{
"appid": "{00000000-0000-0000-0000-00000000000... | rust_cleaned_test_functions.jsonl/59710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92951,
8882,
3547,
21385,
1288,
4619,
368,
341,
286,
1077,
5206,
7314,
284,
8774,
10551,
486,
931,
543,
286,
1077,
978,
67193,
284,
7314,
8572,
67193,
1428,
286,
1077,
2033,
284,
2951,
0,
16864,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_device() {
let mut device = Device::new("test", 1, false);
let repo = Repo::new("test.db");
repo.assure_created().unwrap();
let inserted = repo.add_device(&mut device);
assert!(inserted.is_ok());
device.current_state = true;
let update_result = repo.update... | rust_cleaned_test_functions.jsonl/48630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
9204,
368,
341,
262,
1077,
5206,
3671,
284,
13903,
486,
931,
445,
1944,
497,
220,
16,
11,
895,
626,
262,
1077,
15867,
284,
71509,
486,
931,
445,
1944,
7076,
797,
262,
15867,
13,
395,
552... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_earliest_available_bus_and_wait_time() {
let input = Input {
earliest_arrival_timestamp: 939,
busses: notes_to_busses("7,13,x,x,59,x,31,19")
};
let (bus, wait_time) = input.get_earliest_available_bus_and_wait_time();
assert_eq!(bus.id, 59);
assert_eq!(wait... | rust_cleaned_test_functions.jsonl/77202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
62,
682,
23138,
26962,
25418,
8378,
18760,
3009,
368,
341,
262,
1077,
1946,
284,
5571,
341,
286,
29658,
11210,
3936,
23073,
25,
220,
24,
18,
24,
345,
286,
293,
82872,
25,
8388,
2346,
880,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert() {
let now = Instant::now();
let name = Query::query(Name::from_str("www.example.com.").unwrap(), RecordType::A);
let ips_ttl = vec![(RData::A(Ipv4Addr::new(127, 0, 0, 1)), 1)];
let ips = vec![RData::A(Ipv4Addr::new(127, 0, 0, 1))];
let mut lru = D... | rust_cleaned_test_functions.jsonl/89626 | {
"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,
368,
341,
286,
1077,
1431,
284,
18058,
486,
3328,
543,
286,
1077,
829,
284,
11361,
486,
1631,
21182,
486,
1499,
2895,
445,
2136,
7724,
905,
98401,
15454,
1507,
13583,
929,
486,
32,
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_proc_cached_result() {
assert!(proc_cached_result(2).is_ok());
assert!(proc_cached_result(4).is_ok());
assert!(proc_cached_result(6).is_err());
assert!(proc_cached_result(6).is_err());
assert!(proc_cached_result(2).is_ok());
assert!(proc_cached_result(4).is_ok());
{
... | rust_cleaned_test_functions.jsonl/13132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24436,
64369,
5287,
368,
341,
262,
2060,
10297,
15782,
64369,
5287,
7,
17,
568,
285,
19817,
1423,
262,
2060,
10297,
15782,
64369,
5287,
7,
19,
568,
285,
19817,
1423,
262,
2060,
10297,
15782,
64369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parameter_status() {
const DATA: &[u8] = b"client_encoding\x00UTF8\x00";
let m = ParameterStatus::decode(DATA.into()).unwrap();
assert_eq!(&m.name, "client_encoding");
assert_eq!(&m.value, "UTF8")
} | rust_cleaned_test_functions.jsonl/23365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
24899,
4773,
368,
341,
262,
733,
14112,
25,
44590,
84,
23,
60,
284,
293,
1,
2972,
37613,
3462,
15,
15,
8561,
23,
3462,
15,
15,
3302,
262,
1077,
296,
284,
15168,
2522,
486,
18196,
59093,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_header_string() {
let header = Header::new_with_value("Test".to_string(), "Value".to_string()).unwrap();
let header_value = header.get_value::<String>().unwrap();
assert_eq!(header_value, "Value".to_string());
} | rust_cleaned_test_functions.jsonl/80466 | {
"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,
2346,
8757,
3904,
368,
341,
286,
1077,
4247,
284,
12104,
486,
931,
6615,
3142,
445,
2271,
3263,
983,
3904,
1507,
330,
1130,
3263,
983,
3904,
6011,
15454,
543,
286,
1077,
4247,
3142,
284,
4247,
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 |
#[test]
fn test_throw() {
let engine = Engine::new();
assert!(matches!(
*engine.run("if true { throw 42 }").expect_err("expects error"),
EvalAltResult::ErrorRuntime(s, _) if s.as_int().unwrap() == 42
));
assert!(matches!(
*engine.run(r#"throw"#).expect_err("expects erro... | rust_cleaned_test_functions.jsonl/10813 | {
"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,
72161,
368,
341,
262,
1077,
4712,
284,
8200,
486,
931,
1428,
262,
2060,
10297,
19914,
33673,
286,
353,
8512,
7634,
445,
333,
830,
314,
2510,
220,
19,
17,
335,
1827,
17119,
9266,
445,
37631,
1465... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_case_5() {
let key = [
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00,
];
let message = [0xff; 16];
let expected = [
0x03, 0x00, 0x0... | rust_cleaned_test_functions.jsonl/27920 | {
"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,
19096,
62,
20,
368,
341,
197,
10217,
1376,
284,
2278,
298,
197,
15,
87,
15,
17,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_claim_nft_cell_success() {
let (mut context, tx) =
create_test_context(Action::Update(UpdateCase::Claim), NftError::NoError);
let tx = context.complete_tx(tx);
// run
let cycles = context
.verify_tx(&tx, MAX_CYCLES)
.expect("pass verification");
print... | rust_cleaned_test_functions.jsonl/33575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84969,
1089,
723,
16648,
18632,
368,
341,
262,
1077,
320,
6984,
2266,
11,
9854,
8,
4035,
286,
1855,
4452,
8467,
21905,
486,
4289,
7,
4289,
4207,
486,
45544,
701,
451,
723,
1454,
486,
2753,
1454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.