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_invalid_yaml() {
let mut tmp = NamedTempFile::new().unwrap();
tmp.write_all("bla: bla".as_bytes()).unwrap();
let _: DynamicConfig<ConfigYaml, ConfigObj> = DynamicConfig::new(String::from(
tmp.into_temp_path().as_os_str().to_str().unwrap()),
false).... | rust_cleaned_test_functions.jsonl/25065 | {
"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,
31433,
64380,
368,
341,
286,
1077,
5206,
4174,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
4174,
3836,
5705,
445,
64726,
25,
84541,
3263,
300,
12524,
6011,
15454,
543,
286,
1077,
585... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drop() {
static mut DROPS: i32 = 0;
struct Elem;
impl Drop for Elem {
fn drop(&mut self) {
unsafe {
DROPS += 1;
}
}
}
let mut ring = VecDeque::new();
ring.push_back(Elem);
ring.push_front(Elem);
ring.push_ba... | rust_cleaned_test_functions.jsonl/73718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
368,
341,
262,
1099,
5206,
422,
1285,
5012,
25,
600,
18,
17,
284,
220,
15,
280,
262,
2036,
78768,
280,
262,
11605,
15733,
369,
78768,
341,
286,
5168,
5943,
2099,
6984,
656,
8,
341,
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_basic() {
let cx = mk_ctxt();
let fnia = FakeNodeIdAssigner;
let lcx = LoweringContext::new(&fnia, None);
roundtrip(lower_item(&lcx, "e_item!(&cx,
fn foo() {}
).unwrap()));
} | rust_cleaned_test_functions.jsonl/37634 | {
"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,
34729,
368,
341,
262,
1077,
20716,
284,
23789,
93285,
543,
262,
1077,
5168,
685,
284,
36965,
79206,
28933,
261,
280,
262,
1077,
326,
25844,
284,
27536,
287,
1972,
486,
931,
2099,
8822,
685,
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_write_packed() {
let mut test = TestPacked::new();
test.varints = vec![17i32, 1000];
test_serialize_deserialize("22 03 11 e8 07", &test);
let mut test = TestPacked::new();
test.sfixed32s = vec![17i32, 1000];
test_serialize_deserialize("2a 08 11 00 00 00 e8 03 00 00", &tes... | rust_cleaned_test_functions.jsonl/47068 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
620,
11191,
368,
341,
262,
1077,
5206,
1273,
284,
3393,
47,
11191,
486,
931,
543,
262,
1273,
19526,
21042,
284,
7486,
20703,
16,
22,
72,
18,
17,
11,
220,
16,
15,
15,
15,
935,
262,
1273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_getter_only_array() {
let mut fb = FooBar(0);
assert_eq!(0, fb.getter_only_array(0));
assert_eq!(0, fb.getter_only_array(1));
assert_eq!(0, fb.getter_only_array(2));
fb.0 = !(0x1FF << 3);
assert_eq!(0, fb.getter_only_array(0));
assert_eq!(0, fb.getter_only_array(1))... | rust_cleaned_test_functions.jsonl/2268 | {
"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,
3062,
465,
18410,
3858,
368,
341,
262,
1077,
5206,
25469,
284,
33428,
3428,
7,
15,
626,
262,
2060,
10714,
10297,
15,
11,
25469,
670,
465,
18410,
3858,
7,
15,
1106,
262,
2060,
10714,
10297,
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_invoke_published_module() {
solana_logger::setup();
let universal_truth = 42;
// First publish the module
let code = format!(
"
module M {{
public universal_truth(): u64 {{
return {};
}... | rust_cleaned_test_functions.jsonl/71389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79779,
69524,
10750,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
20178,
49186,
284,
220,
19,
17,
401,
286,
442,
5512,
3415,
279,
4688,
271,
286,
1077,
2038,
284,
3561,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_func() {
let isa = lookup(triple!("x86_64"))
.expect("expect x86 ISA")
.finish(Flags::new(builder()));
let mut context = Context::for_function(create_function(
CallConv::SystemV,
Some(StackSlotData::new(StackSlotKind::Explic... | rust_cleaned_test_functions.jsonl/40778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
9596,
368,
341,
286,
1077,
51335,
284,
18615,
7624,
3778,
17223,
87,
23,
21,
62,
21,
19,
5455,
310,
659,
17119,
445,
17119,
856,
23,
21,
84290,
1138,
310,
659,
30150,
7,
9195,
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_scrollcp() {
let mut vm: VimMachine<KeyEvent> = VimMachine::default();
let mut ctx = VimContext::default();
// Place cursored line at the top of the screen with "zt".
let act = Action::Scroll(ScrollStyle::CursorPos(MovePosition::Beginning, Axis::Vertical));
... | rust_cleaned_test_functions.jsonl/74585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 945
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41407,
4672,
368,
341,
286,
1077,
5206,
10995,
25,
94484,
21605,
42003,
1556,
29,
284,
94484,
21605,
486,
2258,
543,
286,
1077,
5206,
5635,
284,
94484,
1972,
486,
2258,
1428,
286,
442,
10771,
2314... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bookstore_path() {
// examples from https://goessner.net/articles/JsonPath/
//the authors of all books in the store
let expr = jsonpath::parse("$.store.book[*].author").unwrap();
assert_eq!(
expr.eval(bookstore_value()),
vec![
json!("Nigel Rees"),
... | rust_cleaned_test_functions.jsonl/54612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1795
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26421,
4314,
2638,
368,
341,
262,
442,
10295,
504,
3703,
1110,
3346,
433,
1194,
5071,
54034,
14,
5014,
1820,
8680,
262,
442,
1782,
12014,
315,
678,
6467,
304,
279,
3553,
198,
262,
1077,
15169,
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_single_item() {
check(
r#"
macro_rules! m { ($i:item) => ( $i ) }
m! { mod c {} }
"#,
expect![[r#"
macro_rules! m { ($i:item) => ( $i ) }
mod c {}
"#]],
)
} | rust_cleaned_test_functions.jsonl/85231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
5634,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
314,
1711,
72,
78852,
8,
589,
320,
400,
72,
873,
456,
76,
0,
314,
1463,
272,
4687,
456,
57676,
345,
286,
1720,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_metadata_graph() {
let md = GraphDefValue::initial_metadata();
assert_eq!(&md.plugin_data.unwrap().plugin_name, plugin_names::GRAPHS);
assert_eq!(md.data_class, i32::from(pb::DataClass::BlobSequence));
} | rust_cleaned_test_functions.jsonl/6208 | {
"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,
22220,
14738,
368,
341,
310,
1077,
10688,
284,
12165,
2620,
1130,
486,
9426,
22220,
543,
310,
2060,
10714,
0,
2099,
2277,
26969,
1769,
55395,
1005,
9138,
1269,
11,
9006,
9187,
486,
8626,
2537,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vcx_reject_proof_request() {
let _setup = SetupMocks::init();
let handle = _vcx_disclosed_proof_create_with_request_c_closure(ARIES_PROOF_REQUEST_PRESENTATION).unwrap();
assert_eq!(disclosed_proof::get_state(handle).unwrap(), ProverState::Initial as u32);
let co... | rust_cleaned_test_functions.jsonl/110434 | {
"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,
2273,
25844,
1288,
583,
86757,
7893,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
3705,
284,
716,
7362,
87,
37745,
9259,
86757,
8657,
6615,
7893,
666,
72823,
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_connected_components_eight_chessboard() {
let image = chessboard(30, 30);
let components = connected_components(&image, Eight, Luma::black());
let max_component = components.pixels().map(|p| p[0]).max();
assert_eq!(max_component, Some(1u32));
} | rust_cleaned_test_functions.jsonl/114779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43276,
23258,
2204,
491,
4138,
433,
2482,
368,
341,
286,
1077,
2168,
284,
32719,
2482,
7,
18,
15,
11,
220,
18,
15,
317,
286,
1077,
6813,
284,
8433,
23258,
2099,
1805,
11,
35844,
11,
444,
13416... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cvtss2sd() {
assert_emit!(0xf3, 0x0f, 0x5a, 0xc1; cvtss2sd(XMM0, XMM1));
assert_emit!(0xf3, 0x41, 0x0f, 0x5a, 0xdf; cvtss2sd(XMM3, XMM15));
assert_emit!(0xf3, 0x44, 0x0f, 0x5a, 0xc4; cvtss2sd(XMM8, XMM4));
} | rust_cleaned_test_functions.jsonl/85496 | {
"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,
666,
9708,
778,
17,
13446,
368,
341,
286,
2060,
69082,
10297,
15,
5848,
18,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
20,
64,
11,
220,
15,
8148,
16,
26,
5544,
83,
778,
17,
13446,
7644,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trivial_turn_sums() {
let lang = English;
let words = Words::new(lang);
let cache = Cache::new(&words);
let secrets1: SecretIndices = [0].into_iter().collect();
let guessed = vec![];
let picks = secrets1.len();
let scores = turn_sums(&words, &secrets1, &guessed,... | rust_cleaned_test_functions.jsonl/57272 | {
"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,
3547,
26658,
37274,
643,
6237,
368,
341,
262,
1077,
8688,
284,
6364,
280,
262,
1077,
4244,
284,
27630,
486,
931,
49493,
317,
262,
1077,
6500,
284,
19479,
486,
931,
2099,
5761,
626,
1066,
262,
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... | 3 |
#[test]
fn test_serde() -> Result<()> {
let mut buffer: Vec<u8> = vec![0; VoteProgram::get_max_size()];
let mut vote_program = VoteProgram::default();
vote_program.votes = (0..MAX_VOTE_HISTORY).map(|_| Vote::default()).collect();
vote_program.serialize(&mut buffer).unwrap();
... | rust_cleaned_test_functions.jsonl/33980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
26,
34034,
10690,
486,
455,
6345,
2368,
33800,
286,
1077,
5206,
6910,
25096,
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_closed_polygon_area() {
let poly = [
Point2D::new(0.0, 0.0),
Point2D::new(5.0, 0.0),
Point2D::new(5.0, 5.0),
Point2D::new(0.0, 5.0),
Point2D::new(0.0, 0.0),
];
assert_eq!(polygon_area(&poly), 25f64);
} | rust_cleaned_test_functions.jsonl/44747 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44697,
73542,
15030,
368,
341,
286,
1077,
9861,
284,
2278,
310,
5126,
17,
35,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
310,
5126,
17,
35,
486,
931,
7,
20,
13,
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_commute_interleave() {
let mut line = ::std::iter::repeat(b"bar\n".to_vec());
let hunk1 = owned::Hunk {
added: owned::Block {
start: 1,
lines: Rc::new((&mut line).take(4).collect::<Vec<_>>()),
trailing_newline: true,
... | rust_cleaned_test_functions.jsonl/33950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25149,
1070,
15318,
21510,
368,
341,
286,
1077,
5206,
1555,
284,
3504,
1834,
486,
2015,
486,
30624,
1883,
1,
2257,
1699,
3263,
983,
13251,
1423,
286,
1077,
305,
3122,
16,
284,
12938,
486,
39,
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... | 1 |
#[test]
fn test_match_rule_by_id() {
let data = vec![
"0: 4 1 5",
"1: 2 3 | 3 2",
"2: 4 4 | 5 5",
"3: 4 5 | 5 4",
"4: \"a\"",
"5: \"b\"",
"6: 4 5",
"7: 4 5 4",
];
let rules = load_rules(&data);
assert_eq!(
match_rule_by_id(&rules, 4, "a"),
... | rust_cleaned_test_functions.jsonl/50121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 718
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
21124,
3710,
842,
368,
341,
262,
1077,
821,
284,
7486,
90515,
414,
330,
15,
25,
220,
19,
220,
16,
220,
20,
756,
414,
330,
16,
25,
220,
17,
220,
18,
760,
220,
18,
220,
17,
756,
414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_var_does_not_add_extra_whitespace() {
check_assist(
extract_variable,
"
fn foo() -> u32 {
$0return 2 + 2$0;
}
",
"
fn foo() -> u32 {
let $0var_name = 2 + 2;
return var_name;
}
",
);
check_assist(
ext... | rust_cleaned_test_functions.jsonl/132840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
4612,
96374,
7913,
2891,
31858,
86175,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
14635,
345,
310,
6228,
8822,
15229,
368,
1464,
575,
18,
17,
18507,
262,
400,
15,
689,
220,
17,
488... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_returns_success() {
wrapper(|env| {
let web = env.frontend();
assert!(web.get("/").send()?.status().is_success());
Ok(())
});
} | rust_cleaned_test_functions.jsonl/22209 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
58900,
18632,
368,
341,
286,
13261,
22428,
3160,
91,
341,
310,
1077,
3482,
284,
6105,
23445,
408,
543,
310,
2060,
10297,
2911,
670,
4283,
1827,
6681,
57495,
2829,
1005,
285,
18632,
1423,
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
] | 2 |
#[test]
fn test_ends_with_vbuf() {
use impls::ROIobuf;
let b0 = [
ROIobuf::from_str("1234"),
ROIobuf::from_str("5678"),
ROIobuf::from_str("9"),
];
assert!(ends_with_vbuf(&b0, b"123456789"));
assert!(ends_with_vbuf(&b0, b"23456789"));
assert!(ends_with_vbuf(&b0, b"3456789"));
assert!(... | rust_cleaned_test_functions.jsonl/5465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90729,
6615,
2273,
5909,
368,
341,
220,
990,
11605,
82,
486,
71270,
18464,
401,
220,
1077,
293,
15,
284,
2278,
262,
50652,
18464,
486,
1499,
2895,
445,
16,
17,
18,
19,
4461,
262,
50652,
18464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reserve() {
let mut empty_bytes: HashMap<u8, u8> = HashMap::new();
const MAX_USIZE: usize = usize::MAX;
if let Err(CapacityOverflow) = empty_bytes.try_reserve(MAX_USIZE) {
} else {
panic!("usize::MAX should trigger an overflow!");
}
... | rust_cleaned_test_functions.jsonl/8532 | {
"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,
53283,
89591,
368,
341,
286,
1077,
5206,
4287,
12524,
25,
10528,
34837,
23,
11,
575,
23,
29,
284,
10528,
486,
931,
1428,
286,
733,
8334,
13467,
3282,
25,
22301,
284,
22301,
486,
10586,
401,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_j_inv() {
let jinv_p = j_inv_p(a(), c());
let jinv = j_inv((a(), b()));
assert_eq!(jinv_p, jinv)
} | rust_cleaned_test_functions.jsonl/11571 | {
"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,
5374,
19996,
368,
341,
262,
1077,
502,
14057,
620,
284,
502,
19996,
620,
2877,
1507,
272,
1423,
262,
1077,
502,
14057,
284,
502,
19996,
1188,
64,
1507,
293,
25138,
262,
2060,
10714,
10297,
73,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_buf_ser() {
let bytes = ByteBuf::new();
assert_eq!(to_string(&bytes).unwrap(), "[]".to_string());
let bytes = ByteBuf::from(vec![1, 2, 3]);
let a = to_string(&bytes).unwrap();
assert_eq!(a, "[1 2 3]".to_string());
} | rust_cleaned_test_functions.jsonl/49345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
10363,
75861,
368,
341,
262,
1077,
5820,
284,
10906,
15064,
486,
931,
543,
262,
2060,
10714,
10297,
983,
3904,
2099,
9651,
568,
15454,
1507,
330,
1294,
3263,
983,
3904,
5231,
262,
1077,
582... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_detect_compiler_kind_nvcc() {
let f = TestFixture::new();
let creator = new_creator();
let pool = ThreadPool::sized(1);
next_command(&creator, Ok(MockChild::new(exit_status(0), "nvcc\n", "")));
let c = detect_compiler(creator, &f.bins[0], f.tempdir.path(),... | rust_cleaned_test_functions.jsonl/61641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56457,
80910,
33162,
79430,
638,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
1077,
19919,
284,
501,
68532,
543,
286,
1077,
7314,
284,
72716,
486,
82,
1506,
7,
16,
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_from_reader() {
let doc = DOC.as_bytes();
let doc = Cursor::new(doc);
let desered = from_reader(doc).expect("Couldn't deserialize Data");
assert_eq!(
desered,
Data {
base: "https://example.com".into(),
client... | rust_cleaned_test_functions.jsonl/39219 | {
"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,
5673,
22306,
368,
341,
286,
1077,
4629,
284,
60355,
5357,
12524,
543,
286,
1077,
4629,
284,
28067,
486,
931,
19153,
317,
286,
1077,
939,
12336,
284,
504,
22306,
19153,
568,
17119,
445,
38987,
944,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exchange_code_with_json_parse_error() {
let client = new_client();
let token = client
.exchange_code(AuthorizationCode::new("ccc".to_string()))
.request(mock_http_client(
vec![
(ACCEPT, "application/json"),
(CONTENT_TYPE, "appli... | rust_cleaned_test_functions.jsonl/18604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 743
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
4136,
6615,
9455,
21039,
4096,
368,
341,
262,
1077,
2943,
284,
501,
8179,
543,
262,
1077,
3950,
284,
2943,
198,
286,
659,
39568,
4136,
4346,
1553,
2022,
2078,
486,
931,
445,
37054,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_vis() {
check(
r#"
macro_rules! m {
($vis:vis $name:ident) => { $vis fn $name() {} }
}
m!(pub foo);
m!(foo);
"#,
expect![[r#"
macro_rules! m {
($vis:vis $name:ident) => { $vis fn $name() {} }
}
pub fn foo() {}
fn foo() {}
"#]],
);
} | rust_cleaned_test_functions.jsonl/85252 | {
"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,
15887,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
2682,
25,
2682,
400,
606,
25,
1713,
8,
589,
314,
400,
2682,
5168,
400,
606,
368,
4687,
456,
532,
76,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_without_variables2_test() {
let mut string_cache = StringCache::new();
// test complicated match that caused integer overflow in the past
let mut input_tokens = tokenize("RESULT", &mut string_cache);
input_tokens[0].open_depth = 0;
input_tokens[0].close_depth = 0;
... | rust_cleaned_test_functions.jsonl/122991 | {
"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,
10708,
39904,
28182,
17,
4452,
368,
341,
262,
1077,
5206,
914,
11529,
284,
923,
8233,
486,
931,
1428,
262,
442,
1273,
16965,
2432,
429,
8881,
7546,
16484,
304,
279,
3267,
198,
262,
1077,
5206,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bn256_poseidon_hash() {
let rng = &mut thread_rng();
let params = Bn256PoseidonParams::new::<BlakeHasher>();
let input: Vec<Fr> = (0..params.t()).map(|_| rng.gen()).collect();
let output = poseidon_hash::<Bn256>(¶ms, &input[..]);
assert!(output.len() =... | rust_cleaned_test_functions.jsonl/52981 | {
"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,
58112,
17,
20,
21,
33201,
90456,
8950,
368,
341,
286,
1077,
28422,
284,
609,
6984,
4516,
66849,
543,
286,
1077,
3628,
284,
425,
77,
17,
20,
21,
46315,
90456,
4870,
486,
931,
27638,
91038,
6370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_op_lte() {
let mut c = Compiler::new();
c.add(Instruction::LoadConst(Value::from(1)));
c.add(Instruction::LoadConst(Value::from(1)));
c.add(Instruction::Lte);
c.add(Instruction::Emit);
let mut output = String::new();
simple_eval(&c.finish().0, (), &mut output).unwrap... | rust_cleaned_test_functions.jsonl/72130 | {
"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,
10287,
907,
665,
368,
341,
262,
1077,
5206,
272,
284,
45631,
486,
931,
543,
262,
272,
1364,
7,
16664,
486,
5879,
19167,
25346,
486,
1499,
7,
16,
4945,
262,
272,
1364,
7,
16664,
486,
5879,
1916... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_template() {
let r = Registry::new();
let mut out = StringOutput::new();
let mut m: BTreeMap<String, String> = BTreeMap::new();
let value = "world".to_string();
m.insert("hello".to_string(), value);
let ctx = Context::wraps(&m).unwrap();
let elements: Vec<TemplateEle... | rust_cleaned_test_functions.jsonl/15108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8693,
368,
341,
262,
1077,
435,
284,
32112,
486,
931,
543,
262,
1077,
5206,
700,
284,
923,
5097,
486,
931,
543,
262,
1077,
5206,
296,
25,
425,
6533,
2227,
3464,
11,
923,
29,
284,
425,
6533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dim_shared_in_sub_not_allowed() {
let program = r#"
SUB Test
DIM SHARED A
END SUB
"#;
assert_linter_err!(program, QError::IllegalInSubFunction, 3, 24);
} | rust_cleaned_test_functions.jsonl/122478 | {
"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,
10791,
20405,
1243,
5228,
7913,
42155,
368,
341,
286,
1077,
2025,
284,
435,
2,
698,
286,
16140,
3393,
198,
310,
50859,
6434,
32673,
362,
198,
286,
11176,
16140,
198,
286,
5869,
280,
286,
2060,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_all_with_other() {
let source = "> cd+nh <_ -: .; , [ ] # ignored !23455§$%&/()=?";
let instructions = Parser::parse_instructions(&Parser::parse_string(source));
assert_eq!(
instructions,
vec![
Instruction::FWD(1),
Instruction::INC(1),
... | rust_cleaned_test_functions.jsonl/56690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5705,
6615,
30456,
368,
341,
262,
1077,
2530,
284,
28957,
15307,
10,
16719,
366,
62,
52173,
659,
26,
1154,
508,
2279,
671,
12036,
753,
17,
18,
19,
20,
20,
17851,
3,
4,
5,
14,
368,
892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct_array_builder_from_schema() {
let mut fields = Vec::new();
fields.push(Field::new("f1", DataType::Float32, false));
fields.push(Field::new("f2", DataType::Utf8, false));
let mut sub_fields = Vec::new();
sub_fields.push(Field::new("g1", DataType::Int... | rust_cleaned_test_functions.jsonl/30997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
3858,
28532,
5673,
25371,
368,
341,
286,
1077,
5206,
5043,
284,
11312,
486,
931,
543,
286,
5043,
2552,
57788,
486,
931,
445,
69,
16,
497,
33172,
486,
5442,
18,
17,
11,
895,
1106,
286,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_sequence_err() {
Python::with_gil(|py| {
let items = PyList::new(py, &vec!["a", "b"]);
assert!(PyDict::from_sequence(py, items.to_object(py)).is_err());
});
} | rust_cleaned_test_functions.jsonl/7716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
23735,
9266,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
3589,
284,
5355,
852,
486,
931,
46827,
11,
609,
4083,
0,
1183,
64,
497,
330,
65,
15049,
310,
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 |
#[test]
fn test_stats_size_is_multiple_of_metric_size() {
use ccommon_sys::metric;
use std::mem;
let metric_size = mem::size_of::<metric>();
assert_eq!(mem::size_of::<Metrics>() % metric_size, 0);
} | rust_cleaned_test_functions.jsonl/60608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
2368,
6892,
45233,
3575,
41294,
2368,
368,
341,
262,
990,
272,
5464,
20344,
486,
15903,
280,
262,
990,
1460,
486,
10536,
401,
262,
1077,
18266,
2368,
284,
1833,
486,
2141,
3575,
27638,
1590... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_quoted_string() {
assert_eq!(quoted_string(&String::from_str("bar")), String::from_str("\"bar\""));
assert_eq!(quoted_string(&String::from_str("bar/baz \"yay\\\"")), String::from_str("\"bar/baz \\\"yay\\\\\\\"\""));
} | rust_cleaned_test_functions.jsonl/8815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
9253,
3904,
368,
341,
286,
2060,
10714,
10297,
63725,
3904,
2099,
703,
486,
1499,
2895,
445,
2257,
35674,
923,
486,
1499,
2895,
38915,
2257,
2105,
4010,
286,
2060,
10714,
10297,
63725,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_nested() {
let mut fields = BTreeMap::new();
insert(&mut fields, "a.b.c", Value::Integer(3));
let expected = fields_from_json(json!({
"a": {
"b":{
"c": 3
}
}
}));
assert_eq... | rust_cleaned_test_functions.jsonl/93987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
66279,
368,
341,
286,
1077,
5206,
5043,
284,
425,
6533,
2227,
486,
931,
543,
286,
5656,
2099,
6984,
5043,
11,
330,
64,
948,
520,
497,
5162,
486,
3486,
7,
18,
3237,
286,
1077,
3601,
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_deserialize_from_stream() {
use serde::Deserialize;
use std::net;
use std::thread;
#[derive(Debug, PartialEq, Serialize, Deserialize)]
struct Message {
message: String,
}
let l = net::TcpListener::bind("localhost:20000").unwrap();
thread::spawn(|| {
... | rust_cleaned_test_functions.jsonl/29850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
5673,
12673,
368,
341,
262,
990,
61570,
486,
64465,
280,
262,
990,
1460,
486,
4711,
280,
262,
990,
1460,
486,
4528,
401,
262,
11506,
27098,
42618,
11,
55039,
11,
39900,
11,
48440,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_statsd_client_with_tags_send_error() {
struct ErrorSink;
impl MetricSink for ErrorSink {
fn emit(&self, _metric: &str) -> io::Result<usize> {
Err(io::Error::from(io::ErrorKind::Other))
}
}
let count = Arc::new(AtomicUsize:... | rust_cleaned_test_functions.jsonl/10611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
6615,
16333,
13565,
4096,
368,
341,
286,
2036,
4600,
45094,
401,
286,
11605,
52458,
45094,
369,
4600,
45094,
341,
310,
5168,
16691,
2099,
721,
11,
716,
15903,
25,
609,
495,
8,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_qvariant_datetime() {
use crate::QMetaType;
let dt = QDateTime::from_date_time_local_timezone(
QDate::from_y_m_d(2019, 10, 23),
QTime::from_h_m_s_ms(10, 30, Some(40), Some(100)),
);
let v = QVariant::from(dt);
let qstring = QString... | rust_cleaned_test_functions.jsonl/59785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
15969,
28943,
368,
341,
286,
990,
17717,
486,
48,
12175,
929,
401,
286,
1077,
7594,
284,
98724,
486,
1499,
4164,
3009,
13564,
53193,
1006,
310,
1207,
1916,
486,
1499,
4178,
717,
814,
7,
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_unit_or_and_does_flatten() {
let schema = prepopulated_schema();
let known = Known::for_schema(&schema);
let or_query = r#"[:find ?x
:where (or (and [?x :foo/parent ?y]
[?x :foo/age 7]))]"#;
... | rust_cleaned_test_functions.jsonl/44231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14832,
8734,
8378,
96374,
5081,
14456,
368,
341,
286,
1077,
10802,
284,
855,
8374,
7757,
25371,
543,
286,
1077,
3881,
284,
48286,
486,
1958,
25371,
2099,
17349,
317,
286,
1077,
476,
5738,
284,
256... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_map() {
let s = "{\"a\": \"Dog\", \"b\": {\"variant\":\"Frog\",\
\"fields\":[\"Henry\", 349]}}";
let mut map: TreeMap<string::String, Animal> = super::decode(s).unwrap();
assert_eq!(map.remove(&"a".into_string()), Some(Dog));
assert_eq!(m... | rust_cleaned_test_functions.jsonl/6557 | {
"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,
15227,
5376,
368,
341,
286,
1077,
274,
284,
54734,
64,
11693,
7245,
48940,
16215,
7245,
65,
11693,
314,
2105,
15969,
23488,
37,
11918,
16215,
5661,
1698,
7245,
9007,
59,
8899,
2105,
63363,
16215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_then_unicode() {
let raw_file = include_bytes!("../../testdata/random_then_unicode");
let div_input = include_bytes!("../../testdata/random_then_unicode.ir");
let div_raw = divans_decompress_internal(&*div_input).unwrap();
assert_eq!(raw_file.len(), div_raw.len());
assert_e... | rust_cleaned_test_functions.jsonl/19821 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
68367,
54662,
368,
341,
256,
1077,
7112,
2458,
284,
2924,
12524,
17223,
2748,
92425,
79442,
68367,
54662,
797,
256,
1077,
3429,
5898,
284,
2924,
12524,
17223,
2748,
92425,
79442,
68367,
54662,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next_bucket_to_flush() {
solana_logger::setup();
let bins = 4;
let test = BucketMapHolder::<u64>::new(bins, &Some(AccountsIndexConfig::default()), 1);
let visited = (0..bins)
.into_iter()
.map(|_| AtomicUsize::default())
.collec... | rust_cleaned_test_functions.jsonl/5424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
38749,
2346,
39213,
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,
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_rotate_polygon_holes() {
let poly1 = polygon![
exterior: [
(x: 5.0, y: 1.0),
(x: 4.0, y: 2.0),
(x: 4.0, y: 3.0),
(x: 5.0, y: 4.0),
(x: 6.0, y: 4.0),
(x: 7.0, y: 3.0),
... | rust_cleaned_test_functions.jsonl/46759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
73542,
1523,
7151,
368,
341,
286,
1077,
9861,
16,
284,
29372,
90515,
310,
27263,
25,
2278,
394,
320,
87,
25,
220,
20,
13,
15,
11,
379,
25,
220,
16,
13,
15,
1326,
394,
320,
87,
25,
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_get_info() {
let mut rng = ThreadRng256 {};
let user_immediately_present = |_| Ok(());
let mut ctap_state = CtapState::new(&mut rng, user_immediately_present);
let info_reponse = ctap_state.process_command(&[0x04], DUMMY_CHANNEL_ID);
#[cfg(feature = "with... | rust_cleaned_test_functions.jsonl/73225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
3109,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
17895,
43187,
36976,
284,
66091,
7622,
7,
1423,
286,
1077,
5206,
20251,
391,
4387,
284,
356,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_4() {
let ikm = decode("0b0b0b0b0b0b0b0b0b0b0b").unwrap();
let salt = decode("000102030405060708090a0b0c").unwrap();
let info = decode("f0f1f2f3f4f5f6f7f8f9").unwrap();
let expected_prk = decode(
"67409c9cac28b52ee9fad91c2fda999f7ca22e3434f0ae... | rust_cleaned_test_functions.jsonl/10123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
19,
368,
341,
286,
1077,
13361,
76,
284,
16895,
445,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
1827,
15454,
543,
286,
1077,
120... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_messages() {
let packet =
hex::decode("000055aa00000000000000090000000c00000000b051ab030000aa55").unwrap();
let expected = Message {
command: Some(CommandType::HeartBeat),
payload: Vec::new(),
seq_nr: Some(0),
ret_... | rust_cleaned_test_functions.jsonl/39162 | {
"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,
21039,
23428,
368,
341,
286,
1077,
10151,
4035,
310,
12371,
486,
18196,
445,
15,
15,
15,
15,
20,
20,
5305,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
24,
15,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_beta_encoding() -> io::Result<()> {
let data = [
6, // Beta encoding ID
2, // args.len
0, // offset
8, // len
];
let mut reader = &data[..];
let encoding = read_encoding(&mut reader)?;
assert_eq!(encodi... | rust_cleaned_test_functions.jsonl/5077 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
49292,
37613,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
2278,
310,
220,
21,
11,
442,
34243,
11170,
3034,
198,
310,
220,
17,
11,
442,
2827,
19406,
198,
310,
220,
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... | 2 |
#[test]
fn test_delete_records() {
let mut collection = setup_collection();
collection.create().unwrap();
for _ in 0..10 {
collection.new_record().create().unwrap();
}
collection.delete_records().unwrap();
let records = collection.list_records();
... | rust_cleaned_test_functions.jsonl/63506 | {
"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,
11353,
31279,
368,
341,
286,
1077,
5206,
4426,
284,
6505,
25019,
543,
286,
4426,
2520,
1005,
15454,
543,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
4426,
4618,
14192,
1005,
3182,
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... | 2 |
#[test]
fn test_lt_dyn_scalar_with_dict() {
let key_builder = PrimitiveBuilder::<Int8Type>::new(3);
let value_builder = PrimitiveBuilder::<Int32Type>::new(2);
let mut builder = PrimitiveDictionaryBuilder::new(key_builder, value_builder);
builder.append(123).unwrap();
buil... | rust_cleaned_test_functions.jsonl/98212 | {
"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,
39164,
69213,
41652,
6615,
5243,
368,
341,
286,
1077,
1376,
28532,
284,
51460,
3297,
27638,
1072,
23,
929,
6831,
931,
7,
18,
317,
286,
1077,
897,
28532,
284,
51460,
3297,
27638,
1072,
18,
17,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pre_scan() {
let up_name = Name::from_str("www.example.com").unwrap();
let not_zone = Name::from_str("not.zone.com").unwrap();
let authority = create_example();
assert_eq!(
authority.pre_scan(&[Record::new()
.set_name(not_zone.clone())
.set_ttl(8... | rust_cleaned_test_functions.jsonl/48168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3666
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
28857,
368,
341,
262,
1077,
705,
1269,
284,
3988,
486,
1499,
2895,
445,
2136,
7724,
905,
1827,
15454,
543,
262,
1077,
537,
28692,
284,
3988,
486,
1499,
2895,
445,
1921,
57808,
905,
1827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_export_incompatible_change() {
// bip44/49/etc format
let descriptor = "wpkh(xprv9s21ZrQH143K4CTb63EaMxja1YiTnSEWKMbn23uoEnAzxjdUJRQkazCAtzxGm4LSoTSVTptoV9RbchnKPW9HxKtZumdyxyikZFDLhogJ5Uj/44'/0'/0'/0/*)";
let change_descriptor = "wpkh(xprv9s21ZrQH143K4CTb63EaMx... | rust_cleaned_test_functions.jsonl/21475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27114,
1243,
34842,
15947,
368,
341,
1789,
286,
442,
28878,
19,
19,
14,
19,
24,
47047,
3561,
271,
286,
1077,
16414,
284,
330,
8421,
30664,
2075,
649,
85,
24,
82,
17,
16,
57,
81,
48,
39,
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_init() {
let mut mock = mock::Mock::default();
let mut ctx = mock.create_ctx();
let mut meta = Metadata {
..Default::default()
};
let genesis = Default::default();
Module::<Accounts, Consensus>::init_or_migrate(&mut ctx, &mut meta, genesis);
} | rust_cleaned_test_functions.jsonl/52592 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
368,
341,
262,
1077,
5206,
7860,
284,
7860,
486,
11571,
486,
2258,
543,
262,
1077,
5206,
5635,
284,
7860,
2520,
15147,
543,
262,
1077,
5206,
8823,
284,
33589,
341,
286,
5241,
3675,
486,
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_that_we_dont_need_imports_for_this_macro_to_work() {
test::<&str>();
test_that_parsers_with_unnamed_types_can_be_in_same_scope::<&str>();
} | rust_cleaned_test_functions.jsonl/3955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70197,
45922,
814,
544,
71506,
18434,
82,
5478,
24868,
58810,
2346,
11498,
368,
341,
262,
1273,
27638,
5,
495,
3913,
262,
1273,
70197,
620,
40488,
6615,
4907,
30245,
9763,
27421,
21263,
1243,
33574,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_join() {
t!(v: Path::new(b"a/b/c").join(b".."), b"a/b");
t!(v: Path::new(b"/a/b/c").join(b"d"), b"/a/b/c/d");
t!(v: Path::new(b"a/\x80/c").join(b"\xFF"), b"a/\x80/c/\xFF");
t!(s: Path::new("a/b/c").join(".."), "a/b");
t!(s: Path::new("/a/b/c").join("d"), "... | rust_cleaned_test_functions.jsonl/7687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
368,
341,
286,
259,
10297,
85,
25,
7933,
486,
931,
1883,
56693,
3470,
2899,
1827,
5987,
1883,
62923,
3975,
293,
56693,
3470,
797,
286,
259,
10297,
85,
25,
7933,
486,
931,
1883,
3115,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tree_rooting() {
let graph = UnweightedAdjacencyList::new_undirected(
9,
&[
[0, 1],
[2, 1],
[2, 3],
[3, 4],
[5, 3],
[2, 6],
[6, 7],
[6, ... | rust_cleaned_test_functions.jsonl/22998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
12993,
287,
368,
341,
286,
1077,
4771,
284,
1230,
79796,
54866,
40624,
852,
486,
931,
62,
1241,
74612,
1006,
310,
220,
24,
345,
310,
609,
9640,
394,
508,
15,
11,
220,
16,
1259,
394,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hash() {
let program_id0 = Pubkey::from_str("4uQeVj5tqViQh7yWWGStvkEG1Zmhx6uasJtWCJziofM").unwrap();
let program_id1 = Pubkey::from_str("8opHzTAnfzRpPEx21XtnrVTX28YQuCpAjcn1PczScKh").unwrap();
let id0 = Pubkey::from_str("CiDwVBFgWV9E5MvXWoLgnEgn2... | rust_cleaned_test_functions.jsonl/55538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 827
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
8950,
368,
341,
16885,
286,
1077,
2025,
842,
15,
284,
22611,
792,
486,
1499,
2895,
445,
19,
84,
48,
68,
53,
73,
20,
83,
80,
35544,
48,
71,
22,
88,
18985,
38,
623,
48363,
9376,
16,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_singleton() {
let a1 = Bump::new();
let a2 = Bump::new();
assert_eq!(map![&a1; 1 => 2], map![&a2; 1 => 2]);
} | rust_cleaned_test_functions.jsonl/118071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82119,
368,
341,
286,
1077,
264,
16,
284,
425,
1510,
486,
931,
543,
286,
1077,
264,
17,
284,
425,
1510,
486,
931,
543,
286,
2060,
10714,
10297,
2186,
20703,
5,
64,
16,
26,
220,
16,
589,
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 |
#[test]
fn test_serialize_and_deserialize_create() {
let orig = ProgramInstruction::CreateBucket {
data: &[1, 2, 3, 4, 5, 6],
size: 80,
bump_seed: 42,
};
let bs = orig.serialize();
let new = parse_program_instruction(bs.as_ref()).unwrap();
... | rust_cleaned_test_functions.jsonl/128155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
8378,
15768,
9050,
8657,
368,
341,
286,
1077,
2713,
284,
6687,
16664,
486,
4021,
36018,
341,
310,
821,
25,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate_ip_cow() {
let test: Cow<'static, str> = "1.1.1.1".into();
assert_eq!(validate_ip(test), true);
let test: Cow<'static, str> = String::from("1.1.1.1").into();
assert_eq!(validate_ip(test), true);
let test: Cow<'static, str> = "2a02::223:6cff :fe8a:... | rust_cleaned_test_functions.jsonl/46416 | {
"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,
42681,
10385,
666,
363,
368,
341,
286,
1077,
1273,
25,
21851,
18291,
1978,
11,
607,
29,
284,
330,
16,
13,
16,
13,
16,
13,
16,
3263,
18122,
543,
286,
2060,
10714,
10297,
7067,
10385,
8623,
701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alternator_polynomial() {
use ark_poly::Evaluations;
let domain_k = GeneralEvaluationDomain::<Fr>::new(1 << 4).unwrap();
let domain_h = GeneralEvaluationDomain::<Fr>::new(1 << 3).unwrap();
let domain_h_elems = domain_h
.elements()
.collect:... | rust_cleaned_test_functions.jsonl/89136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79728,
850,
47323,
25358,
368,
341,
286,
990,
55217,
36133,
486,
36,
25510,
804,
280,
286,
1077,
7947,
4698,
284,
3251,
82363,
13636,
27638,
22560,
6831,
931,
7,
16,
1115,
220,
19,
568,
15454,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_convert_to_f64() {
let cases = vec![
("2012-12-31 11:30:45.123456", 4, 20121231113045.1235f64),
("2012-12-31 11:30:45.123456", 6, 20121231113045.123456f64),
("2012-12-31 11:30:45.123456", 0, 20121231113045f64),
("2012-12-31 11:30:45.999999"... | rust_cleaned_test_functions.jsonl/40474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
761,
21,
19,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
17,
12,
16,
17,
12,
18,
16,
220,
16,
16,
25,
18,
15,
25,
19,
20,
13,
16,
17,
18,
19,
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... | 2 |
#[test]
fn test_permissions_from() {
let p = internal_permissions::Permissions::from(130);
assert_eq!(p.manage_permissions, true);
assert_eq!(p.manage_users, false);
assert_eq!(p.manage_groups, false);
assert_eq!(p.manage_tokens, false);
assert_eq!(p.set_internal_... | rust_cleaned_test_functions.jsonl/106526 | {
"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,
44767,
5673,
368,
341,
286,
1077,
281,
284,
5306,
44767,
486,
23851,
486,
1499,
7,
16,
18,
15,
317,
286,
2060,
10714,
10297,
79,
50821,
44767,
11,
830,
317,
286,
2060,
10714,
10297,
79,
50821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_form() {
let mut f = WaveReader::open("tests/media/izotope_test.wav").unwrap();
let mut buf: Vec<u8> = vec![];
f.read_list(ADTL_SIG, &mut buf).unwrap();
assert_ne!(buf.len(), 0);
} | rust_cleaned_test_functions.jsonl/134524 | {
"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,
2019,
7915,
368,
341,
262,
1077,
5206,
282,
284,
31318,
5062,
486,
2508,
445,
23841,
29506,
14,
449,
50682,
4452,
29864,
1827,
15454,
543,
262,
1077,
5206,
6607,
25,
11312,
34837,
23,
29,
284,
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_get_client_empty() -> anyhow::Result<()> {
let storage = InMemoryStorage::new();
let mut txn = storage.txn()?;
let maybe_client = txn.get_client(Uuid::new_v4())?;
assert!(maybe_client.is_none());
Ok(())
} | rust_cleaned_test_functions.jsonl/16731 | {
"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,
3062,
8179,
15124,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1077,
5819,
284,
758,
10642,
5793,
486,
931,
543,
286,
1077,
5206,
49721,
284,
5819,
33807,
77,
94136,
286,
1077,
7196,
8179,
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... | 3 |
#[test]
fn test_maximum_age_filtering() -> Result<(), Error> {
#[cfg(any(not(target_arch = "wasm32"), target_os = "wasi"))]
let unix_time = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis() as i64;
#[cfg(all(target_arch = "wasm32", target_os = "unknown"))]... | rust_cleaned_test_functions.jsonl/67873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93581,
32053,
8727,
287,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
11506,
14072,
40268,
24772,
8637,
34330,
284,
330,
86,
10530,
18,
17,
3975,
2169,
29387,
284,
330,
86,
10215,
2761,
921,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_check_retries_backoff() {
block_on(async {
let config = config_generator();
let mut timer = MockTimer::new();
timer.expect_range(Duration::from_millis(500), Duration::from_millis(1500));
timer.expect_range(Duration::from_millis(1500)... | rust_cleaned_test_functions.jsonl/126406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 501
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
7200,
1288,
4543,
3895,
1847,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
5206,
9021,
284,
14563,
10105,
486,
931,
543,
310,
9021,
25952,
9698,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ancestry() {
assert_eq!(
(Item::new(), Item::new()),
Item::new().ancestry(&Item::new())
);
assert_eq!(
(Item::new(), Item::with_item(&["a"])),
Item::new().ancestry(&Item::with_item(&["a"]))
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/78652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
681,
4617,
368,
341,
286,
2060,
10714,
33673,
310,
320,
1234,
486,
931,
1507,
5739,
486,
931,
14702,
310,
5739,
486,
931,
1005,
681,
4617,
2099,
1234,
486,
931,
2398,
286,
3475,
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_atanh() {
assert_eq!(0.0f64.atanh(), 0.0f64);
assert_eq!((-0.0f64).atanh(), -0.0f64);
let inf: f64 = INFINITY;
let neg_inf: f64 = NEG_INFINITY;
let nan: f64 = NAN;
assert_eq!(1.0f64.atanh(), inf);
assert_eq!((-1.0f64).atanh(), neg_inf);
... | rust_cleaned_test_functions.jsonl/7849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
27924,
368,
341,
286,
2060,
10714,
10297,
15,
13,
15,
69,
21,
19,
6847,
27924,
1507,
220,
15,
13,
15,
69,
21,
19,
317,
286,
2060,
10714,
0,
54934,
15,
13,
15,
69,
21,
19,
568,
16225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_local_pref_path_attribute() {
let local_pref_bytes: &[u8] = &[0xca, 0x00, 0x00, 0xbe];
let ctx = &ParserContext::new().four_octet_asn(true).nlri_mode(Ipv6);
let result = LocalPrefPathAttribute::from_wire(ctx, local_pref_bytes).unwrap();
assert_eq!(result.1 .0, 33... | rust_cleaned_test_functions.jsonl/49691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
43331,
2638,
16791,
368,
341,
286,
1077,
2205,
43331,
12524,
25,
44590,
84,
23,
60,
284,
44590,
15,
56071,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
42459,
935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_i32() {
for &i in &[
0,
1,
-1,
2,
-2,
3,
-3,
1234,
i32::max_value(),
i32::max_value() / 2,
123123123,
321312312,
][..]
{
assert_eq!(soft::i32_to_f64(i), (i as f64).to_bits());
... | rust_cleaned_test_functions.jsonl/132320 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
18,
17,
368,
341,
262,
369,
609,
72,
304,
609,
9640,
286,
220,
15,
345,
286,
220,
16,
345,
286,
481,
16,
345,
286,
220,
17,
345,
286,
481,
17,
345,
286,
220,
18,
345,
286,
481,
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... | 2 |
#[test]
fn test_find_most_common_bit_in_column(){
let input =
vec![
"00100",
"11110",
"10110",
"10111",
"10101",
"01111",
"00111",
"11100",
"10000",... | rust_cleaned_test_functions.jsonl/20061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
81416,
21107,
13996,
1243,
8744,
3032,
286,
1077,
1946,
4035,
310,
7486,
90515,
394,
330,
15,
15,
16,
15,
15,
756,
394,
330,
16,
16,
16,
16,
15,
756,
394,
330,
16,
15,
16,
16,
15,
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_extract_arg() {
use super::extract_arg;
use std::collections::HashMap;
let mut cases: HashMap<Vec<String>, Vec<&str>> = HashMap::new();
cases.insert(
vec![String::from("-l"), String::from("16"), String::from("c")],
vec!["-l", "16"],
... | rust_cleaned_test_functions.jsonl/17123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
6057,
368,
341,
286,
990,
2256,
486,
23493,
6057,
280,
286,
990,
1460,
486,
51137,
486,
18497,
401,
286,
1077,
5206,
5048,
25,
10528,
50439,
3464,
8066,
11312,
52244,
495,
2452,
284,
10528,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timestamp_array_from_vec() {
let arr = TimestampSecondArray::from_vec(vec![1, -5], None);
assert_eq!(2, arr.len());
assert_eq!(0, arr.offset());
assert_eq!(0, arr.null_count());
assert_eq!(1, arr.value(0));
assert_eq!(-5, arr.value(1));
ass... | rust_cleaned_test_functions.jsonl/27281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 651
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
3858,
5673,
13251,
368,
341,
286,
1077,
2890,
284,
32758,
15666,
1857,
486,
1499,
13251,
25592,
20703,
16,
11,
481,
20,
1125,
2240,
317,
286,
2060,
10714,
10297,
17,
11,
2890,
19406,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decimal_builder() {
let mut builder = DecimalBuilder::new(30, 23, 6);
builder.append_value(8_887_000_000).unwrap();
builder.append_null().unwrap();
builder.append_value(-8_887_000_000).unwrap();
let decimal_array: DecimalArray = builder.finish();
... | rust_cleaned_test_functions.jsonl/30992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
28532,
368,
341,
286,
1077,
5206,
7363,
284,
26728,
3297,
486,
931,
7,
18,
15,
11,
220,
17,
18,
11,
220,
21,
626,
286,
7363,
2057,
3142,
7,
23,
62,
23,
23,
22,
62,
15,
15,
15,
62,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_make_mac_ext() {
let key = key();
let ext = "ext-data".to_string();
let mac = Mac::new(
MacType::Header,
&key,
sys_time(1000, 100),
"nonny",
"POST",
"mysite.com",
443,
"/v1/api... | rust_cleaned_test_functions.jsonl/52133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
22802,
9927,
368,
341,
286,
1077,
1376,
284,
1376,
543,
286,
1077,
1303,
284,
330,
427,
13945,
3263,
983,
3904,
543,
286,
1077,
8978,
284,
7401,
486,
931,
1006,
310,
7401,
929,
486,
4047,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account() {
let mut adapter = SettingAdapter::new(
SettingType::Account,
Box::new(TestStore::new()),
MutationHandler { process: &process_account_mutation, check_sync: None },
Some(SettingData::Account(AccountSettings { mode: None })),
... | rust_cleaned_test_functions.jsonl/21402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
368,
341,
286,
1077,
5206,
12956,
284,
20037,
5940,
486,
931,
1006,
310,
20037,
929,
486,
7365,
345,
310,
8261,
486,
931,
31159,
6093,
486,
931,
14702,
310,
67203,
3050,
314,
1882,
25,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_solicited_fail_4() {
match metadata_solicited(b"METADATA \"\" (/shared/vendor \"asdf\")\r\n") {
Err(_) => {}
_ => panic!("Error required when vendor name is not provided."),
}
} | rust_cleaned_test_functions.jsonl/4872 | {
"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,
643,
91104,
22121,
62,
19,
368,
341,
286,
2432,
11160,
643,
91104,
1883,
1,
44875,
39119,
7245,
2105,
46225,
6100,
35663,
7245,
76615,
62705,
59,
81,
1699,
899,
341,
310,
15495,
48139,
589,
5613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_users_by_query() {
let beam = Beam::new();
let res = beam.users.get_users_by_query(String::from(QUERY), 0);
assert!(res.is_ok());
} | rust_cleaned_test_functions.jsonl/90016 | {
"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,
16348,
3710,
5738,
368,
341,
262,
1077,
23418,
284,
50130,
486,
931,
543,
262,
1077,
592,
284,
23418,
20653,
670,
16348,
3710,
5738,
2242,
486,
1499,
7,
41019,
701,
220,
15,
317,
262,
2060,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_datetime_frac_from_int() {
assert_eq!(Value::DateTime(DateTime::new(Date::new_str("2012", "01", "03"), Some(Time::new_str(
"03", "30", "30", Some("3030"), None
)))), Value::datetime_frac_from_int(2012, 1, 3, 3, 30, 30, 3030).unwrap());
} | rust_cleaned_test_functions.jsonl/86213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
28943,
70358,
5673,
4042,
368,
341,
262,
2060,
10714,
10297,
1130,
486,
7689,
32083,
486,
931,
19987,
486,
931,
2895,
445,
17,
15,
16,
17,
497,
330,
15,
16,
497,
330,
15,
18,
3975,
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... | 1 |
#[test]
fn test_row_group_metadata_thrift_conversion_empty() {
let schema_descr = get_test_schema_descr();
let row_group_meta = RowGroupMetaData::builder(schema_descr).build();
assert!(row_group_meta.is_err());
if let Err(e) = row_group_meta {
assert_eq!(
... | rust_cleaned_test_functions.jsonl/82558 | {
"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,
8530,
6288,
22220,
5854,
41380,
64132,
15124,
368,
341,
286,
1077,
10802,
64622,
284,
633,
4452,
25371,
64622,
1428,
286,
1077,
2802,
6288,
13381,
284,
10801,
2808,
37307,
486,
17850,
42735,
64622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kvm_api_version() {
let kvm = Kvm::new().unwrap();
assert_eq!(kvm.get_api_version(), 12);
assert!(kvm.check_extension(Cap::UserMemory));
} | rust_cleaned_test_functions.jsonl/127384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
7338,
11697,
9438,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
2060,
10714,
10297,
74,
7338,
670,
11697,
9438,
1507,
220,
16,
17,
317,
286,
2060,
10297,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_shrink_vectors() {
const PACKET_COUNT: usize = 1024;
const BATCH_COUNT: usize = PACKET_COUNT / PACKETS_PER_BATCH;
let set_discards = [
// contiguous
// No discards
|_, _| false,
// All discards
|_, ... | rust_cleaned_test_functions.jsonl/22101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3675
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
34365,
49158,
368,
341,
286,
733,
73205,
14672,
25,
22301,
284,
220,
16,
15,
17,
19,
280,
286,
733,
98791,
14672,
25,
22301,
284,
73205,
14672,
608,
33332,
43167,
10617,
74009,
401,
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... | 9 |
#[test]
fn test_serialization() {
let data = TestData {
score: vec![
("a_guy".to_owned(), 200),
("b_guy".to_owned(), 300),
("c_guy".to_owned(), 400),
],
};
let serialized = serde_json::to_value(data).expect("expected data to serialize successfully... | rust_cleaned_test_functions.jsonl/95161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
2022,
368,
341,
262,
1077,
821,
284,
93200,
341,
286,
5456,
25,
7486,
90515,
310,
3489,
64,
1889,
4076,
3263,
983,
51973,
1507,
220,
17,
15,
15,
1326,
310,
3489,
65,
1889,
4076,
3263,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_addrs() {
let table = vec![
("127.0.0.1:8080", true),
("[::1]:8080", true),
("localhost:8080", true),
("pingcap.com:8080", true),
("funnydomain:8080", true),
("127.0.0.1", false),
("[::1]", false),
... | rust_cleaned_test_functions.jsonl/1558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1061
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
2891,
5428,
368,
341,
286,
1077,
1965,
284,
7486,
90515,
310,
3489,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
23,
15,
23,
15,
497,
830,
1326,
310,
3489,
58,
486,
16,
5669,
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... | 3 |
#[test]
fn test_meta_doc_comments_non_latin() {
check(
r#"
macro_rules! m {
($(#[$ m:meta])+) => ( $(#[$m])+ fn bar() {} )
}
m! {
/// 錦瑟無端五十弦,一弦一柱思華年。
/**
莊生曉夢迷蝴蝶,望帝春心託杜鵑。
*/
}
"#,
expect![[r##"
macro_rules! m {
($(#[$ m:meta])+) => ( $(#[$m])+ fn bar() {} )
}
#[d... | rust_cleaned_test_functions.jsonl/85237 | {
"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,
13381,
18869,
30359,
21637,
907,
14768,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
1711,
32735,
3442,
296,
25,
5490,
2467,
36197,
589,
320,
4930,
2,
3442,
76,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rrot() {
use ark_std::vec::Vec;
let numbers = (0..100u64).collect::<Vec<_>>();
let right_rotation = RightRotationStreamer(&numbers.as_slice(), &1)
.iter()
.cloned()
.collect::<Vec<_>>();
assert_eq!(right_rotation[0], 0);
assert_eq!(right_rotation[1], ... | rust_cleaned_test_functions.jsonl/107463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
4640,
368,
341,
262,
990,
55217,
15656,
486,
4083,
486,
10050,
401,
262,
1077,
5109,
284,
320,
15,
496,
16,
15,
15,
84,
21,
19,
568,
17384,
27638,
10050,
32399,
37038,
262,
1077,
1290,
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_encode() {
assert_eq!(base62::encode(u128::MAX), "7n42DGM5Tflk9n8mt7Fhc7");
assert_eq!(base62::encode(0u8), "0");
} | rust_cleaned_test_functions.jsonl/50827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
368,
341,
286,
2060,
10714,
10297,
3152,
21,
17,
486,
6180,
8154,
16,
17,
23,
486,
10586,
701,
330,
22,
77,
19,
17,
35,
20637,
20,
51,
1489,
74,
24,
77,
23,
2501,
22,
37,
38052,
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_inplace_repeat() {
let gil = Python::acquire_gil();
let py = gil.python();
let d = [("ByteSequence", py.get_type::<ByteSequence>())].into_py_dict(py);
py_run!(
py,
*d,
"s = ByteSequence([1, 2]); s *= 3; assert list(s) == [1, 2, 1, 2, 1, 2]"
);
py... | rust_cleaned_test_functions.jsonl/46920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
2007,
41975,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
262,
1077,
294,
284,
84019,
7153,
14076,
497,
4510,
670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_iter_leak() {
static mut DROPS: i32 = 0;
struct D(bool);
impl Drop for D {
fn drop(&mut self) {
unsafe {
DROPS += 1;
}
if self.0 {
panic!("panic in `drop`");
}
}
}
let v =... | rust_cleaned_test_functions.jsonl/24443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
11751,
585,
368,
341,
262,
1099,
5206,
422,
1285,
5012,
25,
600,
18,
17,
284,
220,
15,
401,
262,
2036,
422,
9764,
626,
262,
11605,
15733,
369,
422,
341,
286,
5168,
5943,
2099,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_reader_writer_ring() {
let mut buf = [0u8; 16];
let ring = Ring::new(&mut buf);
let r = ring.reader();
let w = ring.writer();
for _ in 0..16 {
assert_eq!(w.write(&[0, 1, 2, 3]), 4);
let mut dst = [0u8; 4];
assert_eq!(r.... | rust_cleaned_test_functions.jsonl/114710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
28908,
34683,
368,
341,
286,
1077,
5206,
6607,
284,
508,
15,
84,
23,
26,
220,
16,
21,
935,
286,
1077,
10058,
284,
21525,
486,
931,
2099,
6984,
6607,
317,
286,
1077,
435,
284,
10058,
347... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_json_escape_standard() {
let input = "\r\n\t\\";
let mut into = String::new();
escape_json(input, &mut into);
assert_eq!(into, "\\r\\n\\t\\\\");
} | rust_cleaned_test_functions.jsonl/67936 | {
"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,
9455,
21832,
48688,
368,
341,
286,
1077,
1946,
284,
2917,
81,
1699,
4955,
3422,
876,
286,
1077,
5206,
1119,
284,
923,
486,
931,
1428,
286,
12449,
9455,
5384,
11,
609,
6984,
1119,
626,
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 |
#[test]
fn test_apply_brute_force() {
let _num_qubits = 2;
let mut circuit = Circuit::new(_num_qubits, Some("brute_force".to_string()));
circuit.add_hadamard_gate(0);
circuit.add_hadamard_gate(1);
circuit.add_cnot_gate(0, 1);
circuit.forward();
le... | rust_cleaned_test_functions.jsonl/104575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
17682,
1070,
40739,
368,
341,
286,
1077,
716,
2413,
8976,
81402,
284,
220,
17,
280,
286,
1077,
5206,
16224,
284,
27218,
486,
931,
2490,
2413,
8976,
81402,
11,
4329,
445,
1323,
1070,
40739,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_modexp() {
let input = &hex_decode(
"0000000000000000000000000000000000000000000000000000000000000001\
0000000000000000000000000000000000000000000000000000000000000001\
0000000000000000000000000000000000000000000000000000000000000001\
03\
05\
07",
)
.unwrap();
... | rust_cleaned_test_functions.jsonl/51966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7480,
4580,
368,
341,
262,
1077,
1946,
284,
609,
17308,
15227,
1006,
286,
330,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_get() {
let (src, size) = build_table(build_data());
let table = Table::new(Options::default(), wrap_buffer(src), size).unwrap();
let table2 = table.clone();
let mut _iter = table.iter();
for (k, v) in SSIteratorIter::wrap(&mut _iter) {
... | rust_cleaned_test_functions.jsonl/3809 | {
"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,
5237,
3062,
368,
341,
286,
1077,
320,
3548,
11,
1379,
8,
284,
1936,
5237,
43333,
1769,
5231,
286,
1077,
1965,
284,
6633,
486,
931,
7,
3798,
486,
2258,
1507,
15061,
7776,
14705,
701,
1379,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_tseitin_or() {
use cryptominisat::Lbool;
let mut solver = Solver::new();
let (r, x, y) = (solver.new_var(), solver.new_var(), solver.new_var());
// Let r = x | y
add_tseitin_or(&mut solver, r, x, y);
// The constraint set is feasible.
assert_eq!(solver.solve(), Lbo... | rust_cleaned_test_functions.jsonl/97533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
325,
84886,
8734,
368,
341,
262,
990,
14436,
7970,
285,
266,
486,
43,
2641,
401,
262,
1077,
5206,
28961,
284,
68295,
486,
931,
543,
262,
1077,
320,
81,
11,
856,
11,
379,
8,
284,
320,
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... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.