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_raw_node_restart_from_snapshot() {
let l = default_logger();
let snap = new_snapshot(2, 1, vec![1, 2]);
let entries = vec![new_entry(1, 3, Some("foo"))];
let mut raw_node = {
let store = new_storage();
store.wl().apply_snapshot(snap).unwrap();
store.wl().... | rust_cleaned_test_functions.jsonl/53368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5084,
69392,
5673,
53265,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
10658,
284,
501,
53265,
7,
17,
11,
220,
16,
11,
7486,
20703,
16,
11,
220,
17,
2558,
262,
1077,
1069... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lseek64() {
const CONTENTS: &[u8] = b"abcdef123456";
let mut tmp = tempfile().unwrap();
tmp.write_all(CONTENTS).unwrap();
let tmpfd = tmp.into_raw_fd();
lseek64(tmpfd, 5, Whence::SeekSet).unwrap();
let mut buf = [0u8; 7];
::read_exact(tmpfd, &mut buf);
assert_eq... | rust_cleaned_test_functions.jsonl/8996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
25713,
21,
19,
368,
341,
262,
733,
35768,
50,
25,
44590,
84,
23,
60,
284,
293,
1,
41202,
16,
17,
18,
19,
20,
21,
876,
262,
1077,
5206,
4174,
284,
54819,
1005,
15454,
543,
262,
4174,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_feature_gate() {
let (mut ep, raft_router, _task_rx) = mock_endpoint(&CdcConfig {
min_ts_interval: ReadableDuration(Duration::from_secs(60)),
..Default::default()
});
let _raft_rx = raft_router.add_region(1 /* region id */, 100 /* cap */);
... | rust_cleaned_test_functions.jsonl/41995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17069,
54798,
368,
341,
286,
1077,
320,
6984,
4155,
11,
52455,
55587,
11,
716,
8202,
24330,
8,
284,
7860,
36699,
2099,
34,
7628,
2648,
341,
310,
1308,
25023,
20541,
25,
4457,
480,
12945,
64114,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_accountsdb_squash_one_fork() {
let paths = get_tmp_accounts_path!();
let db = AccountsDB::new(0, &paths.paths);
let key = Pubkey::default();
let account0 = Account::new(1, 0, &key);
db.store(0, &key, &account0);
db.add_fork(1, Some(0));
... | rust_cleaned_test_functions.jsonl/77663 | {
"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,
55665,
1999,
643,
446,
988,
11667,
761,
669,
368,
341,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
2927,
284,
40655,
3506,
486,
931,
7,
15,
11,
609,
21623,
65345,
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_generate_paillier_keypair() {
let (paillier_pk, _) = generate_paillier_keypair();
assert!(NumberTests::bits(&paillier_pk.n) >= PAILLIER_KEY_SIZE - 1);
} | rust_cleaned_test_functions.jsonl/62595 | {
"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,
48851,
55475,
483,
1268,
3097,
12670,
368,
341,
286,
1077,
320,
6595,
483,
1268,
33321,
11,
27439,
284,
6923,
55475,
483,
1268,
3097,
12670,
543,
286,
2060,
10297,
2833,
18200,
486,
11516,
2099,
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 |
#[test]
fn test_get_transactions() {
let (mock_db, client, mut runtime) = create_database_client_and_runtime();
let version = mock_db.get_latest_version().unwrap();
let page = 800usize;
for base_version in (0..version)
.map(u64::from)
.take(page)
.collect::<Vec<_>>()
... | rust_cleaned_test_functions.jsonl/4631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
68182,
368,
341,
262,
1077,
320,
16712,
8685,
11,
2943,
11,
5206,
15592,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
1077,
2319,
284,
7860,
8685,
670,
64880,
9438,
1005,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_fails_when_secure_compare_different_strings() {
let str1 = "same same".as_bytes();
let str2 = "same same but different".as_bytes();
let res = secure_compare(str1, str2);
assert!(!res);
} | rust_cleaned_test_functions.jsonl/45841 | {
"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,
761,
6209,
47636,
73088,
32235,
82741,
33500,
368,
341,
286,
1077,
607,
16,
284,
330,
24063,
1852,
3263,
300,
12524,
543,
286,
1077,
607,
17,
284,
330,
24063,
1852,
714,
2155,
3263,
300,
12524,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ping_find_value() {
let node_table = DummyNodeTable { node: None };
let mut svc: Service<TestsIdType, net::SocketAddr, DummyNodeTable, String> =
Service::new(node_table);
let node = test::new_node(test::make_id(43));
let id1: TestsIdType = test::make_i... | rust_cleaned_test_functions.jsonl/110958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 535
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71661,
21814,
3142,
368,
341,
286,
1077,
2436,
5237,
284,
50567,
1955,
2556,
314,
2436,
25,
2240,
2605,
286,
1077,
5206,
46154,
25,
5362,
27,
18200,
764,
929,
11,
4179,
486,
10286,
13986,
11,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_build_parsed_datetime_timestamp() {
run_test_build_parsed_datetime_timestamp(
"2000-01-02",
ParsedDateTime {
year: Some(DateTimeFieldValue::new(2000, 0)),
month: Some(DateTimeFieldValue::new(1, 0)),
day: Some(DateTim... | rust_cleaned_test_functions.jsonl/100332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
75788,
28943,
23073,
368,
341,
286,
1598,
4452,
20801,
75788,
28943,
23073,
1006,
310,
330,
17,
15,
15,
15,
12,
15,
16,
12,
15,
17,
756,
310,
393,
18112,
7689,
341,
394,
1042,
25,
4329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_less_than() {
let mut machine1 = Machine::new(vec![1107,1,2,5,99,-1]);
machine1.execute().unwrap();
assert_eq!(machine1.mem, vec![1107,1,2,5,99,1]);
let mut machine2 = Machine::new(vec![1107,2,2,5,99,-1]);
machine2.execute().unwrap();
assert_eq!(machine2.mem, vec![1107,2,2,5,99,0]);
} | rust_cleaned_test_functions.jsonl/43087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50747,
51613,
368,
341,
10217,
5206,
5662,
16,
284,
12960,
486,
931,
25592,
20703,
16,
16,
15,
22,
11,
16,
11,
17,
11,
20,
11,
24,
24,
4999,
16,
2558,
2109,
3814,
16,
7769,
1005,
15454,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subnet_new() {
Subnet::new(Ipv4Addr::new([255, 255, 255, 255]), 32).unwrap();
// Prefix exceeds 32 bits
assert_eq!(Subnet::new(Ipv4Addr::new([255, 255, 0, 0]), 33), None);
// Network address has more than top 8 bits set
assert_eq!(Subnet::new(Ipv4Addr::new... | rust_cleaned_test_functions.jsonl/59635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1048
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95681,
5921,
368,
341,
286,
3719,
4711,
486,
931,
8972,
30168,
19,
13986,
486,
931,
2561,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
9719,
220,
18,
17,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deck_next_card() {
let mut deck = Deck::from_input("9 2 6 3 1");
assert_eq!(deck.next_card(), 9);
assert_eq!(deck.next_card(), 2);
assert_eq!(deck.next_card(), 6);
assert_eq!(deck.next_card(), 3);
assert_eq!(deck.next_card(), 1);
assert!(deck.cards.is_empty());
} | rust_cleaned_test_functions.jsonl/25646 | {
"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,
83860,
11257,
16888,
368,
341,
262,
1077,
5206,
9530,
284,
28416,
486,
1499,
5898,
445,
24,
220,
17,
220,
21,
220,
18,
220,
16,
797,
262,
2060,
10714,
10297,
33425,
4529,
16888,
1507,
220,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bytes_in_vbuf() {
use impls::ROIobuf;
let bs = [
ROIobuf::from_str("1234"),
ROIobuf::from_str("5678"),
ROIobuf::from_str("9"),
];
assert_eq!(bytes_in_vbuf(&bs), 9);
assert_eq!(bytes_in_vbuf(&bs[1..]), 5);
assert_eq!(bytes_in_vbuf(&bs[2..]), 1);
} | rust_cleaned_test_functions.jsonl/5460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
1243,
2273,
5909,
368,
341,
220,
990,
11605,
82,
486,
71270,
18464,
401,
220,
1077,
17065,
284,
2278,
262,
50652,
18464,
486,
1499,
2895,
445,
16,
17,
18,
19,
4461,
262,
50652,
18464,
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_is_corner_fast12_12_contiguous_lighter_pixels() {
let image = gray_image!(
00, 00, 10, 10, 10, 00, 00;
00, 10, 00, 00, 00, 10, 00;
10, 00, 00, 00, 00, 00, 00;
10, 00, 00, 00, 00, 00, 00;
10, 00, 00, 00, 00, 00, 00;
0... | rust_cleaned_test_functions.jsonl/114613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
66884,
35743,
16,
17,
62,
16,
17,
10260,
27029,
28663,
261,
49745,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
15,
15,
11,
220,
15,
15,
11,
220,
16,
15,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_router_response_to_router_solicitation_from_unspecified_source() {
/// Get a Router Solicitation ICMPv6 packet buffer.
fn rs_msg(src_ip: Ipv6Addr, dst_ip: Ipv6Addr) -> Buf<Vec<u8>> {
Buf::new(Vec::new(), ..)
.encapsulate(IcmpPacketBuilder::<Ipv6, &[u8]... | rust_cleaned_test_functions.jsonl/82820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4670
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55587,
9655,
2346,
55587,
643,
7762,
7556,
5673,
4907,
53434,
10347,
368,
341,
286,
1048,
2126,
264,
10554,
76194,
7556,
83988,
85,
21,
10151,
4147,
624,
286,
5168,
10036,
6483,
14705,
10385,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_include_bytes_expand() {
check_expansion(
r#"
#[rustc_builtin_macro]
macro_rules! include_bytes {
($file:expr) => {{ /* compiler built-in */ }};
($file:expr,) => {{ /* compiler built-in */ }};
}
i... | rust_cleaned_test_functions.jsonl/112678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37878,
12524,
67875,
368,
341,
286,
1779,
14214,
10501,
1006,
310,
435,
2,
698,
310,
11506,
35788,
66,
73829,
58810,
921,
310,
18072,
21407,
0,
2924,
12524,
341,
394,
1711,
1192,
96011,
8,
589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_batch_values_rep_levels() {
test_read_batch_int32(16, &mut vec![0; 10], None, Some(&mut vec![0; 10]));
test_read_batch_int32(16, &mut vec![0; 16], None, Some(&mut vec![0; 16]));
test_read_batch_int32(16, &mut vec![0; 51], None, Some(&mut vec![0; 51]));
} | rust_cleaned_test_functions.jsonl/64662 | {
"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,
6443,
14534,
9146,
25533,
37819,
368,
341,
286,
1273,
6443,
14534,
4042,
18,
17,
7,
16,
21,
11,
609,
6984,
7486,
20703,
15,
26,
220,
16,
15,
1125,
2240,
11,
4329,
2099,
6984,
7486,
20703,
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_from_arg_matches_fancy() {
let argv = vec!["lsd", "--icon-theme", "fancy"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
assert_eq!(
Some(IconTheme::Fancy),
IconTheme::from_arg_matches(&matches)
);
} | rust_cleaned_test_functions.jsonl/17364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6057,
38344,
761,
6572,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
1924,
33185,
497,
330,
69,
6572,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
1005,
455,
38344,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_github_12546() -> Result<(), Box<dyn Error>> {
mz_ore::test::init_logging();
let config = util::Config::default();
let server = util::start_server(config)?;
server.runtime.block_on(async {
let (client, conn_task) = server.connect_async(tokio_postgres::NoTls).await?;
... | rust_cleaned_test_functions.jsonl/8400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 697
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
3827,
62,
16,
17,
20,
19,
21,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
262,
95392,
62,
460,
486,
1944,
486,
2327,
59982,
543,
262,
1077,
2193,
284,
4094,
486,
2648,
486,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_default_resource() {
let mut app = App::new()
.resource("/test", |r| r.f(|_| HttpResponse::Ok()))
.finish();
let req = TestRequest::with_uri("/test").finish();
let resp = app.run(req);
assert_eq!(resp.as_msg().status(), StatusCode::OK);
... | rust_cleaned_test_functions.jsonl/24266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
17962,
368,
341,
286,
1077,
5206,
906,
284,
1845,
486,
931,
741,
310,
659,
9233,
4283,
1944,
497,
760,
81,
91,
435,
833,
22428,
35395,
17580,
486,
11578,
12145,
310,
659,
30150,
1428,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_char_no_case() {
let mut reader = ParserInput::new("This is a test");
let result = read_char_no_case('t')(&mut reader);
assert_eq!(result, Ok('T'));
let result = read_char_no_case('H')(&mut reader);
assert_eq!(result, Ok('h'));
let result =... | rust_cleaned_test_functions.jsonl/10083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
9232,
6536,
19096,
368,
341,
286,
1077,
5206,
6604,
284,
21102,
2505,
486,
931,
445,
1986,
374,
264,
1273,
3071,
286,
1077,
1102,
284,
1349,
9232,
6536,
19096,
492,
83,
863,
2099,
6984,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_and_format_number() {
assert_eq!(
"%05d"
.parse::<CFormatSpec>()
.unwrap()
.format_number(&BigInt::from(27)),
"00027".to_string()
);
assert_eq!(
"%+05d"
.parse::<CFor... | rust_cleaned_test_functions.jsonl/37688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1093
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8378,
8955,
5500,
368,
341,
286,
2060,
10714,
33673,
310,
5962,
15,
20,
67,
698,
394,
659,
6400,
27638,
34,
4061,
8327,
18949,
394,
659,
15454,
741,
394,
659,
2243,
5500,
2099,
87474,
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_cast_i32_to_f64() {
let a = Int32Array::from(vec![5, 6, 7, 8, 9]);
let array = Arc::new(a) as ArrayRef;
let b = cast(&array, &DataType::Float64).unwrap();
let c = b.as_any().downcast_ref::<Float64Array>().unwrap();
assert!(5.0 - c.value(0) < f64::EPSILON);... | rust_cleaned_test_functions.jsonl/29599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
5318,
18,
17,
2346,
761,
21,
19,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
2558,
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_chi_squared_one() {
let mut chi = ChiSquared::new(1.0);
let mut rng = task_rng();
for _ in range(0, 1000) {
chi.sample(&mut rng);
chi.ind_sample(&mut rng);
}
} | rust_cleaned_test_functions.jsonl/89948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98826,
54641,
11667,
368,
341,
286,
1077,
5206,
25798,
284,
33282,
88294,
486,
931,
7,
16,
13,
15,
317,
286,
1077,
5206,
28422,
284,
3383,
66849,
543,
286,
369,
716,
304,
2088,
7,
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_match_group_in_group() {
let rules = create_rules(
r#"
macro_rules! foo {
{ $( ( $($i:ident)* ) )* } => ( $( ( $($i)* ) )* );
}"#,
);
assert_expansion(MacroKind::Items, &rules, "foo! ( (a b) );", "(a b)");
} | rust_cleaned_test_functions.jsonl/14702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
6288,
1243,
6288,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
314,
4930,
320,
93977,
72,
25,
1713,
4806,
873,
89401,
335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_after_cleanup_range_for_snap() {
let mut cluster = new_server_cluster(1, 3);
configure_for_snapshot(&mut cluster);
configure_for_lease_read(&mut cluster, Some(100), Some(10));
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
// S... | rust_cleaned_test_functions.jsonl/47454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1566
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
19844,
42444,
9698,
5478,
74175,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
16,
11,
220,
18,
317,
262,
14411,
5478,
53265,
2099,
6984,
10652,
317,
262,
14411,
5478,
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... | 1 |
#[test]
fn test_parse_too_many_fields() {
let expression = "1 2 3 4 5 6 7 8 9 2019";
assert!(Schedule::from_str(expression).is_err());
} | rust_cleaned_test_functions.jsonl/50809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2346,
78,
22101,
12132,
368,
341,
286,
1077,
7493,
284,
330,
16,
220,
17,
220,
18,
220,
19,
220,
20,
220,
21,
220,
22,
220,
23,
220,
24,
220,
17,
15,
16,
24,
876,
286,
2060,
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 |
#[test]
fn test_empty_flag_treated_as_false_json_de() {
// verify a true-by-default flag was parsed as false if ""
let hhvm: Hhvm = serde_json::from_str(
r#"{ "hhvm.emit_meth_caller_func_pointers": { "global_value": "" } }"#,
)
.unwrap();
assert!(
... | rust_cleaned_test_functions.jsonl/18278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
10933,
528,
2850,
11898,
36015,
9455,
2259,
368,
341,
286,
442,
10146,
264,
830,
14319,
13672,
5181,
572,
15676,
438,
895,
421,
8389,
286,
1077,
37914,
7338,
25,
472,
71,
7338,
284,
61570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let item = b'\x1B';
let mut iter = "[x".bytes().map(|x| Ok(x));
assert_eq!(
parse_event(item, &mut iter).unwrap(),
Event::Unsupported(vec![b'\x1B', b'[', b'x']),
)
} | rust_cleaned_test_functions.jsonl/122260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31433,
368,
341,
286,
1077,
1509,
284,
293,
15777,
87,
16,
33,
1010,
286,
1077,
5206,
5367,
284,
10545,
87,
3263,
9651,
1005,
2186,
22428,
87,
91,
7622,
2075,
1106,
286,
2060,
10714,
3367... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_abstract_classes_not_supported() {
let ir = ir_from_cc("struct MyStruct { virtual void run() = 0; };").unwrap();
assert_ir_matches!(ir, quote! { UnsupportedItem { name: "MyStruct" ... } });
} | rust_cleaned_test_functions.jsonl/37243 | {
"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,
85939,
16833,
7913,
57885,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
445,
1235,
3017,
9422,
314,
4108,
737,
1598,
368,
284,
220,
15,
26,
20066,
1827,
15454,
543,
262,
2060,
51433,
38344,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pubsub_unsubscribe() {
let ctx = TestContext::new();
let mut con = ctx.connection();
{
let mut pubsub = con.as_pubsub();
pubsub.subscribe("foo").unwrap();
pubsub.subscribe("bar").unwrap();
pubsub.subscribe("baz").unwrap();
pubsub.psubscribe("f... | rust_cleaned_test_functions.jsonl/108959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
1966,
4907,
9384,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
5206,
390,
284,
5635,
20310,
1428,
262,
341,
286,
1077,
5206,
6675,
1966,
284,
390,
5357,
34014,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_bpf_upgradeable_loader_accounts() {
let bpf_loader_state = UpgradeableLoaderState::Uninitialized;
let account_data = serialize(&bpf_loader_state).unwrap();
assert_eq!(
parse_bpf_upgradeable_loader(&account_data).unwrap(),
BpfUpgradeableLoader... | rust_cleaned_test_functions.jsonl/80399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
880,
15897,
67794,
480,
22139,
55665,
368,
341,
286,
1077,
293,
15897,
22139,
4387,
284,
40713,
480,
9181,
1397,
486,
1806,
36161,
280,
286,
1077,
2692,
1769,
284,
24235,
2099,
65,
15897,
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_decode_cmp_imm_w() {
assert_eq!(
decode_32(0xf1ba0f00),
Instruction::CMP_imm {
params: RegImmParams {
r: Reg::R10,
imm32: 0,
},
thumb32: true,
}
);
} | rust_cleaned_test_functions.jsonl/64810 | {
"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,
15227,
35193,
71370,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
16,
4645,
15,
69,
15,
15,
1326,
286,
29051,
486,
93158,
71370,
341,
310,
3628,
25,
3184... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_input() {
let input = vec![
"p=<-35,0,0>, v=<2,0,0>, a=<-1,0,0>",
"p=<4,0,0>, v=<0,0,0>, a=<-2,0,0>",
];
let expected = vec![
Particle {
id: 0,
position: (-35, 0, 0),
velocity: (2, 0, 0),
acceleration: (-1, 0, 0),
},
Particle {
id: 1,
position: (4, 0, 0),
... | rust_cleaned_test_functions.jsonl/85377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5898,
368,
341,
10217,
1946,
284,
7486,
90515,
197,
197,
1,
79,
38698,
12,
18,
20,
11,
15,
11,
15,
8066,
348,
38698,
17,
11,
15,
11,
15,
8066,
264,
38698,
12,
16,
11,
15,
11,
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_set_psk() {
let params: NoiseParams = "Noise_XXpsk3_25519_AESGCM_SHA256".parse().unwrap();
let mut h_i = Builder::new(params.clone())
.local_private_key(&get_inc_key(0))
.build_initiator().unwrap();
let mut h_r = Builder::new(params)
.local_private_key(&get_in... | rust_cleaned_test_functions.jsonl/27119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
620,
4886,
368,
341,
262,
1077,
3628,
25,
50523,
4870,
284,
330,
61819,
62,
6148,
1690,
74,
18,
62,
17,
20,
20,
16,
24,
69381,
38,
9985,
38096,
17,
20,
21,
3263,
6400,
1005,
15454,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_echo_construct() {
let mut bytes = vec![0xa5; 12];
let mut packet = Packet::new_unchecked(&mut bytes);
packet.set_msg_type(Message::EchoRequest);
packet.set_msg_code(0);
packet.set_echo_ident(0x1234);
packet.set_echo_seq_no(0xabcd);
packet
... | rust_cleaned_test_functions.jsonl/44724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68628,
64803,
368,
341,
286,
1077,
5206,
5820,
284,
7486,
20703,
15,
9591,
20,
26,
220,
16,
17,
935,
286,
1077,
5206,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
6984,
5820,
317,
286,
10151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_can_write_and_read() {
let mut be = Miniz::new(InMemory::new(), 9);
be.write("x".into(), b"hello world").unwrap();
let result = be.read_vec("x".into()).unwrap();
assert_eq!(b"hello world", &result[..]);
} | rust_cleaned_test_functions.jsonl/10290 | {
"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,
27421,
9165,
8378,
6443,
368,
341,
286,
1077,
5206,
387,
284,
3386,
449,
486,
931,
47614,
10642,
486,
931,
1507,
220,
24,
626,
286,
387,
3836,
445,
87,
3263,
18122,
1507,
293,
1,
14990,
1879,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_args_with_errors_shared_connection() {
let ctx = TestContext::new();
block_on_all(future::lazy(|| {
ctx.shared_async_connection()
.and_then(|con| {
let cmds = (0..100).map(move |i| {
if i % 2 == 0 {
test_cmd(... | rust_cleaned_test_functions.jsonl/10905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
6615,
20196,
20405,
15866,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
2504,
4470,
5705,
955,
2976,
486,
49013,
79453,
341,
286,
5635,
18062,
28346,
15866,
741,
310,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_windows_7_or_server_2008() {
let mut os = OsContext {
raw_description: "Microsoft Windows NT 6.1.7601 Service Pack 1"
.to_string()
.into(),
..OsContext::default()
};
normalize_os_context(&mut os);
assert_eq_dbg!(Some("Windows"), os.na... | rust_cleaned_test_functions.jsonl/68952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58220,
62,
22,
8734,
12015,
62,
17,
15,
15,
23,
368,
341,
1066,
262,
1077,
5206,
2643,
284,
15433,
1972,
341,
286,
7112,
11448,
25,
330,
12778,
5515,
17658,
220,
21,
13,
16,
13,
22,
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_dispatcher_worker_stop() {
let (stop_tx, stop_rx) = mpsc::channel();
let (_, worker_rx) = mpsc::channel();
let (worker_tx, _) = mpsc::channel();
let worker = DispatcherWorker {
dispatch_byte: 1,
stop: stop_rx,
timeout: Duration... | rust_cleaned_test_functions.jsonl/126113 | {
"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,
92189,
40385,
19039,
368,
341,
286,
1077,
320,
9495,
17805,
11,
2936,
24330,
8,
284,
296,
81984,
486,
10119,
543,
286,
1077,
39464,
11864,
24330,
8,
284,
296,
81984,
486,
10119,
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_install_when_setting_memory_allocation_to_zero() {
with_setup(|canister_manager, mut state, subnet_id| {
let wasm = ic_test_utilities::universal_canister::UNIVERSAL_CANISTER_WASM.to_vec();
let sender = canister_test_id(100).get();
let settings = CanisterSettings::new... | rust_cleaned_test_functions.jsonl/69189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 981
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
47636,
20313,
19195,
81267,
2346,
19359,
368,
341,
262,
448,
21363,
22428,
4814,
1571,
12144,
11,
5206,
1584,
11,
51457,
842,
91,
341,
286,
1077,
98263,
284,
17902,
4452,
94044,
486,
95300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_search_response_ser() {
let resp = SearchResponse(vec!["A".to_string(), "B".to_string()]);
let actual = serde_json::to_string(&resp).unwrap();
assert_eq!(actual, r#"["A","B"]"#.to_string());
} | rust_cleaned_test_functions.jsonl/95417 | {
"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,
10716,
9655,
75861,
368,
341,
286,
1077,
9039,
284,
7542,
2582,
25592,
0,
1183,
32,
3263,
983,
3904,
1507,
330,
33,
3263,
983,
3904,
57887,
286,
1077,
5042,
284,
61570,
9455,
486,
983,
3904,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_content_type() {
let mut reader = Reader::init("text/html");
assert_eq!(
file_content_type(&mut reader).unwrap(),
"text/html".to_string()
);
assert_eq!(reader.state.cursor, 9);
let mut reader = Reader::init("text/plain; charse... | rust_cleaned_test_functions.jsonl/17071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
7495,
1819,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
2327,
445,
1318,
13739,
797,
286,
2060,
10714,
33673,
310,
1034,
7495,
1819,
2099,
6984,
6604,
568,
15454,
3148,
310,
330,
1318,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rng_64_rand_seeded() {
let s = task_rng().gen_vec::<u64>(256);
let mut ra: Isaac64Rng = SeedableRng::from_seed(s.as_slice());
let mut rb: Isaac64Rng = SeedableRng::from_seed(s.as_slice());
assert_eq!(ra.gen_ascii_str(100u), rb.gen_ascii_str(100u));
} | rust_cleaned_test_functions.jsonl/85137 | {
"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,
66849,
62,
21,
19,
33864,
3453,
29935,
368,
341,
286,
1077,
274,
284,
3383,
66849,
1005,
4370,
13251,
27638,
84,
21,
19,
2235,
17,
20,
21,
317,
286,
1077,
5206,
15122,
25,
41508,
21,
19,
49,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_render_short_html() {
with_globals(|| {
assert_eq!(
word_cfg("unix").render_short_html(),
"Unix"
);
assert_eq!(
name_value_cfg("target_os", "macos").render_short_html(),
"macOS"
... | rust_cleaned_test_functions.jsonl/53558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1766
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22781,
16673,
9564,
368,
341,
286,
448,
58775,
79453,
341,
310,
2060,
10714,
33673,
394,
3409,
18343,
445,
56646,
1827,
7322,
16673,
9564,
3148,
394,
330,
55832,
698,
310,
1439,
310,
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... | 2 |
#[test]
fn test_skip_field() {
let mut body: &[u8] = b"--boundary\r\nfield1\r\n--boundary\r\nfield2\r\n--boundary--";
let mut reader = BoundaryReader::from_reader(&mut body, "boundary");
assert_eq!(reader.consume_boundary().unwrap(), true);
// skip `field1`
assert_eq!(re... | rust_cleaned_test_functions.jsonl/80596 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
5013,
368,
341,
286,
1077,
5206,
2487,
25,
44590,
84,
23,
60,
284,
293,
74757,
65180,
12016,
1699,
2566,
16,
12016,
1699,
313,
65180,
12016,
1699,
2566,
17,
12016,
1699,
313,
65180,
313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_field_with_wrong_name_index_from_static_table() {
let mut buf = vec![];
InsertWithNameRef::new_static(3000, "")
.encode(&mut buf)
.unwrap();
let mut enc = Cursor::new(&buf);
let mut table = build_table_with_size(0);
let res =... | rust_cleaned_test_functions.jsonl/37414 | {
"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,
17678,
5013,
6615,
75198,
1269,
3560,
5673,
25360,
5237,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
0,
15078,
286,
17101,
54523,
3945,
486,
931,
25360,
7,
18,
15,
15,
15,
11,
14676,
310,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero_plus_matrix_equals_matrix() {
let zero = Matrix2x2::zero();
let matrix = Matrix2x2::new(
36.84, 427.46,
7.47, 61.89
);
assert_eq!(zero + matrix, matrix);
} | rust_cleaned_test_functions.jsonl/128967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
28043,
10193,
61664,
10193,
368,
341,
286,
1077,
7168,
284,
11631,
17,
87,
17,
486,
14154,
543,
286,
1077,
6172,
284,
11631,
17,
87,
17,
486,
931,
1006,
310,
220,
18,
21,
13,
23,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_devices() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
vmm.default_kernel_config(None);
assert!(vmm.init_guest_memory().is_ok());
vmm.setup_interrupt_controller()
.expect("Failed to setup interrupt controller");
vmm.in... | rust_cleaned_test_functions.jsonl/28149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
41334,
368,
341,
286,
1077,
5206,
348,
3821,
284,
1855,
2273,
3821,
5314,
7,
8846,
486,
1806,
36161,
317,
286,
348,
3821,
8764,
26876,
5332,
26717,
317,
286,
2060,
10297,
85,
3821,
8271,
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_legal_moves_banmen_with_fu_corner_gote() {
let answer:Vec<Vec<((u32,u32),(u32,u32,bool),Option<ObtainKind>)>> = vec![
vec![
],
vec![
((0,1),(0,0,true),None),
],
vec![
((0,2),(0,1,true),None),
((0,2),(0,1,false),None)
],
vec![
],
vec![
((8,1),(8,0,true... | rust_cleaned_test_functions.jsonl/81084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
36467,
66884,
1889,
1272,
368,
972,
10217,
4226,
25,
10050,
50439,
27,
1188,
84,
18,
17,
36883,
18,
17,
23547,
84,
18,
17,
36883,
18,
17,
63634,
701,
5341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_delimiter_mismatch() {
assert_code_is_not_ok(r#"(]"#);
assert_code_is_not_ok(r#"(}"#);
assert_code_is_not_ok(r#"[)"#);
assert_code_is_not_ok(r#"[}"#);
assert_code_is_not_ok(r#"{)"#);
assert_code_is_not_ok(r#"{]"#);
} | rust_cleaned_test_functions.jsonl/116466 | {
"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,
18029,
17700,
717,
24976,
368,
341,
286,
2060,
4136,
6892,
7913,
19817,
2601,
2,
29209,
19177,
2,
317,
286,
2060,
4136,
6892,
7913,
19817,
2601,
2,
29209,
9863,
2,
317,
286,
2060,
4136,
6892,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_residential_process_get_assertion_with_cred_protect() {
let mut rng = ThreadRng256 {};
let private_key = crypto::ecdsa::SecKey::gensk(&mut rng);
let credential_id = rng.gen_uniform_u8x32().to_vec();
let user_immediately_present = |_| Ok(());
let mut ctap_s... | rust_cleaned_test_functions.jsonl/35316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1940
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4918,
11234,
11305,
3062,
16553,
290,
6615,
73475,
22357,
439,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
869,
3097,
284,
19028,
486,
757,
96780,
486,
843... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cli_get_config_error_opening_file() {
let cli = Cli {
config: PathBuf::from_str("/tmp/http-adapter-test.json").expect("Bad file path string"),
verbose: true,
};
let result = cli.get_config();
assert!(result.is_err());
let error = re... | rust_cleaned_test_functions.jsonl/115804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47147,
3062,
5332,
4096,
11311,
287,
2458,
368,
341,
286,
1077,
21348,
284,
96971,
341,
310,
2193,
25,
7933,
15064,
486,
1499,
2895,
4283,
5173,
15627,
12,
19731,
16839,
4323,
1827,
17119,
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,
1... | 1 |
#[test]
fn test_default_ranking() {
assert_ranked_match!(&["/hello", "/<name>"], "/hello" => "/hello");
assert_ranked_match!(&["/<name>", "/hello"], "/hello" => "/hello");
assert_ranked_match!(&["/<a>", "/hi", "/hi/<b>"], "/hi" => "/hi");
assert_ranked_match!(&["/<a>/b", "/hi/c"]... | rust_cleaned_test_functions.jsonl/25748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 880
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
20417,
287,
368,
341,
286,
2060,
20417,
291,
10708,
0,
2099,
1183,
14,
14990,
497,
3521,
27,
606,
29,
7914,
3521,
14990,
1,
589,
3521,
14990,
797,
286,
2060,
20417,
291,
10708,
0,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_239() {
let mut mf = MedianFinder::new();
mf.add_num(1);
mf.add_num(2);
assert_eq!(mf.find_median(), 1.5);
mf.add_num(3);
assert_eq!(mf.find_median(), 2.0);
} | rust_cleaned_test_functions.jsonl/6362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
18,
24,
368,
341,
414,
1077,
5206,
43969,
284,
62590,
42300,
486,
931,
543,
414,
43969,
1364,
4273,
7,
16,
317,
414,
43969,
1364,
4273,
7,
17,
317,
414,
2060,
10714,
10297,
28124,
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_struct_unnamed() {
let a_1 = StructUnnamed::<Runtime, ImplNone, ImplNone>(1, 2, 3, Default::default());
let a_default: StructUnnamed<Runtime, ImplNone, ImplNone> = Default::default();
assert_eq!(a_default.0, 0);
assert_eq!(a_default.1, 0);
assert_eq!(a_default.2, 0);
assert_eq!(a_default.... | rust_cleaned_test_functions.jsonl/125758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
4907,
30245,
368,
341,
10217,
264,
62,
16,
284,
16139,
78925,
27638,
15123,
11,
88092,
4064,
11,
88092,
4064,
2235,
16,
11,
220,
17,
11,
220,
18,
11,
7899,
486,
2258,
5231,
10217,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_line_one_singular_bag() {
assert_eq!(
parse_line("bright white bags contain 1 shiny gold bag."),
(
"bright white".to_string(),
vec![(1, "shiny gold".to_string())]
)
)
} | rust_cleaned_test_functions.jsonl/42313 | {
"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,
21039,
6528,
11667,
93240,
74368,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
6528,
445,
72116,
4158,
17899,
6644,
220,
16,
41199,
6623,
8968,
62497,
310,
2399,
394,
330,
72116,
4158,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_gc_ready_transaction() {
let mut pool = setup_mempool().0;
add_txn(&mut pool, TestTransaction::new(1, 0, 1)).unwrap();
// insert in the middle transaction that's going to be expired
let txn = TestTransaction::new(1, 1, 1)
.make_signed_transaction_with_expiration_time(Dur... | rust_cleaned_test_functions.jsonl/1807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49423,
35456,
28884,
368,
341,
262,
1077,
5206,
7314,
284,
6505,
717,
3262,
1749,
1005,
15,
280,
262,
912,
92299,
2099,
6984,
7314,
11,
3393,
8070,
486,
931,
7,
16,
11,
220,
15,
11,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unsafe_ptrs() {
unsafe {
let a = [1i32, 2, 3];
let ptr = a.as_ptr();
let b = Soa2::from_raw_bufs(ptr, ptr, 3);
assert_eq!(b.as_slices(), (&[1, 2, 3][..], &[1, 2, 3][..]));
let c = [1i32, 2, 3, 4, 5];
let ptr = c.as_ptr();
let d = Soa2:... | rust_cleaned_test_functions.jsonl/121405 | {
"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,
4907,
18675,
79533,
368,
341,
262,
19860,
341,
286,
1077,
264,
284,
508,
16,
72,
18,
17,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
10087,
284,
264,
5357,
4348,
543,
286,
1077,
293,
284,
2055... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issue_82282() {
fn overflowed_zip(arr: &[i32]) -> impl Iterator<Item = (i32, &())> {
static UNIT_EMPTY_ARR: [(); 0] = [];
let mapped = arr.into_iter().map(|i| *i);
let mut zipped = mapped.zip(UNIT_EMPTY_ARR.iter());
zipped.next();
zipped
}
le... | rust_cleaned_test_functions.jsonl/8970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
23,
17,
17,
23,
17,
368,
341,
262,
5168,
16484,
291,
42131,
10939,
25,
44590,
72,
18,
17,
2467,
1464,
11605,
23023,
31857,
284,
320,
72,
18,
17,
11,
609,
2140,
29,
341,
286,
1099,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pydate_out_of_bounds() {
use pyo3::types::PyDate;
// This test is an XFAIL on Python < 3.6 until bounds checking is implemented
let gil = Python::acquire_gil();
let py = gil.python();
for val in INVALID_DATES {
let (year, month, day) = val;
let dt = PyDate::n... | rust_cleaned_test_functions.jsonl/113016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40291,
1028,
6068,
3575,
36878,
368,
341,
262,
990,
4510,
78,
18,
486,
9242,
486,
13828,
1916,
401,
262,
442,
1096,
1273,
374,
458,
1599,
36973,
389,
13027,
366,
220,
18,
13,
21,
3080,
14262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_message_unique_keys_order_preserved() {
let program_id = Pubkey::default();
let id0 = Pubkey::new_unique();
let id1 = Pubkey::default(); // Key less than id0
let keys = get_keys(
&[
Instruction::new_with_bincode(program_id, &0, vec![Acc... | rust_cleaned_test_functions.jsonl/55523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
21218,
12631,
7869,
32116,
2771,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
2258,
543,
286,
1077,
877,
15,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
877,
16,
284,
22611,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prove_false_prop() {
let bool_false_tree = ErgoTree::try_from(Expr::Const(Constant {
tpe: SType::SBoolean,
v: Literal::Boolean(false),
}))
.unwrap();
let message = vec![0u8; 100];
let prover = TestProver { secrets: vec![] };
... | rust_cleaned_test_functions.jsonl/3882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2540,
586,
36015,
21663,
368,
341,
286,
1077,
1807,
36015,
11663,
284,
73202,
78,
6533,
486,
1539,
5673,
7,
16041,
486,
19167,
50989,
341,
310,
259,
375,
25,
328,
929,
486,
50,
6890,
345,
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_point_in_poly() {
let poly = [
Point2D::new(0.0, 0.0),
Point2D::new(5.0, 0.0),
Point2D::new(5.0, 5.0),
Point2D::new(0.0, 0.0),
];
// point inside rectangle
assert!(point_in_poly(&Point2D::new(2.0, 2.0), &poly));
... | rust_cleaned_test_functions.jsonl/40384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6085,
1243,
36133,
368,
341,
286,
1077,
9861,
284,
2278,
310,
5126,
17,
35,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
310,
5126,
17,
35,
486,
931,
7,
20,
13,
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_decode_eth_signed_transaction() {
let encoded_tx = hex::decode("f86a8086d55698372431831e848094f0109fc8df283027b6285cc889f5aa624eac1f55843b9aca008025a009ebb6ca057a0535d6186462bc0b465b561c94a295bdb0621fc19208ab149a9ca0440ffd775ce91a833ab410777204d5341a6f9fa91216a6f3ee2c051fea6a0428").unwra... | rust_cleaned_test_functions.jsonl/27270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 648
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
57757,
55617,
28884,
368,
341,
286,
1077,
20498,
17805,
284,
12371,
486,
18196,
445,
69,
23,
21,
64,
23,
15,
23,
21,
67,
20,
20,
21,
24,
23,
18,
22,
17,
19,
18,
16,
23,
18,
16,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_repository_registrations_encoding() {
run_async_test(async {
ffx_config::set(
(CONFIG_KEY_REGISTRATIONS, ConfigLevel::User),
json!({
"repo%2Ename": {
... | rust_cleaned_test_functions.jsonl/98277 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
47301,
4920,
3758,
804,
37613,
368,
341,
286,
1598,
28346,
4452,
18285,
341,
310,
282,
8298,
5332,
486,
746,
1006,
394,
320,
24652,
6600,
8064,
29503,
21792,
11,
5532,
4449,
486,
1474,
1326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_call_hierarchy_in_tests_mod() {
check_hierarchy(
r#"
//- /lib.rs cfg:test
fn callee() {}
fn caller1() {
call$0ee();
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_caller() {
callee();
}
}
"#,
expect![["callee Function FileId... | rust_cleaned_test_functions.jsonl/38288 | {
"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,
13429,
95043,
1243,
32509,
7480,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
13286,
84476,
198,
8822,
94800,
368,
5613,
8822,
19865,
16,
368,
341,
262,
1618,
3,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bug1059649() {
// ensure that folding blocks with a single var node doesn't explode
test(
"if(x){var y=3;}var z=5; use(y, z)",
"if(x)var y=3; use(y, 5)",
);
test(
"for(var i=0;i<10;i++){var y=3;}var z=5; use(y, z)",
"for(var i=0;i<10;i++)var y=3; ... | rust_cleaned_test_functions.jsonl/114461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73232,
16,
15,
20,
24,
21,
19,
24,
368,
341,
262,
442,
5978,
429,
44742,
10010,
448,
264,
3175,
762,
2436,
3171,
944,
15758,
198,
262,
1273,
1006,
286,
330,
333,
2075,
6098,
947,
379,
28,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tt_composite() {
check(
r#"
macro_rules! m { ($tt:tt) => { ok!(); } }
m! { => }
m! { = > }
"#,
expect![[r#"
macro_rules! m { ($tt:tt) => { ok!(); } }
ok!();
/* error: leftover tokens */ok!();
"#]],
);
} | rust_cleaned_test_functions.jsonl/85241 | {
"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,
66740,
2965,
13607,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
314,
1711,
5566,
25,
5566,
8,
589,
314,
5394,
0,
2129,
335,
456,
76,
0,
314,
589,
456,
76,
0,
314,
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_eintr_when_no_zombie() {
let (_kernel, current_task) = create_kernel_and_task();
// Send the signal to the task.
assert!(
sys_kill(¤t_task, current_task.get_pid(), UncheckedSignal::from(SIGCHLD)).is_ok()
);
// Verify that EINTR is returne... | rust_cleaned_test_functions.jsonl/71723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
58788,
47636,
6536,
6415,
23342,
368,
341,
286,
1077,
5453,
23248,
11,
1482,
12184,
8,
284,
1855,
26876,
8378,
12184,
543,
286,
442,
11000,
279,
8286,
311,
279,
3383,
624,
286,
2060,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_riddle_increase_bounty() {
let mut riddle = Riddle::new(
"title".to_string(),
"text".to_string(),
"hint".to_string(),
"answer".to_string(),
1,
);
riddle.increase_bounty(1);
assert_eq!(riddle.get_bounty(),... | rust_cleaned_test_functions.jsonl/34254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
3310,
73807,
880,
36725,
368,
341,
286,
1077,
5206,
435,
3310,
284,
431,
3310,
486,
931,
1006,
310,
330,
2102,
3263,
983,
3904,
3148,
310,
330,
1318,
3263,
983,
3904,
3148,
310,
330,
46125... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool() {
BoolType::test(Encoding::PLAIN, TEST_SET_SIZE, -1);
BoolType::test(Encoding::PLAIN_DICTIONARY, TEST_SET_SIZE, -1);
BoolType::test(Encoding::RLE, TEST_SET_SIZE, -1);
} | rust_cleaned_test_functions.jsonl/45120 | {
"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,
22159,
368,
341,
262,
12608,
929,
486,
1944,
85177,
486,
90889,
11,
13602,
8481,
4098,
11,
481,
16,
317,
262,
12608,
929,
486,
1944,
85177,
486,
90889,
44663,
3580,
8642,
11,
13602,
8481,
4098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialization() {
let torchscript_input = TorchScriptInput {
positional_arguments: vec![
SerializableIValue::List(vec![
SerializableIValue::Str("<bos>".to_string()),
SerializableIValue::Str("call".to_string()),
... | rust_cleaned_test_functions.jsonl/10093 | {
"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,
25602,
2022,
368,
341,
286,
1077,
7834,
2282,
5898,
284,
78743,
5910,
2505,
341,
310,
67547,
43433,
25,
7486,
90515,
394,
24859,
40,
1130,
486,
852,
25592,
90515,
503,
24859,
40,
1130,
486,
2580,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ledger_fees() {
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE, "true");
let cb = return_types_u32::Return_U32_STR::new().unwrap();
assert_eq!(vcx_ledger_get_fees(cb.command_handle,
... | rust_cleaned_test_functions.jsonl/111536 | {
"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,
3062,
38367,
1389,
761,
5516,
368,
341,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
11,
330,
1866,
3071,
286,
1077,
9858,
284,
470,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rv32m() {
let shared_builder = settings::builder();
let shared_flags = settings::Flags::new(shared_builder);
// Set the supports_m stting which in turn enables the use_m predicate that unlocks
// encodings for imul.
let mut isa_builder = isa::lookup(tripl... | rust_cleaned_test_functions.jsonl/10516 | {
"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,
1710,
85,
18,
17,
76,
368,
341,
286,
1077,
6094,
28532,
284,
5003,
486,
17850,
543,
286,
1077,
6094,
14130,
284,
5003,
486,
9195,
486,
931,
65069,
28532,
626,
286,
442,
2573,
279,
11554,
717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_guild_prune_compute_prune_count_true() {
let route = Route::CreateGuildPrune {
compute_prune_count: Some(true),
days: None,
guild_id: GUILD_ID,
include_roles: &[],
};
assert_eq!(
route.to_string(),
... | rust_cleaned_test_functions.jsonl/119964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1889,
1498,
5294,
2886,
57028,
5294,
2886,
3180,
16082,
368,
341,
286,
1077,
6021,
284,
9572,
486,
4021,
72574,
3533,
2886,
341,
310,
12564,
5294,
2886,
3180,
25,
4329,
3715,
1326,
310,
2849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiline_errors() {
assert_eq!(Json::from_str("{\n \"foo\":\n \"bar\""),
Err(SyntaxError(EOFWhileParsingObject, 3, 8)));
} | rust_cleaned_test_functions.jsonl/22732 | {
"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,
26290,
26560,
20196,
368,
341,
286,
2060,
10714,
10297,
5014,
486,
1499,
2895,
13976,
59,
77,
220,
7245,
7975,
11693,
59,
77,
7245,
2257,
2105,
4461,
310,
15495,
93549,
1454,
7,
23483,
7983,
68839... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_dad_duplicate_address_detected_solicitation() {
// Tests whether a duplicate address will get detected by solicitation
// so they will both give up using that address.
set_logger_for_test();
let mac = Mac::new([1, 2, 3, 4, 5, 6]);
... | rust_cleaned_test_functions.jsonl/16136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
329,
70434,
6744,
98876,
643,
7762,
7556,
368,
341,
286,
442,
20150,
3425,
264,
22513,
2621,
686,
633,
16507,
553,
29744,
7556,
8945,
16885,
286,
442,
773,
807,
686,
2176,
2968,
705,
1667,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_blob_to_tree_into_blob_to_tree_no_conflict() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let ours = commit! {
foo {
bar < "bar"
}
};
let theirs = commit! {
foo {
baz < "baz"
... | rust_cleaned_test_functions.jsonl/94179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
45908,
2346,
11663,
45514,
45908,
2346,
11663,
6536,
16059,
21242,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
11350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_account_balance_for_capitalization_native_program() {
let normal_native_program =
solana_sdk::native_loader::create_loadable_account_for_test("foo");
assert_eq!(normal_native_program.lamports(), 1);
} | rust_cleaned_test_functions.jsonl/1403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
29396,
5478,
16388,
2174,
2022,
44494,
25096,
368,
341,
286,
1077,
4622,
44494,
25096,
4035,
310,
2048,
3362,
61783,
486,
29738,
22139,
486,
3182,
12411,
480,
13500,
5478,
4452,
445,
7975,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_list_attempts_by_endpoint_query_parameters_validation() {
let q: ListAttemptsByEndpointQueryParameters =
serde_json::from_value(json!({ "event_types": INVALID_EVENT_TYPES })).unwrap();
assert!(q.validate().is_err());
let q: ListAttemptsByEndpointQueryParamete... | rust_cleaned_test_functions.jsonl/64492 | {
"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,
2019,
79490,
3710,
36699,
5738,
18263,
19416,
368,
341,
286,
1077,
2804,
25,
1759,
81517,
1359,
27380,
2859,
9706,
4035,
310,
61570,
9455,
486,
1499,
3142,
9304,
0,
2306,
330,
3087,
9763,
788,
322... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_has_compact_perbill() {
let data = WithCompact { data: Perbill(1) };
let encoded = data.encode();
assert_eq!(data, WithCompact::<Perbill>::decode(&mut &encoded[..]).unwrap());
} | rust_cleaned_test_functions.jsonl/34805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
18177,
531,
5678,
29642,
368,
341,
197,
10217,
821,
284,
3085,
98335,
314,
821,
25,
3616,
29642,
7,
16,
8,
2605,
197,
10217,
20498,
284,
821,
17313,
543,
197,
6948,
10714,
10297,
691,
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 |
#[test]
fn test_scoped_dir_builder() {
// create temporary directory to emulate container rootfs with symlink
let rootfs_dir = tempdir().expect("failed to create tmpdir");
DirBuilder::new()
.create(rootfs_dir.path().join("b"))
.unwrap();
symlink(rootfs_dir... | rust_cleaned_test_functions.jsonl/71712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
16367,
4334,
28532,
368,
341,
286,
442,
1855,
13340,
6220,
311,
65485,
5476,
3704,
3848,
448,
83221,
198,
286,
1077,
3704,
3848,
4334,
284,
2730,
3741,
1005,
17119,
445,
16091,
311,
1855,
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_to_value_tuple_enum() {
let test = TestTupleExternalEnum {
a: TupleExternalEnum::Val2(1.0, 2.0, 3.0),
};
let expected = Value::Record(vec![(
"a".to_owned(),
Value::Record(vec![
("type".to_owned(), Value::Enum(1, "Val2".... | rust_cleaned_test_functions.jsonl/52765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
3142,
21773,
31054,
368,
341,
286,
1077,
1273,
284,
3393,
28681,
25913,
10766,
341,
310,
264,
25,
24622,
25913,
10766,
486,
2208,
17,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha512_hash() {
use std::collections::HashMap;
let mut message_hashes: HashMap<&str, [u64; 8]> = HashMap::new();
message_hashes.insert(
"",
[
0xcf83e1357eefb8bd,
0xf1542850d66d8007,
0xd620e4050b5715dc... | rust_cleaned_test_functions.jsonl/119258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
20,
16,
17,
8950,
368,
341,
286,
990,
1460,
486,
51137,
486,
18497,
280,
286,
1077,
5206,
1943,
91616,
25,
10528,
52244,
495,
11,
508,
84,
21,
19,
26,
220,
23,
25669,
284,
10528,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_generate_self_attested_proof() {
init!("ledger");
let did = settings::get_config_value(settings::CONFIG_INSTITUTION_DID).unwrap();
let mut proof_req = ProofRequestMessage::create();
let indy_proof_req = json!({
"nonce":"123432421212",
"name"... | rust_cleaned_test_functions.jsonl/106029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 635
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
25637,
13356,
9980,
86757,
368,
341,
286,
2930,
17223,
50704,
797,
286,
1077,
1521,
284,
5003,
486,
455,
5332,
3142,
23369,
486,
24652,
2158,
25765,
28617,
1557,
915,
568,
15454,
1428,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_str_fail() {
fn test(s: &str) {
let rational: Option<Rational> = FromStr::from_str(s);
assert_eq!(rational, None);
}
let xs = ["0 /1", "abc", "", "1/", "--1/2","3/2/1"];
for &s in xs.iter() {
test(s);
}
} | rust_cleaned_test_functions.jsonl/80850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
22121,
368,
341,
286,
5168,
1273,
1141,
25,
609,
495,
8,
341,
310,
1077,
24438,
25,
6959,
23370,
1663,
29,
284,
5542,
2580,
486,
1499,
2895,
1141,
317,
310,
2060,
10714,
10297,
81,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permissions_net_fetch_localhost_4545_fail() {
let (_, err) = util::run_and_collect_output(
false,
"run --allow-net=localhost:4545 complex_permissions_test.ts netFetch http://localhost:4546/",
None,
None,
true,
);
assert!(err.contains(util::PERMISSION_DENIED_PATTERN));
} | rust_cleaned_test_functions.jsonl/5601 | {
"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,
44767,
19722,
11803,
62,
8301,
62,
19,
20,
19,
20,
22121,
368,
341,
220,
1077,
39464,
1848,
8,
284,
4094,
486,
6108,
8378,
68140,
7645,
1006,
262,
895,
345,
298,
197,
1,
6108,
1177,
7183,
6649... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_access() {
let tuple = (false, true, false, true);
let bit_tuple = Bit::from(tuple);
assert_eq!(bit!(bit_tuple.0).extract(), false);
assert_eq!(bit!(bit_tuple.1).extract(), true);
assert_eq!(bit!(bit_tuple.2).extract(), false);
assert_eq!(bit!(bit... | rust_cleaned_test_functions.jsonl/44784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12759,
368,
341,
286,
1077,
14405,
284,
320,
3849,
11,
830,
11,
895,
11,
830,
317,
286,
1077,
2699,
21773,
284,
6495,
486,
1499,
58602,
626,
286,
2060,
10714,
10297,
4489,
10297,
4489,
21773,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_vec3mask_fmt() {
let a = Vec3Mask::new(true, false, false);
// debug fmt
assert_eq!(format!("{:?}", a), "Vec3Mask(0xffffffff, 0x0, 0x0)");
// display fmt
assert_eq!(format!("{}", a), "[true, false, false]");
} | rust_cleaned_test_functions.jsonl/75051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
11258,
38128,
368,
341,
262,
1077,
264,
284,
11312,
18,
12686,
486,
931,
3715,
11,
895,
11,
895,
626,
262,
442,
7390,
8879,
198,
262,
2060,
10714,
10297,
2243,
88928,
25,
52652,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_index_expression() {
let b = ast::BaseNode::default();
let pkg =
Parser::new("a[3]").parse_single_package("path".to_string(), "foo.flux".to_string());
let want = Package {
loc: b.location.clone(),
package: "main".to_string(),
... | rust_cleaned_test_functions.jsonl/132527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 792
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
3560,
28068,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
4035,
310,
21102,
486,
931,
445,
64,
58,
18,
44891,
6400,
19487,
26328,
445,
2343,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_play_multiple() {
let mut state = PlaybackState::default();
state.queue(song("1"));
state.queue(song("2"));
state.queue(song("3"));
assert_eq!(state.songs().count(), 3);
state.play("2");
assert!(state.is_playing());
assert_eq!(sta... | rust_cleaned_test_functions.jsonl/20826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 737
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22144,
45233,
368,
341,
286,
1077,
5206,
1584,
284,
95301,
1397,
486,
2258,
543,
286,
1584,
29598,
60873,
445,
16,
4010,
286,
1584,
29598,
60873,
445,
17,
4010,
286,
1584,
29598,
60873,
445,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_err() {
let gil = Python::acquire_gil();
let py = gil.python();
if let Err(err) = PyByteArray::from(py, &py.None()) {
assert!(err.is_instance::<exceptions::PyTypeError>(py));
} else {
panic!("error");
}
} | rust_cleaned_test_functions.jsonl/60118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
9266,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
1428,
286,
421,
1077,
15495,
3964,
8,
284,
5355,
18394,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_vsqx4_parse() {
let vsqx4 = include_str!("../test/v4.vsqx");
let _v: Vsqx4 = quick_xml::de::from_str(&vsqx4).unwrap();
} | rust_cleaned_test_functions.jsonl/124625 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
28343,
87,
19,
21039,
368,
341,
262,
1077,
6165,
88735,
19,
284,
2924,
2895,
17223,
1244,
1944,
5457,
19,
3133,
28343,
87,
797,
262,
1077,
716,
85,
25,
647,
28343,
87,
19,
284,
3974,
238... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_source_from_string() {
let values = [
"oPeN",
"HIGH",
"low",
"cLose",
"volume",
"vOluMeD_prIcE",
"tP",
"hlc3",
"Hl2",
];
values.iter().enumerate().for_each(|(i, s)| {
let r: Source = s.parse().unwrap();
match i {
0 => assert_eq!(Source::Open, r),
1... | rust_cleaned_test_functions.jsonl/28054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10347,
5673,
3904,
368,
341,
197,
10217,
2750,
284,
2278,
298,
197,
1,
78,
10197,
45,
756,
298,
197,
45539,
16768,
756,
298,
197,
1,
10303,
756,
298,
197,
96946,
43,
960,
756,
298,
197,
1,
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... | 2 |
#[test]
fn test_split() {
let sn = parse_line("[[[[0,7],4],[0,[0,0]]],[1,1]]");
sn.borrow().left_unwrap().borrow().right_unwrap().borrow().left_unwrap().borrow_mut().value = Some(15);
sn.borrow().left_unwrap().borrow().right_unwrap().borrow().right_unwrap().borrow().right_unwrap... | rust_cleaned_test_functions.jsonl/51417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
368,
341,
1789,
286,
1077,
4131,
284,
4715,
6528,
10937,
15505,
58,
15,
11,
22,
1125,
19,
14955,
15,
17259,
15,
11,
15,
5053,
14955,
16,
11,
16,
5053,
797,
286,
4131,
83640,
1005,
2359,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_binary_function_raw_column() {
#[derive(Debug, Clone, Copy, RpnFunction)]
#[rpn_function(args = 2)]
struct FnFoo;
impl FnFoo {
fn call(
_ctx: &mut EvalContext,
_payload: RpnFnCallPayload<'_>,
... | rust_cleaned_test_functions.jsonl/111589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 970
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
31761,
9174,
16067,
8744,
368,
341,
394,
11506,
27098,
42618,
11,
27913,
11,
14540,
11,
431,
19958,
5152,
5563,
286,
11506,
81,
19958,
9174,
7356,
284,
220,
17,
5563,
286,
2036,
50182,
4092... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_get_block_commitment() {
let rpc = RpcHandler::start();
let expected_total_stake = 42;
let mut block_0_commitment = BlockCommitment::default();
block_0_commitment.increase_confirmation_stake(2, 9);
let _ = std::mem::replace(
&mut *rpc.bloc... | rust_cleaned_test_functions.jsonl/6326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 612
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
7113,
36346,
478,
368,
341,
286,
1077,
35596,
284,
79961,
3050,
486,
2468,
1428,
286,
1077,
3601,
10784,
1261,
726,
284,
220,
19,
17,
280,
286,
1077,
5206,
2504,
62,
15,
36346,
478,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_total() {
let mut total_op = PreAggAdapter::new(Box::new(TotalDef::new(
Expr::Column("count".to_string()),
"_total".to_string(),
)));
let agg = Aggregate::new(
&["kc1".to_string(), "kc2".to_string()],
"count".to_string(),
... | rust_cleaned_test_functions.jsonl/31017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 865
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10784,
368,
341,
286,
1077,
5206,
2790,
10287,
284,
4968,
9042,
70,
5940,
486,
931,
67758,
486,
931,
4140,
2370,
2620,
486,
931,
1006,
310,
28819,
486,
2933,
445,
1830,
3263,
983,
3904,
14702,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolving_with_dev_deps() {
let reg = registry(vec![
pkg!("foo" => ["bar", dep_kind("baz", DepKind::Development)]),
pkg!("baz" => ["bat", dep_kind("bam", DepKind::Development)]),
pkg!("bar"),
pkg!("bat"),
]);
let res = resolve(
vec![dep("foo")... | rust_cleaned_test_functions.jsonl/46429 | {
"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,
4918,
19648,
6615,
10433,
76489,
368,
341,
262,
1077,
1217,
284,
19424,
25592,
90515,
286,
24793,
17223,
7975,
1,
589,
4383,
2257,
497,
2170,
33162,
445,
42573,
497,
4148,
10629,
486,
39419,
7252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.