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_vec3mask_select() {
let a = Vec3::new(1.0, 2.0, 3.0);
let b = Vec3::new(4.0, 5.0, 6.0);
assert_eq!(
Vec3Mask::new(true, true, true).select(a, b),
Vec3::new(1.0, 2.0, 3.0),
);
assert_eq!(
Vec3Mask::new(true, false, true).select(a, b),
Vec3::new(... | rust_cleaned_test_functions.jsonl/48597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
11258,
13051,
368,
341,
262,
1077,
264,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
1077,
293,
284,
11312,
18,
486,
931,
7,
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_too_long_tag() {
let too_long = b"0123456789abcdef";
let mut decoder = BinDecoder::new(too_long);
assert!(read_tag(&mut decoder, too_long.len() as u8).is_err());
} | rust_cleaned_test_functions.jsonl/24513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
78,
17799,
9372,
368,
341,
286,
1077,
2238,
17799,
284,
293,
1,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
41202,
876,
286,
1077,
5206,
24551,
284,
29344,
20732,
486,
931,
12186,
78,
1779... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_named_thread() {
Builder::new().name("ada lovelace".to_string()).spawn(move|| {
assert!(thread::current().name().unwrap() == "ada lovelace".to_string());
}).unwrap().join().unwrap();
} | rust_cleaned_test_functions.jsonl/8557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71834,
10814,
368,
341,
286,
20626,
486,
931,
1005,
606,
445,
2584,
775,
889,
578,
3263,
983,
3904,
6011,
46087,
34081,
8484,
341,
310,
2060,
10297,
4528,
486,
3231,
1005,
606,
1005,
15454,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_search_ipv6_name_parse_fails() {
use super::testing::search_ipv6_name_parse_fails_test;
let io_loop = Runtime::new().expect("failed to create tokio runtime io_loop");
let handle = io_loop.handle().clone();
search_ipv6_name_parse_fails_test::<Runtime, TokioRuntime>... | rust_cleaned_test_functions.jsonl/121543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
49378,
21,
1269,
21039,
761,
6209,
368,
341,
286,
990,
2256,
486,
8840,
486,
1836,
49378,
21,
1269,
21039,
761,
6209,
4452,
280,
286,
1077,
6399,
17198,
284,
10954,
486,
931,
1005,
17119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_encoder_multiple_peers() {
let packet_size: u16 = 1280;
let data_size: usize = packet_size as usize * MAX_SYMBOLS_IN_BLOCK as usize;
let data = gen_data(data_size);
let encoder = match BlockEncoder::new(0, packet_size, data.clone(), None) {
Ok(succ) => succ,
... | rust_cleaned_test_functions.jsonl/96424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
39068,
45233,
36367,
388,
368,
341,
262,
1077,
10151,
2368,
25,
575,
16,
21,
284,
220,
16,
17,
23,
15,
280,
262,
1077,
821,
2368,
25,
22301,
284,
10151,
2368,
438,
22301,
353,
8334,
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... | 3 |
#[test]
fn test_get_block_header_and_finality_signatures_by_height() {
let mut harness = ComponentHarness::default();
let mut storage = storage_fixture(&harness);
let block = Block::random(&mut harness.rng);
let mut block_signatures = BlockSignatures::new(block.header().hash(), block.heade... | rust_cleaned_test_functions.jsonl/69052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
7113,
8757,
8378,
20676,
487,
11172,
2789,
3710,
9561,
368,
341,
262,
1077,
5206,
32408,
284,
5578,
74248,
486,
2258,
543,
262,
1077,
5206,
5819,
284,
5819,
74409,
2099,
71,
23518,
626,
1066... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_header_is_case_insensitive_on_the_field_name() {
let _m = mock("GET", "/")
.match_header("content-type", "text/plain")
.create();
let (uppercase_status_line, _, _) = request("GET /", "Content-Type: text/plain\r\n");
assert_eq!("HTTP/1.1 200 OK\r\n", uppercase_s... | rust_cleaned_test_functions.jsonl/82373 | {
"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,
10708,
8757,
6892,
19096,
34386,
18723,
4470,
16068,
5013,
1269,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
1138,
286,
659,
6347,
8757,
445,
1796,
10604,
497,
330,
1318,
36971,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nodes_per_cluster() {
let clustering: Clustering = Clustering {
node_to_cluster_mapping: vec![1, 1, 4, 3, 0, 0, 5, 2],
next_cluster_id: 6,
};
let expected: Vec<Vec<usize>> =
vec![vec![4, 5], vec![0, 1], vec![7], vec![3], vec![2], vec![6... | rust_cleaned_test_functions.jsonl/117493 | {
"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,
14896,
5678,
28441,
368,
341,
286,
1077,
58354,
25,
2435,
36694,
284,
2435,
36694,
341,
310,
2436,
2346,
28441,
26930,
25,
7486,
20703,
16,
11,
220,
16,
11,
220,
19,
11,
220,
18,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_locked_data() {
const TABLE_ID: i64 = 42;
let columns_info = vec![
{
let mut ci = ColumnInfo::new();
ci.as_mut_accessor().set_tp(FieldTypeTp::LongLong);
ci.set_pk_handle(true);
ci.set_column_id(1);
... | rust_cleaned_test_functions.jsonl/66513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60271,
1769,
368,
341,
286,
733,
14363,
3450,
25,
600,
21,
19,
284,
220,
19,
17,
401,
286,
1077,
8147,
3109,
284,
7486,
90515,
310,
341,
394,
1077,
5206,
11825,
284,
9332,
1731,
486,
931,
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_request_redeem_fails_with_vault_banned() {
run_test(|| {
ext::vault_registry::get_vault_from_id::<Test>.mock_safe(|_| {
MockResult::Return(Ok(Vault {
id: BOB,
to_be_issued_tokens: 0,
issued_tokens: 0,
to_be_r... | rust_cleaned_test_functions.jsonl/26918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
1288,
450,
336,
761,
6209,
6615,
2273,
945,
880,
7295,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1303,
486,
82983,
50650,
486,
455,
2273,
945,
5673,
842,
27638,
2271,
14276,
16712,
34067,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_syn_sent_rst() {
let mut s = socket_syn_sent();
send!(s, TcpRepr {
control: TcpControl::Rst,
seq_number: REMOTE_SEQ,
ack_number: Some(LOCAL_SEQ + 1),
..SEND_TEMPL
});
assert_eq!(s.state, State::Closed);
} | rust_cleaned_test_functions.jsonl/1716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51393,
24115,
1710,
267,
368,
341,
286,
1077,
5206,
274,
284,
7575,
51393,
24115,
543,
286,
3624,
10297,
82,
11,
64876,
693,
649,
341,
310,
2524,
25,
64876,
3273,
486,
49,
267,
345,
310,
12981,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_v2_key_decode_err() {
let cases: Vec<(Vec<u8>, bool)> = vec![
// Invalid prefix
(vec![1, 2, 3, 4, 5, 6, 7, 8, 9], false),
// Memcomparable-encoded padding: n * 9 + Optional 8
(vec![b'r', 2, 3, 4, 5, 6, 7, 8], false),
(vec![b'r',... | rust_cleaned_test_functions.jsonl/71722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1007
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
17,
3097,
15227,
9266,
368,
341,
286,
1077,
5048,
25,
11312,
28706,
10050,
34837,
23,
8066,
1807,
16018,
284,
7486,
90515,
310,
442,
13882,
9252,
198,
310,
320,
4083,
20703,
16,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_did_doc_resolve_keys_works() {
let (recipient_keys, routing_keys) = _did_doc().resolve_keys();
assert_eq!(_recipient_keys(), recipient_keys);
assert_eq!(_routing_keys(), routing_keys);
let (recipient_keys, routing_keys) = _did_doc_2().resolve_keys();
asse... | rust_cleaned_test_functions.jsonl/21966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
307,
18869,
77291,
12631,
11498,
82,
368,
341,
286,
1077,
320,
42610,
12631,
11,
29058,
12631,
8,
284,
716,
22920,
18869,
1005,
17325,
12631,
543,
286,
2060,
10714,
0,
2490,
42610,
12631,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_check_retries_backoff() {
block_on(async {
let config = config_generator();
let mut timer = MockTimer::new();
timer.expect_range(Duration::from_millis(500), Duration::from_millis(1500));
timer.expect_range(Duration::from_millis(1500)... | rust_cleaned_test_functions.jsonl/94226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
7200,
1288,
4543,
3895,
1847,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
5206,
9021,
284,
14563,
10105,
486,
931,
543,
310,
9021,
25952,
9698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bool() {
test_parse_ok(&[
("<bla>true</bla>", true),
("<bla>false</bla>", false),
("<bla> true </bla>", true),
("<bla> false </bla>", false),
("<bla>1</bla>", true),
("<bla>0</bla>", false),
]);
test_parse_invalid::<bool>(&["<bla... | rust_cleaned_test_functions.jsonl/54623 | {
"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,
22159,
368,
341,
262,
1273,
21039,
19817,
2099,
9640,
286,
90276,
64726,
33284,
522,
64726,
21156,
830,
1326,
286,
90276,
64726,
30392,
522,
64726,
21156,
895,
1326,
286,
90276,
64726,
29,
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_error_display() {
assert_eq!(
format!(
"{}",
MetricsConfigError::InitializationFailure(String::from(
"Failed to initialize metrics"
))
),
"Failed to initialize metrics"
);
... | rust_cleaned_test_functions.jsonl/53210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
14825,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
33673,
394,
35503,
756,
394,
54190,
2648,
1454,
486,
61928,
17507,
2242,
486,
1499,
1006,
503,
330,
9408,
311,
9468,
16734,
698,
394,
192... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
use num_format::{
Buffer, CustomFormat, CustomFormatBuilder, Error, ErrorKind, Grouping, Locale,
};
use serde::{Deserialize, Serialize};
fn serializable<T: Serialize>() {}
serializable::<Buffer>();
serializable::<CustomFormat>();
serializab... | rust_cleaned_test_functions.jsonl/92816 | {
"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,
25602,
2022,
368,
341,
262,
990,
1629,
8955,
74843,
286,
10312,
11,
8406,
4061,
11,
8406,
4061,
3297,
11,
4600,
11,
4600,
10629,
11,
5737,
287,
11,
34526,
345,
262,
2605,
262,
990,
61570,
22964,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_go_message() {
let empty_go = UciMessage::go();
assert_eq!(empty_go, UciMessage::Go { time_control: None, search_control: None });
} | rust_cleaned_test_functions.jsonl/19078 | {
"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,
15124,
25515,
6462,
368,
341,
286,
1077,
4287,
25515,
284,
547,
5855,
2052,
486,
3346,
543,
286,
2060,
10714,
10297,
3194,
25515,
11,
547,
5855,
2052,
486,
10850,
314,
882,
13436,
25,
2240,
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 |
#[test]
fn test_rpc_unexpected_request() {
let client = TestClient::default();
client.requests().expect(vec![
request! {
method: "getnewaddress",
params: ["maintain"],
response: "mmoXxKhAwnhtFiAMvxJ82CKCBia751mzfY"
},
request! {
met... | rust_cleaned_test_functions.jsonl/82256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
4907,
7325,
7893,
368,
341,
262,
1077,
2943,
284,
3393,
2959,
486,
2258,
543,
262,
2943,
67671,
1005,
17119,
25592,
90515,
286,
1681,
0,
341,
310,
1714,
25,
330,
455,
931,
4995,
756,
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_mint_not_admin() {
let mut runner = AuroraRunner::new();
let token = runner.deploy_erc20_token(&"tt.testnet".to_string());
let address = runner.create_account().address;
let balance = runner.balance_of(token, address, origin());
assert_eq!(balance, U256::from(0));
let amo... | rust_cleaned_test_functions.jsonl/11797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
396,
7913,
12207,
368,
341,
262,
1077,
5206,
22259,
284,
46792,
19486,
486,
931,
543,
262,
1077,
3950,
284,
22259,
67121,
62,
2962,
17,
15,
6458,
2099,
1,
5566,
5958,
4711,
3263,
983,
3904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jgt_imm() {
test_interpreter_and_jit_asm!(
"
mov32 r0, 0
mov32 r1, 5
jgt r1, 6, +2
jgt r1, 5, +1
jgt r1, 4, +1
exit
mov32 r0, 1
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0x1 } },
... | rust_cleaned_test_functions.jsonl/59014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5374,
5178,
71370,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
18,
17,
435,
15,
11,
220,
15,
198,
286,
1974,
18,
17,
435,
16,
11,
220,
20,
198,
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_simple_commitment() {
let mut rng = RandState::new();
rng.seed(&Integer::from(13));
let value = Integer::from(2);
let randomness = Integer::from(5);
let integer = IntegerCommitment::<Rsa2048>::setup(&mut rng);
let commitment = integer.commit(&valu... | rust_cleaned_test_functions.jsonl/65917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
36346,
478,
368,
341,
286,
1077,
5206,
28422,
284,
23963,
1397,
486,
931,
543,
286,
28422,
36325,
2099,
3486,
486,
1499,
7,
16,
18,
3237,
286,
1077,
897,
284,
4440,
486,
1499,
7,
17,
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_force_checkout_typechange_tree_to_blob_with_conflicting() -> BitResult<()> {
BitRepo::with_sample_repo_no_sym(|repo| {
let target = commit! {
foo
bar
dir < "changed to a file original"
};
rmdir!(repo: "dir");
touch!(repo: "d... | rust_cleaned_test_functions.jsonl/62989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40739,
68186,
1819,
3373,
11663,
2346,
45908,
6615,
16059,
78208,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
17491,
37784,
6536,
26825,
22428,
23476,
91,
341,
286,
1077,
2169,
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_detection() {
let reference_image = {
let path: std::path::PathBuf = [
env!("CARGO_MANIFEST_DIR"),
"tests",
"test_data",
"DICT_APRILTAG_16h5-2x2-500-10-0.8-29,12,22,2.jpg",
]
.iter()
.collect();
let image... | rust_cleaned_test_functions.jsonl/102723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 950
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57505,
368,
341,
262,
1077,
5785,
4954,
284,
341,
286,
1077,
1815,
25,
1460,
486,
2343,
486,
1820,
15064,
284,
2278,
310,
6105,
17223,
34,
7581,
46,
25143,
91120,
8291,
4461,
310,
330,
23841,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_take_primitive_bool() {
let index = UInt32Array::from(vec![Some(3), None, Some(1), Some(3), Some(2)]);
// boolean
test_take_primitive_arrays::<BooleanType>(
vec![Some(false), None, Some(true), Some(false), None],
&index,
None,
... | rust_cleaned_test_functions.jsonl/4069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
84087,
22159,
368,
341,
286,
1077,
1922,
284,
22275,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
18,
701,
2240,
11,
4329,
7,
16,
701,
4329,
7,
18,
701,
4329,
7,
17,
41958,
286,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmp_json_between_same_type() {
let test_cases = vec![
("false", "true"),
("-3", "3"),
("3", "5"),
("3.0", "4.9"),
(r#""hello""#, r#""hello, world""#),
(r#"["a", "b"]"#, r#"["a", "c"]"#),
(r#"{"a": "b"}"#,... | rust_cleaned_test_functions.jsonl/35100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
9455,
48302,
33574,
1819,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
3489,
3849,
497,
330,
1866,
4461,
310,
98670,
18,
497,
330,
18,
4461,
310,
3489,
18,
497,
330,
20,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_simple_logger() {
let logger = SimpleLogger::new();
let rec = log::RecordBuilder::new()
.file(Some("filename"))
.line(Some(32))
.build();
logger.log(&rec);
logger.flush();
let metadata = log::MetadataBuilder::new()
... | rust_cleaned_test_functions.jsonl/32882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
27413,
368,
341,
286,
1077,
5925,
284,
8993,
7395,
486,
931,
1428,
286,
1077,
1395,
284,
1487,
486,
6471,
3297,
486,
931,
741,
310,
659,
1192,
65405,
445,
8404,
5455,
310,
659,
1056,
6540... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_radians() {
let test_cases = vec![
(None, None),
(Some(0_f64), Some(Real::from(0_f64))),
(Some(180_f64), Some(Real::from(std::f64::consts::PI))),
(
Some(-360_f64),
Some(Real::from(-2_f64 * std::f64::consts::P... | rust_cleaned_test_functions.jsonl/37492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
20736,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
1326,
310,
320,
8373,
7,
15,
761,
21,
19,
701,
4329,
7,
12768,
486,
1499,
7,
15,
761,
21,
19,
41749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kex_rng_pubkey_round_trip_protobuf() {
run_with_several_seeds(|mut rng| {
let mut test_val = kex_rng::KexRngPubkey::new();
test_val.set_pubkey(<[u8; 32]>::sample(&mut rng).to_vec());
test_val.version = rng.next_u32();
round_trip_protobuf_object::<kex_rng::Kex... | rust_cleaned_test_functions.jsonl/52324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
327,
66849,
34014,
792,
29896,
63883,
22357,
18464,
368,
341,
262,
1598,
6615,
3453,
17539,
3453,
6767,
22428,
6984,
28422,
91,
341,
286,
1077,
5206,
1273,
6189,
284,
595,
327,
66849,
486,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_next_code() {
assert_eq!(31_916_031, generate_next_code(FIRST_CODE));
assert_eq!(18_749_137, generate_next_code(31_916_031));
assert_eq!(16_080_970, generate_next_code(18_749_137));
assert_eq!(21_629_792, generate_next_code(16_080_970));
assert_eq... | rust_cleaned_test_functions.jsonl/64655 | {
"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,
48851,
11257,
4136,
368,
341,
286,
2060,
10714,
10297,
18,
16,
62,
24,
16,
21,
62,
15,
18,
16,
11,
6923,
11257,
4136,
7832,
14237,
10020,
1106,
286,
2060,
10714,
10297,
16,
23,
62,
22,
19,
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_exec_details() {
let data = vec![
(1, Some("name:0"), 2),
(2, Some("name:4"), 3),
(4, Some("name:3"), 1),
(5, Some("name:1"), 4),
];
let product = ProductTable::new();
let (_, endpoint) = init_with_data(&product, &data);
// get none
let r... | rust_cleaned_test_functions.jsonl/34875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
13260,
368,
341,
262,
1077,
821,
284,
7486,
90515,
286,
320,
16,
11,
4329,
445,
606,
25,
15,
3975,
220,
17,
1326,
286,
320,
17,
11,
4329,
445,
606,
25,
19,
3975,
220,
18,
1326,
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_non_existence() {
let db = MockTreeStore::default();
let tree = JellyfishMerkleTree::new(&db);
// ```text
// internal 2
// internal
// Total: 7 nodes
let key1 = HashValue::new([0x00u8; HashValue::LENGTH]... | rust_cleaned_test_functions.jsonl/46373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1009
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
35906,
763,
368,
341,
262,
1077,
2927,
284,
14563,
6533,
6093,
486,
2258,
543,
262,
1077,
4916,
284,
73139,
18170,
44,
16754,
273,
6533,
486,
931,
2099,
1999,
317,
262,
442,
54275,
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_merge_self_fails() {
let stake_address = solana_sdk::pubkey::new_rand();
let authorized_address = solana_sdk::pubkey::new_rand();
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_balance(StakeState::size_of());
let stake_amount = 42424242... | rust_cleaned_test_functions.jsonl/31666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
25637,
761,
6209,
368,
341,
286,
1077,
18279,
6744,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
18630,
6744,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_lockout() {
let (_vote_pubkey, vote_account) = create_test_account();
let mut vote_state: VoteState =
StateMut::<VoteStateVersions>::state(&*vote_account.borrow())
.unwrap()
.convert_to_current();
for i in 0..(MAX_LOCKOUT... | rust_cleaned_test_functions.jsonl/43732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
9818,
411,
368,
341,
286,
1077,
5453,
29358,
34014,
792,
11,
6910,
13500,
8,
284,
1855,
4452,
13500,
1428,
286,
1077,
5206,
6910,
4387,
25,
34034,
1397,
4035,
310,
3234,
51440,
27638,
41412... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_face_landmark_detection() {
initialize();
let rect = DETECTOR.face_locations(&OBAMA_1_MATRIX)[0];
PREDICTOR.face_landmarks(&OBAMA_1_MATRIX, &rect);
} | rust_cleaned_test_functions.jsonl/32177 | {
"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,
30985,
60506,
3987,
57505,
368,
341,
262,
9468,
543,
262,
1077,
7608,
284,
40243,
35411,
46031,
45032,
2099,
20608,
38100,
62,
16,
58376,
6620,
15,
4821,
262,
393,
6504,
14805,
868,
46031,
60506,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_extend() {
let mut range = 0..10;
let mut array: ArrayVec<[_; 5]> = range.by_ref().collect();
assert_eq!(&array[..], &[0, 1, 2, 3, 4]);
assert_eq!(range.next(), Some(5));
array.extend(range.by_ref());
assert_eq!(range.next(), Some(6));
let mut array: ArrayVec<[_; 1... | rust_cleaned_test_functions.jsonl/36766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
368,
341,
262,
1077,
5206,
2088,
284,
220,
15,
496,
16,
15,
401,
262,
1077,
5206,
1334,
25,
2910,
10050,
27,
13496,
26,
220,
20,
25669,
284,
2088,
19007,
7793,
1005,
17384,
543,
262,
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_stake_state_stake_from_fail() {
let mut stake_account = Account::new(0, std::mem::size_of::<StakeState>(), &id());
stake_account
.set_state(&StakeState::default())
.expect("set_state");
assert_eq!(StakeState::stake_from(&stake_account), None);
... | rust_cleaned_test_functions.jsonl/39431 | {
"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,
1261,
726,
4387,
1261,
726,
5673,
22121,
368,
341,
286,
1077,
5206,
18279,
13500,
284,
8615,
486,
931,
7,
15,
11,
1460,
486,
10536,
486,
2141,
3575,
27638,
623,
726,
1397,
39019,
609,
307,
5231,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_only_usage() {
let mut opts = Options::new();
opts.long_only(true);
opts.optflag("k", "kiwi", "Description");
opts.optflag("a", "apple", "Description");
let expected = "Usage: fruits
Options:
-k, -kiwi Description
-a, -apple Description
";
... | rust_cleaned_test_functions.jsonl/52400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
18410,
31507,
368,
341,
262,
1077,
5206,
12185,
284,
14566,
486,
931,
543,
262,
12185,
23510,
18410,
3715,
317,
262,
12185,
28102,
9903,
445,
74,
497,
330,
6642,
16632,
497,
330,
5009,
797,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_requested_payment_cannot_be_released() {
new_test_ext().execute_with(|| {
let payment_amount = 20;
assert_ok!(Payment::request_payment(
Origin::signed(PAYMENT_RECIPENT),
PAYMENT_CREATOR,
CURRENCY_ID,
payment_amount,
));
// requested payment cannot be released
assert_noop... | rust_cleaned_test_functions.jsonl/111993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72709,
26696,
666,
3401,
21263,
1288,
4673,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
8160,
13471,
284,
220,
17,
15,
401,
197,
6948,
19817,
10297,
20188,
486,
2035,
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... | 2 |
#[test]
fn test_box_via_extern_rust() {
let hdr = indoc! {"
#include <cxx.h>
struct Foo;
inline void take_box(rust::Box<Foo>) {
}
"};
run_test_ex(
"",
hdr,
quote! {
ffi::take_box(Box::new(Foo { a: "Hello".into() }))
},
... | rust_cleaned_test_functions.jsonl/9936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10194,
80710,
62,
4301,
1710,
590,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
89073,
860,
397,
286,
2036,
33428,
280,
286,
7381,
737,
1896,
10194,
2601,
590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_truncated_trailing_record_is_ignored() {
let mut log = new_record_test();
log.write("foo");
log.shrink_size(4);
assert_eq!(EOF, log.read());
assert_eq!(0, log.dropped_bytes());
assert_eq!("", log.reported_msg());
} | rust_cleaned_test_functions.jsonl/46690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
38007,
3547,
14277,
14192,
6892,
62,
58471,
368,
341,
286,
1077,
5206,
1487,
284,
501,
14192,
4452,
543,
286,
1487,
3836,
445,
7975,
797,
286,
1487,
2395,
34365,
2368,
7,
19,
1215,
715,
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_components1() {
let point = Point2::new(1_i32, 2_i32);
assert_eq!(point[0], 1_i32);
assert_eq!(point[1], 2_i32);
} | rust_cleaned_test_functions.jsonl/4533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23258,
16,
368,
341,
286,
1077,
1459,
284,
5126,
17,
486,
931,
7,
16,
5318,
18,
17,
11,
220,
17,
5318,
18,
17,
626,
286,
2060,
10714,
10297,
2768,
58,
15,
1125,
220,
16,
5318,
18,
17,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_leader_election_with_check_quorum() {
let l = default_logger();
let mut a = new_test_raft(1, vec![1, 2, 3], 10, 1, new_storage(), &l);
let mut b = new_test_raft(2, vec![1, 2, 3], 10, 1, new_storage(), &l);
let mut c = new_test_raft(3, vec![1, 2, 3], 10, 1, new_storage(), &l);
... | rust_cleaned_test_functions.jsonl/19120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 890
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
2204,
1170,
6615,
7200,
11280,
33006,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
264,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_accountsdb_latest_ancestor() {
morgan_logger::setup();
let paths = get_tmp_accounts_path!();
let db = AccountsDB::new(&paths.paths);
let key = Pubkey::default();
let account0 = Account::new(1, 0, 0, &key);
db.store(0, &[(&key, &account0)]);
... | rust_cleaned_test_functions.jsonl/49123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
64880,
62,
66878,
368,
341,
286,
296,
8462,
27413,
486,
15188,
543,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
2927,
284,
40655,
3506,
486,
931,
2099,
21623,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_disassemble_jpx() {
assert_eq!(
disassemble_word(
Unsigned36Bit::try_from(0o700_603_377_752_u64)
.expect("test data should be in range")
),
Ok(SymbolicInstruction {
operand_address: OperandAddress::Di... | rust_cleaned_test_functions.jsonl/44850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 606
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
69108,
5374,
1767,
368,
341,
286,
2060,
10714,
33673,
310,
827,
69108,
13533,
1006,
394,
97747,
18,
21,
8344,
486,
1539,
5673,
7,
15,
78,
22,
15,
15,
62,
21,
15,
18,
62,
18,
22,
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_can_load_grammar() {
let mut parser = tree_sitter::Parser::new();
parser
.set_language(super::language())
.expect("Error loading scss language");
} | rust_cleaned_test_functions.jsonl/73679 | {
"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,
27421,
12411,
62,
41094,
368,
341,
286,
1077,
5206,
6729,
284,
4916,
643,
3248,
486,
6570,
486,
931,
543,
286,
6729,
198,
310,
659,
746,
29021,
56040,
486,
11528,
2398,
310,
659,
17119,
445,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_packet_receiver_iter() {
let buff = serde_eetf::to_bytes(&TestCommand { int8: 100 }).unwrap();
let mut size_buff = Vec::new();
size_buff
.write_u32::<BigEndian>(buff.len() as u32)
.expect("write data size failed");
size_buff.extend_from_sl... | rust_cleaned_test_functions.jsonl/121756 | {
"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,
21078,
65691,
11723,
368,
341,
286,
1077,
11522,
284,
61570,
2204,
295,
69,
486,
983,
12524,
2099,
2271,
4062,
314,
526,
23,
25,
220,
16,
15,
15,
8533,
15454,
1428,
286,
1077,
5206,
1379,
29328,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_one_validator() {
let sandbox = timestamping_sandbox_builder().with_validators(1).build();
let sandbox_state = SandboxState::new();
add_one_height(&sandbox, &sandbox_state);
sandbox.assert_state(Height(2), Round(1));
} | rust_cleaned_test_functions.jsonl/83608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11667,
64959,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
28532,
1005,
4197,
8337,
2973,
7,
16,
568,
5834,
543,
262,
1077,
42754,
4387,
284,
96860,
1397,
486,
931,
1428,
262,
912,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mock_with_body() {
let _m = mock("GET", "/").with_body("hello").create();
let (_, _, body) = request("GET /", "");
assert_eq!("hello", body);
} | rust_cleaned_test_functions.jsonl/82398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34134,
6615,
14114,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
1827,
4197,
14114,
445,
14990,
1827,
3182,
1428,
262,
1077,
39464,
8358,
2487,
8,
284,
1681,
445,
3806,
608,
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 |
#[test]
fn test_view_from_shape() {
let s = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
let a = ArrayView::from_shape((2, 3, 2), &s).unwrap();
let mut answer = Array::from(s.to_vec()).into_shape((2, 3, 2)).unwrap();
assert_eq!(a, answer);
let a = ArrayView::from_shape((2, 3, 2).strides((6,... | rust_cleaned_test_functions.jsonl/92621 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7122,
5673,
13597,
368,
341,
262,
1077,
274,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_bypass_locks() {
let engine = TestEngineBuilder::new().build().unwrap();
let (key, val) = (b"foo", b"bar");
must_prewrite_put(&engine, key, val, key, 10);
must_commit(&engine, key, 10, 20);
must_prewrite_delete(&engine, key, key, 30);
let sn... | rust_cleaned_test_functions.jsonl/45613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
880,
49911,
9818,
82,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
286,
1077,
320,
792,
11,
1044,
8,
284,
320,
65,
1,
7975,
497,
293,
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... | 1 |
#[test]
fn test_new_behavior_previously_stuck() {
// any stake accounts activated and deactivated at the same epoch
do_test(
OldDeactivationBehavior::Stuck,
true,
&[
(0, 0, 0),
(0, 0, 0)... | rust_cleaned_test_functions.jsonl/65844 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
74540,
10442,
18281,
1261,
1942,
368,
341,
310,
442,
894,
18279,
9618,
21985,
323,
83616,
518,
279,
1852,
16342,
198,
39865,
310,
653,
4452,
1006,
394,
10621,
1912,
23002,
22753,
486,
623,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_internally_b_ser() {
let v = EnumStructInternally::VariantB {
foo: 1,
bar: 2,
};
let e = "(type:\"VariantB\",foo:1,bar:2,)";
test_ser(&v, e);
} | rust_cleaned_test_functions.jsonl/110470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
932,
745,
880,
75861,
368,
341,
262,
1077,
348,
284,
14086,
9422,
67916,
745,
486,
20746,
33,
341,
286,
15229,
25,
220,
16,
345,
286,
3619,
25,
220,
17,
345,
262,
2605,
262,
1077,
384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_partition_size_2_8_4096_2() {
let _partition_size = gen_partition_size(2.0, 8, 4096.0, 2);
} | rust_cleaned_test_functions.jsonl/7866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
43840,
2368,
62,
17,
62,
23,
62,
19,
15,
24,
21,
62,
17,
368,
341,
286,
1077,
716,
40998,
2368,
284,
4081,
43840,
2368,
7,
17,
13,
15,
11,
220,
23,
11,
220,
19,
15,
24,
21,
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 |
#[test]
fn test_preserve_order() {
// Sorted order
#[cfg(not(feature = "preserve_order"))]
const EXPECTED: &[&str] = &["a", "b", "c"];
// Insertion order
#[cfg(feature = "preserve_order")]
const EXPECTED: &[&str] = &["b", "a", "c"];
let v: Value = from_str(r#"{"b":null,"a":null,"c"... | rust_cleaned_test_functions.jsonl/90438 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32116,
5852,
7869,
368,
341,
262,
442,
52688,
1973,
198,
262,
11506,
14072,
24772,
27062,
284,
330,
92882,
7869,
2761,
921,
262,
733,
8921,
1479,
25,
44590,
5,
495,
60,
284,
609,
1183,
64,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter() {
let mut list = List::new(FooAdaptor);
list.push_back(Rc::new(Foo::new(1)));
list.push_back(Rc::new(Foo::new(2)));
list.push_back(Rc::new(Foo::new(3)));
list.push_back(Rc::new(Foo::new(4)));
let mut cursor = list.cursor();
let mut ... | rust_cleaned_test_functions.jsonl/68047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
368,
341,
286,
1077,
5206,
1140,
284,
1759,
486,
931,
7832,
2624,
2589,
32657,
317,
286,
1140,
2552,
3895,
2785,
66,
486,
931,
7832,
2624,
486,
931,
7,
16,
4945,
286,
1140,
2552,
3895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_roundtrip_stream_nested_dict_of_map_of_dict() {
let values = StringArray::from(vec![Some("a"), None, Some("b"), Some("c")]);
let value_dict_keys = Int8Array::from_iter_values([0, 1, 1, 2, 3, 1]);
let value_dict_array =
DictionaryArray::<Int8Type>::try_new(&val... | rust_cleaned_test_functions.jsonl/48763 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
12673,
66279,
5243,
3575,
5376,
3575,
5243,
368,
341,
286,
1077,
2750,
284,
923,
1857,
486,
1499,
25592,
20703,
8373,
445,
64,
3975,
2240,
11,
4329,
445,
65,
3975,
4329,
445,
66,
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... | 1 |
#[test]
fn test_circle_merging() {
let mut c1 = CircleOfPoints::new(
Circle::from_coordinate(&Coordinate2D::new(1.0, 1.0), 1.0),
1,
TimeInterval::default(),
Default::default(),
)
.unwrap();
let c2 = CircleOfPoints::new(
... | rust_cleaned_test_functions.jsonl/127521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42222,
717,
95296,
368,
341,
286,
1077,
5206,
272,
16,
284,
21224,
2124,
11411,
486,
931,
1006,
310,
21224,
486,
1499,
68649,
2099,
28589,
17,
35,
486,
931,
7,
16,
13,
15,
11,
220,
16,
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,
1... | 1 |
#[test]
fn test_bootstrap_empty_storage_with_first_two_blocks_and_check_result_json_metadata() {
init_test_runtime();
// init empty context for test
let (chain_id, genesis_block_header, genesis_additional_data, result) =
init_test_protocol_context(
"bootstrap_test_storage_10",
... | rust_cleaned_test_functions.jsonl/8658 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88424,
15124,
23310,
6615,
12978,
23241,
25201,
8378,
7200,
5287,
9455,
22220,
368,
341,
262,
2930,
4452,
33232,
1428,
262,
442,
2930,
4287,
2266,
369,
1273,
198,
262,
1077,
320,
8819,
842,
11,
59... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negative_padding() {
new_ucmd!()
.args(&["--from=si", "--padding=-8"])
.pipe_in("1K\n1.1M\n0.1G")
.run()
.stdout_is("1000 \n1100000 \n100000000\n");
} | rust_cleaned_test_functions.jsonl/45993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53865,
40726,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
1499,
28,
6321,
497,
14482,
9571,
10829,
23,
14108,
286,
659,
13768,
1243,
445,
16,
42,
1699,
16,
13,
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_fizzbuzz_to_thirty() {
assert_eq!(
"1\n\
2\n\
fizz\n\
4\n\
buzz\n\
fizz\n\
7\n\
8\n\
fizz\n\
buzz\n\
11\n\
fizz\n\
13\n\... | rust_cleaned_test_functions.jsonl/73681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
8759,
86126,
2346,
5854,
16531,
368,
341,
286,
2060,
10714,
33673,
310,
330,
16,
1699,
5661,
1797,
220,
17,
1699,
5661,
1797,
86979,
1699,
5661,
1797,
220,
19,
1699,
5661,
1797,
30427,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_format_version() {
assert_eq!(format_version("0.1.0"), "v0.1.0");
assert_eq!(format_version(" 0.1.0 "), "v0.1.0");
assert_eq!(format_version("0.1.0 "), "v0.1.0");
assert_eq!(format_version(" 0.1.0"), "v0.1.0");
assert_eq!(format_version("\"0.1.0\""), "v0.1... | rust_cleaned_test_functions.jsonl/19234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
9438,
368,
341,
286,
2060,
10714,
10297,
2243,
9438,
445,
15,
13,
16,
13,
15,
3975,
330,
85,
15,
13,
16,
13,
15,
797,
286,
2060,
10714,
10297,
2243,
9438,
445,
220,
15,
13,
16,
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,
1... | 1 |
#[test]
fn test_bump_penalty_txn_on_remote_commitment() {
// we're able to claim outputs on remote commitment transaction before timelocks expiration
// Create 2 HTLCs
// Provide preimage for one
// Check aggregation
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanm... | rust_cleaned_test_functions.jsonl/28349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1510,
82286,
92299,
4470,
36425,
36346,
478,
368,
341,
1572,
197,
322,
582,
2299,
2952,
311,
3717,
16275,
389,
8699,
15155,
7745,
1573,
6792,
301,
25183,
31692,
271,
197,
322,
4230,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_basics() {
let mut x = setup();
x.push(None);
x.push(Some(Enum::new("我强爆啊".as_bytes().to_vec(), 2)));
x.push(None);
x.push(Some(Enum::new("我好强啊".as_bytes().to_vec(), 1)));
x.push(Some(Enum::new("我成功了".as_bytes().to_vec(), 3)));
assert_eq!(... | rust_cleaned_test_functions.jsonl/124764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
67981,
368,
341,
286,
1077,
5206,
856,
284,
6505,
543,
286,
856,
2552,
26717,
317,
286,
856,
2552,
65405,
62382,
486,
931,
445,
35946,
99193,
99849,
103924,
3263,
300,
12524,
1005,
983,
13251... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_settings_parser() {
let span = Span::call_site();
let input = ParsedInput {
ident: Ident::new("foo", span),
p: syn::LitInt::new("3", span),
modulus: None,
};
let r = Settings::from_input(input);
assert!(r.is_ok());
... | rust_cleaned_test_functions.jsonl/727 | {
"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,
10853,
18517,
368,
341,
286,
1077,
9390,
284,
11903,
486,
6659,
24507,
1428,
286,
1077,
1946,
284,
393,
18112,
2505,
341,
310,
3524,
25,
22507,
486,
931,
445,
7975,
497,
9390,
1326,
310,
281,
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_string() {
assert_leaf! {
parsers [ string dq_string ]
r#""hello world""# -> 0..13 { String(span(1, 12)) }
}
assert_leaf! {
parsers [ string sq_string ]
r"'hello world'" -> 0..13 { String(span(1, 12)) }
}
} | rust_cleaned_test_functions.jsonl/50648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
368,
341,
286,
2060,
38909,
0,
341,
310,
87073,
508,
914,
71613,
3904,
5133,
310,
435,
2,
3014,
14990,
1879,
3014,
2,
1464,
220,
15,
496,
16,
18,
314,
923,
66092,
7,
16,
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_poh_cache_on_disconnect() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_genesis_co... | rust_cleaned_test_functions.jsonl/39781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 861
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
11529,
4470,
67972,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
50704,
2638,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_different_sizes() {
let fut1 = async move { 10 };
let val = [0u32; 1000];
let fut2 = async move { val[0] };
let fut3 = ZeroSizedFuture {};
assert_eq!(Layout::for_value(&fut1).size(), 1);
assert_eq!(Layout::for_value(&fut2).size(), 4004);
a... | rust_cleaned_test_functions.jsonl/8649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82741,
32159,
368,
341,
286,
1077,
17645,
16,
284,
3312,
3271,
314,
220,
16,
15,
2605,
286,
1077,
1044,
284,
508,
15,
84,
18,
17,
26,
220,
16,
15,
15,
15,
935,
286,
1077,
17645,
17,
284,
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_name_binding() {
assert_eq! {
rune! { bool =>
fn returns_unit(n) {
let a = 100;
}
pub fn main() {
returns_unit(1) is unit
}
},
true,
};
} | rust_cleaned_test_functions.jsonl/112622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1269,
60815,
368,
341,
262,
2060,
10714,
0,
341,
286,
63499,
0,
314,
1807,
6274,
310,
5168,
4675,
14832,
1445,
8,
341,
394,
1077,
264,
284,
220,
16,
15,
15,
280,
310,
555,
310,
6675,
5168,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_blob_url() {
for url in invalid_blob_urls() {
println!("{:?}", url);
assert!(BlobUrl::new(url).is_err());
}
for url in valid_blob_urls() {
let url = BlobUrl::new(url).expect("invalid blob URL");
assert_eq!(url.account(), S... | rust_cleaned_test_functions.jsonl/81897 | {
"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,
45908,
2903,
368,
341,
286,
369,
2515,
304,
8318,
45908,
32822,
368,
341,
310,
13751,
88928,
25,
52652,
2515,
317,
310,
2060,
10297,
37985,
2864,
486,
931,
6522,
568,
285,
9266,
1423,
286,
555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_message_unique_program_ids_not_adjacent() {
let program_id0 = Pubkey::default();
let program_id1 = Pubkey::new_unique();
let program_ids = get_program_ids(&[
Instruction::new_with_bincode(program_id0, &0, vec![]),
Instruction::new_with_bincode(prog... | rust_cleaned_test_functions.jsonl/55515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
21218,
25096,
8077,
7913,
42559,
18181,
368,
341,
286,
1077,
2025,
842,
15,
284,
22611,
792,
486,
2258,
543,
286,
1077,
2025,
842,
16,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_external_table() {
let mut ctx = ExecutionContext::local();
let sql = "CREATE EXTERNAL TABLE new_uk_cities (\
city VARCHAR(100), \
lat DOUBLE, \
lng DOUBLE) \
STORED AS CSV \
WIT... | rust_cleaned_test_functions.jsonl/2504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
47432,
5237,
368,
341,
286,
1077,
5206,
5635,
284,
85451,
486,
2438,
543,
286,
1077,
5704,
284,
330,
22599,
4063,
18365,
14363,
501,
62,
3101,
666,
1361,
320,
5661,
4293,
3283,
37589,
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... | 1 |
#[test]
fn test_server_rejects_duplicate_sni_names() {
fn duplicate_sni_payload(msg: &mut Message) {
if let MessagePayload::Handshake(hs) = &mut msg.payload {
if let HandshakePayload::ClientHello(ch) = &mut hs.payload {
for mut ext in ch.extensions.iter_mut() {
... | rust_cleaned_test_functions.jsonl/10032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12015,
1288,
583,
82,
70434,
643,
7751,
9187,
368,
341,
262,
5168,
22513,
643,
7751,
32813,
8119,
25,
609,
6984,
4856,
8,
341,
286,
421,
1077,
4856,
29683,
486,
2314,
29661,
3203,
82,
8,
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... | 5 |
#[test]
fn test_col_prune_inner_join() {
assert_j_plan(
"select t2.c0 from t2 join t3 on t2.c1 = t3.c1 and t2.c2 = t3.c2",
|sql, mut plan| {
col_prune(&mut plan.qry_set, plan.root).unwrap();
print_plan(sql, &plan);
let subq = get_lv... | rust_cleaned_test_functions.jsonl/27140 | {
"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,
10211,
5294,
2886,
34345,
31017,
368,
341,
286,
2060,
5374,
26564,
1006,
310,
330,
1742,
259,
17,
520,
15,
504,
259,
17,
5138,
259,
18,
389,
259,
17,
520,
16,
284,
259,
18,
520,
16,
323,
259... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_credential_cache_returns_default_when_not_exists_in_wallet() {
let init = Init::new();
let result = get_rev_reg_cache("test-id");
assert_eq!(result, RevRegCache::default());
} | rust_cleaned_test_functions.jsonl/94545 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
666,
30320,
11529,
58900,
9993,
47636,
7913,
9766,
1243,
62308,
368,
341,
286,
1077,
2930,
284,
15690,
486,
931,
1428,
286,
1077,
1102,
284,
633,
38082,
4920,
11529,
445,
1944,
12897,
797,
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 |
#[test]
fn test_parse_dep_info() {
let deps = "foo: baz.rs abc.rs bar.rs
baz.rs:
abc.rs:
bar.rs:
";
assert_eq!(
pathvec!["abc.rs", "bar.rs", "baz.rs"],
parse_dep_info(&deps, "")
);
} | rust_cleaned_test_functions.jsonl/8165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
49258,
3109,
368,
341,
286,
1077,
48178,
284,
330,
7975,
25,
50247,
25638,
39022,
25638,
3619,
25638,
271,
42573,
25638,
1447,
13683,
25638,
1447,
2257,
25638,
510,
876,
286,
2060,
10714,
336... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lollipop_graph() -> Result<()> {
let mut lollipop_graph = Graph::generate_lollipop_graph(
None,
Some(100), // 9900 edges
Some(100), // 198 edges
None,
None,
None,
None,
None,
None,
None,
None,
Non... | rust_cleaned_test_functions.jsonl/44608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
89544,
14738,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
326,
89544,
14738,
284,
12165,
486,
19366,
907,
89544,
14738,
1006,
286,
2240,
345,
286,
4329,
7,
16,
15,
15,
701,
442,
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_tangent_line_to_line() {
let line = BoundedQuadratic::new(0., 1., 0., 1., 1.);
let expected_tangent_line = line.extend_domain();
assert_eq!(line.get_tangent_line_at(0.5), expected_tangent_line);
assert_eq!(line.get_tangent_line_at(0.3), expected_tangent_line);
... | rust_cleaned_test_functions.jsonl/19861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
66451,
6528,
2346,
6528,
368,
341,
286,
1077,
1555,
284,
425,
13082,
2183,
88678,
486,
931,
7,
15,
2572,
220,
16,
2572,
220,
15,
2572,
220,
16,
2572,
220,
16,
58957,
286,
1077,
3601,
528,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cityhash64_with_seed_u8() -> Result<()> {
let to_hash = vec![10u8, 11, 12];
let seeds = vec![1u64, 2, 3];
let mut expected_result = Vec::with_capacity(to_hash.len());
for i in 0..3 {
let v = to_hash[i];
let hashed = cityhash64_with_seed(&[v], seeds[i]);
ex... | rust_cleaned_test_functions.jsonl/130777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24971,
8296,
21,
19,
6615,
33809,
7300,
23,
368,
1464,
5714,
71698,
341,
262,
1077,
311,
8950,
284,
7486,
20703,
16,
15,
84,
23,
11,
220,
16,
16,
11,
220,
16,
17,
935,
262,
1077,
19056,
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... | 4 |
#[test]
fn test_exchange_x_sha256_is_symmetric() {
let mut rng = ThreadRng256 {};
for _ in 0..ITERATIONS {
let sk_a = SecKey::gensk(&mut rng);
let pk_a = sk_a.genpk();
let sk_b = SecKey::gensk(&mut rng);
let pk_b = sk_b.genpk();
assert... | rust_cleaned_test_functions.jsonl/133306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
3212,
48836,
17,
20,
21,
6892,
26825,
15903,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
20375,
286,
369,
716,
304,
220,
15,
496,
24733,
21792,
341,
310,
1077,
190... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_established_send_buf_gt_win() {
let mut data = [0; 32];
for (i, elem) in data.iter_mut().enumerate() {
*elem = i as u8
}
let mut s = socket_established();
s.remote_win_len = 16;
s.send_slice(&data[..]).unwrap();
recv!(s, [TcpRe... | rust_cleaned_test_functions.jsonl/1723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18583,
5102,
291,
13565,
10363,
37479,
25672,
368,
341,
286,
1077,
5206,
821,
284,
508,
15,
26,
220,
18,
17,
935,
286,
369,
320,
72,
11,
11750,
8,
304,
821,
19471,
29523,
1005,
76569,
368,
341... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_2() {
let mut input = vec![
28, 33, 18, 42, 31, 14, 46, 20, 48, 47, 24, 23, 49, 45, 19, 38, 39, 11, 1, 32, 25, 35,
8, 17, 7, 9, 4, 2, 34, 10, 3,
];
input.push(0);
input.push(input.iter().max().unwrap() + 3);
input.sort();
as... | rust_cleaned_test_functions.jsonl/114706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
368,
341,
286,
1077,
5206,
1946,
284,
7486,
90515,
310,
220,
17,
23,
11,
220,
18,
18,
11,
220,
16,
23,
11,
220,
19,
17,
11,
220,
18,
16,
11,
220,
16,
19,
11,
220,
19,
21,
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_compare_and_swap_multi() {
let mut io_loop = Runtime::new().unwrap();
let (bg, mut client, origin) = create_sig0_ready_client(&mut io_loop);
// create a record
let mut current = RecordSet::with_ttl(
Name::from_str("new.example.com").unwrap(),
RecordType::A,
... | rust_cleaned_test_functions.jsonl/33941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
8378,
40991,
25133,
368,
341,
262,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1005,
15454,
543,
262,
1077,
320,
12220,
11,
5206,
2943,
11,
6238,
8,
284,
1855,
29252,
15,
35456,
8179,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let x:Testproto = Testproto::Message { a: 10, b: 15, c: Arr::new(vec!["hi".to_string()]) };
let mut buf:Vec<u8> = Vec::new();
assert!(Testproto::encode(&x, &mut buf).unwrap() == 20);
} | rust_cleaned_test_functions.jsonl/69298 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
368,
341,
286,
1077,
856,
25,
2271,
15110,
284,
3393,
15110,
486,
2052,
314,
264,
25,
220,
16,
15,
11,
293,
25,
220,
16,
20,
11,
272,
25,
18418,
486,
931,
25592,
0,
1183,
6023,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_with_root_path() {
let config = helpers::mock_config("/path", "tmp");
let ignore = Ignore::new(&config);
// Don't ignore these
assert!(!ignore.should_ignore(&Path::new("something")));
assert!(!ignore.should_ignore(&Path::new("/path/something")));
... | rust_cleaned_test_functions.jsonl/60604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
6615,
12993,
2638,
368,
341,
286,
1077,
2193,
284,
30187,
486,
16712,
5332,
4283,
2343,
497,
330,
5173,
797,
286,
1077,
10034,
284,
38971,
486,
931,
2099,
1676,
626,
286,
442,
4320,
944,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_event_handling_err_and_hup() {
let mut event_manager = EventManager::new().unwrap();
let serial_in_out = SharedBuffer::new();
let mut serial = Serial::new_in_out(
EventFd::new(libc::EFD_NONBLOCK).unwrap(),
Box::new(serial_in_out.clone()),
... | rust_cleaned_test_functions.jsonl/37131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6748,
75642,
9266,
8378,
1523,
454,
368,
341,
286,
1077,
5206,
1538,
12144,
284,
3665,
2043,
486,
931,
1005,
15454,
543,
286,
1077,
6146,
1243,
6068,
284,
16990,
4095,
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_groupby_floats() {
let df = df! {"flt" => [1., 1., 2., 2., 3.],
"val" => [1, 1, 1, 1, 1]
}
.unwrap();
let res = df.groupby("flt").unwrap().sum().unwrap();
let res = res.sort("flt", false).unwrap();
assert_eq!(
Vec::f... | rust_cleaned_test_functions.jsonl/43513 | {
"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,
6288,
1694,
17586,
82,
368,
341,
286,
1077,
6764,
284,
6764,
0,
5212,
79209,
1,
589,
508,
16,
2572,
220,
16,
2572,
220,
17,
2572,
220,
17,
2572,
220,
18,
13,
1259,
503,
330,
831,
1,
589,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_branch_create_no_version() {
let mut hdr: VecxVs<String> = VecxVs::new();
let bn = BranchName(b"test");
let vn = VersionName(b"test1");
unsafe {
pnk!(hdr.branch_create_without_new_version(bn, false));
}
assert!(hdr.branch_exists(INITIAL_BRANCH_NAME));
assert!(... | rust_cleaned_test_functions.jsonl/49979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28031,
8657,
6536,
9438,
368,
341,
262,
1077,
5206,
36615,
25,
11312,
87,
51737,
3464,
29,
284,
11312,
87,
51737,
486,
931,
543,
262,
1077,
40597,
284,
25119,
675,
1883,
1,
1944,
797,
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_format_args() {
let mut s = String::new();
writedoc!(
s,
"
{}
{}
",
0,
0,
)
.unwrap();
let expected = "0\n0\n";
assert_eq!(s, expected);
} | rust_cleaned_test_functions.jsonl/60014 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
8384,
368,
341,
262,
1077,
5206,
274,
284,
923,
486,
931,
543,
262,
2107,
291,
509,
33673,
286,
274,
345,
286,
6228,
286,
5613,
286,
5613,
286,
21796,
286,
220,
15,
345,
286,
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_try_fold_wraparound() {
let mut v = VecDeque::with_capacity(8);
v.push_back(7);
v.push_back(8);
v.push_back(9);
v.push_front(2);
v.push_front(1);
let mut iter = v.iter();
let _ = iter.find(|&&x| x == 2);
assert_eq!(Some(&7), iter.next());
} | rust_cleaned_test_functions.jsonl/73749 | {
"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,
53283,
61187,
38550,
19454,
368,
341,
262,
1077,
5206,
348,
284,
11312,
73891,
486,
4197,
35603,
7,
23,
317,
262,
348,
2552,
3895,
7,
22,
317,
262,
348,
2552,
3895,
7,
23,
317,
262,
348,
2552,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deserialize_wrong_type() {
let value = toml::toml! {
foo = 1
};
let deserializer = ValueDeserializer::new(&value);
#[derive(Debug, Deserialize)]
#[allow(dead_code)]
struct Sample {
foo: String,
}
let result... | rust_cleaned_test_functions.jsonl/67389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
75198,
1819,
368,
341,
286,
1077,
897,
284,
311,
1014,
486,
37401,
75,
0,
341,
310,
15229,
284,
220,
16,
198,
286,
2605,
286,
1077,
939,
41939,
284,
5162,
80097,
486,
931,
2099,
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_setup_console_socket() {
let init = setup("test_setup_console_socket");
assert!(init.is_ok());
let (testdir, rundir_path, socket_path) = init.unwrap();
let lis = UnixListener::bind(Path::join(&testdir, "console-socket"));
assert!(lis.is_ok());
let ... | rust_cleaned_test_functions.jsonl/69945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
51724,
19555,
368,
341,
286,
1077,
2930,
284,
6505,
445,
1944,
21363,
51724,
19555,
797,
286,
2060,
10297,
2327,
2079,
19817,
1423,
286,
1077,
320,
1944,
3741,
11,
40897,
404,
2638,
11,
757... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_bits_strict() {
let negone = Scalar::one().neg();
let mut cs = TestConstraintSystem::new();
let n = AllocatedNum::alloc(&mut cs, || Ok(negone)).unwrap();
n.to_bits_le_strict(&mut cs).unwrap();
assert!(cs.is_satisfied());
// make the bit re... | rust_cleaned_test_functions.jsonl/119281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
20034,
2895,
849,
368,
341,
286,
1077,
4184,
603,
284,
35176,
486,
603,
1005,
28775,
1428,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
486,
931,
1428,
286,
1077,
308,
284,
1674,
39463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_process_new_vote_state_slot_smaller_than_root() {
let mut vote_state1 = VoteState::default();
let root_slot = 5;
let bad_votes: VecDeque<Lockout> = vec![
Lockout {
slot: root_slot,
confirmation_count: 2,
},
... | rust_cleaned_test_functions.jsonl/6119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 856
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
5921,
54360,
4387,
27563,
15874,
13956,
51613,
12993,
368,
341,
286,
1077,
5206,
6910,
4387,
16,
284,
34034,
1397,
486,
2258,
543,
286,
1077,
3704,
27563,
284,
220,
20,
401,
286,
1077,
3873... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_connected_components_four_chessboard() {
let image = chessboard(30, 30);
let components = connected_components(&image, Four, Luma::black());
let max_component = components.pixels().map(|p| p[0]).max();
assert_eq!(max_component, Some(450u32));
} | rust_cleaned_test_functions.jsonl/114780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43276,
23258,
56142,
4138,
433,
2482,
368,
341,
286,
1077,
2168,
284,
32719,
2482,
7,
18,
15,
11,
220,
18,
15,
317,
286,
1077,
6813,
284,
8433,
23258,
2099,
1805,
11,
13322,
11,
444,
13416,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_single_constant_node() {
let rpn_nodes = vec![RpnExpressionNode::Constant {
value: ScalarValue::Real(Some(1.5)),
field_type: {
let mut ft = FieldType::new();
ft.as_mut_accessor().set_tp(FieldTypeTp::Double);
ft
... | rust_cleaned_test_functions.jsonl/121506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
19487,
34967,
5084,
368,
341,
286,
1077,
435,
19958,
14896,
284,
7486,
20703,
49,
19958,
9595,
1955,
486,
15472,
341,
310,
897,
25,
35176,
1130,
486,
12768,
65405,
7,
16,
13,
20,
6965,
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_empty_array_dynamic() {
let data = vec![0x80];
let parsed: ParsedArray<super::ParsedArraySizeDynamic> =
ParsedArray::deserialize_data(&data).expect("Failed to parse");
assert_eq!(parsed.len(), 0);
let serialized = parsed.serialize_data().expect("Failed... | rust_cleaned_test_functions.jsonl/10816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
3858,
45992,
368,
341,
286,
1077,
821,
284,
7486,
20703,
15,
87,
23,
15,
935,
286,
1077,
15676,
25,
393,
18112,
1857,
27,
9522,
486,
82959,
1857,
1695,
21752,
29,
4035,
310,
393,
18112,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_padding() {
let cmd = ChanCmd::PADDING;
assert_eq!(Into::<u8>::into(cmd), 0_u8);
fbody(cmd, "", &msg::Padding::default().into());
} | rust_cleaned_test_functions.jsonl/6037 | {
"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,
40726,
368,
341,
262,
1077,
5439,
284,
41302,
15613,
486,
47,
52478,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
220,
15,
7300,
23,
626,
262,
282,
2599,
14160,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pe_64() -> Result<(), Error> {
let view = ByteView::open(fixture("windows/CrashWithException.exe"))?;
let object = Object::parse(&view)?;
insta::assert_debug_snapshot!(object, @r###"
⋮Pe(
⋮ PeObject {
⋮ code_id: Some(
⋮ CodeId(5c9e09599000),
⋮ ... | rust_cleaned_test_functions.jsonl/82883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36367,
62,
21,
19,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
1651,
284,
10906,
851,
486,
2508,
94886,
445,
27077,
11295,
81,
988,
2354,
1354,
19399,
2761,
37445,
262,
1077,
1633,
284,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_noto_sans() {
run_test(
&TEST_DATA,
"directwrite/good-noto-sans.pa",
"noto/NotoSansGurmukhi-Regular.ttf",
&[JOINER_GLYPH_INDEX],
0,
);
} | rust_cleaned_test_functions.jsonl/91204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
2072,
643,
596,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
19798,
4934,
4846,
1386,
29169,
78,
1331,
596,
56875,
756,
503,
330,
1921,
78,
20290,
2072,
46882,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.