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_no_extension() {
let te = TestEnv::new(
DEFAULT_DIRS,
&["a.foo", "aa", "one/b.foo", "one/bb", "one/two/three/d"],
);
te.assert_output(
&["^[^.]+$"],
"aa
one
one/bb
one/two
one/two/three
one/two/three/d
o... | rust_cleaned_test_functions.jsonl/65615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
31035,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
1006,
286,
11955,
90560,
345,
286,
609,
1183,
64,
58432,
497,
330,
5305,
497,
330,
603,
3470,
58432,
497,
330,
603,
3470,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serial_number() {
// sn_add
assert_eq!(36.sn_add(64), Some(100));
assert_eq!(0.sn_add(0x8000_0000), None);
// sn_cmp
assert_eq!(2.sn_cmp(&0xFFFF_FFFF), Some(Ordering::Greater));
assert_eq!(1.sn_cmp(&0x8000_0000), Some(Ordering::Less));
ass... | rust_cleaned_test_functions.jsonl/93107 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
5500,
368,
341,
286,
442,
4131,
2891,
198,
286,
2060,
10714,
10297,
18,
21,
37672,
2891,
7,
21,
19,
701,
4329,
7,
16,
15,
15,
1106,
286,
2060,
10714,
10297,
15,
37672,
2891,
7,
15,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_replacen() {
assert_eq!("".replacen('a', "b", 5), "");
assert_eq!("acaaa".replacen("a", "b", 3), "bcbba");
assert_eq!("aaaa".replacen("a", "b", 0), "aaaa");
let test = "test";
assert_eq!(" test test ".replacen(test, "toast", 3), " toast toast ");
assert_eq!(" test test "... | rust_cleaned_test_functions.jsonl/17596 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
500,
90487,
368,
341,
262,
2060,
10714,
17223,
3263,
265,
500,
90487,
492,
64,
516,
330,
65,
497,
220,
20,
701,
14498,
262,
2060,
10714,
17223,
580,
32646,
3263,
265,
500,
90487,
445,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example_toml_startup() {
named_test_harness("example.toml", |port, _, _| {
let mut io_loop = Runtime::new().unwrap();
let addr: SocketAddr = SocketAddr::new(Ipv4Addr::new(127, 0, 0, 1).into(), port);
let (stream, sender) = TcpClientStream::<TokioTcpStream>::new(addr);... | rust_cleaned_test_functions.jsonl/75212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
528,
316,
75,
80858,
368,
341,
262,
6941,
4452,
1523,
23518,
445,
8687,
73494,
75,
497,
760,
403,
11,
8358,
85137,
341,
286,
1077,
5206,
6399,
17198,
284,
10954,
486,
931,
1005,
15454,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_align_to_non_trivial() {
#[repr(align(8))] struct U64(u64, u64);
#[repr(align(8))] struct U64U64U32(u64, u64, u32);
let data = [U64(1, 2), U64(3, 4), U64(5, 6), U64(7, 8), U64(9, 10), U64(11, 12), U64(13, 14),
U64(15, 16)];
let (prefix, aligned, suffix) = unsafe {... | rust_cleaned_test_functions.jsonl/8470 | {
"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,
37015,
2346,
21637,
3547,
26658,
368,
341,
262,
11506,
30837,
7,
6612,
7,
23,
81394,
2036,
547,
21,
19,
8154,
21,
19,
11,
575,
21,
19,
317,
262,
11506,
30837,
7,
6612,
7,
23,
81394,
2036,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_veirifer() {
let keypairs: Vec<_> = (0..3).map(move |_| Generator::random_keypair()).collect();
let config = SignatureConfig {
signatures_threshold: 2,
public_keys: keypairs
.iter()
.map(|(_, pubkey)| JsonBytes::from_vec(pubkey.serialize()))
... | rust_cleaned_test_functions.jsonl/21358 | {
"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,
73285,
404,
11437,
368,
341,
262,
1077,
1376,
77256,
25,
11312,
32399,
29,
284,
320,
15,
496,
18,
568,
2186,
34081,
66091,
28358,
486,
11463,
3097,
12670,
6011,
17384,
543,
262,
1077,
2193,
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_root_position() {
let pos = super::root_position(5, 2, 3);
assert_eq!(pos, 12);
let pos = super::root_position(5, 0, 3);
assert_eq!(pos, 4);
} | rust_cleaned_test_functions.jsonl/18270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
9661,
368,
341,
286,
1077,
1133,
284,
2256,
486,
2888,
9661,
7,
20,
11,
220,
17,
11,
220,
18,
317,
286,
2060,
10714,
10297,
966,
11,
220,
16,
17,
626,
286,
1077,
1133,
284,
2256,
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_parameter_fields() {
let mut parameter_store = ParameterStore::new();
let parameter = Arc::new(
PluginParameter::builder()
.name("Test parameter")
.label("label")
.initial_value(10.0)
.build(),
);... | rust_cleaned_test_functions.jsonl/58508 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24899,
12132,
368,
341,
286,
1077,
5206,
5733,
14809,
284,
15168,
6093,
486,
931,
543,
286,
1077,
5733,
284,
19689,
486,
931,
1006,
310,
21245,
4971,
486,
17850,
741,
394,
659,
606,
445,
2271,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_localnet_pass() {
let mut cluster_vec = Vec::<String>::new();
cluster_vec.push(SCFS_LOCAL.to_string());
let mut my_matrix = ScfsMatrix::new(Some(ScfsCriteria {
clusters: Some(cluster_vec),
..Default::default()
}))
.unwrap();
... | rust_cleaned_test_functions.jsonl/38833 | {
"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,
13564,
4711,
15464,
368,
341,
286,
1077,
5206,
10652,
13251,
284,
11312,
27638,
703,
6831,
931,
543,
286,
10652,
13251,
2552,
59461,
8485,
28399,
2389,
3904,
1423,
286,
1077,
5206,
847,
10193,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_range() {
let sc = CONTEXT.clone();
let rdd = sc.range(1, 12, 1, 3);
let res = rdd.collect().unwrap();
let expected: Vec<_> = (1..=12).collect();
assert_eq!(res, expected);
} | rust_cleaned_test_functions.jsonl/27954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
368,
341,
262,
1077,
1136,
284,
87336,
15997,
543,
262,
1077,
435,
631,
284,
1136,
30146,
7,
16,
11,
220,
16,
17,
11,
220,
16,
11,
220,
18,
317,
262,
1077,
592,
284,
435,
631,
29124,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_f_layout_view() {
let shape = (2, 2).f();
let arr = Array::<i32, Ix2>::from_shape_vec(shape, vec![1, 2, 3, 4]).unwrap();
let arr_view = arr.view();
assert!(!arr_view.is_standard_layout());
test_as_standard_layout_for(arr);
} | rust_cleaned_test_functions.jsonl/92647 | {
"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,
761,
14466,
7122,
368,
341,
286,
1077,
6083,
284,
320,
17,
11,
220,
17,
568,
69,
543,
286,
1077,
2890,
284,
2910,
27638,
72,
18,
17,
11,
358,
87,
17,
6831,
1499,
13597,
13251,
25933,
11,
748... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_css_color_16() {
assert_eq!(parse_css_color("rgba(40, 50, 60)"), Err(CssColorParseError::MissingColorComponent(CssColorComponent::Alpha)));
} | rust_cleaned_test_functions.jsonl/37111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
6714,
62,
16,
21,
368,
341,
286,
2060,
10714,
10297,
6400,
25924,
6714,
445,
20400,
7,
19,
15,
11,
220,
20,
15,
11,
220,
21,
15,
8,
3975,
15495,
3025,
778,
1636,
14463,
1454,
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 |
#[test]
fn test_validate_not_allowed_origin() {
let cors = Cors::new()
.allowed_origin("https://www.example.com")
.finish(test::ok_service());
let req = TestRequest::with_header("Origin", "https://www.unknown.com")
.method(Method::GET)
.to_srv_req... | rust_cleaned_test_functions.jsonl/912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
7913,
42155,
34043,
368,
341,
286,
1077,
43911,
284,
52518,
486,
931,
741,
310,
659,
20967,
34043,
445,
2428,
1110,
2136,
7724,
905,
1138,
310,
659,
30150,
8623,
486,
562,
12267,
5231,
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_dec_as_int_with_overflow() {
let cases = vec![
(
FieldTypeFlag::empty(),
vec![Datum::Dec(
Decimal::from_f64(i64::MAX as f64 + 100.5).unwrap(),
)],
i64::MAX,
),
(
... | rust_cleaned_test_functions.jsonl/2972 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 911
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13783,
11898,
4042,
6615,
79073,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
84614,
12135,
486,
3194,
3148,
394,
7486,
20703,
68036,
486,
4900,
1006,
503,
26728,
486,
1499,
761,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_payload_regular_deserialize() {
let payload_script = Script::from_hex(
"6a3045584f4e554d0100d204000000000000e3b0c44298fc1c14\
9afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
);
let block_hash = hash(&[]);
let payload = Payload::from_sc... | rust_cleaned_test_functions.jsonl/119536 | {
"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,
32813,
49443,
15768,
9050,
368,
341,
286,
1077,
7729,
14660,
284,
13710,
486,
1499,
32655,
1006,
310,
330,
21,
64,
18,
15,
19,
20,
20,
23,
19,
69,
19,
68,
20,
20,
19,
67,
15,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_untrustworthy_sigs() {
let required_num_sigs = 14;
let actual_num_sigs = 5;
let packet = packet_from_num_sigs(required_num_sigs, actual_num_sigs);
let unsanitized_packet_offsets = sigverify::do_get_packet_offsets(&packet, 0);
assert_eq!(
uns... | rust_cleaned_test_functions.jsonl/22072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
56655,
42529,
643,
14462,
368,
341,
286,
1077,
2567,
4273,
643,
14462,
284,
220,
16,
19,
280,
286,
1077,
5042,
4273,
643,
14462,
284,
220,
20,
401,
286,
1077,
10151,
284,
10151,
5673,
4273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_function_declaration_invalid_missing_space_after_name_no_parens() {
let mut p = make_parser("function name{ echo body; }");
assert_eq!(
Err(Unexpected(Token::CurlyOpen, src(13, 1, 14))),
p.function_declaration()
);
let mut p = make_parser("function name( echo body... | rust_cleaned_test_functions.jsonl/69868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
77926,
31433,
40447,
14663,
19844,
1269,
6536,
620,
546,
4412,
368,
341,
262,
1077,
5206,
281,
284,
1281,
18517,
445,
1688,
829,
90,
1687,
2487,
26,
335,
797,
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_inline_into_for_loop2() {
test(
concat!(
"function calculate_hashCode() {",
" let values = [1, 2, 3, 4, 5];",
" let hashCode = 1;",
" for (let $array = values, i = 0; i < $array.length; i++) {",
" let e = $array[i];",
... | rust_cleaned_test_functions.jsonl/27702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41871,
45514,
5478,
17198,
17,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
330,
1688,
11047,
8950,
2078,
368,
314,
756,
310,
330,
220,
1077,
2750,
284,
508,
16,
11,
220,
17,
11,
220,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_body_with_partial_json_string_and_extra_fields() {
let _m = mock("POST", "/")
.match_body(Matcher::PartialJsonString(
"{\"foo\": \"bar\", \"hello\": \"world\"}".to_string(),
))
.create();
let (status, _, _) = request_with_body("POST /", "", r#"{... | rust_cleaned_test_functions.jsonl/82395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
14114,
6615,
52068,
9455,
3904,
8378,
31858,
12132,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
2946,
497,
3521,
1138,
286,
659,
6347,
14114,
3189,
28058,
486,
37314,
5014,
703,
1006,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delimited_paren() {
assert_eq!(
apply(node, "node", "(abc)"),
build_token(b::parens(vec![b::bare("abc")]))
);
assert_eq!(
apply(node, "node", "( abc )"),
build_token(b::parens(vec![b::ws(" "), b::bare("abc"), b::ws(" ")... | rust_cleaned_test_functions.jsonl/46725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 673
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18029,
31511,
620,
9151,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
6958,
11,
330,
3509,
497,
11993,
13683,
8,
4461,
310,
1936,
6458,
1883,
486,
3380,
4412,
25592,
20703,
65,
486,
54102,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_char_to_suit() {
// valid input
assert_eq!(char_to_suit('s'), 0);
assert_eq!(char_to_suit('h'), 1);
// invalid input
assert_eq!(char_to_suit('x'), u8::MAX);
assert_eq!(char_to_suit(' '), u8::MAX);
} | rust_cleaned_test_functions.jsonl/68070 | {
"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,
9232,
2346,
643,
3083,
368,
341,
286,
442,
2697,
1946,
198,
286,
2060,
10714,
10297,
1762,
2346,
643,
3083,
492,
82,
4567,
220,
15,
317,
286,
2060,
10714,
10297,
1762,
2346,
643,
3083,
492,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_armshift() {
use super::arm_shifter::*;
use super::ArmShift::*;
use libc::c_uint;
fn t(shift_type_value: (arm_shifter, c_uint), arm_shift: ArmShift) {
let (shift_type, value) = shift_type_value;
assert_eq!(arm_shift, ArmShift::new(shift_ty... | rust_cleaned_test_functions.jsonl/19228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34680,
13418,
368,
341,
286,
990,
2256,
486,
2178,
3712,
37700,
56162,
286,
990,
2256,
486,
32913,
24841,
56162,
286,
990,
42142,
486,
66,
15807,
401,
286,
5168,
259,
90278,
1819,
3142,
25,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bump_fee_reduce_single_recipient() {
let (wallet, _, _) = get_funded_wallet(get_test_wpkh());
let addr = Address::from_str("2N1Ffz3WaNzbeLFBb51xyFMHYSEUXcbiSoX").unwrap();
let (psbt, mut original_details) = wallet
.create_tx(
TxBuilder::new()
... | rust_cleaned_test_functions.jsonl/11357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1510,
34305,
64596,
19487,
7080,
14117,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
10789,
284,
9177,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_handle_backup_task() {
let limiter = Arc::new(IORateLimiter::new_for_test());
let stats = limiter.statistics().unwrap();
let (tmp, endpoint) = new_endpoint_with_limiter(Some(limiter));
let engine = endpoint.engine.clone();
endpoint
.region_inf... | rust_cleaned_test_functions.jsonl/14846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1778
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
44710,
12184,
368,
341,
286,
1077,
4568,
2015,
284,
19689,
486,
931,
8972,
868,
349,
43,
17700,
486,
931,
5478,
4452,
1423,
286,
1077,
10472,
284,
4568,
2015,
91684,
1005,
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... | 8 |
#[test]
fn test_metatable() -> Result<()> {
#[derive(Copy, Clone)]
struct MyUserData(i64);
impl UserData for MyUserData {
fn add_fields<'lua, F: UserDataFields<'lua, Self>>(fields: &mut F) {
fields.add_meta_field_with("__type_name", |_| Ok("MyUserData"));
}
fn a... | rust_cleaned_test_functions.jsonl/40500 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1020
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44517,
15086,
368,
1464,
5714,
71698,
341,
262,
11506,
27098,
3025,
1266,
11,
27913,
5563,
262,
2036,
3017,
39485,
1956,
21,
19,
626,
262,
11605,
71294,
369,
3017,
39485,
341,
286,
5168,
912,
1213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_not_a_cart() {
let fake_stream: Vec<u8> = "0123456".as_bytes().to_vec();
assert!(!cart::is_cart(&fake_stream[..]));
} | rust_cleaned_test_functions.jsonl/69926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
4306,
24186,
368,
341,
262,
1077,
12418,
12673,
25,
11312,
34837,
23,
29,
284,
330,
15,
16,
17,
18,
19,
20,
21,
3263,
300,
12524,
1005,
983,
13251,
543,
262,
2060,
0,
3471,
11452,
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 |
#[test]
fn test_status_no_tasks() {
let dir = tempdir().unwrap();
let repo = init_repo_with_tasks(dir.path(), &[]);
check_current_status(&repo, DisplayMode::ShowAll, "");
} | rust_cleaned_test_functions.jsonl/36273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
6536,
32823,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
15867,
284,
2930,
37784,
6615,
32823,
14161,
3875,
1507,
609,
56703,
286,
1779,
11080,
4773,
2099,
23476,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_decodererror_try_from_usize() {
for value in DecoderError::values() {
let converted = <DecoderError as TryFrom<usize>>::try_from(value as usize).unwrap();
assert_eq!(converted, value);
}
assert!(<DecoderError as TryFrom<usize>>::try_from(IcedConstants::DECODER_ERROR_ENUM_COUNT).is_err());... | rust_cleaned_test_functions.jsonl/24245 | {
"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,
49843,
841,
53283,
5673,
11306,
551,
368,
341,
2023,
897,
304,
50472,
1454,
486,
3661,
368,
341,
197,
10217,
16099,
284,
366,
20732,
1454,
438,
9735,
3830,
90244,
77595,
1539,
5673,
3679,
438,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bnq() {
let code = vec![0xD0, 0xF9]; // offset is -7.
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.Z = 0;
nes.next(&mut memory).unwrap();
assert_eq!(0x7FFB, nes.PC);
} | rust_cleaned_test_functions.jsonl/38704 | {
"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,
58112,
80,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
15764,
15,
11,
220,
15,
9770,
24,
5265,
442,
4347,
374,
481,
22,
624,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
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_to_base64() {
let cases = vec![
("", ""),
("abc", "YWJj"),
("ab c", "YWIgYw=="),
("1", "MQ=="),
("1.1", "MS4x"),
("ab\nc", "YWIKYw=="),
("ab\tc", "YWIJYw=="),
("qwerty123456", "cXdlcnR5MTIzNDU... | rust_cleaned_test_functions.jsonl/10187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1601
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
7651,
21,
19,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
497,
72712,
310,
3489,
13683,
497,
330,
98117,
41,
73,
4461,
310,
3489,
370,
272,
497,
330,
56,
60195,
70,
56,
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,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_and_with_one_gte_parse() {
let name1 = _random_string(10);
let value1 = _random_string(10);
let json = format!(r#"{{"$and":[{{"~{}":{{"$gte":"{}"}}}}]}}"#, name1, value1);
let query = parse_from_json(&json).unwrap();
let expected = Operator::And(
... | rust_cleaned_test_functions.jsonl/11828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
6615,
11667,
1889,
665,
21039,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
2951,
284,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
assert_eq!(
apply(
r#"
"ab\"c" +
"#
.trim()
),
Ok(vec![
Token::String(span(1, 1, "\"ab\\\"c\"")),
Token::Symbol(span(1, 9, "+"))
])
)
} | rust_cleaned_test_functions.jsonl/27563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
1006,
394,
435,
2,
698,
1,
370,
2105,
66,
1,
3610,
1,
4956,
503,
659,
10666,
741,
310,
2837,
310,
7622,
25592,
90515,
394,
9660,
486,
703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
test_from_t(&"284222f9-aba2-4b05-bcf5-e4e727fe34d1".to_string());
} | rust_cleaned_test_functions.jsonl/114566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
368,
341,
286,
1273,
5673,
528,
2099,
1,
17,
23,
19,
17,
17,
17,
69,
24,
12,
12004,
17,
12,
19,
65,
15,
20,
1455,
9792,
20,
5655,
19,
68,
22,
17,
22,
1859,
18,
19,
67,
16,
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 |
#[test]
fn test_next_token_renard_snippet() {
let input = r###"
let five = 5;
let ten = 10;
let add = fn(x, y) {
x + y;
};
let result = add(five, ten);
"kobushka";
[1, 2];
"###
.to_string();
le... | rust_cleaned_test_functions.jsonl/120532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
6458,
1288,
96932,
28022,
21581,
368,
341,
286,
1077,
1946,
284,
435,
14374,
698,
688,
1077,
4236,
284,
220,
20,
280,
688,
1077,
5779,
284,
220,
16,
15,
401,
688,
1077,
912,
284,
5168,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u32() {
const VALUE: u32 = u32_from_bytes!("aabb");
assert_eq!(0x62626161, VALUE);
} | rust_cleaned_test_functions.jsonl/114327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 60
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
18,
17,
368,
341,
262,
733,
26827,
25,
575,
18,
17,
284,
575,
18,
17,
5673,
12524,
17223,
64,
12523,
797,
262,
2060,
10714,
10297,
15,
87,
21,
17,
21,
17,
21,
16,
21,
16,
11,
26827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bye_run() {
use std::fs::File;
let cmd = CommandData {
program: "clear".to_string(),
options: vec![],
out: Some(File::create("/dev/null").unwrap()),
input: None,
};
assert!(run(cmd).is_ok());
} | rust_cleaned_test_functions.jsonl/1819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3710,
68,
14007,
368,
341,
262,
990,
1460,
486,
3848,
486,
1703,
401,
262,
1077,
5439,
284,
7348,
1043,
341,
286,
2025,
25,
330,
7422,
3263,
983,
3904,
3148,
286,
2606,
25,
7486,
20703,
1259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_selectors_with_quoted_identifiers() {
let selector_str = "\"unnamed\", other_identifier, \"&\" > \"abc\":nth-child(0)";
let expected = vec![
SelectorRaw {
node_selectors: vec![NodeSelectorRaw {
node_kind: "unnamed".into(),
... | rust_cleaned_test_functions.jsonl/56565 | {
"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,
45233,
13051,
1087,
6615,
11280,
9253,
38399,
11836,
368,
341,
286,
1077,
9367,
2895,
284,
15898,
14931,
3606,
16215,
1008,
33176,
11,
7245,
5,
2105,
861,
7245,
13683,
11693,
51738,
23484,
7,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_determine_prefixes_actually_subsamples() {
let library = test_library();
let lookup = Count::build_lookup(&library, false);
let mut reads = vec![];
for _ in 0..100 {
reads.push(format!("ttttt{}ttttt", library.guides[0].bases_str))
}
fo... | rust_cleaned_test_functions.jsonl/72864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
24308,
13974,
288,
29370,
1832,
5228,
41118,
368,
341,
286,
1077,
6733,
284,
1273,
39461,
543,
286,
1077,
18615,
284,
4504,
486,
5834,
27464,
2099,
18065,
11,
895,
626,
286,
1077,
5206,
15804... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gif() {
let info = Infer::new();
assert_eq!(infer::Type {
mime: String::from("image/gif"),
ext: String::from("gif"),
},
info.get(&fs::read("testdata/sample.gif").unwrap()).unwrap());
} | rust_cleaned_test_functions.jsonl/110131 | {
"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,
1889,
333,
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,
90831,
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_duplicate_rollback_then_vote_success() {
let SelectVoteAndResetForkResult {
vote_bank,
reset_bank,
heaviest_fork_failures,
} = run_test_duplicate_rollback_then_vote(4);
assert_matches!(
vote_bank
.m... | rust_cleaned_test_functions.jsonl/25830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
62,
33559,
68367,
54360,
18632,
368,
341,
286,
1077,
8427,
41412,
3036,
14828,
37,
669,
2077,
341,
310,
6910,
35733,
345,
310,
7585,
35733,
345,
310,
566,
98362,
761,
669,
22121,
1413,
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_random_access_invert() {
let xs = [1, 2, 3, 4, 5];
check_randacc_iter(xs.iter().invert(), xs.len());
let mut it = xs.iter().invert();
it.next();
it.next_back();
it.next();
check_randacc_iter(it, xs.len() - 3);
} | rust_cleaned_test_functions.jsonl/1027 | {
"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,
22644,
12759,
1243,
1621,
368,
341,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1779,
33864,
4475,
11723,
53322,
19471,
1005,
83729,
1507,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_fmt_one_character() {
let one_length_location = SourceFileLocation::new("test_file.s", 1, 1, 1);
assert_eq!(format!("{}", one_length_location), "test_file.s:1:1");
} | rust_cleaned_test_functions.jsonl/46047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
38128,
11667,
40988,
368,
341,
262,
1077,
825,
5118,
13126,
284,
8748,
1703,
4707,
486,
931,
445,
1944,
2458,
514,
497,
220,
16,
11,
220,
16,
11,
220,
16,
317,
262,
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 |
#[test]
fn test_vec_deque_truncate_drop() {
static mut DROPS: u32 = 0;
#[derive(Clone)]
struct Elem(i32);
impl Drop for Elem {
fn drop(&mut self) {
unsafe {
DROPS += 1;
}
}
}
let v = vec![Elem(1), Elem(2), Elem(3), Elem(4), Elem(5)... | rust_cleaned_test_functions.jsonl/80664 | {
"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,
13251,
2259,
591,
3547,
26900,
29584,
368,
341,
262,
1099,
5206,
422,
1285,
5012,
25,
575,
18,
17,
284,
220,
15,
280,
262,
11506,
27098,
65297,
5563,
262,
2036,
78768,
1956,
18,
17,
317,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arithmetic_on_tuple() {
assert_eq!(
Value::from((1, 2, 3)).add(Value::from((2, 3))).unwrap(),
Value::from((1, 2, 3, 2, 3))
);
assert_eq!(
Value::from((1, 2, 3)).mul(Value::from(3)).unwrap(),
Value::from((1,... | rust_cleaned_test_functions.jsonl/62158 | {
"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,
25842,
25922,
4470,
21773,
368,
341,
1789,
286,
2060,
10714,
33673,
310,
5162,
486,
1499,
1188,
16,
11,
220,
17,
11,
220,
18,
4579,
718,
25346,
486,
1499,
1188,
17,
11,
220,
18,
36334,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_size() {
assert_eq!(
Cube {
x0: 0,
x1: 0,
y0: 0,
y1: 0,
z0: 0,
z1: 0,
}
.size(),
1
);
assert_eq!(
Cube {
... | rust_cleaned_test_functions.jsonl/8203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 428
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2368,
368,
341,
286,
2060,
10714,
33673,
310,
42592,
341,
394,
856,
15,
25,
220,
15,
345,
394,
856,
16,
25,
220,
15,
345,
394,
379,
15,
25,
220,
15,
345,
394,
379,
16,
25,
220,
15,
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_capabilities() {
assert_eq!(
p2p::types::Capabilities::from_bits_truncate(0b00000000 as u32),
p2p::types::Capabilities::UNKNOWN
);
assert_eq!(
p2p::types::Capabilities::from_bits_truncate(0b10000000 as u32),
p2p::types::Capabilities::UNKNOWN
);
assert_eq!(
p2p::types::Capabilitie... | rust_cleaned_test_functions.jsonl/2861 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
92092,
368,
341,
6948,
10714,
33673,
197,
3223,
17,
79,
486,
9242,
486,
55315,
486,
1499,
20034,
3547,
26900,
7,
15,
65,
15,
15,
15,
15,
15,
15,
15,
15,
438,
575,
18,
17,
1326,
197,
3223,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_namespaces() {
let ir = ir_from_cc(
r#"
namespace test_namespace_bindings {
// A free comment
// Struct comment
struct StructWithinNamespace {};
void function_within_namespace();
namespace inner_namespace {
struct... | rust_cleaned_test_functions.jsonl/37236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9187,
27338,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
435,
2,
698,
286,
4473,
1273,
41571,
94516,
341,
688,
442,
362,
1910,
3980,
271,
688,
442,
16139,
3980,
198,
688,
2036,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_change_publishing_option_to_custom() {
// Publishing Option is set to locked at genesis.
let (mut config, genesis_key) = config_builder::test_config();
let (db, mut executor) = create_db_and_executor(&config);
let parent_block_id = executor.committed_block_id();
let treasur... | rust_cleaned_test_functions.jsonl/28486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
58779,
287,
9672,
2346,
15875,
368,
341,
262,
442,
36833,
6959,
374,
738,
311,
16061,
518,
59366,
624,
262,
1077,
320,
6984,
2193,
11,
59366,
3097,
8,
284,
2193,
28532,
486,
1944,
5332,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nested() {
struct Foo;
impl Debug for Foo {
fn fmt(&self, fmt: &mut Formatter) {
fmt.debug_map()
.entry(&"bar", &true)
.entry(&10, &format_args!("{}/{}", 10, 20))
.finish()
}
... | rust_cleaned_test_functions.jsonl/124755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 649
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
368,
341,
286,
2036,
33428,
401,
286,
11605,
11091,
369,
33428,
341,
310,
5168,
8879,
2099,
721,
11,
8879,
25,
609,
6984,
81387,
8,
341,
394,
8879,
7883,
5376,
741,
503,
659,
4085,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u128_overflow() {
Python::with_gil(|py| {
let obj = py.eval("1 << 130", None, None).unwrap();
let err = obj.extract::<u128>().unwrap_err();
assert!(err.is_instance::<crate::exceptions::PyOverflowError>(py));
})
} | rust_cleaned_test_functions.jsonl/24284 | {
"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,
7300,
16,
17,
23,
79073,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
2839,
284,
4510,
31710,
445,
16,
1115,
220,
16,
18,
15,
497,
2240,
11,
2240,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parser1() {
let r = parse_identifier("a");
assert_eq!(r.unwrap().1, "a");
let r = parse_identifier("ab");
assert_eq!(r.unwrap().1, "ab");
let r = parse_identifier("_a_b3_");
assert_eq!(r.unwrap().1, "_a_b3_");
let r = parse_identifier("#");... | rust_cleaned_test_functions.jsonl/76592 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
16,
368,
341,
286,
1077,
435,
284,
4715,
33176,
445,
64,
797,
286,
2060,
10714,
10297,
81,
55395,
1005,
16,
11,
330,
64,
797,
286,
1077,
435,
284,
4715,
33176,
445,
370,
797,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug_fmt() {
let timestamp = utc_timestamp(1485688933);
let dgram = Datagram {
header: Header {
timestamp,
channel: 0x11,
destination_address: 0x1213,
source_address: 0x1415,
protocol_ve... | rust_cleaned_test_functions.jsonl/54008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
38128,
368,
341,
286,
1077,
11441,
284,
69596,
23073,
7,
16,
19,
23,
20,
21,
23,
23,
24,
18,
18,
626,
286,
1077,
294,
1520,
284,
96804,
341,
310,
4247,
25,
12104,
341,
394,
11441,
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_insertion_sort() {
let mut shuffled = get_shuffled_vec().into_iter().map(|x| x as usize).collect();
let sorted: Vec<i32> = key_indexed_counting_sort(shuffled)
.into_iter()
.map(|x| x as i32)
.collect();
assert_eq!(get_sorted_vec(), sort... | rust_cleaned_test_functions.jsonl/38401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
290,
18435,
368,
341,
286,
1077,
5206,
74271,
284,
633,
3712,
42335,
13251,
1005,
18122,
11723,
1005,
2186,
22428,
87,
91,
856,
438,
22301,
568,
17384,
543,
286,
1077,
10615,
25,
11312,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_verifying_exit_codes() {
Command::cargo_bin("specdown")
.unwrap()
.arg("--no-colour")
.arg("run")
.arg("--running-dir")
.arg(".specdown")
.arg("docs/specs/verifying_exit_codes.md")
.assert()
.success();
} | rust_cleaned_test_functions.jsonl/104099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
26042,
7766,
16880,
38482,
368,
341,
262,
7348,
486,
66715,
21816,
445,
9535,
2923,
1138,
286,
659,
15454,
741,
286,
659,
858,
21549,
2152,
19459,
413,
1138,
286,
659,
858,
445,
6108,
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... | 1 |
#[test]
fn test_t2() {
let env = env_1!();
let (r, sioe) = do_execute!(
&env,
&["-e", "a(b)c", "-f", "$1", "--color", "always"],
"abcabca"
);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(buff!(sioe, sout), "<S>b<E><S>b<E>a\n");
... | rust_cleaned_test_functions.jsonl/76268 | {
"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,
528,
17,
368,
341,
286,
1077,
6105,
284,
6105,
62,
16,
0,
543,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
33673,
310,
609,
3160,
345,
310,
609,
1183,
12,
68,
497,
330,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_variance_degen() {
let variance = |x: Pareto| x.variance().unwrap();
test_case(1.0, 1.0, f64::INFINITY, variance); // shape <= 2.0
} | rust_cleaned_test_functions.jsonl/18749 | {
"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,
77450,
2259,
4370,
368,
341,
286,
1077,
32273,
284,
760,
87,
25,
74185,
983,
91,
856,
19526,
5284,
1005,
15454,
543,
286,
1273,
19096,
7,
16,
13,
15,
11,
220,
16,
13,
15,
11,
282,
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 |
#[test]
fn test_name_not_overwritten() {
let mut os = OsContext {
name: "Properly defined name".to_string().into(),
raw_description: "Linux 4.4.0".to_string().into(),
..OsContext::default()
};
normalize_os_context(&mut os);
assert_eq_dbg!(Some("Properly defined name"), o... | rust_cleaned_test_functions.jsonl/68962 | {
"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,
1269,
7913,
15431,
25569,
368,
341,
262,
1077,
5206,
2643,
284,
15433,
1972,
341,
286,
829,
25,
330,
1336,
712,
398,
4512,
829,
3263,
983,
3904,
1005,
18122,
3148,
286,
7112,
11448,
25,
330,
463... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_synthesis_sync_rom() {
let mut uut = SyncROMTest::new();
uut.rom.address.connect();
uut.rom.clock.connect();
uut.connect_all();
let vlog = generate_verilog(&uut);
println!("{}", vlog);
yosys_validate("srom", &vlog).unwrap();
} | rust_cleaned_test_functions.jsonl/72890 | {
"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,
51393,
13189,
23008,
81383,
368,
341,
262,
1077,
5206,
575,
332,
284,
28937,
3361,
2271,
486,
931,
543,
262,
575,
332,
13,
441,
13792,
10800,
543,
262,
575,
332,
13,
441,
50546,
10800,
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_timestamp_comparisons() {
let nil_timestamp = Timestamp::from_nanoseconds(0).unwrap();
assert_eq!(nil_timestamp.time, None);
assert_eq!(nil_timestamp.nanoseconds(), 0);
let timestamp1 = Timestamp::from_nanoseconds(1).unwrap();
let dt: OffsetDateTime = tim... | rust_cleaned_test_functions.jsonl/86043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 740
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
2965,
1732,
19379,
368,
341,
286,
1077,
2092,
23073,
284,
32758,
486,
1499,
73936,
75889,
7,
15,
568,
15454,
543,
286,
2060,
10714,
10297,
8385,
23073,
6378,
11,
2240,
317,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_flag_off_prereq() {
let store = TestStore::new();
let flag = store.flag("flagWithOffPrereq").unwrap().clone();
assert!(flag.on);
let alice = User::with_key("alice").build();
let detail = evaluate(&store, &flag, &alice, None);
assert_that!(de... | rust_cleaned_test_functions.jsonl/133345 | {
"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,
21296,
10933,
13651,
5294,
485,
80,
368,
341,
286,
1077,
3553,
284,
3393,
6093,
486,
931,
543,
286,
1077,
5181,
284,
3553,
41230,
445,
9903,
2354,
4596,
3533,
485,
80,
1827,
15454,
1005,
19982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_loopy_setters() {
let mut loopy = Loopy::new();
loopy.set_xcoarse(0b1111_1111);
assert_eq!(loopy.xcoarse(), 0b11111);
loopy.set_xcoarse(0);
loopy.set_ycoarse(0b1111_1111);
assert_eq!(loopy.ycoarse(), 0b11111);
loopy.set_ycoarse(0);
... | rust_cleaned_test_functions.jsonl/64471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5560,
1266,
2602,
5045,
368,
341,
286,
1077,
5206,
775,
1266,
284,
6485,
1266,
486,
931,
1428,
286,
775,
1266,
980,
3212,
1015,
2583,
7,
15,
65,
16,
16,
16,
16,
62,
16,
16,
16,
16,
317,
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_create_schema_success() {
let _setup = SetupMocks::init();
let (did, schema_name, schema_version, data) = prepare_schema_data();
create_and_publish_schema("test_create_schema_success",
did,
schema_name,
... | rust_cleaned_test_functions.jsonl/33229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
25371,
18632,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
320,
22920,
11,
10802,
1269,
11,
10802,
9438,
11,
821,
8,
284,
10549,
25371,
1769,
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... | 1 |
#[test]
fn test_interleave() {
let mut buf = [Dibit::default(); 98];
for i in 0..98 {
buf[i] = Dibit::new(i as u8 % 4);
}
let mut int = Interleaver::new(buf);
for _ in 0..13 {
assert_eq!(int.next().unwrap().bits(), 0b00);
assert_eq!(... | rust_cleaned_test_functions.jsonl/28514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15318,
21510,
368,
341,
286,
1077,
5206,
6607,
284,
508,
35,
579,
275,
486,
2258,
2129,
220,
24,
23,
4821,
286,
369,
600,
304,
220,
15,
496,
24,
23,
341,
310,
6607,
989,
60,
284,
422,
579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_import() {
test! {
let sym = AST::SimpleIdentifier(SimpleIdentifier::new_wrapped("ggplot".to_string()));
let import = AST::ImportNode(ImportNode::new_wrapped(sym));
let r_node = import.to_r_ast_node(0);
assert_eq!(r_node, eval_string("call(... | rust_cleaned_test_functions.jsonl/75442 | {
"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,
18434,
368,
341,
286,
1273,
0,
341,
310,
1077,
7886,
284,
22465,
486,
16374,
8714,
3759,
6456,
8714,
486,
931,
44074,
5677,
445,
14398,
4469,
3263,
983,
3904,
7392,
310,
1077,
1159,
284,
22465,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fold_logical_op2() {
fold("x = function(){} && x", "x = x");
fold("x = true && function(){}", "x = function(){}");
fold(
"x = [(function(){alert(x)})()] && x",
"x = (function() { alert(x); }(), x);",
);
} | rust_cleaned_test_functions.jsonl/122171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
86484,
10287,
17,
368,
341,
262,
11555,
445,
87,
284,
729,
368,
6257,
1009,
856,
497,
330,
87,
284,
856,
797,
262,
11555,
445,
87,
284,
830,
1009,
729,
368,
42351,
330,
87,
284,
729,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_declaration2() {
use ast::DerivedDeclarator::Pointer;
use ast::Enumerator;
use ast::StorageClassSpecifier::Typedef;
use ast::TypeQualifier::Const;
use parser::declaration;
let env = &mut Env::new();
assert_eq!(
declaration("typedef enum { FOO, BAR = 1 } * co... | rust_cleaned_test_functions.jsonl/107549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 904
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77926,
17,
368,
341,
262,
990,
11763,
486,
67843,
1912,
12821,
850,
486,
9084,
280,
262,
990,
11763,
486,
10461,
280,
262,
990,
11763,
486,
5793,
1957,
87297,
486,
12834,
4219,
280,
262,
990,
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_constructor() {
let board = Board::new(3);
assert!(
board.board
== vec![
Cell::EMPTY,
Cell::EMPTY,
Cell::EMPTY,
Cell::EMPTY,
Cell::EMPTY,
Cell::EMPTY,
Cell:... | rust_cleaned_test_functions.jsonl/84052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 673
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66210,
368,
341,
262,
1077,
4479,
284,
8751,
486,
931,
7,
18,
317,
262,
2060,
33673,
286,
4479,
25205,
198,
310,
621,
7486,
90515,
394,
13972,
486,
32858,
345,
394,
13972,
486,
32858,
345,
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_be_var_u64() {
let res: IResult<&[u8], u64> = be_var_u64(b"\x12\x34\x56");
let (_, v) = res.expect("be_var_u64 failed");
assert_eq!(v, 0x123456);
} | rust_cleaned_test_functions.jsonl/51155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21263,
4612,
7300,
21,
19,
368,
341,
286,
1077,
592,
25,
358,
2077,
52244,
58,
84,
23,
1125,
575,
21,
19,
29,
284,
387,
4612,
7300,
21,
19,
1883,
11934,
87,
16,
17,
3462,
18,
19,
3462,
20,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_op_parse_onebyte() {
// Doesn't matter for this test.
let encoding = encoding4();
// Test all single-byte opcodes.
#[rustfmt::skip]
let inputs = [
(
constants::DW_OP_deref,
Operation::Deref {
... | rust_cleaned_test_functions.jsonl/45746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
21039,
11667,
3782,
368,
341,
286,
442,
48832,
944,
4925,
369,
419,
1273,
624,
286,
1077,
11170,
284,
11170,
19,
1428,
286,
442,
3393,
678,
3175,
53952,
1179,
25814,
624,
286,
11506,
35788,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tree_color_arrangement() {
let mut tree = RBTree::new();
assert!(tree.root.is_none());
tree.insert("b", &rand_string_gen());
assert_eq!(tree.root.as_ref().unwrap().borrow().color, Color::Black);
tree.insert("a", &rand_string_gen());
assert_eq!(tr... | rust_cleaned_test_functions.jsonl/62001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
6714,
11210,
56633,
368,
341,
286,
1077,
5206,
4916,
284,
27974,
6533,
486,
931,
543,
286,
2060,
10297,
9344,
12576,
2079,
31488,
5231,
286,
4916,
7030,
445,
65,
497,
609,
11335,
3904,
1632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ensure_focused_line_is_visible_centers_focus_line_after_big_jump() {
let fj = parse_top_level_json(TALL_OBJECT.to_owned()).unwrap();
let mut viewer = JsonViewer::new(fj, Mode::Line);
viewer.dimensions.height = 9;
viewer.scrolloff_setting = 2;
assert_windo... | rust_cleaned_test_functions.jsonl/41768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
27289,
761,
20387,
6528,
6892,
34371,
80179,
47492,
6528,
19844,
36386,
65436,
368,
341,
286,
1077,
75371,
284,
4715,
10426,
8274,
9455,
4140,
3919,
13442,
2389,
51973,
6011,
15454,
543,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vault_command_parser_returns_error_for_unsupported_command() {
let command_name = format!("not_a_command");
let args = format!("'/data/key', 'test'");
let result = VaultCommand::parse(&command_name, &args);
assert_eq!(result.is_err(), true);
let error = ... | rust_cleaned_test_functions.jsonl/113265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
945,
10811,
18517,
58900,
4096,
5478,
4907,
18216,
10811,
368,
341,
286,
1077,
3210,
1269,
284,
3561,
17223,
1921,
4306,
10811,
797,
286,
1077,
2827,
284,
3561,
17223,
20177,
691,
68864,
516,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_constant() -> Result<()> {
struct Test {
name: &'static str,
data_type: DataTypePtr,
value: DataValue,
size: usize,
column_expected: ColumnRef,
}
let tests = vec![
Test {
name: "boolean",
data_type: Boole... | rust_cleaned_test_functions.jsonl/3793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
34967,
368,
1464,
5714,
71698,
341,
262,
2036,
3393,
341,
286,
829,
25,
30136,
1978,
607,
345,
286,
821,
1819,
25,
33172,
5348,
345,
286,
897,
25,
2885,
1130,
345,
286,
1379,
25,
22301,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_u64_opt_len() {
use std::{u64, usize};
assert_eq!(Some(100), (0..100u64).into_par_iter().opt_len());
assert_eq!(
Some(usize::MAX),
(0..usize::MAX as u64).into_par_iter().opt_len()
);
if (usize::MAX as u64) < u64::MAX {
assert_eq!(
None,
... | rust_cleaned_test_functions.jsonl/69638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
21,
19,
15032,
6043,
368,
341,
262,
990,
1460,
22964,
84,
21,
19,
11,
22301,
2440,
262,
2060,
10714,
10297,
8373,
7,
16,
15,
15,
701,
320,
15,
496,
16,
15,
15,
84,
21,
19,
568,
18122... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prepare_if_nonce_account_expected() {
let (
pre_account_address,
pre_account,
mut post_account,
blockhash,
lamports_per_signature,
maybe_fee_payer_account,
) = create_accounts_prepare_if_nonce_account();
... | rust_cleaned_test_functions.jsonl/63372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 542
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
11119,
48508,
13500,
32190,
368,
341,
286,
1077,
2399,
310,
855,
13500,
6744,
345,
310,
855,
13500,
345,
310,
5206,
1736,
13500,
345,
310,
2504,
8296,
345,
310,
31603,
3394,
5678,
39859,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_codec() {
let cases = vec![
("-10.55", 4, 2, Res::Ok("-10.55")),
(
"0.0123456789012345678912345",
30,
25,
Res::Ok("0.0123456789012345678912345"),
),
("12345", 5, 0, Res::Ok("12... | rust_cleaned_test_functions.jsonl/40310 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51084,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
98670,
16,
15,
13,
20,
20,
497,
220,
19,
11,
220,
17,
11,
1800,
486,
11578,
13645,
16,
15,
13,
20,
20,
30154,
310,
2399,
394,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_infinite_recursion() {
let tmp_dir = TempDir::new().expect("failed to make tempdir");
let err = Exporter::new(
PathBuf::from("tests/testdata/input/infinite-recursion/"),
tmp_dir.path().to_path_buf(),
)
.run()
.unwrap_err();
match err {
ExportErro... | rust_cleaned_test_functions.jsonl/116602 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
25722,
7080,
34280,
368,
341,
262,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
1005,
17119,
445,
16091,
311,
1281,
2730,
3741,
3071,
262,
1077,
1848,
284,
22191,
261,
486,
931,
1006,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_from_arg_matches_version() {
let argv = vec!["lsd", "--versionsort"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
assert_eq!(
Some(SortColumn::Version),
SortColumn::from_arg_matches(&matches)
);
} | rust_cleaned_test_functions.jsonl/54293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6057,
38344,
9438,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
28290,
371,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
1005,
455,
38344,
5673,
34067,
15329,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_callback_on_drop() {
let mut data = TestData {
x: 10,
y: true,
str: "Test".to_string(),
};
let mut local_backing = LocalBacking {
memories: Map::new().into_boxed_map(),
tables: Map::new().into_boxed_map(),
... | rust_cleaned_test_functions.jsonl/83916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 710
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12519,
4470,
29584,
368,
341,
286,
1077,
5206,
821,
284,
93200,
341,
310,
856,
25,
220,
16,
15,
345,
310,
379,
25,
830,
345,
310,
607,
25,
330,
2271,
3263,
983,
3904,
3148,
286,
2605,
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... | 1 |
#[test]
fn test_iter() {
let symbols: Vec<_> = create_iter().collect().expect("collect");
let expected = [
Symbol {
index: SymbolIndex(0x4),
data: &[0x4e, 0x11], // S_INLINESITE_END
},
Symbol {
... | rust_cleaned_test_functions.jsonl/109253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
368,
341,
310,
1077,
17738,
25,
11312,
32399,
29,
284,
1855,
11723,
1005,
17384,
1005,
17119,
445,
17384,
3071,
310,
1077,
3601,
284,
2278,
394,
19612,
341,
503,
1922,
25,
19612,
1552,
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_lagrange_multiplicative() {
let mut rng = rand::thread_rng();
let x = Scalar::random(&mut rng);
let lagrange_constants = Signer::calculate_lagrange_constants(T);
let coefficients: Vec<Scalar> = (0..T).map(|_| Scalar::random(&mut rng)).collect();
let mu... | rust_cleaned_test_functions.jsonl/104908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
351,
9669,
91802,
65266,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
1428,
286,
1077,
856,
284,
35176,
486,
11463,
2099,
6984,
28422,
626,
286,
1077,
21454,
9669,
55642,
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... | 3 |
#[test]
fn test_rect() {
let rect = Rect::new(coord! { x: 0., y: 0. }, coord! { x: 1., y: 2. });
let want = rect.to_polygon().lines_iter().collect::<Vec<_>>();
assert_eq!(want, rect.lines_iter().collect::<Vec<_>>());
} | rust_cleaned_test_functions.jsonl/83538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16979,
368,
341,
286,
1077,
7608,
284,
11920,
486,
931,
65037,
0,
314,
856,
25,
220,
15,
2572,
379,
25,
220,
15,
13,
2470,
16489,
0,
314,
856,
25,
220,
16,
2572,
379,
25,
220,
17,
13,
1625... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buf_position_err_comment_2_buf() {
let mut r = Reader::from_str("<a><!--b>");
r.trim_text(true).check_end_names(true);
let mut buf = Vec::new();
let _ = r.read_event(&mut buf).unwrap();
assert_eq!(r.buffer_position(), 3);
let mut buf = Vec::new();
match r.read_event... | rust_cleaned_test_functions.jsonl/42090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10363,
9661,
9266,
17638,
62,
17,
10363,
368,
341,
262,
1077,
5206,
435,
284,
25166,
486,
1499,
2895,
9639,
64,
13301,
65,
15084,
262,
435,
16419,
4326,
3715,
568,
2028,
6213,
9187,
3715,
626,
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... | 3 |
#[test]
fn test_draw_antialiased_line_segment_rgb() {
use image::{Rgb};
use imageproc::drawing::draw_antialiased_line_segment_mut;
use imageproc::pixelops::interpolate;
let blue = Rgb([0, 0, 255]);
let mut image = RgbImage::from_pixel(200, 200, blue);
let white = Rgb([255, 255, 255]);
... | rust_cleaned_test_functions.jsonl/20079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
62460,
81064,
1475,
6528,
28061,
37407,
368,
341,
262,
990,
2168,
22964,
80951,
2440,
262,
990,
2168,
15782,
486,
80849,
486,
7633,
62460,
81064,
1475,
6528,
28061,
29523,
280,
262,
990,
2168... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_trim_start() {
assert_eq!("".trim_start(), "");
assert_eq!("a".trim_start(), "a");
assert_eq!(" ".trim_start(), "");
assert_eq!(" blah".trim_start(), "blah");
assert_eq!(" \u{3000} wut".trim_start(), "wut");
assert_eq!("hey ".trim_start(), "hey ");
} | rust_cleaned_test_functions.jsonl/119394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70025,
4906,
368,
341,
262,
2060,
10714,
17223,
3263,
10666,
4906,
1507,
14498,
262,
2060,
10714,
17223,
64,
3263,
10666,
4906,
1507,
330,
64,
797,
262,
2060,
10714,
17223,
262,
5933,
10666,
4906,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_idents_by_stripping_dot_git() {
let ident1 = ident(&url("https://github.com/PistonDevelopers/piston")).unwrap();
let ident2 = ident(&url("https://github.com/PistonDevelopers/piston.git")).unwrap();
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/21284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
842,
805,
3710,
1261,
461,
10732,
30941,
68801,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
1085,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
15197,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_guild_prune_include_one_role() {
let include_roles = [Id::new(1)];
let route = Route::CreateGuildPrune {
compute_prune_count: None,
days: None,
guild_id: GUILD_ID,
include_roles: &include_roles,
};
assert_eq!... | rust_cleaned_test_functions.jsonl/119967 | {
"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,
8657,
1889,
1498,
5294,
2886,
37878,
11667,
19792,
368,
341,
286,
1077,
2924,
43061,
284,
508,
764,
486,
931,
7,
16,
73663,
286,
1077,
6021,
284,
9572,
486,
4021,
72574,
3533,
2886,
341,
310,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kind_documentation() {
let got = documentation(KIND_DOCUMENTATION, 2).unwrap();
let want = KIND_EXPECTED;
assert_eq!(got, want);
} | rust_cleaned_test_functions.jsonl/87927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33162,
26231,
367,
368,
341,
286,
1077,
2684,
284,
9705,
16738,
5245,
60584,
3495,
11,
220,
17,
568,
15454,
543,
286,
1077,
1366,
284,
9297,
68208,
1479,
280,
286,
2060,
10714,
10297,
22390,
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 |
#[test]
fn test_char_literal() {
test_lexer! {
"'a'",
ast::Token {
span: Span::new(0, 3),
kind: ast::Kind::LitChar,
}
};
test_lexer! {
"'\\u{abcd}'",
ast::Token {
span: Span::new(... | rust_cleaned_test_functions.jsonl/57215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9232,
34100,
368,
341,
286,
1273,
62,
38815,
0,
341,
310,
7178,
64,
38330,
310,
11763,
486,
3323,
341,
394,
9390,
25,
11903,
486,
931,
7,
15,
11,
220,
18,
1326,
394,
3093,
25,
11763,
486,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trait_self() {
check(
r#"
trait Foo where Self$0 {
fn f() -> Self;
}
impl Foo for () {}
"#,
expect![[r#"
Self TypeParam FileId(0) 6..9 6..9
FileId(0) 16..20
FileId(0) 37..41
"#]],
);
} | rust_cleaned_test_functions.jsonl/60673 | {
"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,
78491,
25637,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
29432,
33428,
1380,
10115,
3,
15,
341,
262,
5168,
282,
368,
1464,
10115,
280,
630,
6383,
33428,
369,
1719,
5613,
57676,
345,
310,
1720,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_skip_first_char() {
assert_eq!(skip_next("[test]", ']'), None);
assert_eq!(skip_next("", ']'), None);
assert_eq!(skip_next("🥺test🥺", '🥺'), Some("test🥺"));
} | rust_cleaned_test_functions.jsonl/44007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
12978,
9232,
368,
341,
262,
2060,
10714,
10297,
20599,
11257,
10937,
1944,
19076,
42877,
4567,
2240,
317,
262,
2060,
10714,
10297,
20599,
11257,
19814,
42877,
4567,
2240,
317,
262,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_field_be_empty() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-d", ",", "-f", "3-", "grep", "G"])
.write_stdin("AAA,BBB,CCC,DDD\nEEE,FFF,GGG,HHH\n")
.assert()
.stdout("AAA,BBB,GGG,")
.... | rust_cleaned_test_functions.jsonl/7925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
21263,
15124,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
2099,
1183,
12,
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_deault() -> () {
use trajectory_msgs::msg::*;
let mut msg: JointTrajectoryPoint = Default::default();
msg.positions.push(39.0);
msg.positions.push(34.0);
let mut new_native = WrappedNativeMsg::<JointTrajectoryPoint>::from(&msg);
unsafe { *((*new_na... | rust_cleaned_test_functions.jsonl/28023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
945,
368,
1464,
1719,
341,
286,
990,
34682,
20777,
486,
3236,
56162,
286,
1077,
5206,
3750,
25,
29733,
48138,
23363,
2609,
284,
7899,
486,
2258,
543,
286,
3750,
79513,
2552,
7,
18,
24,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split() {
assert_eq!(
PemBlock::new(
b"-----BEGIN FIRST-----\r\n-----END FIRST-----\r\n\
-----BEGIN SECOND-----\r\n-----END SECOND\r\n\
-----BEGIN THIRD-----\r\n-----END THIRD\r\n"
)
.collect::<Vec<&[u8]... | rust_cleaned_test_functions.jsonl/68794 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
368,
341,
1789,
286,
2060,
10714,
33673,
310,
393,
336,
4713,
486,
931,
1006,
394,
293,
1,
15081,
37588,
34813,
15081,
59,
81,
1699,
15081,
4689,
34813,
15081,
59,
81,
1699,
5661,
310,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_struct_array() {
let size = 32;
let struct_fields = vec![
Field::new("b", DataType::Boolean, true),
Field::new(
"c",
DataType::LargeList(Box::new(Field::new(
"item",
DataType::L... | rust_cleaned_test_functions.jsonl/26775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
15126,
3858,
368,
341,
286,
1077,
1379,
284,
220,
18,
17,
280,
286,
1077,
2036,
12132,
284,
7486,
90515,
310,
8601,
486,
931,
445,
65,
497,
33172,
486,
6890,
11,
830,
1326,
310,
8601,
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_accessor_bounds_validate() {
// file with missing min/max values
let json = import_json("tests/minimal_accessor_invalid.gltf");
let mut errs = vec![];
json.validate(
&json,
gltf_json::Path::new,
&mut |path, err| errs.push((path(), err)),
);
assert_... | rust_cleaned_test_functions.jsonl/122434 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33901,
36878,
42681,
368,
341,
262,
442,
1034,
448,
7402,
1308,
62599,
2750,
198,
262,
1077,
2951,
284,
1159,
9455,
445,
23841,
44173,
2861,
33901,
31433,
1302,
4832,
69,
797,
262,
1077,
5206,
708... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compress_fail() {
TestScenario::new(util_name!())
.ucmd_keepenv()
.args(&[
"ext_sort.txt",
"-n",
"--compress-program",
"nonexistent-program",
"-S",
"10",
])
.fails()
.stderr_only("... | rust_cleaned_test_functions.jsonl/83003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87845,
22121,
368,
341,
262,
3393,
54031,
486,
931,
67811,
1269,
0,
2398,
286,
659,
1754,
2277,
50293,
3160,
741,
286,
659,
2116,
2099,
9640,
310,
330,
427,
18435,
3909,
756,
310,
6523,
77,
756,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_shr() {
use rand::distributions::Standard;
use rand::Rng;
let mut rng = rand::thread_rng();
for p in rng.sample_iter::<i64, _>(&Standard).take(1000) {
let big = BigInt::from(p);
let bigger = &big << 1000;
assert_eq!(&bigger >> 1000, big);
f... | rust_cleaned_test_functions.jsonl/56648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
3712,
81,
368,
341,
262,
990,
10382,
486,
67,
17994,
486,
19781,
280,
262,
990,
10382,
486,
49,
968,
280,
262,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
1428,
262,
369,
281,
304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_seed_stake_delegation_and_deactivation() {
solana_logger::setup();
let TestValidator {
server,
leader_data,
alice,
ledger_path,
vote_pubkey,
..
} = TestValidator::run();
let (sender, receiver) = channel();
run_local_faucet(alic... | rust_cleaned_test_functions.jsonl/60555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33809,
1261,
726,
2259,
87566,
8378,
2259,
23002,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remainder() {
let remainders = [["123456", "100", "56"], ["7", "3", "1"], ["3", "6", "3"]];
for item in remainders.iter() {
assert_eq!(
FieldElement::from_dec_str(item[0]).unwrap()
% FieldElement::from_dec_str(item[1]).unwrap(),
... | rust_cleaned_test_functions.jsonl/128300 | {
"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,
86607,
1107,
368,
341,
286,
1077,
7146,
12321,
284,
78686,
16,
17,
18,
19,
20,
21,
497,
330,
16,
15,
15,
497,
330,
20,
21,
7914,
4383,
22,
497,
330,
18,
497,
330,
16,
7914,
4383,
18,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.