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_jpg() {
let info = Infer::new();
assert_eq!(infer::Type {
mime: String::from("image/jpeg"),
ext: String::from("jpg"),
},
info.get(&fs::read("testdata/sample.jpg").unwrap()).unwrap());
} | rust_cleaned_test_functions.jsonl/110129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5374,
3517,
368,
341,
262,
1077,
3546,
284,
62658,
486,
931,
1428,
262,
2060,
10714,
10297,
89559,
486,
929,
314,
715,
286,
45270,
25,
923,
486,
1499,
445,
1805,
51818,
3975,
715,
286,
1303,
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_primitive_array_divide_scalar_with_nulls() {
let a = Int32Array::from(vec![Some(15), None, Some(8), Some(1), Some(9), None]);
let b = 3;
let c = divide_scalar(&a, b).unwrap();
let expected =
Int32Array::from(vec![Some(5), None, Some(2), Some(0), Some(3... | rust_cleaned_test_functions.jsonl/120276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
16237,
577,
41652,
6615,
15162,
82,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
16,
20,
701,
2240,
11,
4329,
7,
23,
701,
4329,
7,
16,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_more_than_one_batch() {
// Construct column schema
let message_type = "
message test_schema {
REPEATED INT32 leaf;
}
";
let desc = parse_message_type(message_type)
.map(|t| SchemaDescriptor::new(Arc::new(t)))
... | rust_cleaned_test_functions.jsonl/52890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 681
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
36664,
51613,
11667,
14534,
368,
341,
286,
442,
18678,
3250,
10802,
198,
286,
1077,
1943,
1819,
284,
6228,
286,
1943,
1273,
25371,
341,
688,
3596,
1740,
9005,
220,
9221,
18,
17,
15933,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_device_instance_name() {
let instance_name1: String = "/dev/video0".to_string();
let instance_name2: String = "10.1.2.3".to_string();
assert_eq!(
"usb-camera--dev-video0",
get_device_instance_name(&instance_name1, &"usb-camera".to_string())
... | rust_cleaned_test_functions.jsonl/2726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9204,
11904,
1269,
368,
341,
286,
1077,
2867,
1269,
16,
25,
923,
284,
3521,
3583,
41303,
15,
3263,
983,
3904,
543,
286,
1077,
2867,
1269,
17,
25,
923,
284,
330,
16,
15,
13,
16,
13,
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_path_join() -> Result<(), Error> {
let a = "../../../azure-rest-api-specs/specification/vmware/resource-manager/Microsoft.AVS/stable/2020-03-20/vmware.json";
let b = "../../../../../common-types/resource-management/v1/types.json";
let c = join(a, b)?;
assert_eq!(
... | rust_cleaned_test_functions.jsonl/75557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
31017,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
264,
284,
30630,
39495,
76233,
23904,
57794,
82,
45389,
2404,
5457,
76,
1664,
53100,
44896,
10270,
3929,
875,
26050,
14272,
480,
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_t108() {
init();
let result = t108(IMEI.as_bytes());
println!("{}", result.len());
println!("{:?}", result);
} | rust_cleaned_test_functions.jsonl/104727 | {
"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,
528,
16,
15,
23,
368,
341,
286,
2930,
543,
286,
1077,
1102,
284,
259,
16,
15,
23,
7,
5660,
40,
5357,
12524,
1423,
286,
13751,
79878,
1102,
19406,
1423,
286,
13751,
88928,
25,
52652,
1102,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_action() {
compare(
r#"
grammar;
extern { enum Tok { "+" => .., "foo" => .. } }
X = {
Y,
<l:X> "+" <r:Y> => l + r
};
Y: i32 = "foo" => 22;
"#,
vec![("X", "i32"), ("Y", "i32")],
)
} | rust_cleaned_test_functions.jsonl/50473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7931,
368,
341,
262,
9429,
1006,
286,
435,
2,
698,
41094,
280,
262,
15637,
314,
7618,
21447,
314,
59498,
589,
5241,
11,
330,
7975,
1,
589,
5241,
335,
555,
262,
1599,
284,
341,
286,
809,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_user_ip_from_client_ip_without_auto() {
let mut event = Annotated::new(Event {
platform: Annotated::new("javascript".to_owned()),
..Default::default()
});
let mut config = StoreConfig::default();
config.client_ip = Some(IpAddr::parse("2.125.160.216").unwrap());
... | rust_cleaned_test_functions.jsonl/14084 | {
"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,
3317,
10385,
5673,
8179,
10385,
39904,
27740,
368,
341,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
341,
286,
5339,
25,
1527,
87029,
486,
931,
445,
14073,
3263,
983,
51973,
14702,
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_search_paths_tracking_hash_different_order() {
let mut v1 = Options::default();
let mut v2 = Options::default();
let mut v3 = Options::default();
let mut v4 = Options::default();
// Reference
v1.search_paths
.push(SearchPath::from_cli_... | rust_cleaned_test_functions.jsonl/44823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1464
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
24152,
66105,
8950,
82741,
7869,
368,
341,
286,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
286,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
543,
286,
1077,
5206,
348,
18,
284,
14566... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_realm_into_header_value() {
let challenge = Basic {
realm: Some("Restricted area".into()),
};
let value = challenge.try_into();
assert!(value.is_ok());
let value = value.unwrap();
assert_eq!(value, "Basic realm=\"Restricted area\"... | rust_cleaned_test_functions.jsonl/52033 | {
"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,
6615,
1288,
7673,
45514,
8757,
3142,
368,
341,
286,
1077,
8645,
284,
14625,
341,
310,
21889,
25,
4329,
445,
86405,
3082,
3263,
18122,
14702,
286,
3634,
286,
1077,
897,
284,
8645,
48779,
45514,
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_explorer_block_iter() {
let mut blockchain = create_blockchain();
let mut tx_gen = tx_generator();
let txs = tx_gen.by_ref();
create_block(&mut blockchain, vec![]);
create_block(&mut blockchain, txs.take(2).collect());
create_block(&mut blockchain, vec![]);
create... | rust_cleaned_test_functions.jsonl/70355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1664
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
79825,
7113,
11723,
368,
341,
262,
1077,
5206,
17944,
284,
1855,
7113,
8819,
543,
262,
1077,
5206,
9854,
16322,
284,
9854,
25813,
543,
262,
1077,
9854,
82,
284,
9854,
16322,
19007,
7793,
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... | 2 |
#[test]
fn test_enforce_limit_sessions() {
let mut envelope = envelope![Session, Session, Event];
let mut mock = MockLimiter::default().deny(DataCategory::Session);
let (_, limits) = EnvelopeLimiter::new(|s, q| mock.check(s, q))
.enforce(&mut envelope, &scoping())
... | rust_cleaned_test_functions.jsonl/101168 | {
"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,
6205,
8833,
14763,
71385,
368,
341,
286,
1077,
5206,
34398,
284,
34398,
20703,
5283,
11,
9164,
11,
3665,
4821,
286,
1077,
5206,
7860,
284,
14563,
43,
17700,
486,
2258,
1005,
89963,
18959,
6746,
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_get_filter_params_self_without_view_as() -> Result<(), FieldError> {
let scope_and_user = ScopeAndUser {
user_id: String::from("user1"),
scope: String::from("staff"),
};
let params = get_profile_params(None, &scope_and_user, None)?;
assert!... | rust_cleaned_test_functions.jsonl/33802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8727,
6745,
25637,
39904,
7122,
11898,
368,
1464,
5714,
68843,
8601,
1454,
29,
341,
286,
1077,
6891,
8378,
3317,
284,
34920,
3036,
1474,
341,
310,
1196,
842,
25,
923,
486,
1499,
445,
872,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_direction_vector() {
assert_eq!(
get_direction_vector(point![0, 0], point![-2, 2]),
vector![-1, 1]
);
assert_eq!(
get_direction_vector(point![0, 0], point![-2, 0]),
vector![-1, 0]
);
assert_eq!(
g... | rust_cleaned_test_functions.jsonl/82524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 693
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25438,
12247,
368,
341,
286,
2060,
10714,
33673,
310,
633,
25438,
12247,
20235,
20703,
15,
11,
220,
15,
1125,
1459,
0,
7609,
17,
11,
220,
17,
17036,
310,
4621,
0,
7609,
16,
11,
220,
16,
921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_paths() {
let empty: &[u8] = [];
t!(v: Path::new(empty), b!("."));
t!(v: Path::new(b!("\\")), b!("\\"));
t!(v: Path::new(b!("a\\b\\c")), b!("a\\b\\c"));
t!(s: Path::new(""), ".");
t!(s: Path::new("\\"), "\\");
t!(s: Path::new("hi"), "hi");... | rust_cleaned_test_functions.jsonl/54447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24152,
368,
341,
286,
1077,
4287,
25,
44590,
84,
23,
60,
284,
5907,
286,
259,
10297,
85,
25,
7933,
486,
931,
24216,
701,
293,
0,
5680,
4010,
286,
259,
10297,
85,
25,
7933,
486,
931,
1883,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_day03() {
let lines = vec![
"00100".to_string(),
"11110".to_string(),
"10110".to_string(),
"10111".to_string(),
"10101".to_string(),
"01111".to_string(),
"00111".to_string(),
"11100".to_string... | rust_cleaned_test_functions.jsonl/5225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16763,
15,
18,
368,
341,
286,
1077,
5128,
284,
7486,
90515,
310,
330,
15,
15,
16,
15,
15,
3263,
983,
3904,
3148,
310,
330,
16,
16,
16,
16,
15,
3263,
983,
3904,
3148,
310,
330,
16,
15,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_or_with_one_gt_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let query = Operator::Or(
vec![
Operator::Gt(
TagName::PlainTagName(name1.clone()),
TargetValue::Unencrypted(... | rust_cleaned_test_functions.jsonl/11910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
6615,
11667,
37479,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
3239,
284,
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_parse_dependency_exists() {
let input = r#"exists -> rule , contains"#.chars().collect::<Vec<_>>();
let r = dependency_exists().parse(&input).unwrap();
assert_eq!(r, DependencyCheck::Exists("rule".into()))
} | rust_cleaned_test_functions.jsonl/49993 | {
"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,
21039,
62387,
9766,
368,
341,
286,
1077,
1946,
284,
435,
55543,
16304,
257,
1464,
256,
5912,
256,
1154,
5610,
57676,
13,
19255,
1005,
17384,
27638,
10050,
32399,
37038,
286,
1077,
435,
284,
24036,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_status_cache_ancestors() {
solana_logger::setup();
let (genesis_config, _mint_keypair) = create_genesis_config(500);
let parent = Arc::new(Bank::new(&genesis_config));
let bank1 = Arc::new(new_from_parent(&parent));
let mut bank = bank1;
for _ in 0... | rust_cleaned_test_functions.jsonl/2607 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
11529,
62,
681,
267,
1087,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
320,
77894,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_enrich_rank_0_tensors_corrupted_with_long_data() {
let tensors = vec![
pb::TensorProto {
dtype: pb::DataType::DtFloat.into(),
tensor_shape: Some(tensor_shape(&[])),
float_val: vec![0.125, 9.99],
... | rust_cleaned_test_functions.jsonl/6196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 680
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
13851,
20417,
62,
15,
91067,
14734,
85954,
6615,
17799,
1769,
368,
341,
310,
1077,
77087,
284,
7486,
90515,
394,
17310,
486,
25336,
31549,
341,
503,
13231,
25,
17310,
486,
22653,
486,
69079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parsing_proper_set_statement() {
let statement = get_statement!("SET MY_KEY MY_VALUE");
assert_eq!(
statement,
Statement {
stype: StatementType::Set,
key: Some("MY_KEY".to_owned()),
... | rust_cleaned_test_functions.jsonl/104589 | {
"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,
620,
28598,
2540,
712,
2602,
37404,
368,
341,
310,
1077,
5114,
284,
633,
37404,
17223,
5884,
18224,
6600,
18224,
7476,
797,
310,
2060,
10714,
33673,
394,
5114,
345,
394,
21756,
341,
503,
357,
499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_content_type_json() {
assert_eq!(
HeaderValue::from_static(CONTENT_TYPE_JSON_STR)
.to_str()
.unwrap(),
CONTENT_TYPE_JSON_STR
);
} | rust_cleaned_test_functions.jsonl/59747 | {
"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,
7495,
1819,
9455,
368,
341,
286,
2060,
10714,
33673,
310,
12104,
1130,
486,
1499,
25360,
98747,
1825,
4189,
25356,
7159,
340,
394,
659,
983,
2895,
741,
394,
659,
15454,
3148,
310,
35768,
4189,
253... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_short_unicode() {
let strs = vec![
("🦀", false),
("🌧☀️", false),
// str is "咬𓅈ꁈ:_", false),
];
for (s, is_heap) in strs {
let compact = CompactString::new(s);
assert_eq!(compact, s);
assert_eq!(s, compact);
assert_eq!(compac... | rust_cleaned_test_functions.jsonl/2781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
54662,
368,
341,
262,
1077,
57584,
284,
7486,
90515,
286,
3489,
147579,
497,
895,
1326,
286,
3489,
147919,
144668,
30543,
497,
895,
1326,
286,
442,
607,
374,
330,
105118,
150195,
230,
166,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enum() {
#[derive(Clone, Copy, PeekCopy, Poke)]
enum TestEnum {
NoArg,
OneArg(usize),
Args(usize, usize),
AnotherNoArg,
StructLike { x: usize, y: f32 },
}
assert_eq!(
TestEnum::max_size(),
<u8>::max_size() + 2 * <usize>::max... | rust_cleaned_test_functions.jsonl/24560 | {
"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,
31054,
368,
341,
262,
11506,
27098,
65297,
11,
14540,
11,
96587,
12106,
11,
97626,
5563,
262,
7618,
3393,
10766,
341,
286,
2308,
2735,
345,
286,
3776,
2735,
7,
51878,
1326,
286,
17693,
7,
51878,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fail_good_message() {
fn f() { panic!("an error message"); }
let desc = TestDescAndFn {
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
should_fail: ShouldFail::Yes(Some("error message"))
... | rust_cleaned_test_functions.jsonl/7111 | {
"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,
43378,
22121,
44781,
6462,
368,
341,
286,
5168,
282,
368,
314,
21975,
17223,
276,
1465,
1943,
5038,
456,
286,
1077,
6560,
284,
3393,
11065,
3036,
24911,
341,
310,
6560,
25,
3393,
11065,
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_query_matches_with_multiple_repetition_patterns_that_intersect_other_pattern() {
allocations::record(|| {
let language = get_language("javascript");
// matches: up to two for each pattern that begins with a comment.
let query = Query::new(
langua... | rust_cleaned_test_functions.jsonl/25162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 782
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
45233,
1288,
55767,
64923,
70197,
72747,
30456,
21260,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
3071,
1789,
286,
442,
9071,
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... | 2 |
#[test]
fn test_match_body_with_partial_json() {
let _m = mock("POST", "/")
.match_body(Matcher::PartialJson(json!({"hello":"world"})))
.create();
let (status, _, _) = request_with_body("POST /", "", r#"{"hello":"world", "foo": "bar"}"#);
assert_eq!("HTTP/1.1 200 OK\r\n", status);
} | rust_cleaned_test_functions.jsonl/82392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
14114,
6615,
52068,
9455,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
2946,
497,
3521,
1138,
286,
659,
6347,
14114,
3189,
28058,
486,
37314,
5014,
9304,
0,
16864,
14990,
3252,
14615,
9207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bpf_upgradeable_loader_set_buffer_authority_ix() {
let buffer_address = Pubkey::new_unique();
let current_authority_address = Pubkey::new_unique();
let new_authority_address = Pubkey::new_unique();
let instruction = bpf_loader_upgradeable::set_buffer_authori... | rust_cleaned_test_functions.jsonl/23419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 796
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
880,
15897,
67794,
480,
22139,
2602,
7776,
22938,
487,
62686,
368,
341,
286,
1077,
4147,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
1482,
22938,
487,
6744,
284,
22611,
792,
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_eof_after_as() {
let res = parse_sql_statements("SELECT foo AS");
assert_eq!(
ParserError::ParserError("Expected an identifier after AS, found: EOF".to_string()),
res.unwrap_err()
);
let res = parse_sql_statements("SELECT 1 FROM foo AS");
assert_eq!(
... | rust_cleaned_test_functions.jsonl/18294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90792,
19844,
11898,
368,
341,
262,
1077,
592,
284,
4715,
18063,
16271,
3723,
445,
4858,
15229,
5752,
797,
262,
2060,
10714,
33673,
286,
21102,
1454,
486,
6570,
1454,
445,
18896,
458,
12816,
1283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rooted_transaction() {
let slot = 2;
let entries = make_slot_entries_with_transactions(5);
let shreds = entries_to_test_shreds(entries.clone(), slot, slot - 1, true, 0);
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore:... | rust_cleaned_test_functions.jsonl/9564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
12993,
291,
28884,
368,
341,
286,
1077,
9446,
284,
220,
17,
280,
286,
1077,
10695,
284,
1281,
27563,
26092,
6615,
68182,
7,
20,
317,
286,
1077,
557,
53369,
284,
10695,
2346,
4452,
3712,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unary_minus_decimal() {
let test_cases = vec![
(None, None),
(Some(Decimal::zero()), Some(Decimal::zero())),
(
"0.123".parse::<Decimal>().ok(),
"-0.123".parse::<Decimal>().ok(),
),
(
... | rust_cleaned_test_functions.jsonl/29751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
658,
38457,
74429,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
1326,
310,
320,
8373,
7,
11269,
486,
14154,
11858,
4329,
7,
11269,
486,
14154,
73727,
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_enrich_invalid_empty_tensor() {
let v = EventValue::Summary(SummaryValue(Box::new(Value::Tensor(pb::TensorProto {
dtype: pb::DataType::DtString.into(),
tensor_shape: Some(tensor_shape(&[0, 3])), // bad rank
string_val: vec![],
... | rust_cleaned_test_functions.jsonl/6220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
13851,
31433,
15124,
23188,
368,
341,
310,
1077,
348,
284,
3665,
1130,
486,
19237,
3759,
372,
1534,
1130,
67758,
486,
931,
25346,
486,
25336,
76878,
486,
25336,
31549,
341,
394,
13231,
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... | 1 |
#[test]
fn test_connect_wpa3_no_wpa3_iface() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
let test_values = test_setup(&mut exec);
// By default IfaceManager has an iface but not one with WPA3.
let (mut iface_manager, mut _sme_stream) =... | rust_cleaned_test_functions.jsonl/71912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 606
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
1670,
6595,
18,
6536,
1670,
6595,
18,
67666,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_scope() {
let expected = "20150830/us-east-1/iam/aws4_request\n";
let scope = SigningScope {
time: parse_date_time("20150830T123600Z").unwrap(),
region: "us-east-1",
service: "iam",
};
assert_eq!(format!("{}\n", scope.t... | rust_cleaned_test_functions.jsonl/83739 | {
"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,
48851,
23199,
368,
341,
286,
1077,
3601,
284,
330,
17,
15,
16,
20,
15,
23,
18,
15,
62431,
39507,
12,
16,
14,
4932,
41273,
19,
7893,
1699,
876,
286,
1077,
6891,
284,
87424,
10803,
341,
310,
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_decode_ror_imm_w() {
assert_eq!(
decode_32(0xea4f74f4),
Instruction::ROR_imm {
params: Reg2ShiftNParams {
rd: Reg::R4,
rm: Reg::R4,
shift_n: 31,
setflags: SetFlags::False
}
}... | rust_cleaned_test_functions.jsonl/64858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
1710,
269,
71370,
1670,
368,
341,
14808,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
56570,
19,
69,
22,
19,
69,
19,
1326,
286,
29051,
486,
49,
868,
71370,
341,
310,
3628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_non_loader_key() {
let key0 = Pubkey::new_unique();
let key1 = Pubkey::new_unique();
let loader_key = Pubkey::new_unique();
let instructions = vec![
CompiledInstruction::new(1, &(), vec![0]),
CompiledInstruction::new(2, &(), vec![0, 1]),... | rust_cleaned_test_functions.jsonl/119822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
21637,
22139,
3097,
368,
341,
286,
1077,
1376,
15,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
1376,
16,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
16047,
3097,
284,
22611,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pass_input_method_parse() {
let correct_cases = vec![
("", <PassInputMethod as Default>::default()),
("stdin", PassInputMethod::Terminal),
("env", PassInputMethod::EnvVariable(None)),
(
"env:VAR",
PassInputMe... | rust_cleaned_test_functions.jsonl/69154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 476
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15464,
5898,
9032,
21039,
368,
341,
286,
1077,
4396,
41427,
284,
7486,
90515,
310,
3489,
497,
366,
12187,
2505,
3523,
438,
7899,
6831,
2258,
14702,
310,
3489,
51602,
497,
9970,
2505,
3523,
486,
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... | 2 |
#[test]
fn test_runnables_with_features() {
check(
r#"
//- /lib.rs crate:foo cfg:feature=foo,feature=bar
$0
#[test]
#[cfg(all(feature = "foo", feature = "bar"))]
fn test_foo1() {}
"#,
&[&TEST],
expect![[r#"
[
Runnable {
... | rust_cleaned_test_functions.jsonl/2493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
77,
4788,
6615,
14965,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
17717,
25,
7975,
13286,
25,
12753,
28,
7975,
11,
12753,
28,
2257,
198,
3,
15,
198,
13353,
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_woff2_transformed_glyf_table() {
let glyph = Glyph {
number_of_contours: 1,
bounding_box: BoundingBox {
x_min: 1761,
y_min: 565,
x_max: 2007,
y_max: 1032,
},
data: GlyphData::Simple(SimpleGlyph {
end_... | rust_cleaned_test_functions.jsonl/40128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 562
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
68585,
17,
18449,
291,
1889,
398,
69,
5237,
368,
341,
262,
1077,
32150,
284,
87413,
341,
286,
1372,
3575,
10260,
2471,
25,
220,
16,
345,
286,
30618,
10194,
25,
425,
57504,
341,
310,
856,
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_byte_array_new_with_error() {
use crate::exceptions::PyValueError;
let gil = Python::acquire_gil();
let py = gil.python();
let py_bytearray_result = PyByteArray::new_with(py, 10, |_b: &mut [u8]| {
Err(PyValueError::new_err("Hello Crustaceans!"))
... | rust_cleaned_test_functions.jsonl/60122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
3858,
5921,
6615,
4096,
368,
341,
286,
990,
17717,
486,
61752,
486,
13828,
1130,
1454,
280,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pull_response() {
let mut node_crds = Crds::default();
let mut node = CrdsGossipPull::default();
let peer_pubkey = solana_sdk::pubkey::new_rand();
let peer_entry = CrdsValue::new_unsigned(CrdsData::ContactInfo(
ContactInfo::new_localhost(&peer... | rust_cleaned_test_functions.jsonl/82285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
65693,
9655,
368,
341,
286,
1077,
5206,
2436,
32331,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
5206,
2436,
284,
4553,
5356,
38,
41473,
36068,
486,
2258,
1428,
286,
1077,
14397,
3401... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zeroed() {
const ZEROS_LEN: usize = 1024;
let mut buf = [0; ZEROS_LEN];
assert!(PreAccount::is_zeroed(&buf));
buf[0] = 1;
assert!(!PreAccount::is_zeroed(&buf));
let mut buf = [0; ZEROS_LEN - 1];
assert!(PreAccount::is_zeroed(&buf));
... | rust_cleaned_test_functions.jsonl/15690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
19359,
291,
368,
341,
286,
733,
1863,
640,
3126,
15536,
25,
22301,
284,
220,
16,
15,
17,
19,
280,
286,
1077,
5206,
6607,
284,
508,
15,
26,
1863,
640,
3126,
15536,
935,
286,
2060,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_rw_lock() {
let dbname = "target/tests/testindexrwlock";
let _ = Index::drop(dbname);
let index = Index::open(dbname, Some(OpenOptions::Create)).unwrap();
let index = Arc::new(MvccRwLock::new(index));
let index_write = index.clone();
let (... | rust_cleaned_test_functions.jsonl/15065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 721
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
49566,
9818,
368,
341,
286,
1077,
83492,
284,
330,
5657,
62468,
12697,
1252,
31768,
1023,
876,
286,
1077,
716,
284,
8008,
486,
6719,
9791,
606,
626,
286,
1077,
1922,
284,
8008,
486,
2508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_commit_style_raw_no_decoration() {
let config = integration_test_utils::make_config_from_args(&[
"--commit-style",
"raw",
"--commit-decoration-style",
"omit",
]);
let output = integration_test_utils::run_delta(GIT_DIFF_SINGL... | rust_cleaned_test_functions.jsonl/70054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
15117,
16067,
6536,
2259,
26452,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
9640,
310,
14482,
17413,
11297,
756,
310,
330,
1041,
756,
310,
14482,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_socket_addr() {
// V4.
let want_ext = SocketAddress(std::net::SocketAddr::V4(std::net::SocketAddrV4::new(
std::net::Ipv4Addr::new(1, 2, 3, 4),
5,
)));
let want_fidl = fidl::SocketAddress::Ipv4(fidl::Ipv4SocketAddress {
address: ... | rust_cleaned_test_functions.jsonl/56510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19555,
7387,
368,
341,
286,
442,
647,
19,
624,
286,
1077,
1366,
9927,
284,
20954,
4286,
5194,
486,
4711,
486,
10286,
13986,
486,
53,
19,
5194,
486,
4711,
486,
10286,
13986,
53,
19,
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... | 1 |
#[test]
fn test_value_arc() {
assert_ne!(crate::Type::INVALID, MySharedArc::static_type());
let b = MySharedArc::from_refcounted(std::sync::Arc::new(MySharedInner {
foo: String::from("abc"),
}));
let v = b.to_value();
let b2 = v.get::<MySharedArc>().unwrap();... | rust_cleaned_test_functions.jsonl/105011 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
62914,
368,
341,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
36809,
486,
1978,
1819,
5231,
286,
1077,
293,
284,
3017,
16997,
36809,
486,
1499,
7793,
1830,
291,
519... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_5() {
let key = "dea398b2d764bca68dfc023a9821939d389e38a072cf1b413bb1517c3fe83abe";
let nonce = "bb1cdf3a218abb1b0c01da64c24f59ee";
let expected_output =
"65a20993e8e69de41d38e94c0796cb7baccd6d80a6e4084e65d0d574fbcb7311";
hchac... | rust_cleaned_test_functions.jsonl/44667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
20,
368,
341,
310,
1077,
1376,
284,
330,
55088,
18,
24,
23,
65,
17,
67,
22,
21,
19,
65,
924,
21,
23,
2940,
66,
15,
17,
18,
64,
24,
23,
17,
16,
24,
18,
24,
67,
18,
23,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_1() {
let src_data = b"(test) a \"abc\"";
let expected_document = yass_document!(("test") "a": "\"abc\"");
let expected_positions = pos_array![(0, 7), (0, 9)];
let (result_doc, pos_map) = yass_parser::parse(yass_parser::ParserLimits::unlimited(), src_data).unwrap();
as... | rust_cleaned_test_functions.jsonl/126488 | {
"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,
3904,
62,
16,
368,
341,
262,
1077,
2286,
1769,
284,
293,
29209,
1944,
8,
264,
7245,
13683,
95349,
262,
1077,
3601,
26231,
284,
379,
395,
26231,
10297,
445,
1944,
899,
330,
64,
788,
15898,
13683,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_msg_append() {
setup_for_test();
let nm = |term, log_term, index, commit, ents: Option<Vec<(u64, u64)>>| {
let mut m = Message::new();
m.set_msg_type(MessageType::MsgAppend);
m.set_term(term);
m.set_log_term(log_term);
m.set_index(index);
... | rust_cleaned_test_functions.jsonl/107114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
6483,
26041,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
25723,
284,
760,
4991,
11,
1487,
17464,
11,
1922,
11,
5266,
11,
36852,
25,
6959,
50439,
28706,
84,
21,
19,
11,
575,
21,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_with_mixed_wave_signal() -> anyhow::Result<()> {
let mut detector = HannedFftDetector::default();
assert_hinted_detector_sine_waves(&mut detector, NoteName::A, vec![440., 523.25])?;
Ok(())
} | rust_cleaned_test_functions.jsonl/63238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
717,
3286,
60063,
21137,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1077,
5206,
31214,
284,
472,
7295,
37,
723,
31606,
486,
2258,
543,
286,
2060,
45825,
291,
71540,
643,
482,
1670,
4693,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invalid_to_tpml_digest_conversion() {
let pcr_selection_list_1 = PcrSelectionListBuilder::new()
.with_selection(
HashingAlgorithm::Sha256,
&[
PcrSlot::Slot0,
PcrSlot::Slot1,
PcrSlot::Slot2,
PcrSlo... | rust_cleaned_test_functions.jsonl/16366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 612
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
2346,
55191,
1014,
52994,
64132,
368,
341,
262,
1077,
281,
5082,
23672,
2019,
62,
16,
284,
393,
5082,
11177,
852,
3297,
486,
931,
741,
286,
659,
4197,
23672,
1006,
310,
6531,
287,
27847,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_case() {
let doc = paste! {
get_doc!(#[doc = "HTTP " get:upper "!"])
};
let expected = "HTTP GET!";
assert_eq!(doc, expected);
} | rust_cleaned_test_functions.jsonl/36573 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
368,
341,
262,
1077,
4629,
284,
24937,
0,
341,
286,
633,
18869,
10297,
13353,
5236,
284,
330,
9230,
330,
633,
25,
13574,
53074,
14108,
262,
3634,
262,
1077,
3601,
284,
330,
9230,
7890,
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 |
#[test]
fn test_preboot_set_balloon_dev() {
let req = VmmAction::SetBalloonDevice(BalloonDeviceConfig::default());
check_preboot_request(req, |result, vm_res| {
assert_eq!(result, Ok(VmmData::Empty));
assert!(vm_res.balloon_set)
});
let req = VmmAction::S... | rust_cleaned_test_functions.jsonl/44530 | {
"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,
10442,
4619,
2602,
56441,
31335,
10433,
368,
341,
286,
1077,
4232,
284,
647,
3821,
2512,
486,
1649,
37889,
31335,
6985,
5349,
278,
31335,
6985,
2648,
486,
2258,
1423,
286,
1779,
10442,
4619,
7893,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_strip_qualifier() {
let address = gen_random_base58_address();
let valid_fq_address = format!("{}{}", PAYMENT_ADDRESS_QUALIFIER, address);
assert_eq!(strip_qualifier_from_address(&valid_fq_address), address);
} | rust_cleaned_test_functions.jsonl/72543 | {
"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,
66130,
64391,
3049,
368,
341,
286,
1077,
2621,
284,
4081,
22644,
7651,
20,
23,
6744,
543,
286,
1077,
2697,
761,
80,
6744,
284,
3561,
17223,
6257,
42351,
49377,
5328,
20135,
69942,
26965,
11,
2621,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sanitize_process() {
let n = 100;
let tmp_dir_path = "/tmp/jailer/tests/sanitize_process";
assert!(fs::create_dir_all(tmp_dir_path).is_ok());
let mut fds = Vec::new();
for i in 0..n {
let maybe_file = File::create(format!("{}/{}", tmp_dir_pat... | rust_cleaned_test_functions.jsonl/49794 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
58652,
11305,
368,
341,
286,
1077,
308,
284,
220,
16,
15,
15,
401,
286,
1077,
4174,
4334,
2638,
284,
3521,
5173,
4437,
38782,
62468,
2687,
58652,
11305,
876,
286,
2060,
10297,
3848,
486,
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... | 3 |
#[test]
fn test_input_stream_read_raw_varint_pos() {
test_read_partial("95 01 98", |reader| {
assert_eq!(149, reader.read_raw_varint32().unwrap());
assert_eq!(2, reader.pos());
});
} | rust_cleaned_test_functions.jsonl/104501 | {
"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,
5898,
12673,
6443,
16067,
4612,
396,
6479,
368,
341,
286,
1273,
6443,
52068,
445,
24,
20,
220,
15,
16,
220,
24,
23,
497,
760,
11149,
91,
341,
310,
2060,
10714,
10297,
16,
19,
24,
11,
6604,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gitlab_error_detection_unknown() {
let endpoint = ExpectedUrl::builder()
.endpoint("dummy")
.status(StatusCode::NOT_FOUND)
.build()
.unwrap();
let err_obj = json!({
"bogus": "dummy error message",
});
let... | rust_cleaned_test_functions.jsonl/4926 | {
"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,
68801,
14380,
4096,
57505,
57507,
368,
341,
286,
1077,
14887,
284,
31021,
2864,
486,
17850,
741,
310,
659,
32540,
445,
31390,
1138,
310,
659,
2829,
7,
15872,
486,
14065,
24687,
340,
310,
659,
5834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_boolean_array_lt_scalar() {
let a: BooleanArray = vec![Some(true), Some(false), None].into();
let res1: Vec<Option<bool>> = lt_bool_scalar(&a, false).unwrap().iter().collect();
assert_eq!(res1, vec![Some(false), Some(false), None]);
let res2: Vec<Option<bool>> ... | rust_cleaned_test_functions.jsonl/45800 | {
"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,
46642,
3858,
39164,
41652,
368,
341,
286,
1077,
264,
25,
6992,
1857,
284,
7486,
20703,
8373,
3715,
701,
4329,
3576,
701,
2240,
936,
18122,
1428,
286,
1077,
592,
16,
25,
11312,
94150,
17028,
2452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_json_and_bad_content_type() {
let (req, mut pl) = TestRequest::with_header(
header::CONTENT_TYPE,
header::HeaderValue::from_static("text/plain"),
)
.header(
header::CONTENT_LENGTH,
header::HeaderValue::from_static("16")... | rust_cleaned_test_functions.jsonl/37462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
9455,
8378,
34199,
7495,
1819,
368,
341,
286,
1077,
320,
2958,
11,
5206,
625,
8,
284,
3393,
1900,
486,
4197,
8757,
1006,
310,
4247,
486,
67872,
4189,
345,
310,
4247,
486,
97721,
486,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iseq_random() {
let mut taken = HashSet::new();
let mut seq = Seq::new();
for i in 0..100 {
let ac = random_action();
if taken.insert(ac.clone()) {
seq.handle(FreeGroup::one(ac));
seq.ch... | rust_cleaned_test_functions.jsonl/112648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
1064,
80,
22644,
368,
341,
310,
1077,
5206,
4429,
284,
18931,
486,
931,
1428,
310,
1077,
5206,
12981,
284,
23744,
486,
931,
1428,
310,
369,
600,
304,
220,
15,
496,
16,
15,
15,
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... | 7 |
#[test]
fn test_long_to_short() {
let mut short = Opt {
name: Long("banana".to_string()),
hasarg: Yes,
occur: Req,
aliases: Vec::new(),
};
short.aliases = vec!(Opt { name: Short('b'),
hasarg: Yes,
... | rust_cleaned_test_functions.jsonl/13335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
2346,
16673,
368,
341,
286,
1077,
5206,
2805,
284,
16554,
341,
310,
829,
25,
5724,
445,
87747,
3263,
983,
3904,
14702,
310,
702,
858,
25,
7414,
345,
310,
12170,
25,
82458,
345,
310,
40386... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type() {
Python::with_gil(|py| {
let obj = py.eval("42", None, None).unwrap();
assert_eq!(obj.get_type().as_type_ptr(), obj.get_type_ptr());
});
} | rust_cleaned_test_functions.jsonl/93717 | {
"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,
1819,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
2839,
284,
4510,
31710,
445,
19,
17,
497,
2240,
11,
2240,
568,
15454,
543,
310,
2060,
10714,
10297,
2295,
670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_query_captures_with_matches_removed_before_they_finish() {
allocations::record(|| {
let language = get_language("javascript");
// even though it hasn't matched the entire pattern yet. A
let query = Query::new(
language,
... | rust_cleaned_test_functions.jsonl/77470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 670
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
666,
2689,
1413,
6615,
38344,
68248,
23708,
5854,
1195,
42980,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
16885,
286,
442,
1496,
3498,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_expected_result() {
let ts = TestScenario::new("id");
match expected_result(&ts, &[]) {
Ok(r) => assert!(r.succeeded()),
Err(s) => assert!(s.starts_with("uutils-tests-warning")),
}
let ts = TestScenario::new("no test name");
... | rust_cleaned_test_functions.jsonl/12804 | {
"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,
32190,
5287,
368,
341,
286,
1077,
10591,
284,
3393,
54031,
486,
931,
445,
307,
797,
1789,
286,
2432,
3601,
5287,
2099,
2576,
11,
609,
15793,
341,
310,
7622,
2601,
8,
589,
2060,
10297,
81,
514,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_try_getcontext() {
unsafe {
let ctx = mlirContextCreate();
let llvm = mlirGetDialectHandle__llvm__();
mlirDialectHandleRegisterDialect(llvm, ctx);
mlirDialectHandleLoadDialect(llvm, ctx);
let num_dialects = mlirContextGetNumRegi... | rust_cleaned_test_functions.jsonl/40531 | {
"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,
53283,
3062,
2147,
368,
341,
286,
19860,
341,
310,
1077,
5635,
284,
15739,
404,
1972,
4021,
543,
310,
1077,
34664,
284,
15739,
404,
1949,
35,
55056,
6999,
563,
29042,
563,
543,
310,
15739,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reflect_slanted_surface() {
let v = Tuple::vector(0.0, -1.0, 0.0);
let val = 2f32.sqrt() / 2.0;
let n = Tuple::vector(val, val, 0.0);
let expected_reflection = Tuple::vector(1.0, 0.0, 0.0);
assert_eq!(v.reflect(&n), expected_reflection);
} | rust_cleaned_test_functions.jsonl/113529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7793,
767,
11886,
7566,
31030,
368,
341,
286,
1077,
348,
284,
24622,
486,
3215,
7,
15,
13,
15,
11,
481,
16,
13,
15,
11,
220,
15,
13,
15,
317,
286,
1077,
1044,
284,
220,
17,
69,
18,
17,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_device_parsing() -> Result<()> {
// Device must have a path provided
assert!(DeviceConfig::parse("").is_err());
assert_eq!(
DeviceConfig::parse("path=/path/to/device")?,
DeviceConfig {
path: PathBuf::from("/path/to/device"),
... | rust_cleaned_test_functions.jsonl/61752 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9204,
620,
28598,
368,
1464,
5714,
71698,
341,
286,
442,
13903,
1969,
614,
264,
1815,
3897,
198,
286,
2060,
10297,
6985,
2648,
486,
6400,
80821,
285,
9266,
1423,
286,
2060,
10714,
33673,
310,
1390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_borrow_mut_with() {
let mut lazycell = LazyCell::new();
{
let value = lazycell.borrow_mut_with(|| 1);
assert_eq!(&mut 1, value);
*value = 2;
}
assert_eq!(&2, lazycell.borrow().unwrap());
} | rust_cleaned_test_functions.jsonl/5796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
7768,
29523,
6615,
368,
341,
286,
1077,
5206,
64436,
3337,
613,
284,
44263,
3599,
486,
931,
1428,
286,
341,
310,
1077,
897,
284,
64436,
3337,
613,
83640,
29523,
6615,
79453,
220,
16,
317,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_large_delta_time() -> Result<(), Box<dyn std::error::Error>> {
Command::new(get_os_binary_loc())
.arg("-d")
.arg("18446744073709551616")
.assert()
.failure()
.stderr(predicate::str::contains(
"Please set your time delta to be at most",
... | rust_cleaned_test_functions.jsonl/65680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
26710,
3009,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
7348,
486,
931,
5433,
29387,
31761,
13400,
2398,
286,
659,
858,
13645,
67,
1138,
286,
659,
858,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_padded_multiple_unaligned() {
// Use 127 for this test because it unpads to 128 – a multiple of 32.
// Otherwise the last chunk will be too short and cannot be converted to Fr.
for i in 1..126 {
let mut data = vec![255u8; 127];
let buf = Vec:... | rust_cleaned_test_functions.jsonl/32998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 654
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
620,
16828,
45233,
4907,
47142,
368,
341,
286,
442,
5443,
220,
16,
17,
22,
369,
419,
1273,
1576,
432,
21624,
7664,
311,
220,
16,
17,
23,
1365,
264,
5248,
315,
220,
18,
17,
624,
286,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_insert_key_with_different_key_version() {
let mut map: HashMap<Key, Value> = HashMap::new();
let key1 = Key {
key: "a".to_owned(),
key_version: 0,
};
let data = serialize(&"value".to_owned()).expect("serialize");
let value1 = Value... | rust_cleaned_test_functions.jsonl/90781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
3097,
6615,
82741,
3097,
9438,
368,
341,
286,
1077,
5206,
2415,
25,
10528,
42003,
11,
5162,
29,
284,
10528,
486,
931,
543,
286,
1077,
1376,
16,
284,
5309,
341,
310,
1376,
25,
330,
64,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inspect_log_connect_stats() {
let mut exec = fasync::TestExecutor::new().expect("Failed to create an executor");
let (mut cobalt_sender, _cobalt_receiver) = fake_cobalt_sender();
let (mut cobalt_1dot1_proxy, mut cobalt_1dot1_stream) =
create_proxy_and_stream::... | rust_cleaned_test_functions.jsonl/50933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34386,
987,
5224,
15720,
15381,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
458,
31558,
797,
286,
1077,
320,
6984,
33828,
3145,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_m128() {
#[cfg(target_arch = "x86")]
use core::arch::x86::*;
#[cfg(target_arch = "x86_64")]
use core::arch::x86_64::*;
#[repr(C, align(16))]
struct F32x3_A16([f32; 3]);
let v0 = Vec3A::new(1.0, 2.0, 3.0);
let m0: __m128 = v0.into(... | rust_cleaned_test_functions.jsonl/23407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 557
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
16,
17,
23,
368,
341,
286,
11506,
14072,
8637,
34330,
284,
330,
87,
23,
21,
5422,
286,
990,
6200,
486,
1113,
486,
87,
23,
21,
56162,
286,
11506,
14072,
8637,
34330,
284,
330,
87,
23,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poll_indexer_migration() {
let mut deps = mock_dependencies(20, &[]);
poll_indexer_old_store(&mut deps.storage, &PollStatus::InProgress)
.save(&1u64.to_be_bytes(), &true)
.unwrap();
poll_indexer_old_store(&mut deps.storage, &PollStatus::Executed)
... | rust_cleaned_test_functions.jsonl/44518 | {
"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,
40002,
3560,
261,
90373,
368,
341,
286,
1077,
5206,
48178,
284,
7860,
71841,
7,
17,
15,
11,
609,
56703,
286,
7085,
3560,
261,
21108,
14809,
2099,
6984,
48178,
22403,
11,
609,
49207,
2522,
486,
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_write_fidelio_to_file() {
let (mut causet, tmp_dir) = EINSTEINDBConfig::with_tmp().unwrap();
causet.causet_path = tmp_dir.path().join("causet_file").to_str().unwrap().to_owned();
{
let c = r#"
## comment should be reserve
[violetabftstore]
# config that comment out by one `#... | rust_cleaned_test_functions.jsonl/7499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
761,
26802,
815,
2346,
2458,
368,
341,
262,
1077,
320,
6984,
2162,
18187,
11,
4174,
4334,
8,
284,
468,
687,
58684,
687,
3506,
2648,
486,
4197,
16125,
1005,
15454,
543,
262,
2162,
18187,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_host_localhost_new() {
let host: Localhost = Localhost::new(PathBuf::from("C:\\users")).ok().unwrap();
assert_eq!(host.wrkdir, PathBuf::from("C:\\users"));
// Scan dir
let entries = std::fs::read_dir(PathBuf::from("C:\\users").as_path()).unwrap();
let mut ... | rust_cleaned_test_functions.jsonl/53620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12848,
62,
8301,
5921,
368,
341,
286,
1077,
3468,
25,
8774,
3790,
284,
8774,
3790,
486,
931,
33030,
15064,
486,
1499,
445,
34,
23817,
4218,
15197,
562,
1005,
15454,
543,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_composite_file() {
let path = Path::new("test_path");
let mut directory = RAMDirectory::create();
{
let w = directory.open_write(path).unwrap();
let mut composite_write = CompositeWrite::wrap(w);
{
let mut write_0 = comp... | rust_cleaned_test_functions.jsonl/77311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 851
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
13607,
2458,
368,
341,
286,
1077,
1815,
284,
7933,
486,
931,
445,
1944,
2638,
797,
286,
1077,
5206,
6220,
284,
22038,
9310,
486,
3182,
543,
286,
341,
310,
1077,
289,
284,
6220,
5826,
9165,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_can_manage_on_private_dex_should_pass() {
let mut ext = ExtBuilder {
initial_dex_list: vec![(
DEX_A_ID,
DEXInfo {
base_asset_id: XOR,
is_public: false,
},
)],
initial_permission_owners: vec![(MANAGE_D... | rust_cleaned_test_functions.jsonl/110304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
56473,
4470,
26249,
814,
327,
43378,
15464,
368,
341,
262,
1077,
5206,
1303,
284,
9447,
3297,
341,
286,
2856,
814,
327,
2019,
25,
7486,
20703,
1006,
310,
422,
3257,
1566,
3450,
345,
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_extract_policy_for_wsh_mixed_timelocks() {
let secp = Secp256k1::new();
let (prvkey0, _pubkey0, _fingerprint0) = setup_keys(TPRV0_STR, PATH, &secp);
let locktime_threshold = 500000000;
let locktime_blocks = 100;
let locktime_seconds = locktime_blocks + lo... | rust_cleaned_test_functions.jsonl/77144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
22773,
5478,
1670,
927,
717,
3286,
29087,
301,
25183,
368,
341,
286,
1077,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
1077,
320,
649,
85,
792,
15,
11,
716,
9585... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_net() {
let perms = DenoPermissions::from_flags(&DenoFlags {
net_whitelist: svec![
"localhost",
"deno.land",
"github.com:3000",
"127.0.0.1",
"172.16.0.2:8000"
],
..Default::default()
});
let domain_tests = vec![
(... | rust_cleaned_test_functions.jsonl/71511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
19722,
368,
341,
262,
1077,
82282,
284,
9774,
78,
23851,
486,
1499,
14130,
2099,
35,
11790,
9195,
341,
414,
4179,
36225,
57645,
25,
274,
4083,
90515,
286,
330,
8301,
756,
286,
330,
5183,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_state_var()
{
test_parse("state s{}");
test_parse("state s{ var x; }");
test_parse("state s{ var x=1; }");
test_parse("state s{ var x@(y)=1; }");
test_parse("state s{ var x:Int=1; }");
test_parse("state s{ var x=1@{-desc-}; }");
test_parse("state s{ var x@(y):Int=1@{-desc-}; }");
} | rust_cleaned_test_functions.jsonl/91404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
4612,
741,
515,
18185,
21039,
445,
2454,
274,
6257,
797,
18185,
21039,
445,
2454,
274,
90,
762,
856,
26,
335,
797,
18185,
21039,
445,
2454,
274,
90,
762,
856,
28,
16,
26,
335,
797,
18185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_wallet_from_mnemonic_mainnet_no_derivation_path() {
let expected = XWallet {
public_key: "031D68BC1A142E6766B2BDFB006CCFE135EF2E0E2E94ABB5CF5C9AB6104776FBAE"
.to_owned(),
private_key: "0090802A50AA84EFB6CDB225F17C27616EA94048C179142FECF03F... | rust_cleaned_test_functions.jsonl/118739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
62308,
5673,
717,
70775,
11027,
4711,
6536,
35345,
39127,
2638,
368,
341,
286,
1077,
3601,
284,
1599,
38259,
341,
310,
584,
3097,
25,
330,
15,
18,
16,
35,
21,
23,
4897,
16,
32,
16,
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... | 2 |
#[test]
fn test_extract_config_data_with_apps_and_services() {
let mock_reader = Box::new(MockPackageReader::new());
// We will need 2 service package definitions that map different services
mock_reader.append_service_pkg_def(create_svc_pkg_def(
vec![(
String:... | rust_cleaned_test_functions.jsonl/19470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1037
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
5332,
1769,
6615,
69899,
8378,
39846,
368,
341,
286,
1077,
7860,
22306,
284,
8261,
486,
931,
66436,
13100,
5062,
486,
931,
1423,
286,
442,
1205,
686,
1184,
220,
17,
2473,
6328,
17473,
429,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assemble() {
let mut writer = MemWriter::new();
{
let vec: Vec<IoResult<ir::Instruction>> = vec!(
Ok(ir::StackPush(1)),
Ok(ir::StackDuplicate),
Ok(ir::StackCopy(2)),
Ok(ir::StackSwap),
Ok(... | rust_cleaned_test_functions.jsonl/127879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
15790,
368,
341,
286,
1077,
5206,
6916,
284,
13550,
6492,
486,
931,
543,
286,
341,
310,
1077,
7486,
25,
11312,
13332,
78,
2077,
27,
404,
486,
16664,
2452,
284,
7486,
33673,
394,
7622,
765... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize() {
use serde_json;
let addr = Address::from_str("132F25rTsvBdp9JzLLBHP5mvGY66i1xdiM").unwrap();
let json = serde_json::to_value(&addr).unwrap();
assert_eq!(
json,
serde_json::Value::String("132F25rTsvBdp9JzLLBHP5mvGY66i1xdi... | rust_cleaned_test_functions.jsonl/59122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
88686,
368,
341,
286,
990,
61570,
9455,
401,
286,
1077,
10789,
284,
9177,
486,
1499,
2895,
445,
16,
18,
17,
37,
17,
20,
81,
51,
3492,
33,
9796,
24,
41,
89,
4086,
33,
6610,
20,
26002,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_u8_zero_capacity() {
let mut b: ListBuilder<u8> = ListBuilder::with_capacity(0);
b.push("Hello, ".as_bytes());
b.push("World!".as_bytes());
let buffer = b.finish();
assert_eq!(2, buffer.len());
assert_eq!("Hello, ".as_bytes(), buffer.slice(0))... | rust_cleaned_test_functions.jsonl/99083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
7300,
23,
19359,
35603,
368,
341,
286,
1077,
5206,
293,
25,
1759,
3297,
34837,
23,
29,
284,
1759,
3297,
486,
4197,
35603,
7,
15,
317,
286,
293,
2552,
445,
9707,
11,
5933,
300,
12524,
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 |
#[test]
fn test_volatile_primitive() {
for (buf, res) in vec![
("volatile short", Primitive::Short),
("short volatile", Primitive::Short),
("short volatile int", Primitive::Short),
("signed short volatile", Primitive::Short),
("signed short vol... | rust_cleaned_test_functions.jsonl/117515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25517,
84087,
368,
341,
286,
369,
320,
5909,
11,
592,
8,
304,
7486,
90515,
310,
3489,
27307,
2805,
497,
51460,
486,
12472,
1326,
310,
3489,
8676,
17072,
497,
51460,
486,
12472,
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... | 3 |
#[test]
fn test_new_behavior_previously_slow() {
// any stake accounts activated and deactivated at the same epoch
do_test(
OldDeactivationBehavior::Slow,
&[
(0, 0, 0),
(0, 0, 0),
(0... | rust_cleaned_test_functions.jsonl/104323 | {
"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,
5921,
74540,
10442,
18281,
82447,
368,
341,
310,
442,
894,
18279,
9618,
21985,
323,
83616,
518,
279,
1852,
16342,
198,
39865,
310,
653,
4452,
1006,
394,
10621,
1912,
23002,
22753,
486,
58289,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_many_depends() {
let mut t: Turbine<TestSlot> = Turbine::new(1024);
let e1 = t.ep_new().unwrap();
let e2 = t.ep_new().unwrap();
let e3 = t.ep_new().unwrap();
let e4 = t.ep_new().unwrap();
let e5 = t.ep_new().unwrap();
let e6 = t.ep_new().un... | rust_cleaned_test_functions.jsonl/65708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22101,
49258,
1412,
368,
341,
286,
1077,
5206,
259,
25,
8705,
46561,
71273,
19877,
29,
284,
8705,
46561,
486,
931,
7,
16,
15,
17,
19,
317,
286,
1077,
384,
16,
284,
259,
33376,
5921,
1005,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_block_param() {
let addr = Address {
city: "Beijing".to_string(),
country: "China".to_string(),
};
let person = Person {
name: "Ning Sun".to_string(),
age: 27,
addr: addr,
titles: vec!["programm... | rust_cleaned_test_functions.jsonl/73424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 735
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
7113,
4090,
368,
341,
286,
1077,
10789,
284,
9177,
341,
310,
3283,
25,
330,
3430,
23649,
3263,
983,
3904,
3148,
310,
3146,
25,
330,
22282,
3263,
983,
3904,
3148,
286,
3634,
286,
1077,
1697... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub() {
for elm in sum_triples.iter() {
let (a_vec, b_vec, c_vec) = *elm;
let a = BigUint::from_slice(a_vec);
let b = BigUint::from_slice(b_vec);
let c = BigUint::from_slice(c_vec);
assert!(c - a == b);
assert!(c - ... | rust_cleaned_test_functions.jsonl/96899 | {
"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,
5228,
368,
341,
286,
369,
42205,
304,
2629,
3547,
37458,
19471,
368,
341,
310,
1077,
320,
64,
13251,
11,
293,
13251,
11,
272,
13251,
8,
284,
353,
23162,
280,
310,
1077,
264,
284,
6164,
21570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rent_eager_with_warmup_epochs_under_multi_epoch_cycle() {
let leader_pubkey = solana_sdk::pubkey::new_rand();
let leader_lamports = 3;
let mut genesis_config =
create_genesis_config_with_leader(5, &leader_pubkey, leader_lamports).genesis_config;
genesi... | rust_cleaned_test_functions.jsonl/2541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83127,
2204,
1409,
6615,
1670,
2178,
454,
44127,
58228,
25133,
20682,
39079,
368,
341,
286,
1077,
7653,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
7653,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_show_table_study() {
let study = Study {
id: "foo".to_string(),
is_stable: true,
last_update: NaiveDate::from_ymd(2020, 8, 30).and_hms(19, 11, 09),
main_dicom_tags: hashmap! {
"AccessionNumber".to_string() => "foo_an"... | rust_cleaned_test_functions.jsonl/76487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
15267,
5237,
85581,
368,
341,
286,
1077,
3920,
284,
19173,
341,
310,
877,
25,
330,
7975,
3263,
983,
3904,
3148,
310,
374,
1261,
480,
25,
830,
345,
310,
1537,
8882,
25,
12812,
533,
1916,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keywords_in_impl_def() {
check(
r"impl My { $0 }",
expect![[r#"
kw pub(crate)
kw pub
kw unsafe
kw fn
kw const
kw type
"#]],
);
} | rust_cleaned_test_functions.jsonl/72505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
1243,
21007,
7844,
368,
341,
286,
1779,
1006,
310,
435,
1,
6383,
3017,
314,
400,
15,
335,
756,
310,
1720,
0,
15505,
81,
2,
698,
394,
29525,
6675,
54907,
340,
394,
29525,
6675,
198,
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_try_from_quality_scores_for_sam_record_quality_scores(
) -> Result<(), sam::record::quality_scores::score::TryFromUByteError> {
let quality_scores = QualityScores::from(vec![45, 35, 43, 50]); // NDLS
let actual = sam::record::QualityScores::try_from(&quality_scores)?;
... | rust_cleaned_test_functions.jsonl/58915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
55074,
27198,
5478,
643,
309,
14192,
55074,
27198,
1006,
262,
873,
1464,
5714,
68843,
9962,
486,
8548,
486,
10473,
27198,
486,
12338,
486,
21453,
3830,
52,
7153,
1454,
29,
341,
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... | 6 |
#[test]
fn test_rainbow_highlighting() {
let (analysis, file_id) = single_file(
r#"
fn main() {
let hello = "hello";
let x = hello.to_string();
let y = hello.to_string();
let x = "other color please!";
let y = x.to_string();
}
fn bar() {
let mut hello = "hello";
}
"... | rust_cleaned_test_functions.jsonl/49525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
466,
15439,
74546,
287,
368,
341,
286,
1077,
320,
34484,
11,
1034,
842,
8,
284,
3175,
2458,
1006,
310,
435,
2,
698,
8822,
1887,
368,
341,
262,
1077,
23811,
284,
330,
14990,
876,
262,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lowercase_drive_letter_with_drive() {
let url = url_from_abs_path(Path::new("C:\\Test"));
assert_eq!(url.to_string(), "file:///c:/Test");
} | rust_cleaned_test_functions.jsonl/70339 | {
"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,
93129,
67151,
46117,
6615,
67151,
368,
341,
286,
1077,
2515,
284,
2515,
5673,
31170,
2638,
33030,
486,
931,
445,
34,
23817,
2271,
4010,
286,
2060,
10714,
10297,
1085,
2389,
3904,
1507,
330,
1192,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_multi_args() {
assert_eq!(
Opt {
x: 0,
level: "1".to_string(),
files: vec!["file".to_string()],
values: vec![],
},
Opt::try_parse_from(&["test", "-l", "1", "file"]).unwrap()
);
assert_eq!(
Opt {
... | rust_cleaned_test_functions.jsonl/18740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
8384,
368,
341,
262,
2060,
10714,
33673,
286,
16554,
341,
310,
856,
25,
220,
15,
345,
310,
2188,
25,
330,
16,
3263,
983,
3904,
3148,
310,
3542,
25,
7486,
0,
1183,
1192,
3263,
983,
3904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_value() {
given(r#"
name = "hello"
# delete this
version = "1.0.0" # please
documentation = "https://docs.rs/hello""#
).running(|root| {
let value = root.remove("version");
assert!(value.is_some());
let value = value.unwrap()... | rust_cleaned_test_functions.jsonl/36882 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
3142,
368,
341,
262,
2661,
2601,
2,
698,
286,
829,
284,
330,
14990,
698,
286,
671,
3698,
419,
198,
286,
2319,
284,
330,
16,
13,
15,
13,
15,
1,
671,
4486,
198,
286,
9705,
284,
330,
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_check_no_allow_rule_no_allow() {
let mut kb = KnowledgeBase::new();
kb.add_rule(rule!("f", [sym!("x")]));
kb.add_rule(rule!("g", [sym!("x")]));
assert!(check_no_allow_rule(&kb).is_some());
} | rust_cleaned_test_functions.jsonl/102132 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
6536,
55731,
21124,
6536,
55731,
368,
341,
286,
1077,
5206,
38653,
284,
31925,
3978,
486,
931,
543,
286,
38653,
1364,
21124,
34944,
17223,
69,
497,
508,
23802,
17223,
87,
899,
14382,
286,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.