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_eval_let_rec() {
use moniker::FreeVar;
let x1 = FreeVar::fresh_named("x");
let x2 = FreeVar::fresh_named("x");
let test = FreeVar::fresh_named("test");
let id = FreeVar::fresh_named("id");
// expr =
// let test = id x
// id = \x -> x
// i... | rust_cleaned_test_functions.jsonl/33405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
62,
1149,
7080,
368,
341,
262,
990,
1615,
24803,
486,
10940,
3962,
401,
262,
1077,
856,
16,
284,
3574,
3962,
486,
71308,
71834,
445,
87,
797,
262,
1077,
856,
17,
284,
3574,
3962,
486,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_permitted_characters() {
let mut good_chars = (0x20..=0x7E).collect::<Vec<u8>>();
good_chars.push(0x0A); // \n
good_chars.push(0x09); // \t
for c in good_chars {
assert!(super::is_permitted_char(c as char));
}
} | rust_cleaned_test_functions.jsonl/112040 | {
"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,
31961,
3762,
79060,
368,
341,
286,
1077,
5206,
1661,
37418,
284,
320,
15,
87,
17,
15,
496,
28,
15,
87,
22,
36,
568,
17384,
27638,
10050,
34837,
23,
37038,
286,
1661,
37418,
2552,
7,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lpad() {
let mut cases = vec![
(
Some(b"hello".to_vec()),
Some(0),
Some(b"h".to_vec()),
Some(b"".to_vec()),
),
(
Some(b"hello".to_vec()),
Some(1),
... | rust_cleaned_test_functions.jsonl/10162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1643
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
13242,
368,
341,
286,
1077,
5206,
5048,
284,
7486,
90515,
310,
2399,
394,
4329,
1883,
1,
14990,
3263,
983,
13251,
14702,
394,
4329,
7,
15,
1326,
394,
4329,
1883,
78522,
3263,
983,
13251,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_make_target() {
let nodename = DomainBuilder::from_str("foo._fuchsia._udp.local").unwrap();
let record = RecordBuilder::new(nodename, Type::A, Class::Any, true, 4500, &[8, 8, 8, 8]);
let mut message = MessageBuilder::new(0, true);
message.add_additional(record);
... | rust_cleaned_test_functions.jsonl/15631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
11123,
368,
341,
286,
1077,
16004,
1840,
284,
21070,
3297,
486,
1499,
2895,
445,
7975,
1436,
69,
73391,
1436,
31101,
11033,
1827,
15454,
543,
286,
1077,
3255,
284,
13583,
3297,
486,
931,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_record_schema_with_currently_parsing_schema_named_record() {
let schema = Schema::parse_str(
r#"
{
"type" : "record",
"name" : "record",
"fields" : [
{ "name" : "value", "type" : "long" },
... | rust_cleaned_test_functions.jsonl/116695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
25371,
6615,
11080,
398,
620,
28598,
25371,
71834,
14192,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
2,
698,
310,
341,
1060,
330,
1313,
1,
549,
330,
8548,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_already_in_use() {
// Attempt to create system account in account already owned by another program
let new_owner = Pubkey::new(&[9; 32]);
let from = solana_sdk::pubkey::new_rand();
let from_account = AccountSharedData::new_ref(100, 0, &system_program::id())... | rust_cleaned_test_functions.jsonl/73043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
80772,
1243,
15951,
368,
341,
286,
442,
43517,
311,
1855,
1849,
2692,
304,
2692,
2669,
12938,
553,
2441,
2025,
198,
286,
1077,
501,
29027,
284,
22611,
792,
486,
931,
2099,
58,
24,
26,
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_step_replace_signed() {
let mut x = 4i32;
let y = x.replace_zero();
assert_eq!(x, 0);
assert_eq!(y, 4);
x = 5;
let y = x.replace_one();
assert_eq!(x, 1);
assert_eq!(y, 5);
} | rust_cleaned_test_functions.jsonl/54183 | {
"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,
11946,
10633,
55617,
368,
341,
262,
1077,
5206,
856,
284,
220,
19,
72,
18,
17,
280,
262,
1077,
379,
284,
856,
6980,
19359,
543,
262,
2060,
10714,
10297,
87,
11,
220,
15,
317,
262,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generic_enum_newtype() {
assert_tokens(
&GenericEnum::NewType::<u32, u32>(5),
&[
Token::NewtypeVariant {
name: "GenericEnum",
variant: "NewType",
},
Token::U32(5),
],
);
} | rust_cleaned_test_functions.jsonl/56430 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
31054,
5921,
1313,
368,
341,
262,
2060,
28838,
1006,
286,
609,
19964,
10766,
486,
3564,
929,
27638,
84,
18,
17,
11,
575,
18,
17,
2235,
20,
1326,
286,
609,
9640,
310,
9660,
486,
3564,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_del_item() {
Python::with_gil(|py| {
let v: Vec<i32> = vec![1, 1, 2, 3, 5, 8];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
assert!(seq.del_item(10).is_err());
assert_eq!(1, seq[0].extract::<i32... | rust_cleaned_test_functions.jsonl/70314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 589
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
18029,
5634,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
25,
11312,
21897,
18,
17,
29,
284,
7486,
20703,
16,
11,
220,
16,
11,
220,
17,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_translate_irc_control_chars() {
assert_eq!(
remove_irc_control_chars(" Le Voyageur imprudent "),
" Le Voyageur imprudent "
);
assert_eq!(remove_irc_control_chars("\x0301,02foo"), "foo");
assert_eq!(remove_irc_control_chars("\x0301,2foo"), "foo");
assert_... | rust_cleaned_test_functions.jsonl/6836 | {
"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,
66381,
62,
2437,
13436,
37418,
368,
341,
262,
2060,
10714,
33673,
286,
4057,
62,
2437,
13436,
37418,
445,
220,
220,
219,
2304,
95272,
324,
22540,
4881,
219,
220,
84119,
286,
330,
220,
1967,
95272,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lower() {
let result = lower(to_value("HELLO").unwrap(), HashMap::new());
assert!(result.is_ok());
assert_eq!(result.unwrap(), to_value("hello").unwrap());
} | rust_cleaned_test_functions.jsonl/49415 | {
"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,
30425,
368,
341,
286,
1077,
1102,
284,
4722,
12186,
3142,
445,
50712,
1593,
1827,
15454,
1507,
10528,
486,
931,
1423,
286,
2060,
10297,
1382,
2079,
19817,
1423,
286,
2060,
10714,
10297,
1382,
55395,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_one_minus_one_plus_line() {
let config = make_config_from_args(&["--side-by-side", "--width", "40"]);
let output = run_delta(ONE_MINUS_ONE_PLUS_LINE_DIFF, &config);
let output = strip_ansi_codes(&output);
let mut lines = output.lines().skip(7);
assert_eq!(... | rust_cleaned_test_functions.jsonl/110579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11667,
38457,
11667,
28043,
6528,
368,
341,
286,
1077,
2193,
284,
1281,
5332,
5673,
8384,
2099,
1183,
313,
2929,
14319,
24067,
497,
14482,
3098,
497,
330,
19,
15,
15049,
286,
1077,
2550,
284,
1598... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_int() {
assert_eq!(parse_int(FileSpan::new(Rc::new(String::from("4")), Rc::new(String::from("input")))).unwrap().1.value, 4.0);
assert_eq!(parse_int(FileSpan::new(Rc::new(String::from("4350")), Rc::new(String::from("input")))).unwrap().1.value, 4350.0);
assert_eq!(parse_int(Fil... | rust_cleaned_test_functions.jsonl/68344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4042,
368,
341,
262,
2060,
10714,
10297,
6400,
4042,
19821,
12485,
486,
931,
2785,
66,
486,
931,
2242,
486,
1499,
445,
19,
35674,
81463,
486,
931,
2242,
486,
1499,
445,
1355,
2761,
4579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cdc_scan() {
let mut suite = TestSuite::new(1);
let (k, v) = (b"key1".to_vec(), b"value".to_vec());
// Prewrite
let start_ts = suite.cluster.pd_client.get_tso().wait().unwrap();
let mut mutation = Mutation::default();
mutation.set_op(Op::Put);
mutation.key = k.clone(... | rust_cleaned_test_functions.jsonl/23562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2789
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
7628,
28857,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
16,
626,
262,
1077,
320,
74,
11,
348,
8,
284,
320,
65,
1,
792,
16,
3263,
983,
13251,
1507,
293,
63307,
3263... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_i16_segment() {
let dat = vec![1i16, 3, 10, 15, 23, 4, 45];
assert_write_check_read(dat, 8);
} | rust_cleaned_test_functions.jsonl/118842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
16,
21,
28061,
368,
341,
262,
1077,
3258,
284,
7486,
20703,
16,
72,
16,
21,
11,
220,
18,
11,
220,
16,
15,
11,
220,
16,
20,
11,
220,
17,
18,
11,
220,
19,
11,
220,
19,
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 |
#[test]
fn test_unit_parser_dimensionless_unit_scale() {
let unit = parse_unit().parse(b"percent, %; ; 0.01").expect("Unit");
assert!(unit.ids.contains(&"percent".to_string()));
assert!(unit.ids.contains(&"%".to_string()));
assert_eq!(unit.scale, 0.01);
assert_eq!(unit.... | rust_cleaned_test_functions.jsonl/43788 | {
"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,
14832,
18517,
49619,
1717,
14832,
16727,
368,
341,
286,
1077,
4982,
284,
4715,
14832,
1005,
6400,
1883,
1,
24422,
11,
1018,
26,
2587,
220,
15,
13,
15,
16,
1827,
17119,
445,
4562,
3071,
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_mv_backup_simple() {
let (at, mut ucmd) = at_and_ucmd!();
let file_a = "test_mv_backup_numbering_file_a";
let file_b = "test_mv_backup_numbering_file_b";
at.touch(file_a);
at.touch(file_b);
ucmd.arg("--backup=simple")
.arg(file_a)
.arg(file_b)
.su... | rust_cleaned_test_functions.jsonl/41619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
44710,
30015,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1034,
4306,
284,
330,
1944,
73187,
44710,
5500,
287,
2458,
4306,
876,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_selector_from_non_ascii_name() {
let func_name = "🦀";
match get_selector_from_name(func_name) {
Err(_) => {}
_ => panic!("Should throw error on non-ASCII name"),
};
} | rust_cleaned_test_functions.jsonl/33913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
28890,
5673,
21637,
50238,
1269,
368,
341,
286,
1077,
2915,
1269,
284,
330,
147579,
3302,
286,
2432,
633,
28890,
5673,
1269,
18552,
1269,
8,
341,
310,
15495,
48139,
589,
5613,
310,
716,
589,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_backward65536() {
assert_decompressed_input_matches_output(include_bytes!("../../testdata/backward65536.compressed"),
include_bytes!("../../testdata/backward65536"),
65536,
... | rust_cleaned_test_functions.jsonl/26428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70477,
21,
20,
20,
18,
21,
368,
341,
220,
2060,
2259,
45703,
5898,
38344,
7645,
77863,
12524,
17223,
2748,
92425,
59948,
1606,
21,
20,
20,
18,
21,
905,
14318,
4461,
14265,
2924,
12524,
17223,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_builder_tag() {
let s = SchemaBuilder::new()
.tag("the_tag")
.non_null_tag("the_non_null_tag")
.build()
.unwrap();
let (influxdb_column_type, field) = s.field(0);
assert_eq!(field.name(), "the_tag");
assert_eq!(
... | rust_cleaned_test_functions.jsonl/12632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
9372,
368,
341,
286,
1077,
274,
284,
12539,
3297,
486,
931,
741,
310,
659,
4578,
445,
1782,
9372,
1138,
310,
659,
6280,
15162,
9372,
445,
1782,
21637,
15162,
9372,
1138,
310,
659,
5834,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_str_bidi() {
assert!(!is_str_bidi("abcdefghijklmnopaabcdefghijklmnop"));
assert!(!is_str_bidi("abcdefghijklmnop\u{03B1}abcdefghijklmnop"));
assert!(!is_str_bidi("abcdefghijklmnop\u{3041}abcdefghijklmnop"));
assert!(!is_str_bidi("abcdefghijklmnop\u{1F4A9}abcdefg... | rust_cleaned_test_functions.jsonl/27322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 916
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
2895,
880,
12278,
368,
341,
286,
2060,
0,
3471,
285,
2895,
880,
12278,
445,
63168,
21775,
39852,
65102,
4010,
286,
2060,
0,
3471,
285,
2895,
880,
12278,
445,
65102,
3770,
90,
15,
18,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_explorer_blocks_loaded_info() {
let (mut testkit, api) = init_testkit();
testkit.create_blocks_until(Height(6));
let BlocksRange { blocks, .. } = api
.public(ApiKind::Explorer)
.get("v1/blocks?count=4")
.unwrap();
assert!(blocks
.iter()
.a... | rust_cleaned_test_functions.jsonl/55300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
79825,
25201,
49205,
3109,
368,
341,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
543,
262,
1273,
8226,
2520,
25201,
44352,
7,
3640,
7,
21,
3237,
262,
1077,
45678,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_basic() {
let p: NoiseParams = "Noise_XX_25519_AESGCM_SHA256".parse().unwrap();
assert!(p.handshake.modifiers.list.is_empty());
} | rust_cleaned_test_functions.jsonl/14546 | {
"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,
34729,
368,
341,
286,
1077,
281,
25,
50523,
4870,
284,
330,
61819,
62,
6148,
62,
17,
20,
20,
16,
24,
69381,
38,
9985,
38096,
17,
20,
21,
3263,
6400,
1005,
15454,
543,
286,
2060,
10297,
79,
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 |
#[test]
fn test_pitch_bend_midi_conversion() {
let event = NoteEvent::MidiPitchBend {
timing: TIMING,
channel: 1,
value: 0.6929134,
};
assert_eq!(
NoteEvent::from_midi(TIMING, event.as_midi().unwrap()).unwrap(),
event
)... | rust_cleaned_test_functions.jsonl/115675 | {
"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,
51959,
880,
408,
717,
12278,
64132,
368,
341,
286,
1077,
1538,
284,
7036,
1556,
486,
44,
12278,
47071,
33,
408,
341,
310,
18405,
25,
17742,
1718,
345,
310,
5496,
25,
220,
16,
345,
310,
897,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_step_by_nth_try_fold() {
let mut it = (0..).step_by(10);
assert_eq!(it.try_fold(0, i8::checked_add), None);
assert_eq!(it.next(), Some(60));
assert_eq!(it.try_fold(0, i8::checked_add), None);
assert_eq!(it.next(), Some(90));
let mut it = (100..).step_by(10);
... | rust_cleaned_test_functions.jsonl/70142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
11946,
3710,
78342,
53283,
61187,
368,
341,
262,
1077,
5206,
432,
284,
320,
15,
496,
568,
9520,
3710,
7,
16,
15,
317,
262,
2060,
10714,
10297,
275,
48779,
61187,
7,
15,
11,
600,
23,
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_stft_build_assertion_2() {
_test_stft(10, 10, None, None, Some(11), PadMode::Truncate).unwrap();
} | rust_cleaned_test_functions.jsonl/104791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 59
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
723,
20801,
16553,
290,
62,
17,
368,
341,
262,
716,
1944,
1261,
723,
7,
16,
15,
11,
220,
16,
15,
11,
2240,
11,
2240,
11,
4329,
7,
16,
16,
701,
25299,
3636,
486,
1282,
26900,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_collision_when_ranked_query() {
assert!(default_rank_route_collisions(&["/a?a=b", "/a?c=d"]));
assert!(default_rank_route_collisions(&["/<foo>?a=b", "/<foo>?c=d&<d>"]));
} | rust_cleaned_test_functions.jsonl/26088 | {
"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,
70375,
47636,
20417,
291,
5738,
368,
341,
286,
2060,
10297,
2258,
20417,
28109,
43597,
6805,
2099,
1183,
14,
64,
98461,
22086,
497,
3521,
64,
30,
66,
25405,
74446,
286,
2060,
10297,
2258,
20417,
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_boot_from_virtio_pmem() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let kernel_path = direct_kernel_boot_path();
let mut child = GuestCommand::new(&guest)
.args(&["--cpus", "boot=1"])
... | rust_cleaned_test_functions.jsonl/26145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1052
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52062,
5673,
2273,
2106,
815,
620,
10536,
368,
341,
286,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
286,
1077,
8640,
284,
26215,
486,
931,
67758... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sub() {
let z = Vec3::zero();
let v1 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
let v2 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
assert_eq!(v1 - v2, z);
let v1 = Vec3::new(3.0f64, 5.0f64, 7.0f64);
let v2 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
l... | rust_cleaned_test_functions.jsonl/120474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
972,
286,
1077,
1147,
284,
11312,
18,
486,
14154,
1647,
286,
1077,
348,
16,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
69,
21,
19,
11,
220,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct_literal_before_space() {
check(
r#"
struct Foo$0 {}
fn main() {
let f: Foo;
f = Foo {};
}
"#,
expect![[r#"
Foo Struct FileId(0) 0..13 7..10
FileId(0) 41..44
FileId(0) 54..57
"#]],
... | rust_cleaned_test_functions.jsonl/60631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
34100,
23708,
14663,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
1235,
33428,
3,
15,
5613,
262,
5168,
1887,
368,
341,
262,
1077,
282,
25,
33428,
280,
262,
282,
284,
33428,
9321,
532,
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_13() {
assert_eq!(
parse_column_type(&mut Parser::new("varchar(20)")),
ColumnType::Varchar(StringAttr {
length: Some(20),
charset: None,
collation: None,
})
);
} | rust_cleaned_test_functions.jsonl/73842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
18,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
8744,
1819,
2099,
6984,
21102,
486,
931,
445,
32922,
7,
17,
15,
8,
30154,
310,
9332,
929,
486,
53,
1113,
277,
2242,
13371,
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... | 1 |
#[test]
fn test_decode_ldrsb_reg() {
assert_eq!(
decode_16(0x5624),
Instruction::LDRSB_reg {
params: Reg3FullParams {
rt: Reg::R4,
rn: Reg::R4,
rm: Reg::R0,
shift_t: SRType::LSL,
shift_n: 0,
... | rust_cleaned_test_functions.jsonl/64783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
50573,
5428,
65,
4920,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
16,
21,
7,
15,
87,
20,
21,
17,
19,
1326,
286,
29051,
486,
43,
7687,
16680,
4920,
341,
310,
3628,
25,
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_serde_de_unit_enum() -> Result<(), Box<EvalAltResult>> {
#[derive(Debug, PartialEq, Deserialize)]
enum MyEnum {
VariantFoo,
VariantBar,
}
let d = Dynamic::from("VariantFoo".to_string());
assert_eq!(MyEnum::VariantFoo, from_dynamic(&d)?);
let d = Dynamic:... | rust_cleaned_test_functions.jsonl/97335 | {
"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,
75861,
450,
2259,
14832,
31054,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
48440,
5563,
262,
7618,
3017,
10766,
341,
286,
39292,
40923... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tapscript_rtt() {
// Test x-only invalid under segwitc0 context
let ms = Segwitv0Script::from_str_insane(&format!(
"pk(2788ee41e76f4f3af603da5bc8fa22997bc0344bb0f95666ba6aaff0242baa99)"
));
assert_eq!(
ms.unwrap_err().to_string(),
... | rust_cleaned_test_functions.jsonl/129415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
391,
2282,
1710,
5566,
368,
341,
286,
442,
3393,
856,
15382,
8318,
1212,
4810,
88519,
66,
15,
2266,
198,
286,
1077,
9829,
284,
17209,
88519,
85,
15,
5910,
486,
1499,
2895,
34386,
2145,
2099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_value() {
let json = serde_json::json! {{
"a": 25.0,
"b": "hello",
}};
let value: Value = json.clone().into();
let out: Json = value.unwrap();
assert_eq!(out, json);
} | rust_cleaned_test_functions.jsonl/12484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
3142,
368,
341,
286,
1077,
2951,
284,
61570,
9455,
486,
2236,
0,
80505,
310,
330,
64,
788,
220,
17,
20,
13,
15,
345,
310,
330,
65,
788,
330,
14990,
756,
286,
87037,
286,
1077,
897,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remappings_override() {
figment::Jail::expect_with(|jail| {
jail.create_file(
"foundry.toml",
r#"
[default]
src = "some-source"
out = "some-out"
cache = true
"#,
... | rust_cleaned_test_functions.jsonl/42698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19194,
23036,
48576,
368,
341,
286,
4144,
478,
486,
41,
604,
486,
17119,
6615,
22428,
73,
604,
91,
341,
310,
17540,
2520,
2458,
1006,
394,
330,
15105,
884,
73494,
75,
756,
394,
435,
2,
698,
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... | 3 |
#[test]
fn test_push_zeros() {
let mut buffer = Buffer::allocate(5);
buffer.push(1);
buffer.push_zeros(2);
assert_eq!(&buffer[..], [1, 0, 0]);
} | rust_cleaned_test_functions.jsonl/87212 | {
"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,
14218,
83761,
368,
341,
286,
1077,
5206,
4147,
284,
10312,
486,
31191,
7,
20,
317,
286,
4147,
2552,
7,
16,
317,
286,
4147,
2552,
83761,
7,
17,
317,
286,
2060,
10714,
0,
2099,
7573,
95874,
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 |
#[test]
fn test_create_account() {
let new_owner = Pubkey::new(&[9; 32]);
let from = Pubkey::new_unique();
let to = Pubkey::new_unique();
let from_account = AccountSharedData::new(100, 0, &system_program::id());
let to_account = AccountSharedData::new(0, 0, &Pubkey::defau... | rust_cleaned_test_functions.jsonl/95868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
13500,
368,
341,
286,
1077,
501,
29027,
284,
22611,
792,
486,
931,
2099,
58,
24,
26,
220,
18,
17,
2558,
286,
1077,
504,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
311,
284,
22611,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_statement() {
expect_printed("try {} catch (err) {}", "try {} catch (err) {}");
expect_printed("try {} finally {}", "try {} finally {}");
expect_printed(
"try {} catch (err) {} finally {}",
"try {} catch (err) {} finally {}",
);
} | rust_cleaned_test_functions.jsonl/93440 | {
"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,
53283,
37404,
368,
341,
262,
1720,
10064,
291,
445,
1539,
4687,
2287,
320,
615,
8,
24689,
330,
1539,
4687,
2287,
320,
615,
8,
4687,
797,
262,
1720,
10064,
291,
445,
1539,
4687,
5499,
24689,
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_cb_called_on_error() {
let result = call_callback(Err(ErrorCode::CommonInvalidState)).unwrap();
assert_eq!(ErrorCode::CommonInvalidState, result.0);
assert_eq!(String::from(""), result.1);
} | rust_cleaned_test_functions.jsonl/12835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16450,
27859,
4470,
4096,
368,
341,
286,
1077,
1102,
284,
1618,
12519,
7,
7747,
7,
30748,
486,
10839,
7928,
1397,
4579,
15454,
543,
286,
2060,
10714,
10297,
30748,
486,
10839,
7928,
1397,
11,
1102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_oom() {
use goblin::container::{Container, Ctx};
use scroll::Pwrite;
fn test_oom(data: &mut [u8]) {
let mut modified_data = data.to_vec();
let mut elf = Elf::parse(&data).unwrap();
let endianness = elf.header.endianness().unwrap();
let ctx = Ctx::new(... | rust_cleaned_test_functions.jsonl/58422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4191,
368,
341,
262,
990,
342,
47061,
486,
3586,
22964,
4502,
11,
356,
3998,
2440,
262,
990,
9059,
486,
47,
4934,
401,
262,
5168,
1273,
62,
4191,
2592,
25,
609,
6984,
508,
84,
23,
2467,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_complex_code_block_attrs() {
let comment = "```rust,no_run\nlet z = 55;\n```";
assert_eq!(format_docs(comment), "```rust\nlet z = 55;\n```");
} | rust_cleaned_test_functions.jsonl/57086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
49692,
68017,
41522,
4136,
7113,
39578,
368,
341,
286,
1077,
3980,
284,
330,
73594,
35788,
84198,
14007,
1699,
1149,
1147,
284,
220,
20,
20,
17882,
77,
73594,
876,
286,
2060,
10714,
10297,
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 |
#[test]
fn test_mut_rev_iterator() {
let mut m = SmallIntMap::new();
assert!(m.insert(0, 1));
assert!(m.insert(1, 2));
assert!(m.insert(3, 5));
assert!(m.insert(6, 10));
assert!(m.insert(10, 11));
for (k, v) in m.mut_rev_iter() {
*v += k as i... | rust_cleaned_test_functions.jsonl/7542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
38082,
13491,
368,
341,
286,
1077,
5206,
296,
284,
14994,
1072,
2227,
486,
931,
1428,
286,
2060,
10297,
76,
7030,
7,
15,
11,
220,
16,
1106,
286,
2060,
10297,
76,
7030,
7,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_tsconfig_as_bytes() {
let mut tsconfig1 = TsConfig::new(json!({
"strict": true,
"target": "esnext",
}));
tsconfig1.merge(&json!({
"target": "es5",
"module": "amd",
}));
let mut tsconfig2 = TsConfig::new(json!({
"target": "esnext",
"strict":... | rust_cleaned_test_functions.jsonl/107842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25023,
1676,
11898,
12524,
368,
341,
262,
1077,
5206,
10591,
1676,
16,
284,
25076,
2648,
486,
931,
9304,
0,
2262,
414,
330,
6627,
788,
830,
345,
414,
330,
5657,
788,
330,
288,
3600,
756,
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_display() {
assert_eq!(
FromHexError::InvalidHexCharacter { c: '\n', index: 5 }.to_string(),
"Invalid character '\\n' at position 5"
);
assert_eq!(FromHexError::OddLength.to_string(), "Odd number of digits");
assert_eq!(
FromHe... | rust_cleaned_test_functions.jsonl/21663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
2060,
10714,
33673,
310,
5542,
20335,
1454,
486,
7928,
20335,
12404,
314,
272,
25,
5196,
77,
516,
1922,
25,
220,
20,
16908,
983,
3904,
3148,
310,
330,
7928,
3668,
28078,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_arg_matches_true() {
let argv = vec!["lsd", "--classify"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
assert_eq!(
Some(Indicators(true)),
Indicators::from_arg_matches(&matches)
);
} | rust_cleaned_test_functions.jsonl/80245 | {
"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,
5673,
6057,
38344,
16082,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
94290,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
1005,
455,
38344,
5673,
34067,
15329,
568,
15454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_obj_array() {
let mut lin = LinearAllocator::new(100_000);
let mut sc = ScopeStack::new(&mut lin);
let mut count = 0;
let mut arr = sc.alloc_obj_array(6).unwrap();
for _ in 0..6 {
unsafe {
std::ptr::write(
... | rust_cleaned_test_functions.jsonl/107401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7328,
3858,
368,
341,
286,
1077,
5206,
9805,
284,
28263,
42730,
486,
931,
7,
16,
15,
15,
62,
15,
15,
15,
317,
286,
1077,
5206,
1136,
284,
34920,
4336,
486,
931,
2099,
6984,
9805,
626,
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... | 2 |
#[test]
fn test_samples_from_key_ranges() {
let key_ranges = vec![];
assert_eq!(Samples::from(key_ranges).0.len(), 0);
let key_ranges = vec![build_key_range(b"a", b"b", false)];
assert_eq!(Samples::from(key_ranges).0.len(), 2);
let key_ranges = vec![
build_k... | rust_cleaned_test_functions.jsonl/51347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18297,
5673,
3097,
58748,
368,
341,
286,
1077,
1376,
58748,
284,
7486,
0,
15078,
286,
2060,
10714,
10297,
39571,
486,
1499,
4857,
58748,
568,
15,
19406,
1507,
220,
15,
626,
286,
1077,
1376,
58748,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uptime() {
use sysinfo::SystemExt;
let mut s = sysinfo::System::new();
s.refresh_all();
assert!(s.get_uptime() != 0);
} | rust_cleaned_test_functions.jsonl/41750 | {
"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,
7300,
28941,
368,
341,
262,
990,
5708,
2733,
486,
2320,
6756,
401,
262,
1077,
5206,
274,
284,
5708,
2733,
486,
2320,
486,
931,
543,
262,
274,
26031,
5705,
543,
262,
2060,
10297,
82,
670,
7300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_filter_by_file_size() {
let dir = PathBuf::from(TEST_DIR);
let filter = Filter::new().with_min_size(Size::Byte(100));
let files: Vec<DirEntry> = create_walker(&Config::default(), &dir)
.into_iter()
.filter_map(|e| e.ok())
.filter(|e| fi... | rust_cleaned_test_functions.jsonl/54486 | {
"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,
8727,
3710,
2458,
2368,
368,
341,
286,
1077,
5419,
284,
7933,
15064,
486,
1499,
50320,
8291,
317,
286,
1077,
4051,
284,
12339,
486,
931,
1005,
4197,
7260,
2368,
81779,
486,
7153,
7,
16,
15,
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_sort_hash_intermediate() {
solana_logger::setup();
let mut stats = HashStats::default();
let key = Pubkey::new_unique();
let hash = Hash::new_unique();
let val = CalculateHashIntermediate::new(1, hash, 1, 1, key);
let hash2 = Hash::new_un... | rust_cleaned_test_functions.jsonl/17803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 597
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
8950,
15318,
14636,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
5206,
10472,
284,
6531,
16635,
486,
2258,
543,
286,
1077,
1376,
284,
22611,
792,
486,
931,
21218,
543,
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_fmt() {
use header::Headers;
let mut cookie = Cookie::new("foo".to_owned(), "bar".to_owned());
cookie.httponly = true;
cookie.path = Some("/p".to_owned());
let cookies = SetCookie(vec![cookie, Cookie::new("baz".to_owned(), "quux".to_owned())]);
let mut headers = Headers:... | rust_cleaned_test_functions.jsonl/69237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
368,
341,
262,
990,
4247,
486,
10574,
401,
262,
1077,
5206,
12544,
284,
24356,
486,
931,
445,
7975,
3263,
983,
51973,
1507,
330,
2257,
3263,
983,
51973,
1423,
262,
12544,
21081,
83,
618,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_now() -> Result<(), Error> {
let now_expression = parse_expression("Now()")?;
let values = HashMap::new();
let fetcher = Fetcher::TrialData(TrialDataFetcher::new(&values));
let files = HashMap::new();
let state = MetricState::new(&files, fetcher, Some(2000... | rust_cleaned_test_functions.jsonl/68259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20813,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1431,
28068,
284,
4715,
28068,
445,
7039,
368,
899,
37445,
286,
1077,
2750,
284,
10528,
486,
931,
543,
286,
1077,
7807,
261,
284,
22104,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multi_string_info_tag() {
let mut reader = Reader::from_path("test/test-info-multi-string.vcf").unwrap();
let mut rec = reader.empty_record();
let _ = reader.read(&mut rec);
assert_eq!(
rec.info_shared_buffer(b"ANN", Buffer::new())
.st... | rust_cleaned_test_functions.jsonl/8780 | {
"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,
25133,
3904,
3109,
9372,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
1499,
2638,
445,
1944,
12697,
12505,
95669,
30881,
3133,
9792,
1827,
15454,
543,
286,
1077,
5206,
1395,
284,
6604,
9178,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_happened_before() {
let mut s1 = SimulatedLedgerState::new();
let mut s2 = SimulatedLedgerState::new();
assert!(!s1.happened_just_before(&s2));
s1.execute(
Command {
proposer: Author(0),
index: 0,
},
NodeTime(1),
);
assert!(... | rust_cleaned_test_functions.jsonl/95862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
676,
6758,
23708,
368,
341,
262,
1077,
5206,
274,
16,
284,
4467,
7757,
60850,
1389,
1397,
486,
931,
543,
262,
1077,
5206,
274,
17,
284,
4467,
7757,
60850,
1389,
1397,
486,
931,
543,
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_set_color() {
assert_eq!(set_color("PENDING"), "bFbl");
assert_eq!(set_color("IN PROGRESS"), "bFyl");
assert_eq!(set_color("OFFER RECEIVED"), "bFml");
assert_eq!(set_color("HIRED"), "bFgl");
assert_eq!(set_color("REJECTED"), "bFrl");
assert_eq!(set... | rust_cleaned_test_functions.jsonl/92016 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
6714,
368,
341,
286,
2060,
10714,
10297,
746,
6714,
445,
47,
30879,
3975,
330,
65,
37,
2024,
797,
286,
2060,
10714,
10297,
746,
6714,
445,
687,
5308,
36185,
3975,
330,
65,
37,
3923,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_drop_create() {
init!("true");
let handle = create_connection("test_create_drop_create").unwrap();
let did1 = get_pw_did(handle).unwrap();
assert!(release(handle).is_ok());
let handle2 = create_connection("test_create_drop_create").unwrap();
... | rust_cleaned_test_functions.jsonl/34216 | {
"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,
8657,
29584,
8657,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
3705,
284,
1855,
15866,
445,
1944,
8657,
29584,
8657,
1827,
15454,
543,
286,
1077,
1521,
16,
284,
633,
60181,
814,
307,
26405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collation() {
let mut ctx = EvalContext::default();
let cases = vec![
(Collation::Binary, true, vec!["B", "a"], "a"),
(Collation::Utf8Mb4Bin, true, vec!["B", "a"], "a"),
(Collation::Utf8Mb4GeneralCi, true, vec!["B", "a"], "B"),
(Col... | rust_cleaned_test_functions.jsonl/9278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1073
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43597,
367,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
15265,
367,
486,
21338,
11,
830,
11,
7486,
0,
1183,
33,
497,
330,
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... | 5 |
#[test]
fn test_parse_number() {
assert_eq!(parse_number(FileSpan::new(Rc::new(String::from("3.14")), Rc::new(String::from("input")))).unwrap().1.value, 3.14);
assert_eq!(parse_number(FileSpan::new(Rc::new(String::from("-3.14")), Rc::new(String::from("input")))).unwrap().1.value, -3.14);
assert_eq!(... | rust_cleaned_test_functions.jsonl/68343 | {
"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,
21039,
5500,
368,
341,
262,
2060,
10714,
10297,
6400,
5500,
19821,
12485,
486,
931,
2785,
66,
486,
931,
2242,
486,
1499,
445,
18,
13,
16,
19,
35674,
81463,
486,
931,
2242,
486,
1499,
445,
1355,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seek() {
let ps = ParseStream {
content: "Hello".to_string(),
cursor: 1,
};
let index = ps.seek("lo").unwrap();
assert_eq!(ps.cursor, 1);
assert_eq!(index, 3);
} | rust_cleaned_test_functions.jsonl/41155 | {
"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,
74473,
368,
341,
286,
1077,
4726,
284,
14775,
3027,
341,
310,
2213,
25,
330,
9707,
3263,
983,
3904,
3148,
310,
8128,
25,
220,
16,
345,
286,
3634,
286,
1077,
1922,
284,
4726,
38179,
445,
385,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_time_monitor() {
let jumped = Arc::new(AtomicBool::new(false));
let triggered = AtomicBool::new(false);
let now = move || {
if !triggered.load(Ordering::SeqCst) {
triggered.store(true, Ordering::SeqCst);
SystemTime::now()
... | rust_cleaned_test_functions.jsonl/21941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
40112,
368,
341,
286,
1077,
26005,
284,
19689,
486,
931,
7,
65857,
11233,
486,
931,
3576,
1106,
286,
1077,
22119,
284,
30316,
11233,
486,
931,
3576,
317,
286,
1077,
1431,
284,
3271,
1369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tokenize_keywords() {
let input = "if else true false return";
let mut tokens = Lexer::new(input);
let expected = vec![
Token::If,
Token::Else,
Token::Boolean(true),
Token::Boolean(false),
Token::Return,
... | rust_cleaned_test_functions.jsonl/80425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
51354,
368,
341,
286,
1077,
1946,
284,
330,
333,
770,
830,
895,
470,
876,
286,
1077,
5206,
11211,
284,
85082,
486,
931,
5384,
626,
286,
1077,
3601,
284,
7486,
90515,
310,
9660,
486,
2679,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_promise_str() {
use super::ToPromiseString;
assert_eq!(vec![].to_promise_string(), "");
assert_eq!(vec![Promise::Dns].to_promise_string(), "dns");
assert_eq!(
vec![Promise::Stdio, Promise::ProtExec].to_promise_string(),
"stdio prot_exec"
... | rust_cleaned_test_functions.jsonl/131804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
5273,
2895,
368,
341,
286,
990,
2256,
486,
1249,
21041,
703,
401,
286,
2060,
10714,
10297,
4083,
20703,
936,
983,
620,
5273,
3904,
1507,
14498,
286,
2060,
10714,
10297,
4083,
20703,
21041,
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_put_and_get() {
let mut cache: LruCache<int, int> = LruCache::new(2);
cache.put(1, 10);
cache.put(2, 20);
assert_opt_eq(cache.get(&1), 10);
assert_opt_eq(cache.get(&2), 20);
assert_eq!(cache.len(), 2);
} | rust_cleaned_test_functions.jsonl/21879 | {
"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,
15557,
8378,
3062,
368,
341,
286,
1077,
5206,
6500,
25,
444,
2672,
8233,
4159,
11,
526,
29,
284,
444,
2672,
8233,
486,
931,
7,
17,
317,
286,
6500,
3597,
7,
16,
11,
220,
16,
15,
317,
286,
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_false() {
let gil = Python::acquire_gil();
let py = gil.python();
assert!(!PyBool::new(py, false).is_true());
let t: &PyObjectRef = PyBool::new(py, false).into();
assert_eq!(false, t.extract().unwrap());
assert!(false.to_object(py) == PyBool::new(p... | rust_cleaned_test_functions.jsonl/112699 | {
"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,
36015,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
2060,
0,
3471,
13828,
11233,
486,
931,
46827,
11,
895,
568,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_digraph_depth_first_search_order() {
let mut g = Digraph::new(7);
g.add_edge(0, 2);
g.add_edge(0, 5);
g.add_edge(0, 1);
g.add_edge(6, 0);
g.add_edge(5, 2);
g.add_edge(3, 2);
g.add_edge(3, 5);
g.add_edge(1, 4);
g.add_edge(3, 4);
g.add_edge(3, 6);
g.... | rust_cleaned_test_functions.jsonl/66719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
53867,
19061,
12978,
10716,
7869,
368,
341,
262,
1077,
5206,
342,
284,
37969,
1935,
486,
931,
7,
22,
317,
262,
342,
1364,
17932,
7,
15,
11,
220,
17,
317,
262,
342,
1364,
17932,
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... | 1 |
#[test]
fn test_affine3_serde() {
use crate::{Quat, Vec3};
let a = Affine3A::from_scale_rotation_translation(
Vec3::new(1.0, 2.0, 3.0),
Quat::IDENTITY,
Vec3::new(4.0, 5.0, 6.0),
);
let serialized = serde_json::to_string(&a).unwrap();
a... | rust_cleaned_test_functions.jsonl/23875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48914,
482,
18,
75861,
450,
368,
341,
286,
990,
17717,
22964,
2183,
266,
11,
11312,
18,
2315,
286,
1077,
264,
284,
9748,
482,
18,
32,
486,
1499,
16727,
44813,
49273,
1006,
310,
11312,
18,
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_line_width() {
use crate::math::{point, Point};
use crate::geom::euclid::approxeq::ApproxEq;
let mut builder = crate::path::Path::builder();
builder.begin(point(0.0, 1.0));
builder.line_to(point(2.0, 1.0));
builder.end(false);
let path = builder.build();
let opti... | rust_cleaned_test_functions.jsonl/83684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
7927,
368,
341,
262,
990,
17717,
486,
10374,
22964,
2768,
11,
5126,
2440,
262,
990,
17717,
486,
41916,
486,
20128,
75044,
486,
15707,
8371,
80,
486,
28588,
12606,
80,
280,
262,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pretty_print_var() {
assert_eq!(format!("{:?}", Variable {
id: 1,
value: &[],
}), "var_1");
assert_eq!(format!("{:?}", Variable {
id: 2,
value: &[9],
}), "var_2=[9]");
assert_eq!(format!("{:?}", Variable {
id: 2,
value: &[9, 0],... | rust_cleaned_test_functions.jsonl/13349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
21322,
10064,
4612,
368,
341,
262,
2060,
10714,
10297,
2243,
88928,
25,
52652,
12407,
341,
286,
877,
25,
220,
16,
345,
286,
897,
25,
44590,
1259,
262,
31706,
330,
947,
62,
16,
797,
262,
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_show_all_prices() -> Result<()> {
let sql = SqlBuilder::select_from("books")
.distinct()
.field("price")
.sql()?;
assert_eq!(&sql, "SELECT DISTINCT price FROM books;");
Ok(())
} | rust_cleaned_test_functions.jsonl/12587 | {
"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,
15267,
5705,
65688,
368,
1464,
5714,
71698,
341,
286,
1077,
5704,
284,
7224,
3297,
486,
1742,
5673,
445,
12110,
1138,
310,
659,
53021,
741,
310,
659,
2566,
445,
6555,
1138,
310,
659,
3544,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 2 |
#[test]
fn test_validate_tikv_config() {
let mut cfg = TiKvConfig::default();
let default_region_split_check_diff = cfg.raft_store.region_split_check_diff.0;
cfg.raft_store.region_split_check_diff.0 += 1;
assert!(cfg.validate().is_ok());
assert_eq!(
cfg.raft_s... | rust_cleaned_test_functions.jsonl/31111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
528,
1579,
85,
5332,
368,
341,
286,
1077,
5206,
13286,
284,
22325,
42,
85,
2648,
486,
2258,
543,
286,
1077,
1638,
20627,
17052,
7200,
15850,
284,
13286,
13,
2944,
14809,
42976,
17052,
7200,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duration_sub() {
let mut ts = Timestamp::new(333, TimeBase::new(1, 90_000));
ts -= Duration::from_millis(50);
assert_eq!(ts.timestamp, -4167);
} | rust_cleaned_test_functions.jsonl/119672 | {
"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,
25454,
5228,
368,
341,
286,
1077,
5206,
10591,
284,
32758,
486,
931,
7,
18,
18,
18,
11,
4120,
3978,
486,
931,
7,
16,
11,
220,
24,
15,
62,
15,
15,
15,
3237,
286,
10591,
5982,
21045,
486,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uuid_win() {
assert_eq!(
ProguardMapping::new(&MAPPING_WIN[..]).uuid(),
"71d468f2-0dc4-5017-9f12-1a81081913ef".parse().unwrap()
);
} | rust_cleaned_test_functions.jsonl/73315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25540,
25672,
368,
341,
262,
2060,
10714,
33673,
286,
1298,
26098,
6807,
486,
931,
2099,
44,
55163,
34377,
95874,
10697,
17128,
3148,
286,
330,
22,
16,
67,
19,
21,
23,
69,
17,
12,
15,
7628,
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_null_to_none() {
assert_eq!(
serde_json::from_str::<Test>(r#"{ "test": null }"#).unwrap(),
Test { test: None }
);
} | rust_cleaned_test_functions.jsonl/134567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
2346,
31488,
368,
341,
286,
2060,
10714,
33673,
310,
61570,
9455,
486,
1499,
2895,
27638,
2271,
2235,
81,
2,
14129,
330,
1944,
788,
845,
335,
57676,
568,
15454,
3148,
310,
3393,
314,
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_token_map() {
let expanded = parse_macro(
r#"
macro_rules! foobar {
($e:ident) => { fn $e() {} }
}
"#,
)
.expand_tt("foobar!(baz);");
let (node, token_map) = token_tree_to_syntax_node(&expanded, FragmentKind::Items).unwrap();
let content = node.syntax_node().to_s... | rust_cleaned_test_functions.jsonl/28702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
5376,
368,
341,
262,
1077,
17183,
284,
4715,
58810,
1006,
286,
435,
2,
698,
32606,
21407,
0,
11756,
31393,
341,
262,
1711,
68,
25,
1713,
8,
589,
314,
5168,
400,
68,
368,
4687,
456,
532,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display() {
let raw = r#"{{if .}}2000{{else}} 3000 {{end}}"#;
let mut ts = parse(String::default(), String::from(raw), HashSet::default()).unwrap();
let tree = ts.get_mut("").unwrap();
if let Some(ref root) = tree.root {
assert_eq!(raw, format!("{}", r... | rust_cleaned_test_functions.jsonl/8629 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
1077,
7112,
284,
435,
55543,
2979,
333,
659,
3417,
17,
15,
15,
15,
2979,
1503,
3417,
220,
18,
15,
15,
15,
5867,
408,
23386,
2,
280,
286,
1077,
5206,
10591,
284,
4715,
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_ensure_parachain_running_or_error_liquidated_succeeds() {
run_test(|| {
ext::security::ensure_parachain_status_running::<Test>
.mock_safe(|| MockResult::Return(Ok(())));
assert_ok!(Redeem::ensure_parachain_running_or_error_liquidated());
ext::security::e... | rust_cleaned_test_functions.jsonl/26915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
27289,
22654,
610,
466,
37333,
8734,
4096,
62,
53637,
657,
643,
29264,
82,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1303,
486,
17039,
486,
27289,
22654,
610,
466,
4773,
37333,
27638,
2271,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_program_bpf_sanity() {
solana_logger::setup();
let mut programs = Vec::new();
#[cfg(feature = "bpf_c")]
{
programs.extend_from_slice(&[
("alloc", true),
("bpf_to_bpf", true),
("float", true),
("multiple_static", true),
... | rust_cleaned_test_functions.jsonl/5736 | {
"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,
25096,
880,
15897,
643,
38270,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
5206,
7468,
284,
11312,
486,
931,
543,
262,
11506,
14072,
27062,
284,
330,
65,
15897,
666,
5422,
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_locked_out_root_slot_sibling_fail() {
let mut tower = Tower::new_for_tests(0, 0.67);
let ancestors: HashSet<Slot> = vec![0].into_iter().collect();
tower.vote_state.root_slot = Some(0);
tower.record_vote(1, Hash::default());
assert!(tower.is_locked_out(2... | rust_cleaned_test_functions.jsonl/61132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
60271,
6068,
12993,
27563,
96328,
22121,
368,
341,
286,
1077,
5206,
21271,
284,
21938,
486,
931,
5478,
32509,
7,
15,
11,
220,
15,
13,
21,
22,
317,
286,
1077,
37518,
25,
18931,
27,
19877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_coin_portion() {
CoinPortion::new(1_000_000_000_000_001).unwrap();
} | rust_cleaned_test_functions.jsonl/116936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 56
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
75718,
8716,
290,
368,
341,
286,
26233,
7084,
290,
486,
931,
7,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
16,
568,
15454,
543,
262,
335
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fetch_source_1() {
use crate::tokio_util;
// http_util::fetch_sync_string requires tokio
tokio_util::init(|| {
let (_temp_dir, deno_dir) = test_setup();
let module_name =
"http://localhost:4545/tests/subdir/mt_video_mp2t.t3.ts";
let filename = deno_fs::norma... | rust_cleaned_test_functions.jsonl/72744 | {
"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,
11803,
10347,
62,
16,
368,
341,
262,
990,
17717,
486,
29594,
815,
18974,
280,
262,
442,
1758,
18974,
486,
9641,
23008,
3904,
7460,
9628,
815,
198,
262,
9628,
815,
18974,
486,
2327,
79453,
341,
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... | 2 |
#[test]
fn test_increment_pc() {
let mut register = Register::new();
assert_eq!(register.get_pc(), 0);
register.increment_pc();
assert_eq!(register.get_pc(), 1);
register.increment_pc();
assert_eq!(register.get_pc(), 2);
} | rust_cleaned_test_functions.jsonl/113010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51482,
35612,
368,
341,
286,
1077,
5206,
4161,
284,
8451,
486,
931,
1428,
286,
2060,
10714,
10297,
6343,
670,
35612,
1507,
220,
15,
317,
286,
4161,
56936,
35612,
543,
286,
2060,
10714,
10297,
6343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proxy_encoded_size() {
assert!(serialized_size(&0u8) == 1);
assert!(serialized_size(&0u16) == 2);
assert!(serialized_size(&0u32) == 4);
assert!(serialized_size(&0u64) == 8);
// length isize stored as u64
assert!(serialized_size(&"") == 8);
assert!(serialized_size(&"a... | rust_cleaned_test_functions.jsonl/11960 | {
"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,
29712,
73069,
2368,
368,
341,
262,
2060,
10297,
75277,
2368,
2099,
15,
84,
23,
8,
621,
220,
16,
317,
262,
2060,
10297,
75277,
2368,
2099,
15,
84,
16,
21,
8,
621,
220,
17,
317,
262,
2060,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_builder_full_query() {
let query = Timestamp::Hours(11)
.into_query("weather".to_string())
.add_field("temperature", 82)
.add_tag("location", "us-midwest")
.add_tag("season", "summer")
.build();
assert!(query.is_o... | rust_cleaned_test_functions.jsonl/40008 | {
"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,
9165,
28532,
16372,
5738,
368,
341,
286,
1077,
3239,
284,
32758,
486,
23235,
7,
16,
16,
340,
310,
659,
18122,
5738,
445,
15206,
3263,
983,
3904,
2398,
310,
659,
718,
5013,
445,
34558,
497,
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_discovery_scan_end_wrong_txn_id() {
let mut sched = create_sched();
let (_inspector, sme_inspect) = sme_inspect();
let mlme_req = sched
.enqueue_scan_to_discover(passive_discovery_scan(10))
.expect("expected a ScanRequest");
let t... | rust_cleaned_test_functions.jsonl/8146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
7449,
28857,
6213,
75198,
92299,
842,
368,
341,
286,
1077,
5206,
5575,
284,
1855,
67394,
543,
286,
1077,
5453,
1330,
18997,
11,
90467,
34386,
987,
8,
284,
90467,
34386,
987,
1428,
1789,
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_parse_fstring_nested_spec() {
let source = String::from("{foo:{spec}}");
let parse_ast = parse_fstring(&source).unwrap();
assert_eq!(
parse_ast,
FormattedValue {
value: Box::new(mk_ident("foo", 1, 1)),
conversion: N... | rust_cleaned_test_functions.jsonl/10405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
761,
917,
66279,
13594,
368,
341,
286,
1077,
2530,
284,
923,
486,
1499,
13976,
7975,
12547,
9535,
3417,
797,
286,
1077,
4715,
48019,
284,
4715,
761,
917,
2099,
2427,
568,
15454,
1428,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_1() {
let arr: [char; 3] = "abc".chars().arr();
assert_eq!(arr, ['a', 'b', 'c']);
} | rust_cleaned_test_functions.jsonl/131423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
368,
341,
286,
1077,
2890,
25,
508,
1762,
26,
220,
18,
60,
284,
330,
13683,
3263,
19255,
1005,
1118,
543,
286,
2060,
10714,
10297,
1118,
11,
2509,
64,
516,
364,
65,
516,
364,
66,
586... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_commit_and_rollback() {
let mut schema_builder = schema::Schema::builder();
let text_field = schema_builder.add_text_field("text", schema::TEXT);
let index = Index::create_in_ram(schema_builder.build());
let reader = index
.reader_builder()
... | rust_cleaned_test_functions.jsonl/58886 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 722
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
8378,
62,
33559,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
497,
10802,
486,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iter_product() {
let q1 = Quaternion::from(Euler {
x: Rad(2f32),
y: Rad(1f32),
z: Rad(1f32),
});
let q2 = Quaternion::from(Euler {
x: Rad(1f32),
y: Rad(2f32),
z: Rad(1f32),
});
let q3 ... | rust_cleaned_test_functions.jsonl/38243 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
9840,
368,
341,
286,
1077,
2804,
16,
284,
24801,
486,
1499,
10722,
8479,
341,
310,
856,
25,
20605,
7,
17,
69,
18,
17,
1326,
310,
379,
25,
20605,
7,
16,
69,
18,
17,
1326,
310,
1147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_factor_r1cs() {
let big_g: G1Vector = get_generators("G", 8).into();
let big_h: G1Vector = get_generators("H", 8).into();
let g = G1::from_msg_hash("g".as_bytes());
let h = G1::from_msg_hash("h".as_bytes());
let mut factors = vec![
(
... | rust_cleaned_test_functions.jsonl/37406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18588,
1710,
16,
4837,
368,
341,
1789,
286,
1077,
2409,
1889,
25,
479,
16,
3781,
284,
633,
71963,
2973,
445,
38,
497,
220,
23,
568,
18122,
543,
286,
1077,
2409,
1523,
25,
479,
16,
3781,
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... | 3 |
#[test]
fn test_script_returning_complex_type() {
let ctx = TestContext::new();
block_on_all_using_async_std(async {
let mut con = ctx.multiplexed_async_connection_async_std().await?;
redis::Script::new("return {1, ARGV[1], true}")
.arg("hello")
.invoke_async(&mut... | rust_cleaned_test_functions.jsonl/105567 | {
"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,
14660,
12511,
287,
41522,
1819,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
2504,
4470,
5705,
75180,
28346,
15656,
18285,
341,
286,
1077,
5206,
390,
284,
5635,
744,
9845,
2571,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_str() {
let vals = vec![
("1331.107", 1331107, 3),
("1.0", 10, 1),
("2e1", 2, -1),
("0.00123", 123, 5),
("-123", -123, 0),
("-1230", -1230, 0),
("12.3", 123, 1),
("123e-1", 123, 1),
... | rust_cleaned_test_functions.jsonl/75821 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
341,
286,
1077,
28356,
284,
7486,
90515,
310,
3489,
16,
18,
18,
16,
13,
16,
15,
22,
497,
220,
16,
18,
18,
16,
16,
15,
22,
11,
220,
18,
1326,
310,
3489,
16,
13,
15,
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... | 2 |
#[test]
fn test_get_not_exist_cf() {
let engine = BTreeEngine::new(&[]);
assert!(::panic_hook::recover_safe(|| engine.get_cf("not_exist_cf")).is_err());
} | rust_cleaned_test_functions.jsonl/7233 | {
"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,
3062,
7913,
35906,
71143,
368,
341,
286,
1077,
4712,
284,
425,
6533,
4571,
486,
931,
2099,
56703,
286,
2060,
10297,
486,
19079,
32005,
486,
74283,
34067,
79453,
4712,
670,
71143,
445,
1921,
35906,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_text() -> Result<(), Box<dyn Error>> {
assert!(matches!(
EmbedFooterBuilder::new("").unwrap_err(),
EmbedFooterTextError::Empty { text }
if text.is_empty()
));
let too_long_len = EmbedFooterBuilder::TEXT_LENGTH_LIMIT + 1;
assert!... | rust_cleaned_test_functions.jsonl/68792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4326,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
2060,
10297,
19914,
33673,
310,
37068,
19445,
3297,
486,
931,
80821,
15454,
9266,
3148,
310,
37068,
19445,
1178,
1454,
486,
3522,
314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_task_create_okay_contract_id() {
let mut context = get_context(accounts(0));
testing_env!(context.build());
let mut contract = Contract::new();
testing_env!(context
.is_view(false)
.attached_deposit(1000000000040000000200)
.buil... | rust_cleaned_test_functions.jsonl/42994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12184,
8657,
19817,
352,
51499,
842,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
15,
1106,
286,
7497,
15879,
10297,
2147,
13239,
1423,
286,
1077,
5206,
5116,
284,
19185,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_fli_brun() {
let src = [
0x02, // count 2
3, 0xAB, // length 3
(-4i8) as u8, // length -4
0x01, 0x23, 0x45, 0x67 ];
let expected = [
0xAB, 0xAB, 0xAB,
0x01, 0x23, 0x45, 0x67 ];
con... | rust_cleaned_test_functions.jsonl/113376 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
761,
742,
880,
6108,
368,
341,
286,
1077,
2286,
284,
2278,
310,
220,
15,
87,
15,
17,
11,
981,
442,
1760,
220,
17,
198,
310,
220,
18,
11,
262,
220,
15,
78146,
11,
442,
3084,
220,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account_grow_many() {
let (_accounts_dir, paths) = get_temp_accounts_paths(2).unwrap();
let size = 4096;
let accounts = AccountsDb::new_sized(paths, size);
let mut keys = vec![];
for i in 0..9 {
let key = solana_sdk::pubkey::new_rand();
... | rust_cleaned_test_functions.jsonl/1347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 700
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
1889,
651,
22101,
368,
341,
286,
1077,
5453,
26206,
4334,
11,
12716,
8,
284,
633,
11771,
55665,
24152,
7,
17,
568,
15454,
543,
286,
1077,
1379,
284,
220,
19,
15,
24,
21,
280,
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... | 6 |
#[test]
fn test_remove_account() {
let location = TempLocation::new();
let inspector = Arc::new(Inspector::new());
request_stream_test(
location.to_persistent_lifetime(),
Arc::clone(&inspector),
|proxy, ahc_client_end| {
async move {
... | rust_cleaned_test_functions.jsonl/36823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1629
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
13500,
368,
341,
286,
1077,
3728,
284,
19944,
4707,
486,
931,
543,
286,
1077,
44725,
284,
19689,
486,
931,
7,
46230,
486,
931,
1423,
286,
1681,
12673,
4452,
1006,
310,
3728,
2389,
620,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 9 |
#[test]
fn test_btreemap() {
assert_eq!(
<BTreeMap<String, u32>>::static_variant_type().as_str(),
"a{su}"
);
// Validate that BTreeMap adds entries to dict in sorted order
let mut m = BTreeMap::new();
let total = 20;
for n in 0..total {
... | rust_cleaned_test_functions.jsonl/30225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
10157,
42040,
368,
341,
286,
2060,
10714,
33673,
310,
366,
33,
6533,
2227,
3464,
11,
575,
18,
17,
77595,
1978,
46112,
1819,
1005,
300,
2895,
3148,
310,
330,
64,
90,
27051,
11195,
286,
1439,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_deserialize_object() {
let request =
TestInterfaceRequest::from_args(4 /* opcode */, vec![Arg::Object(OBJECT_VALUE)])
.unwrap();
assert_match!(request, TestInterfaceRequest::Object{arg} => assert_eq!(arg, OBJECT_VALUE));
} | rust_cleaned_test_functions.jsonl/55800 | {
"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,
15768,
9050,
5314,
368,
341,
286,
1077,
1681,
4035,
310,
3393,
5051,
1900,
486,
1499,
8384,
7,
19,
1391,
30028,
36572,
7486,
20703,
2735,
486,
1190,
19238,
10467,
7476,
27144,
394,
659,
15454,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.