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_try_from_record_for_contig_with_an_invalid_length() {
let record = Record::new(
record::Key::Contig,
record::Value::Struct(vec![
(String::from("ID"), String::from("sq0")),
(String::from("length"), String::from("NA")),
])... | rust_cleaned_test_functions.jsonl/81754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
14192,
5478,
10260,
343,
6615,
12008,
31433,
5118,
368,
341,
286,
1077,
3255,
284,
13583,
486,
931,
1006,
310,
3255,
486,
1592,
486,
818,
343,
345,
310,
3255,
486,
1130,
486,
9422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hex_color_3_char_hex() {
let ok = HexColor::try_from("#d18").unwrap();
assert_eq!(ok.to_string(), "#d18");
} | rust_cleaned_test_functions.jsonl/121606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
6714,
62,
18,
9232,
32655,
368,
341,
286,
1077,
5394,
284,
27228,
1636,
486,
1539,
5673,
3584,
67,
16,
23,
1827,
15454,
543,
286,
2060,
10714,
10297,
562,
2389,
3904,
1507,
5869,
67,
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 |
#[test]
fn test_version_parse() {
assert_eq!(Version::parse("1"), Err("1"));
assert_eq!(Version::parse("1."), Err("1."));
assert_eq!(Version::parse("1 h3l1o. W0rld"), Err("1 h3l1o. W0rld"));
assert_eq!(Version::parse("1. h3l1o. W0rld"), Err("1. h3l1o. W0rld"));
assert_eq!... | rust_cleaned_test_functions.jsonl/61346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 643
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
21039,
368,
341,
286,
2060,
10714,
10297,
5637,
486,
6400,
445,
16,
3975,
15495,
445,
16,
4010,
286,
2060,
10714,
10297,
5637,
486,
6400,
445,
16,
82815,
15495,
445,
16,
54136,
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_sample() {
let df = df![
"foo" => &[1, 2, 3, 4, 5]
]
.unwrap();
// default samples are random and don't require seeds
assert!(df.sample_n(3, false, false, None).is_ok());
assert!(df.sample_frac(0.4, false, false, None).is_ok());
// with seeding
... | rust_cleaned_test_functions.jsonl/46599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
368,
341,
262,
1077,
6764,
284,
6764,
90515,
310,
330,
7975,
1,
589,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
921,
286,
5133,
286,
659,
15454,
1428,
262,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_user_permissions() {
let desmos_cli = DesmosCli::default();
let contract_address = desmos_cli.get_contract_by_code(1);
let query = DesmosChain {
request: SubspacesQuery::UserPermissions {
subspace_id: TEST_SUBSPACE,
user:... | rust_cleaned_test_functions.jsonl/93738 | {
"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,
5738,
3317,
44767,
368,
341,
286,
1077,
939,
8631,
47147,
284,
3874,
8631,
87014,
486,
2258,
543,
286,
1077,
5116,
6744,
284,
939,
8631,
47147,
670,
51499,
3710,
4136,
7,
16,
626,
286,
1077,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_no_debug_data() {
let frame = GoawayFrame::new(0, ErrorCode::ProtocolError);
let expected: Vec<u8> = raw_frame_from_parts((8, 0x7, 0, 0), vec![0, 0, 0, 0, 0, 0, 0, 1])
.into();
let raw = serialize_frame(&frame);
asser... | rust_cleaned_test_functions.jsonl/38129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
6536,
15446,
1769,
368,
341,
286,
1077,
4034,
284,
5994,
13757,
4369,
486,
931,
7,
15,
11,
60084,
486,
20689,
1454,
317,
286,
1077,
3601,
25,
11312,
34837,
23,
29,
284,
7112,
8929,
5673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bulk_load_crash() {
let bulk_nodes = vec![
[570.0, 1080.0, 89.0],
[30.0, 1080.0, 627.0],
[1916.0, 1080.0, 68.0],
[274.0, 1080.0, 790.0],
[476.0, 1080.0, 895.0],
[1557.0, 1080.0, 250.0],
[1546.0, 1080.0, 8... | rust_cleaned_test_functions.jsonl/125867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1526
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71392,
12411,
32331,
988,
368,
341,
286,
1077,
19583,
14896,
284,
7486,
90515,
310,
508,
20,
22,
15,
13,
15,
11,
220,
16,
15,
23,
15,
13,
15,
11,
220,
23,
24,
13,
15,
1259,
310,
508,
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_symlink_custom_backup_suffix() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "test_symlink_custom_backup_suffix";
let link = "test_symlink_custom_backup_suffix_link";
let suffix = "super-suffix-of-the-century";
at.touch(file);
at.symlink_file(file, link);
assert!... | rust_cleaned_test_functions.jsonl/4886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58530,
44243,
15875,
44710,
37151,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
284,
330,
1944,
58530,
44243,
15875,
44710,
37151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_string() {
let expected: Cow<'static, str> = "Nullable(UInt8)".into();
let actual = SqlType::Nullable(&SqlType::UInt8).to_string();
assert_eq!(expected, actual)
} | rust_cleaned_test_functions.jsonl/81437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
3904,
368,
341,
262,
1077,
3601,
25,
21851,
18291,
1978,
11,
607,
29,
284,
330,
15703,
69210,
23,
94010,
18122,
543,
262,
1077,
5042,
284,
7224,
929,
486,
15703,
2099,
8269,
929,
486,
1877... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bit() {
use consts::*;
use Same;
type T1 = <GetBitOut<U2, U0> as Same<B0>>::Output;
type T2 = <GetBitOut<U2, U1> as Same<B1>>::Output;
type T3 = <GetBitOut<U2, U2> as Same<B0>>::Output;
<T1 as Bit>::to_bool();
<T2 as Bit>::to_bool();
<T3 as Bit>::to_bool();
} | rust_cleaned_test_functions.jsonl/37834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13996,
368,
341,
262,
990,
95432,
56162,
262,
990,
25739,
280,
262,
943,
350,
16,
284,
366,
1949,
8344,
2662,
36397,
17,
11,
547,
15,
29,
438,
25739,
32519,
15,
77595,
5097,
280,
262,
94... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_used_in_while_expr() {
check_assist(
inline_local_variable,
r"
fn foo() {
let a$0 = 1 > 0;
while a {}
}",
r"
fn foo() {
while 1 > 0 {}
}",
);
} | rust_cleaned_test_functions.jsonl/3242 | {
"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,
27803,
1243,
86069,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
435,
698,
8822,
15229,
368,
341,
262,
1077,
264,
3,
15,
284,
220,
16,
861,
220,
15,
280,
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_hash_height_1() {
// more precisely `curl`ed from locally build docker image of:
// 606d0a89ccabbd3e59cff521f9f4d875cc366ac9
// via
let json_data = r#"
{
"version": {
"block": "10",
"app": "1"
},
"chain_id": "dock... | rust_cleaned_test_functions.jsonl/14124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 730
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
9561,
62,
16,
368,
341,
1789,
286,
442,
803,
23638,
1565,
19925,
63,
291,
504,
23490,
1936,
26588,
2168,
315,
510,
1789,
286,
442,
220,
21,
15,
21,
67,
15,
64,
23,
24,
638,
370,
8940,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_volatile() {
let mut p = Path::default();
assert!(!p.is_volatile());
p.set_is_volatile(true);
assert!(p.is_volatile());
} | rust_cleaned_test_functions.jsonl/55876 | {
"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,
6892,
2273,
25517,
368,
972,
262,
1077,
5206,
281,
284,
7933,
486,
2258,
1647,
262,
2060,
0,
3471,
79,
2079,
2273,
25517,
6201,
262,
281,
980,
6892,
2273,
25517,
3715,
736,
262,
2060,
10297,
79,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_summaries() {
let late_arrival_period = Duration::from_secs(100);
let mut w = make_windows(late_arrival_period);
let instant = w.created_at;
let created_at_time = to_approximate_datetime(w.created_at);
// Window 1
w.add_range(
Some(&Se... | rust_cleaned_test_functions.jsonl/133353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
89333,
368,
341,
286,
1077,
3309,
11210,
3936,
20818,
284,
21045,
486,
1499,
68718,
7,
16,
15,
15,
317,
286,
1077,
5206,
289,
284,
1281,
58220,
2333,
349,
11210,
3936,
20818,
317,
286,
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_that_java_code_compiles_and_demo_runs() {
let registry = get_aptos_registry();
let abis = get_stdlib_script_abis();
let dir = tempdir().unwrap();
let paths = std::fs::read_dir("examples/java/custom_aptos_code")
.unwrap()
.map(|e| e.unwrap().path());
let confi... | rust_cleaned_test_functions.jsonl/15229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70197,
77323,
4136,
18177,
3658,
8378,
47830,
67352,
368,
341,
262,
1077,
19424,
284,
633,
62,
2689,
436,
50650,
543,
262,
1077,
668,
285,
284,
633,
15656,
2740,
14660,
62,
15367,
543,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_decoder_invalid_one_byte_before_finish() {
let mut d = UTF_16BE.decoder();
assert_feed_ok!(d, [], [0x12], "");
assert_finish_err!(d, "");
let mut d = UTF_16BE.decoder();
assert_feed_ok!(d, [0x12, 0x34], [0x56], "\u1234");
assert_finish_err!(d, "")... | rust_cleaned_test_functions.jsonl/15684 | {
"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,
49843,
31433,
11667,
19737,
23708,
42980,
368,
341,
286,
1077,
5206,
294,
284,
20076,
62,
16,
21,
11594,
74047,
543,
286,
2060,
42390,
19817,
10297,
67,
11,
10071,
508,
15,
87,
16,
17,
1125,
144... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rle_i32() {
// Test primitive rle block iterator for i32
let builder = PlainPrimitiveBlockBuilder::new(20);
let mut rle_builder =
RleBlockBuilder::<I32Array, PlainPrimitiveBlockBuilder<i32>>::new(builder);
for item in [Some(&1)].iter().cycle().clo... | rust_cleaned_test_functions.jsonl/38167 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 856
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
1710,
273,
5318,
18,
17,
368,
341,
286,
442,
3393,
27594,
435,
273,
2504,
15091,
369,
600,
18,
17,
198,
286,
1077,
7363,
284,
43199,
33313,
4713,
3297,
486,
931,
7,
17,
15,
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... | 4 |
#[test]
fn test_ns_return_struct() {
let cxx = indoc! {"
A::B::Bob give_bob() {
A::B::Bob a;
a.a = 3;
a.b = 4;
return a;
}
"};
let hdr = indoc! {"
#include <cstdint>
namespace A {
namespace B {
... | rust_cleaned_test_functions.jsonl/9784 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34728,
12511,
15126,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
362,
486,
33,
486,
32388,
2968,
880,
674,
368,
341,
310,
362,
486,
33,
486,
32388,
264,
280,
310,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simplify_composed_and() {
let expr = binary_expr(
binary_expr(col("c2").gt(lit(5)), Operator::And, col("d").lt(lit(6))),
Operator::And,
col("c2").gt(lit(5)),
);
let expected =
binary_expr(col("c2").gt(lit(5)), Opera... | rust_cleaned_test_functions.jsonl/19683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
70206,
2965,
3865,
8378,
368,
341,
1789,
286,
1077,
15169,
284,
7868,
21915,
1006,
310,
7868,
21915,
19611,
445,
66,
17,
1827,
5178,
2333,
275,
7,
20,
5731,
28498,
486,
3036,
11,
1375,
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... | 1 |
#[test]
fn test_conditional_keywords() {
// property names
assert_parses("const obj = {if: 3, function: 4};");
assert_parses("const obj = {true: 1, false: 0, null: NaN};");
assert_parses("assert(obj.if == 3);");
assert_parses("assert(obj.true + obj.false + obj.null == NaN);");
// method... | rust_cleaned_test_functions.jsonl/7979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24433,
3005,
51354,
368,
341,
262,
442,
3343,
5036,
198,
262,
2060,
77113,
288,
445,
1024,
2839,
284,
314,
333,
25,
220,
18,
11,
729,
25,
220,
19,
11061,
797,
262,
2060,
77113,
288,
445,
1024,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drain_leak() {
static mut DROPS: i32 = 0;
#[derive(Debug, PartialEq)]
struct D(u32, bool);
impl Drop for D {
fn drop(&mut self) {
unsafe {
DROPS += 1;
}
if self.1 {
panic!("panic in `drop`");
... | rust_cleaned_test_functions.jsonl/24427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
11751,
585,
368,
341,
262,
1099,
5206,
422,
1285,
5012,
25,
600,
18,
17,
284,
220,
15,
401,
262,
11506,
27098,
42618,
11,
55039,
5563,
262,
2036,
422,
8154,
18,
17,
11,
1807,
626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fountain_encoder_cbor() {
let message = crate::xoshiro::test_utils::make_message("Wolf", 256);
let mut encoder = Encoder::new(&message, 30);
let expected_parts = vec![
"8501091901001a0167aa07581d916ec65cf77cadf55cd7f9cda1a1030026ddd42e905b77adc36e4f2d3c",
... | rust_cleaned_test_functions.jsonl/106871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
34524,
39068,
666,
9368,
368,
341,
286,
1077,
1943,
284,
17717,
486,
87,
31845,
299,
486,
1944,
17309,
486,
6927,
6462,
445,
95434,
497,
220,
17,
20,
21,
317,
286,
1077,
5206,
23668,
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... | 2 |
#[test]
fn test_validate_precedences_with_undeclared_precedence() {
let grammar = InputGrammar {
name: String::new(),
word_token: None,
extra_symbols: vec![],
external_tokens: vec![],
supertype_symbols: vec![],
expected_conflicts: v... | rust_cleaned_test_functions.jsonl/113895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
10442,
1998,
2380,
6615,
62,
28865,
86251,
10442,
1998,
763,
368,
341,
286,
1077,
31428,
284,
5571,
97178,
341,
310,
829,
25,
923,
486,
931,
3148,
310,
3409,
6458,
25,
2240,
345,
310,
496... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_input() {
let filename = "test_input.txt";
let contents = util::string_from_file(&filename);
assert_eq!(plant_sum(&contents, 20), 325);
} | rust_cleaned_test_functions.jsonl/65695 | {
"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,
5898,
368,
341,
286,
1077,
3899,
284,
330,
1944,
5898,
3909,
876,
286,
1077,
8794,
284,
4094,
486,
917,
5673,
2458,
2099,
8404,
317,
286,
2060,
10714,
10297,
20827,
10160,
2099,
17610,
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 |
#[test]
fn test_file_backend_sha256() {
let pt = vec![1u8, 2, 3];
let (key_path, _tmp_key_dir) = create_key_file("key");
let backend = FileBackend::new(EncryptionMethod::Aes256Ctr, &key_path).unwrap();
let encrypted_content = backend.encrypt(&pt).unwrap();
let plaintext... | rust_cleaned_test_functions.jsonl/81007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
40011,
48836,
17,
20,
21,
368,
341,
286,
1077,
10817,
284,
7486,
20703,
16,
84,
23,
11,
220,
17,
11,
220,
18,
4821,
286,
1077,
320,
792,
2638,
11,
716,
5173,
3097,
4334,
8,
284,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_topic_tree() {
let tree = TopicTree::build(vec![topic!("sport/tennis/+"),
topic!("sport/tennis/player1"),
topic!("sport/tennis/player1/#"),
topic!("sport/#"),
... | rust_cleaned_test_functions.jsonl/79599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31414,
11663,
368,
341,
286,
1077,
4916,
284,
32911,
6533,
486,
5834,
25592,
20703,
16411,
17223,
60901,
14,
1960,
25151,
61651,
4461,
12841,
8544,
17223,
60901,
14,
1960,
25151,
59503,
16,
4461,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_supermajority_root_from_vote_accounts() {
let convert_to_vote_accounts =
|roots_stakes: Vec<(Slot, u64)>| -> HashMap<Pubkey, (u64, VoteAccount)> {
roots_stakes
.into_iter()
.map(|(root, stake)| {
... | rust_cleaned_test_functions.jsonl/46827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38886,
36505,
487,
12993,
5673,
54360,
55665,
368,
341,
286,
1077,
5508,
2346,
54360,
55665,
4035,
310,
760,
37165,
1261,
2050,
25,
11312,
28706,
19877,
11,
575,
21,
19,
16018,
91,
1464,
10528,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mod_exp() {
let tests = [(0, 10, 10, 0),
(1, 10, 10, 1),
(2, 1000, 2, 0),
(2, 10, 2147483647, 1024),
(1337, 100, 2147483647, 1398068914),
(18, 112994442, 1000000001, 59108659)];
for &(a, b, m, expected)... | rust_cleaned_test_functions.jsonl/49964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7480,
14214,
368,
341,
262,
1077,
7032,
284,
17826,
15,
11,
220,
16,
15,
11,
220,
16,
15,
11,
220,
15,
1326,
338,
320,
16,
11,
220,
16,
15,
11,
220,
16,
15,
11,
220,
16,
1326,
338,
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... | 2 |
#[test]
fn test_no_default_parameter_not_removed() {
test_same("function f(x,y) { }");
test_same("function f(x) { }");
test_same("function f() { }");
} | rust_cleaned_test_functions.jsonl/487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
9993,
24899,
7913,
68248,
368,
341,
262,
1273,
33574,
445,
1688,
282,
2075,
7358,
8,
314,
220,
335,
797,
262,
1273,
33574,
445,
1688,
282,
2075,
8,
314,
220,
335,
797,
262,
1273,
33574,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_create_block_with_specified_transactions() {
let (testkit, handler) = init_handler(Height(0));
let tx_foo = TxTimestamp::for_str("foo");
let tx_bar = TxTimestamp::for_str("bar");
{
let mut testkit = testkit.write().unwrap();
testkit.api().... | rust_cleaned_test_functions.jsonl/14765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 647
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
7113,
6615,
13594,
1870,
68182,
368,
341,
286,
1077,
320,
1944,
8226,
11,
7013,
8,
284,
2930,
10183,
7,
3640,
7,
15,
3237,
286,
1077,
9854,
761,
2624,
284,
39850,
20812,
486,
1958,
2895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_closures_sharing() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new();
engine.register_fn("foo", |x: INT, s: &str| s.len() as INT + x);
engine.register_fn("bar", |x: INT, s: String| s.len() as INT + x);
assert_eq!(
engine.eval::<INT>(
r#"
... | rust_cleaned_test_functions.jsonl/20580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
41206,
3712,
3249,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
5206,
4712,
284,
8200,
486,
931,
1428,
262,
4712,
9929,
15246,
445,
7975,
497,
760,
87,
25,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_get_state() {
let _setup = TestModeSetup::init();
assert_eq!(VcxStateType::VcxStateInitialized as u32, _issuer_sm().state());
assert_eq!(VcxStateType::VcxStateOfferSent as u32, _issuer_sm().to_offer_sent_state().state());
assert_eq!(VcxStateType::... | rust_cleaned_test_functions.jsonl/20338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
4387,
368,
341,
310,
1077,
716,
15188,
284,
3393,
3636,
21821,
486,
2327,
1428,
310,
2060,
10714,
10297,
53,
25844,
1397,
929,
486,
53,
25844,
1397,
22495,
438,
575,
18,
17,
11,
716,
66817... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_destroy_duplex_stream_after_unplugging_a_default_input_device() {
test_unplug_a_device_on_an_active_stream(StreamType::DUPLEX, Scope::Input, true, 0);
} | rust_cleaned_test_functions.jsonl/23857 | {
"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,
18066,
51932,
2571,
12673,
19844,
4907,
500,
35268,
4306,
9993,
5898,
9204,
368,
341,
262,
1273,
4907,
47474,
4306,
9204,
4470,
12008,
12930,
12673,
52011,
929,
486,
35,
3124,
35245,
11,
34920,
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 |
#[test]
fn test_buffer_array_min_max_with_nulls() {
let a = Int32Array::from(vec![Some(5), None, None, Some(8), Some(9)]);
assert_eq!(5, min(&a).unwrap());
assert_eq!(9, max(&a).unwrap());
} | rust_cleaned_test_functions.jsonl/27862 | {
"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,
7776,
3858,
7260,
6345,
6615,
15162,
82,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
20,
701,
2240,
11,
2240,
11,
4329,
7,
23,
701,
4329,
7,
24,
4195... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_put_ref_then_unref() {
let a = create_block("A", NULL_BLOCK_IDENTIFIER, 0);
let b = create_block("B", "A", 1);
let b_block_id = b.header_signature.clone();
let c = create_block("C", "B", 2);
let c_block_id = c.header_signature.clone();
let block_m... | rust_cleaned_test_functions.jsonl/10248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 464
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
7793,
68367,
49484,
368,
341,
286,
1077,
264,
284,
1855,
7113,
445,
32,
497,
1770,
18756,
49554,
11,
220,
15,
317,
286,
1077,
293,
284,
1855,
7113,
445,
33,
497,
330,
32,
497,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_topic() {
assert!("test".match_level(&Level::normal("test")));
assert!("$SYS".match_level(&Level::metadata("$SYS")));
let t = "sport/tennis/player1/#".parse().unwrap();
assert!("sport/tennis/player1".match_topic(&t));
assert!("sport/tennis/player1/... | rust_cleaned_test_functions.jsonl/79597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
31414,
368,
341,
286,
2060,
17223,
1944,
3263,
6347,
8274,
2099,
4449,
486,
8252,
445,
1944,
17621,
286,
2060,
17223,
3,
37931,
3263,
6347,
8274,
2099,
4449,
486,
17637,
20912,
37931,
74385,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_has_same_recipient() {
let alice_pubkey = solana_sdk::pubkey::new_rand();
let bob_pubkey = solana_sdk::pubkey::new_rand();
let lockup0 = "2021-01-07T00:00:00Z".to_string();
let lockup1 = "9999-12-31T23:59:59Z".to_string();
let alice_alloc = Allocation {
... | rust_cleaned_test_functions.jsonl/18259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
33574,
7080,
14117,
368,
341,
286,
1077,
70433,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check() {
for diagnose_arg in &["-c", "--check", "--check=diagnose-first"] {
new_ucmd!()
.arg(diagnose_arg)
.arg("check_fail.txt")
.fails()
.stdout_is("sort: check_fail.txt:6: disorder: 5\n");
new_ucmd!()
.arg(diagn... | rust_cleaned_test_functions.jsonl/82996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
368,
341,
262,
369,
57581,
6057,
304,
609,
1183,
12,
66,
497,
14482,
2028,
497,
14482,
2028,
28,
8579,
3246,
960,
36943,
1341,
341,
286,
501,
68887,
2277,
0,
741,
310,
659,
858,
55493,
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_format_docs_handles_escape_double_hashes() {
let comment = r#"```rust
let s = "foo
## bar # baz";
```"#;
assert_eq!(format_docs(comment), "```rust\nlet s = \"foo\n# bar # baz\";\n```");
} | rust_cleaned_test_functions.jsonl/57094 | {
"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,
8955,
49692,
68017,
21832,
24598,
91616,
368,
341,
286,
1077,
3980,
284,
435,
55543,
73594,
35788,
198,
1149,
274,
284,
330,
7975,
198,
565,
3619,
671,
50247,
876,
73594,
57676,
401,
286,
2060,
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_script() {
let ctx = TestContext::new();
let mut con = ctx.connection();
let script = redis::Script::new(
r"
return {redis.call('GET', KEYS[1]), ARGV[1]}
",
);
let _: () = redis::cmd("SET")
.arg("my_key")
.arg("foo")
.query(&mut co... | rust_cleaned_test_functions.jsonl/108963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14660,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
5206,
390,
284,
5635,
20310,
1428,
262,
1077,
5316,
284,
20870,
486,
5910,
486,
931,
1006,
286,
435,
698,
981,
470,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aes_siv_key_sizes() {
let key_str =
"198371900187498172316311acf81d238ff7619873a61983d619c87b63a1987f987131819803719b847126381cd763871638aa71638176328761287361231321812731321de508761437195ff231765aa4913219873ac6918639816312130011abc900bba11400187984719827431246bbab1231eb4145215ff7141... | rust_cleaned_test_functions.jsonl/131301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
643,
344,
3097,
32159,
368,
341,
262,
1077,
1376,
2895,
4035,
286,
330,
16,
24,
23,
18,
22,
16,
24,
15,
15,
16,
23,
22,
19,
24,
23,
16,
22,
17,
18,
16,
21,
18,
16,
16,
62594,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_dynamic_width_number_display_numeric_hexadecimal() {
fn num(n: usize) -> Number {
let mut number = Number::DynamicWidth(DynamicWidthNumber::new(16));
for _ in 0..n {
number.increment().unwrap()
}
number
}
as... | rust_cleaned_test_functions.jsonl/51164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
7927,
5500,
14825,
29418,
32655,
49326,
368,
341,
286,
5168,
1629,
1445,
25,
22301,
8,
1464,
5624,
341,
310,
1077,
5206,
1372,
284,
5624,
486,
21752,
3327,
5432,
5040,
3327,
2833,
486,
931,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_query_token_info() {
let init_name = "sec-sec".to_string();
let init_admin = HumanAddr("admin".to_string());
let init_symbol = "SECSEC".to_string();
let init_decimals = 8;
let init_config: InitConfig = from_binary(&Binary::from(
r#"{ "public_to... | rust_cleaned_test_functions.jsonl/69626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1054
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
6458,
3109,
368,
341,
286,
1077,
2930,
1269,
284,
330,
5024,
12,
5024,
3263,
983,
3904,
543,
286,
1077,
2930,
12207,
284,
11097,
13986,
445,
2882,
3263,
983,
3904,
1423,
286,
1077,
2930,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_from_bytes_invalid() {
let data: Vec<u8> = vec![0xF0];
let err = HeaderIdentOsAbi::from_bytes((&data, 0));
assert!(matches!(err, Err(_)));
} | rust_cleaned_test_functions.jsonl/4089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
31433,
368,
341,
286,
1077,
821,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
9770,
15,
4821,
286,
1077,
1848,
284,
12104,
28301,
28867,
5830,
72,
486,
1499,
12524,
42902,
691,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_command_enc_dec() {
let cmd = Command::Clean;
let mut encoded = vec![];
cmd.encode(&mut encoded);
let mut bytes_slice = encoded.as_slice();
let decoded_cmd = Command::decode(&mut bytes_slice).unwrap();
assert_eq!(bytes_slice.len(), 0);
asse... | rust_cleaned_test_functions.jsonl/48881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
13781,
13783,
368,
341,
286,
1077,
5439,
284,
7348,
486,
27529,
280,
286,
1077,
5206,
20498,
284,
7486,
0,
15078,
286,
5439,
17313,
2099,
6984,
20498,
317,
286,
1077,
5206,
5820,
26488,
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_enum_in_untagged_enum() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(untagged)]
enum Outer {
Inner(Inner),
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
enum Inner {
Unit,
Newtype(u8),
Tuple(u8, u8),
Struct... | rust_cleaned_test_functions.jsonl/56447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 845
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
1243,
62,
3850,
96476,
31054,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
39900,
11,
48440,
5563,
262,
11506,
47024,
7,
3850,
96476,
5563,
262,
7618,
55197,
341,
286,
36356,
7,
31597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_transaction() {
let (config, key) = config_builder::test_config();
let vm_validator = TestValidator::new(&config);
let address = account_config::association_address();
let program =
encode_transfer_with_metadata_script(lbr_type_tag(), &address, vec![], 100, vec!... | rust_cleaned_test_functions.jsonl/19604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
28884,
368,
341,
262,
1077,
320,
1676,
11,
1376,
8,
284,
2193,
28532,
486,
1944,
5332,
543,
262,
1077,
10995,
64959,
284,
3393,
14256,
486,
931,
2099,
1676,
626,
262,
1077,
2621,
284,
269... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_image_result_code_enum_values() {
assert_eq!(
mc_fog_types::ledger::KeyImageResultCode::Spent as u32,
mc_fog_api::ledger::KeyImageResultCode::Spent as u32
);
assert_eq!(
mc_fog_types::ledger::KeyImageResultCode::NotSpent as u32,
mc_fog_api::ledger:... | rust_cleaned_test_functions.jsonl/96782 | {
"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,
3097,
4954,
5287,
4136,
31054,
9146,
368,
341,
262,
2060,
10714,
33673,
286,
19223,
761,
538,
9763,
486,
50704,
486,
1592,
1906,
2077,
2078,
486,
6406,
306,
438,
575,
18,
17,
345,
286,
19223,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partial_records_out() {
new_ucmd!()
.args(&["bs=2", "status=noxfer"])
.pipe_in("abc")
.succeeds()
.stdout_is("abc")
.stderr_is("1+1 records in\n1+1 records out\n");
} | rust_cleaned_test_functions.jsonl/99841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
31279,
6068,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
1279,
28,
17,
497,
330,
2829,
30315,
87,
802,
14108,
286,
659,
13768,
1243,
445,
13683,
1138,
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,
1,
1... | 1 |
#[test]
fn test_solid_regex_only_invert() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-s", "-og", "\\d+", "-v", "tr", "[:upper:]", "[:lower:]"])
.write_stdin("ABC123EFG\nHIJKLM456")
.assert()
.stdout("abc123efg\... | rust_cleaned_test_functions.jsonl/7895 | {
"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,
643,
5192,
41832,
18410,
1243,
1621,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reading_lint_fail() {
let a = indoc!(r#"
openapi: 3.0.1
info:
title: Swagger Petstore
version: 1.2.3
paths: {}
components:
schemas:
Order:
type: object
"#);
let b = serde_yaml::fr... | rust_cleaned_test_functions.jsonl/59556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81859,
907,
396,
22121,
368,
341,
262,
1077,
264,
284,
1257,
509,
10297,
81,
2,
698,
286,
1787,
2068,
25,
220,
18,
13,
15,
13,
16,
198,
286,
3546,
510,
310,
2265,
25,
79631,
11333,
4314,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut schema_builder = Schema::builder();
let name = schema_builder.add_text_field("name", STORED);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
{
let mut index_writer = index.writer_for_tests().un... | rust_cleaned_test_functions.jsonl/62190 | {
"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,
14809,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
829,
284,
10802,
28532,
1364,
4326,
5013,
445,
606,
497,
53771,
35,
317,
286,
1077,
10802,
284,
10802,
28532... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_config()
{
let random_dir = "_random_clipbboard_sync_test_dir";
let result = generate_config(random_dir).unwrap();
assert!(result.ends_with("config.yml"));
fs::remove_file(result.clone()).unwrap();
fs::remove_dir(result.parent().unwrap()).unwr... | rust_cleaned_test_functions.jsonl/109917 | {
"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,
48851,
5332,
741,
262,
341,
286,
1077,
4194,
4334,
284,
9000,
11463,
44728,
65,
2482,
23008,
4452,
4334,
876,
286,
1077,
1102,
284,
6923,
5332,
25110,
4334,
568,
15454,
543,
286,
2060,
10297,
1382... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_play_one() {
let mut state = PlaybackState::default();
state.queue(song("foo"));
state.play("foo");
assert!(state.is_playing());
assert_eq!(state.song_id(), Some("foo"));
assert!(state.prev_song().is_none());
assert!(state.next_song().is_... | rust_cleaned_test_functions.jsonl/20824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22144,
11667,
368,
341,
286,
1077,
5206,
1584,
284,
95301,
1397,
486,
2258,
543,
286,
1584,
29598,
60873,
445,
7975,
14929,
286,
1584,
12972,
445,
7975,
797,
286,
2060,
10297,
2454,
2079,
83857,
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_test() {
let fake_screen: Vec<&'static str> =
vec!["..hello***", "!!##$$$$$*", ".hello^^^^"];
let os = get_observed_screen(&fake_screen);
assert_eq!(
os[Vec2::new(0, 0)].as_ref().unwrap().letter.as_option(),
Some(&".".to_owned())
... | rust_cleaned_test_functions.jsonl/69238 | {
"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,
4452,
368,
341,
286,
1077,
12418,
17649,
25,
11312,
52244,
6,
1978,
607,
29,
4035,
310,
7486,
0,
1183,
496,
14990,
12210,
497,
330,
2928,
565,
69502,
3,
78729,
5933,
14990,
61724,
31797,
286,
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_process_reset() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let private_key = crypto::ecdsa::SecKey::gensk(&mut rng);
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
let credential_id = vec![0x01, 0... | rust_cleaned_test_functions.jsonl/35317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 567
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
18983,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
7,
1423,
286,
1077,
869,
3097,
284,
19028,
486,
757,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error() -> Result<(), Box<dyn std::error::Error>> {
let depool_abi = "tests/samples/fakeDepool.abi.json";
let config = get_config().unwrap();
let depool_addr = config["addr"].as_str().unwrap();
let mut cmd = Command::cargo_bin(BIN_NAME)?;
cmd.arg("call")
.arg("--abi... | rust_cleaned_test_functions.jsonl/118332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
2170,
1749,
22885,
72,
284,
330,
23841,
2687,
4023,
6663,
726,
7839,
1749,
22048,
72,
4323,
3302,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_is_in() -> Result<()> {
let df = df![
"x" => [1, 2, 3],
"y" => ["a", "b", "c"]
]?;
let s = Series::new("a", ["a", "b"]);
let out = df
.lazy()
.select([col("y").is_in(lit(s)).alias("isin")])
.collect()?;
... | rust_cleaned_test_functions.jsonl/22295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
1243,
368,
1464,
5714,
71698,
341,
286,
1077,
6764,
284,
6764,
90515,
310,
330,
87,
1,
589,
508,
16,
11,
220,
17,
11,
220,
18,
1259,
310,
330,
88,
1,
589,
4383,
64,
497,
330,
65,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_parse_subfield() {
assert_eq!(
parse_subfield(b"\x1fa123").unwrap().1,
Subfield::from_unchecked('a', "123")
);
assert_eq!(
parse_subfield(b"\x1fa").unwrap().1,
Subfield::from_unchecked('a', "")
);
assert_eq!... | rust_cleaned_test_functions.jsonl/101492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5228,
2566,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
5228,
2566,
1883,
11934,
87,
16,
3632,
16,
17,
18,
1827,
15454,
1005,
16,
345,
310,
3719,
2566,
486,
1499,
4907,
7549,
492,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or_with_one_like_parse() {
let name1 = _random_string(10);
let value1 = _random_string(10);
let json = format!(r#"{{"$or":[{{"~{}":{{"$like":"{}"}}}}]}}"#, name1, value1);
let query = parse_from_json(&json).unwrap();
let expected = Operator::Or(
... | rust_cleaned_test_functions.jsonl/11851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
11667,
25535,
21039,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
2951,
284,
3561,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_in_place_zero_sized() {
let v = vec![(), ()];
#[deriving(PartialEq, Show)]
struct ZeroSized;
assert_eq!(v.map_in_place(|_| ZeroSized).as_slice(), [ZeroSized, ZeroSized].as_slice());
} | rust_cleaned_test_functions.jsonl/98386 | {
"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,
5376,
1243,
34548,
19359,
643,
1506,
368,
341,
286,
1077,
348,
284,
7486,
20703,
1507,
1719,
935,
286,
11506,
1107,
2249,
5304,
20894,
27312,
11,
6928,
5563,
286,
2036,
18306,
50,
1506,
280,
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_invalid_less_than_a_week() {
with_rewards_default(|set_moment, accounts| {
assert_ok!(CrowdloanRewards::initialize(Origin::root()));
for (picasso_account, remote_account) in accounts.clone().into_iter() {
assert_ok!(remote_account.associate(picasso_account));
}
set_moment(VESTING_STE... | rust_cleaned_test_functions.jsonl/41095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
50747,
51613,
4306,
31277,
368,
341,
46948,
77997,
9993,
22428,
746,
717,
12913,
11,
9618,
91,
341,
197,
6948,
19817,
10297,
93926,
67,
38329,
58465,
2347,
486,
21641,
7,
13298,
486,
2888,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_long_string_1() {
let index = 64587;
let timestamp = 87451651;
let prev = String::from("sdfsdgehherheherhefwt4wtttertertg");
let sign_key = String::from("0000");
let content = "a".repeat(500);
let new_block = BlockGen {
index: index.cl... | rust_cleaned_test_functions.jsonl/62816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
3904,
62,
16,
368,
341,
286,
1077,
1922,
284,
220,
21,
19,
20,
23,
22,
280,
286,
1077,
11441,
284,
220,
23,
22,
19,
20,
16,
21,
20,
16,
280,
286,
1077,
7872,
284,
923,
486,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_id_from_boarding_pass() {
assert_eq!(id_from_boarding_pass("BFFFBBFRRR"), 567);
assert_eq!(id_from_boarding_pass("FFFBBBFRRR"), 119);
assert_eq!(id_from_boarding_pass("BBFFBBFRLL"), 820);
} | rust_cleaned_test_functions.jsonl/114231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
842,
5673,
23919,
287,
15464,
368,
341,
262,
2060,
10714,
10297,
307,
5673,
23919,
287,
15464,
445,
33,
31203,
10098,
37,
8106,
49,
3975,
220,
20,
21,
22,
317,
262,
2060,
10714,
10297,
307,
5673... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_tail() {
let df = df! {
"A" => &[1, 2, 3, 4, 5],
"B" => &[5, 4, 3, 2, 1]
}
.unwrap();
let _out = df.lazy().tail(3).collect().unwrap();
} | rust_cleaned_test_functions.jsonl/139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
35471,
368,
341,
262,
1077,
6764,
284,
6764,
0,
341,
286,
330,
32,
1,
589,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
1259,
286,
330,
33,
1,
589,
44590,
20,
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_0174_example_1() {
let dungeon = vec![vec![-2, -3, 3], vec![-5, -10, 1], vec![10, 30, -5]];
let result = 7;
assert_eq!(Solution::calculate_minimum_hp(dungeon), result);
} | rust_cleaned_test_functions.jsonl/101381 | {
"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,
62,
15,
16,
22,
19,
39304,
62,
16,
368,
341,
286,
1077,
42439,
284,
7486,
20703,
4083,
0,
7609,
17,
11,
481,
18,
11,
220,
18,
1125,
7486,
0,
7609,
20,
11,
481,
16,
15,
11,
220,
16,
1125,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_basic_use_bars() {
// Testing various breakpoints and edge cases.
assert_eq!(calculate_basic_use_bars(0.0, 15), 0);
assert_eq!(calculate_basic_use_bars(1.0, 15), 0);
assert_eq!(calculate_basic_use_bars(5.0, 15), 1);
assert_eq!(calculate_basic_use... | rust_cleaned_test_functions.jsonl/4466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
34729,
15951,
880,
1561,
368,
341,
286,
442,
26768,
5257,
91530,
323,
6821,
5048,
624,
286,
2060,
10714,
10297,
35597,
34729,
15951,
880,
1561,
7,
15,
13,
15,
11,
220,
16,
20,
701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_neighbours_found_dst_node_undirected() {
let mut net: Network<&str, f64> = Network::new(false);
net.add_node("A");
net.add_node("B");
net.add_edge("A", "B", 1.0);
let neighbours: Vec<&&str> = net.neighbours_of("B").unwrap();
assert_eq!(neighbours.len(), 1, "There shou... | rust_cleaned_test_functions.jsonl/127187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
52117,
21480,
33114,
5084,
62,
1241,
74612,
368,
341,
262,
1077,
5206,
4179,
25,
8141,
52244,
495,
11,
282,
21,
19,
29,
284,
8141,
486,
931,
3576,
626,
262,
4179,
1364,
5084,
445,
32,
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... | 3 |
#[test]
fn test_parse_stake_set_lockup() {
let mut keys: Vec<Pubkey> = vec![];
for _ in 0..3 {
keys.push(Pubkey::new_unique());
}
let unix_timestamp = 1_234_567_890;
let epoch = 11;
let custodian = Pubkey::new_unique();
let lockup = LockupArgs... | rust_cleaned_test_functions.jsonl/16469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1261,
726,
2602,
9818,
454,
368,
341,
286,
1077,
5206,
6894,
25,
11312,
21604,
392,
792,
29,
284,
7486,
0,
15078,
286,
369,
716,
304,
220,
15,
496,
18,
341,
310,
6894,
2552,
5304,
392,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slerp_regression() {
let a = Quaternion::<f32>::new(0.00052311074, 0.9999999, 0.00014682197, -0.000016342687);
let b = Quaternion::<f32>::new(0.019973433, -0.99980056, -0.00015678025, 0.000013882192);
assert_ulps_eq!(a.slerp(b, 0.5).magnitude(), 1.0);
} | rust_cleaned_test_functions.jsonl/15364 | {
"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,
643,
1536,
79,
91144,
368,
341,
286,
1077,
264,
284,
24801,
27638,
69,
18,
17,
6831,
931,
7,
15,
13,
15,
15,
15,
20,
17,
18,
16,
16,
15,
22,
19,
11,
220,
15,
13,
24,
24,
24,
24,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_starts_with_impl() {
assert!(function_starts_with(
"_<futures..task_impl..Spawn<T>>::enter::_{{closure}}",
"futures::"
));
assert!(!function_starts_with(
"_<futures..task_impl..Spawn<T>>::enter::_{{closure}}",
"tok... | rust_cleaned_test_functions.jsonl/46633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
86552,
6615,
21007,
368,
341,
286,
2060,
10297,
1688,
86552,
6615,
1006,
310,
9000,
27,
69,
74606,
496,
8202,
21007,
496,
41005,
3125,
77595,
1950,
13541,
2979,
46916,
3417,
756,
310,
330,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prefix_unimportant() -> Result<(), Box<dyn Error>> {
assert_eq!(Path::Guilds, Path::from_str("guilds")?);
assert_eq!(Path::Guilds, Path::from_str("/guilds")?);
Ok(())
} | rust_cleaned_test_functions.jsonl/13620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
4907,
15333,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
2060,
10714,
10297,
1820,
486,
72574,
82,
11,
7933,
486,
1499,
2895,
445,
57877,
82,
899,
30,
317,
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
] | 3 |
#[test]
fn test_vec3_align() {
use std::mem;
if cfg!(feature = "scalar-math") {
assert_eq!(12, mem::size_of::<Vec3>());
assert_eq!(4, mem::align_of::<Vec3>());
assert_eq!(12, mem::size_of::<Vec3Mask>());
assert_eq!(4, mem::align_of::<Vec3Mask>());
} else {
ass... | rust_cleaned_test_functions.jsonl/48579 | {
"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,
13251,
18,
37015,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
421,
13286,
10297,
12753,
284,
330,
35342,
1448,
587,
899,
341,
286,
2060,
10714,
10297,
16,
17,
11,
1833,
486,
2141,
3575,
2763... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_done_modify() {
let subcommand = Subcommand::Modify {
filter: Filter {
conditions: vec![Condition::IdList(vec![TaskId::WorkingSetId(123)])],
},
modification: Modification {
description: DescriptionMod::Set(s!("now-finish... | rust_cleaned_test_functions.jsonl/84278 | {
"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,
24390,
57725,
368,
341,
286,
1077,
1186,
5631,
284,
3719,
5631,
486,
44427,
341,
310,
4051,
25,
12339,
341,
394,
4682,
25,
7486,
20703,
10547,
486,
764,
852,
25592,
20703,
6262,
764,
486,
33978,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffer_array_min_max_with_nulls() {
let a = PrimitiveArray::from(vec![Some(5), None, None, Some(8), Some(9)]);
assert_eq!(5, a.min().unwrap());
assert_eq!(9, a.max().unwrap());
} | rust_cleaned_test_functions.jsonl/32616 | {
"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,
7776,
3858,
7260,
6345,
6615,
15162,
82,
368,
341,
286,
1077,
264,
284,
51460,
1857,
486,
1499,
25592,
20703,
8373,
7,
20,
701,
2240,
11,
2240,
11,
4329,
7,
23,
701,
4329,
7,
24,
41958,
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_bit_set_difference_with() {
// Explicitly 0'ed bits
let mut a = BitSet::from_bit_vec(BitVec::from_bytes(&[0b00000000]));
let b = BitSet::from_bit_vec(BitVec::from_bytes(&[0b10100010]));
a.difference_with(&b);
assert!(a.is_empty());
// Uninitialize... | rust_cleaned_test_functions.jsonl/76234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
2602,
47525,
6615,
368,
341,
286,
442,
31330,
398,
220,
15,
6,
291,
9472,
198,
286,
1077,
5206,
264,
284,
57227,
486,
1499,
13996,
13251,
68653,
10050,
486,
1499,
12524,
2099,
58,
15,
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_igmp_integration_not_last_dont_send_leave() {
let mut ctx = setup_simple_test_environment();
igmp_join_group(&mut ctx, DummyDeviceId, MulticastAddr::new(GROUP_ADDR).unwrap());
assert_eq!(ctx.timers().len(), 1);
assert_eq!(ctx.frames().len(), 1);
receive_ig... | rust_cleaned_test_functions.jsonl/30906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
343,
1307,
90250,
7913,
12195,
814,
544,
13565,
62666,
368,
341,
286,
1077,
5206,
5635,
284,
6505,
30015,
4452,
51774,
543,
286,
19373,
1307,
31017,
6288,
2099,
6984,
5635,
11,
50567,
6985,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_primitive() {
let a: Complex<f32> = Complex { re: 2.0, im: 0.2 };
let a_: i32 = a.as_();
assert_eq!(a_, 2_i32);
} | rust_cleaned_test_functions.jsonl/99588 | {
"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,
11898,
84087,
368,
341,
286,
1077,
264,
25,
22096,
63895,
18,
17,
29,
284,
22096,
314,
312,
25,
220,
17,
13,
15,
11,
732,
25,
220,
15,
13,
17,
2605,
286,
1077,
264,
23211,
600,
18,
17,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_level_filter_case_insensitive() {
let cases = [
(LevelFilter::Off, [level_filter_token("off")]),
(LevelFilter::Fatal, [level_filter_token("fatal")]),
(LevelFilter::Error, [level_filter_token("error")]),
(LevelFilter::Warn, [level_filter_tok... | rust_cleaned_test_functions.jsonl/91801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8274,
8727,
19096,
34386,
18723,
368,
341,
286,
1077,
5048,
284,
2278,
310,
320,
4449,
5632,
486,
4596,
11,
508,
3294,
8727,
6458,
445,
1847,
899,
17036,
310,
320,
4449,
5632,
486,
62396,
11,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_rate_limiter_default() {
let mut l = RateLimiter::default();
// limiter should not be blocked
assert!(!l.is_blocked());
assert!(l.consume(u64::max_value(), TokenType::Ops));
assert!(l.consume(u64::max_value(), TokenType::Bytes));
// calli... | rust_cleaned_test_functions.jsonl/15886 | {
"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,
9246,
907,
17700,
9993,
368,
341,
286,
1077,
5206,
326,
284,
19775,
43,
17700,
486,
2258,
1428,
286,
442,
4568,
2015,
1265,
537,
387,
19299,
198,
286,
2060,
0,
3471,
75,
2079,
89223,
1423,
1789,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hover_self() {
let (analysis, position) = single_file_with_position(
"
struct Thing { x: u32 }
impl Thing {
fn new() -> Self {
Self<|> { x: 0 }
}
}
",
);
let hover ... | rust_cleaned_test_functions.jsonl/33502 | {
"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,
53445,
25637,
368,
341,
286,
1077,
320,
34484,
11,
2309,
8,
284,
3175,
2458,
6615,
9661,
1006,
310,
6228,
310,
2036,
37200,
314,
856,
25,
575,
18,
17,
456,
310,
11605,
37200,
341,
394,
5168,
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_check() {
for diagnose_arg in ["-c", "--check", "--check=diagnose-first"] {
new_ucmd!()
.arg(diagnose_arg)
.arg("check_fail.txt")
.arg("--buffer-size=10b")
.fails()
.stderr_only("sort: check_fail.txt:6: disorder: 5\n");
... | rust_cleaned_test_functions.jsonl/20526 | {
"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,
7200,
368,
341,
262,
369,
57581,
6057,
304,
4383,
12,
66,
497,
14482,
2028,
497,
14482,
2028,
28,
8579,
3246,
960,
36943,
1341,
341,
286,
501,
68887,
2277,
0,
741,
310,
659,
858,
55493,
3246,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_debug() {
let resp = HttpResponse::Ok()
.header(COOKIE, HeaderValue::from_static("cookie1=value1; "))
.header(COOKIE, HeaderValue::from_static("cookie2=value2; "))
.finish();
let dbg = format!("{:?}", resp);
assert!(dbg.contains("HttpRe... | rust_cleaned_test_functions.jsonl/2943 | {
"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,
15446,
368,
341,
286,
1077,
9039,
284,
17580,
486,
11578,
741,
310,
659,
2708,
3025,
46,
23588,
11,
12104,
1130,
486,
1499,
25360,
445,
16236,
16,
46538,
16,
26,
40964,
310,
659,
2708,
3025,
46,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example_1() {
// No example to validate whole part
assert_eq!(Seat::from(test::EXAMPLE_INPUT_1).id(), 357);
assert_eq!(Seat::from(test::EXAMPLE_INPUT_2).id(), 567);
assert_eq!(Seat::from(test::EXAMPLE_INPUT_3).id(), 119);
assert_eq!(Seat::from(test::EXAMPLE_INPUT_4).id(), 820... | rust_cleaned_test_functions.jsonl/5311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
62,
16,
368,
341,
262,
442,
2308,
3110,
311,
9593,
4361,
949,
198,
262,
2060,
10714,
10297,
75324,
486,
1499,
8623,
486,
95875,
21022,
62,
16,
568,
307,
1507,
220,
18,
20,
22,
317,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_preprocessor() -> Result<()> {
lex_ok! {
r#"use "foo.tremor" ;"#,
r#"~"# => Token::Use,
r#" ~"# => Token::DQuote,
r#" ~"# => Token::StringLiteral("foo.tremor".into()),
r#" ~"# => Token::DQuote,
... | rust_cleaned_test_functions.jsonl/45956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
29474,
368,
1464,
5714,
71698,
341,
286,
22429,
19817,
0,
341,
310,
435,
55543,
810,
330,
7975,
734,
1826,
269,
1,
2587,
57676,
345,
310,
435,
55543,
93,
57676,
589,
9660,
486,
10253,
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_parse_short_log_entry() {
assert_debug_snapshot!(
LogEntry::parse(b"Nov 20 21:56:01 herzog com.apple.xpc.launchd[1] (com.apple.preference.displays.MirrorDisplays): Service only ran for 0 seconds. Pushing respawn out by 10 seconds."),
@r###"
LogEntry {
timestamp: Some(... | rust_cleaned_test_functions.jsonl/64700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16673,
5224,
9078,
368,
341,
262,
2060,
15446,
53265,
33673,
262,
2835,
5874,
486,
6400,
1883,
1,
18944,
220,
17,
15,
220,
17,
16,
25,
20,
21,
25,
15,
16,
1059,
89,
538,
469,
39390,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lints_tracking_hash_different_values() {
let mut v1 = Options::default();
let mut v2 = Options::default();
let mut v3 = Options::default();
v1.lint_opts = vec![
(String::from("a"), Level::Allow),
(String::from("b"), Level::Warn),
(String::from("c"), Level... | rust_cleaned_test_functions.jsonl/100717 | {
"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,
907,
21042,
66105,
8950,
82741,
9146,
368,
341,
262,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
18,
284,
14566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_offset() {
let offset = OffsetLayer::new_offset(Point::new_f32(20.0, 10.0));
assert_eq!(offset.offset, Point::new_f32(20.0, 10.0));
assert_eq!(offset.count_layers(), 0);
} | rust_cleaned_test_functions.jsonl/76895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
6917,
368,
341,
286,
1077,
4347,
284,
16861,
9188,
486,
931,
6917,
32737,
486,
931,
761,
18,
17,
7,
17,
15,
13,
15,
11,
220,
16,
15,
13,
15,
1106,
286,
2060,
10714,
10297,
3176,
14760,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recursion() {
let input = ParseBlock::from(
&[
ParseStatement::LoopDo(
ParseIdent::Static(2),
ParseBlock::from(
&[
ParseStatement::AddToInto(
... | rust_cleaned_test_functions.jsonl/119138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1865
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
34280,
368,
341,
286,
1077,
1946,
284,
14775,
4713,
486,
1499,
1006,
310,
609,
9640,
394,
14775,
8636,
486,
14620,
5404,
1006,
503,
14775,
28301,
486,
11690,
7,
17,
1326,
503,
14775,
4713,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_object() {
let bser_v2 =
b"\x00\x02\x00\x00\x00\x00\x05\x0f\x00\x00\x00\x01\x03\x01\x02\x03\x03abc\x02\x03\x03def";
let decoded = from_slice::<BytestringObject>(bser_v2).unwrap();
let mut expected = HashMap::new();
expected.insert(Bytestring::from(&b"abc"[..]), Byte... | rust_cleaned_test_functions.jsonl/34064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
5314,
368,
341,
262,
1077,
293,
799,
2273,
17,
4035,
286,
293,
11934,
87,
15,
15,
3462,
15,
17,
3462,
15,
15,
3462,
15,
15,
3462,
15,
15,
3462,
15,
15,
3462,
15,
20,
3462,
15,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_semantic_fn() {
let mut vm = VersionMap::new();
vm.new_version()
.set_type_version(Test::type_id(), 2)
.new_version()
.set_type_version(Test::type_id(), 3)
.new_version()
.set_type_version(Test::type_id(), 4);
... | rust_cleaned_test_functions.jsonl/43354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
30442,
8159,
15246,
368,
341,
286,
1077,
5206,
10995,
284,
6079,
2227,
486,
931,
543,
286,
10995,
4618,
9438,
741,
310,
659,
746,
1819,
9438,
31159,
486,
1313,
842,
1507,
220,
17,
340,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_report_generation() {
let config = Config::default();
let repo = GitHubRepo {
org: "brson".into(),
name: "hello-rs".into(),
sha: Some("f00".into()),
};
let gh = Crate::GitHub(repo);
let reg = Crate::Registry(RegistryCra... | rust_cleaned_test_functions.jsonl/12518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2749
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
64191,
368,
341,
286,
1077,
2193,
284,
5532,
486,
2258,
1428,
286,
1077,
15867,
284,
32095,
25243,
341,
310,
1240,
25,
330,
1323,
930,
3263,
18122,
3148,
310,
829,
25,
330,
14990,
3795,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic() {
let mut seg = Seg::new(10, || 0);
assert_eq!(seg.reduce(0, 10), 0);
seg.set(5, 5);
assert_eq!(seg.reduce(0, 10), 5);
seg.set(5, 10);
assert_eq!(seg.reduce(0, 10), 10);
} | rust_cleaned_test_functions.jsonl/38811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
972,
310,
1077,
5206,
4810,
284,
17209,
486,
931,
7,
16,
15,
11,
1369,
220,
15,
736,
310,
2060,
10714,
10297,
14607,
23792,
7,
15,
11,
220,
16,
15,
701,
220,
15,
736,
310,
4810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_runtime_update_balloon_config() {
let req = VmmAction::UpdateBalloon(BalloonUpdateConfig { amount_mb: 0 });
check_runtime_request(req, |result, vmm| {
assert_eq!(result, Ok(VmmData::Empty));
assert!(vmm.update_balloon_config_called)
});
le... | rust_cleaned_test_functions.jsonl/44544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33232,
8882,
56441,
31335,
5332,
368,
341,
286,
1077,
4232,
284,
647,
3821,
2512,
486,
4289,
37889,
31335,
5349,
278,
31335,
4289,
2648,
314,
3311,
53812,
25,
220,
15,
1625,
286,
1779,
33232,
7893... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte() {
let mut mem = Memory::new(1024);
for data in 0..0xFF {
for addr in 0..16 {
mem.write_byte(addr, data).unwrap();
assert_eq!(data, mem.read_byte(addr).unwrap());
}
}
} | rust_cleaned_test_functions.jsonl/92778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
368,
341,
286,
1077,
5206,
1833,
284,
13850,
486,
931,
7,
16,
15,
17,
19,
626,
286,
369,
821,
304,
220,
15,
496,
15,
9264,
341,
310,
369,
10789,
304,
220,
15,
496,
16,
21,
341,
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... | 3 |
#[test]
fn test_solution1() {
assert_eq!(Solution1::length_of_longest_substring("abcabcbb"), 3);
assert_eq!(Solution1::length_of_longest_substring("bbbbbbb"), 1);
assert_eq!(Solution1::length_of_longest_substring("pwwkew"), 3);
} | rust_cleaned_test_functions.jsonl/28107 | {
"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,
50274,
16,
368,
341,
286,
2060,
10714,
10297,
36842,
16,
486,
4129,
3575,
17799,
477,
5228,
917,
445,
13683,
13683,
6066,
3975,
220,
18,
317,
286,
2060,
10714,
10297,
36842,
16,
486,
4129,
3575,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_symlink_is_symlink() {
let scenario = TestScenario::new(util_name!());
let at = &scenario.fixtures;
at.symlink_file("regular_file", "symlink");
// FIXME: implement on Windows
scenario.ucmd().args(&["-h", "symlink"]).succeeds();
scenario.ucmd().args(&["-L", "symlink"]).s... | rust_cleaned_test_functions.jsonl/11015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58530,
44243,
6892,
58530,
44243,
368,
341,
262,
1077,
15048,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
61422,
67785,
18513,
401,
262,
518,
77577,
44243,
2458,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kyc_change() {
let mut services = TransferQuotaServiceCollection::default();
services.set_user_1_tags(L1);
services.set_record((*ASSET_ID).clone(), (*USER_1).clone(), Record {
last_op_time: *TIME_ORIGINAL,
daily_used_amount: 2000,
monthly_used_amoun... | rust_cleaned_test_functions.jsonl/68195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 991
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
3337,
15947,
368,
341,
262,
1077,
5206,
3516,
284,
23200,
2183,
6089,
1860,
6482,
486,
2258,
1428,
262,
3516,
980,
3317,
62,
16,
16333,
4957,
16,
626,
262,
3516,
980,
14192,
26609,
1911,
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_is_ancestor_of() {
macro_rules! t(
(s: $path:expr, $dest:expr, $exp:expr) => (
{
let path = Path::new($path);
let dest = Path::new($dest);
assert_eq!(path.is_ancestor_of(&dest), $exp);
... | rust_cleaned_test_functions.jsonl/7695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 761
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62,
66878,
3575,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
4979,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
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_array_chunks_mut_count() {
let v: &mut [i32] = &mut [0, 1, 2, 3, 4, 5];
let c = v.array_chunks_mut::<3>();
assert_eq!(c.count(), 2);
let v2: &mut [i32] = &mut [0, 1, 2, 3, 4];
let c2 = v2.array_chunks_mut::<2>();
assert_eq!(c2.count(), 2);
let v3: &mut [i32] = &mut ... | rust_cleaned_test_functions.jsonl/9650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
65470,
29523,
3180,
368,
341,
262,
1077,
348,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.