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_extend_no_overlap() {
let mut my_tera = Tera::default();
my_tera
.add_raw_templates(vec![
("one", "{% block hey %}1{% endblock hey %}"),
("two", "{% block hey %}2{% endblock hey %}"),
("three", "{% block hey %}3{% endblo... | rust_cleaned_test_functions.jsonl/87552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
6536,
65794,
368,
341,
286,
1077,
5206,
847,
62,
50037,
284,
350,
2416,
486,
2258,
543,
286,
847,
62,
50037,
198,
310,
659,
718,
16067,
49526,
25592,
90515,
394,
3489,
603,
497,
13868,
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_serialize_fail_header_too_short() {
let mut buf = [0u8; 7];
let mut buf = [&mut buf[..]];
let buf = FragmentedBytesMut::new(&mut buf[..]);
let (head, body, foot) = buf.try_split_contiguous(..).unwrap();
let mut buffer = SerializeBuffer::new(head, body, foo... | rust_cleaned_test_functions.jsonl/112491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
22121,
8757,
2346,
78,
16673,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
84,
23,
26,
220,
22,
935,
286,
1077,
5206,
6607,
284,
34336,
6984,
6607,
95874,
13204,
286,
1077,
6607,
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_from_into_public_key_credential_descriptor() {
let cbor_credential_descriptor = cbor_map! {
"type" => "public-key",
"id" => vec![0x2D, 0x2D, 0x2D, 0x2D],
"transports" => cbor_array!["usb"],
};
let credential_descriptor =
Pub... | rust_cleaned_test_functions.jsonl/49007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
45514,
27074,
3097,
666,
30320,
33774,
368,
341,
286,
1077,
272,
9368,
666,
30320,
33774,
284,
272,
9368,
5376,
0,
341,
310,
330,
1313,
1,
589,
330,
888,
16173,
756,
310,
330,
307,
1,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ac_matching() {
let dict = vec!["banana", "benefit", "banapple", "ban", "fit"];
let text = "banana bans, apple benefits.";
let matcher = MultiMatcher::new(dict.iter().map(|s| s.bytes()));
let match_nodes = matcher.ac_match(text.bytes());
let end_pos_and_i... | rust_cleaned_test_functions.jsonl/115512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14718,
70763,
368,
341,
286,
1077,
6451,
284,
7486,
0,
1183,
87747,
497,
330,
67144,
275,
497,
330,
6850,
22377,
497,
330,
6850,
497,
330,
6276,
6332,
286,
1077,
1467,
284,
330,
87747,
47509,
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_extract_session_metrics_errored() {
let update1 = SessionUpdate::parse(
r#"{
"init": true,
"started": "2021-04-26T08:00:00+0100",
"attrs": {
"release": "1.0.0"
},
"did": "user1... | rust_cleaned_test_functions.jsonl/82043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 818
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
12316,
37686,
62,
40296,
1151,
368,
341,
286,
1077,
2647,
16,
284,
9164,
4289,
486,
6400,
1006,
310,
435,
55543,
515,
394,
330,
2327,
788,
830,
345,
394,
330,
46723,
788,
330,
17,
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... | 2 |
#[test]
fn test_time_to_sec() {
let cases: Vec<(&str, i8, i64)> = vec![
("31 11:30:45", 0, 2719845),
("11:30:45.123345", 3, 41445),
("-11:30:45.1233456", 0, -41445),
("272:59:59.14", 0, 982799),
];
for (arg, fsp, s) in cases {
l... | rust_cleaned_test_functions.jsonl/36253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
2346,
17242,
368,
341,
286,
1077,
5048,
25,
11312,
27,
2099,
495,
11,
600,
23,
11,
600,
21,
19,
16018,
284,
7486,
90515,
310,
3489,
18,
16,
220,
16,
16,
25,
18,
15,
25,
19,
20,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_css_color_1() {
assert_eq!(parse_css_color("#F0F8FF"), Ok(ColorU { r: 240, g: 248, b: 255, a: 255 }));
} | rust_cleaned_test_functions.jsonl/37096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
6714,
62,
16,
368,
341,
286,
2060,
10714,
10297,
6400,
25924,
6714,
3584,
37,
15,
37,
23,
1748,
3975,
7622,
15028,
52,
314,
435,
25,
220,
17,
19,
15,
11,
342,
25,
220,
17,
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 |
#[test]
fn test_insert_no_ancestors() {
let key = Keypair::new();
let index = AccountsIndex::<bool>::default_for_tests();
let mut gc = Vec::new();
index.upsert(
0,
&key.pubkey(),
&Pubkey::default(),
&[],
&AccountSecondar... | rust_cleaned_test_functions.jsonl/99716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
6536,
62,
681,
267,
1087,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
5478,
32509,
543,
286,
1077,
5206,
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_extra_headers() {
let mut bytes = BytesMut::with_capacity(2048);
let mut head = RequestHead::default();
head.headers.insert(AUTHORIZATION, HeaderValue::from_static("some authorization"));
let mut extra_headers = HeaderMap::new();
extra_headers.insert(AUT... | rust_cleaned_test_functions.jsonl/88090 | {
"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,
31858,
26719,
368,
341,
286,
1077,
5206,
5820,
284,
30024,
51440,
486,
4197,
35603,
7,
17,
15,
19,
23,
626,
286,
1077,
5206,
1968,
284,
6145,
12346,
486,
2258,
543,
286,
1968,
18022,
7030,
4346,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_tokens() -> Result<(), io::Error> {
// Given
let mut vocab_file = tempfile::NamedTempFile::new()?;
write!(vocab_file, "{{\"hello\": 1,\n \"world\": 0,\n \"<unk>\": 2,\n \"!\": 3\n}}")?;
let path = vocab_file.into_temp_path();
let openai_gpt_vocab = O... | rust_cleaned_test_functions.jsonl/25061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
28838,
368,
1464,
5714,
68843,
6399,
486,
1454,
29,
341,
322,
286,
16246,
198,
286,
1077,
5206,
23820,
2458,
284,
54819,
486,
15810,
12151,
1703,
486,
931,
94136,
286,
3270,
10297,
86847,
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_tap_name() {
// Sanity check that the assumed max iface name length is correct.
assert_eq!(
IFACE_NAME_MAX_LEN,
net_gen::ifreq__bindgen_ty_1::default()
.bindgen_union_field
.len()
);
// Empty name - The tap ... | rust_cleaned_test_functions.jsonl/8899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
391,
1269,
368,
341,
286,
442,
96302,
1779,
429,
279,
19110,
1932,
49313,
829,
3084,
374,
4396,
624,
286,
2060,
10714,
33673,
310,
11551,
5576,
4708,
6806,
15536,
345,
310,
4179,
16322,
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... | 2 |
#[test]
fn test_raft_nodes() {
let l = default_logger();
let mut tests = vec![
(vec![1, 2, 3], vec![1, 2, 3]),
(vec![3, 2, 1], vec![1, 2, 3]),
];
for (i, (ids, wids)) in tests.drain(..).enumerate() {
let r = new_test_raft(1, ids, 10, 1, new_storage(), &l);
let vot... | rust_cleaned_test_functions.jsonl/30312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2944,
14896,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
7032,
284,
7486,
90515,
286,
320,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
1125,
7486,
20703,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_ptr_chains() {
let mut variable_pointers = vk::PhysicalDeviceVariablePointerFeatures::builder();
let mut corner = vk::PhysicalDeviceCornerSampledImageFeaturesNV::builder();
let chain = vec![
&variable_pointers as *const _ as usize,
&corner as *cons... | rust_cleaned_test_functions.jsonl/132845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4348,
4138,
1735,
368,
341,
286,
1077,
5206,
3890,
6085,
388,
284,
34283,
486,
39253,
6985,
7827,
9084,
21336,
486,
17850,
543,
286,
1077,
5206,
9131,
284,
34283,
486,
39253,
6985,
50352,
17571,
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_print_custom_type() -> Result<(), Box<EvalAltResult>> {
let mut engine = Engine::new();
engine
.register_type_with_name::<MyStruct>("MyStruct")
.register_fn("to_debug", |x: &mut MyStruct| x.to_string())
.register_fn("debug", |x: &mut MyStruct| x.to_string())
... | rust_cleaned_test_functions.jsonl/94250 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
15875,
1819,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
1077,
5206,
4712,
284,
8200,
486,
931,
1428,
262,
4712,
198,
286,
659,
6343,
1819,
6615,
1269,
27638,
505... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_builder_dupe_field_and_timestamp() {
let res = SchemaBuilder::new().tag("time").timestamp().build();
assert_eq!(
res.unwrap_err().to_string(),
"Error validating schema: Error: Duplicate column name found in schema: 'time'"
);
} | rust_cleaned_test_functions.jsonl/12639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
814,
85477,
5013,
8378,
23073,
368,
341,
286,
1077,
592,
284,
12539,
3297,
486,
931,
1005,
4578,
445,
1678,
1827,
13035,
1005,
5834,
1428,
286,
2060,
10714,
33673,
310,
592,
55395,
9266,
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_request_method() {
let builder = PlainNotificationBuilder::new("test");
let payload = builder.build("a_test_id", Default::default());
let client = Client::new(AlpnConnector::new(), None, Endpoint::Production);
let request = client.build_request(payload);
... | rust_cleaned_test_functions.jsonl/109644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
9032,
368,
341,
286,
1077,
7363,
284,
43199,
11196,
3297,
486,
931,
445,
1944,
797,
286,
1077,
7729,
284,
7363,
13239,
445,
64,
4452,
842,
497,
7899,
486,
2258,
1423,
286,
1077,
2943,
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_net_is_connected() {
let mut net = Network::<usize>::new();
// Insert n nodes:
for v in 0 .. 5 {
net.add_node(v);
}
net.igraph.add_edge(0,1,1);
net.igraph.add_edge(1,2,2);
net.igraph.add_edge(2,4,3);
assert!(!net.is_co... | rust_cleaned_test_functions.jsonl/47200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19722,
6892,
43276,
368,
341,
286,
1077,
5206,
4179,
284,
8141,
27638,
51878,
6831,
931,
1428,
286,
442,
17101,
308,
7798,
510,
286,
369,
348,
304,
220,
15,
5241,
220,
20,
341,
310,
4179,
1364,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_from_hex() {
assert_eq!(from_hex("00000000".to_string()).unwrap(), vec![0, 0, 0, 0]);
assert_eq!(
from_hex("0a0b0c0d".to_string()).unwrap(),
vec![10, 11, 12, 13]
);
assert_eq!(
from_hex("000000ff".to_string()).unwrap(),
vec![0, 0, 0, 255]
);
} | rust_cleaned_test_functions.jsonl/5827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
32655,
368,
341,
197,
6948,
10714,
10297,
1499,
32655,
445,
15,
15,
15,
15,
15,
15,
15,
15,
3263,
983,
3904,
6011,
15454,
1507,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
11,
220,
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_complete_to_cef() {
let v1 = Top::V1(
"ClassId234".to_owned(),
NameInheritorStruct {
name_struct: NameStruct {
name: "Test2".to_owned(),
},
name_struct2: Some(NameStruct {
name: "Test1".to_owned(),
... | rust_cleaned_test_functions.jsonl/3455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27675,
2346,
50727,
69,
368,
341,
262,
1077,
348,
16,
284,
6909,
486,
53,
16,
1006,
286,
330,
1957,
764,
17,
18,
19,
3263,
983,
51973,
3148,
286,
3988,
641,
1923,
1919,
9422,
341,
310,
829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sending_router_advertisement() {
// Test that valid router advertisements are sent based on the device's
let mut stack_builder = StackStateBuilder::default();
let mut ndp_configs = NdpConfigurations::default();
ndp_configs.set_dup_addr_detect_transmits(N... | rust_cleaned_test_functions.jsonl/82817 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2601
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
2459,
55587,
10027,
44424,
368,
341,
286,
442,
3393,
429,
2697,
9273,
42649,
525,
3208,
3118,
389,
279,
3671,
594,
198,
23459,
286,
1077,
5206,
5611,
28532,
284,
14284,
1397,
3297,
486,
2258,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_manager_key_dict_missing() {
// create initial dictionaries.
let _guard = LOCK_FOR_GAUGE.lock().unwrap();
let tmp_dir = tempfile::TempDir::new().unwrap();
let manager = new_key_manager_def(&tmp_dir, None).unwrap();
manager.new_file("foo").unwrap();
... | rust_cleaned_test_functions.jsonl/22015 | {
"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,
3097,
12144,
3097,
5243,
40447,
368,
341,
286,
442,
1855,
2856,
57514,
624,
286,
1077,
716,
26098,
284,
49463,
14516,
2646,
32,
47644,
21003,
1005,
15454,
543,
286,
1077,
4174,
4334,
284,
54819,
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_hash_blake2b() {
let hasher = Hash::Blake2b;
let result = hasher.hash_bytes(&vec![1, 2, 3]);
let expected = concat!(
"cf94f6d605657e90c543b0c919070cdaaf7209c5e1ea58acb8f3568fa2114268",
"dc9ac3bafe12af277d286fce7dc59b7c0c348973c4e9dacbe79485e56ac2a7... | rust_cleaned_test_functions.jsonl/101707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
13141,
726,
17,
65,
368,
341,
286,
1077,
90819,
284,
6531,
486,
91038,
17,
65,
280,
286,
1077,
1102,
284,
90819,
15101,
12524,
2099,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
2558,
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_regex_subcapturespos() {
let regex = Regex::new("e(l+)").unwrap();
let captures = regex.captures("hello").unwrap();
let caps = captures.iter_pos().collect::<Vec<_>>();
assert_eq!(caps[0], Some((1, 4)));
assert_eq!(caps[1], Some((2, 4)));
assert_eq!... | rust_cleaned_test_functions.jsonl/123804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41832,
5228,
66326,
966,
368,
341,
286,
1077,
20180,
284,
26146,
486,
931,
445,
68,
2333,
36197,
1827,
15454,
543,
286,
1077,
40155,
284,
20180,
520,
2689,
1413,
445,
14990,
1827,
15454,
543,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_charset_id_for_glyph_format0() {
let glyph_sids = ReadArrayCow::Owned(vec![1, 2, 3]);
let charset = CustomCharset::Format0 { glyphs: glyph_sids };
// glpyh id 0 is .notdef and is implicitly encoded
assert_eq!(charset.id_for_glyph(0), Some(0));
asse... | rust_cleaned_test_functions.jsonl/85346 | {
"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,
15875,
65883,
842,
5478,
88703,
8955,
15,
368,
341,
286,
1077,
32150,
643,
3365,
284,
4457,
1857,
89915,
486,
57641,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
1077,
11617,
284,
8406... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_attribute_stack_map_table() {
let stack_map_class: &[u8] = include_bytes!("../java-assets/compiled-classes/Factorial.class");
let res = class_parser(ParseData::new(stack_map_class));
match res {
Result::Ok((_, c)) => {
use classfile_parser::attribute_info::code_at... | rust_cleaned_test_functions.jsonl/17580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16791,
15528,
5376,
5237,
368,
341,
262,
1077,
5611,
5376,
4790,
25,
44590,
84,
23,
60,
284,
2924,
12524,
17223,
1244,
10042,
75158,
14,
50845,
12,
8855,
12318,
5621,
530,
3074,
797,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_basic_try_catch() {
fn exception_value(msg: &str, data: &Value) -> Value {
Value::Exception(exception(msg, data))
}
let exc = exception_value(
"test",
&map_with_values(vec![(
Keyword("cause".to_string(), None),
... | rust_cleaned_test_functions.jsonl/114218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2726
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
53283,
666,
754,
368,
341,
286,
5168,
4683,
3142,
8119,
25,
609,
495,
11,
821,
25,
609,
1130,
8,
1464,
5162,
341,
310,
5162,
486,
1354,
38564,
8119,
11,
821,
1171,
286,
555,
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_indexed_reader_read_read_fails() {
let bad_reader = ReaderMock {
seek_fails: false,
read_fails: true,
};
let mut reader = IndexedReader::new(bad_reader, FAI_FILE).unwrap();
let mut seq = Vec::new();
reader.fetch("id", 0, 10).unwrap(... | rust_cleaned_test_functions.jsonl/62846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
291,
22306,
6443,
6443,
761,
6209,
368,
341,
286,
1077,
3873,
22306,
284,
25166,
11571,
341,
310,
5931,
761,
6209,
25,
895,
345,
310,
1349,
761,
6209,
25,
830,
345,
286,
2605,
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_nonce_invalid() {
let lst = [
"",
"rdo9x8gS4K/mZg==",
"rdo9x8gS4K/mZg",
"rdo9x8gS4K+mZg",
"৬",
"京",
];
for n in lst.iter() {
assert!(!is_nonce(n));
}
} | rust_cleaned_test_functions.jsonl/19262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48508,
31433,
368,
341,
286,
1077,
18845,
284,
2278,
310,
8324,
310,
330,
81,
2982,
24,
87,
23,
70,
50,
19,
42,
3183,
57,
70,
418,
756,
310,
330,
81,
2982,
24,
87,
23,
70,
50,
19,
42,
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... | 2 |
#[test]
fn test_hook_body_funcs() {
// test defaults
{
let body = HookBody::new();
assert_eq!("", body.ref_name());
assert_eq!("", body.after());
assert_eq!("", body.before());
assert_eq!(false, body.forced());
assert_eq!(fa... | rust_cleaned_test_functions.jsonl/8023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32005,
14114,
64124,
368,
341,
286,
442,
1273,
16674,
198,
286,
341,
310,
1077,
2487,
284,
28171,
5444,
486,
931,
543,
310,
2060,
10714,
17223,
497,
2487,
11053,
1269,
1423,
310,
2060,
10714,
1722... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_rle_char() {
let builder = PlainCharBlockBuilder::new(120, 40);
let mut rle_builder = RleBlockBuilder::<Utf8Array, PlainCharBlockBuilder>::new(builder);
let width_40_char = ["2"].iter().cycle().take(40).join("");
for item in [Some("233")].iter().cycle().clo... | rust_cleaned_test_functions.jsonl/38169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 925
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
1710,
273,
9232,
368,
341,
286,
1077,
7363,
284,
43199,
4768,
4713,
3297,
486,
931,
7,
16,
17,
15,
11,
220,
19,
15,
317,
286,
1077,
5206,
435,
273,
28532,
284,
431,
273,
4713,
3297,
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... | 4 |
#[test]
fn test_get_file_as_byte_vec() {
let data: Vec<u8> = vec![
0x7F, 0x45, 0x4C, 0x46, 0x01, 0x01, 0x01, 0x03, 0x00, 0x10, 0x20, 0x31, 0x32, 0x33,
0x20, 0x11,
];
let path = std::path::PathBuf::from(r"./samples/handcrafted_ident");
let val = get_file_as... | rust_cleaned_test_functions.jsonl/73544 | {
"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,
3062,
2458,
11898,
19737,
13251,
368,
341,
286,
1077,
821,
25,
11312,
34837,
23,
29,
284,
7486,
90515,
310,
220,
15,
87,
22,
37,
11,
220,
15,
87,
19,
20,
11,
220,
15,
87,
19,
34,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_offset() {
let b = UInt8Array::from(vec![Some(1), Some(2), Some(3)]);
let b = b.slice(1, 2).data();
let arrays = vec![b.as_ref()];
let mut a = MutableArrayData::new(arrays, false, 2);
a.extend(0, 0, 2);
let result = a.freeze();
le... | rust_cleaned_test_functions.jsonl/102335 | {
"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,
84087,
6917,
368,
341,
286,
1077,
293,
284,
22275,
23,
1857,
486,
1499,
25592,
20703,
8373,
7,
16,
701,
4329,
7,
17,
701,
4329,
7,
18,
41958,
286,
1077,
293,
284,
293,
14530,
7,
16,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trim_leading_zero_bytes() {
let cs: Vec<(Vec<u8>, Vec<u8>)> = vec![
(vec![], vec![]),
(vec![0x0], vec![0x0]),
(vec![0x1], vec![0x1]),
(vec![0x1, 0x0], vec![0x1, 0x0]),
(vec![0x0, 0x1], vec![0x1]),
(vec![0x0, 0x0, 0x0... | rust_cleaned_test_functions.jsonl/12344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 615
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70025,
11751,
2228,
19359,
12524,
368,
341,
286,
1077,
10532,
25,
11312,
28706,
10050,
34837,
23,
8066,
11312,
34837,
23,
9231,
29,
284,
7486,
90515,
310,
320,
4083,
0,
12995,
7486,
0,
1294,
1326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_implicit_select() {
let system = new_kompact_system();
let receivers: Vec<Arc<Component<ReceiverComponent>>> = (0..GROUP_SIZE)
.map(|_i| system.create(ReceiverComponent::default))
.collect();
let group_ref: ActorPath = system
.system_p... | rust_cleaned_test_functions.jsonl/32534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
30940,
13051,
368,
341,
286,
1077,
1849,
284,
501,
4698,
14435,
531,
17687,
1428,
286,
1077,
39906,
25,
11312,
30192,
1287,
96689,
27,
25436,
2189,
20154,
284,
320,
15,
496,
41480,
4098,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_switch_implies_cfg_test() {
rustc_span::with_default_session_globals(|| {
let matches = optgroups().parse(&["--test".to_string()]).unwrap();
let (sess, cfg) = mk_session(matches);
let cfg = build_configuration(&sess, to_crate_config(cfg));
assert!(cfg.contains... | rust_cleaned_test_functions.jsonl/114838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27652,
21007,
550,
18343,
4452,
368,
341,
262,
23071,
66,
37382,
486,
4197,
9993,
12316,
58775,
79453,
341,
286,
1077,
9071,
284,
3387,
16753,
1005,
6400,
2099,
1183,
313,
1944,
3263,
983,
3904,
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_codec() {
let mut codec = SrvCodec::new();
let mut inner = net::NetErr::default();
inner.code = net::ErrCode::NotFound as i32;
inner.msg = "this".to_string();
let msg = SrvMessage::from(inner);
let mut buf = BytesMut::new();
codec.encode(ms... | rust_cleaned_test_functions.jsonl/100372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51084,
368,
341,
286,
1077,
5206,
34647,
284,
328,
10553,
36913,
486,
931,
543,
286,
1077,
5206,
9179,
284,
4179,
486,
6954,
7747,
486,
2258,
543,
286,
9179,
10210,
284,
4179,
486,
7747,
2078,
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_write_info_field_value_with_character_value() -> io::Result<()> {
use vcf::record::info::field;
let mut buf = Vec::new();
let value = field::Value::Character('n');
write_info_field_value(&mut buf, Some(&value))?;
let expected = [0x17, 0x6e];
ass... | rust_cleaned_test_functions.jsonl/6248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3109,
5013,
3142,
6615,
40988,
3142,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
990,
348,
9792,
486,
8548,
486,
2733,
486,
2566,
401,
286,
1077,
5206,
6607,
284,
11312,
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... | 2 |
#[test]
fn test_cfg_kafka() {
let env = convert_args!(hashmap!(
"MODE" => "kafka",
"BOOTSTRAP_SERVERS" => "bootstrap:9091",
"TOPIC" => "topic",
"PROPERTIES__FOO_BAR" => "baz",
"K_SINK" => "http://localhost",
));
let cfg = Confi... | rust_cleaned_test_functions.jsonl/22790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18343,
4698,
21883,
368,
341,
286,
1077,
6105,
284,
5508,
8384,
10297,
8296,
2186,
33673,
310,
330,
22808,
1,
589,
330,
74,
21883,
756,
310,
330,
67076,
6666,
2537,
20012,
50,
1,
589,
330,
6281,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_phys_reg_to_dynasm_reg() {
use super::super::machine::register::*;
assert_eq!(phys_reg_to_dynasm_reg(GR32::EAX.as_phys_reg()), 0);
assert_eq!(phys_reg_to_dynasm_reg(GR64::RAX.as_phys_reg()), 0);
assert_eq!(phys_reg_to_dynasm_reg(GR32::R15D.as_phys_reg()), 15);
assert_eq!(phys... | rust_cleaned_test_functions.jsonl/15221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69319,
4920,
2346,
69213,
10530,
4920,
368,
341,
262,
990,
2256,
486,
9522,
486,
32056,
486,
6343,
56162,
262,
2060,
10714,
10297,
41205,
4920,
2346,
69213,
10530,
4920,
6699,
49,
18,
17,
486,
36,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_push_request_build_no_flags() {
let req = UpdatePushRequest::new("some-id");
let form = req.build();
assert_eq!(
form,
update_data::Form {
id: "some-id".to_string(),
data: update_data::Data {
... | rust_cleaned_test_functions.jsonl/116584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
14218,
7893,
20801,
6536,
14130,
368,
341,
286,
1077,
4232,
284,
5549,
16644,
1900,
486,
931,
445,
14689,
12897,
797,
286,
1077,
1352,
284,
4232,
13239,
543,
286,
2060,
10714,
33673,
310,
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_encrypt_length() {
let key = b"supersecret";
let length_zero = b"";
let length_one_block = b"hello";
let one_full_block = b"0123456789abcdef";
let multiple_blocks = b"0123456789abcdefghijkl";
let length_zero_enc: Vec<u8> = encrypt(length_zero, key, CiphertextVersion::Lat... | rust_cleaned_test_functions.jsonl/50060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 552
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66593,
5118,
368,
341,
262,
1077,
1376,
284,
293,
1,
9522,
20474,
876,
262,
1077,
3084,
19359,
284,
293,
1,
876,
262,
1077,
3084,
11667,
7113,
284,
293,
1,
14990,
876,
262,
1077,
825,
16372,
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_strings() -> Result<()> {
let query: Query = parse(
r###"
derive [
x = "two households'",
y = 'two households"',
z = f"a {x} b' {y} c",
v = f'a {x} b" {y} c',
]
"###,
)?;
assert_display_s... | rust_cleaned_test_functions.jsonl/62570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33500,
368,
1464,
5714,
71698,
341,
286,
1077,
3239,
25,
11361,
284,
4715,
1006,
310,
435,
14374,
698,
286,
42430,
2278,
310,
856,
284,
330,
19789,
28839,
38330,
310,
379,
284,
364,
19789,
28839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validate_pool_name() {
assert_eq!(validate_pool_name("pool1"), Ok(error::SUCCESS.code_num));
assert_eq!(validate_pool_name("**pool_name**"), Err(error::INVALID_POOL_NAME.code_num));
} | rust_cleaned_test_functions.jsonl/115826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
15709,
1269,
368,
341,
286,
2060,
10714,
10297,
7067,
15709,
1269,
445,
10285,
16,
3975,
7622,
6390,
486,
39308,
10210,
4273,
3237,
286,
2060,
10714,
10297,
7067,
15709,
1269,
91389,
10285,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_dpcc() {
assert_eq!(
&dpcc(Direction::Right, CodelChooser::Left).collect::<Vec<_>>(),
&[
(Direction::Right, CodelChooser::Left),
(Direction::Right, CodelChooser::Right),
(Direction::Down, CodelChooser::Right),
... | rust_cleaned_test_functions.jsonl/74598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53872,
638,
368,
341,
286,
2060,
10714,
33673,
310,
609,
9796,
638,
81740,
486,
5979,
11,
356,
720,
36557,
486,
5415,
568,
17384,
27638,
10050,
32399,
2452,
3148,
310,
609,
9640,
394,
320,
9268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_password() {
let key = Rsa::generate(2048).unwrap();
let pem = key.private_key_to_pem_passphrase(Cipher::aes_128_cbc(), b"foobar").unwrap();
Rsa::private_key_from_pem_passphrase(&pem, b"foobar").unwrap();
assert!(Rsa::private_key_from_pem_passphrase(&pem, b"fiz... | rust_cleaned_test_functions.jsonl/6926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
10122,
368,
341,
286,
1077,
1376,
284,
431,
9081,
486,
19366,
7,
17,
15,
19,
23,
568,
15454,
543,
286,
1077,
54184,
284,
1376,
61603,
3097,
2346,
620,
336,
15464,
27710,
3025,
10558,
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_gen_mac_cbc_nopads() {
let res = generate_mac(&MacAlgo::CbcMac, &PaddingType::Type1,
&Vec::from(hex!("0102030405060708")), &Vec::from(hex!("e0f4543f3e2a2c5ffc7e5e5a222e3e4d")));
match res {
Ok(m) => {
println!("mac = {}",... | rust_cleaned_test_functions.jsonl/23722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
22802,
666,
8904,
1089,
453,
7664,
368,
341,
286,
1077,
592,
284,
6923,
22802,
2099,
19552,
2101,
3346,
486,
34,
8904,
19552,
11,
609,
21616,
929,
486,
929,
16,
345,
7561,
609,
10050,
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... | 2 |
#[test]
fn test_bool_to_compact_string() {
let c = true.to_compact_string();
let s = true.to_string();
assert_eq!("true", c);
assert_eq!(c, s);
assert!(!c.is_heap_allocated());
let c = false.to_compact_string();
let s = false.to_string();
assert_eq!("false", c);
assert_eq!... | rust_cleaned_test_functions.jsonl/2802 | {
"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,
22159,
2346,
18177,
531,
3904,
368,
341,
262,
1077,
272,
284,
830,
2389,
18177,
531,
3904,
543,
262,
1077,
274,
284,
830,
2389,
3904,
1428,
262,
2060,
10714,
17223,
1866,
497,
272,
317,
262,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vuint_at() {
let data = &[
0x80,
0xff,
0x40, 0x00,
0x7f, 0xff,
0x20, 0x00, 0x00,
0x3f, 0xff, 0xff,
0x10, 0x00, 0x00, 0x00,
0x1f, 0xff, 0xff, 0xff
];
let mut res: reader::Res;
... | rust_cleaned_test_functions.jsonl/5041 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 812
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2496,
3752,
368,
341,
286,
1077,
821,
284,
609,
9640,
310,
220,
15,
87,
23,
15,
345,
310,
220,
15,
9020,
345,
310,
220,
15,
87,
19,
15,
11,
220,
15,
87,
15,
15,
345,
310,
220,
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_range_step_inclusive() {
assert!(super::range_step_inclusive(0, 20, 5).collect::<Vec<isize>>() ==
vec![0, 5, 10, 15, 20]);
assert!(super::range_step_inclusive(20, 0, -5).collect::<Vec<isize>>() ==
vec![20, 15, 10, 5, 0]);
assert!(super::ran... | rust_cleaned_test_functions.jsonl/59090 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
11946,
1243,
8336,
368,
341,
286,
2060,
10297,
9522,
486,
9669,
11946,
1243,
8336,
7,
15,
11,
220,
17,
15,
11,
220,
20,
568,
17384,
27638,
10050,
27,
285,
551,
61586,
47761,
394,
7486,
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_age_broad() {
solana_logger::setup();
let bins = 4;
let test = BucketMapHolder::<u64>::new(bins, &Some(AccountsIndexConfig::default()), 1);
assert_eq!(test.current_age(), 0);
for _ in 0..bins {
assert!(!test.all_buckets_flushed_at_current_age()... | rust_cleaned_test_functions.jsonl/5429 | {
"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,
32053,
880,
8546,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
28518,
284,
220,
19,
280,
286,
1077,
1273,
284,
47768,
2227,
8589,
27638,
84,
21,
19,
6831,
931,
1883,
1330,
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... | 2 |
#[test]
fn test_from_key_file_returns_correct_instance() {
let array = [94, 136, 72, 152, 218, 40, 4, 113, 81, 208, 229, 111, 141, 198, 41, 39, 115,
96, 61, 13, 106, 171, 189, 214, 42, 17, 239, 114, 29, 21, 66, 216];
let key = KeyFile {
key: SecStr::new(vec![0x70... | rust_cleaned_test_functions.jsonl/23602 | {
"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,
5673,
3097,
2458,
58900,
31550,
11904,
368,
341,
286,
1077,
1334,
284,
508,
24,
19,
11,
220,
16,
18,
21,
11,
220,
22,
17,
11,
220,
16,
20,
17,
11,
220,
17,
16,
23,
11,
220,
19,
15,
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_equal() {
let a = Address::from_str("8b45e4bd1c6acb88bebf6407d16205f567e62a3e").unwrap();
let b = Address::from_str("8b45e4bd1c6acb88bebf6407d16205f567e62a3e").unwrap();
assert_eq!(a, b);
} | rust_cleaned_test_functions.jsonl/6516 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11478,
368,
341,
286,
1077,
264,
284,
9177,
486,
1499,
2895,
445,
23,
65,
19,
20,
68,
19,
8940,
16,
66,
21,
97471,
23,
23,
1371,
13233,
21,
19,
15,
22,
67,
16,
21,
17,
15,
20,
69,
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_unsuccessful_env_var_parse() {
parse_env_var("FOO").expect_err("Missing '=' should fail");
parse_env_var("=bar").expect_err("Missing key should fail");
} | rust_cleaned_test_functions.jsonl/75745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
30950,
15879,
4612,
21039,
368,
341,
286,
4715,
15879,
4612,
445,
3788,
46,
1827,
17119,
9266,
445,
25080,
40554,
1265,
3690,
3071,
286,
4715,
15879,
4612,
445,
28,
2257,
1827,
17119,
9266,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stop_ap_succeeds() {
let mut test_values = test_setup();
// Stop an AP
let stop_fut =
test_values.iface_manager.stop_ap("foo".as_bytes().to_vec(), "bar".as_bytes().to_vec());
pin_mut!(stop_fut);
assert_variant!(test_values.exec.run_until_stall... | rust_cleaned_test_functions.jsonl/59193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
21093,
643,
29264,
82,
368,
341,
286,
1077,
5206,
1273,
9146,
284,
1273,
21363,
1428,
286,
442,
14215,
458,
10106,
198,
286,
1077,
2936,
761,
332,
4035,
310,
1273,
9146,
35431,
578,
12144,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ufo_path_unique_extension_unique_dirname() {
let op = get_ufo_outpath(
&Path::new("one/two/three.ufo"),
&Some("-new".to_string()),
&Some("fmt".to_string()),
);
assert_eq!(op, PathBuf::from("one/two/three-new.fmt"));
} | rust_cleaned_test_functions.jsonl/21548 | {
"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,
3062,
7300,
824,
2638,
21218,
31035,
21218,
4334,
606,
368,
341,
286,
1077,
1179,
284,
633,
7300,
824,
6068,
2343,
1006,
310,
609,
1820,
486,
931,
445,
603,
5523,
1126,
20439,
765,
11634,
824,
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_rem() {
fn test(a: Rational, b: Rational, c: Rational) {
assert_eq!(a % b, c);
assert_eq!(
{
let mut x = a;
x %= b;
x
},
... | rust_cleaned_test_functions.jsonl/856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19194,
368,
341,
310,
5168,
1273,
2877,
25,
54525,
11,
293,
25,
54525,
11,
272,
25,
54525,
8,
341,
394,
2060,
10714,
10297,
64,
1018,
293,
11,
272,
317,
394,
2060,
10714,
33673,
503,
341,
664,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_user_permissions() {
let query = SubspacesQuery::UserPermissions {
subspace_id: Uint64::new(1),
user: Addr::unchecked("cosmos1qzskhrcjnkdz2ln4yeafzsdwht8ch08j4wed69"),
};
let response = mock_subspaces_query_response(&query);
let expec... | rust_cleaned_test_functions.jsonl/109488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
3317,
44767,
368,
341,
286,
1077,
3239,
284,
3719,
44285,
2859,
486,
1474,
23851,
341,
310,
5147,
1306,
842,
25,
27883,
21,
19,
486,
931,
7,
16,
1326,
310,
1196,
25,
72585,
486,
31684,
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_fill2() {
use ndshape::ConstShape2u32;
let dst_shape = ConstShape2u32::<11, 12>;
const DST_SIZE: usize = 11 * 12;
let mut dst = [0; DST_SIZE];
fill2([2, 3], 1, &mut dst, &dst_shape, [4, 5]);
for y in 5..5 + 3 {
for x in 4..4 + 2 {
let i = dst_shape.... | rust_cleaned_test_functions.jsonl/85380 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
17,
368,
341,
262,
990,
15581,
12231,
486,
19167,
12301,
17,
84,
18,
17,
401,
262,
1077,
10648,
13597,
284,
24522,
12301,
17,
84,
18,
17,
27638,
16,
16,
11,
220,
16,
17,
10133,
262,
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... | 4 |
#[test]
fn test_required_dice_launches() {
assert_eq!(required_dice_launches(6, &BigUint::from(5u32)), 0);
assert_eq!(required_dice_launches(6, &BigUint::from(6u32)), 1);
assert_eq!(required_dice_launches(6, &BigUint::from(7u32)), 1);
assert_eq!(required_dice_launches(6, &BigUint... | rust_cleaned_test_functions.jsonl/39502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18743,
97196,
51617,
288,
368,
341,
286,
2060,
10714,
10297,
6279,
97196,
51617,
288,
7,
21,
11,
609,
15636,
21570,
486,
1499,
7,
20,
84,
18,
17,
5731,
220,
15,
317,
286,
2060,
10714,
10297,
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_alpha() {
let mut sealed_sector_a: StagedSectorMetadata = Default::default();
sealed_sector_a.pieces.push(PieceMetadata {
piece_key: String::from("x"),
num_bytes: UnpaddedBytesAmount(508),
comm_p: None,
piece_inclusion_proof: None,... | rust_cleaned_test_functions.jsonl/19383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26633,
368,
341,
286,
1077,
5206,
19046,
62651,
4306,
25,
794,
3279,
68188,
14610,
284,
7899,
486,
2258,
1428,
286,
19046,
62651,
4306,
556,
29765,
2552,
5304,
9108,
14610,
341,
310,
6573,
3097,
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... | 5 |
#[test]
fn test_display() {
let id = ClientId::Domain("localhost".to_string());
let email = Address::from_str("test@example.com").unwrap();
let mail_parameter = MailParameter::Other {
keyword: "TEST".to_string(),
value: Some("value".to_string()),
};
... | rust_cleaned_test_functions.jsonl/300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1687
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
1077,
877,
284,
8423,
764,
486,
13636,
445,
8301,
3263,
983,
3904,
1423,
286,
1077,
2551,
284,
9177,
486,
1499,
2895,
445,
1944,
35487,
905,
1827,
15454,
543,
286,
1077,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poh_recorder_tick_height_is_last_tick() {
let prev_hash = Hash::default();
let ledger_path = get_tmp_ledger_path!();
{
let blocktree =
Blocktree::open(&ledger_path).expect("Expected to be able to open database ledger");
let (mut po... | rust_cleaned_test_functions.jsonl/31716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 560
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
7080,
1358,
43612,
9561,
6892,
12195,
43612,
368,
341,
286,
1077,
7872,
8950,
284,
6531,
486,
2258,
543,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reference() {
test_file! {
#[diplomat::bridge]
mod ffi {
struct MyStruct {
a: u8,
b: u8,
}
impl MyStruct {
pub fn new(v: &str) -> MyStruct {
... | rust_cleaned_test_functions.jsonl/61354 | {
"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,
3904,
25433,
368,
341,
286,
1273,
2458,
0,
341,
310,
11506,
8579,
500,
80768,
486,
13709,
921,
310,
1463,
76956,
341,
394,
2036,
3017,
9422,
341,
503,
264,
25,
575,
23,
345,
503,
293,
25,
575,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_div() -> Result<(), TestingError> {
VMTestRunner::new()
.add(PushConst::new((9).into(), IntegerType::I8.into()))
.add(PushConst::new((4).into(), IntegerType::I8.into()))
.add(Div)
.add(PushConst::new((9).into(), IntegerType::I8.into()))
... | rust_cleaned_test_functions.jsonl/82724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
368,
1464,
5714,
68843,
26768,
1454,
29,
341,
286,
17792,
2271,
19486,
486,
931,
741,
310,
659,
718,
5304,
1116,
19167,
486,
931,
1188,
24,
568,
18122,
1507,
4440,
929,
486,
40,
23,
39860... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_double_same_feature() {
// this is a tricky test - what happens on collision
let mut mi = model_instance::ModelInstance::new_empty().unwrap();
mi.learning_rate = 0.1;
mi.power_t = 0.0;
let mut re = Regressor::<optimizer::Optimize... | rust_cleaned_test_functions.jsonl/124044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
33574,
17069,
368,
341,
286,
442,
419,
374,
264,
33453,
1273,
481,
1128,
8573,
389,
18752,
79133,
286,
1077,
5206,
9497,
284,
1614,
11904,
486,
1712,
2523,
486,
931,
15124,
1005,
15454,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cycle() {
errors(
"open class A: B open class B: A",
&[
(pos(1, 6), Msg::CycleInHierarchy),
(pos(1, 22), Msg::CycleInHierarchy),
],
);
} | rust_cleaned_test_functions.jsonl/75947 | {
"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,
39079,
368,
341,
286,
5975,
1006,
310,
330,
2508,
536,
362,
25,
425,
1787,
536,
425,
25,
362,
756,
310,
609,
9640,
394,
320,
966,
7,
16,
11,
220,
21,
701,
24205,
486,
44820,
641,
85264,
1326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_doc_missing_field() {
let mut schema_builder = schema::Schema::builder();
let idfield = schema_builder.add_text_field("id", STRING);
schema_builder.add_text_field("optfield", STRING);
let index = Index::create_in_ram(schema_builder.build());
let mut ... | rust_cleaned_test_functions.jsonl/125995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
18869,
40447,
5013,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
877,
2566,
284,
10802,
28532,
1364,
4326,
5013,
445,
307,
497,
35255,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_initialize_ix_ok() {
let nonce_address = Pubkey::new_unique();
let nonce_account = nonce_account::create_account(1_000_000).into_inner();
#[allow(deprecated)]
let blockhash_id = sysvar::recent_blockhashes::id();
process_instruction(
&se... | rust_cleaned_test_functions.jsonl/95901 | {
"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,
11305,
40889,
62686,
19817,
368,
341,
286,
1077,
39676,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
39676,
13500,
284,
39676,
13500,
486,
3182,
13500,
7,
16,
62,
15,
15,
15,
62,
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_start_clients_fails() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
// Create a configured ClientIfaceContainer.
let test_values = test_setup(&mut exec);
let (mut iface_manager, _) = create_iface_manager_with_client(&test... | rust_cleaned_test_functions.jsonl/71934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
56899,
761,
6209,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
442,
4230,
264,
19755,
8423,
40,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mark_as_committed_1_2() {
let mut block_tree = create_block_tree();
block_tree.mark_as_committed(id(1), ()).unwrap();
for i in 1..=11 {
let block = block_tree.get_block(id(i)).unwrap();
match i {
1 => assert!(block.is_committed()),
_ => assert... | rust_cleaned_test_functions.jsonl/87719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
11898,
2965,
5483,
62,
16,
62,
17,
368,
341,
262,
1077,
5206,
2504,
11663,
284,
1855,
7113,
11663,
1428,
262,
2504,
11663,
18406,
11898,
2965,
5483,
3724,
7,
16,
701,
1719,
568,
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... | 5 |
#[test]
fn test_trivial_circuit_with_gate_agnostic_cs() {
use crate::pairing::bn256::{Bn256, Fr};
use crate::worker::Worker;
let mut assembly = TrivialAssembly::<Bn256, PlonkCsWidth4WithNextStepParams, Width4MainGateWithDNext>::new();
let circuit = TestCircuit4::<Bn256> {
... | rust_cleaned_test_functions.jsonl/78083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
26658,
666,
37268,
6615,
54798,
62,
11953,
35372,
368,
341,
286,
990,
17717,
486,
12670,
287,
486,
11081,
17,
20,
21,
22964,
33,
77,
17,
20,
21,
11,
2869,
2440,
286,
990,
17717,
486,
214... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_plain_decode_fixed_len_byte_array() {
let data = vec![
ByteArray::new(ByteBufferPtr::new(String::from("bird").into_bytes())),
ByteArray::new(ByteBufferPtr::new(String::from("come").into_bytes())),
ByteArray::new(ByteBufferPtr::new(String::from("flow").into_bytes())),
];
let data_b... | rust_cleaned_test_functions.jsonl/113128 | {
"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,
41015,
15227,
37839,
6043,
19737,
3858,
368,
341,
197,
10217,
821,
284,
7486,
90515,
298,
197,
18394,
486,
931,
55823,
4095,
5348,
486,
931,
2242,
486,
1499,
445,
22592,
1827,
18122,
12524,
73727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_output_success_default() {
let program = parse_str(
r#".infer mortal(string).
.output(mortal, "file-name")."#,
)
.unwrap()
.into_parsed();
let relation = program
.intensional()
.get(&program.predicates().fetch("mortal").unwrap())
.unwrap();
... | rust_cleaned_test_functions.jsonl/52305 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7645,
18632,
9993,
368,
341,
262,
1077,
2025,
284,
4715,
2895,
1006,
286,
435,
2,
3263,
89559,
48872,
3609,
4292,
13413,
1255,
33372,
11,
330,
1192,
11494,
1827,
57676,
345,
262,
1727,
262,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_blockstore_with_incomplete_slot() {
solana_logger::setup();
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let ticks_per_slot = genesis_config.ticks_per_slot;
// Create a new ledger with slot 0 full of ticks
... | rust_cleaned_test_functions.jsonl/46793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
7113,
4314,
6615,
1243,
14737,
27563,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
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_legal_moves_banmen_with_kaku_nari_7_squares_and_contiguous_gote() {
let blank_banmen = Banmen([[Blank; 9]; 9]);
const OFFSETS:[(i32,i32); 4] = [
(-1,0),
(0,-1),
(0,1),
(1,0)
];
for y in 0..9 {
for o in &OFFSETS {
let mut banmen = blank_banmen.clone();
banmen.... | rust_cleaned_test_functions.jsonl/81181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
4698,
23557,
1089,
2780,
62,
22,
643,
40856,
8378,
10260,
27029,
1889,
1272,
368,
972,
10217,
10113,
880,
276,
5676,
284,
22730,
5676,
27119,
22770,
26,
220,
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... | 5 |
#[test]
fn test_map_insert_panic() {
let mut a = SgMap::<_, _, 3>::new();
assert!(a.try_insert(1, "1").is_ok());
assert!(a.try_insert(2, "2").is_ok());
assert!(a.try_insert(3, "3").is_ok());
assert_eq!(a.try_insert(4, "4"), Err(SgError::StackCapacityExceeded));
a.insert(4, "4"); // pan... | rust_cleaned_test_functions.jsonl/18654 | {
"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,
5376,
17678,
620,
31270,
368,
341,
262,
1077,
5206,
264,
284,
328,
70,
2227,
27638,
6878,
8358,
220,
18,
6831,
931,
1428,
262,
2060,
10297,
64,
48779,
17678,
7,
16,
11,
330,
16,
1827,
285,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_test_util_basic() {
let v = vec![
("abc".as_bytes(), "def".as_bytes()),
("abd".as_bytes(), "deg".as_bytes()),
];
let mut iter = TestSSIter::new(v);
assert_eq!(
iter.next(),
Some((Vec::from("abc".as_bytes()), Vec::fro... | rust_cleaned_test_functions.jsonl/61680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4452,
18974,
34729,
368,
341,
286,
1077,
348,
284,
7486,
90515,
310,
3489,
13683,
3263,
300,
12524,
1507,
330,
750,
3263,
300,
12524,
14702,
310,
3489,
85920,
3263,
300,
12524,
1507,
330,
16508,
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_parse_matches_valid_two_valid_options() {
let opts = crate::parsers::parse_options();
let argv = [
"hl".to_string(),
"-l".to_string(),
"-s".to_string(),
"txt".to_string(),
];
let matches = crate::parsers::parse_match... | rust_cleaned_test_functions.jsonl/132815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
38344,
8337,
23241,
8337,
8743,
368,
341,
286,
1077,
12185,
284,
17717,
486,
88564,
486,
6400,
8743,
543,
286,
1077,
10213,
284,
2278,
310,
330,
17958,
3263,
983,
3904,
3148,
310,
6523,
75,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_get_leader_schedule() {
let rpc = RpcHandler::start();
for params in [
None,
Some(json!([0u64])),
Some(json!([null, {"identity": rpc.leader_pubkey().to_string()}])),
Some(json!([{"identity": rpc.leader_pubkey().to_string()}])),... | rust_cleaned_test_functions.jsonl/6304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 678
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
79991,
34530,
368,
341,
286,
1077,
35596,
284,
79961,
3050,
486,
2468,
1428,
286,
369,
3628,
304,
2278,
310,
2240,
345,
310,
4329,
9304,
0,
2561,
15,
84,
21,
19,
87619,
310,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_comp_min() {
assert_eq!(Vector2::new(1i, 2i).comp_min(), 1i);
assert_eq!(Vector3::new(1i, 2i, 3i).comp_min(), 1i);
assert_eq!(Vector4::new(1i, 2i, 3i, 4i).comp_min(), 1i);
assert_eq!(Vector2::new(3.0f64, 4.0f64).comp_min(), 3.0f64);
assert_eq!(Vector3::new(4.0f64, 5.0f64, 6.... | rust_cleaned_test_functions.jsonl/5667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
7260,
368,
341,
262,
2060,
10714,
10297,
3781,
17,
486,
931,
7,
16,
72,
11,
220,
17,
72,
568,
5689,
7260,
1507,
220,
16,
72,
317,
262,
2060,
10714,
10297,
3781,
18,
486,
931,
7,
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_parse_meta_manifest() {
let path = [
env!("CARGO_MANIFEST_DIR"),
"/../../resources/channel_manifests/manifests.txt",
]
.join("");
let meta_file = Document::LocalPath(path.into());
let buffer = meta_file.load().unwrap();
let... | rust_cleaned_test_functions.jsonl/13866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
13381,
74269,
368,
341,
286,
1077,
1815,
284,
2278,
310,
6105,
17223,
34,
7581,
46,
25143,
91120,
8291,
4461,
310,
3521,
2748,
12745,
73121,
74269,
82,
14,
42315,
82,
3909,
756,
286,
5133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_plus_minus() -> Result<()> {
let test_suite = vec![
Test {
name: "f(x) = x + 12",
expr: Expression::create_binary_expression("+", vec![col("x"), lit(12i32)]),
column: "x",
left: None,
right: None,
expe... | rust_cleaned_test_functions.jsonl/7321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25842,
25922,
28043,
38457,
368,
1464,
5714,
71698,
341,
262,
1077,
1273,
57239,
284,
7486,
90515,
286,
3393,
341,
310,
829,
25,
330,
69,
2075,
8,
284,
856,
488,
220,
16,
17,
756,
310,
15169,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_var_decl() {
let tokens = vec![
token(Identifier, "x"),
token(Equals, ""),
token(Literal, "1"),
token(Plus, ""),
token(Literal, "2"),
token(EOF, ""),
];
assert_eq!(
parse(tokens).unwrap()... | rust_cleaned_test_functions.jsonl/120436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
35814,
368,
341,
286,
1077,
11211,
284,
7486,
90515,
310,
3950,
7,
8714,
11,
330,
87,
4461,
310,
3950,
7,
4315,
11,
72712,
310,
3950,
4957,
9953,
11,
330,
16,
4461,
310,
3950,
7,
21807,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ldrsh_imm_w() {
assert_eq!(
decode_32(0xf9bd0010),
Instruction::LDRSH_imm {
params: Reg2FullParams {
rt: Reg::R0,
rn: Reg::SP,
imm32: 0x10,
index: true,
add: true,
... | rust_cleaned_test_functions.jsonl/64804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
50573,
81,
927,
71370,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
24,
8940,
15,
15,
16,
15,
1326,
286,
29051,
486,
43,
7687,
8590,
71370,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_install_twice_dir() {
let dir = "dir";
let scene = TestScenario::new(util_name!());
scene.ucmd().arg("-d").arg(dir).succeeds();
scene.ucmd().arg("-d").arg(dir).succeeds();
let at = &scene.fixtures;
assert!(at.dir_exists(dir));
} | rust_cleaned_test_functions.jsonl/47013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
54178,
558,
4334,
368,
341,
262,
1077,
5419,
284,
330,
3741,
876,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
5231,
262,
6109,
56334,
2277,
1005,
858,
13645,
67,
1827,
85... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_gstring() {
let cstr = CString::new("foo").unwrap();
let gstring = GString::from(cstr);
assert_eq!(gstring.as_str(), "foo");
let s = String::from(gstring);
assert_eq!(s, "foo");
} | rust_cleaned_test_functions.jsonl/58210 | {
"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,
3904,
5673,
1889,
917,
368,
341,
286,
1077,
272,
495,
284,
56956,
486,
931,
445,
7975,
1827,
15454,
543,
286,
1077,
342,
917,
284,
479,
703,
486,
1499,
1337,
495,
317,
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... | 1 |
#[test]
fn test_unexpected_last_type() {
let mut log = new_record_test();
log.write("foo");
log.set_byte(6, Last as u8);
log.fix_checksum(0, 3);
assert_eq!(EOF, log.read());
assert_eq!(3, log.dropped_bytes());
assert!(log.match_error("missing start"));
... | rust_cleaned_test_functions.jsonl/46695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
7325,
12195,
1819,
368,
341,
286,
1077,
5206,
1487,
284,
501,
14192,
4452,
543,
286,
1487,
3836,
445,
7975,
797,
286,
1487,
980,
19737,
7,
21,
11,
7996,
438,
575,
23,
317,
286,
1487,
677... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cap_numerical_overshoot_panic() {
let over_top = LogProb(0.00000005);
over_top.cap_numerical_overshoot(0.00000001);
} | rust_cleaned_test_functions.jsonl/59943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16388,
99001,
938,
62,
8969,
90321,
620,
31270,
368,
341,
286,
1077,
916,
10426,
284,
2835,
36980,
7,
15,
13,
15,
15,
15,
15,
15,
15,
15,
20,
317,
286,
916,
10426,
27388,
99001,
938,
62,
896... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_2_0001_html() {
let definitions = dmntk_model::parse(dmntk_examples::DMN_2_0001).expect("parsing model 2_0001.dmn failed");
let html = crate::generate(&definitions);
assert_eq!("<!DOCTYPE html>", &html[0..15]);
fs::create_dir_all(TARGET_DIR).expect("creating target directories failed");
... | rust_cleaned_test_functions.jsonl/34901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
62,
15,
15,
15,
16,
9564,
368,
341,
220,
1077,
17473,
284,
28676,
406,
74,
5047,
486,
6400,
1500,
40882,
74,
45279,
486,
8395,
45,
62,
17,
62,
15,
15,
15,
16,
568,
17119,
445,
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_eq_after_rotation() {
// test that two deques are equal even if elements are laid out differently
let len = 28;
let mut ring: VecDeque<i32> = (0..len as i32).collect();
let mut shifted = ring.clone();
for _ in 0..10 {
ring.pop_front();
for elt in &mut... | rust_cleaned_test_functions.jsonl/73715 | {
"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,
10714,
19844,
44813,
368,
341,
262,
442,
1273,
429,
1378,
409,
13968,
525,
6144,
1496,
421,
5424,
525,
17113,
700,
21303,
198,
262,
1077,
2422,
284,
220,
17,
23,
280,
262,
1077,
5206,
10058,
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... | 5 |
#[test]
fn test_psi() {
let generator = G2Projective::generator();
let z = Fp2 {
c0: Fp::from_raw_unchecked([
0x0ef2ddffab187c0a,
0x2424522b7d5ecbfc,
0xc6f341a3398054f4,
0x5523ddf409502df0,
0xd55c0b5a88e0dd97,
0x066428d7049... | rust_cleaned_test_functions.jsonl/47812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
6321,
368,
341,
262,
1077,
13823,
284,
479,
17,
7849,
533,
486,
35851,
1428,
262,
1077,
1147,
284,
434,
79,
17,
341,
286,
272,
15,
25,
434,
79,
486,
1499,
16067,
4907,
7549,
8956,
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_is_cluster_slots() {
let combos = [
(b"cluster", b"slots"),
(b"CLUSTER", b"SLOTS"),
(b"cluster", b"SLOTS"),
(b"CLUSTER", b"slots"),
];
for combo in combos {
let frame = Frame::Redis(RedisFrame::Array(vec![
... | rust_cleaned_test_functions.jsonl/119984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
28441,
54161,
368,
341,
286,
1077,
70133,
284,
2278,
310,
320,
65,
1,
18855,
497,
293,
1,
49767,
4461,
310,
320,
65,
1,
3140,
46009,
497,
293,
66310,
74602,
4461,
310,
320,
65,
1,
18855,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_resolve_files() {
let regex = Regex::new(r#"tests/demo\.log(\.(?P<rotation>\d)(\.gz)?)?"#).unwrap();
let result = FileSource::resolve_files(®ex, 0).unwrap();
assert_eq!(result.len(), 3);
assert_eq!(result.get(0), Some(&"tests/demo.log.2.gz".to_string()));
... | rust_cleaned_test_functions.jsonl/84670 | {
"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,
77291,
10931,
368,
341,
286,
1077,
20180,
284,
26146,
486,
931,
2601,
55543,
23841,
55160,
18831,
839,
11520,
12832,
30,
47,
27,
13538,
8449,
67,
2376,
18831,
46589,
8,
10170,
7521,
2,
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_unnamed_struct() {
let test_data: Vec<u8> = [
0xFF,
0b1001_0110,
0xAA,
0xBB,
0xCC,
0xDD,
0b1001_0110,
0xCC,
0xDD,
0x02,
0xBE,
0xEF,
]
.to_vec();
// Read
let ret_read = samples::Un... | rust_cleaned_test_functions.jsonl/123223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
30245,
15126,
368,
341,
262,
1077,
1273,
1769,
25,
11312,
34837,
23,
29,
284,
2278,
286,
220,
15,
9264,
345,
286,
220,
15,
65,
16,
15,
15,
16,
62,
15,
16,
16,
15,
345,
286,
220,
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_i2c_mock_multiple_transaction_err() {
let expectations = [
Transaction::write(0xaa, vec![10, 12]),
Transaction::write(0xaa, vec![10, 12]),
];
let mut i2c = Mock::new(&expectations);
i2c.write(0xaa, &vec![10, 12]).unwrap();
i2c.don... | rust_cleaned_test_functions.jsonl/49259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
17,
66,
34134,
45233,
28884,
9266,
368,
341,
286,
1077,
16665,
284,
2278,
310,
17869,
486,
4934,
7,
15,
43300,
11,
7486,
20703,
16,
15,
11,
220,
16,
17,
17036,
310,
17869,
486,
4934,
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_slice_dyninput_array_fixed() {
let mut arr = Array3::<f64>::zeros((5, 2, 5)).into_dyn();
let info = s![1.., 1, NewAxis, ..;2];
arr.slice(info);
arr.slice_mut(info);
arr.view().slice_move(info);
let info2 = s![1.., 1, ..;2];
arr.view().slice_collapse(info2);
} | rust_cleaned_test_functions.jsonl/92599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
69213,
1355,
3858,
37839,
368,
341,
262,
1077,
5206,
2890,
284,
2910,
18,
27638,
69,
21,
19,
6831,
35716,
1188,
20,
11,
220,
17,
11,
220,
20,
4579,
18122,
69213,
543,
262,
1077,
3546,
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_cleanup_first() {
let mut index = AccountsIndex::<bool>::default();
index.add_root(0);
index.add_root(1);
index.cleanup_dead_slot(0);
assert!(index.is_root(1));
assert!(!index.is_root(0));
} | rust_cleaned_test_functions.jsonl/20401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42444,
12978,
368,
341,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1922,
1364,
12993,
7,
15,
317,
286,
1922,
1364,
12993,
7,
16,
317,
286,
1922,
87689,
53427,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hashset_insert_remove() {
let mut m: HashSet<Vec<char>> = HashSet::new();
//let num: u32 = 4096;
let seed: [u8; 16] = [
130, 220, 246, 217, 111, 124, 221, 189, 190, 234, 121, 93, 67, 95, 100, 43,
];
let mut rng: XorShiftRng = SeedableRng::from_seed(seed);
... | rust_cleaned_test_functions.jsonl/44417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
746,
17678,
18193,
368,
341,
262,
1077,
5206,
296,
25,
18931,
50439,
21919,
2452,
284,
18931,
486,
931,
543,
262,
442,
1149,
1629,
25,
575,
18,
17,
284,
220,
19,
15,
24,
21,
280,
1066,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_checked_sub() {
assert_eq!(5u.checked_sub(&0), Some(5));
assert_eq!(5u.checked_sub(&1), Some(4));
assert_eq!(5u.checked_sub(&2), Some(3));
assert_eq!(5u.checked_sub(&3), Some(2));
assert_eq!(5u.checked_sub(&4), Some(1));
assert_eq!(5u.checked_sub(&... | rust_cleaned_test_functions.jsonl/12470 | {
"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,
56456,
5228,
368,
341,
286,
2060,
10714,
10297,
20,
84,
29101,
5228,
2099,
15,
701,
4329,
7,
20,
1106,
286,
2060,
10714,
10297,
20,
84,
29101,
5228,
2099,
16,
701,
4329,
7,
19,
1106,
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_array_index_expr() {
let tests = vec![
("[1, 2, 3][0]", Some(Object::Int(1))),
("[1, 2, 3][1]", Some(Object::Int(2))),
("let i = 0; [1][i]", Some(Object::Int(1))),
("[1, 2, 3][1 + 1];", Some(Object::Int(3))),
("let myArray = [1,... | rust_cleaned_test_functions.jsonl/12292 | {
"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,
3858,
3560,
21915,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
58,
16,
11,
220,
17,
11,
220,
18,
1457,
15,
19076,
4329,
12526,
486,
1072,
7,
16,
41749,
310,
3489,
58,
16,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.