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_recognized_file_type() {
let config = integration_test_utils::make_config_from_args(&[]);
let output = integration_test_utils::get_line_of_code_from_delta(
&ADDED_FILE_INPUT,
14,
"class X:",
&config,
);
ansi... | rust_cleaned_test_functions.jsonl/70041 | {
"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,
7080,
3934,
1506,
2458,
1819,
368,
341,
1789,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
56703,
286,
1077,
2550,
284,
17590,
4452,
17309,
486,
455,
6528,
3575,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_bincode_optional() {
use self::bincode::{deserialize, serialize, Infinite};
use self::serde_derive::{Deserialize, Serialize};
use prelude::*;
use serde::ts_nanoseconds_option;
#[derive(Debug, PartialEq, Eq, Serialize, Deserialize)]
struct Te... | rust_cleaned_test_functions.jsonl/76818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
21816,
1851,
74644,
368,
341,
286,
990,
656,
486,
6863,
1851,
22964,
66777,
11,
24235,
11,
54543,
2440,
286,
990,
656,
486,
47024,
35345,
533,
22964,
64465,
11,
39900,
2440,
286,
990,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extract_table_lookup_returns_none() {
let mut compiled_keys = CompiledKeys {
payer: None,
key_meta_map: BTreeMap::from([
(Pubkey::new_unique(), KeyFlags::WRITABLE.into()),
(Pubkey::new_unique(), KeyFlags::empty().into()),
... | rust_cleaned_test_functions.jsonl/52069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
39123,
5237,
27464,
58900,
31488,
368,
341,
286,
1077,
5206,
19697,
12631,
284,
96471,
8850,
341,
310,
69275,
25,
2240,
345,
310,
1376,
13381,
5376,
25,
425,
6533,
2227,
486,
1499,
8956,
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_chunked_hash() {
let input: [u8; 128] = [0x69; 128];
let hash = input.hash();
let expected = [
0x12, 0xb2, 0x1b, 0xec, 0x7c, 0x75, 0xa2, 0x0f, 0xa8, 0xc5, 0xac, 0xe0, 0x22, 0x17, 0x9a,
0x81, 0x5c, 0xd7, 0x95, 0xa1,
];
assert_eq!(hash, expected);
} | rust_cleaned_test_functions.jsonl/51826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30539,
291,
8950,
368,
341,
262,
1077,
1946,
25,
508,
84,
23,
26,
220,
16,
17,
23,
60,
284,
508,
15,
87,
21,
24,
26,
220,
16,
17,
23,
935,
262,
1077,
5175,
284,
1946,
15101,
543,
262,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_same_dev_id() {
// There are several conditions under which a `MountInfo` is
// one condition in this test.
let m1 = mount_info("0", "/mnt/bar");
let m2 = mount_info("0", "/mnt/bar/baz");
assert!(!is_best(&[m1.clone()], &m2... | rust_cleaned_test_functions.jsonl/7064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
10433,
842,
368,
341,
310,
442,
2619,
525,
3807,
4682,
1212,
892,
264,
1565,
16284,
1731,
63,
374,
18574,
310,
442,
825,
2971,
304,
419,
1273,
624,
310,
1077,
296,
16,
284,
6470,
3109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rsa() {
let prime_pairs = [
(997, 757),
(2677, 3217),
(454711, 255361),
(8552137547, 75522871)
];
for (p, q) in prime_pairs {
let mut rng = rand::thread_rng();
let (n, e) = generate_public_key(p, q);... | rust_cleaned_test_functions.jsonl/113614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82522,
368,
341,
286,
1077,
10250,
36430,
284,
2278,
310,
320,
24,
24,
22,
11,
220,
22,
20,
22,
1326,
310,
320,
17,
21,
22,
22,
11,
220,
18,
17,
16,
22,
1326,
310,
320,
19,
20,
19,
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_invalid() {
let deserializer = &mut Deserializer::from_str("null");
let mut meta_map = MetaMap::new();
meta_map.insert(".".to_string(), Meta::from_error("some prior error"));
let value = Annotated::<i32>::from_error("some prior error");
assert_eq... | rust_cleaned_test_functions.jsonl/126356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
368,
341,
286,
1077,
939,
41939,
284,
609,
6984,
3874,
41939,
486,
1499,
2895,
445,
2921,
797,
286,
1077,
5206,
8823,
5376,
284,
15819,
2227,
486,
931,
543,
286,
8823,
5376,
7030,
445,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_l2_snapshot() {
let text = fetch_l2_snapshot("bitstamp", MarketType::Spot, "btcusd", Some(3)).unwrap();
assert!(text.starts_with("{"));
} | rust_cleaned_test_functions.jsonl/60205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
17,
53265,
368,
341,
262,
1077,
1467,
284,
7807,
907,
17,
53265,
445,
4489,
49113,
497,
7993,
929,
486,
47049,
11,
330,
92634,
355,
67,
497,
4329,
7,
18,
4579,
15454,
543,
262,
2060,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_altinteger() {
test! {
#[derive(Debug, Clone)]
struct MyCompactIntRange {
start: i32,
len: i32,
step: i32,
missing_index: usize, // For testing NA
}
impl AltrepImpl for MyCompactIntRange {
fn length... | rust_cleaned_test_functions.jsonl/5813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 902
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32105,
11662,
368,
341,
262,
1273,
0,
341,
286,
11506,
27098,
42618,
11,
27913,
5563,
286,
2036,
3017,
98335,
1072,
6046,
341,
310,
1191,
25,
600,
18,
17,
345,
310,
2422,
25,
600,
18,
17,
345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stats_same() {
macro_rules! check_stat_eq {
($st1:expr, $st2:expr) => {
check_stat_eq!(
$st1,
$st2,
@,
dev,
ino,
mode,
f... | rust_cleaned_test_functions.jsonl/43165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
33574,
368,
341,
286,
18072,
21407,
0,
1779,
16271,
10714,
341,
310,
1711,
267,
16,
96011,
11,
400,
267,
17,
96011,
8,
589,
341,
394,
1779,
16271,
10714,
33673,
503,
400,
267,
16,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_u8_to_gstring() {
let v: &[u8] = b"foo";
let s: GString = Vec::from(v).into();
assert_eq!(s.as_str(), "foo");
} | rust_cleaned_test_functions.jsonl/58211 | {
"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,
13251,
7300,
23,
2346,
1889,
917,
368,
341,
286,
1077,
348,
25,
44590,
84,
23,
60,
284,
293,
1,
7975,
876,
286,
1077,
274,
25,
479,
703,
284,
11312,
486,
1499,
3747,
568,
18122,
543,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_split_lines_header() {
let data = b"GET /hello HTTP/1.1\r\nHost: localhost:8000\r\n\r\n";
let lines = split_lines(data);
assert_eq!(lines.len(), 3);
assert_eq!(lines.get(0).unwrap().as_str(), "GET /hello HTTP/1.1");
assert_eq!(lines.get(1).unwrap().as_str(... | rust_cleaned_test_functions.jsonl/15468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
18323,
8757,
368,
341,
286,
1077,
821,
284,
293,
1,
3806,
608,
14990,
10130,
14,
16,
13,
16,
12016,
1699,
9296,
25,
47422,
25,
23,
15,
15,
15,
12016,
1699,
12016,
1699,
876,
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_route_content_type_colliions() {
assert!(r_ct_ct_collide(Get, "application/json", Get, "application/json"));
assert!(r_ct_ct_collide(Get, "*/json", Get, "application/json"));
assert!(r_ct_ct_collide(Get, "*/json", Get, "application/*"));
assert!(r_ct_ct_collide(Ge... | rust_cleaned_test_functions.jsonl/62162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28109,
7495,
1819,
10211,
742,
908,
368,
341,
286,
2060,
10297,
81,
26134,
26134,
43597,
577,
24460,
11,
330,
5132,
8931,
497,
2126,
11,
330,
5132,
8931,
4010,
286,
2060,
10297,
81,
26134,
26134,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool_return() {
assert_eq!(
execute_function(&setup(), "test_true", vec![]).unwrap(),
TRUE_OBJ.clone()
);
assert_eq!(
execute_function(&setup(), "test_false", vec![]).unwrap(),
FALSE_OBJ.clone()
);
} | rust_cleaned_test_functions.jsonl/9512 | {
"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,
22159,
12511,
368,
341,
262,
2060,
10714,
33673,
286,
9026,
9174,
2099,
15188,
1507,
330,
1944,
16082,
497,
7486,
0,
1294,
568,
15454,
3148,
286,
8214,
27559,
15997,
741,
262,
3475,
262,
2060,
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_nested_scope_root() {
let app = App::new()
.scope("/app", |scope| {
scope.nested("/t1", |scope| {
scope
.resource("", |r| r.f(|_| HttpResponse::Ok()))
.resource("/", |r| r.f(|_| HttpResponse::... | rust_cleaned_test_functions.jsonl/22451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
23199,
12993,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
4186,
4283,
676,
497,
760,
4186,
91,
341,
394,
6891,
1253,
9980,
4283,
83,
16,
497,
760,
4186,
91,
341,
503,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_idents_by_stripping_dot_git() {
let ident1 = ident(&Remote(url("https://github.com/PistonDevelopers/piston")));
let ident2 = ident(&Remote(url("https://github.com/PistonDevelopers/piston.git")));
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/29922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
842,
805,
3710,
1261,
461,
10732,
30941,
68801,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
24703,
6522,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_str_prefixed_chunks_by_lines() {
let (at, mut ucmd) = testing(UTIL_NAME);
let name = "split_str_prefixed_chunks_by_lines";
let glob = Glob::new(&at, ".", r"d[:alpha:][:alpha:]$");
RandomFile::new(&at, name).add_lines(10000);
assert!(ucmd.args(&["-l", "1000", name, "d"])... | rust_cleaned_test_functions.jsonl/25138 | {
"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,
17052,
2895,
43331,
3286,
65470,
3710,
18323,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
829,
284,
330,
6960,
2895,
43331,
3286,
65470,
371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_grid() {
let n_rows = 4;
let n_cols = 3;
let mut grid = Grid::new(n_rows, n_cols);
// Initialize grid
for r in 0..n_rows {
for c in 0..n_cols {
assert!(
grid.set(r, c, r * n_cols + c).is_ok(),
... | rust_cleaned_test_functions.jsonl/29915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15604,
368,
341,
286,
1077,
308,
10949,
284,
220,
19,
280,
286,
1077,
308,
25347,
284,
220,
18,
280,
286,
1077,
5206,
5827,
284,
10587,
486,
931,
1445,
10949,
11,
308,
25347,
626,
286,
442,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_process_genesis() {
let dummy_leader_id = Pubkey::new_rand();
let dummy_leader_lamports = 2;
let (genesis_block, _) =
GenesisBlock::new_with_leader(5, &dummy_leader_id, dummy_leader_lamports);
let bank = Bank::new(&genesis_block);
assert_eq!(ba... | rust_cleaned_test_functions.jsonl/41893 | {
"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,
11305,
16322,
13774,
368,
341,
286,
1077,
17292,
79991,
842,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
17292,
79991,
907,
309,
3394,
284,
220,
17,
280,
286,
1077,
320,
77894,
7113,
11,
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_greeting() {
init_logging();
// The messages
struct Greet {
whom: String,
reply_to: ActorRef<Greeted>,
}
struct Greeted {
whom: String,
from: ActorRef<Greet>,
}
struct SayHello {... | rust_cleaned_test_functions.jsonl/22057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2029
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
43632,
368,
341,
286,
2930,
59982,
1428,
23459,
286,
442,
576,
6605,
271,
286,
2036,
479,
3744,
341,
310,
8711,
25,
923,
345,
310,
9851,
2346,
25,
24718,
3945,
59727,
3744,
291,
12520,
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_stream_cipher_output() {
let key = [0u8; 16];
let iv = [0u8; 16];
let mut c = super::Crypter::new(
super::Cipher::aes_128_ctr(),
super::Mode::Encrypt,
&key,
Some(&iv),
)
.unwrap();
assert_eq!(c.updat... | rust_cleaned_test_functions.jsonl/110530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
76692,
7645,
368,
341,
286,
1077,
1376,
284,
508,
15,
84,
23,
26,
220,
16,
21,
935,
286,
1077,
17509,
284,
508,
15,
84,
23,
26,
220,
16,
21,
935,
286,
1077,
5206,
272,
284,
2256,
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_batch_raft_fallback() {
let msg_count = Arc::new(AtomicUsize::new(0));
let batch_msg_count = Arc::new(AtomicUsize::new(0));
let service = MockKvForRaft::new(Arc::clone(&msg_count), Arc::clone(&batch_msg_count), false);
let (mock_server, port) = create_mock_server(service, 60000, ... | rust_cleaned_test_functions.jsonl/37839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
62,
2944,
761,
3420,
368,
341,
262,
1077,
3750,
3180,
284,
19689,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
1106,
262,
1077,
7162,
6483,
3180,
284,
19689,
486,
931,
7,
65857,
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... | 1 |
#[test]
fn test_push() -> Result<()> {
mock::device()?.boot()?;
mock::device()?.push(
"com.apple.mobilecal",
&Push {
aps: PushPayload {
alert: Some(PushAlert {
body: Some("Hello World!".to_owned()),
... | rust_cleaned_test_functions.jsonl/74756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
368,
1464,
5714,
71698,
341,
286,
7860,
486,
6111,
57495,
4619,
94136,
286,
7860,
486,
6111,
57495,
9077,
1006,
310,
330,
874,
39390,
33680,
5416,
756,
310,
609,
16644,
341,
394,
1443,
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... | 7 |
#[test]
fn test_embed_title_limit() {
let mut embed = base_embed();
embed.title.replace(str::repeat("a", 256));
assert!(super::embed(&embed).is_ok());
embed.title.replace(str::repeat("a", 257));
assert!(matches!(
super::embed(&embed),
Err(EmbedVal... | rust_cleaned_test_functions.jsonl/128552 | {
"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,
24007,
6112,
14763,
368,
341,
286,
1077,
5206,
11579,
284,
2331,
24007,
543,
286,
11579,
6067,
6980,
4199,
486,
30624,
445,
64,
497,
220,
17,
20,
21,
1106,
286,
2060,
10297,
9522,
486,
12250,
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_insert_multi() {
let mut cl = Cmdline::new(100);
assert!(cl.insert("hello", "world").is_ok());
assert!(cl.insert("foo", "bar").is_ok());
assert_eq!(cl.as_str(), "hello=world foo=bar");
} | rust_cleaned_test_functions.jsonl/29213 | {
"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,
17678,
25133,
368,
341,
286,
1077,
5206,
1185,
284,
40210,
1056,
486,
931,
7,
16,
15,
15,
317,
286,
2060,
10297,
564,
7030,
445,
14990,
497,
330,
14615,
1827,
285,
19817,
1423,
286,
2060,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_render() {
let recorder = PrometheusBuilder::new().build_recorder();
let key = Key::from_name("basic_counter");
let counter1 = recorder.register_counter(&key);
counter1.increment(42);
let handle = recorder.handle();
let rendered = handle.render()... | rust_cleaned_test_functions.jsonl/48726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 840
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22781,
368,
341,
286,
1077,
48835,
284,
97137,
3297,
486,
931,
1005,
5834,
7080,
1358,
1428,
286,
1077,
1376,
284,
5309,
486,
1499,
1269,
445,
22342,
15730,
797,
286,
1077,
5546,
16,
284,
48835,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bd_addr() {
let buf = [192u8,74,150,234,218,116];
assert_eq!(bd_addr(&buf), Ok((&[][..],BDAddr {
address: [192, 74, 150, 234, 218, 116]})))
} | rust_cleaned_test_functions.jsonl/125935 | {
"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,
68499,
7387,
368,
341,
286,
1077,
6607,
284,
508,
16,
24,
17,
84,
23,
11,
22,
19,
11,
16,
20,
15,
11,
17,
18,
19,
11,
17,
16,
23,
11,
16,
16,
21,
935,
286,
2060,
10714,
10297,
8940,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_format_q() {
// allow whitespace variation
let args = ["-q"];
let actual = new_ucmd!().args(&args).succeeds().stdout_move_str();
let expect = expected_result(&args);
let v_actual: Vec<&str> = actual.split_whitespace().collect();
let v_expect: Vec<&str> = expect... | rust_cleaned_test_functions.jsonl/24865 | {
"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,
16673,
8955,
8976,
368,
341,
262,
442,
2138,
36372,
22990,
7213,
262,
1077,
2827,
284,
4383,
12,
80,
6332,
262,
1077,
5042,
284,
501,
68887,
2277,
0,
1005,
2116,
2099,
2116,
568,
82,
29264,
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_signer_verify_multiple_keys() {
tink_signature::init();
let (tink_priv, tink_pub) = new_ecdsa_keyset_keypair(
tink_proto::HashType::Sha256,
tink_proto::EllipticCurveType::NistP256,
tink_proto::OutputPrefixType::Tink,
1,
);
let (legacy_priv, legacy_... | rust_cleaned_test_functions.jsonl/95087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
261,
35638,
45233,
12631,
368,
341,
262,
90584,
39859,
486,
2327,
543,
262,
1077,
320,
83,
766,
24726,
11,
90584,
34014,
8,
284,
501,
36844,
96780,
3097,
746,
3097,
12670,
1006,
286,
90584,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_allowance() {
let (init_result, mut deps) = init_helper(vec![InitialBalance {
address: HumanAddr("giannis".to_string()),
amount: Uint128(5000),
}]);
assert!(
init_result.is_ok(),
"Init failed: {}",
init_res... | rust_cleaned_test_functions.jsonl/69629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1945
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
55731,
681,
368,
341,
286,
1077,
320,
2327,
5287,
11,
5206,
48178,
8,
284,
2930,
10418,
25592,
20703,
6341,
21190,
341,
310,
2621,
25,
11097,
13986,
445,
8212,
76283,
3263,
983,
3904,
14702,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_affine_reflection_xy_plane() {
let bias = Vector3::zero();
let normal = Unit::from_value(Vector3::unit_z());
let expected = Matrix4x4::new(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, -1.0, 0.0,
0.0, 0.0, 0.0, ... | rust_cleaned_test_functions.jsonl/129118 | {
"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,
5673,
48914,
482,
7793,
1170,
40920,
46023,
368,
341,
286,
1077,
15470,
284,
4196,
18,
486,
14154,
543,
286,
1077,
4622,
284,
7954,
486,
1499,
3142,
20258,
18,
486,
3843,
6415,
1423,
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_case_27() {
let key = "64c1572251132fc28bf37fd8e96f2327cf7948a1126fd37175a91f483d6b3ad9";
let nonce = "2308df7e6daa8bf3efde75f80ad72a49";
let expected_output =
"06a24cb90abe94cf3ee8e429d8197bc42bc769fbe81119156274f9692aa017a2";
hcha... | rust_cleaned_test_functions.jsonl/44689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
17,
22,
368,
341,
310,
1077,
1376,
284,
330,
21,
19,
66,
16,
20,
22,
17,
17,
20,
16,
16,
18,
17,
8316,
17,
23,
13233,
18,
22,
6902,
23,
68,
24,
21,
69,
17,
18,
17,
22,
979... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_url_encode_path() {
let req = test_request("double-encode-path");
let req = SignableRequest::from(&req);
let signing_params = signing_params(SigningSettings::default());
let creq = CanonicalRequest::from(&req, &signing_params).unwrap();
let expecte... | rust_cleaned_test_functions.jsonl/83742 | {
"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,
24598,
2903,
11224,
2638,
368,
341,
286,
1077,
4232,
284,
1273,
7893,
445,
4331,
12,
6180,
33095,
797,
286,
1077,
4232,
284,
7075,
480,
1900,
486,
1499,
2099,
2958,
317,
286,
1077,
15971,
6745,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_abs_paths() {
let deps = "c:/foo/foo: c:/foo/baz.rs c:/foo/abc.rs c:/foo/bar.rs
c:/foo/baz.rs: c:/foo/bar.rs
c:/foo/abc.rs:
c:/foo/bar.rs:
";
assert_eq!(
pathvec!["c:/foo/abc.rs", "c:/foo/bar.rs", "c:/foo/baz.rs"],
parse_dep_info(&deps, "c:... | rust_cleaned_test_functions.jsonl/8170 | {
"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,
21039,
49258,
3109,
31170,
24152,
368,
341,
286,
1077,
48178,
284,
330,
66,
14375,
7975,
60555,
25,
272,
14375,
7975,
3470,
1370,
25638,
272,
14375,
7975,
14,
13683,
25638,
272,
14375,
7975,
49513,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reply_output() -> anyhow::Result<()> {
smol::run(async move {
let file_name = "fuse_reply.log";
let fd = blocking!(fcntl::open(
file_name,
OFlag::O_CREAT | OFlag::O_TRUNC | OFlag::O_RDWR,
Mode::all(),
))?... | rust_cleaned_test_functions.jsonl/105641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1808
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15323,
7645,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1525,
337,
486,
6108,
18285,
3271,
341,
310,
1077,
1034,
1269,
284,
330,
95592,
15323,
1665,
876,
310,
1077,
12414,
284,
22188,
10297,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_sleep_s_suffix() {
let millis_100 = Duration::from_millis(100);
let before_test = Instant::now();
new_ucmd!().args(&["0.1s"]).succeeds().stdout_only("");
let duration = before_test.elapsed();
assert!(duration >= millis_100);
} | rust_cleaned_test_functions.jsonl/91288 | {
"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,
49393,
643,
37151,
368,
341,
262,
1077,
57092,
62,
16,
15,
15,
284,
21045,
486,
1499,
717,
56212,
7,
16,
15,
15,
317,
262,
1077,
1573,
4452,
284,
18058,
486,
3328,
1428,
262,
501,
68887,
2277,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_state_commission_split() {
let vote_state = VoteState::default();
assert_eq!(vote_state.commission_split(1.0), (0.0, 1.0, false));
let mut vote_state = VoteState::default();
vote_state.commission = std::u8::MAX;
assert_eq!(vote_state.commission_spli... | rust_cleaned_test_functions.jsonl/69982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
4387,
2965,
2728,
17052,
368,
341,
286,
1077,
6910,
4387,
284,
34034,
1397,
486,
2258,
1428,
286,
2060,
10714,
10297,
29358,
4387,
905,
2728,
17052,
7,
16,
13,
15,
701,
320,
15,
13,
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_g1_doubling_correctness() {
let mut p = G1 {
x: Fq::from_repr(FqRepr([
0x47fd1f891d6e8bbf,
0x79a3b0448f31a2aa,
0x81f3339e5f9968f,
0x485e77d50a5df10d,
0x4c6fcac4b55fd479,
0x86ed4d9906fb064,
]))
.un... | rust_cleaned_test_functions.jsonl/18688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 984
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
16,
814,
283,
9695,
31550,
2090,
368,
341,
262,
1077,
5206,
281,
284,
479,
16,
341,
286,
856,
25,
434,
80,
486,
1499,
68535,
7832,
80,
693,
649,
8956,
310,
220,
15,
87,
19,
22,
6902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_gossip_messages() {
const NUM_CRDS_VALUES: usize = 2048;
let mut rng = rand::thread_rng();
let values: Vec<_> = repeat_with(|| CrdsValue::new_rand(&mut rng, None))
.take(NUM_CRDS_VALUES)
.collect();
let splits: Vec<_> =
Cl... | rust_cleaned_test_functions.jsonl/11666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 844
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
1889,
41473,
23428,
368,
341,
286,
733,
15943,
24314,
5936,
58662,
25,
22301,
284,
220,
17,
15,
19,
23,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
2750,
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... | 3 |
#[test]
fn test_part1() {
assert!(wins_combat(Player { hp: 8, damage: 5, armor: 5 },
Player { hp: 12, damage: 7, armor: 2 }));
} | rust_cleaned_test_functions.jsonl/113412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
2060,
10297,
86052,
34454,
266,
28266,
314,
20630,
25,
220,
23,
11,
5557,
25,
220,
20,
11,
20033,
25,
220,
20,
1153,
999,
7312,
314,
20630,
25,
220,
16,
17,
11,
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 |
#[test]
fn test_store_scan_consistency_root() {
for accounts_db_caching_enabled in &[false, true] {
test_store_scan_consistency(
*accounts_db_caching_enabled,
|bank0,
bank_to_scan_sender,
_scan_finished_receiver,
... | rust_cleaned_test_functions.jsonl/2667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
28857,
31971,
47094,
12993,
368,
341,
286,
369,
9618,
8685,
666,
11829,
18220,
304,
44590,
3849,
11,
830,
60,
341,
310,
1273,
14809,
28857,
31971,
47094,
1006,
394,
353,
26206,
8685,
666,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_touch_trailing_slash() {
let (_at, mut ucmd) = at_and_ucmd!();
let file = "no-file/";
ucmd.args(&[file]).fails();
} | rust_cleaned_test_functions.jsonl/41039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60840,
3547,
14277,
11886,
988,
368,
341,
262,
1077,
5453,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
284,
330,
2152,
14203,
37254,
262,
575,
8710,
16365,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_int() {
let source = [0x40, 0x01, 0xFF];
assert_eq!(
int(&source[..], 1),
Ok((&source[1..], i8::from_be_bytes([source[0]]) as i64))
);
} | rust_cleaned_test_functions.jsonl/6830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
368,
341,
310,
1077,
2530,
284,
508,
15,
87,
19,
15,
11,
220,
15,
87,
15,
16,
11,
220,
15,
9264,
935,
310,
2060,
10714,
33673,
394,
526,
2099,
2427,
95874,
1125,
220,
16,
1326,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_batch_max_duration() {
let mut qb = QueuedBatches::default();
// Add an event at time 0
qb.add_event(InputLogEvent {
message: "".to_string(),
timestamp: 0,
})
.unwrap();
assert_eq!(qb.batches.len(), 1);
qb... | rust_cleaned_test_functions.jsonl/96498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
6345,
25454,
368,
341,
286,
1077,
5206,
75807,
284,
9418,
3260,
33,
9118,
486,
2258,
1428,
286,
442,
2691,
458,
1538,
518,
882,
220,
15,
198,
286,
75807,
1364,
6748,
29773,
2201,
1556,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_and_format_float() {
assert_eq!(
"%f".parse::<CFormatSpec>()
.unwrap()
.format_float(f64::from(1.2345))
.ok(),
Some("1.234500".to_owned())
);
assert_eq!(
"%+f"
.parse... | rust_cleaned_test_functions.jsonl/40355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8378,
8955,
17586,
368,
341,
286,
2060,
10714,
33673,
310,
5962,
69,
3263,
6400,
27638,
34,
4061,
8327,
18949,
394,
659,
15454,
741,
394,
659,
2243,
17586,
955,
21,
19,
486,
1499,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_input_range() {
let mut file = new_file("1-abc\n");
let _set = parse_cpus_from_sysfile(&mut file).expect_err("Did not fail to parse");
} | rust_cleaned_test_functions.jsonl/109217 | {
"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,
34199,
5898,
9698,
368,
341,
286,
1077,
5206,
1034,
284,
501,
2458,
445,
16,
12,
13683,
1699,
797,
286,
1077,
716,
746,
284,
4715,
90673,
5673,
20344,
1192,
2099,
6984,
1034,
568,
17119,
9266,
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 |
#[test]
fn test_unlinkat() {
let tempdir = TempDir::new("nix-test_unlinkat").unwrap();
let dirfd = fcntl::open(tempdir.path(),
fcntl::OFlag::empty(),
stat::Mode::empty());
let file = tempdir.path().join("foo");
File::create(&file).unwrap();... | rust_cleaned_test_functions.jsonl/8995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
2080,
266,
368,
341,
262,
1077,
2730,
3741,
284,
19944,
6184,
486,
931,
445,
77,
941,
16839,
4907,
2080,
266,
1827,
15454,
543,
262,
1077,
5419,
6902,
284,
282,
75017,
486,
2508,
9758,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duplicate_chan_id() {
// Test that if a given peer tries to open a channel with the same channel_id as one that is
// already open we reject it and keep the old channel.
// updating logic for the existing channel.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_nod... | rust_cleaned_test_functions.jsonl/16961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
45552,
842,
368,
341,
197,
322,
3393,
429,
421,
264,
2661,
14397,
16297,
311,
1787,
264,
5496,
448,
279,
1852,
5496,
842,
438,
825,
429,
374,
198,
197,
322,
2669,
1787,
582,
7850,
432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deserialize_invalid_old_binary_length() {
let _guard = LOCK.run_concurrently();
let buffer = b"\x0F\x00\x00\x00\x05\x00\x00\x00\x00\x00\x02\xFC\xFF\xFF\xFF";
Document::from_reader(&mut std::io::Cursor::new(buffer))
.expect_err("expected deserialization to fail");
let buf... | rust_cleaned_test_functions.jsonl/49165 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
31433,
21108,
31761,
5118,
368,
341,
262,
1077,
716,
26098,
284,
49463,
7634,
3382,
58202,
543,
262,
1077,
4147,
284,
293,
11934,
87,
15,
37,
3462,
15,
15,
3462,
15,
15,
3462,
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_absolute_am() {
let mut cpu = setup(0x00, true, 0x2D, Some(0x0210));
cpu.writ_byte(0x0210, 0x10);
let result = absolute_am(&mut cpu);
assert_eq!(
result.ok(),
Some(Fetched {
value: 0x10,
address: 0x210,
... | rust_cleaned_test_functions.jsonl/26577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50874,
22880,
368,
341,
286,
1077,
5206,
17319,
284,
6505,
7,
15,
87,
15,
15,
11,
830,
11,
220,
15,
87,
17,
35,
11,
4329,
7,
15,
87,
15,
17,
16,
15,
1106,
286,
17319,
78173,
19737,
7,
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_fixed_size_binary_equal() {
let a = create_fixed_size_binary_array(&[Some(b"hello"), Some(b"world")]);
let b = create_fixed_size_binary_array(&[Some(b"hello"), Some(b"world")]);
test_equal(a.as_ref(), b.as_ref(), true);
let b = create_fixed_size_binary_array(&[So... | rust_cleaned_test_functions.jsonl/46951 | {
"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,
37839,
2368,
31761,
11478,
368,
341,
286,
1077,
264,
284,
1855,
37839,
2368,
31761,
3858,
2099,
58,
8373,
1883,
1,
14990,
3975,
4329,
1883,
1,
14615,
899,
2558,
286,
1077,
293,
284,
1855,
37839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_product_of_trees_from_toboggans() {
let map = Map::from(INPUT);
let toboggans = [
Toboggan::new(1, 1),
Toboggan::new(3, 1),
Toboggan::new(5, 1),
Toboggan::new(7, 1),
Toboggan::new(1, 2),
];
assert_e... | rust_cleaned_test_functions.jsonl/59361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
9840,
3575,
75791,
5673,
528,
674,
16108,
596,
368,
341,
286,
1077,
2415,
284,
5027,
486,
1499,
57911,
626,
286,
1077,
24406,
16108,
596,
284,
2278,
310,
31756,
16108,
276,
486,
931,
7,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_externally_b_roundtrip() {
let v = EnumStructExternally::VariantB {
foo: 1,
bar: 2,
};
test_roundtrip(v);
} | rust_cleaned_test_functions.jsonl/110484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4301,
745,
880,
29896,
32981,
368,
341,
262,
1077,
348,
284,
14086,
9422,
84210,
745,
486,
20746,
33,
341,
286,
15229,
25,
220,
16,
345,
286,
3619,
25,
220,
17,
345,
262,
2605,
262,
1273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_good_secret_key() {
// Take the lock so changing the environment doesn't cause races.
let _env_lock = ENV_LOCK.lock().unwrap();
env::set_var(CONFIG_ENV, "stage");
check_config!(RocketConfig::parse(r#"
[stage]
se... | rust_cleaned_test_functions.jsonl/35250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 706
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44781,
21962,
3097,
368,
341,
286,
442,
11778,
279,
5296,
773,
10018,
279,
4573,
3171,
944,
5240,
20588,
624,
286,
1077,
716,
3160,
9818,
284,
32791,
27661,
21003,
1005,
15454,
543,
286,
6105,
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_struct_array_from_vec_error() {
let strings: ArrayRef = Arc::new(StringArray::from(vec![
Some("joe"),
None,
None,
]));
let ints: ArrayRef =
Arc::new(Int32Array::from(vec![Some(1), Some(2), None, Some(4)]));
... | rust_cleaned_test_functions.jsonl/686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
3858,
5673,
13251,
4096,
368,
341,
286,
1077,
9069,
25,
2910,
3945,
284,
19689,
486,
931,
2242,
1857,
486,
1499,
25592,
90515,
310,
4329,
445,
73,
4644,
4461,
310,
2240,
345,
310,
2240,
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... | 2 |
#[test]
fn test_nonnull_array_is_null() {
let a = Int32Array::from_slice(&[1, 2, 3, 4]);
let res = is_null(&a);
let expected = BooleanArray::from_slice(vec![false, false, false, false]);
assert_eq!(expected, res);
} | rust_cleaned_test_functions.jsonl/36453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
2921,
3858,
6892,
15162,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
26488,
2099,
58,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
10149,
286,
1077,
592,
284,
374,
151... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_operations_macro_attributes() {
/// Index operation
/// This doc comment will be overriden by macro attrs
#[api_v2_operation(
summary = "Root",
description = "Provides an empty value in response",
operation_id = "getIndex",
consumes = "application/... | rust_cleaned_test_functions.jsonl/128126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3702
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57345,
58810,
18240,
368,
341,
262,
1048,
8008,
5666,
198,
286,
1048,
1096,
4629,
3980,
686,
387,
916,
1869,
268,
553,
18072,
16204,
198,
262,
11506,
2068,
2273,
17,
32565,
1006,
286,
12126,
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_add_votes_duplicate_then_outdated() {
let (mut heaviest_subtree_fork_choice, duplicate_leaves_descended_from_4, _) =
setup_duplicate_forks();
let stake = 10;
let num_validators = 3;
let (bank, vote_pubkeys) =
bank_utils::setup_bank_and_vote... | rust_cleaned_test_functions.jsonl/70820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
65116,
70434,
68367,
6068,
3577,
368,
341,
286,
1077,
320,
6984,
566,
98362,
5228,
9344,
761,
669,
31936,
11,
22513,
11751,
4693,
10986,
2883,
5673,
62,
19,
11,
27439,
4035,
310,
6505,
70434... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_configure_vmm_from_json() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
let kernel_file = NamedTempFile::new().unwrap();
let rootfs_file = NamedTempFile::new().unwrap();
// We will test different scenarios with invalid resources configuration ... | rust_cleaned_test_functions.jsonl/28163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75887,
2273,
3821,
5673,
9455,
368,
341,
286,
1077,
5206,
348,
3821,
284,
1855,
2273,
3821,
5314,
7,
8846,
486,
1806,
36161,
626,
286,
1077,
10001,
2458,
284,
40459,
12151,
1703,
486,
931,
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... | 7 |
#[test]
fn test_get_network_status() {
let (_mock_db, client, mut runtime) = create_database_client_and_runtime();
let mut batch = JsonRpcBatch::default();
batch.add_get_network_status_request();
if let JsonRpcResponse::NetworkStatusResponse(connected_peers) =
execute_batch_and_get_fir... | rust_cleaned_test_functions.jsonl/4636 | {
"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,
3062,
20966,
4773,
368,
341,
262,
1077,
5453,
16712,
8685,
11,
2943,
11,
5206,
15592,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
1077,
5206,
7162,
284,
8308,
60248,
21074,
486,
2258,
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... | 2 |
#[test]
fn test_refresh_neuron_by_id_by_proxy() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
let caller = *TEST_NEURON_1_OWNER_PRINCIPAL;
refresh_neuron_by_id_or_subaccount(owner, caller, RefreshBy::NeuronId);
} | rust_cleaned_test_functions.jsonl/1153 | {
"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,
42076,
13925,
36090,
3710,
842,
3710,
29712,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
1077,
19865,
284,
353,
10033,
14039,
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_deref() {
libcnb_newtype!(CapitalizedName, CapitalizedNameError, r"^[A-Z][a-z]*$");
fn foo(name: &str) {
assert_eq!(name, "Johanna");
}
let name = "Johanna".parse::<CapitalizedName>().unwrap();
foo(&name);
} | rust_cleaned_test_functions.jsonl/10799 | {
"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,
814,
43970,
368,
341,
286,
3051,
14271,
65,
5921,
1313,
10297,
63593,
20167,
11,
18374,
20167,
1454,
11,
435,
1,
27736,
32,
11171,
1457,
64,
9141,
8465,
3,
3071,
286,
5168,
15229,
3153,
25,
609,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_primitive() {
let a: Complex<f32> = FromPrimitive::from_i32(2).unwrap();
assert_eq!(a, Complex { re: 2.0, im: 0.0 });
} | rust_cleaned_test_functions.jsonl/99586 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
84087,
368,
341,
286,
1077,
264,
25,
22096,
63895,
18,
17,
29,
284,
5542,
33313,
486,
1499,
5318,
18,
17,
7,
17,
568,
15454,
543,
286,
2060,
10714,
10297,
64,
11,
22096,
314,
312,
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 |
#[test]
fn test_subnet() {
test_interpreter_and_jit_asm!(
"
mov r2, 0xe
ldxh r3, [r1+12]
jne r3, 0x81, +2
mov r2, 0x12
ldxh r3, [r1+16]
and r3, 0xffff
jne r3, 0x8, +5
add r1, r2
mov r0, 0x1
ldxw r1, [r1+16]
and r... | rust_cleaned_test_functions.jsonl/59072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 786
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95681,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
17,
11,
220,
15,
8371,
198,
286,
326,
12719,
71,
435,
18,
11,
508,
81,
16,
10,
16,
17,
921... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scheduled_instant() {
set_logger_for_test();
let mut _executor = fasync::Executor::new_with_fake_time().unwrap();
let (t, _) = TestContext::new();
let mut lock = t.0.try_lock().unwrap();
let d = &mut lock.dispatcher;
// Timer 1 is scheduled.
... | rust_cleaned_test_functions.jsonl/52878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
643,
26644,
1243,
4706,
368,
341,
286,
738,
27413,
5478,
4452,
543,
286,
1077,
5206,
716,
80787,
284,
282,
7692,
486,
25255,
486,
931,
6615,
56881,
3009,
1005,
15454,
543,
286,
1077,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gibberish_url_check() {
let check = read_single_check("checks/tests/test4.json").unwrap();
let history = MultiChecker::check_pages(&[check]);
assert_eq!(history.len(), 1);
for story in history {
assert!(story.success.is_none());
assert!(sto... | rust_cleaned_test_functions.jsonl/80332 | {
"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,
1889,
579,
652,
812,
2903,
7200,
368,
341,
286,
1077,
1779,
284,
1349,
19487,
7200,
445,
49383,
62468,
12697,
19,
4323,
1827,
15454,
543,
286,
1077,
3840,
284,
17439,
35188,
486,
2028,
21655,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_dont_send_px_to_old_gossipsub_peers() {
let (mut gs, _, topics) = inject_nodes1()
.peer_no(0)
.topics(vec!["test".into()])
.to_subscribe(false)
.create_network();
//add an old gossipsub peer
let p1 = add_peer_with_addr_and_... | rust_cleaned_test_functions.jsonl/66945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
544,
13565,
67162,
2346,
21108,
1889,
41473,
1966,
36367,
388,
368,
341,
286,
1077,
320,
6984,
28081,
11,
8358,
13347,
8,
284,
15551,
14896,
16,
741,
310,
659,
16537,
6536,
7,
15,
340,
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... | 2 |
#[test]
fn test_parse_valid_autoscaling_describe_termination_policy_types() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"autoscaling-describe-termination-policy-types.xml",
);
let mock = MockRequestDispatcher::with_st... | rust_cleaned_test_functions.jsonl/8948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
32808,
436,
81552,
15768,
3114,
62,
88676,
22773,
9763,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
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_timestamp() {
let dt = Utc::now();
let ulid = Ulid::from_datetime(dt);
let ts = dt.timestamp() as u64 * 1000 + dt.timestamp_subsec_millis() as u64;
assert_eq!(ulid.timestamp_ms(), ts);
} | rust_cleaned_test_functions.jsonl/105735 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
368,
341,
286,
1077,
7594,
284,
547,
10413,
486,
3328,
543,
286,
1077,
8557,
307,
284,
16582,
307,
486,
1499,
28943,
24697,
317,
286,
1077,
10591,
284,
7594,
22511,
368,
438,
575,
21,
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_serialize_bestmove_with_options() {
assert_eq!(UciMessage::best_move_with_ponder(UciMove::from_to(UciSquare::from('b', 4), UciSquare::from('a', 5)),
UciMove::from_to(UciSquare::from('b', 4), UciSquare::from('d', 6))).serialize().as_str... | rust_cleaned_test_functions.jsonl/19046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
33101,
3397,
6615,
8743,
368,
341,
286,
2060,
10714,
10297,
52,
5855,
2052,
486,
15862,
17134,
6615,
62,
20328,
12317,
5855,
9860,
486,
1499,
2346,
12317,
5855,
33271,
486,
1499,
492,
65,
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_hhvm_json_ser() {
assert_eq!(1, 1);
let hhvm = json!(Hhvm {
aliased_namespaces: Arg::new({
let mut m = BTreeMap::new();
m.insert("foo".to_owned(), "bar".to_owned());
m.insert("bar".to_owned(), "baz".to_owned());
... | rust_cleaned_test_functions.jsonl/18274 | {
"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,
1523,
71,
7338,
9455,
75861,
368,
341,
286,
2060,
10714,
10297,
16,
11,
220,
16,
317,
286,
1077,
37914,
7338,
284,
2951,
10297,
39,
71,
7338,
341,
310,
18991,
1475,
9187,
27338,
25,
7638,
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_parser() {
let s: String = "
# comment
a0 bb: val
a1:
b1: 4
b2: d
a2: 4 # i'm comment
a3: [1, 2, 3]
a4:
- - a1
- a2
- 2
a5: 'single_quoted'
a6: \"double_quoted\"
a7: 你好
"
.to_owned();
let out = YamlLoader::load_from_str(&s).unwrap();
let doc ... | rust_cleaned_test_functions.jsonl/1202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
368,
341,
286,
1077,
274,
25,
923,
284,
6228,
2,
3980,
198,
64,
15,
16520,
25,
1044,
198,
64,
16,
510,
262,
293,
16,
25,
220,
19,
198,
262,
293,
17,
25,
294,
198,
64,
17,
25,
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_is_subset() {
fn is_subset(a: &[i32], b: &[i32]) -> bool {
let set_a = BTreeSet::from_iter(a.iter());
let set_b = BTreeSet::from_iter(b.iter());
set_a.is_subset(&set_b)
}
assert_eq!(is_subset(&[], &[]), true);
assert_eq!(is_subset(&[], &[1, 2]), true);
... | rust_cleaned_test_functions.jsonl/13744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 671
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
47532,
368,
341,
262,
5168,
374,
47532,
2877,
25,
44590,
72,
18,
17,
1125,
293,
25,
44590,
72,
18,
17,
2467,
1464,
1807,
341,
286,
1077,
738,
4306,
284,
425,
6533,
1649,
486,
1499,
11723... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inside_or_branch_inside_if_conditional_with_constant() {
// We don't inline non-immutable constants into branches.
test_same("var a = [false]; if (x || a) {}");
} | rust_cleaned_test_functions.jsonl/27629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72860,
8734,
28031,
72860,
11119,
24433,
3005,
6615,
34967,
368,
341,
262,
442,
1205,
1513,
944,
7381,
2477,
63583,
5922,
18021,
1119,
23091,
624,
262,
1273,
33574,
445,
947,
264,
284,
508,
3849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_listen_syn() {
let mut s = socket_listen();
send!(s, TcpRepr {
control: TcpControl::Syn,
seq_number: REMOTE_SEQ,
ack_number: None,
..SEND_TEMPL
});
sanity!(s, socket_syn_received());
} | rust_cleaned_test_functions.jsonl/1701 | {
"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,
79286,
51393,
368,
341,
286,
1077,
5206,
274,
284,
7575,
79286,
543,
286,
3624,
10297,
82,
11,
64876,
693,
649,
341,
310,
2524,
25,
262,
64876,
3273,
486,
37134,
345,
310,
12981,
5500,
25,
25587... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_export() -> Result<(), Error> {
let inspector = Inspector::new();
let inspect = inspector.root();
assert_data_tree!(
inspector,
root: contains {
}
);
let data_json = "{ negint: -5, int: 42, unsigned: 0, float: 45.6... | rust_cleaned_test_functions.jsonl/51360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 825
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
27114,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
44725,
284,
44495,
486,
931,
543,
286,
1077,
24085,
284,
44725,
12576,
543,
286,
2060,
1769,
11663,
33673,
310,
44725,
345,
310,
3704... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_report_deferred_by_policy() {
block_on(async {
let config = config_generator();
let response = json!({"response":{
"server": "prod",
"protocol": "3.0",
"app": [{
"appid": "{00000000-0000-0000-0000-000000000... | rust_cleaned_test_functions.jsonl/94216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 996
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
7844,
261,
1151,
3710,
22773,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
2033,
284,
2951,
0,
16864,
2322,
12602,
1060,
330,
4030,
788,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cant_pull_non_assignments() {
cov_mark::check!(test_cant_pull_non_assignments);
check_assist_not_applicable(
pull_assignment_up,
r#"
fn foo() {
let mut a = 1;
let b = &mut a;
if true {
$0*b + 2;
} else {
*b + 3;
}
}
"#,... | rust_cleaned_test_functions.jsonl/117260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
517,
65693,
21637,
20688,
1368,
368,
341,
286,
21836,
18924,
486,
2028,
10297,
1944,
666,
517,
65693,
21637,
20688,
1368,
317,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
6815,
51891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let array = PackedStringArray::<u8>::new_empty(20);
assert_eq!(array.get(12).unwrap(), "");
assert_eq!(array.get(9).unwrap(), "");
assert_eq!(array.get(3).unwrap(), "");
} | rust_cleaned_test_functions.jsonl/47437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
368,
341,
286,
1077,
1334,
284,
393,
11191,
703,
1857,
27638,
84,
23,
6831,
931,
15124,
7,
17,
15,
317,
286,
2060,
10714,
10297,
1653,
670,
7,
16,
17,
568,
15454,
1507,
14498,
286,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_context_line_default() {
let mut frame = Annotated::new(Frame {
pre_context: Annotated::new(vec![Annotated::default(), Annotated::new("".to_string())]),
post_context: Annotated::new(vec![Annotated::new("".to_string()), Annotated::default()]),
..Frame::default()
})... | rust_cleaned_test_functions.jsonl/14098 | {
"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,
8467,
6528,
9993,
368,
341,
262,
1077,
5206,
4034,
284,
1527,
87029,
486,
931,
91008,
341,
286,
855,
8467,
25,
1527,
87029,
486,
931,
25592,
20703,
2082,
87029,
486,
2258,
1507,
1527,
87029,
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_transfer_encoding_value_is_chunked() {
assert!(transfer_encoding_value_is_chunked("chunked"));
assert!(transfer_encoding_value_is_chunked("gzip, chunked"));
assert!(!transfer_encoding_value_is_chunked("compress"));
} | rust_cleaned_test_functions.jsonl/131329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
37613,
3142,
6892,
30539,
291,
368,
341,
286,
2060,
10297,
24188,
37613,
3142,
6892,
30539,
291,
445,
25979,
291,
4010,
286,
2060,
10297,
24188,
37613,
3142,
6892,
30539,
291,
445,
70996,
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 |
#[test]
fn test_encode_decode_content_format() {
let mut packet = PacketUdp::new();
packet.set_content_format(ContentFormat::TextPlain);
assert_eq!(
ContentFormat::TextPlain,
packet.get_content_format().unwrap()
)
} | rust_cleaned_test_functions.jsonl/92792 | {
"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,
11224,
15227,
7495,
8955,
368,
341,
286,
1077,
5206,
10151,
284,
28889,
52,
9796,
486,
931,
543,
286,
10151,
980,
7495,
8955,
79352,
4061,
486,
1178,
26982,
317,
286,
2060,
10714,
33673,
310,
8883... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_debug_output() {
use schema::users::dsl::*;
let command = update(users.filter(id.eq(1))).set(name.eq("new_name"));
let sql = debug_query::<TestBackend, _>(&command).to_string();
if cfg!(feature = "postgres") {
assert_eq!(
sql,
r#"UPDATE "users" SET... | rust_cleaned_test_functions.jsonl/5613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
7645,
368,
341,
262,
990,
10802,
486,
4218,
486,
81874,
56162,
262,
1077,
3210,
284,
2647,
35438,
6936,
3724,
26662,
7,
16,
36334,
746,
3153,
26662,
445,
931,
1269,
4010,
262,
1077,
5704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_re_init() {
let clo = || {
|mut s: Scope<(), _>| {
s.yield_(0);
s.yield_(3);
5
}
};
let mut g = Gn::new_opt(0x800, || 0);
g.scoped_init(clo());
assert_eq!(g.next(), Some(0));
assert_eq!(g.next(), Some(3));
assert_e... | rust_cleaned_test_functions.jsonl/91431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
6137,
368,
341,
262,
1077,
5292,
284,
1369,
341,
286,
760,
6984,
274,
25,
34920,
68843,
716,
69844,
341,
310,
274,
2384,
816,
8361,
15,
317,
310,
274,
2384,
816,
8361,
18,
317,
310,
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_state() {
let mut state = MainState::new();
let buffers = state._get_buffers();
let write = io::sink();
let json = make_reader(r#"{"method":"client_started","params":{}}
{"method":"set_theme","params":{"theme_name":"InspiredGitHub"}}
{"id":0,"method":"new_view","params":{}}"#);
... | rust_cleaned_test_functions.jsonl/39964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 514
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
368,
341,
262,
1077,
5206,
1584,
284,
4697,
1397,
486,
931,
543,
262,
1077,
27389,
284,
1584,
1436,
455,
54591,
1428,
262,
1077,
3270,
284,
6399,
486,
66738,
543,
262,
1077,
2951,
284,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unconnected() {
type Cost = i32;
let neigh: Vec<Vec<(usize, Cost)>> = vec![
vec![(1, 1)],
vec![(0, 1)],
vec![(3, 1)],
vec![(4, 1)],
vec![(2, 1)],
];
let expected = vec![Real(0), Real(1), Inf, Inf, Inf];
... | rust_cleaned_test_functions.jsonl/98954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
15288,
368,
341,
286,
943,
11194,
284,
600,
18,
17,
280,
286,
1077,
96166,
25,
11312,
50439,
28706,
51878,
11,
11194,
54229,
284,
7486,
90515,
310,
7486,
0,
9697,
16,
11,
220,
16,
30749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interruption_in_sync() {
let (mut smp, peers) = SharedMempoolNetwork::bootstrap_validator_network(3, 1);
let (peer_a, peer_b, peer_c) = (
peers.get(0).unwrap(),
peers.get(1).unwrap(),
peers.get(2).unwrap(),
);
smp.add_txns(&peer_a, vec![TestTransaction::ne... | rust_cleaned_test_functions.jsonl/31470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 897
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
615,
84,
560,
1243,
23008,
368,
341,
262,
1077,
320,
6984,
274,
1307,
11,
25029,
8,
284,
16990,
44,
3262,
1749,
12320,
486,
6281,
64959,
20966,
7,
18,
11,
220,
16,
317,
262,
1077,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_parsing() {
assert_eq!(nat(0), parse_natural("x0").unwrap());
assert_eq!(nat(0x10), parse_natural("x10").unwrap());
assert_eq!(nat(1337), parse_natural("x539").unwrap());
assert_eq!(nat(0xFFFFFFFF), parse_natural("xFFFFFFFF").unwrap());
assert_eq!(
... | rust_cleaned_test_functions.jsonl/78233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
620,
28598,
368,
341,
286,
2060,
10714,
10297,
33297,
7,
15,
701,
4715,
1089,
4585,
445,
87,
15,
1827,
15454,
1423,
286,
2060,
10714,
10297,
33297,
7,
15,
87,
16,
15,
701,
4715,
1089,
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_cellular_noise_overflow() {
let mut noise = FastNoise::seeded(6000);
noise.set_noise_type(NoiseType::Cellular);
noise.set_frequency(0.08);
noise.set_cellular_distance_function(CellularDistanceFunction::Manhattan);
for y in 0..1024 {
for x in 0.... | rust_cleaned_test_functions.jsonl/43382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16648,
1276,
40313,
79073,
368,
341,
286,
1077,
5206,
11980,
284,
17288,
61819,
486,
22602,
291,
7,
21,
15,
15,
15,
317,
286,
11980,
980,
40313,
1819,
7,
61819,
929,
486,
3599,
1276,
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,
1,
1,
1... | 3 |
#[test]
fn test_interruption_in_sync() {
let (mut smp, peers) =
SharedMempoolNetwork::bootstrap_validator_network(3, 1, None, None, false);
let (peer_a, peer_b, peer_c) = (
peers.get(0).unwrap(),
peers.get(1).unwrap(),
peers.get(2).unwrap(),
);
smp.add_txns(&peer_... | rust_cleaned_test_functions.jsonl/54555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 764
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
615,
84,
560,
1243,
23008,
368,
341,
262,
1077,
320,
6984,
274,
1307,
11,
25029,
8,
4035,
286,
16990,
44,
3262,
1749,
12320,
486,
6281,
64959,
20966,
7,
18,
11,
220,
16,
11,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_dispatch_non_ndp_packets_during_ndp_dad() {
// Here we make sure we are not dispatching packets destined to a
// tentative address (that is performing NDP's Duplicate Address
// We explicitly call `build_with` when building our context below
// becaus... | rust_cleaned_test_functions.jsonl/122987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
42991,
21637,
43544,
79,
63569,
814,
1677,
43544,
79,
814,
329,
368,
341,
286,
442,
5692,
582,
1281,
2704,
582,
525,
537,
6845,
287,
27035,
50587,
311,
264,
198,
286,
442,
75120,
2621,
320... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_coercion() {
let gil = Python::acquire_gil();
let py = gil.python();
let v = ("foo", "bar");
let seq = v.to_py_object(py).into_object().cast_into::<PySequence>(py).unwrap();
assert!(seq.tuple(py).is_ok());
} | rust_cleaned_test_functions.jsonl/22538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
11393,
2962,
290,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
284,
3489,
7975,
497,
330,
2257,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part_a_example_1() {
let lines = vec![
"start-A",
"start-b",
"A-c",
"A-b",
"b-d",
"A-end",
"b-end",
];
let graph = Graph::new(&lines);
let paths = graph.get_paths(&Part::A);
... | rust_cleaned_test_functions.jsonl/57729 | {
"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,
10495,
4306,
39304,
62,
16,
368,
341,
286,
1077,
5128,
284,
7486,
90515,
310,
330,
2468,
6691,
756,
310,
330,
2468,
1455,
756,
310,
330,
32,
1786,
756,
310,
330,
32,
1455,
756,
310,
330,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_readdir_recursive_timeout() {
let mut executor = fasync::Executor::new_with_fake_time().unwrap();
executor.set_fake_time(fasync::Time::from_nanos(0));
let fut = async move {
let tempdir = TempDir::new().expect("failed to create tmp dir");
let dir ... | rust_cleaned_test_functions.jsonl/4611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 595
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
44525,
66242,
20537,
368,
341,
286,
1077,
5206,
31558,
284,
282,
7692,
486,
25255,
486,
931,
6615,
56881,
3009,
1005,
15454,
543,
286,
31558,
980,
56881,
3009,
955,
7692,
486,
1462,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extract_enum_variant_name_value_namespace() {
check_assist(
extract_struct_from_enum_variant,
r#"const One: () = ();
enum A { <|>One(u32, u32) }"#,
r#"const One: () = ();
struct One(pub u32, pub u32);
enum A { One(One) }"#,
);
} | rust_cleaned_test_functions.jsonl/13105 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
31054,
46112,
1269,
3142,
41571,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
15126,
5673,
31054,
46112,
345,
310,
435,
55543,
1024,
3776,
25,
1719,
284,
9563,
9018,
362,
314,
82639,
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_get_vrf_iface_yaml() {
with_vrf_iface(|| {
let state = NetState::retrieve().unwrap();
let iface = &state.ifaces[IFACE_NAME];
assert_eq!(iface.iface_type, nispor::IfaceType::Vrf);
assert_eq!(
serde_yaml::to_string(&iface.vrf).unwrap().trim(),
... | rust_cleaned_test_functions.jsonl/32341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
2273,
8052,
67666,
64380,
368,
341,
262,
448,
2273,
8052,
67666,
79453,
341,
286,
1077,
1584,
284,
9374,
1397,
486,
55527,
1005,
15454,
543,
286,
1077,
49313,
284,
609,
2454,
35431,
2434,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_colliding_postscript_names() {
use GeneratorError::*;
let (font_catalog, font_pkgs, product_config) = make_font_db_args();
let font_info_loader = TestFontInfoLoader::new(btreemap! {
("AlphaSans.ttc".to_string(), 0) => FontInfo {
char_set: Char... | rust_cleaned_test_functions.jsonl/58067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1031
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43597,
6577,
6333,
2282,
9187,
368,
341,
286,
990,
28358,
1454,
79304,
286,
1077,
320,
4026,
47310,
11,
3301,
33321,
5857,
11,
1985,
5332,
8,
284,
1281,
17451,
8685,
8384,
543,
286,
1077,
3301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_concurrent_transactions_busy_commit() {
use std::time::Duration;
let tmp = tempfile::tempdir().unwrap();
let path = tmp.path().join("transactions.db3");
Connection::open(&path)
.expect("create temp db")
.execute_batch(
"
... | rust_cleaned_test_functions.jsonl/25497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
68182,
75959,
36346,
368,
341,
286,
990,
1460,
486,
1678,
486,
12945,
280,
286,
1077,
4174,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
4174,
3875,
1005,
5987,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_facet_facets_wrong_type() -> Result<(), Error> {
let meta = json!({
"facets": []
});
let f = test_facet(&meta);
assert!(f.is_err());
Ok(())
} | rust_cleaned_test_functions.jsonl/120019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41589,
295,
41589,
1415,
75198,
1819,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
8823,
284,
2951,
0,
2262,
688,
330,
22185,
1415,
788,
4167,
286,
1625,
286,
1077,
282,
284,
1273,
41589,
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 |
#[test]
fn test_pending_applies() {
let temp_dir = TempDir::new("test_pending_applies").unwrap();
let mut cf_opts = ColumnFamilyOptions::new();
cf_opts.set_level_zero_slowdown_writes_trigger(5);
cf_opts.set_disable_auto_compactions(true);
let cfs_opts = vec![
... | rust_cleaned_test_functions.jsonl/33224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3051
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37861,
21093,
7202,
368,
341,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
931,
445,
1944,
37861,
21093,
7202,
1827,
15454,
543,
286,
1077,
5206,
24111,
32354,
284,
9332,
15192,
3798,
486,
931,
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... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.