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_ser_placeholder() {
let date_picker =
DatePickerElement::new("action_id").placeholder(PlainText::new("placeholder"));
let json = serde_json::to_string_pretty(&date_picker).unwrap();
let expected = r#"{
"type": "datepicker",
"action_id": "action_id",
"pl... | rust_cleaned_test_functions.jsonl/3898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
60383,
368,
341,
286,
1077,
2400,
68230,
4035,
310,
63426,
1691,
486,
931,
445,
1311,
842,
1827,
12384,
7,
73248,
486,
931,
445,
12384,
4010,
286,
1077,
2951,
284,
61570,
9455,
486,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_defines_symbol_before_initializer() {
use parser::translation_unit;
let env = &mut Env::new();
assert!(translation_unit(
r"
typedef int a;
int foo() {
int a = sizeof(_Atomic(a));
}",
env
)
.is_... | rust_cleaned_test_functions.jsonl/107575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7844,
1543,
21179,
23708,
36462,
368,
341,
9401,
262,
990,
6729,
486,
3053,
14832,
280,
262,
1077,
6105,
284,
609,
6984,
37039,
486,
931,
543,
1066,
262,
2060,
10297,
3053,
14832,
1006,
286,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resource_block_with_undeclared_local_shorthand_rule_body() {
let p = Polar::new();
p.register_constant(sym!("Org"), term!("unimportant"))
.unwrap();
expect_error(
&p,
r#"resource Org {
roles=["member"];
"... | rust_cleaned_test_functions.jsonl/31742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17962,
7113,
6615,
62,
28865,
86251,
13564,
3712,
61679,
21124,
14114,
368,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
9929,
34967,
62512,
17223,
42437,
3975,
4647,
17223,
359,
15333,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pair_to_market_type() {
assert_eq!("spot", super::pair_to_market_type("BTC-USDT"));
assert_eq!("futures", super::pair_to_market_type("BTC-USDT-210625"));
assert_eq!("swap", super::pair_to_market_type("BTC-USDT-SWAP"));
assert_eq!(
"option",
... | rust_cleaned_test_functions.jsonl/9441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14445,
2346,
68725,
1819,
368,
341,
286,
2060,
10714,
17223,
18648,
497,
2256,
486,
12670,
2346,
68725,
1819,
445,
59118,
32340,
10599,
4010,
286,
2060,
10714,
17223,
69,
74606,
497,
2256,
486,
1267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_merges() {
let mut schema_builder = schema::Schema::builder();
let text_field = schema_builder.add_text_field("text", schema::TEXT);
let index = Index::create_in_ram(schema_builder.build());
let reader = index
.reader_builder()
.reload... | rust_cleaned_test_functions.jsonl/58887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
717,
2375,
288,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
497,
10802,
486,
12708... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strong_count() {
{
let a = Cc::new(0u32);
assert!(a.strong_count() == 1);
let w = a.downgrade();
assert!(a.strong_count() == 1);
let b = w.upgrade().expect("upgrade of live rc failed");
assert!(b.strong_count() == 2)... | rust_cleaned_test_functions.jsonl/110850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
644,
3180,
368,
341,
286,
341,
310,
1077,
264,
284,
356,
66,
486,
931,
7,
15,
84,
18,
17,
317,
310,
2060,
10297,
64,
13,
4519,
3180,
368,
621,
220,
16,
317,
310,
1077,
289,
284,
264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_last_uncommented() {
fn check(haystack: &str, needle: &str, expected: Option<usize>) {
assert_eq!(expected, haystack.find_last_uncommented(needle));
}
check("foo test bar test", "test", Some(13));
check("test,", "test", Some(0));
check("no... | rust_cleaned_test_functions.jsonl/44605 | {
"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,
21814,
12195,
4907,
6182,
291,
368,
341,
286,
5168,
1779,
3203,
352,
7693,
25,
609,
495,
11,
30309,
25,
609,
495,
11,
3601,
25,
6959,
90244,
9231,
341,
310,
2060,
10714,
10297,
7325,
11,
88447,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_refresh_neuron_by_memo_by_controller() {
let owner = *TEST_NEURON_1_OWNER_PRINCIPAL;
refresh_neuron_by_memo(owner, owner);
} | rust_cleaned_test_functions.jsonl/1150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42076,
13925,
36090,
3710,
717,
6726,
3710,
21600,
368,
341,
262,
1077,
6372,
284,
353,
10033,
14039,
1511,
711,
62,
16,
74323,
10571,
38439,
3298,
969,
280,
262,
10408,
13925,
36090,
3710,
717,
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 |
#[test]
fn test_impl_nonzero_fmt() {
parse_macro(
r#"
macro_rules! impl_nonzero_fmt {
( #[$stability: meta] ( $( $Trait: ident ),+ ) for $Ty: ident ) => {
fn foo () {}
}
}
"#,
).assert_expand_items(
r#"impl_nonzero_fmt! { # [st... | rust_cleaned_test_functions.jsonl/28766 | {
"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,
21007,
21637,
14154,
38128,
368,
341,
1066,
262,
4715,
58810,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
11605,
21637,
14154,
38128,
341,
310,
320,
671,
3442,
267,
2897,
25,
8823,
60,
320,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_message_deserialization() {
let value = Message {
activity: None,
application: None,
attachments: Vec::new(),
author: User {
avatar: Some("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".to_owned()),
bot: false,
... | rust_cleaned_test_functions.jsonl/19433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3832
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
15768,
50563,
368,
341,
286,
1077,
897,
284,
4856,
341,
310,
5702,
25,
2240,
345,
310,
3766,
25,
2240,
345,
310,
33679,
25,
11312,
486,
931,
3148,
310,
3150,
25,
2657,
341,
394,
20701,
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_database_function() -> crate::error::FuseQueryResult<()> {
use std::sync::Arc;
use pretty_assertions::assert_eq;
use crate::datablocks::*;
use crate::datavalues::*;
use crate::functions::udfs::DatabaseFunction;
use crate::functions::*;
#[allow(dead_code)]
struc... | rust_cleaned_test_functions.jsonl/18234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27341,
9174,
368,
1464,
17717,
486,
841,
486,
48600,
2859,
2077,
71698,
341,
262,
990,
1460,
486,
12996,
486,
36809,
401,
262,
990,
5020,
16553,
908,
486,
2207,
10714,
401,
262,
990,
17717,
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... | 9 |
#[test]
fn test_inx_d_low() {
let mut state = State8080::empty_state();
state.memory = vec![0x13];
emulate_8080_op(&mut state);
assert_eq!(state.d, 0);
assert_eq!(state.e, 1);
} | rust_cleaned_test_functions.jsonl/7751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
87,
814,
23767,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
16,
18,
935,
286,
65485,
62,
23,
15,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_path() {
let s = Syntax::default();
assert_eq!(
super::parse("{{ None }}", &s).unwrap(),
vec![Node::Expr(Ws(false, false), Expr::Path(vec!["None"]))],
);
assert_eq!(
super::parse("{{ Some(123) }}", &s).unwrap(),
... | rust_cleaned_test_functions.jsonl/50223 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 574
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2638,
368,
341,
286,
1077,
274,
284,
32117,
486,
2258,
1428,
286,
2060,
10714,
33673,
310,
2256,
486,
6400,
445,
2979,
2240,
3869,
497,
609,
82,
568,
15454,
3148,
310,
7486,
20703,
1955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_audio_mux_element_v0() {
const PAYLOAD_LEN: usize = 363;
const HEADER_LEN: usize = 9;
let input: &mut [u8] = &mut [0; PAYLOAD_LEN + HEADER_LEN];
// length frames
let header: &[u8] = &[0x20, 0x00, 0x13, 0x90, 0x12, 0x27, 0xfb, 0x60, 0x00];
... | rust_cleaned_test_functions.jsonl/34687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29688,
80363,
7894,
2273,
15,
368,
341,
286,
733,
49377,
12988,
15536,
25,
22301,
284,
220,
18,
21,
18,
280,
286,
733,
39665,
15536,
25,
22301,
284,
220,
24,
280,
286,
1077,
1946,
25,
609,
698... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_database_function() -> Result<()> {
#[allow(dead_code)]
struct Test {
name: &'static str,
display: &'static str,
nullable: bool,
columns: Vec<DataColumn>,
expect: DataColumn,
error: &'static str,
func: Box<dyn Function>,
}
... | rust_cleaned_test_functions.jsonl/44202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27341,
9174,
368,
1464,
5714,
71698,
341,
262,
11506,
7183,
83207,
4136,
5563,
262,
2036,
3393,
341,
286,
829,
25,
30136,
1978,
607,
345,
286,
3037,
25,
30136,
1978,
607,
345,
286,
13258,
25,
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... | 4 |
#[test]
fn test_give_pod_by_up() {
let cxx = indoc! {"
std::unique_ptr<Bob> give_bob() {
auto a = std::make_unique<Bob>();
a->a = 3;
a->b = 4;
return a;
}
"};
let hdr = indoc! {"
#include <cstdint>
#include <memory>
... | rust_cleaned_test_functions.jsonl/9730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
533,
85337,
3710,
8237,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
1460,
486,
9587,
4348,
27,
32388,
29,
2968,
880,
674,
368,
341,
310,
3233,
264,
284,
1460,
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_executor_execute_same_block_multiple_times() {
let parent_block_id = *PRE_GENESIS_BLOCK_ID;
let block_id = gen_block_id(1);
let version = 100;
let txns: Vec<_> = (0..version)
.map(|i| encode_mint_transaction(gen_address(i), 100))
.collect();
{
let ex... | rust_cleaned_test_functions.jsonl/78283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 760
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81207,
44329,
33574,
7113,
45233,
22353,
368,
341,
262,
1077,
2681,
7113,
842,
284,
353,
17357,
42362,
83366,
18756,
3450,
280,
262,
1077,
2504,
842,
284,
4081,
7113,
842,
7,
16,
317,
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... | 3 |
#[test]
fn test_cast_range_int_max() {
assert_eq!(int::MAX.to_int(), Some(int::MAX as int));
assert_eq!(int::MAX.to_i8(), None);
assert_eq!(int::MAX.to_i16(), None);
assert_eq!(int::MAX.to_i64(), Some(int::MAX as i64));
assert_eq!(int::MAX.to_u8(), None);
... | rust_cleaned_test_functions.jsonl/23648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 476
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9698,
4042,
6345,
368,
341,
286,
2060,
10714,
10297,
396,
486,
10586,
2389,
4042,
1507,
220,
4329,
1548,
486,
10586,
438,
526,
1106,
286,
2060,
10714,
10297,
396,
486,
10586,
2389,
5318,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_setup_regs() {
let hv = hypervisor::new().unwrap();
let vm = hv.create_vm().unwrap();
let vcpu = vm.create_vcpu(0).unwrap();
let mut regions = Vec::new();
regions.push((
GuestAddress(layout::RAM_64BIT_START),
(layout::FDT_MAX_SIZE +... | rust_cleaned_test_functions.jsonl/21464 | {
"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,
21363,
36910,
368,
341,
286,
1077,
22747,
284,
9751,
31396,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
22747,
2520,
39008,
1005,
15454,
543,
286,
1077,
348,
16475,
284,
10995,
2520,
2273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bus() {
let base = MmioAddress(10);
let base_prev = MmioAddress(base.value().checked_sub(1).unwrap());
let len = 10;
let range = MmioRange::new(base, len).unwrap();
let range_next = range.last().checked_add(1).unwrap();
let mut bus = Bus::new();
... | rust_cleaned_test_functions.jsonl/45920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25418,
368,
341,
286,
1077,
2331,
284,
386,
76,
815,
4286,
7,
16,
15,
317,
286,
1077,
2331,
25566,
284,
386,
76,
815,
4286,
12663,
2824,
1005,
7549,
5228,
7,
16,
568,
15454,
1423,
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... | 4 |
#[test]
fn test_rank_k() {
let mut bits: BitVec<u8> = BitVec::new_fill(false, 72);
bits.set_bit(63, true);
let rs = RankSelect::new(bits, 2);
assert_eq!(rs.rank_1(63), Some(1));
assert_eq!(rs.rank_1(64), Some(1));
assert_eq!(rs.rank_1(71), Some(1));
} | rust_cleaned_test_functions.jsonl/110835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20417,
4698,
368,
341,
286,
1077,
5206,
9472,
25,
6495,
10050,
34837,
23,
29,
284,
6495,
10050,
486,
931,
30728,
3576,
11,
220,
22,
17,
317,
286,
9472,
980,
13996,
7,
21,
18,
11,
830,
317,
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_dispatch_with_discover_updates_server_state() {
let disc = new_test_discover();
let mac_addr = disc.chaddr;
let mut server = new_test_server(|| 42);
let _ = server.dispatch(disc).unwrap();
assert_eq!(server.pool.available_addrs.len(), 0);
assert_e... | rust_cleaned_test_functions.jsonl/61713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6615,
9932,
3688,
57829,
12015,
4387,
368,
341,
286,
1077,
2560,
284,
501,
4452,
9932,
3688,
543,
286,
1077,
8978,
7387,
284,
2560,
5329,
6214,
280,
286,
1077,
5206,
3538,
284,
501,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_find_mut() {
let mut trie = RadixTrie::<usize>::new();
trie.insert("ON", 647);
let found = trie.find_mut("ON");
assert_eq!(found, Some(&mut 647));
*found.unwrap() = 416;
let found = trie.find("ON");
assert_eq!(found, Some(&416));
... | rust_cleaned_test_functions.jsonl/41235 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
21814,
29523,
368,
341,
286,
1077,
5206,
59067,
284,
20605,
941,
51,
7231,
27638,
51878,
6831,
931,
543,
286,
59067,
7030,
445,
711,
497,
220,
21,
19,
22,
317,
286,
1077,
1730,
284,
59067... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dictstring_filled_get_size() {
let stru =
DICTstring::create_from_string(CString::new("toto va au zoo et c'est beau").unwrap());
assert_eq!(stru.get_size(), 32);
} | rust_cleaned_test_functions.jsonl/100399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5243,
917,
90592,
3062,
2368,
368,
341,
286,
1077,
607,
84,
4035,
310,
422,
14805,
917,
486,
3182,
5673,
3904,
3025,
703,
486,
931,
445,
83,
2072,
11164,
7906,
40914,
1842,
272,
17321,
70906,
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 |
#[test]
fn test_json_builtin_statement() {
let n = BuiltinStmt {
base: BaseNode::default(),
id: Identifier {
base: BaseNode::default(),
name: "task".to_string(),
},
};
let serialized = serde_json::to_string(&n).unwrap();
assert_eq!(
seriali... | rust_cleaned_test_functions.jsonl/40421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
73829,
37404,
368,
341,
262,
1077,
308,
284,
425,
25628,
31063,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
877,
25,
34621,
341,
310,
2331,
25,
5351,
1955,
486,
2258,
3148,
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_translate() {
const START: u64 = 100;
const LENGTH: u64 = 1000;
let data = vec![0u8; LENGTH as usize];
let addr = data.as_ptr() as u64;
let regions = vec![MemoryRegion::new_from_slice(&data, START)];
let cases = vec![
(true, START, 0, ... | rust_cleaned_test_functions.jsonl/42298 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 642
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66381,
368,
341,
286,
733,
20998,
25,
575,
21,
19,
284,
220,
16,
15,
15,
280,
286,
733,
71838,
25,
575,
21,
19,
284,
220,
16,
15,
15,
15,
280,
286,
1077,
821,
284,
7486,
20703,
15,
84,
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_conflicting_prefixes() {
// would mess up the token kind detection. If this test fails after adding another variant
for variant in SecureTokenKind::VARIANTS {
for other in SecureTokenKind::VARIANTS {
if variant == other {
... | rust_cleaned_test_functions.jsonl/90685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16059,
78208,
13974,
288,
368,
341,
1789,
286,
442,
1035,
9435,
705,
279,
3950,
3093,
17984,
13,
1416,
419,
1273,
14525,
1283,
7842,
2441,
11424,
8945,
286,
369,
11424,
304,
34502,
3323,
10629,
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... | 5 |
#[test]
fn test_struct_with_reference_public_key() -> Result<(), Error> {
combined_keys_gen!(sender_combined_key, receiver_combined_key);
#[derive(PartialEq, Debug, Serialize, Deserialize)]
struct Str<'a>(&'a str);
impl<'a> SerdeEncryptPublicKey for Str<'a> {
type S = BincodeSerializer<... | rust_cleaned_test_functions.jsonl/31586 | {
"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,
15126,
6615,
25433,
27074,
3097,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
10856,
12631,
16322,
10297,
11644,
89945,
3097,
11,
13964,
89945,
3097,
626,
262,
11506,
27098,
5304,
20894,
27312,
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... | 4 |
#[test]
fn test_safety_rules_export_consensus() {
// Create the smoke test environment
let num_nodes = 4;
let mut env = SmokeTestEnvironment::new(num_nodes);
// Update all nodes to export the consensus key
for node_index in 0..num_nodes {
let (mut node_config, _) = load_node_config(... | rust_cleaned_test_functions.jsonl/39709 | {
"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,
643,
38618,
21407,
27114,
31971,
13626,
368,
341,
262,
442,
4230,
279,
16205,
1273,
4573,
198,
262,
1077,
1629,
14896,
284,
220,
19,
280,
262,
1077,
5206,
6105,
284,
53204,
2271,
12723,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_task_get_only_active() {
let mut context = get_context(accounts(1));
testing_env!(context.build());
let mut contract = Contract::new();
// Move forward time and blocks to get more accurate bps
testing_env!(context
.is_view(false)
.... | rust_cleaned_test_functions.jsonl/6278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12184,
3062,
18410,
12930,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
16,
1106,
286,
7497,
15879,
10297,
2147,
13239,
1423,
286,
1077,
5206,
5116,
284,
19185,
486,
931,
1428,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_txin() {
let txin_bytes = Vec::from_hex(
"a15d57094aa7a21a28cb20b59aab8fc7d1149a3bdbcddba9c622e4f5f6a99ece01\
0000006c493046022100f93bb0e7d8db7bd46e40132d1f8242026e045f03a0efe71\
bbb8e3f475e970d790221009337cd7f1f929f00cc6ff01f03729b069a7c21b59b17\
... | rust_cleaned_test_functions.jsonl/43973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
258,
368,
341,
286,
1077,
9854,
258,
12524,
284,
11312,
486,
1499,
32655,
1006,
310,
330,
64,
16,
20,
67,
20,
22,
15,
24,
19,
5305,
22,
64,
17,
16,
64,
17,
23,
7221,
17,
15,
65,
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_contains_three_of_a_kind() {
let mut cards = vec![];
cards.push(Card {
rank: Rank::Three,
suit: Suit::Diamonds,
});
cards.push(Card {
rank: Rank::Five,
suit: Suit::Clubs,
});
cards.push(Card {
... | rust_cleaned_test_functions.jsonl/80726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63598,
50016,
3575,
4306,
33162,
368,
341,
286,
1077,
5206,
7411,
284,
7486,
0,
15078,
286,
7411,
2552,
58645,
341,
310,
7077,
25,
19298,
486,
19641,
345,
310,
7781,
25,
32611,
486,
76510,
82,
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_table_construction() {
let to_encode = "4444221";
let tree = huffman_tree(to_encode);
let mut table = HashMap::<char, String>::new();
build_encoding_table(&tree, &mut table, "");
let one = &*table[&'1'];
let two = &*table[&'2'];
let four = &*table[&'4'];
assert!(f... | rust_cleaned_test_functions.jsonl/22000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
3382,
3024,
368,
341,
262,
1077,
311,
11224,
284,
330,
19,
19,
19,
19,
17,
17,
16,
876,
262,
1077,
4916,
284,
305,
77708,
11663,
12186,
11224,
317,
262,
1077,
5206,
1965,
284,
10528,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_seq_get_slice() {
Python::with_gil(|py| {
let v: Vec<i32> = vec![1, 1, 2, 3, 5, 8];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
assert_eq!(
[1, 2, 3],
seq.get_slice(1, 4).unwrap... | rust_cleaned_test_functions.jsonl/70317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
3062,
26488,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
25,
11312,
21897,
18,
17,
29,
284,
7486,
20703,
16,
11,
220,
16,
11,
220,
17,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_get_block_commitment() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let RpcHandler {
io,
meta,
block_commitment_cache,
..
} = start_rpc_handler_with_tx(&bob_pubkey);
let req = r#"{"jsonrpc":"2.0","id":1,"m... | rust_cleaned_test_functions.jsonl/3051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1055
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
7113,
36346,
478,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
341,
310,
6399,
345,
310,
8823,
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... | 5 |
#[test]
fn test_poh_speed() {
paychains_logger::setup();
let poh_config = PohConfig {
target_tick_duration: Duration::from_millis(paychains_sdk::clock::MS_PER_TICK),
// make PoH rate really fast to cause the panic condition
hashes_per_tick: Some(100 * paychain... | rust_cleaned_test_functions.jsonl/96462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
16944,
368,
341,
286,
2291,
58358,
27413,
486,
15188,
543,
286,
1077,
281,
2267,
5332,
284,
393,
2267,
2648,
341,
310,
2169,
43612,
25454,
25,
21045,
486,
1499,
717,
56212,
1295,
352,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nesting() {
let mut row = Row::default();
row.push_dict_with(|row| {
row.push(Datum::String("favourites"));
row.push_list_with(|row| {
row.push(Datum::String("ice cream"));
row.push(Datum::String("oreos"));
r... | rust_cleaned_test_functions.jsonl/56499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
59855,
368,
341,
286,
1077,
5206,
2802,
284,
10801,
486,
2258,
543,
286,
2802,
2552,
5243,
6615,
22428,
651,
91,
341,
310,
2802,
2552,
5432,
26253,
486,
703,
445,
69,
69316,
4010,
310,
280... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rev() {
let xs = [2, 4, 6, 8, 10, 12, 14, 16];
let mut it = xs.iter();
it.next();
it.next();
assert!(it.rev().cloned().collect::<Vec<int>>() ==
vec![16, 14, 12, 10, 8, 6]);
} | rust_cleaned_test_functions.jsonl/61251 | {
"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,
38082,
368,
341,
262,
1077,
11943,
284,
508,
17,
11,
220,
19,
11,
220,
21,
11,
220,
23,
11,
220,
16,
15,
11,
220,
16,
17,
11,
220,
16,
19,
11,
220,
16,
21,
935,
262,
1077,
5206,
432,
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_metadata_template_resolve() {
let hook = MetadataHook::Template(
"http://localhost/node/{{os}}/{{arch}}/{{filename}}".to_string(),
);
let expected = format!(
"http://localhost/node/{}/{}/index.json",
NODE_DISTRO_OS, NODE_DISTRO_ARCH
... | rust_cleaned_test_functions.jsonl/31683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22220,
8693,
77291,
368,
341,
286,
1077,
9704,
284,
33589,
31679,
486,
7275,
1006,
310,
330,
1254,
1110,
8301,
37211,
66839,
436,
3417,
66839,
1113,
3417,
66839,
8404,
3417,
3263,
983,
3904,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_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/22016 | {
"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,
2458,
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_summary_something() {
let test_dir = tempdir().expect("error while creating tempdir");
let mut service = build_json_service(&test_dir);
let today = chrono::Local::today();
let range_start: DateTimeW = today.and_hms(8, 0, 0).into();
let activity_start: Date... | rust_cleaned_test_functions.jsonl/116415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27251,
643,
11532,
368,
341,
286,
1077,
1273,
4334,
284,
2730,
3741,
1005,
17119,
445,
841,
1393,
6825,
2730,
3741,
797,
286,
1077,
5206,
2473,
284,
1936,
9455,
12267,
2099,
1944,
4334,
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... | 2 |
#[test]
fn test_validate_tombstone_tombstone_block_exceeded() {
{
let current_block_index = 888;
let tombstone_block_index = 889;
assert_eq!(
validate_tombstone(current_block_index, tombstone_block_index),
Ok(())
... | rust_cleaned_test_functions.jsonl/33281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 556
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
528,
2855,
10812,
528,
2855,
10812,
7113,
2702,
94206,
368,
341,
286,
341,
3374,
310,
1077,
1482,
7113,
3560,
284,
220,
23,
23,
23,
280,
310,
1077,
43080,
10812,
7113,
3560,
284,
220,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove() {
let mut map = Extensions::new();
map.insert::<i8>(123);
assert!(map.get::<i8>().is_some());
map.remove::<i8>();
assert!(map.get::<i8>().is_none());
} | rust_cleaned_test_functions.jsonl/43505 | {
"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,
18193,
368,
341,
262,
1077,
5206,
2415,
284,
55795,
486,
931,
1428,
262,
2415,
7030,
27638,
72,
23,
2235,
16,
17,
18,
317,
262,
2060,
10297,
2186,
670,
27638,
72,
23,
10483,
285,
61855,
5231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_auth_from_iterator() {
let mut cont = HashMap::new();
cont.insert("sentry_version", "7");
cont.insert("sentry_client", "raven-js/3.23.3");
cont.insert("sentry_key", "4bb5d94de752a36b8b87851a3f82726a");
let auth = Auth::from_pairs(cont.into_iter()).unwrap();
assert_eq!(au... | rust_cleaned_test_functions.jsonl/119262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14014,
5673,
13491,
368,
341,
262,
1077,
5206,
683,
284,
10528,
486,
931,
543,
262,
683,
7030,
445,
82,
4085,
9438,
497,
330,
22,
797,
262,
683,
7030,
445,
82,
4085,
8179,
497,
330,
81,
5276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_infer_field_schema() {
assert_eq!(infer_field_schema("A", None), DataType::Utf8);
assert_eq!(infer_field_schema("\"123\"", None), DataType::Utf8);
assert_eq!(infer_field_schema("10", None), DataType::Int64);
assert_eq!(infer_field_schema("10.2", None), DataType::F... | rust_cleaned_test_functions.jsonl/16418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 675
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
802,
5013,
25371,
368,
341,
286,
2060,
10714,
10297,
89559,
5013,
25371,
445,
32,
497,
2240,
701,
33172,
486,
38980,
23,
317,
286,
2060,
10714,
10297,
89559,
5013,
25371,
38915,
16,
17,
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_primitive_array_min_max() {
let a = Primitive::<i32>::from_slice(&[5, 6, 7, 8, 9]).to(DataType::Int32);
assert_eq!(5, min(&a).unwrap());
assert_eq!(9, max(&a).unwrap());
} | rust_cleaned_test_functions.jsonl/101317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
7260,
6345,
368,
341,
286,
1077,
264,
284,
51460,
27638,
72,
18,
17,
6831,
1499,
26488,
2099,
58,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
10697,
983,
63941,
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_nanoseconds() {
assert_eq!(nanoseconds("1 second"), Ok(1_000_000_000));
assert_eq!(nanoseconds("2 nanoseconds"), Ok(2));
assert_eq!(nanoseconds("1 nanosecond"), Ok(1));
assert_eq!(nanoseconds("2nanoseconds"), Ok(2));
assert_eq!(nanoseconds("1nanosecond"), ... | rust_cleaned_test_functions.jsonl/71129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73936,
75889,
368,
341,
286,
2060,
10714,
10297,
18759,
75889,
445,
16,
2086,
3975,
7622,
7,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
1106,
286,
2060,
10714,
10297,
18759,
75889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rotate() {
let ctxt = get_test_vector_only_context();
let mut state = InterpreterState::new(&ctxt);
let args = vec![term_ref(array![5.0f32, 10.0f32])];
let rotate_func = RotateImpl {
vector_type : TEST_VECTOR_T
};
let (result, _) = ro... | rust_cleaned_test_functions.jsonl/49742 | {
"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,
60834,
368,
341,
286,
1077,
59162,
284,
633,
4452,
12247,
18410,
8467,
543,
286,
1077,
5206,
1584,
284,
82493,
1397,
486,
931,
2099,
77492,
317,
286,
1077,
2827,
284,
7486,
20703,
4991,
7793,
6110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_predicate_none() {
let predicate = PredicateBuilder::default()
.rpc_predicate(None)
.unwrap()
.build();
assert!(predicate.exprs.is_empty());
} | rust_cleaned_test_functions.jsonl/3655 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
97474,
31488,
368,
341,
286,
1077,
24283,
284,
49827,
3297,
486,
2258,
741,
310,
659,
29414,
97474,
26717,
340,
310,
659,
15454,
741,
310,
659,
5834,
1428,
286,
2060,
10297,
61785,
57029,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_invalid_struct_child_array_lengths() {
StructArray::from(vec![
(
Field::new("b", DataType::Float64, false),
Arc::new(PrimitiveArray::from(vec![1.1])) as Arc<Array>,
),
(
Field::new("c", DataType::Float64,... | rust_cleaned_test_functions.jsonl/107745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
15126,
17268,
3858,
54416,
368,
341,
286,
16139,
1857,
486,
1499,
25592,
90515,
310,
2399,
394,
8601,
486,
931,
445,
65,
497,
33172,
486,
5442,
21,
19,
11,
895,
1326,
394,
19689,
486,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_call_containing_spread() {
// be preserved.
test("Math.sin(...c)", "[...c]");
test("Math.sin(4, ...c, a)", "[...c]");
test("Math.sin(foo(), ...c, bar())", "[foo(), ...c, bar()]");
test("Math.sin(...a, b, ...c)", "[...a, ...c]");
test("Math.sin(...b, ...c)", "[...b, .... | rust_cleaned_test_functions.jsonl/461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
10260,
2056,
10123,
878,
368,
341,
1066,
262,
442,
387,
33583,
624,
262,
1273,
445,
8815,
16318,
18850,
66,
11583,
10545,
1112,
66,
37389,
262,
1273,
445,
8815,
16318,
7,
19,
11,
2503,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eor_reg_w() {
assert_eq!(
decode_32(0xea8e0402),
Instruction::EOR_reg {
params: Reg3ShiftParams {
rd: Reg::R4,
rn: Reg::LR,
rm: Reg::R2,
setflags: SetFlags::False,
shift_t:... | rust_cleaned_test_functions.jsonl/64812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
2204,
269,
4920,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
56570,
23,
68,
15,
19,
15,
17,
1326,
286,
29051,
486,
36,
868,
4920,
341,
310,
3628,
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_three_way_handshake() {
let mut s = socket_listen();
send!(s, TcpRepr {
control: TcpControl::Syn,
seq_number: REMOTE_SEQ,
ack_number: None,
..SEND_TEMPL
});
assert_eq!(s.state(), State::SynReceived);
assert_e... | rust_cleaned_test_functions.jsonl/1753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50016,
48936,
23194,
29661,
368,
341,
286,
1077,
5206,
274,
284,
7575,
79286,
543,
286,
3624,
10297,
82,
11,
64876,
693,
649,
341,
310,
2524,
25,
64876,
3273,
486,
37134,
345,
310,
12981,
5500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub() {
assert_eq!(
LogProb::ln_one().ln_sub_exp(LogProb::ln_one()),
LogProb::ln_zero()
);
assert_relative_eq!(
*LogProb::ln_one().ln_sub_exp(LogProb(0.5f64.ln())),
*LogProb(0.5f64.ln())
);
assert_relative_eq... | rust_cleaned_test_functions.jsonl/59938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
368,
341,
286,
2060,
10714,
33673,
310,
2835,
36980,
486,
2261,
11667,
1005,
2261,
5228,
14214,
33028,
36980,
486,
2261,
11667,
14702,
310,
2835,
36980,
486,
2261,
19359,
741,
286,
1439,
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_serialization() {
let rw_set = ReadWriteSet {
granularity: 3,
read_set: vec![b"foo".to_vec().into(), b"bar".to_vec().into()],
write_set: vec![b"moo".to_vec().into()],
};
let enc = cbor::to_vec(&rw_set);
let dec_rw_set: ReadWri... | rust_cleaned_test_functions.jsonl/31618 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
2022,
368,
341,
286,
1077,
25991,
2602,
284,
4457,
7985,
1649,
341,
310,
95997,
25,
220,
18,
345,
310,
1349,
2602,
25,
7486,
20703,
65,
1,
7975,
3263,
983,
13251,
1005,
18122,
1507,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_recursive_tuple() {
let two_decode = <(String, (String, i64))>::try_from(&[
2, 111, 110, 101, 0, 5, 2, 116, 119, 111, 0, 21, 42, 0,
])
.expect("failed two");
// TODO: can we get eq for borrows of the inner types?
assert_eq!(("one".to_st... | rust_cleaned_test_functions.jsonl/127224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
66242,
21773,
368,
341,
286,
1077,
1378,
15227,
284,
366,
7,
703,
11,
320,
703,
11,
600,
21,
19,
593,
6831,
1539,
5673,
2099,
9640,
310,
220,
17,
11,
220,
16,
16,
16,
11,
220,
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... | 1 |
#[test]
fn test_parse_arguments_values() {
let args = ovec!["-c", "foo.c", "-FI", "file", "-Fofoo.obj", "/showIncludes"];
let ParsedArguments {
input,
language,
depfile: _,
outputs,
preprocessor_args,
msvc_show_includes,
... | rust_cleaned_test_functions.jsonl/14159 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
9146,
368,
341,
286,
1077,
2827,
284,
297,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
497,
6523,
19426,
497,
330,
1192,
497,
6523,
91879,
7975,
21232,
497,
3521,
3445,
55834,
6332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_invert_is_pow() {
let q_minus_2 = [
0x1e13aee130956aa3,
0xf2f264f035242b27,
0xb6b6ebb9a18fecc9,
0x26337f752795f77c,
];
let mut r1: Scalar = rand_value();
let mut r2 = r1;
for _ in 0..100 {
r1 = ... | rust_cleaned_test_functions.jsonl/14282 | {
"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,
1243,
1621,
6892,
56183,
368,
341,
286,
1077,
2804,
38457,
62,
17,
284,
2278,
310,
220,
15,
87,
16,
68,
16,
18,
64,
2127,
16,
18,
15,
24,
20,
21,
5305,
18,
345,
310,
220,
15,
5848,
17,
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... | 2 |
#[test]
fn test_matches() {
let p = polar();
qnull(&p, "1 matches 2");
qeval(&p, "1 matches 1");
// This doesn't fail because `y` is parsed as an unknown specializer
qeval(&p, "x = {foo: 1} and x matches {foo: 1}");
qeval(&p, "x = {foo: 1, bar: 2} and x matches {foo: 1}");
qnull... | rust_cleaned_test_functions.jsonl/68145 | {
"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,
38344,
368,
341,
262,
1077,
281,
284,
24660,
543,
262,
2804,
2921,
2099,
79,
11,
330,
16,
9071,
220,
17,
797,
262,
2804,
14170,
2099,
79,
11,
330,
16,
9071,
220,
16,
797,
262,
442,
1096,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_opam_switch() {
let global_switch = "ocaml-base-compiler.4.10.0";
let local_switch = "/path/to/my-project";
assert_eq!(
parse_opam_switch(global_switch),
Some((SwitchType::Global, "ocaml-base-compiler.4.10.0".to_string()))
);
... | rust_cleaned_test_functions.jsonl/112021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10287,
309,
27652,
368,
341,
286,
1077,
3644,
27652,
284,
330,
509,
9467,
30013,
12,
33620,
13,
19,
13,
16,
15,
13,
15,
876,
286,
1077,
2205,
27652,
284,
3521,
2343,
32429,
34198,
33696,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_column_order_get_default_sort_order() {
// Comparison based on physical type
assert_eq!(
ColumnOrder::get_default_sort_order(Type::Boolean),
SortOrder::Unsigned
);
assert_eq!(
ColumnOrder::get_default_sort_order(Type::Int32),
SortOrder::Signed
);
assert_eq!(
ColumnOrde... | rust_cleaned_test_functions.jsonl/126083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8744,
7869,
3062,
9993,
18435,
7869,
368,
341,
197,
197,
322,
42451,
3118,
389,
6961,
943,
198,
197,
6948,
10714,
33673,
298,
197,
2933,
4431,
486,
455,
9993,
18435,
7869,
22498,
486,
6890,
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_nested_scope() {
let app = App::new()
.scope("/app", |scope| {
scope.nested("/t1", |scope| {
scope.resource("/path1", |r| r.f(|_| HttpResponse::Created()))
})
})
.finish();
let req = TestRequ... | rust_cleaned_test_functions.jsonl/22450 | {
"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,
66279,
23199,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
4186,
4283,
676,
497,
760,
4186,
91,
341,
394,
6891,
1253,
9980,
4283,
83,
16,
497,
760,
4186,
91,
341,
503,
6891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lang_string_parse() {
fn t(lg: LangString) {
let s = &lg.original;
assert_eq!(LangString::parse(s, ErrorCodes::Yes, true, None), lg)
}
t(Default::default());
t(LangString { original: "rust".into(), ..Default::default() });
t(LangString { original: ".rust".int... | rust_cleaned_test_functions.jsonl/95118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17876,
3904,
21039,
368,
341,
262,
5168,
259,
2333,
70,
25,
22463,
703,
8,
341,
286,
1077,
274,
284,
609,
11819,
34925,
280,
286,
2060,
10714,
10297,
26223,
703,
486,
6400,
1141,
11,
4600,
20871... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_native() {
let pubkey1 = secp256k1::PublicKey::from_str(
"022e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd1af"
).unwrap();
let pubkey2 = secp256k1::PublicKey::from_str(
"032e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd... | rust_cleaned_test_functions.jsonl/117286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2097
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44494,
368,
341,
286,
1077,
95116,
16,
284,
511,
4672,
17,
20,
21,
74,
16,
486,
61822,
486,
1499,
2895,
1006,
310,
330,
15,
17,
17,
68,
20,
23,
5645,
20,
16,
69,
24,
291,
23,
329,
18,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_statistics_casting() {
// which is what Parquet does
// Request a record batch with of s1_min as a timestamp
let required_columns = RequiredStatColumns::from(vec![(
"s3".into(),
StatisticsType::Min,
Field::new(
... | rust_cleaned_test_functions.jsonl/97672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
49569,
5303,
287,
368,
341,
1789,
286,
442,
892,
374,
1128,
4270,
23300,
1558,
271,
286,
442,
6145,
264,
3255,
7162,
448,
315,
274,
16,
7260,
438,
264,
11441,
198,
286,
1077,
2567,
22590,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stream_to_rank_equals() {
let rank = vec![5.0,5.0,4.0].to_rank();
assert!(rank[2] == 0);
assert!(vec![rank[0],rank[1]] == vec![1,2]);
} | rust_cleaned_test_functions.jsonl/132708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
2346,
20417,
61664,
368,
341,
286,
1077,
7077,
284,
7486,
20703,
20,
13,
15,
11,
20,
13,
15,
11,
19,
13,
15,
936,
983,
20417,
543,
286,
2060,
10297,
13129,
58,
17,
60,
621,
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_scalar_sqrt() {
use fff::SqrtField;
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06,
0xbc, 0xe5,
]);
assert_eq!(Scalar::zero().sqrt().unwrap(), Scalar::zero());
... | rust_cleaned_test_functions.jsonl/56404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 522
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
92199,
368,
341,
286,
990,
282,
542,
486,
50,
8140,
1877,
401,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
8956,
310,
220,
15,
87,
20,
24,
11,
220,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_from_to_bytes() {
let sk: SecretKey = random();
let sig = sk.sign("Please sign here: ______");
let pk = sk.public_key();
let pk2 = PublicKey::from_bytes(pk.to_bytes()).expect("invalid pk representation");
assert_eq!(pk, pk2);
let sig2 = Signature::... | rust_cleaned_test_functions.jsonl/30572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2346,
12524,
368,
341,
286,
1077,
1901,
25,
8599,
1592,
284,
4194,
543,
286,
1077,
8366,
284,
1901,
15499,
445,
5501,
1841,
1588,
25,
32671,
797,
286,
1077,
22458,
284,
1901,
37899,
3097,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_broadcast_ack_multiple_accounts_single_peer() {
let (mut smp, validator, full_node) = SharedMempoolNetwork::bootstrap_vfn_network(3);
let all_txns = vec![
TestTransaction::new(0, 0, 1),
TestTransaction::new(0, 1, 1),
TestTransaction::new(1, 0, 1),
TestTra... | rust_cleaned_test_functions.jsonl/31478 | {
"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,
74923,
48447,
45233,
55665,
19487,
45159,
368,
341,
262,
1077,
320,
6984,
274,
1307,
11,
22935,
11,
2480,
5084,
8,
284,
16990,
44,
3262,
1749,
12320,
486,
6281,
2273,
8822,
20966,
7,
18,
626,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_peer_manager_notifications() {
let (send, recv) = channel();
let notifcation_iter = PeerNotificationIter { recv };
let join_handle = thread::spawn(move || {
for i in 0..5 {
send.send(PeerManagerNotification::Connected {
pe... | rust_cleaned_test_functions.jsonl/92289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 871
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45159,
12144,
67546,
368,
341,
286,
1077,
320,
6681,
11,
27006,
8,
284,
5496,
1428,
286,
1077,
537,
333,
64882,
11723,
284,
45147,
11196,
8537,
314,
27006,
3634,
286,
1077,
5138,
10630,
284,
4516,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_receiving_router_advertisement_validity_check() {
let config = Ipv6::DUMMY_CONFIG;
let src_mac = [10, 11, 12, 13, 14, 15];
let src_ip = Ipv6Addr::new([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 192, 168, 0, 10]);
let mut ctx = DummyEventDispatcherBuilder::from_config(con... | rust_cleaned_test_functions.jsonl/82804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1007
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
46344,
55587,
10027,
44424,
8337,
487,
7200,
368,
341,
286,
1077,
2193,
284,
358,
30168,
21,
486,
35,
58673,
12568,
280,
286,
1077,
2286,
22802,
284,
508,
16,
15,
11,
220,
16,
16,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_servers_write() {
let mut server = CompoundTag::new();
server.insert_str("ip", "localhost:25565");
server.insert_str("name", "Minecraft Server");
server.insert_bool("hideAddress", true);
let mut servers = Vec::new();
servers.push(server);
let mut root_tag = Compoun... | rust_cleaned_test_functions.jsonl/90665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67507,
9165,
368,
341,
262,
1077,
5206,
3538,
284,
61572,
5668,
486,
931,
1428,
262,
3538,
7030,
2895,
445,
573,
497,
330,
8301,
25,
17,
20,
20,
21,
20,
797,
262,
3538,
7030,
2895,
445,
606,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overload_functions() {
let cxx = indoc! {"
void daft(uint32_t) {}
void daft(uint8_t) {}
void daft(std::string) {}
void daft(Fred) {}
void daft(Norma) {}
"};
let hdr = indoc! {"
#include <cstdint>
#include <string>
struct... | rust_cleaned_test_functions.jsonl/9788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 598
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15431,
1078,
31708,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
737,
2994,
723,
8488,
18,
17,
528,
8,
5613,
286,
737,
2994,
723,
8488,
23,
528,
8,
5613,
286,
737,
2994,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try() {
fn try_option_some() -> Option<u8> {
let val = Some(1)?;
Some(val)
}
assert_eq!(try_option_some(), Some(1));
fn try_option_none() -> Option<u8> {
let val = None?;
Some(val)
}
assert_eq!(try_option_none(), None);
fn try_option_... | rust_cleaned_test_functions.jsonl/20249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
368,
341,
262,
5168,
1430,
9672,
61855,
368,
1464,
6959,
34837,
23,
29,
341,
286,
1077,
1044,
284,
4329,
7,
16,
40007,
286,
4329,
9098,
340,
262,
456,
262,
2060,
10714,
10297,
1539,
9672,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ro_data() {
let mut asm = Assembler::new();
let test_string = ".data\ntest: .asciiz 'This is a test'\n.code\n";
let program = asm.assemble(test_string);
assert!(program.is_ok());
} | rust_cleaned_test_functions.jsonl/7202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26608,
1769,
368,
341,
286,
1077,
5206,
32828,
284,
1634,
35401,
486,
931,
543,
286,
1077,
1273,
3904,
284,
5933,
691,
59,
406,
477,
25,
659,
5061,
72,
449,
364,
1986,
374,
264,
1273,
15777,
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_b() -> Result<()> {
eprintln!();
let input: &[u8] = b"389125467\n";
let mut cups = parser::parse(input)?;
eprintln!("{:?}", &cups[0..15]);
domoves(&mut cups, 10_000_000);
let resp = getresp(&cups);
eprintln!("{:?}", &cups[0..15]);
assert_eq!(resp, 149245887792);
... | rust_cleaned_test_functions.jsonl/92755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
368,
1464,
5714,
71698,
341,
262,
384,
33655,
0,
543,
262,
1077,
1946,
25,
44590,
84,
23,
60,
284,
293,
1,
18,
23,
24,
16,
17,
20,
19,
21,
22,
1699,
876,
262,
1077,
5206,
25374,
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_overflow_does_not_cause_segfault_managed() {
use rc::Rc;
let mut v = vec![Rc::new(1)];
v.reserve_exact(-1);
v.push(Rc::new(2));
} | rust_cleaned_test_functions.jsonl/75632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79073,
96374,
7913,
666,
3454,
35325,
59572,
79889,
368,
341,
286,
990,
10192,
486,
49,
66,
280,
286,
1077,
5206,
348,
284,
7486,
20703,
49,
66,
486,
931,
7,
16,
12587,
286,
348,
48520,
71084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_date_schema() {
let kinds = &[
r#"{
"type": "int",
"name": "datish",
"logicalType": "date"
}"#,
r#"{
"type": "int",
"name": "datish",
... | rust_cleaned_test_functions.jsonl/23009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
25371,
368,
341,
286,
1077,
12829,
284,
609,
9640,
310,
435,
55543,
515,
503,
330,
1313,
788,
330,
396,
756,
503,
330,
606,
788,
330,
5911,
812,
756,
503,
330,
30256,
929,
788,
330,
1028... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_nibble_path_success() {
let nibble_path = NibblePath::new(vec![0x12, 0x34, 0x56]);
assert_eq!(nibble_path.num_nibbles(), 6);
let nibble_path = NibblePath::new_odd(vec![0x12, 0x34, 0x50]);
assert_eq!(nibble_path.num_nibbles(), 5);
let nibble_path = NibblePath::new(vec... | rust_cleaned_test_functions.jsonl/97684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1089,
82418,
2638,
18632,
368,
341,
262,
1077,
30285,
891,
2638,
284,
451,
82418,
1820,
486,
931,
25592,
20703,
15,
87,
16,
17,
11,
220,
15,
87,
18,
19,
11,
220,
15,
87,
20,
21,
2558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_capsule_aabb() {
let capsule = Capsule::new(2., 1.);
assert_eq!(
Aabb3::new(Point3::new(-1., -3., -1.), Point3::new(1., 3., 1.)),
capsule.compute_bound()
);
} | rust_cleaned_test_functions.jsonl/18382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52955,
1111,
4306,
12523,
368,
341,
286,
1077,
47639,
284,
43365,
1111,
486,
931,
7,
17,
2572,
220,
16,
58957,
286,
2060,
10714,
33673,
310,
362,
12523,
18,
486,
931,
32737,
18,
486,
931,
4080,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_df_iter() {
let fx = fx![
"name" => ["Jacob", "Sam", "James", "Julia"],
"star" => [100, 99, 100, 69],
"loc" => [2u8, 3, 1, 4]
]
.unwrap();
let mut iter = fx.iter_rows();
let r1 = iter.next();
assert!(r1.is_some... | rust_cleaned_test_functions.jsonl/38863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 628
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10894,
11723,
368,
341,
286,
1077,
33219,
284,
33219,
90515,
310,
330,
606,
1,
589,
4383,
94167,
497,
330,
23950,
497,
330,
28084,
497,
330,
28085,
685,
8097,
310,
330,
11870,
1,
589,
508,
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_create_authorization_with_bad_credentials() -> Result<()> {
let rights = AuthorizationItemSetBuilder::new()
.add_right("system.privilege.admin")?
.build();
let env = AuthorizationItemSetBuilder::new()
.add_string("username", "Tim Apple")?
... | rust_cleaned_test_functions.jsonl/74277 | {
"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,
8657,
22938,
2022,
6615,
34199,
47396,
368,
1464,
5714,
71698,
341,
286,
1077,
3188,
284,
30562,
1234,
1649,
3297,
486,
931,
741,
310,
659,
718,
10539,
445,
8948,
82571,
42769,
18203,
899,
5267,
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... | 4 |
#[test]
fn test_skipped() {
let mut channel = Receiver::default(true);
let data: Vec<u8> = vec![0; 1024];
channel.current_sequence = 0;
channel.last_sequence = 512 + 10;
// should skip and take received
channel.set_received(0);
assert!(!channel.receive_pa... | rust_cleaned_test_functions.jsonl/111897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33811,
6450,
368,
341,
286,
1077,
5206,
5496,
284,
50952,
486,
2258,
3715,
317,
286,
1077,
821,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
26,
220,
16,
15,
17,
19,
935,
286,
5496,
4952,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte_rotation() {
let mut a = [0xCC, 0xBB, 0xAA, 0x00];
bytes_rotate_right(&mut a, 1);
assert_eq!([0x00, 0xCC, 0xBB, 0xAA], a);
} | rust_cleaned_test_functions.jsonl/32375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
44813,
368,
341,
262,
1077,
5206,
264,
284,
508,
15,
72255,
11,
220,
15,
80197,
11,
220,
15,
60051,
11,
220,
15,
87,
15,
15,
935,
262,
5820,
60834,
10539,
2099,
6984,
264,
11,
220,
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_irq_chip() {
use Cap;
let kvm = Kvm::new().unwrap();
assert!(kvm.check_extension(Cap::Irqchip));
let vm = kvm.create_vm().unwrap();
// can be emulated or not.
let mut gic_device = kvm_bindings::kvm_create_device {
type_: kvm... | rust_cleaned_test_functions.jsonl/86835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22623,
49514,
368,
341,
286,
990,
8012,
401,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
2060,
10297,
74,
7338,
9093,
31035,
3025,
391,
486,
48113,
80,
29662,
3237,
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_nested() {
let value = Annotated::new(
Test {
answer: Annotated::new(42, Meta::from_error("inner error")),
},
Meta::from_error("outer error"),
);
assert_eq_str!(
serialize(&value).unwrap(),
r#"{""... | rust_cleaned_test_functions.jsonl/126378 | {
"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,
66279,
368,
341,
286,
1077,
897,
284,
1527,
87029,
486,
931,
1006,
310,
3393,
341,
394,
4226,
25,
1527,
87029,
486,
931,
7,
19,
17,
11,
15819,
486,
1499,
4096,
445,
4382,
1465,
30154,
310,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_bounded_stake_weighted_timestamp_poh() {
let epoch_start_timestamp: UnixTimestamp = 1_578_909_061;
let slot = 20;
let slot_duration = Duration::from_millis(400);
let poh_offset = (slot * slot_duration).as_secs();
let acceptable_delta = (MAX_ALLOW... | rust_cleaned_test_functions.jsonl/25417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
880,
13082,
1261,
726,
15876,
291,
23073,
620,
2267,
368,
341,
286,
1077,
16342,
4906,
23073,
25,
46995,
20812,
284,
220,
16,
62,
20,
22,
23,
62,
24,
15,
24,
62,
15,
21,
16,
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_self_ty() {
check(
r#"
struct $0Foo;
impl Foo where Self: {
fn f() -> Self;
}
"#,
expect![[r#"
Foo Struct FileId(0) 0..11 7..10
FileId(0) 18..21
FileId(0) 28..32
... | rust_cleaned_test_functions.jsonl/60674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25637,
53171,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
286,
2036,
400,
15,
40923,
401,
286,
11605,
33428,
1380,
10115,
25,
341,
310,
5168,
282,
368,
1464,
10115,
280,
286,
456,
286,
5869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eight_byte_uint() {
let value = 0x01_23_45_67_89_AB_CD_EF;
let mut buffer: Vec<u8> = vec![];
DecodedUInt::write_u64(&mut buffer, value).expect(WRITE_ERROR_MESSAGE);
let expected_bytes = &[0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF];
assert_eq!(ex... | rust_cleaned_test_functions.jsonl/30847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
2204,
491,
19737,
15807,
368,
341,
286,
1077,
897,
284,
220,
15,
87,
15,
16,
62,
17,
18,
62,
19,
20,
62,
21,
22,
62,
23,
24,
32643,
55200,
2089,
37,
280,
286,
1077,
5206,
4147,
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_batch_insert() {
let slot0 = 0;
let key0 = Keypair::new().pubkey();
let key1 = Keypair::new().pubkey();
let index = AccountsIndex::<bool>::default_for_tests();
let account_infos = [true, false];
let items = vec![(key0, account_infos[0]), (key1, a... | rust_cleaned_test_functions.jsonl/71328 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
17678,
368,
341,
286,
1077,
9446,
15,
284,
220,
15,
280,
286,
1077,
1376,
15,
284,
6569,
1082,
1310,
486,
931,
1005,
9585,
792,
543,
286,
1077,
1376,
16,
284,
6569,
1082,
1310,
486,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parses_import() {
parses_to! {
parser: AwsGoEventsParser,
input: "import \"foo\"",
rule: Rule::import,
tokens: [
import(0, 12, [
import_package(7, 12, [
... | rust_cleaned_test_functions.jsonl/8186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77113,
288,
18434,
368,
341,
310,
70835,
2346,
0,
341,
394,
6729,
25,
40083,
10850,
7900,
6570,
345,
394,
1946,
25,
330,
474,
7245,
7975,
95901,
394,
5912,
25,
18100,
486,
474,
345,
394,
11211,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolving_only_package() {
let mut reg = registry(vec!(pkg("foo")));
let res = resolve(pkg_id("root"), vec![dep("foo")], &mut reg);
assert_that(&res.unwrap(), contains(names(["root", "foo"])).exactly());
} | rust_cleaned_test_functions.jsonl/34729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4918,
19648,
18410,
26328,
368,
341,
262,
1077,
5206,
1217,
284,
19424,
25592,
10297,
30069,
445,
7975,
17621,
262,
1077,
592,
284,
8830,
68780,
842,
445,
2888,
3975,
7486,
20703,
14891,
445,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_self_replacer() -> Result<()> {
#![allow(clippy::panic_in_result_fn)]
use proc_macro2::TokenStream;
use quote::{quote, ToTokens};
use syn::*;
let self_ty = &parse2::<Type>(quote! { RealSelf })?;
let mut sr = SelfReplacer::new(self_ty);
let mut check = move |from: To... | rust_cleaned_test_functions.jsonl/108399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1652
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25637,
1288,
90212,
368,
1464,
5714,
71698,
341,
262,
671,
20703,
7183,
9849,
45749,
486,
19079,
1243,
5287,
15246,
5563,
262,
990,
13674,
58810,
17,
486,
3323,
3027,
280,
262,
990,
12641,
22964,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_learner_election_timeout() {
let l = default_logger();
let mut n1 = new_test_learner_raft(1, vec![1], vec![2], 10, 1, new_storage(), &l);
n1.become_follower(1, INVALID_ID);
let mut n2 = new_test_learner_raft(2, vec![1], vec![2], 10, 1, new_storage(), &l);
n2.become_follower(... | rust_cleaned_test_functions.jsonl/19174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
93595,
2204,
1170,
20537,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
308,
16,
284,
501,
4452,
62,
93595,
62,
2944,
7,
16,
11,
7486,
20703,
16,
1125,
7486,
20703,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_mul() {
test_op!(_05_05i * _05_05i, _0_1i.unscale(2.0));
test_op!(_1_1i * _0_1i, _neg1_1i);
test_op!(_0_1i * _0_1i, -_1_0i);
assert_eq!(_0_1i * _0_1i * _0_1i * _0_1i, _1_0i);
for &c in all_consts.iter() {
... | rust_cleaned_test_functions.jsonl/105709 | {
"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,
24944,
368,
341,
310,
1273,
10287,
0,
2490,
15,
20,
62,
15,
20,
72,
353,
716,
15,
20,
62,
15,
20,
72,
11,
716,
15,
62,
16,
72,
6307,
12445,
7,
17,
13,
15,
1106,
310,
1273,
10287,
0,
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... | 2 |
#[test]
fn test_empty_signatures() {
let vp_calculator = ProdVotingPowerCalculator::default();
let trust_threshold = TrustThreshold::default();
let mut light_block: LightBlock = TestgenLightBlock::new_default(10)
.generate()
.unwrap()
.into();
... | rust_cleaned_test_functions.jsonl/35057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
11172,
2789,
368,
341,
286,
1077,
34823,
24005,
20022,
284,
71272,
53,
11519,
14986,
55743,
486,
2258,
543,
286,
1077,
6950,
21858,
284,
16816,
37841,
486,
2258,
1428,
286,
1077,
5206,
3100,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_tuple() {
let mut ss = SimpleStore::new();
let tup1 = tuple![];
ss.out(tup1.clone()).unwrap();
assert_eq!(ss.inp(&tup1).unwrap(), Some(tup1.clone()));
} | rust_cleaned_test_functions.jsonl/74949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
21773,
368,
341,
262,
1077,
5206,
10870,
284,
8993,
6093,
486,
931,
543,
262,
1077,
57385,
16,
284,
14405,
0,
15078,
262,
10870,
2532,
1155,
454,
16,
15997,
6011,
15454,
543,
262,
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 |
#[test]
fn test_interpolating_spline() -> Result<()> {
let x: Vec<f64> = (0..=180).map(|i|(i as f64).to_radians()).collect();
let xy: Vec<f64> = x.iter().flat_map(|&x|[x,x.sin().powi(8)]).collect();
let x_data: Vec<f64> = (0..=180).step_by(30).map(|i|(i as f64).to_radians()).collect();
let xy_... | rust_cleaned_test_functions.jsonl/93161 | {
"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,
15318,
9896,
1095,
643,
31439,
368,
1464,
5714,
71698,
1476,
262,
1077,
856,
25,
11312,
63895,
21,
19,
29,
284,
320,
15,
496,
28,
16,
23,
15,
568,
2186,
22428,
72,
60016,
72,
438,
282,
21,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_parse_valid_s3_list_buckets() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"s3-list-buckets.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
let client = S3... | rust_cleaned_test_functions.jsonl/29200 | {
"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,
21039,
8337,
643,
18,
2019,
84156,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
82,
18,
9029,
1455,
38551... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_msgs() -> () {
let msgs = "
std_msgs/msg/Bool
x/y
std_msgs/msg/String
";
let msgs = msgs.lines().map(|l|l.to_string()).collect();
let parsed = parse_msgs(&msgs);
assert_eq!(parsed[0].module, "std_msgs");
assert_eq!(parsed[0].prefix, "msg");
a... | rust_cleaned_test_functions.jsonl/103124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
20777,
368,
1464,
1719,
341,
286,
1077,
41270,
284,
6228,
1834,
20777,
80765,
14,
11233,
198,
87,
26491,
198,
1834,
20777,
80765,
36264,
198,
876,
286,
1077,
41270,
284,
41270,
44061,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.