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_shift_right() {
let mut buffer = setup_buffer("Test");
buffer.shift_mark(Mark::Cursor(0), Direction::Right, 1);
assert_eq!(buffer.get_mark_idx(Mark::Cursor(0)).unwrap(), 1);
} | rust_cleaned_test_functions.jsonl/94757 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22230,
10539,
368,
341,
286,
1077,
5206,
4147,
284,
6505,
7776,
445,
2271,
797,
286,
4147,
29154,
18924,
3189,
838,
486,
14543,
7,
15,
701,
18904,
486,
5979,
11,
220,
16,
626,
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 |
#[test]
fn test_create_message() {
let route = Route::CreateMessage {
channel_id: CHANNEL_ID,
};
assert_eq!(
route.to_string(),
format!("channels/{channel_id}/messages", channel_id = CHANNEL_ID)
);
} | rust_cleaned_test_functions.jsonl/119862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
6462,
368,
341,
286,
1077,
6021,
284,
9572,
486,
4021,
2052,
341,
310,
5496,
842,
25,
58756,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
310,
3561,
17223,
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 |
#[test]
fn test_expect_one_one() {
assert_eq!(1is, SmallVector::one(1is).expect_one(""));
assert_eq!(1is, SmallVector::many(vec!(1is)).expect_one(""));
} | rust_cleaned_test_functions.jsonl/79084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68918,
11667,
11667,
368,
341,
286,
2060,
10714,
10297,
16,
285,
11,
14994,
3781,
486,
603,
7,
16,
285,
568,
17119,
11667,
89744,
286,
2060,
10714,
10297,
16,
285,
11,
14994,
3781,
486,
34576,
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 |
#[test]
fn test_select_query_with_fields() {
let query = query_builder::select("users")
.fields(&["id", "name"])
.build();
assert_eq!("SELECT id, name FROM users;", query);
} | rust_cleaned_test_functions.jsonl/93975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
5738,
6615,
12132,
368,
341,
286,
1077,
3239,
284,
3239,
28532,
486,
1742,
445,
4218,
1138,
310,
659,
9007,
2099,
1183,
307,
497,
330,
606,
14108,
310,
659,
5834,
543,
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 |
#[test]
fn test_bilinearity() {
let mut rng = test_rng();
let a: G1Projective = rng.gen();
let b: G2Projective = rng.gen();
let s: Fr = rng.gen();
let sa = a.mul(s);
let sb = b.mul(s);
let ans1 = MNT6_298::pairing(sa, b);
let ans2 = MNT6_298::pairing(a, sb);
let ans3 = MNT6... | rust_cleaned_test_functions.jsonl/18422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
26560,
10748,
368,
341,
262,
1077,
5206,
28422,
284,
1273,
66849,
543,
262,
1077,
264,
25,
479,
16,
7849,
533,
284,
28422,
22822,
543,
262,
1077,
293,
25,
479,
17,
7849,
533,
284,
28422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exchange_code_with_json_parse_error() {
let client = new_client();
let token = client
.exchange_code(AuthorizationCode::new("ccc".to_string()))
.request(mock_http_client(
vec![
(ACCEPT, "application/json"),
(CONTENT_TYPE, "appli... | rust_cleaned_test_functions.jsonl/97915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 650
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
4136,
6615,
9455,
21039,
4096,
368,
341,
262,
1077,
2943,
284,
501,
8179,
543,
262,
1077,
3950,
284,
2943,
198,
286,
659,
39568,
4136,
4346,
1553,
2022,
2078,
486,
931,
445,
37054,
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... | 2 |
#[test]
fn test_duplicate_name_repetition() {
let foo = &["a", "b"];
let tokens = quote! {
#(#foo: #foo),*
#(#foo: #foo),*
};
let expected = r#""a" : "a" , "b" : "b" "a" : "a" , "b" : "b""#;
assert_eq!(expected, tokens.to_string());
} | rust_cleaned_test_functions.jsonl/53406 | {
"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,
70434,
1269,
1288,
55767,
368,
341,
262,
1077,
15229,
284,
609,
1183,
64,
497,
330,
65,
31797,
262,
1077,
11211,
284,
12641,
0,
341,
286,
671,
32735,
7975,
25,
671,
7975,
701,
5618,
286,
671,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_continue() {
let (hirgen, expr) = parse_inner(
r#"
\x, y ->
#3 'handle #2 > \'number -> 'string ! &x => 'number ~
x => 'number ->
#1 <! &y
"#,
);
let (ctx, _ty) = crate::synth(100, &expr).unwr... | rust_cleaned_test_functions.jsonl/80436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 848
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75297,
368,
341,
286,
1077,
320,
29628,
4370,
11,
15169,
8,
284,
4715,
34345,
1006,
310,
435,
2,
698,
310,
1124,
87,
11,
379,
12381,
1060,
671,
18,
364,
8192,
671,
17,
861,
27152,
4082,
1464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hashmap_size() {
assert_eq!(initial_table_size(100_000).unwrap(), 11);
assert_eq!(initial_table_size(1_000_000).unwrap(), 14);
assert_eq!(initial_table_size(10_000_000).unwrap(), 17);
assert_eq!(initial_table_size(1_000_000_000).unwrap(), 19);
} | rust_cleaned_test_functions.jsonl/96335 | {
"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,
8950,
2186,
2368,
368,
341,
286,
2060,
10714,
10297,
9426,
5237,
2368,
7,
16,
15,
15,
62,
15,
15,
15,
568,
15454,
1507,
220,
16,
16,
317,
286,
2060,
10714,
10297,
9426,
5237,
2368,
7,
16,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_batch_non_null() {
let size = 32;
let fields = vec![
Field::new("a", DataType::Int32, false),
Field::new(
"b",
DataType::List(Box::new(Field::new("item", DataType::LargeUtf8, true))),
false,
... | rust_cleaned_test_functions.jsonl/26774 | {
"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,
8657,
14534,
21637,
15162,
368,
341,
286,
1077,
1379,
284,
220,
18,
17,
280,
286,
1077,
5043,
284,
7486,
90515,
310,
8601,
486,
931,
445,
64,
497,
33172,
486,
1072,
18,
17,
11,
895,
1326,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_mknod_invalid_arg() {
new_ucmd!()
.arg("--foo")
.fails()
.status_code(1)
.no_stdout()
.stderr_contains(&"Found argument '--foo' which wasn't expected");
} | rust_cleaned_test_functions.jsonl/82671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
19095,
347,
31433,
6057,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
21549,
7975,
1138,
286,
659,
59631,
741,
286,
659,
2829,
4136,
7,
16,
340,
286,
659,
2152,
67416,
741,
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 |
#[test]
fn test_varint() {
let data = [0x96, 0x01];
let mut r = BytesReader::from_bytes(&data[..]);
assert_eq!(150, r.read_varint32(&data[..]).unwrap());
assert!(r.is_eof());
} | rust_cleaned_test_functions.jsonl/60207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
396,
368,
341,
262,
1077,
821,
284,
508,
15,
87,
24,
21,
11,
220,
15,
87,
15,
16,
935,
262,
1077,
5206,
435,
284,
30024,
5062,
486,
1499,
12524,
2099,
691,
95874,
2558,
262,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_runnables() {
let (analysis, pos) = analysis_and_position(
r#"
//- /lib.rs
<|> //empty
fn main() {}
#[test]
fn test_foo() {}
#[test]
#[ignore]
fn test_foo() {}
"#,
);
let runnables = ana... | rust_cleaned_test_functions.jsonl/89927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 838
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
77,
4788,
368,
341,
286,
1077,
320,
34484,
11,
1133,
8,
284,
6358,
8378,
9661,
1006,
310,
435,
2,
698,
286,
78406,
608,
2740,
25638,
198,
286,
82639,
29,
442,
3194,
198,
286,
5168,
1887... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_string_option_some() {
let mut dest = vec![];
let value: Option<String> = Some(String::from("wo"));
let result = value.encode(&mut dest, 0);
assert!(result.is_ok());
assert_eq!(dest.len(), 5);
assert_eq!(dest[0], 0x01);
assert_eq!(de... | rust_cleaned_test_functions.jsonl/126949 | {
"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,
11224,
3904,
9672,
61855,
368,
341,
286,
1077,
5206,
3201,
284,
7486,
0,
15078,
286,
1077,
897,
25,
6959,
3464,
29,
284,
4329,
2242,
486,
1499,
445,
1126,
4010,
286,
1077,
1102,
284,
897,
17313,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_plist_access() {
use std::collections::BTreeMap;
use chrono::prelude::*;
use super::Date;
let vec = vec![Plist::Real(0.0)];
let mut array = Plist::Array(vec.clone());
assert_eq!(array.as_array(), Some(&vec.clone()));
assert_eq!(array.as_ar... | rust_cleaned_test_functions.jsonl/14851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 650
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6317,
380,
12759,
368,
341,
286,
990,
1460,
486,
51137,
486,
33,
6533,
2227,
280,
286,
990,
80372,
486,
1726,
52538,
56162,
286,
990,
2256,
486,
1916,
401,
286,
1077,
7486,
284,
7486,
20703,
47,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_username_encoding_spaces() {
let name_str = "Oh Long Johnson";
let username = Username::new(name_str.into()).to_string();
println!("{}", username);
assert_eq!(username, "username*=UTF-8''Oh%20Long%20Johnson")
} | rust_cleaned_test_functions.jsonl/126196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21588,
37613,
67883,
368,
341,
286,
1077,
829,
2895,
284,
330,
11908,
5724,
11351,
3302,
286,
1077,
5934,
284,
29545,
486,
931,
3153,
2895,
39860,
6011,
983,
3904,
1428,
286,
13751,
79878,
5934,
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_stmt_expr() {
use ast::Statement::{Compound, Expression};
use ast::TypeSpecifier::Int;
use parser::expression;
assert_eq!(
expression("({ int p = 0; p; })", &mut Env::new()),
Ok(Compound(vec![
Declaration {
specifiers: vec![Int.into()]... | rust_cleaned_test_functions.jsonl/107557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21824,
21915,
368,
341,
262,
990,
11763,
486,
8636,
22964,
43134,
11,
16378,
2440,
262,
990,
11763,
486,
929,
87297,
486,
1072,
280,
262,
990,
6729,
486,
28099,
401,
262,
2060,
10714,
33673,
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_eh_frame_stops_at_zero_length() {
let section = Section::with_endian(Endian::Little).L32(0);
let section = section.get_contents().unwrap();
let rest = &mut EndianSlice::new(§ion, LittleEndian);
let bases = Default::default();
assert_eq!(
p... | rust_cleaned_test_functions.jsonl/9381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
1261,
3721,
3752,
19359,
5118,
368,
341,
286,
1077,
3772,
284,
11113,
486,
4197,
87193,
7,
43231,
486,
38103,
568,
43,
18,
17,
7,
15,
317,
286,
1077,
3772,
284,
3772,
670,
1668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply()
{
let z = crate::cmatrix::COMPLEX_ZERO;
let o = crate::cmatrix::COMPLEX_ONE;
let x = crate::cmatrix::COMPLEX_HSQRT2;
let i = crate::cmatrix::COMPLEX_I;
let mut state = array![[o, z, x, x], [z, o, x, -x]];
let result = array![[z, -i, -i*... | rust_cleaned_test_functions.jsonl/21202 | {
"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,
36551,
741,
262,
341,
286,
1077,
1147,
284,
17717,
486,
6226,
2555,
486,
8696,
42136,
39370,
280,
286,
1077,
297,
284,
17717,
486,
6226,
2555,
486,
8696,
42136,
34727,
280,
286,
1077,
856,
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_parse_input() {
let cursor = io::Cursor::new("1,2,3,4,5");
let result = parse_input(cursor).expect("it's valid input");
let expected = make_state(&[1, 2, 3, 4, 5]);
assert_eq!(result, expected);
let cursor = io::Cursor::new("1,2 ,3,4,5");
assert_e... | rust_cleaned_test_functions.jsonl/88780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5898,
368,
341,
286,
1077,
8128,
284,
6399,
486,
14543,
486,
931,
445,
16,
11,
17,
11,
18,
11,
19,
11,
20,
797,
286,
1077,
1102,
284,
4715,
5898,
27676,
568,
17119,
445,
275,
594,
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_FX55() {
// 0xFX55 - Store the values of registers V0 to VX inclusive in memory starting at address I
// I is set to I + X + 1 after operation
let opcode = 0xF455;
let mut vm = get_vm();
vm.i = 0x0;
vm.v[0x0] = 0x0;
vm.v[0x1] = 0x1;
vm.v[0x2] = 0x2;
... | rust_cleaned_test_functions.jsonl/271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1400,
55,
20,
20,
368,
341,
262,
442,
220,
15,
9770,
55,
20,
20,
481,
9129,
279,
2750,
315,
24740,
647,
15,
311,
78177,
28308,
304,
4938,
5916,
518,
2621,
358,
198,
262,
442,
688,
358,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_without_gil() {
use crate::{Py, PyAny};
use std::{sync::Arc, thread};
// Some events for synchronizing
static GIL_ACQUIRED: Event = Event::new();
static OBJECT_CLONED: Event = Event::new();
static REFCNT_CHECKED: Event = Event::new();
... | rust_cleaned_test_functions.jsonl/50516 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
39904,
1889,
321,
368,
341,
286,
990,
17717,
22964,
13828,
11,
5355,
8610,
2440,
286,
990,
1460,
22964,
12996,
486,
36809,
11,
4516,
2315,
286,
442,
4329,
4357,
369,
14121,
4849,
198,
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_get_fft_size_for_cheaptrick() {
let fs = 44100;
let mut option = CheapTrickOption::new(fs);
unsafe {
GetFFTSizeForCheapTrick(fs, &mut option as *mut _);
assert_eq!(option.fft_size, 2048);
}
} | rust_cleaned_test_functions.jsonl/20834 | {
"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,
3062,
67059,
2368,
5478,
62,
61690,
376,
865,
368,
341,
286,
1077,
8619,
284,
220,
19,
19,
16,
15,
15,
280,
286,
1077,
5206,
2999,
284,
35934,
1282,
865,
5341,
486,
931,
31856,
317,
286,
19860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_send_tx() {
solana_logger::setup();
let TestValidator {
server,
leader_data,
alice,
ledger_path,
..
} = TestValidator::run();
let bob_pubkey = Pubkey::new_rand();
let req = json_req!("getRecentBlockhash", json!([]));
let json ... | rust_cleaned_test_functions.jsonl/81680 | {
"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,
60799,
13565,
17805,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
1077,
3393,
14256,
341,
286,
3538,
345,
286,
7653,
1769,
345,
286,
70433,
345,
286,
46933,
2638,
345,
286,
54538,
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_demangle_lines_no_crate_disambiguators() {
let demangled_lines = demangle_lines(MANGLED_INPUT.lines(), Some(create_disambiguator_re()));
for (expected, actual) in DEMANGLED_OUTPUT_NO_CRATE_DISAMBIGUATORS.lines().zip(demangled_lines)
{
assert_eq!(expected, actual);
}
} | rust_cleaned_test_functions.jsonl/25469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69403,
4044,
18323,
6536,
666,
7698,
9932,
2969,
26745,
2973,
368,
341,
262,
1077,
2429,
38940,
18323,
284,
2429,
4044,
18323,
3189,
5218,
13639,
21022,
44061,
1507,
4329,
32602,
9932,
2969,
26745,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_selection_not() {
let doc = doc();
let sel = doc.select("div");
let sel2 = doc.select("a");
assert!(
!sel.is_selection(&sel2),
"Expected some div NOT to be an anchor."
);
} | rust_cleaned_test_functions.jsonl/116372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
23672,
7913,
368,
341,
262,
1077,
4629,
284,
4629,
543,
262,
1077,
11806,
284,
4629,
9712,
445,
611,
797,
262,
1077,
11806,
17,
284,
4629,
9712,
445,
64,
3071,
262,
2060,
33673,
286,
753,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_authorize_url_minimal() {
let client = new_client();
let (authorize_url, _, _) = client
.authorize_url(
AuthenticationFlow::AuthorizationCode::<CoreResponseType>,
|| CsrfToken::new("CSRF123".to_string()),
|| Nonce::new(... | rust_cleaned_test_functions.jsonl/73890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22938,
551,
2903,
7260,
2861,
368,
341,
286,
1077,
2943,
284,
501,
8179,
1428,
286,
1077,
320,
52022,
2903,
11,
8358,
27439,
284,
2943,
198,
310,
659,
52022,
2903,
1006,
394,
23537,
18878,
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... | 3 |
#[test]
fn test_rol() {
let mut r = Register::new();
let mut b = MockBus::new();
b.memory[0x80] = 0x01;
rol(0x80, &mut r, &mut b);
assert_eq!(b.memory[0x80], 0x02);
b.memory[0x80] = 0x01;
r.set_status_carry(true);
rol(0x80, &mut r, &mut b);
assert_eq!(b.memory[0x80], 0x03);
... | rust_cleaned_test_functions.jsonl/14220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
1080,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
1077,
5206,
293,
284,
14563,
15073,
486,
931,
543,
262,
293,
36611,
58,
15,
87,
23,
15,
60,
284,
220,
15,
87,
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_force_leader_on_wrong_leader() {
let mut cluster = new_node_cluster(0, 5);
cluster.pd_client.disable_default_operator();
cluster.run();
cluster.must_put(b"k1", b"v1");
let region = cluster.get_region(b"k1");
cluster.must_split(®ion, b"k9");
let region = cluster.g... | rust_cleaned_test_functions.jsonl/6008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 630
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40739,
79991,
4470,
75198,
79991,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
20,
317,
262,
10652,
556,
67,
8179,
42628,
9993,
40594,
1428,
262,
10652,
7634,
543,
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_image_format_from_path() {
fn from_path(s: &str) -> ImageResult<ImageFormat> {
ImageFormat::from_path(Path::new(s))
}
assert_eq!(from_path("./a.jpg").unwrap(), ImageFormat::Jpeg);
assert_eq!(from_path("./a.jpeg").unwrap(), ImageFormat::Jpeg);
a... | rust_cleaned_test_functions.jsonl/2198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 694
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
8955,
5673,
2638,
368,
341,
286,
5168,
504,
2638,
1141,
25,
609,
495,
8,
1464,
4654,
2077,
46465,
4061,
29,
341,
310,
4654,
4061,
486,
1499,
2638,
33030,
486,
931,
1141,
1171,
286,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dat_delete() {
let strs: Vec<&str> = vec!["a", "ab", "abc"];
let mut da = DoubleArrayTrieBuilder::new().build(&strs);
assert!(da.exact_match_search("abc").is_some());
da.delete("abc");
assert!(da.exact_match_search("abc").is_none());
assert!(da.ex... | rust_cleaned_test_functions.jsonl/6379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 839
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15353,
11353,
368,
341,
286,
1077,
57584,
25,
11312,
52244,
495,
29,
284,
7486,
0,
1183,
64,
497,
330,
370,
497,
330,
13683,
6332,
286,
1077,
5206,
2994,
284,
7093,
1857,
51,
7231,
3297,
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_mirakurun_config() {
assert_eq!(
serde_yaml::from_str::<MirakurunConfig>("{}").unwrap(),
Default::default());
assert_eq!(
serde_yaml::from_str::<MirakurunConfig>(r#"
openapi-json: /path/to/json
"#).unwrap(),
... | rust_cleaned_test_functions.jsonl/6418 | {
"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,
717,
404,
585,
324,
359,
5332,
368,
341,
286,
2060,
10714,
33673,
310,
61570,
64380,
486,
1499,
2895,
27638,
58461,
585,
324,
359,
2648,
13211,
6257,
1827,
15454,
3148,
310,
7899,
486,
2258,
5231,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_move_vec_to_sfen() {
let input_and_expected:Vec<(Vec<Move>,Result<String,ToMoveStringConvertError>)> = vec![
(vec![],Ok(String::from(""))),
(vec![
Move::To(KomaSrcPosition(7,7),KomaDstToPosition(7,6,false)),
],Ok(String::from("7g7f"))),
(vec![
Move::Put(MochigomaKind::Fu,Ko... | rust_cleaned_test_functions.jsonl/46538 | {
"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,
17134,
13251,
2346,
643,
30353,
368,
972,
10217,
1946,
8378,
32190,
25,
10050,
28706,
10050,
27,
9860,
8066,
2077,
3464,
11,
1249,
9860,
703,
12012,
1454,
9231,
29,
284,
7486,
20703,
319,
197,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_five_or_none_true() {
assert_eq!(
execute_function(&setup(), "five_or_none", vec![TRUE_OBJ.clone()]).unwrap(),
gears_obj!(5)
);
} | rust_cleaned_test_functions.jsonl/9515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95258,
8734,
31488,
16082,
368,
341,
262,
2060,
10714,
33673,
286,
9026,
9174,
2099,
15188,
1507,
330,
52670,
8734,
31488,
497,
7486,
20703,
20611,
27559,
15997,
368,
10697,
15454,
3148,
286,
53160,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ppi_node_order() {
let ppi1 = load_ppi(true, true, true, false, true, false);
let ppi2 = load_ppi(true, true, true, false, true, false);
assert_eq!(ppi1.get_nodes_number(), ppi2.get_nodes_number());
assert_eq!(ppi1.get_node_names()[..10], ppi2.get_node_names()[..10]);
} | rust_cleaned_test_functions.jsonl/79384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31600,
72,
5084,
7869,
368,
341,
262,
1077,
281,
2493,
16,
284,
2795,
31600,
72,
3715,
11,
830,
11,
830,
11,
895,
11,
830,
11,
895,
317,
262,
1077,
281,
2493,
17,
284,
2795,
31600,
72,
3715,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inspect_log_nested() {
let (inspector, mut node) = inspector_and_list_node();
inspect_log!(node, {
k1: {
sub1: "subval1",
sub2: {
subsub1: "subsubval1",
},
sub3: 3u64,
},
... | rust_cleaned_test_functions.jsonl/90890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34386,
987,
5224,
66279,
368,
341,
286,
1077,
320,
1330,
18997,
11,
5206,
2436,
8,
284,
44725,
8378,
2019,
5084,
543,
286,
24085,
5224,
10297,
3509,
11,
341,
310,
595,
16,
25,
341,
394,
1186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let cwd = env::current_dir().unwrap();
let src = cwd
.join("fixtures")
.join("symlink")
.join("src")
.join("test");
let dest = cwd
.join("fixtures")
.join("symlink")
.join("d... | rust_cleaned_test_functions.jsonl/99044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58530,
44243,
368,
341,
286,
1077,
46938,
284,
6105,
486,
3231,
4334,
1005,
15454,
1428,
286,
1077,
2286,
284,
46938,
198,
310,
659,
5987,
445,
45247,
1138,
310,
659,
5987,
445,
22860,
44243,
1138... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_put_node() {
let (shutdown_handle, join_handle, bind_url) =
run_rest_api_on_open_port(vec![make_nodes_identity_resource(Box::new(
MemRegistry::new(vec![get_node_1()]),
))]);
let url = Url::parse(&format!(
"http://{}/re... | rust_cleaned_test_functions.jsonl/100314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
5084,
368,
341,
286,
1077,
320,
59547,
10630,
11,
5138,
10630,
11,
10719,
2903,
8,
4035,
310,
1598,
32231,
11697,
4470,
11311,
8716,
25592,
20703,
6927,
14896,
46244,
17962,
67758,
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_ptr_map_cell_one() {
let type_id = TypeId::of::<String>();
let pm:PtrMapCell<String> = PtrMapCell::new();
unsafe { pm.insert(type_id, Box::new("a".to_string())); }
assert_eq!(pm.get(type_id), Some(&"a".to_string()));
assert_eq!(unsafe {pm.one()}, "a");
... | rust_cleaned_test_functions.jsonl/88912 | {
"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,
4348,
5376,
16648,
11667,
368,
341,
286,
1077,
943,
842,
284,
3990,
764,
486,
1055,
27638,
703,
3913,
286,
1077,
8836,
25,
5348,
2227,
3599,
3464,
29,
284,
46409,
2227,
3599,
486,
931,
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_rust_crypto_cipher_xchacha20_ietf_poly1305() {
test_sodium_aead(CipherType::XChaCha20IetfPoly1305);
} | rust_cleaned_test_functions.jsonl/10838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
590,
78298,
76692,
3212,
331,
51576,
17,
15,
62,
74068,
36133,
16,
18,
15,
20,
368,
341,
286,
1273,
643,
46776,
4306,
3149,
3025,
10558,
929,
486,
55,
95971,
95971,
17,
15,
40,
295,
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 |
#[test]
fn test_should_notify() {
let sys_space = address_space_init();
let mut queue_config = QueueConfig::new(QUEUE_SIZE);
queue_config.desc_table = GuestAddress(0);
queue_config.avail_ring = GuestAddress((QUEUE_SIZE as u64) * DESCRIPTOR_LEN);
queue_config.used_ring = ... | rust_cleaned_test_functions.jsonl/15196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1053
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
36654,
368,
341,
286,
1077,
5708,
14663,
284,
2621,
14663,
6137,
1428,
286,
1077,
5206,
7177,
5332,
284,
18745,
2648,
486,
931,
7,
28945,
4098,
317,
286,
7177,
5332,
30514,
5237,
284,
26215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unknown_field_in_flatten() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(deny_unknown_fields)]
struct Outer {
dummy: String,
#[serde(flatten)]
inner: Inner,
}
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Inner {
... | rust_cleaned_test_functions.jsonl/59161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 516
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
5013,
1243,
5081,
14456,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
39900,
11,
48440,
5563,
262,
11506,
47024,
1500,
32395,
57507,
12132,
5563,
262,
2036,
55197,
341,
286,
17292,
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_set_authority_dups() {
let program_id = crate::id();
let account1_key = Pubkey::new_unique();
let mut account1_account = SolanaAccount::new(
account_minimum_balance(),
Account::get_packed_len(),
&program_id,
);
let accou... | rust_cleaned_test_functions.jsonl/44634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1826
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
22938,
487,
814,
8602,
368,
341,
286,
1077,
2025,
842,
284,
17717,
486,
307,
543,
286,
1077,
2692,
16,
3097,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
5206,
2692,
16,
13500,
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_ccsds_parser_too_few_bytes() {
let mut parser = CcsdsParser::new();
parser.recv_slice(&[0,0,0]);
assert_eq!(parser.pull_packet(), None);
assert_eq!(parser.current_status(), CcsdsParserStatus::NotEnoughBytesForHeader);
} | rust_cleaned_test_functions.jsonl/105736 | {
"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,
28955,
82,
5356,
18517,
2346,
78,
761,
365,
12524,
368,
972,
262,
1077,
5206,
6729,
284,
356,
4837,
5356,
6570,
486,
931,
1647,
262,
6729,
40433,
26488,
2099,
58,
15,
11,
15,
11,
15,
55531,
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_is_tor_address() -> Result<(), Error> {
assert!(is_tor_address("2a6at2obto3uvkpkitqp4wxcg6u36qf534eucbskqciturczzc5suyid").is_ok());
assert!(is_tor_address("2a6at2obto3uvkpkitqp4wxcg6u36qf534eucbskqciturczzc5suyid").is_ok());
assert!(is_tor_address("kcgiy5g6m76nzlzz4vyqmgdv34f6yokdqwfhdhaa... | rust_cleaned_test_functions.jsonl/27558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 634
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
528,
269,
6744,
368,
1464,
5714,
68843,
4600,
29,
341,
197,
6948,
10297,
285,
528,
269,
6744,
445,
17,
64,
21,
266,
17,
674,
983,
18,
12058,
48495,
8226,
32763,
19,
86,
8148,
70,
21,
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_nested_block_quotes() {
assert_markdown_eq(
common::parts::nested_block_quotes,
r###"
> a block quote
>
>
> > another block quote
> >
>
"###,
);
} | rust_cleaned_test_functions.jsonl/133525 | {
"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,
66279,
7113,
75637,
368,
341,
262,
2060,
18924,
2923,
10714,
1006,
286,
4185,
486,
18252,
486,
59271,
7113,
75637,
345,
286,
435,
14374,
1837,
29,
264,
2504,
12641,
198,
29,
715,
29,
715,
29,
86... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_nom_parser_multi() {
let die_str = "1d6+2 2d20-3";
let (_, die) = parse_multiple_dice_str(die_str).unwrap();
println!("{:?}", die);
} | rust_cleaned_test_functions.jsonl/89282 | {
"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,
53475,
18517,
25133,
368,
341,
286,
1077,
2746,
2895,
284,
330,
16,
67,
21,
10,
17,
220,
17,
67,
17,
15,
12,
18,
3302,
286,
1077,
39464,
2746,
8,
284,
4715,
45233,
97196,
2895,
1500,
645,
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 |
#[test]
fn test_clone_with_epoch() {
let mut stakes = Stakes::default();
let ((vote_pubkey, vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
stakes.store(&vote_pubkey, &vote_account);
stakes.store(&stake_pubkey, &stake_account);
... | rust_cleaned_test_functions.jsonl/4479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
6615,
20682,
368,
341,
286,
1077,
5206,
44425,
284,
794,
2050,
486,
2258,
1428,
286,
1077,
1781,
29358,
34014,
792,
11,
6910,
13500,
701,
320,
267,
726,
34014,
792,
11,
18279,
13500,
593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tx_non_witness_utxo() {
let (wallet, _, _) =
get_funded_wallet("sh(pk(cVpPVruEDdmutPzisEsYvtST1usBR3ntr8pXSyt6D2YYqXRyPcFW))");
let addr = wallet.get_new_address().unwrap();
let (psbt, _) = wallet
.create_tx(
TxBuilder::new()... | rust_cleaned_test_functions.jsonl/11342 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
21637,
1670,
8091,
60363,
40822,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
4035,
310,
633,
761,
36053,
62308,
445,
927,
39928,
1337,
53,
79,
48469,
2672,
1479,
67,
6984,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_new_vote_state_confirmation_rollback() {
let mut vote_state1 = VoteState::default();
let votes: VecDeque<Lockout> = vec![
Lockout {
slot: 0,
confirmation_count: 4,
},
Lockout {
slot: 1,
... | rust_cleaned_test_functions.jsonl/6123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 814
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
5921,
54360,
4387,
37681,
62,
33559,
368,
341,
286,
1077,
5206,
6910,
4387,
16,
284,
34034,
1397,
486,
2258,
543,
286,
1077,
12684,
25,
11312,
73891,
27,
11989,
411,
29,
284,
7486,
90515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_round_trip() {
let algo = VersionedCryptoBox::default();
let plaintext1 = b"01234567".to_vec();
let plaintext2 = plaintext1.repeat(50);
mc_util_test_helper::run_with_several_seeds(|mut rng| {
let a = RistrettoPrivate::from_random(&mut rng);
... | rust_cleaned_test_functions.jsonl/24020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 495
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
63883,
368,
341,
286,
1077,
27928,
284,
6079,
291,
58288,
1611,
486,
2258,
543,
286,
1077,
60847,
16,
284,
293,
1,
15,
16,
17,
18,
19,
20,
21,
22,
3263,
983,
13251,
543,
286,
1077,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_referencing_rule() {
assert_eq!(
referencing_rule("4 1 5"),
Ok(("", RuleType::Referencing(vec![vec![4, 1, 5]])))
);
assert_eq!(
referencing_rule("2 3 | 3 2"),
Ok(("", RuleType::Referencing(vec![vec![2, 3], vec![3, 2]])))
... | rust_cleaned_test_functions.jsonl/112395 | {
"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,
73386,
11373,
21124,
368,
341,
286,
2060,
10714,
33673,
310,
56516,
21124,
445,
19,
220,
16,
220,
20,
4461,
310,
7622,
7,
19814,
18100,
929,
486,
47447,
11373,
25592,
20703,
4083,
20703,
19,
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_parse() {
let input = "0F1E";
let actual = Bits::new(input);
assert_eq!(
actual.data,
vec![
false, false, false, false,
true, true, true, true, // F
false, false, false, true,
true, ... | rust_cleaned_test_functions.jsonl/21385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
286,
1077,
1946,
284,
330,
15,
37,
16,
36,
876,
286,
1077,
5042,
284,
49457,
486,
931,
5384,
317,
286,
2060,
10714,
33673,
310,
5042,
2196,
345,
310,
7486,
90515,
394,
895,
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_sample_input_1() {
let input = vec![
vec![1, 3, 1],
vec![2, 1, 2],
vec![3, 3, 3],
];
assert_eq!(solution(input), false);
let input = vec![
vec![0, 2, 1],
vec![1, 1, 1],
vec![2, 0, 0],
... | rust_cleaned_test_functions.jsonl/32595 | {
"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,
17491,
5898,
62,
16,
368,
341,
286,
1077,
1946,
284,
7486,
90515,
310,
7486,
20703,
16,
11,
220,
18,
11,
220,
16,
1259,
310,
7486,
20703,
17,
11,
220,
16,
11,
220,
17,
1259,
310,
7486,
20703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove(){
let mut e1 = FlagA | FlagB;
let e2 = FlagA | FlagC;
e1.remove(e2);
assert!(e1 == FlagB);
} | rust_cleaned_test_functions.jsonl/83104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
3032,
286,
1077,
5206,
384,
16,
284,
22666,
32,
760,
22666,
33,
280,
286,
1077,
384,
17,
284,
22666,
32,
760,
22666,
34,
280,
286,
384,
16,
4850,
2026,
17,
317,
286,
2060,
10297,
68,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple_attributes() {
let (rem, res) = MultipleAttributes1::parse(INPUT_CSTRING).expect("parsing failed");
assert!(!rem.is_empty());
assert!(res.cstring.is_some());
assert_eq!(res.cstring.unwrap().as_bytes(), b"Hello, world!");
} | rust_cleaned_test_functions.jsonl/48214 | {
"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,
15126,
45233,
18240,
368,
341,
262,
1077,
320,
1826,
11,
592,
8,
284,
28811,
10516,
16,
486,
6400,
57911,
920,
16468,
568,
17119,
445,
79,
28598,
4641,
797,
262,
2060,
0,
3471,
1826,
2079,
15124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pattern_domain() {
use crate::model::key_match;
let mut rm = DefaultRoleManager::new(3);
rm.matching_fn(None, Some(key_match));
rm.add_link("u1", "g1", Some("*"));
assert!(rm.has_role("u1", Some("domain2")));
} | rust_cleaned_test_functions.jsonl/38674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21260,
20111,
368,
341,
286,
990,
17717,
486,
2528,
486,
792,
10708,
280,
286,
1077,
5206,
18998,
284,
7899,
9030,
2043,
486,
931,
7,
18,
317,
286,
18998,
11072,
287,
15246,
26717,
11,
4329,
485... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stream_level() {
let frame = WindowUpdateFrame::for_stream(1, 10);
let expected = raw_frame_from_parts(FrameHeader::new(4, 0x8, 0, 1), vec![0, 0, 0, 10]).as_ref().to_owned();
let serialized = serialize_frame(&frame);
assert_eq!(expected, serialized);
... | rust_cleaned_test_functions.jsonl/43503 | {
"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,
88686,
12673,
8274,
368,
341,
286,
1077,
4034,
284,
13642,
4289,
4369,
486,
1958,
12673,
7,
16,
11,
220,
16,
15,
317,
286,
1077,
3601,
284,
7112,
8929,
5673,
33217,
91008,
4047,
486,
931,
7,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sized_cache_key() {
sized_key("a", "1");
sized_key("a", "1");
{
let cache = SIZED_CACHE.lock().unwrap();
assert_eq!(1, cache.cache_misses().unwrap());
assert_eq!(1, cache.cache_hits().unwrap());
assert_eq!(1, cache.cache_size());
}
sized_key("a... | rust_cleaned_test_functions.jsonl/13130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 895
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
1506,
11529,
3097,
368,
341,
262,
29287,
3097,
445,
64,
497,
330,
16,
797,
262,
29287,
3097,
445,
64,
497,
330,
16,
797,
262,
341,
286,
1077,
6500,
284,
328,
51538,
29138,
21003,
1005,
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_get_metadata() {
let (mock_db, client, mut runtime) = create_database_client_and_runtime();
let mut batch = JsonRpcBatch::default();
batch.add_get_metadata_request(Some(1));
let result = execute_batch_and_get_first_response(&client, &mut runtime, batch);
let result_view = ... | rust_cleaned_test_functions.jsonl/4626 | {
"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,
3062,
22220,
368,
341,
262,
1077,
320,
16712,
8685,
11,
2943,
11,
5206,
15592,
8,
284,
1855,
27341,
8179,
8378,
33232,
1428,
262,
1077,
5206,
7162,
284,
8308,
60248,
21074,
486,
2258,
543,
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_distinct() -> Result<()> {
use std::collections::HashSet;
let sc = CONTEXT.clone();
let rdd = sc.parallelize(vec![1, 2, 2, 2, 3, 3, 3, 4, 4, 5], 3);
assert_eq!(rdd.distinct().collect()?.len(), 5);
assert_eq!(
rdd.distinct()
.collect()?
.into_it... | rust_cleaned_test_functions.jsonl/27945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 593
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16031,
7800,
368,
1464,
5714,
71698,
341,
262,
990,
1460,
486,
51137,
486,
44601,
280,
262,
1077,
1136,
284,
87336,
15997,
543,
262,
1077,
435,
631,
284,
1136,
71457,
551,
25592,
20703,
16,
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... | 8 |
#[test]
fn test_nlhdr_builder() {
let nl1 = NlmsghdrBuilder::new(Nlmsg::Noop, NlEmpty).build();
let nl2 = Nlmsghdr::new(None, Nlmsg::Noop, Vec::new(), None, None, NlEmpty);
assert_eq!(nl1, nl2);
let nl1 = NlmsghdrBuilder::new(Nlmsg::Noop, NlEmpty)
.nl_len(10)
... | rust_cleaned_test_functions.jsonl/122851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 461
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81052,
28785,
28532,
368,
341,
286,
1077,
20216,
16,
284,
451,
75,
1011,
866,
3612,
3297,
486,
931,
8204,
75,
3236,
486,
2753,
453,
11,
451,
75,
3522,
568,
5834,
543,
286,
1077,
20216,
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,
1... | 1 |
#[test]
fn test_kms_backlightlike() {
let pt = Vec::from_hex("25431587e9ecausetfc7c37f8d6d52a9bc3310651d46fb0e3bad2726c8f2db653749")
.unwrap();
let ct = Vec::from_hex("84e5f23f95648fa247cb28eef53abec947dbf05ac953734618111583840bd980")
.unwrap();
let key =... | rust_cleaned_test_functions.jsonl/103536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
1011,
3895,
4145,
4803,
368,
341,
1789,
286,
1077,
10817,
284,
11312,
486,
1499,
32655,
445,
17,
20,
19,
18,
16,
20,
23,
22,
68,
24,
757,
11855,
295,
8316,
22,
66,
18,
22,
69,
23,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submit_transaction() {
let mock_db = create_empty_mock_db();
let (client, _server) = create_client_and_server(mock_db, true);
let signed_transaction = generate_signed_transaction();
// Ensure transaction submitted and validated successfully
let result = c... | rust_cleaned_test_functions.jsonl/923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31674,
28884,
368,
341,
286,
1077,
7860,
8685,
284,
1855,
15124,
34134,
8685,
543,
286,
1077,
320,
2972,
11,
716,
4030,
8,
284,
1855,
8179,
8378,
12015,
30389,
8685,
11,
830,
317,
286,
1077,
849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multi_regex_with_prefix() {
let segments = PathParser::new(r"/first<id>/prefix<abc:/\d+/>").parse().unwrap();
assert_eq!(
format!("{:?}", segments),
r#"[CombPart([ConstPart("first"), NamedPart("id")]), CombPart([ConstPart("prefix"), RegexPart { name:... | rust_cleaned_test_functions.jsonl/63593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25133,
41832,
6615,
13974,
368,
341,
286,
1077,
20632,
284,
7933,
6570,
486,
931,
2601,
3115,
3896,
27,
307,
18105,
11849,
27,
13683,
14375,
59,
67,
10,
9685,
1827,
6400,
1005,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_inner() {
let vec = SmallVec::<[u8; 2]>::from_iter(0..2);
assert_eq!(vec.into_inner(), Ok([0, 1]));
let vec = SmallVec::<[u8; 2]>::from_iter(0..1);
assert_eq!(vec.clone().into_inner(), Err(vec));
let vec = SmallVec::<[u8; 2]>::from_iter(0..3);
... | rust_cleaned_test_functions.jsonl/88171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
34345,
368,
341,
286,
1077,
7486,
284,
14994,
10050,
27638,
58,
84,
23,
26,
220,
17,
60,
6831,
1499,
11723,
7,
15,
496,
17,
317,
286,
2060,
10714,
10297,
4083,
39860,
34345,
1507,
7622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_year() {
assert_eq!(is_valid_year(1972), true);
assert_eq!(FinancialPeriod::Year { year: 1972 }.is_valid(), true);
assert_eq!(is_valid_year(1492), false);
assert_eq!(FinancialPeriod::Year { year: 1492 }.is_valid(), false);
} | rust_cleaned_test_functions.jsonl/21177 | {
"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,
6892,
8337,
14645,
368,
341,
286,
2060,
10714,
10297,
285,
8337,
14645,
7,
16,
24,
22,
17,
701,
830,
317,
286,
2060,
10714,
10297,
56230,
23750,
486,
9490,
314,
1042,
25,
220,
16,
24,
22,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_lifetimes_function() {
check(
r#"
trait Foo<'a> {}
impl<'a> Foo<'a> for &'a () {}
fn foo<'a, 'b: 'a>(x: &'a<|> ()) -> &'a () where &'a (): Foo<'a> {
fn bar<'a>(_: &'a ()) {}
x
}
"#,
expect![[r#"
'a LifetimeParam FileId(0) 55..57 55..57... | rust_cleaned_test_functions.jsonl/47790 | {
"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,
21814,
907,
333,
6889,
9174,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
29432,
33428,
18291,
64,
29,
5613,
6383,
18291,
64,
29,
33428,
18291,
64,
29,
369,
30136,
64,
1719,
5613,
8822,
15229,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transfer() {
let TestValidator {
server,
leader_data,
alice: mint_keypair,
ledger_path,
..
} = TestValidator::run_with_options(TestValidatorOptions {
fees: 1,
bootstrap_validator_lamports: 42_000,
});
let (sender, receiver)... | rust_cleaned_test_functions.jsonl/17684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2936
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
368,
341,
262,
1077,
3393,
14256,
341,
286,
3538,
345,
286,
7653,
1769,
345,
286,
70433,
25,
28337,
3097,
12670,
345,
286,
46933,
2638,
345,
286,
54538,
262,
335,
284,
3393,
14256,
486,
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_nesting() -> Result<(), Error> {
let kp = SampiKeyPair::new();
let s_1 = kp
.new_sampi()
.build(vec![SampiData::Bytes(vec![1, 2, 3])])?;
let s_2 = kp
.new_sampi()
.build(vec![SampiData::Bytes(s_1.to_bytes())])?;
if let Some(SampiData::Bytes(bytes))... | rust_cleaned_test_functions.jsonl/67868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
59855,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
60319,
284,
90174,
72,
1592,
12443,
486,
931,
543,
262,
1077,
274,
62,
16,
284,
60319,
198,
286,
659,
931,
643,
1121,
72,
741,
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... | 5 |
#[test]
fn test_datetime_string() {
let s = make();
// JSON
let date: String = s.get("json_datetime").unwrap();
assert_eq!(&date, "2017-05-10T02:14:53Z");
// TOML
let date: String = s.get("toml_datetime").unwrap();
assert_eq!(&date, "2017-05-11T14:55:15Z");
// YAML
let d... | rust_cleaned_test_functions.jsonl/111946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
3904,
368,
341,
262,
1077,
274,
284,
1281,
1428,
262,
442,
4718,
198,
262,
1077,
2400,
25,
923,
284,
274,
670,
445,
2236,
28943,
1827,
15454,
1428,
262,
2060,
10714,
0,
2099,
1028,
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_from_i32_with_invalid_i32_returns_error() {
assert_eq!(Icon::from_i32(-1), Err(IconError::InvalidIconId));
assert_eq!(Icon::from_i32(69), Err(IconError::InvalidIconId));
} | rust_cleaned_test_functions.jsonl/33745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
5318,
18,
17,
6615,
31433,
5318,
18,
17,
58900,
4096,
368,
341,
286,
2060,
10714,
10297,
4395,
486,
1499,
5318,
18,
17,
4080,
16,
701,
15495,
7,
4395,
1454,
486,
7928,
4395,
764,
1106,
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_fasta_to_findlist() {
let fasta_eg = ">Rosalind_42\nTACCGCCATTACGGC\n>Rosalind_924\nGGTGAAAGATCCGCATTAG\n";
let fasta = read_fasta(io::Cursor::new(fasta_eg)).unwrap();
let findlist = fasta_to_findlist(&fasta, 3);
assert_eq!(findlist[0].prefix, "GGT");
assert_eq!(findlist[0].... | rust_cleaned_test_functions.jsonl/61053 | {
"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,
761,
14300,
2346,
21814,
1607,
368,
341,
262,
1077,
85249,
90209,
284,
28957,
49,
32556,
484,
62,
19,
17,
1699,
51,
1706,
8798,
3706,
21614,
1706,
22254,
34,
1699,
43960,
32556,
484,
62,
24,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_none_when_disabled() -> io::Result<()> {
let dir = tempfile::tempdir()?;
let filename = dir.path().join("config");
let mut file = File::create(&filename)?;
file.write_all(
b"
apiVersion: v1
clusters: []
contexts:
- context:
cluster: test_clus... | rust_cleaned_test_functions.jsonl/41172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31488,
47636,
51401,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5419,
284,
54819,
486,
3888,
3741,
368,
69493,
286,
1077,
3899,
284,
5419,
3875,
1005,
5987,
445,
1676,
3071,
286,
1077,
520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_send_confirmation_by_initiator() {
let mut testkit = testkit_with_supervisor(4);
let initiator_id = testkit.network().us().validator_id().unwrap();
let consensus_config = consensus_config_propose_first_variant(&testkit);
let config_proposal = ConfigProposeBuilder::new(CFG_CHANGE... | rust_cleaned_test_functions.jsonl/93833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
37681,
3710,
6137,
36122,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
1273,
8226,
6615,
23723,
31396,
7,
19,
317,
262,
1077,
98040,
842,
284,
1273,
8226,
20573,
1005,
355,
1005,
16112,
842,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commitment_revoked_fail_backward_exhaustive_a() {
do_test_commitment_revoked_fail_backward_exhaustive(false, true, false);
do_test_commitment_revoked_fail_backward_exhaustive(true, true, false);
do_test_commitment_revoked_fail_backward_exhaustive(false, false, false);
do_test_commitment_revo... | rust_cleaned_test_functions.jsonl/16882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
478,
38082,
10823,
22121,
70477,
2702,
15074,
533,
4306,
368,
341,
19935,
4452,
36346,
478,
38082,
10823,
22121,
70477,
2702,
15074,
533,
3576,
11,
830,
11,
895,
317,
19935,
4452,
36346,
478,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_scheme() {
let mut uri = vec![];
uri.extend(vec![b'a'; 256]);
uri.extend(b"://localhost/");
let uri = String::from_utf8(uri).unwrap();
let res: Result<Uri, InvalidUri> = uri.parse();
assert_eq!(res.unwrap_err().0, ErrorKind::SchemeTooLong);
} | rust_cleaned_test_functions.jsonl/29066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
53293,
368,
341,
262,
1077,
5206,
13071,
284,
7486,
0,
15078,
262,
13071,
15831,
25592,
20703,
65,
25184,
6967,
220,
17,
20,
21,
2558,
262,
13071,
15831,
1883,
788,
322,
8301,
14,
3071,
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_no_insert_but_modify_slot_meta() {
// This tests correctness of the SlotMeta in various cases in which a shred
// that gets filtered out by checks
let (shreds0, _) = make_slot_entries(0, 0, 200);
let blocktree_path = get_tmp_ledger_path!();
{
l... | rust_cleaned_test_functions.jsonl/116903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
17678,
86874,
57725,
27563,
13381,
368,
341,
286,
442,
1096,
7032,
57323,
315,
279,
31316,
12175,
304,
5257,
5048,
304,
892,
264,
97762,
198,
286,
442,
429,
5221,
18293,
700,
553,
12341,
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_name() {
let label = PayloadType::Keyword(vec!["Hello".to_owned()]);
let label_json = serde_json::to_string(&label).unwrap();
println!("{}", label_json);
} | rust_cleaned_test_functions.jsonl/95105 | {
"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,
1269,
368,
341,
286,
1077,
2383,
284,
52916,
929,
486,
34481,
25592,
0,
1183,
9707,
3263,
983,
51973,
57887,
286,
1077,
2383,
9455,
284,
61570,
9455,
486,
983,
3904,
2099,
1502,
568,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unsupported_operator() {
let res = df_to_op(datafusion::logical_plan::Operator::Like);
assert_contains!(res.unwrap_err().to_string(), "unsupported operator:");
} | rust_cleaned_test_functions.jsonl/106786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
18216,
40594,
368,
341,
286,
1077,
592,
284,
6764,
2346,
10287,
2592,
54565,
486,
30256,
26564,
486,
18461,
486,
12949,
317,
286,
2060,
63598,
10297,
416,
55395,
9266,
1005,
983,
3904,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_call_init_with_false() {
let init = Init::new();
assert!(init.call_init(|| { false }).is_ok());
assert!(init.state.load(Ordering::Relaxed) == Init::UNINITIALIZED);
} | rust_cleaned_test_functions.jsonl/74893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
6137,
6615,
36015,
368,
341,
286,
1077,
2930,
284,
15690,
486,
931,
543,
286,
2060,
10297,
2327,
8524,
6137,
79453,
314,
895,
8533,
285,
19817,
1423,
286,
2060,
10297,
2327,
3467,
5104,
396... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_key_restore() {
let network = Testnet;
let key_generate_cmd = KeySubCommand::Restore {
mnemonic: "payment battle unit sword token broccoli era violin purse trip blood hire"
.to_string(),
password: Some("test123".to_string()),
};
... | rust_cleaned_test_functions.jsonl/53345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
62677,
368,
341,
286,
1077,
3922,
284,
3393,
4711,
280,
286,
1077,
1376,
48851,
11684,
284,
5309,
3136,
4062,
486,
56284,
341,
310,
86801,
25,
330,
13755,
8049,
4982,
20214,
3950,
78176,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_output_success_json() {
let program = parse_str(
r#".infer mortal(string).
.output(mortal, "file-name", "json")."#,
)
.unwrap()
.into_parsed();
let relation = program
.intensional()
.get(&program.predicates().fetch("mortal").unwrap())
.unwrap(... | rust_cleaned_test_functions.jsonl/52306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
18632,
9455,
368,
341,
262,
1077,
2025,
284,
4715,
2895,
1006,
286,
435,
2,
3263,
89559,
48872,
3609,
4292,
13413,
1255,
33372,
11,
330,
1192,
11494,
497,
330,
2236,
1827,
57676,
345,
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_quick_start() {
use intervalset::IntervalSet;
use mpfr::Mpfr;
use std::str::FromStr;
let x = IntervalSet::<Mpfr>::from_str("{0; <1, 2>}").unwrap();
let y = IntervalSet::<Mpfr>::singleton(Mpfr::from(3.0));
assert_eq!("{3; <4, 5>}", format!("{}", x ... | rust_cleaned_test_functions.jsonl/7381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82094,
4906,
368,
341,
286,
990,
9873,
746,
486,
10256,
1649,
280,
286,
990,
82214,
486,
72150,
1626,
280,
286,
990,
1460,
486,
495,
486,
3830,
2580,
401,
286,
1077,
856,
284,
40584,
1649,
27638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_info_score_mate_in_three() {
let attributes: Vec<UciInfoAttribute> = vec![
UciInfoAttribute::Score {
cp: None,
mate: Some(-3),
upper_bound: None,
lower_bound: None,
}
];
let... | rust_cleaned_test_functions.jsonl/19060 | {
"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,
88686,
3109,
10405,
717,
349,
1243,
50016,
368,
341,
286,
1077,
8201,
25,
11312,
36397,
5855,
1731,
3907,
29,
284,
7486,
90515,
310,
547,
5855,
1731,
3907,
486,
10570,
341,
394,
12490,
25,
2240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assoc_propanol() {
let parameters = propanol();
let contrib = Association {
parameters: Rc::new(parameters),
};
let temperature = 300.0;
let volume = METER
.powi(3)
.to_reduced(EosUnit::reference_volume())
.u... | rust_cleaned_test_functions.jsonl/134334 | {
"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,
18891,
2540,
848,
337,
368,
341,
286,
1077,
5029,
284,
462,
848,
337,
543,
286,
1077,
5919,
284,
10024,
341,
310,
5029,
25,
81463,
486,
931,
37959,
1326,
286,
2605,
286,
1077,
9315,
284,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_powf() {
assert_eq!(
Vec3::new(2.0, 4.0, 8.0).powf(2.0),
Vec3::new(4.0, 16.0, 64.0)
);
} | rust_cleaned_test_functions.jsonl/75067 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56183,
69,
368,
341,
262,
2060,
10714,
33673,
286,
11312,
18,
486,
931,
7,
17,
13,
15,
11,
220,
19,
13,
15,
11,
220,
23,
13,
15,
568,
21743,
69,
7,
17,
13,
15,
1326,
286,
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_block_store_restart() {
// Start storage service
let (config, _handle, db) = start_storage_service();
let execution_correctness_manager = ExecutionCorrectnessManager::new(&config);
{
let (initial_data, qc) = get_initial_data_and_qc(&*db);
let mut inserter = buil... | rust_cleaned_test_functions.jsonl/120656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1011
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
14809,
69392,
368,
341,
262,
442,
5145,
5819,
2473,
198,
262,
1077,
320,
1676,
11,
716,
8192,
11,
2927,
8,
284,
1191,
23310,
12267,
1428,
262,
1077,
11320,
31550,
2090,
12144,
284,
30928,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_eq() {
cmp_i64!(
eq,
eq_dyn,
vec![8, 8, 8, 8, 8, 8, 8, 8, 8, 8],
vec![6, 7, 8, 9, 10, 6, 7, 8, 9, 10],
vec![false, false, true, false, false, false, false, true, false, false]
);
} | rust_cleaned_test_functions.jsonl/45786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
10714,
368,
341,
286,
26089,
5318,
21,
19,
33673,
310,
8939,
345,
310,
8939,
69213,
345,
310,
7486,
20703,
23,
11,
220,
23,
11,
220,
23,
11,
220,
23,
11,
220,
23,
11,
220,
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... | 1 |
#[test]
fn test_import() {
run_test(|input_epochs| {
timely::execute(timely::Configuration::Process(4), move |worker| {
let ref input_epochs = input_epochs;
let index = worker.index();
let peers = worker.peers();
let (mut input, mut trace) = worker.da... | rust_cleaned_test_functions.jsonl/130259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
368,
341,
262,
1598,
4452,
22428,
1355,
44127,
91,
341,
286,
31000,
486,
10257,
1155,
318,
974,
486,
7688,
486,
7423,
7,
19,
701,
3271,
760,
21462,
91,
341,
310,
1077,
2053,
1946,
44127,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decimal_value() {
use std::str::FromStr;
let num = "2.02";
let val = Decimal::from_str(num).unwrap();
let v: Value = val.into();
let out: Decimal = v.unwrap();
assert_eq!(out.to_string(), num);
} | rust_cleaned_test_functions.jsonl/12496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
3142,
368,
341,
286,
990,
1460,
486,
495,
486,
3830,
2580,
401,
286,
1077,
1629,
284,
330,
17,
13,
15,
17,
876,
286,
1077,
1044,
284,
26728,
486,
1499,
2895,
8068,
568,
15454,
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_21() {
assert_eq!(
Token::Quoted("'a\\nb'".to_owned()).unquote().unwrap(),
"a\\nb".to_owned()
);
} | rust_cleaned_test_functions.jsonl/75885 | {
"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,
62,
17,
16,
368,
341,
286,
2060,
10714,
33673,
310,
9660,
486,
2183,
9253,
45456,
64,
3422,
18080,
6,
3263,
983,
51973,
6011,
359,
2949,
1005,
15454,
3148,
310,
330,
64,
3422,
18080,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_add_existing_node() {
let env = init_cluster(1);
for _ in 0..100 {
Admin::to(0, env.clone()).add_server(0).unwrap();
}
ensure_membership(Duration::from_secs(5), vec![0], vec![0], env.clone())
} | rust_cleaned_test_functions.jsonl/62205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
62630,
5084,
368,
341,
262,
1077,
6105,
284,
2930,
28441,
7,
16,
317,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
341,
286,
7582,
486,
983,
7,
15,
11,
6105,
15997,
6011,
718,
12015,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_negative_amount() {
let mut world = World::default();
world.insert_resource(TestAmount { amount: -2.0 });
let mut stage = SystemStage::parallel();
stage.add_system(distribute_to_storage_test_system.system());
world.spawn().insert(StorageConsolidator::default());
stage.... | rust_cleaned_test_functions.jsonl/112997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53865,
13471,
368,
341,
262,
1077,
5206,
1879,
284,
4337,
486,
2258,
543,
262,
1879,
7030,
17962,
31159,
10093,
314,
3311,
25,
481,
17,
13,
15,
3011,
262,
1077,
5206,
6430,
284,
739,
19398,
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_alu64_arithmetic() {
test_interpreter_and_jit_asm!(
"
mov r0, 0
mov r1, 1
mov r2, 2
mov r3, 3
mov r4, 4
mov r5, 5
mov r6, 6
mov r7, 7
mov r8, 8
mov r9, 9
add r0, 23
add r0, r7
sub ... | rust_cleaned_test_functions.jsonl/58931 | {
"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,
8418,
84,
21,
19,
25842,
25922,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
220,
15,
198,
286,
1974,
435,
16,
11,
220,
16,
198,
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_get_primitive_cmac_with_invalid_input() {
tink_mac::init();
let km = tink_core::registry::get_key_manager(tink_tests::AES_CMAC_TYPE_URL)
.expect("AES CMAC key manager not found");
// invalid key
let test_keys = gen_invalid_cmac_keys();
for (i, serialized_key) in test_... | rust_cleaned_test_functions.jsonl/37671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
84087,
666,
11948,
6615,
31433,
5898,
368,
341,
262,
90584,
22802,
486,
2327,
543,
262,
1077,
13136,
284,
90584,
15467,
486,
29172,
486,
455,
3097,
12144,
1155,
766,
32509,
486,
69168,
920,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transpile_inlie_style() {
let source = r#"
export default function Index() {
const [color, setColor] = useState('white');
return (
<>
<style>{`
:root {
--color: ${color};
}
`}</style>
... | rust_cleaned_test_functions.jsonl/34198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 514
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
12192,
1243,
11567,
15117,
368,
341,
262,
1077,
2530,
284,
435,
2,
698,
414,
7485,
1638,
729,
8008,
368,
341,
286,
733,
508,
3423,
11,
75968,
60,
284,
8102,
492,
5782,
3755,
286,
470,
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... | 1 |
#[test]
fn test_new_not_set_value() {
let not_set_value = Value::new_not_set();
assert_eq!(not_set_value.body, vec![]);
assert_eq!(not_set_value.value_type, ValueType::NotSet);
} | rust_cleaned_test_functions.jsonl/41644 | {
"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,
5921,
7913,
2602,
3142,
368,
341,
286,
1077,
537,
2602,
3142,
284,
5162,
486,
931,
7913,
2602,
543,
286,
2060,
10714,
10297,
1921,
2602,
3142,
5079,
11,
7486,
0,
56703,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_did_exchange_handle_other_messages_from_null_state() {
let _setup = SetupIndyMocks::init();
let mut did_exchange_sm = inviter_sm();
did_exchange_sm = did_exchange_sm.handle_ack(_ack()).unwrap();
assert_match!(InviterFullState::Nul... | rust_cleaned_test_functions.jsonl/29135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
307,
59212,
10630,
30456,
23428,
5673,
15162,
4387,
368,
341,
394,
1077,
716,
15188,
284,
18626,
1425,
88,
72577,
486,
2327,
1428,
394,
1077,
5206,
1521,
59212,
15874,
284,
1529,
2015,
15874,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_neighbor_iterator_upper_left_corner() {
let iter = NeighborIterator::new((0, 0), (2, 2));
let neighbors = HashSet::<Pos>::from_iter(iter);
assert_eq!(
neighbors,
HashSet::from_iter(vec![(0, 1), (1, 0)].into_iter())
);
} | rust_cleaned_test_functions.jsonl/110253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71888,
13491,
34445,
9579,
66884,
368,
341,
286,
1077,
5367,
284,
97163,
11951,
486,
931,
1188,
15,
11,
220,
15,
701,
320,
17,
11,
220,
17,
1106,
286,
1077,
18709,
284,
18931,
27638,
4859,
6831,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.