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_slack_user_name() {
let (mut users, _temp) = new_test();
users.insert("some-git-user", "the-slacker").unwrap();
assert_eq!(
Some("the-slacker".into()),
users.slack_user_name("some-git-user")
);
assert_eq!(
Some("@the-s... | rust_cleaned_test_functions.jsonl/36271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11886,
473,
3317,
1269,
368,
341,
286,
1077,
320,
6984,
3847,
11,
716,
3888,
8,
284,
501,
4452,
1428,
286,
3847,
7030,
445,
14689,
81749,
8694,
497,
330,
1782,
58097,
9683,
1827,
15454,
1428,
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_handle_heartbeat_resp() {
let l = default_logger();
let store = new_storage();
store
.wl()
.append(&[empty_entry(1, 1), empty_entry(2, 2), empty_entry(3, 3)])
.unwrap();
let mut sm = new_test_raft(1, vec![1, 2], 5, 1, store, &l);
sm.become_candidate();... | rust_cleaned_test_functions.jsonl/19109 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 605
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
62,
72471,
35160,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
3553,
284,
501,
23310,
543,
262,
3553,
198,
286,
659,
26417,
741,
286,
659,
5090,
2099,
58,
3194,
9078,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exec_mode_payload() {
let mut evt: pt_event = unsafe { mem::zeroed() };
evt.type_ = pt_event_type_ptev_exec_mode;
evt.variant.exec_mode = pt_event__bindgen_ty_1__bindgen_ty_8 {
ip: 11,
mode: pt_exec_mode_ptem_32bit
};
let payload: ... | rust_cleaned_test_functions.jsonl/81003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
7302,
32813,
368,
341,
286,
1077,
5206,
12358,
25,
10817,
6748,
284,
19860,
314,
1833,
486,
14154,
291,
368,
2605,
286,
12358,
4852,
62,
284,
10817,
6748,
1819,
20124,
5120,
18430,
7302,
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... | 2 |
#[test]
fn test_ecdsa() {
let pubk = ECPointAffine256 {
x: Bignum256([0x4f33f883, 0xffdc3ff2, 0x836af311, 0x38b3c0c0, 0xe34e8a8d, 0x919b1318, 0x57bc232f, 0x91c89152]),
y: Bignum256([0x375c37c9, 0x8e1e4703, 0xf91b2e47, 0x09788b02, 0x724d2c63, 0x23f98d7a, 0xbc3c93e6, 0x94cee68f]),
... | rust_cleaned_test_functions.jsonl/9432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 705
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
368,
341,
286,
1077,
6675,
74,
284,
20633,
2609,
25841,
482,
17,
20,
21,
341,
310,
856,
25,
425,
92160,
17,
20,
21,
2561,
15,
87,
19,
69,
18,
18,
69,
23,
23,
18,
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... | 1 |
#[test]
fn test_hmac_encryption() {
let key = generate_key();
let test_value = Uuid::new_v4().to_string();
let enc_hash = encrypt_and_hmac(&key, &test_value).unwrap();
let decrypted = decrypt_and_verify(&key, &enc_hash).unwrap();
assert_eq!(test_value, decrypted);
} | rust_cleaned_test_functions.jsonl/25003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
11948,
13781,
15597,
368,
341,
286,
1077,
1376,
284,
6923,
3097,
543,
286,
1077,
1273,
3142,
284,
547,
2423,
486,
931,
2273,
19,
1005,
983,
3904,
543,
286,
1077,
3209,
8950,
284,
29625,
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_cross_product() {
let result = cross(
&Vector3d { x: 1.0, y: 0.0, z: 0.0 },
&Vector3d { x: 0.0, y: 1.0, z: 0.0 },
);
assert_eq!(result, Vector3d { x: 0.0, y: 0.0, z: 1.0 });
} | rust_cleaned_test_functions.jsonl/48843 | {
"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,
35284,
9840,
368,
341,
286,
1077,
1102,
284,
5312,
1006,
310,
609,
3781,
18,
67,
314,
856,
25,
220,
16,
13,
15,
11,
379,
25,
220,
15,
13,
15,
11,
1147,
25,
220,
15,
13,
15,
1153,
310,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_forwarding_reconnect() {
let (mut cluster, client, call_opt, ctx) = setup_cluster();
let leader = cluster.leader_of_region(1).unwrap();
cluster.stop_node(leader.get_store_id());
let mut req = RawGetRequest::default();
req.set_context(ctx.clone());
// Large timeout value ... | rust_cleaned_test_functions.jsonl/61708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32121,
287,
1288,
6459,
368,
341,
262,
1077,
320,
6984,
10652,
11,
2943,
11,
1618,
15032,
11,
5635,
8,
284,
6505,
28441,
543,
262,
1077,
7653,
284,
10652,
30502,
998,
3575,
20627,
7,
16,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_static_bytes() {
assert_eq!(Binary::from(b"test".as_ref()).len(), 4);
assert_eq!(Binary::from(b"test".as_ref()).as_ref(), b"test");
assert_eq!(Binary::from_slice(b"test".as_ref()).len(), 4);
assert_eq!(Binary::from_slice(b"test".as_ref()).as_ref(), b"test");
} | rust_cleaned_test_functions.jsonl/88997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
12524,
368,
341,
286,
2060,
10714,
10297,
21338,
486,
1499,
1883,
1,
1944,
3263,
300,
7793,
6011,
2892,
1507,
220,
19,
317,
286,
2060,
10714,
10297,
21338,
486,
1499,
1883,
1,
1944,
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_read_custom_charset_format0() {
let n_glyphs = 2;
let data_format0 = [0, 0xAA, 0xBB];
let mut ctxt = ReadScope::new(&data_format0).ctxt();
let format0_charset = ctxt.read_dep::<CustomCharset<'_>>(n_glyphs).unwrap();
match format0_charset {
Cust... | rust_cleaned_test_functions.jsonl/85337 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
15875,
65883,
8955,
15,
368,
341,
286,
1077,
308,
88703,
82,
284,
220,
17,
280,
286,
1077,
821,
8955,
15,
284,
508,
15,
11,
220,
15,
60051,
11,
220,
15,
80197,
935,
286,
1077,
5206,
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... | 2 |
#[test]
fn test_station_vertices() {
let station = stations::hauptbahnhof();
let mut buffer = Vec::new();
station.fill_vertice_buffer(&mut buffer);
assert_relative_eq!(*buffer, [-1385.0, -1812.0])
} | rust_cleaned_test_functions.jsonl/76560 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44798,
37720,
368,
341,
286,
1077,
8056,
284,
17337,
486,
71,
51898,
68143,
16719,
1055,
543,
286,
1077,
5206,
4147,
284,
11312,
486,
931,
543,
286,
8056,
12467,
54000,
558,
7776,
2099,
6984,
4147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_numeric_range() {
context!(ctx, dev);
execute_str!(ctx, b"*NUMRANGE? 0.5" => result, response {
assert_eq!(result, Ok(()));
assert_eq!(response, b"0.5\n");
});
execute_str!(ctx, b"*NUMRANGE? MAX" => result, response {
assert_eq!(result, Ok(()));
as... | rust_cleaned_test_functions.jsonl/82169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29418,
9698,
368,
341,
262,
2266,
10297,
3773,
11,
3483,
317,
262,
9026,
2895,
10297,
3773,
11,
293,
61593,
17488,
49,
11503,
30,
220,
15,
13,
20,
1,
589,
1102,
11,
2033,
341,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commit_style_box_ul() {
_do_test_commit_style_box_ul(&[
"--commit-style",
"blue",
"--commit-decoration-style",
"blue box ul",
]);
} | rust_cleaned_test_functions.jsonl/70061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
15117,
10194,
61039,
368,
341,
286,
716,
2982,
4452,
36346,
15117,
10194,
61039,
2099,
9640,
310,
14482,
17413,
11297,
756,
310,
330,
12203,
756,
310,
14482,
17413,
30266,
11297,
756,
310,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_call_gather_bytes() {
test_interpreter_and_jit_asm!(
"
mov r1, 1
mov r2, 2
mov r3, 3
mov r4, 4
mov r5, 5
syscall BpfGatherBytes
exit",
[],
(
b"BpfGatherBytes" => syscalls::BpfGatherBytes::call; syscal... | rust_cleaned_test_functions.jsonl/59049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
1889,
1856,
12524,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
16,
11,
220,
16,
198,
286,
1974,
435,
17,
11,
220,
17,
198,
286,
1974,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_context() {
let m = Arc::new(AtomicUsize::new(0));
let cnt = Arc::clone(&m);
System::run(move || {
let addr = ContextWait { cnt }.start();
addr.do_send(Ping);
addr.do_send(Ping);
addr.do_send(Ping);
})
.unwrap();
assert_eq!(m.load(Or... | rust_cleaned_test_functions.jsonl/35705 | {
"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,
18760,
8467,
368,
341,
262,
1077,
296,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
1106,
262,
1077,
13195,
284,
19689,
486,
19982,
2099,
76,
626,
262,
739,
486,
6108,
34081,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zip_map_sideffectful() {
let mut xs = [0; 6];
let mut ys = [0; 4];
for _ in xs.iter_mut().map(|x| *x += 1).zip(ys.iter_mut().map(|y| *y += 1)) {}
assert_eq!(&xs, &[1, 1, 1, 1, 1, 0]);
assert_eq!(&ys, &[1, 1, 1, 1]);
let mut xs = [0; 4];
let mut ys = [0; 6];
fo... | rust_cleaned_test_functions.jsonl/8964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42131,
5376,
30862,
1705,
1262,
368,
341,
262,
1077,
5206,
11943,
284,
508,
15,
26,
220,
21,
935,
262,
1077,
5206,
31810,
284,
508,
15,
26,
220,
19,
4821,
262,
369,
716,
304,
11943,
19471,
295... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_statsd_client_as_histogrammed_u64() {
let client: Box<dyn Histogrammed<u64>> = Box::new(StatsdClient::from_sink("prefix", NopMetricSink));
client.histogram("some.histogram", 4).unwrap();
} | rust_cleaned_test_functions.jsonl/10620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
11898,
68564,
2061,
7300,
21,
19,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
82138,
2061,
34837,
21,
19,
2452,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
51567,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parsing_extra_operand() {
let mut v = ZERO_BOUND_HEADER.to_vec();
v.append(&mut vec![0x00, 0x00, 0x01, 0x00]); // OpNop with word count 1
v.append(&mut vec![0x00, 0x00, 0x02, 0x00]); // OpNop with word count 2
v.append(&mut vec![0x00, 0x00, 0x00, 0x00]); // A bogu... | rust_cleaned_test_functions.jsonl/85737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
31858,
69259,
368,
341,
286,
1077,
5206,
348,
284,
54593,
73644,
20330,
2389,
13251,
543,
286,
348,
2057,
2099,
6984,
7486,
20703,
15,
87,
15,
15,
11,
220,
15,
87,
15,
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... | 1 |
#[test]
fn test_initn() {
let mut a = vec![11i, 12, 13];
assert_eq!(a.as_slice().initn(0), &[11, 12, 13]);
a = vec![11i, 12, 13];
assert_eq!(a.as_slice().initn(2), &[11]);
} | rust_cleaned_test_functions.jsonl/33132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
77,
368,
341,
286,
1077,
5206,
264,
284,
7486,
20703,
16,
16,
72,
11,
220,
16,
17,
11,
220,
16,
18,
935,
286,
2060,
10714,
10297,
64,
5357,
26488,
1005,
2327,
77,
7,
15,
701,
44590,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_header() -> Result<(), Error> {
let test_input = "At
-a
-m
";
let test_buf = BufReader::new(test_input.as_bytes());
let mut test_lines = test_buf.lines().peekable();
Ok(parse_header(&mut test_lines)?.1)
} | rust_cleaned_test_functions.jsonl/46224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8757,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1273,
5898,
284,
330,
1655,
271,
7409,
198,
1448,
198,
876,
286,
1077,
1273,
10363,
284,
69013,
5062,
486,
931,
8623,
5898,
5357,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_partial_write() {
// Set up the logger.
let mut data = iobuffer::IoBuffer::new();
let logger = new_test_logger(data.clone());
let (started_send, started_recv) = mpsc::channel();
let (done_send, done_recv) = mpsc::channel();
... | rust_cleaned_test_functions.jsonl/33776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
9165,
368,
341,
286,
442,
2573,
705,
279,
5925,
624,
286,
1077,
5206,
821,
284,
600,
674,
2040,
486,
42799,
4095,
486,
931,
543,
286,
1077,
5925,
284,
501,
4452,
27413,
2592,
15997,
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... | 3 |
#[test]
fn test_tokenizer_equal() {
let config = TokenizerConfig {
dict_type: DictionaryType::Ipadic,
dict_path: None,
user_dict_path: None,
user_dict_type: UserDictionaryType::Csv,
mode: Mode::Decompose(Penalty::default()),
};
... | rust_cleaned_test_functions.jsonl/41386 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
11478,
368,
341,
286,
1077,
2193,
284,
9660,
3135,
2648,
341,
310,
6451,
1819,
25,
10466,
929,
486,
40,
13242,
292,
345,
310,
6451,
2638,
25,
2240,
345,
310,
1196,
5243,
2638,
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_enum_values() {
assert_eq!(BlockType::IntValue.to_isize().unwrap(), ArrayType::Int.to_isize().unwrap());
assert_eq!(BlockType::UintValue.to_isize().unwrap(), ArrayType::Uint.to_isize().unwrap());
assert_eq!(
BlockType::DoubleValue.to_isize().unwrap(),
... | rust_cleaned_test_functions.jsonl/10365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
9146,
368,
341,
286,
2060,
10714,
10297,
4713,
929,
486,
1072,
1130,
2389,
6892,
551,
1005,
15454,
1507,
2910,
929,
486,
1072,
2389,
6892,
551,
1005,
15454,
1423,
286,
2060,
10714,
10297,
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_entry_get_mut() {
let mut map = squares_map();
// Change the entries to cubes.
for i in range(0, SQUARES_UPPER_LIM) {
match map.entry(i) {
Occupied(mut e) => {
*e.get_mut() = i * i * i;
}
Vac... | rust_cleaned_test_functions.jsonl/88438 | {
"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,
9078,
3062,
29523,
368,
341,
286,
1077,
5206,
2415,
284,
31340,
5376,
1428,
286,
442,
10388,
279,
10695,
311,
54104,
624,
286,
369,
600,
304,
2088,
7,
15,
11,
92282,
50,
91703,
2351,
1791,
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... | 3 |
#[test]
fn test_reader() {
let reader = Reader::new(FASTQ_FILE);
let records: Vec<io::Result<Record>> = reader.records().collect();
assert!(records.len() == 1);
for res in records {
let record = res.ok().unwrap();
assert_eq!(record.check(), Ok(()));
... | rust_cleaned_test_functions.jsonl/28242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
368,
341,
286,
1077,
6604,
284,
25166,
486,
931,
7,
59206,
48,
8087,
317,
286,
1077,
7424,
25,
11312,
27,
815,
486,
2077,
27,
6471,
2452,
284,
6604,
64516,
1005,
17384,
543,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_nested_attrs() {
let mut buf = [0; 64];
// write IFLA_XDP with 2 nested attrs
let mut attrs = NestedAttrs::new(&mut buf, IFLA_XDP);
attrs.write_attr(IFLA_XDP_FD as u16, 42u32).unwrap();
attrs
.write_attr(IFLA_XDP_EXPECTED_FD as u16, 24u32)
... | rust_cleaned_test_functions.jsonl/133247 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 945
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
39578,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
26,
220,
21,
19,
4821,
286,
442,
3270,
358,
6126,
32,
6859,
10298,
448,
220,
17,
24034,
16204,
198,
286,
1077,
5206,
16204,
284,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uint_overflow() {
let data = &[0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01];
let _uint = DecodedUInt::read(&mut Cursor::new(data), data.len())
.expect_err("This should have failed due to overflow.");
} | rust_cleaned_test_functions.jsonl/30846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
15807,
79073,
368,
341,
286,
1077,
821,
284,
44590,
15,
87,
15,
16,
11,
220,
15,
87,
17,
18,
11,
220,
15,
87,
19,
20,
11,
220,
15,
87,
21,
22,
11,
220,
15,
87,
23,
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_activate_device() {
let mut d = TestDevices::default();
let core_a = MockDeviceId(1);
let core_b = MockDeviceId(2);
let a = d.add_device(10);
let b = d.add_active_device(core_b, 20).unwrap();
assert_eq!(d.activate_device(1000, |_| core_a).unwrap_er... | rust_cleaned_test_functions.jsonl/19846 | {
"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,
67894,
9204,
368,
341,
286,
1077,
5206,
294,
284,
3393,
40835,
486,
2258,
543,
286,
1077,
6200,
4306,
284,
14563,
6985,
764,
7,
16,
317,
286,
1077,
6200,
880,
284,
14563,
6985,
764,
7,
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,
1,
1... | 1 |
#[test]
fn test_handle_concurrent_frontend_and_backend_changes() {
let actor: ActorID = "cb55260e9d7e457886a4fc73fd949202".try_into().unwrap();
let local1 = UncompressedChange {
actor_id: actor.clone(),
seq: 1,
time: 0,
deps: Vec::new(),
message: None,
has... | rust_cleaned_test_functions.jsonl/22977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2045
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
3382,
3231,
93833,
8378,
40011,
47526,
368,
341,
262,
1077,
12089,
25,
24718,
915,
284,
330,
7221,
20,
20,
17,
21,
15,
68,
24,
67,
22,
68,
19,
20,
22,
23,
23,
21,
64,
19,
8316,
22,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_simple_manager_serialize_deserialize() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let logger: test_utils::TestLogger;
let fee_estimator: test_utils::TestFeeEstimator... | rust_cleaned_test_functions.jsonl/16897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
12144,
88686,
15768,
9050,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
284,
1855,
5084,
18343,
82,
7,
17,
11,
609,
5658... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_node_read_index_to_old_leader() {
let l = default_logger();
let r1 = new_test_raft(1, vec![1, 2, 3], 10, 1, new_storage(), &l);
let r2 = new_test_raft(2, vec![1, 2, 3], 10, 1, new_storage(), &l);
let r3 = new_test_raft(3, vec![1, 2, 3], 10, 1, new_storage(), &l);
let mut... | rust_cleaned_test_functions.jsonl/33964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 958
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5084,
6443,
3560,
2346,
21108,
79991,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
435,
16,
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... | 1 |
#[test]
fn test_get_candles() {
delay();
let client: Public<Sync> = Public::new(SANDBOX_URL);
let end = Utc::now();
let candles = client
.get_candles("BTC-USD", None, Some(end), Granularity::M1)
.unwrap();
assert!(candles[0].0 > candles[1].0);
} | rust_cleaned_test_functions.jsonl/50635 | {
"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,
3062,
666,
20125,
368,
341,
262,
7626,
543,
262,
1077,
2943,
25,
3066,
27,
12154,
29,
284,
3066,
486,
931,
3759,
1093,
3506,
60155,
8000,
317,
262,
1077,
835,
284,
547,
10413,
486,
3328,
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_missing_app() {
let json = br#"
{"response":{
"server":"prod",
"protocol":"3.0"
}}"#;
assert!(parse_json_response(json).is_err());
} | rust_cleaned_test_functions.jsonl/14140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
8191,
368,
341,
262,
1077,
2951,
284,
1411,
2,
698,
4913,
2322,
12602,
330,
4030,
3252,
19748,
756,
330,
17014,
3252,
18,
13,
15,
698,
23386,
2,
280,
262,
2060,
10297,
6400,
9455,
9655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_nonce_must_be_advanceable() {
let (genesis_config, _mint_keypair) = create_genesis_config(100_000_000);
let mut bank = Bank::new_for_tests(&genesis_config);
bank.feature_set = Arc::new(FeatureSet::all_enabled());
let bank = Arc::new(bank);
let nonce_keypai... | rust_cleaned_test_functions.jsonl/28925 | {
"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,
48508,
717,
590,
21263,
98093,
480,
368,
341,
286,
1077,
320,
77894,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
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,
1,
1... | 1 |
#[test]
fn test_poa_normal_update() {
// deploy contract
let mut context = Context::default();
let poa_bin: Bytes = Loader::default().load_binary("poa.strip");
let poa_out_point = context.deploy_cell(poa_bin);
let always_success_out_point = context.deploy_cell(ALWAYS_SUCCESS.clone());
/... | rust_cleaned_test_functions.jsonl/22880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2917
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
19533,
13973,
8882,
368,
341,
262,
442,
10517,
5116,
198,
262,
1077,
5206,
2266,
284,
9608,
486,
2258,
543,
262,
1077,
3193,
64,
21816,
25,
30024,
284,
27811,
486,
2258,
1005,
1078,
31761,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parquet_globbing() -> Result<()> {
// for side effects
init_files();
let _guard = SINGLE_LOCK.lock().unwrap();
let glob = "../../examples/aggregate_multiple_files_in_chunks/datasets/*.parquet";
let df = LazyFrame::scan_parquet(
glob.into(),
ScanArgsParquet {
... | rust_cleaned_test_functions.jsonl/74079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22654,
23300,
95133,
7132,
368,
1464,
5714,
71698,
341,
262,
442,
369,
3108,
6239,
198,
262,
2930,
10931,
543,
262,
1077,
716,
26098,
284,
66759,
27661,
21003,
1005,
15454,
543,
262,
1077,
13206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_encode_packets() {
let b = GetElementAttributesResponse {
title: Some(String::from(
"Lorem ipsum dolor sit amet,\
consectetur adipiscing elit. Nunc eget elit cursus ipsum \
fermentum viverra id vitae lorem. Cras luctus element... | rust_cleaned_test_functions.jsonl/93007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1888
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
63569,
368,
341,
286,
1077,
293,
284,
2126,
1691,
10516,
2582,
341,
310,
2265,
25,
4329,
2242,
486,
1499,
1006,
394,
330,
32783,
26342,
23655,
2444,
27212,
42871,
338,
35140,
57924,
30060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ensure_parachain_running_or_error_liquidated_fails() {
run_test(|| {
ext::security::ensure_parachain_status_running::<Test>
.mock_safe(|| MockResult::Return(Err(Error::ParachainNotRunning)));
assert_err!(
Redeem::ensure_parachain_running_or_error_liqu... | rust_cleaned_test_functions.jsonl/26914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
27289,
22654,
610,
466,
37333,
8734,
4096,
62,
53637,
657,
761,
6209,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1303,
486,
17039,
486,
27289,
22654,
610,
466,
4773,
37333,
27638,
2271,
397,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stdin_negative_23_line() {
new_ucmd!()
.args(&["-n", "-23"])
.pipe_in_fixture(INPUT)
.run()
.stdout_is_fixture("lorem_ipsum_1_line.expected");
} | rust_cleaned_test_functions.jsonl/32756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15656,
258,
53865,
62,
17,
18,
6528,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
77,
497,
6523,
17,
18,
14108,
286,
659,
13768,
1243,
74409,
57911,
340,
286,
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 |
#[test]
fn test_bare() {
assert_leaf! {
parsers [ bare ]
"hello" -> 0..5 { Bare }
}
assert_leaf! {
parsers [ bare ]
"chrome.exe" -> 0..10 { Bare }
}
assert_leaf! {
parsers [ bare ]
r"C:\windows\syst... | rust_cleaned_test_functions.jsonl/46720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
546,
368,
341,
286,
2060,
38909,
0,
341,
310,
87073,
508,
12461,
5133,
310,
330,
14990,
1,
1464,
220,
15,
496,
20,
314,
60792,
456,
286,
555,
286,
2060,
38909,
0,
341,
310,
87073,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seed_compute_once() {
let seed_compute = SeedHashCompute::default();
let hash = [241, 175, 44, 134, 39, 121, 245, 239, 228, 236, 43, 160, 195, 152, 46, 7, 199, 5, 253, 147, 241, 206, 98, 43, 3, 104, 17, 40, 192, 79, 106, 162];
assert_eq!(seed_compute.hash_block_number(486382), hash);
} | rust_cleaned_test_functions.jsonl/19646 | {
"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,
33809,
57028,
7630,
368,
341,
197,
10217,
10320,
57028,
284,
35822,
6370,
46254,
486,
2258,
543,
197,
10217,
5175,
284,
508,
17,
19,
16,
11,
220,
16,
22,
20,
11,
220,
19,
19,
11,
220,
16,
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_time_machine_request_builder_defaults() {
let request = TimeMachineRequestBuilder::new(
API_KEY, LAT, LONG, TIME
).build();
let expected_url = Url::parse(&format!(
"{base}/{key}/{lat:.16},{long:.16},{time}?",
base = FORECAST_URL,
... | rust_cleaned_test_functions.jsonl/24717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 574
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
38695,
7893,
28532,
42290,
368,
341,
286,
1077,
1681,
284,
4120,
21605,
1900,
3297,
486,
931,
1006,
310,
5333,
6600,
11,
53187,
11,
33942,
11,
22236,
198,
286,
7457,
5834,
1428,
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_config_initialize_contains_duplicates_fails() {
solana_logger::setup();
let config_address = Pubkey::new_unique();
let signer0_pubkey = Pubkey::new_unique();
let signer0_account = AccountSharedData::new(0, 0, &Pubkey::new_unique());
let keys = vec![
... | rust_cleaned_test_functions.jsonl/74379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 866
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
40889,
63598,
75051,
761,
6209,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2193,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
70039,
15,
34014,
792,
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_serialize_new_id() {
let (bytes, handles) =
TestInterfaceEvent::NewId { arg: NEW_ID_VALUE }.into_message(SENDER_ID).unwrap().take();
assert!(handles.is_empty());
assert_eq!(bytes, message_bytes!(SENDER_ID, 5 /* opcode */, NEW_ID_VALUE));
} | rust_cleaned_test_functions.jsonl/55801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
5921,
842,
368,
341,
286,
1077,
320,
9651,
11,
13469,
8,
4035,
310,
3393,
5051,
1556,
486,
3564,
764,
314,
1392,
25,
16165,
3450,
7476,
16908,
18122,
6462,
51048,
35689,
3450,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_call() {
let context = Context::create();
let module = context.create_module("sum");
let builder = context.create_builder();
let f32_type = context.f32_type();
let fn_type = f32_type.fn_type(&[], false);
let function = module.add_function("get_pi", fn_type, None);... | rust_cleaned_test_functions.jsonl/39110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
13429,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
1242,
797,
262,
1077,
7363,
284,
2266,
2520,
28532,
1428,
262,
1077,
282,
18,
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_from_environment_format() {
std::env::set_var("TIME_STYLE", "+%F");
assert_eq!(
Some(DateFlag::Formatted("%F".into())),
DateFlag::from_environment()
);
} | rust_cleaned_test_functions.jsonl/1315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
51774,
8955,
368,
341,
286,
1460,
486,
3160,
486,
746,
4612,
445,
18129,
41775,
497,
6630,
4,
37,
797,
286,
2060,
10714,
33673,
310,
4329,
19987,
12135,
486,
43500,
4430,
37,
3263,
18122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_transform() {
let mut transform = Transform::new("12345678");
transform.advance();
assert_eq!(transform.signal(), "48226158");
transform.advance();
assert_eq!(transform.signal(), "34040438");
transform.advance();
assert_eq!(transform.signal... | rust_cleaned_test_functions.jsonl/95568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18449,
368,
341,
286,
1077,
5206,
5165,
284,
15226,
486,
931,
445,
16,
17,
18,
19,
20,
21,
22,
23,
797,
286,
5165,
80889,
543,
286,
2060,
10714,
10297,
4701,
50453,
1507,
330,
19,
23,
17,
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_escape_string() {
assert_eq!(escape_string(""), "");
assert_eq!(escape_string("no escaping here"), "no escaping here");
assert_eq!(escape_string(r#"'"\"#), r#"'\"\\"#);
} | rust_cleaned_test_functions.jsonl/26709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21832,
3904,
368,
341,
286,
2060,
10714,
10297,
12998,
3904,
86076,
14498,
286,
2060,
10714,
10297,
12998,
3904,
445,
2152,
52654,
1588,
3975,
330,
2152,
52654,
1588,
797,
286,
2060,
10714,
10297,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_wildcard() {
quick_test(
"SELECT * from person",
"Projection: #id, #first_name, #last_name, #age, #state, #salary, #birth_date\
\n TableScan: person projection=None",
);
} | rust_cleaned_test_functions.jsonl/15371 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
695,
4951,
368,
341,
286,
3974,
4452,
1006,
310,
330,
4858,
353,
504,
1697,
756,
310,
330,
46321,
25,
671,
307,
11,
671,
3896,
1269,
11,
671,
4259,
1269,
11,
671,
424,
11,
671,
2454,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_append() {
assert_eq!(
append("key", "value", None, None),
"append key 0 0 5\r\nvalue\r\n"
);
} | rust_cleaned_test_functions.jsonl/26811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
368,
341,
286,
2060,
10714,
33673,
310,
8737,
445,
792,
497,
330,
957,
497,
2240,
11,
2240,
1326,
310,
330,
5090,
1376,
220,
15,
220,
15,
220,
20,
12016,
1699,
957,
12016,
1699,
698,
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 |
#[test]
fn test_poh_recorder_tick_sent_after_min() {
let ledger_path = get_tmp_ledger_path!();
{
let blocktree =
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger");
let GenesisBlockInfo { genesis_block, .. } = create_genesi... | rust_cleaned_test_functions.jsonl/31719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 983
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
7080,
1358,
43612,
24115,
19844,
7260,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
9344,
4035,
394,
8362,
9344,
486,
2508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_macro() {
let array1 = [1u8; 32];
let array2 = [2u8; 16];
let array3 = [3u8; 8];
let bytes = to_bytes![array1, array2, array3].unwrap();
assert_eq!(bytes.len(), 56);
let mut actual_bytes = Vec::new();
actual_bytes.extend_from_slice(&array1... | rust_cleaned_test_functions.jsonl/64714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58810,
368,
341,
286,
1077,
1334,
16,
284,
508,
16,
84,
23,
26,
220,
18,
17,
935,
286,
1077,
1334,
17,
284,
508,
17,
84,
23,
26,
220,
16,
21,
935,
286,
1077,
1334,
18,
284,
508,
18,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_result_backoff() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
// Create an IfaceManagerService
let test_values = test_setup(&mut exec);
let (mut iface_manager, _stream) = create_iface_manager_with_client(&test_value... | rust_cleaned_test_functions.jsonl/62736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 705
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
5287,
3895,
1847,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
442,
4230,
458,
1416,
578,
2043,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_0092_example_1() {
let head = linked![1, 2, 3, 4, 5];
let left = 2;
let right = 4;
let result = linked![1, 4, 3, 2, 5];
assert_eq!(Solution::reverse_between(head, left, right), result);
} | rust_cleaned_test_functions.jsonl/5690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
15,
24,
17,
39304,
62,
16,
368,
341,
286,
1077,
1968,
284,
10592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
2115,
284,
220,
17,
280,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clear() {
let mut cache = LruCache::new(2);
cache.insert(1, 10);
cache.insert(2, 20);
cache.clear();
assert!(cache.get_mut(&1).is_none());
assert!(cache.get_mut(&2).is_none());
assert_eq!(format!("{:?}", cache), "{}");
} | rust_cleaned_test_functions.jsonl/36850 | {
"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,
21811,
368,
341,
286,
1077,
5206,
6500,
284,
444,
2672,
8233,
486,
931,
7,
17,
317,
286,
6500,
7030,
7,
16,
11,
220,
16,
15,
317,
286,
6500,
7030,
7,
17,
11,
220,
17,
15,
317,
286,
6500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ln_pdf() {
let ln_pdf = |arg: f64| move |x: FisherSnedecor| x.ln_pdf(arg);
test_almost(0.1, 0.1, 0.0234154207226588982471f64.ln(), 1e-15, ln_pdf(1.0));
test_almost(1.0, 0.1, 0.0396064560910663979961f64.ln(), 1e-15, ln_pdf(1.0));
test_almost(10.0, 0.1, 0.0418440630... | rust_cleaned_test_functions.jsonl/42690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 808
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60401,
39948,
368,
341,
286,
1077,
29390,
39948,
284,
760,
858,
25,
282,
21,
19,
91,
3271,
760,
87,
25,
35504,
50,
18694,
757,
269,
91,
856,
918,
77,
39948,
9404,
317,
286,
1273,
94418,
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_path_buf() {
assert_eq!(
PathBufWrp::get_pathbuf("/test/.tt").map(|t| t.0),
Err(UriSegmentError::BadStart('.'))
);
assert_eq!(
PathBufWrp::get_pathbuf("/test/*tt").map(|t| t.0),
Err(UriSegmentError::BadStart('*'))
);... | rust_cleaned_test_functions.jsonl/35504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 633
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
10363,
368,
341,
286,
2060,
10714,
33673,
310,
7933,
15064,
54,
22252,
486,
455,
2638,
5909,
4283,
1944,
11930,
5566,
1827,
2186,
22428,
83,
91,
259,
13,
15,
1326,
310,
15495,
52252,
21086,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3_mask() {
let mut a = Vec3::zero();
a.set_x(1.0);
a.set_y(1.0);
a.set_z(1.0);
assert!(!a.cmpeq(Vec3::zero()).any());
assert!(a.cmpeq(Vec3::splat(1.0)).all());
} | rust_cleaned_test_functions.jsonl/126299 | {
"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,
13251,
18,
9999,
368,
341,
262,
1077,
5206,
264,
284,
11312,
18,
486,
14154,
543,
262,
264,
980,
3212,
7,
16,
13,
15,
317,
262,
264,
980,
4178,
7,
16,
13,
15,
317,
262,
264,
980,
6415,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_operator_and_add_new_validator() {
let num_nodes = 3;
let (env, op_tool, _, _) = launch_swarm_with_op_tool_and_backend(num_nodes, 0);
// Create new validator and validator operator keys and accounts
let (validator_key, validator_account) = create_new_test_account();
let ... | rust_cleaned_test_functions.jsonl/64962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
40594,
8378,
2891,
5921,
64959,
368,
341,
262,
1077,
1629,
14896,
284,
220,
18,
280,
262,
1077,
320,
3160,
11,
1179,
22785,
11,
8358,
27439,
284,
7050,
32581,
2178,
6615,
10287,
22785,
8378,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transfer_with_check_quorum() {
let l = default_logger();
let mut nt = Network::new(vec![None, None, None], &l);
for i in 1..4 {
let r = &mut nt.peers.get_mut(&i).unwrap();
r.check_quorum = true;
let election_timeout = r.election_timeout();
r.set... | rust_cleaned_test_functions.jsonl/19159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
35403,
6615,
7200,
11280,
33006,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
31412,
284,
8141,
486,
931,
25592,
20703,
4064,
11,
2240,
11,
2240,
1125,
609,
75,
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,
1,
1... | 3 |
#[test]
fn test_file() {
rsix::fs::accessat(
&rsix::fs::cwd(),
"Cargo.toml",
rsix::fs::Access::READ_OK,
rsix::fs::AtFlags::empty(),
)
.unwrap();
assert_eq!(
rsix::fs::openat(
&rsix::fs::cwd(),
"Cagro.motl",
rsix::fs::OF... | rust_cleaned_test_functions.jsonl/38296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 954
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
368,
341,
262,
10036,
941,
486,
3848,
486,
5211,
266,
1006,
286,
609,
5428,
941,
486,
3848,
486,
32165,
3148,
286,
330,
98228,
73494,
75,
756,
286,
10036,
941,
486,
3848,
486,
6054,
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_mmap_region_new() {
assert!(MmapRegion::new(0).is_err());
let size = 4096;
let r = MmapRegion::new(4096).unwrap();
assert_eq!(r.size(), size);
assert!(r.file_offset().is_none());
assert_eq!(r.prot(), libc::PROT_READ | libc::PROT_WRITE);
a... | rust_cleaned_test_functions.jsonl/37 | {
"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,
717,
2186,
20627,
5921,
368,
341,
286,
2060,
10297,
44,
2186,
14091,
486,
931,
7,
15,
568,
285,
9266,
5231,
286,
1077,
1379,
284,
220,
19,
15,
24,
21,
401,
286,
1077,
435,
284,
386,
2186,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_from_impl_struct_variant() {
check_assist(
generate_from_impl_for_enum,
r#"
//- minicore: from
enum A { $0One { x: u32 } }
"#,
r#"
enum A { One { x: u32 } }
impl From<u32> for A {
fn from(x: u32) -> Self {
Self::One { x }
}
}
"#,
... | rust_cleaned_test_functions.jsonl/4572 | {
"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,
2891,
5673,
21007,
15126,
46112,
368,
341,
286,
1779,
12083,
380,
1006,
310,
6923,
5673,
21007,
5478,
31054,
345,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
504,
198,
9018,
362,
314,
400,
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_gen_with_serde() -> io::Result<()> {
let cake_entity = setup().get(0).unwrap().clone();
assert_eq!(cake_entity.get_table_name_snake_case(), "cake");
// Compact code blocks
assert_serde_variant_results(
&cake_entity,
&(
inc... | rust_cleaned_test_functions.jsonl/76352 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
6615,
75861,
450,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
19145,
19169,
284,
6505,
1005,
455,
7,
15,
568,
15454,
1005,
19982,
1428,
286,
2060,
10714,
10297,
47384,
19169,
670,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_log_level_filter() {
assert_eq!(LogLevelFilter::Error, LogLevel::Error.to_log_level_filter());
assert_eq!(LogLevelFilter::Trace, LogLevel::Trace.to_log_level_filter());
} | rust_cleaned_test_functions.jsonl/73936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
5224,
8274,
8727,
368,
341,
260,
2060,
10714,
10297,
72676,
5632,
486,
1454,
11,
63321,
486,
1454,
2389,
5224,
8274,
8727,
1423,
260,
2060,
10714,
10297,
72676,
5632,
486,
6550,
11,
63321,
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 |
#[test]
fn test_underscore_not_greedily() {
parse_macro(
r#"
macro_rules! q {
($($a:ident)* _) => {0};
}
"#,
)
.assert_expand_items(r#"q![a b c d _]"#, r#"0"#);
parse_macro(
r#"
macro_rules! q {
($($a:expr => $b:ident)* _ => $c:expr) => {0};
}
"#,
)
.as... | rust_cleaned_test_functions.jsonl/28750 | {
"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,
62,
53933,
7913,
1889,
28516,
1541,
368,
341,
262,
4715,
58810,
1006,
286,
435,
2,
698,
32606,
21407,
0,
2804,
341,
262,
1711,
699,
64,
25,
1713,
4806,
27439,
589,
314,
15,
2440,
532,
57676,
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_gpg_config() -> Result<()> {
let args = Args::default();
let config = GpgConfig::new(&args)?;
config.check_gpgme_version(GPGME_REQUIRED_VERSION);
Ok(())
} | rust_cleaned_test_functions.jsonl/71424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
3517,
5332,
368,
1464,
5714,
71698,
341,
197,
10217,
2827,
284,
17693,
486,
2258,
543,
197,
10217,
2193,
284,
479,
3517,
2648,
486,
931,
2099,
2116,
40007,
197,
25873,
9093,
1889,
3517,
2660... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rpc_get_tx_count() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let genesis = create_genesis_config(10);
let bank = Arc::new(Bank::new(&genesis.genesis_config));
// Add 4 transactions
bank.transfer(1, &genesis.mint_keypair, &bob_pubkey)
.... | rust_cleaned_test_functions.jsonl/3021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 581
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
17805,
3180,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
59366,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
317,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_write_padded() {
let len = 1016; // Use a multiple of 254.
let data = vec![255u8; len];
let mut padded = Vec::new();
let mut reader = Fr32Reader::new(Cursor::new(&data));
reader
.read_to_end(&mut padded)
.expect("in-memory read... | rust_cleaned_test_functions.jsonl/75457 | {
"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,
6443,
9165,
620,
16828,
368,
341,
286,
1077,
2422,
284,
220,
16,
15,
16,
21,
26,
442,
5443,
264,
5248,
315,
220,
17,
20,
19,
624,
286,
1077,
821,
284,
7486,
20703,
17,
20,
20,
84,
23,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_counts() -> io::Result<()> {
let counts: Counts = vec![
(String::from("AADAT"), 302),
(String::from("CLN3"), 37),
(String::from("PAK4"), 145),
]
.into_iter()
.collect();
let ids = vec![
String::from("A... | rust_cleaned_test_functions.jsonl/112570 | {
"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,
9165,
25977,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
14579,
25,
85659,
284,
7486,
90515,
310,
320,
703,
486,
1499,
445,
81380,
828,
3975,
220,
18,
15,
17,
1326,
310,
320,
703,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_closure() {
// Ensuring presence of this closure doesn't break other things
let hdr = indoc! {"
#include <functional>
#include <cstdint>
inline bool take_closure(std::function<bool(const uint32_t number)> fn) {
return fn(5);
}
inline uint32_t get_a() {
... | rust_cleaned_test_functions.jsonl/9908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72823,
368,
341,
262,
442,
57868,
1677,
9362,
315,
419,
21955,
3171,
944,
1438,
1008,
2513,
198,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
49228,
397,
262,
671,
997,
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_module_path_env_override_bad_segments() {
use std::path::PathBuf;
let mut d = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
d.push("tests/modules");
let tremor_path = format!("{}:snot:badger:/horse", d.display());
let empty: Vec<String> = vec![];
let... | rust_cleaned_test_functions.jsonl/81652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
2638,
15879,
48576,
34199,
55735,
368,
341,
286,
990,
1460,
486,
2343,
486,
1820,
15064,
280,
286,
1077,
5206,
294,
284,
7933,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rust_reference() {
let hdr = indoc! {"
#include <cstdint>
struct RustType;
inline uint32_t take_rust_reference(const RustType&) {
return 4;
}
"};
let rs = quote! {
let foo = RustType(3);
assert_eq!(ffi::take_rust_reference(&foo), 4);
};
... | rust_cleaned_test_functions.jsonl/9931 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
590,
25433,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
1339,
262,
2036,
33789,
929,
280,
262,
7381,
2622,
18,
17,
528,
1896,
1710,
590,
25433,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_set_trait_compilation() {
let mut m = Matrix::new_identity();
let _x = m.get(AffineMember::ScaleX);
m.set(AffineMember::ScaleX, 1.0);
} | rust_cleaned_test_functions.jsonl/1095 | {
"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,
3062,
2602,
78491,
18177,
13455,
368,
972,
262,
1077,
5206,
296,
284,
11631,
486,
931,
46244,
1647,
262,
1077,
716,
87,
284,
296,
670,
4346,
542,
482,
9366,
486,
6947,
55,
736,
262,
296,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_middle_edits() {
let needle = b"ANNGTTCNGNT";
let haystack = b"ACGACTAGTTATAAAAATTCNACTCCANTTAGCTCCCTACTTTCCGAGAG";
check_test(needle, haystack, 5);
} | rust_cleaned_test_functions.jsonl/83260 | {
"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,
62580,
32370,
1199,
368,
341,
286,
1077,
30309,
284,
293,
1,
1093,
6140,
51,
7749,
6140,
6408,
876,
286,
1077,
88447,
284,
293,
1,
1706,
38,
6823,
1890,
14903,
4485,
50107,
828,
7749,
45,
6823,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_static_mod() {
struct Id;
type Mod = StaticMod32<Id>;
Mod::set(1_000_000_007);
assert_eq!(Mod::get(), 1_000_000_007);
Mod::set(998_244_353);
assert_eq!(Mod::get(), 998_244_353);
} | rust_cleaned_test_functions.jsonl/38823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
7480,
368,
972,
394,
2036,
5223,
463,
394,
943,
5650,
284,
23105,
4459,
18,
17,
27,
764,
84109,
394,
5650,
486,
746,
7,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
22,
736,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_entry_tx_random_execution_no_error() {
// entropy multiplier should be big enough to provide sufficient entropy
// but small enough to not take too much time while executing the test.
let entropy_multiplier: usize = 25;
let initial_lamports = 100;
... | rust_cleaned_test_functions.jsonl/46814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
9078,
17805,
22644,
60948,
6536,
4096,
368,
341,
286,
442,
47502,
30559,
1265,
387,
2409,
3322,
311,
3410,
14016,
47502,
198,
286,
442,
714,
2613,
3322,
311,
537,
1896,
2238,
1753,
882,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_white_spaces() {
assert_eq!(js_parser_rs::parse(" ".chars()), Ok(vec![]));
assert_eq!(js_parser_rs::parse("\u{a0}".chars()), Ok(vec![]));
assert_eq!(js_parser_rs::parse("\u{b}".chars()), Ok(vec![]));
assert_eq!(js_parser_rs::parse("\u{c}".chars()), Ok(vec![]));
assert_eq... | rust_cleaned_test_functions.jsonl/61518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44431,
67883,
368,
341,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
445,
5933,
19255,
11858,
7622,
25592,
0,
1294,
1106,
262,
2060,
10714,
10297,
2519,
18517,
47115,
486,
6400,
4921,
84,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq_squaring() {
let mut a = Fq(FqRepr([
0xffffffffffffffff,
0xffffffffffffffff,
0xffffffffffffffff,
0xffffffffffffffff,
0xffffffffffffffff,
0x19ffffffffffffff,
]));
assert!(a.is_valid());
a.sq... | rust_cleaned_test_functions.jsonl/2327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 747
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
643,
446,
3249,
368,
341,
286,
1077,
5206,
264,
284,
434,
80,
7832,
80,
693,
649,
8956,
310,
220,
15,
41798,
53697,
345,
310,
220,
15,
41798,
53697,
345,
310,
220,
15,
41798,
53697,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_commit_style_colored_input_color_is_stripped_under_normal() {
let config = integration_test_utils::make_config_from_args(&[
"--commit-style",
"normal",
"--commit-decoration-style",
"omit",
]);
let output = integration_test_u... | rust_cleaned_test_functions.jsonl/70055 | {
"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,
36346,
15117,
10211,
3018,
5898,
6714,
6892,
1261,
461,
6924,
58228,
13973,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
9640,
310,
14482,
17413,
11297,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_call_in_function_call() {
assert_expression!(
"CheckProperty(LookupName(\"age\"), Confirm(1))",
Expression::func(
"CheckProperty",
vec![
Expression::func("LookupName", vec!["age".... | rust_cleaned_test_functions.jsonl/102648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
13429,
1243,
9174,
13429,
368,
341,
310,
2060,
28068,
33673,
394,
330,
3973,
3052,
4957,
1941,
454,
675,
36014,
424,
2105,
701,
33563,
7,
16,
593,
756,
394,
16378,
486,
2830,
1006,
503,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_first() {
let mut a = vec![];
assert_eq!(a.first(), None);
a = vec![11];
assert_eq!(a.first().unwrap(), &11);
a = vec![11, 12];
assert_eq!(a.first().unwrap(), &11);
} | rust_cleaned_test_functions.jsonl/12848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12978,
368,
341,
262,
1077,
5206,
264,
284,
7486,
0,
15078,
262,
2060,
10714,
10297,
64,
7389,
1507,
2240,
317,
262,
264,
284,
7486,
20703,
16,
16,
935,
262,
2060,
10714,
10297,
64,
7389,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_path_with_no_ext_no_dir() {
let (dir, name, ext) = file_path_name_ext("image");
assert_eq!(dir, None);
assert_eq!(name, "image");
assert_eq!(ext, None);
} | rust_cleaned_test_functions.jsonl/5161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
2638,
6615,
6536,
9927,
6536,
4334,
368,
341,
286,
1077,
320,
3741,
11,
829,
11,
1303,
8,
284,
1034,
2638,
1269,
9927,
445,
1805,
797,
286,
2060,
10714,
10297,
3741,
11,
2240,
317,
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 |
#[test]
fn test_handles() {
let mut context = create_ctx_without_session();
let (_capabs, _more) = context
.get_capability(CapabilityType::Handles, 0, 80)
.unwrap();
} | rust_cleaned_test_functions.jsonl/49679 | {
"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,
68017,
368,
341,
286,
1077,
5206,
2266,
284,
1855,
15147,
39904,
12316,
1428,
286,
1077,
5453,
11346,
3435,
11,
716,
6384,
8,
284,
2266,
198,
310,
659,
455,
89686,
3025,
391,
2897,
929,
486,
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 |
#[test]
fn test_sbc_media_codec_info() {
// Mandatory A2DP Sink support case.
let sbc_media_codec_info: SbcCodecInfo = SbcCodecInfo::new(
SbcSamplingFrequency::MANDATORY_SNK,
SbcChannelMode::MANDATORY_SNK,
SbcBlockCount::MANDATORY_SNK,
SbcSubBands:... | rust_cleaned_test_functions.jsonl/26228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1765
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
8904,
29173,
51084,
3109,
368,
341,
286,
442,
70782,
362,
17,
10298,
56451,
1824,
1142,
624,
286,
1077,
7898,
66,
29173,
51084,
3109,
25,
328,
8904,
36913,
1731,
284,
328,
8904,
36913,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add() {
let a = Affine::new(
FieldElement::from(u256h!(
"01ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca"
)),
FieldElement::from(u256h!(
"005668060aa49730b7be4801df46ec62de53ecd11abe43a32873000c36e8dc1f"... | rust_cleaned_test_functions.jsonl/42019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
286,
1077,
264,
284,
9748,
482,
486,
931,
1006,
310,
8601,
1691,
486,
1499,
8154,
17,
20,
21,
71,
33673,
394,
330,
15,
16,
823,
16,
20,
66,
16,
23,
20,
24,
24,
24,
22,
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_ident_pat_loc() {
check_location(r"fn my_fn(m$0) {}", ImmediateLocation::IdentPat);
check_location(r"fn my_fn() { let m$0 }", ImmediateLocation::IdentPat);
check_location(r"fn my_fn(&m$0) {}", ImmediateLocation::IdentPat);
check_location(r"fn my_fn() { let &m$0 }"... | rust_cleaned_test_functions.jsonl/24641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38399,
55824,
13400,
368,
341,
286,
1779,
13126,
2601,
1,
8822,
847,
15246,
1255,
3,
15,
8,
24689,
80310,
4707,
486,
28301,
27106,
317,
286,
1779,
13126,
2601,
1,
8822,
847,
15246,
368,
314,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duration_as_duration() {
test_none_with_extra(cast_duration_as_duration);
let cs = vec![
("11:30:45.123456", 6, 0, "11:30:45"),
("11:30:45.123456", 6, 1, "11:30:45.1"),
("11:30:45.123456", 6, 2, "11:30:45.12"),
("11:30:45.123456", ... | rust_cleaned_test_functions.jsonl/1995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
11898,
25454,
368,
341,
286,
1273,
31488,
6615,
31858,
1337,
559,
25454,
11898,
25454,
626,
286,
1077,
10532,
284,
7486,
90515,
310,
3489,
16,
16,
25,
18,
15,
25,
19,
20,
13,
16,
17,
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... | 2 |
#[test]
fn test_matched_error() {
let mut ps = ParseStream {
content: "Hello World".to_string(),
cursor: 1,
};
let err = ps.matched("[A-Z]+").unwrap_err();
assert_eq!(ps.cursor, 1);
assert_eq!(err.cursor, 1);
assert_eq!(err.message, "unab... | rust_cleaned_test_functions.jsonl/41147 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93900,
4096,
368,
341,
286,
1077,
5206,
4726,
284,
14775,
3027,
341,
310,
2213,
25,
330,
9707,
4337,
3263,
983,
3904,
3148,
310,
8128,
25,
220,
16,
345,
286,
3634,
286,
1077,
1848,
284,
4726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_der_bool() {
let empty = &b""[..];
let b_true = DerObject::from_obj(BerObjectContent::Boolean(true));
let b_false = DerObject::from_obj(BerObjectContent::Boolean(false));
assert_eq!(parse_der_bool(&[0x01, 0x01, 0x00]), Ok((empty, b_false)));
assert_eq!(parse_der_bool(&[0x01, ... | rust_cleaned_test_functions.jsonl/45859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
22159,
368,
341,
262,
1077,
4287,
284,
609,
65,
3014,
95874,
935,
262,
1077,
293,
16082,
284,
12741,
1190,
486,
1499,
7328,
5349,
261,
1190,
2762,
486,
6890,
3715,
1106,
262,
1077,
293,
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_emit_testl_reg_reg() {
assert_emit!(0x85, 0xc0; emit_testl_reg_reg(RAX, RAX));
assert_emit!(0x85, 0xc6; emit_testl_reg_reg(RAX, RSI));
assert_emit!(0x41, 0x85, 0xc7; emit_testl_reg_reg(RAX, R15));
} | rust_cleaned_test_functions.jsonl/85422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69082,
4452,
75,
4920,
4920,
368,
341,
286,
2060,
69082,
10297,
15,
87,
23,
20,
11,
220,
15,
8148,
15,
26,
16691,
4452,
75,
4920,
4920,
2785,
2954,
11,
431,
2954,
1106,
286,
2060,
69082,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next_for_all_sectors() {
let (format, d64) = get_fresh_d64();
for track in format.first_track..=format.last_track {
for sector in 0..format.tracks[track as usize].sectors {
let location = Location(track, sector);
let bam = d64.bam().unw... | rust_cleaned_test_functions.jsonl/9177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
5478,
5705,
3453,
12532,
368,
341,
286,
1077,
320,
2243,
11,
294,
21,
19,
8,
284,
633,
761,
2488,
814,
21,
19,
543,
286,
369,
3754,
304,
3561,
7389,
28545,
496,
28,
2243,
9110,
28545,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rotation_between_vectors_point() {
let point = 3_f64 * Point2::new(0_f64, 1_f64);
let vector1 = 5_f64 * Vector2::unit_y();
let vector2 = 12_f64 * Vector2::unit_x();
let rotation = Rotation2::rotation_between(&vector1, &vector2);
let expected = 3_f64 * Poin... | rust_cleaned_test_functions.jsonl/70475 | {
"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,
44813,
48302,
49158,
6085,
368,
341,
286,
1077,
1459,
284,
220,
18,
761,
21,
19,
353,
5126,
17,
486,
931,
7,
15,
761,
21,
19,
11,
220,
16,
761,
21,
19,
317,
286,
1077,
4621,
16,
284,
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_parse_bingo_card() {
assert_eq!(
BingoCard {
grid: ndarray::arr2(&[[1, 2], [3, 4]])
},
parse_bingo_card(&["1 2", " 3 4 "])
)
} | rust_cleaned_test_functions.jsonl/133043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
880,
27908,
16888,
368,
341,
262,
2060,
10714,
33673,
286,
92048,
5770,
341,
310,
5827,
25,
66883,
486,
1118,
17,
2099,
15505,
16,
11,
220,
17,
1125,
508,
18,
11,
220,
19,
26731,
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... | 1 |
#[test]
fn test_server_reset_client_side_encoder_stream() {
let (mut hconn, mut peer_conn) = connect();
peer_conn
.stream_reset_send(CLIENT_SIDE_ENCODER_STREAM_ID, Error::HttpNoError.code())
.unwrap();
let out = peer_conn.process(None, now());
hconn.proces... | rust_cleaned_test_functions.jsonl/52196 | {
"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,
12015,
18983,
8179,
30862,
39068,
12673,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
8,
284,
4564,
543,
286,
14397,
17241,
198,
310,
659,
4027,
18983,
13565,
52991,
10757,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expr_to_sql_operators() {
let pred = DeletePredicate {
range: TimestampRange::new(1, 2),
exprs: vec![
DeleteExpr {
column: String::from("col1"),
op: Op::Eq,
scalar: Scalar::I64(1),
... | rust_cleaned_test_functions.jsonl/49503 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21915,
2346,
18063,
25634,
2973,
368,
341,
286,
1077,
4162,
284,
10428,
36329,
341,
310,
2088,
25,
32758,
6046,
486,
931,
7,
16,
11,
220,
17,
1326,
310,
15169,
82,
25,
7486,
90515,
394,
10428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generic_class_bounds() {
ok("class Foo
class A<T: Foo>
fun f() -> A<Foo> { return nil; }");
ok("open class Foo
class Bar: Foo
class A<T: Foo>
fun f() -> A<Bar> { return nil; }");
err(
"class Foo
... | rust_cleaned_test_functions.jsonl/106636 | {
"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,
41232,
4790,
36878,
368,
341,
286,
5394,
445,
1040,
33428,
198,
310,
536,
362,
3125,
25,
33428,
397,
310,
2464,
282,
368,
1464,
362,
30499,
2624,
29,
314,
470,
2092,
26,
335,
3071,
286,
5394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_perspective_positive() {
let quad = BoundedQuadratic::new(2.5, 5., 1., -5., 6.);
let perspective = quad.perspective(2.);
assert_eq!(perspective.lower, 5.);
assert_eq!(perspective.upper, 10.);
assert_eq!(perspective.a, 0.5);
assert_eq!(perspective.b... | rust_cleaned_test_functions.jsonl/19874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
85091,
54160,
368,
341,
286,
1077,
27082,
284,
425,
13082,
2183,
88678,
486,
931,
7,
17,
13,
20,
11,
220,
20,
2572,
220,
16,
2572,
481,
20,
2572,
220,
21,
58957,
286,
1077,
13057,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subscribe() {
let id = "id1".to_string();
let client_id = ClientId::from(id.clone());
let connect1 = transient_connect(id);
let handle1 = connection_handle();
let req1 = ConnReq::new(client_id, connect1, handle1);
let mut session = Session::new_tra... | rust_cleaned_test_functions.jsonl/51750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1013
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88935,
368,
341,
286,
1077,
877,
284,
330,
307,
16,
3263,
983,
3904,
543,
286,
1077,
2943,
842,
284,
8423,
764,
486,
1499,
3724,
15997,
1423,
286,
1077,
4564,
16,
284,
40558,
15720,
3724,
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,
1,
1... | 3 |
#[test]
fn test_half() {
let vec = to_vec(&42.5f32).unwrap();
assert_eq!(vec, b"\xF9\x51\x50");
assert_eq!(from_slice::<f32>(&vec[..]).unwrap(), 42.5f32);
} | rust_cleaned_test_functions.jsonl/110274 | {
"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,
40626,
368,
341,
262,
1077,
7486,
284,
311,
13251,
2099,
19,
17,
13,
20,
69,
18,
17,
568,
15454,
543,
262,
2060,
10714,
10297,
4083,
11,
293,
11934,
9770,
24,
3462,
20,
16,
3462,
20,
15,
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_header_equal_after_deserialisation() {
let nonce = vec![1,2,3,4,5];
let salt = _get_test_salt();
let header = Header::new(1, "TEST_ENCRYPTION_METHOD", &nonce, salt);
let serialised_header = header.serialise().unwrap();
let deserialised_header = Header::de... | rust_cleaned_test_functions.jsonl/106123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8757,
11478,
19844,
15768,
2848,
7923,
368,
341,
286,
1077,
39676,
284,
7486,
20703,
16,
11,
17,
11,
18,
11,
19,
11,
20,
935,
286,
1077,
12021,
284,
716,
455,
4452,
92280,
543,
286,
1077,
4247... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.