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_parse_integer_with_whitespace() {
let arena = Arena::new();
assert_syntaxes(
&parse(&arena, " 123 ", &lang()),
&[Syntax::new_atom(
&arena,
vec![SingleLineSpan {
line: 0.into(),
start_... | rust_cleaned_test_functions.jsonl/52647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
31725,
6615,
86175,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
1428,
286,
2060,
78894,
288,
1006,
310,
609,
6400,
2099,
30527,
11,
330,
220,
16,
17,
18,
3670,
609,
5205,
14702,
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_prepare_column_names() -> Result<()> {
let db = checked_memory_handle();
db.execute_batch("CREATE TABLE foo(x INTEGER);")?;
let mut stmt = db.prepare("SELECT * FROM foo")?;
stmt.execute([])?;
assert_eq!(stmt.column_count(), 1);
assert_eq!(stmt.col... | rust_cleaned_test_functions.jsonl/113051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
8744,
9187,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
2927,
7769,
14534,
445,
22599,
14363,
15229,
2075,
30381,
1215,
899,
69493,
286,
1077,
5206,
2002... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_button_ui_1() {
struct Mock;
let expected = String::from("<div class=\"__azul-native-button\" tabindex=\"0\">\r\n <p>Hello</p>\r\n</div>\r\n");
let button: Dom<Mock> = Button::with_label("Hello").dom();
assert_eq!(expected, button.debug_dump());
} | rust_cleaned_test_functions.jsonl/15945 | {
"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,
8487,
22412,
62,
16,
368,
341,
262,
2036,
14563,
401,
262,
1077,
3601,
284,
923,
486,
1499,
9639,
611,
536,
4070,
563,
1370,
360,
15598,
12444,
2105,
30173,
4070,
15,
38858,
81,
1699,
262,
366,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_completion_works_in_consts() {
assert_debug_snapshot!(
do_ref_completion(
r"
struct A { the_field: u32 }
const X: u32 = {
A { the_field: 92 }.<|>
};
",
),
@r###"
[
Comp... | rust_cleaned_test_functions.jsonl/57603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 392
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60164,
11498,
82,
1243,
48530,
368,
341,
286,
2060,
15446,
53265,
33673,
286,
653,
7793,
60164,
1006,
310,
435,
698,
310,
2036,
362,
314,
279,
5013,
25,
575,
18,
17,
456,
310,
733,
1599,
25,
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_type_expression() {
let want = TypeExpression {
base: BaseNode::default(),
constraints: vec![TypeConstraint {
base: BaseNode::default(),
tvar: Identifier {
base: BaseNode::default(),
name: "T"... | rust_cleaned_test_functions.jsonl/112514 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1830
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
28068,
368,
341,
286,
1077,
1366,
284,
3990,
9595,
341,
310,
2331,
25,
5351,
1955,
486,
2258,
3148,
310,
16982,
25,
7486,
20703,
929,
17890,
341,
394,
2331,
25,
5351,
1955,
486,
2258,
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_that_second_build_artifacts_removed() {
let path = Path::new("tests/test_sources/compilation/basic_no_deps_test_mode");
let dir = tempdir().unwrap().path().to_path_buf();
BuildConfig {
dev_mode: true,
test_mode: true,
install_dir: Some(dir.clone()),
.... | rust_cleaned_test_functions.jsonl/127136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 833
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70197,
29644,
20801,
36932,
26401,
68248,
368,
341,
262,
1077,
1815,
284,
7933,
486,
931,
445,
23841,
12697,
52896,
14,
5689,
13455,
77909,
6536,
76489,
4452,
7302,
797,
262,
1077,
5419,
284,
2730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_large_immediate() {
disasm!("entrypoint:\n add64 r1, -1\n");
disasm!("entrypoint:\n add64 r1, -1\n");
} | rust_cleaned_test_functions.jsonl/68771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
17895,
14636,
368,
341,
262,
827,
10530,
17223,
4085,
2768,
7190,
77,
262,
912,
21,
19,
435,
16,
11,
481,
16,
1699,
797,
262,
827,
10530,
17223,
4085,
2768,
7190,
77,
262,
912,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_integer_from_float() {
assert_de_tokens_error::<isize>(
&[Token::F32(0.0)],
"invalid type: floating point `0`, expected isize",
);
} | rust_cleaned_test_functions.jsonl/129546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
5673,
17586,
368,
341,
262,
2060,
2259,
28838,
4096,
27638,
285,
551,
17055,
286,
44590,
3323,
486,
37,
18,
17,
7,
15,
13,
15,
30749,
286,
330,
11808,
943,
25,
19057,
1459,
1565,
15,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ttt_negamax_always_draws() {
use minimax::strategies::negamax::{Negamax, Options};
let mut s1 = Negamax::<ttt::Evaluator>::new(Options { max_depth: 10 });
let mut s2 = Negamax::<ttt::Evaluator>::new(Options { max_depth: 10 });
for _ in 0..100 {
assert!(battle_royale(&mut ... | rust_cleaned_test_functions.jsonl/8378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
5566,
28209,
89627,
8418,
2284,
23021,
82,
368,
341,
262,
990,
21187,
706,
486,
495,
69388,
486,
28775,
89627,
22964,
47800,
89627,
11,
14566,
2440,
262,
1077,
5206,
274,
16,
284,
23995,
8962... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_notify_account_at_accounts_update() {
let mut accounts = AccountsDb::new_single_for_tests_with_caching();
let notifier = GeyserTestPlugin::default();
let notifier = Arc::new(RwLock::new(notifier));
accounts.set_geyser_plugin_notifer(Some(notifier.clone()));
... | rust_cleaned_test_functions.jsonl/46212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36654,
13500,
3752,
55665,
8882,
368,
341,
286,
1077,
5206,
9618,
284,
40655,
7994,
486,
931,
19487,
5478,
32509,
6615,
666,
11829,
1428,
286,
1077,
73169,
284,
479,
1195,
799,
2271,
11546,
486,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_attribute_refaddr8_version2() {
let buf = [0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x99, 0x99];
let mut unit = test_parse_attribute_unit(8, Format::Dwarf32, LittleEndian);
unit.encoding.version = 2;
let form = constants::DW_FORM_ref_addr;
let... | rust_cleaned_test_functions.jsonl/102038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16791,
7793,
6214,
23,
9438,
17,
368,
341,
286,
1077,
6607,
284,
508,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
15,
18,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_storage_count_and_alive_bytes() {
let accounts = AccountsDb::new_single_for_tests();
let shared_key = solana_sdk::pubkey::new_rand();
let account = AccountSharedData::new(1, 1, AccountSharedData::default().owner());
let slot0 = 0;
accounts.store_... | rust_cleaned_test_functions.jsonl/7052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
23310,
3180,
8378,
58850,
12524,
368,
341,
286,
1077,
9618,
284,
40655,
7994,
486,
931,
19487,
5478,
32509,
543,
286,
1077,
6094,
3097,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
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... | 2 |
#[test]
fn test_cobalt_sender() {
let (sender, mut receiver) = mpsc::channel(1);
let mut sender = CobaltSender::new(sender);
sender.log_event(1, 1);
assert_eq!(
receiver.try_next().unwrap().unwrap(),
CobaltEvent {
metric_id: 1,
... | rust_cleaned_test_functions.jsonl/121110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2608
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
674,
3145,
54356,
368,
341,
286,
1077,
320,
11644,
11,
5206,
13964,
8,
284,
296,
81984,
486,
10119,
7,
16,
317,
286,
1077,
5206,
4646,
284,
45951,
3145,
20381,
486,
931,
19377,
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_ring() {
let mut buf = [0u8; 16];
let ring = Ring::new(&mut buf);
for i in 0..16 {
if let Some(elt) = ring.head_elt() {
*elt = i as u8;
ring.incr_head();
}
}
for i in 0..16 {
... | rust_cleaned_test_functions.jsonl/114707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
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,
626,
286,
369,
600,
304,
220,
15,
496,
16,
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... | 6 |
#[test]
fn test_is_bingo() {
let mut board = Board {
cells: vec![vec![BingoNumber {
number: 1,
is_called: true,
}, BingoNumber {
number: 2,
is_called: false,
}],
vec![BingoNumber {
number: 3,
is_called: f... | rust_cleaned_test_functions.jsonl/117727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
880,
27908,
368,
341,
262,
1077,
5206,
4479,
284,
8751,
341,
286,
7761,
25,
7486,
20703,
4083,
20703,
33,
27908,
2833,
341,
310,
1372,
25,
220,
16,
345,
310,
374,
27859,
25,
830,
345,
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_stop_sending_and_reset_other_error_with_events() {
let (mut hconn, mut peer_conn) = connect(Client);
let request_stream_id = hconn
.fetch("GET", "https", "something.com", "/", &[])
.unwrap();
assert_eq!(request_stream_id, 0);
let out = hco... | rust_cleaned_test_functions.jsonl/10935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
643,
2459,
8378,
18983,
30456,
4096,
6615,
19691,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
8,
284,
4564,
46851,
317,
286,
1077,
1681,
12673,
842,
284,
305,
5148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_selection_movement() {
let mut editor = Editor::new(Rc::new(RefCell::new(Buffer::new(1))));
editor.buffer.borrow_mut().splice(0..0, "abc");
editor.buffer.borrow_mut().splice(3..3, "\n");
editor.buffer.borrow_mut().splice(4..4, "\ndef");
assert_eq!(render_... | rust_cleaned_test_functions.jsonl/123912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23672,
70325,
368,
341,
286,
1077,
5206,
6440,
284,
12580,
486,
931,
2785,
66,
486,
931,
7,
3945,
3599,
486,
931,
55574,
486,
931,
7,
16,
38776,
286,
6440,
24465,
83640,
29523,
1005,
94960,
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... | 2 |
#[test]
fn test_quat_lerp() {
let q0 = Quat::from_rotation_y(deg(0.0));
let q1 = Quat::from_rotation_y(deg(90.0));
assert_approx_eq!(q0, q0.lerp(q1, 0.0));
assert_approx_eq!(q1, q0.lerp(q1, 1.0));
assert_approx_eq!(Quat::from_rotation_y(deg(45.0)), q0.lerp(q1, 0.5));
} | rust_cleaned_test_functions.jsonl/73792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
266,
907,
22632,
368,
341,
262,
1077,
2804,
15,
284,
3406,
266,
486,
1499,
44813,
4178,
77127,
7,
15,
13,
15,
1106,
262,
1077,
2804,
16,
284,
3406,
266,
486,
1499,
44813,
4178,
77127,
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_dirty_sample_with_a_bad_checksum_2() {
// TODO: investigate 2 failing records
test_full_sample(sample_with_a_bad_checksum_2(), 1774, 2)
} | rust_cleaned_test_functions.jsonl/64580 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
63642,
17491,
6615,
4306,
34199,
64038,
62,
17,
368,
341,
262,
442,
5343,
25,
19314,
220,
17,
21394,
7424,
198,
262,
1273,
16372,
17491,
32968,
6615,
4306,
34199,
64038,
62,
17,
1507,
220,
16,
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 |
#[test]
fn test_transpile() {
let specifier =
ModuleSpecifier::parse("https://deno.land/x/mod.ts").unwrap();
let source = r#"
enum D {
A,
B,
}
namespace N {
export enum D {
A = "value"
}
export const Value = 5;
}
export class A {
private b: string;
protected c: number = 1;
e:... | rust_cleaned_test_functions.jsonl/133954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 741
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
12192,
368,
341,
262,
1077,
97616,
4035,
414,
13711,
87297,
486,
6400,
445,
2428,
1110,
5183,
78,
87627,
10776,
38479,
21288,
1827,
15454,
543,
262,
1077,
2530,
284,
435,
2,
698,
9018,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_does_not_start_with() {
let mut buf = Buffer::new();
buf.insert(0, &['a', 'b', 'c']);
let mut buf2 = Buffer::new();
buf2.insert(0, &['a', 'b', 'c']);
assert_eq!(buf.starts_with(&buf2), false);
} | rust_cleaned_test_functions.jsonl/61896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96374,
7913,
4906,
6615,
368,
341,
286,
1077,
5206,
6607,
284,
10312,
486,
931,
543,
286,
6607,
7030,
7,
15,
11,
609,
677,
64,
516,
364,
65,
516,
364,
66,
5860,
286,
1077,
5206,
6607,
17,
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_pow() {
let tests = vec![
(Datum::F64(1.0), Datum::F64(3.0), Datum::F64(1.0)),
(Datum::F64(3.0), Datum::F64(0.0), Datum::F64(1.0)),
(Datum::F64(2.0), Datum::F64(4.0), Datum::F64(16.0)),
];
for (arg0, arg1, exp) in tests {
le... | rust_cleaned_test_functions.jsonl/13181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56183,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
320,
68036,
486,
37,
21,
19,
7,
16,
13,
15,
701,
68459,
486,
37,
21,
19,
7,
18,
13,
15,
701,
68459,
486,
37,
21,
19,
7,
16,
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... | 2 |
#[test]
fn test_vcx_credential_get_new_offers(){
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE,"true");
let cxn = ::connection::build_connection("test_get_new_offers").unwrap();
let cb = return_types_u32::Return_U32_STR::new().unwrap();
... | rust_cleaned_test_functions.jsonl/58636 | {
"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,
2273,
25844,
666,
30320,
3062,
5921,
13651,
388,
3032,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
1335,
1866,
797,
286,
1077,
20716,
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_decode_map() {
let size: [u8; 4] = unsafe { mem::transmute(1u32.to_be()) };
let b: [u8; 28] = [
0x48,
0x02,
size[0],
size[1],
size[2],
size[3],
0x06,
7,
b'f',
... | rust_cleaned_test_functions.jsonl/128473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1008
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
5376,
368,
341,
286,
1077,
1379,
25,
508,
84,
23,
26,
220,
19,
60,
284,
19860,
314,
1833,
486,
1458,
52214,
7,
16,
84,
18,
17,
2389,
21263,
2140,
2605,
286,
1077,
293,
25,
508,
84,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut p = Parser::new();
assert_eq!(p.key("\"GřáƥèƒřúïÆ\"").1, Done("", "\"GřáƥèƒřúïÆ\""));
p = Parser::new();
assert_eq!(p.key("_is-key").1, Done("", "_is-key"));
} | rust_cleaned_test_functions.jsonl/27421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
368,
341,
262,
1077,
5206,
281,
284,
21102,
486,
931,
543,
262,
2060,
10714,
10297,
79,
4735,
38915,
38,
144044,
16109,
18791,
39832,
144839,
81093,
18791,
75005,
144839,
527,
144044,
16109,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ramdisk_with_large_block_size_returns_error() {
ramdevice_client::wait_for_device(
"/dev/sys/platform/00:00:2d/ramctl",
std::time::Duration::from_secs(30),
)
.expect("ramctl did not appear");
let ramdisk =
RamdiskClient::create(... | rust_cleaned_test_functions.jsonl/107009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62124,
30496,
6615,
45228,
7113,
2368,
58900,
4096,
368,
341,
286,
17823,
6111,
8179,
486,
11489,
5478,
9204,
1006,
310,
3521,
3583,
41836,
27294,
14,
15,
15,
25,
15,
15,
25,
17,
67,
14,
2396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_atoibm_and_ucase_conv_spec_test() {
new_ucmd!()
.args(&["conv=ibm,ucase"])
.pipe_in_fixture("seq-byte-values-b632a992d3aed5d8d1a59cc5a5a455ba.test")
.succeeds()
.stdout_is_fixture_bytes("lcase-ibm.test");
} | rust_cleaned_test_functions.jsonl/99854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
78,
579,
76,
8378,
68887,
519,
22716,
13594,
4452,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12027,
28,
579,
76,
11,
1754,
519,
14108,
286,
659,
13768,
1243,
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_preboot_get_balloon_config() {
let req = VmmAction::GetBalloonConfig;
let expected_cfg = BalloonDeviceConfig::default();
check_preboot_request(req, |result, _| {
assert_eq!(result, Ok(VmmData::BalloonConfig(expected_cfg)))
});
} | rust_cleaned_test_functions.jsonl/44528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
4619,
3062,
56441,
31335,
5332,
368,
341,
286,
1077,
4232,
284,
647,
3821,
2512,
486,
1949,
37889,
31335,
2648,
280,
286,
1077,
3601,
18343,
284,
19420,
31335,
6985,
2648,
486,
2258,
543,
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_assert_pixels_eq_passes() {
let image = gray_image!(
00, 01, 02;
10, 11, 12);
assert_pixels_eq!(image, image);
} | rust_cleaned_test_functions.jsonl/4649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
49745,
10714,
15464,
288,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
15,
15,
11,
220,
15,
16,
11,
220,
15,
17,
280,
310,
220,
16,
15,
11,
220,
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 |
#[test]
fn test_fmt() {
let a = Wrapper(Dummy);
assert_eq!(&*format!("{:b}", a), "binary");
assert_eq!(&*format!("{:?}", a), "debug");
assert_eq!(&*format!("{}", a), "display");
assert_eq!(&*format!("{:e}", a), "lowerexp");
assert_eq!(&*format!("{:x}", a), "lowerhex");
assert_eq!(&*... | rust_cleaned_test_functions.jsonl/124343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38128,
368,
341,
262,
1077,
264,
284,
35488,
5432,
8574,
626,
262,
2060,
10714,
0,
2099,
9,
2243,
88928,
25,
65,
9545,
264,
701,
330,
25891,
797,
262,
2060,
10714,
0,
2099,
9,
2243,
88928,
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_style_variable_holder() {
const FORMAT_STR: &str = "($a [($b) $c](none $s)) $d [t]($t)";
let expected_variables = vec!["s", "t"].into_iter().map(String::from).collect();
let formatter = StringFormatter::new(FORMAT_STR).unwrap().map(empty_mapper);
let variables = ... | rust_cleaned_test_functions.jsonl/71893 | {
"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,
15117,
14635,
50788,
368,
341,
286,
733,
52225,
7159,
25,
609,
495,
284,
330,
699,
64,
508,
699,
65,
8,
400,
66,
9533,
6697,
400,
82,
593,
400,
67,
508,
83,
60,
699,
83,
24023,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vmerge() {
let c = TableCellProperty::new().vertical_merge(VMergeType::Continue);
let b = c.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:tcPr><w:vMerge w:val="continue" /></w:tcPr>"#
);
} | rust_cleaned_test_functions.jsonl/22961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
19052,
368,
341,
286,
1077,
272,
284,
84370,
3052,
486,
931,
1005,
15292,
20888,
7,
11187,
10080,
929,
486,
23526,
317,
286,
1077,
293,
284,
272,
13239,
543,
286,
2060,
10714,
33673,
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_get_raw_returns_most_recent_value_from_webcam() -> Result<(), Box<dyn Error>> {
let (als, webcam_tx) = setup();
webcam_tx.send(42)?;
webcam_tx.send(43)?;
webcam_tx.send(44)?;
assert_eq!(44, als.get_raw()?);
Ok(())
} | rust_cleaned_test_functions.jsonl/25976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
16067,
58900,
81416,
62361,
3142,
5673,
25960,
11599,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
320,
1127,
11,
25951,
17805,
8,
284,
6505,
1428,
286,
25951,
17805,
5219,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_paths() {
let tmp_dir = tempdir().unwrap();
// Test if passing paths to GLib and getting them back
// gives us useful results
let dir_1 = tmp_dir.path().join("abcd");
fs::create_dir(&dir_1).unwrap();
assert_eq!(crate::path_get_basename(&dir_1), Pa... | rust_cleaned_test_functions.jsonl/75836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 983
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24152,
368,
341,
286,
1077,
4174,
4334,
284,
2730,
3741,
1005,
15454,
1428,
286,
442,
3393,
421,
12299,
12716,
311,
5588,
579,
323,
3709,
1105,
1182,
198,
286,
442,
6696,
601,
5390,
3059,
198,
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_lock_unlock_header() {
let container = [0u8; constants::MIN_ORDER_SIZE];
let block = get_header(&container);
let header_bytes: [u8; 8] = [0x20, 0x00, 0x00, 0x00, 0x49, 0x4e, 0x53, 0x50];
// Can't unlock unlocked header.
assert!(block.unlock_header().is_err... | rust_cleaned_test_functions.jsonl/100149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
19465,
8757,
368,
341,
286,
1077,
5476,
284,
508,
15,
84,
23,
26,
18021,
486,
16413,
26677,
4098,
935,
286,
1077,
2504,
284,
633,
8757,
2099,
3586,
317,
286,
1077,
4247,
12524,
25,
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... | 3 |
#[test]
fn test_transform_with_suffix_on_input() {
new_ucmd!()
.args(&["--suffix=b", "--to=si"])
.pipe_in("2000b")
.succeeds()
.stdout_only("2.0Kb\n");
} | rust_cleaned_test_functions.jsonl/93649 | {
"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,
18449,
6615,
37151,
4470,
5898,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
313,
26786,
22086,
497,
14482,
983,
28,
6321,
14108,
286,
659,
13768,
1243,
445,
17,
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_long_overlap_1() {
DelayPlusPoolProblem {
input: vec![0.0, 0.0, 0.0],
pulse: 1,
delay: 0,
stride: 1,
pool_window: 3,
}
.run()
.unwrap()
} | rust_cleaned_test_functions.jsonl/125719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
65794,
62,
16,
368,
341,
262,
39793,
21807,
10551,
31198,
341,
286,
1946,
25,
7486,
20703,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
1259,
286,
27235,
25,
220,
16,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_borrow() {
let _ = u256([0, 1, 0, 0]) - u256([0, 0, 1, 0]);
} | rust_cleaned_test_functions.jsonl/13485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 53
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
880,
7768,
368,
341,
262,
1077,
716,
284,
575,
17,
20,
21,
2561,
15,
11,
220,
16,
11,
220,
15,
11,
220,
15,
2467,
481,
575,
17,
20,
21,
2561,
15,
11,
220,
15,
11,
220,
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 |
#[test]
fn test_bytewise_should_preserve_empty_line_and_final_newline() {
new_ucmd!()
.args(&["-w2", "-b"])
.pipe_in("12\n\n34\n")
.succeeds()
.stdout_is("12\n\n34\n");
} | rust_cleaned_test_functions.jsonl/23299 | {
"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,
3710,
83,
24350,
43378,
32116,
5852,
15124,
6528,
8378,
20676,
5921,
1056,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
86,
17,
497,
6523,
65,
14108,
286,
659,
13768,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_genesis() {
let (config, _genesis_key) = config_builder::test_config();
let (db, _executor) = create_db_and_executor(&config);
let (li, epoch_change_proof, _accumulator_consistency_proof) =
db.reader.get_state_proof(0).unwrap();
let trusted_state = TrustedState::from(co... | rust_cleaned_test_functions.jsonl/28484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
13774,
368,
341,
262,
1077,
320,
1676,
11,
716,
77894,
3097,
8,
284,
2193,
28532,
486,
1944,
5332,
543,
262,
1077,
320,
1999,
11,
716,
80787,
8,
284,
1855,
8685,
8378,
81207,
2099,
1676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_metalink() {
test_harness(|| unsafe {
library_init();
let session = get_session();
let metalink_path = "./tests/metalink4.xml";
let mut gids = vec![];
assert_eq!(
add_metalink(session, &mut gids, metalink_path, &vec![], -1),
... | rust_cleaned_test_functions.jsonl/25962 | {
"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,
2891,
717,
21323,
766,
368,
341,
262,
1273,
1523,
23518,
79453,
19860,
341,
286,
6733,
6137,
543,
286,
1077,
3797,
284,
633,
12316,
1428,
286,
1077,
9317,
766,
2638,
284,
5924,
23841,
3183,
21323,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_ticker() {
delay();
let client: Public<Sync> = Public::new(SANDBOX_URL);
let ticker = client.get_ticker("BTC-USD").unwrap();
let str = format!("{:?}", ticker);
dbg!(&str);
assert!(str.starts_with("Ticker { trade_id:"));
assert!(str.contains("time:"));
} | rust_cleaned_test_functions.jsonl/50633 | {
"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,
3062,
528,
5215,
368,
341,
262,
7626,
543,
262,
1077,
2943,
25,
3066,
27,
12154,
29,
284,
3066,
486,
931,
3759,
1093,
3506,
60155,
8000,
317,
262,
1077,
46987,
284,
2943,
670,
528,
5215,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lcg64_xor_1024mix_double() {
let mut prng = Lcg64Xor1024Mix::new();
for _ in 0..16 {
println!("{}", prng.next_double());
}
for _ in 0..16 {
assert_ne!(prng.next_double(), prng.next_double());
}
} | rust_cleaned_test_functions.jsonl/54524 | {
"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,
907,
27446,
21,
19,
76462,
62,
16,
15,
17,
19,
35071,
24598,
368,
341,
286,
1077,
5206,
548,
968,
284,
444,
27446,
21,
19,
55,
269,
16,
15,
17,
19,
58083,
486,
931,
543,
286,
369,
716,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_err_empty_str() {
let res = Decimal::<2>::from_str("");
assert!(res.is_err());
let err = res.unwrap_err();
assert_eq!(err, ParseDecimalError::Empty);
} | rust_cleaned_test_functions.jsonl/12023 | {
"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,
9266,
15124,
2895,
368,
341,
286,
1077,
592,
284,
26728,
27638,
17,
6831,
1499,
2895,
13056,
286,
2060,
10297,
416,
2079,
9266,
1423,
286,
1077,
1848,
284,
592,
55395,
9266,
543,
286,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_kokushi() {
assert_bot(
&[
M1, M2, M4, M5, M7, M8, M9, P1, P2, P4, P5, P7, P8, P9, S1, S2, S4, S5, S7, S8, S9,
X1, X1, X1, X1, X2, X2, X3, X3, X4, X4, X5, X5, X7,
],
M3,
X3,
);
} | rust_cleaned_test_functions.jsonl/77929 | {
"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,
4698,
562,
37074,
368,
341,
286,
2060,
38883,
1006,
310,
609,
9640,
394,
386,
16,
11,
386,
17,
11,
386,
19,
11,
386,
20,
11,
386,
22,
11,
386,
23,
11,
386,
24,
11,
393,
16,
11,
393,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_format_o_default() {
assert_eq!(
parse_format_flags_str(&["od", "--format=o"]).unwrap(),
vec![FORMAT_ITEM_OCT32]
);
} | rust_cleaned_test_functions.jsonl/78700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
8955,
14179,
9993,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
8955,
14130,
2895,
2099,
1183,
347,
497,
14482,
2243,
85876,
45014,
15454,
3148,
286,
7486,
20703,
46559,
16461,
2232,
1162,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_typedef_for_explicit_template_specialization() -> Result<()> {
let ir = ir_from_cc(
r#" #pragma clang lifetime_elision
template <typename T>
struct MyStruct final {};
// Doc comment for template specialization for T=int.
template<>
... | rust_cleaned_test_functions.jsonl/37172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42111,
4219,
5478,
14214,
6026,
8693,
41629,
2022,
368,
1464,
5714,
71698,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
435,
55543,
671,
6015,
18260,
19031,
21602,
1816,
271,
310,
3811,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_src_file_to_url_4() {
let (_temp_dir, deno_dir) = test_setup();
let x = deno_dir.deps_https.join("localhost_PORT4545/world.txt");
assert_eq!(
"https://localhost:4545/world.txt",
deno_dir.src_file_to_url(x.to_str().unwrap())
);
} | rust_cleaned_test_functions.jsonl/72751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16274,
2458,
2346,
2903,
62,
19,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
543,
262,
1077,
856,
284,
3371,
78,
4334,
2285,
1690,
26817,
5446,
445,
8301,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_link_verify_and_trim() {
let string = verify_and_trim("> some string <", (b'>', b'<'));
assert_eq!(string.ok(), Some("some string"));
let err = verify_and_trim(" > some string <", (b'>', b'<'));
assert_eq!(err.is_err(), true);
} | rust_cleaned_test_functions.jsonl/46354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
35638,
8378,
70025,
368,
341,
286,
1077,
914,
284,
10146,
8378,
70025,
63853,
220,
1045,
914,
256,
98388,
320,
65,
6270,
516,
293,
21524,
6336,
286,
2060,
10714,
10297,
917,
18165,
1507,
432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_operators() {
let source = "//////=/ /";
let tokens = lex_source(source);
assert_eq!(
tokens,
vec![
Tok::DoubleSlash,
Tok::DoubleSlash,
Tok::DoubleSlashEqual,
Tok::Slash,
... | rust_cleaned_test_functions.jsonl/95231 | {
"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,
25634,
2973,
368,
341,
286,
1077,
2530,
284,
330,
725,
322,
23286,
608,
876,
286,
1077,
11211,
284,
22429,
10347,
12437,
317,
286,
2060,
10714,
33673,
310,
11211,
345,
310,
7486,
90515,
394,
21447... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eh_frame_fde_lsda_function_relative() {
let instrs = [1, 2, 3, 4];
let cie_offset = 1;
let mut cie = make_test_cie();
cie.format = Format::Dwarf32;
cie.version = 1;
cie.augmentation = Some(Augmentation::default());
cie.augmentation.as_mut(... | rust_cleaned_test_functions.jsonl/9398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 836
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
761,
450,
53174,
3235,
9174,
29286,
368,
341,
286,
1077,
9491,
82,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
272,
645,
6917,
284,
220,
16,
401,
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_example_1() {
let launch = Vector::new(Position::origin(), 7, 2);
let target = Rectangle::new(20, 30, -10, -5);
let arc = hit_arc(&launch, &target);
assert_eq!(true, arc.is_some());
assert_eq!(Position::new(28, -7), arc.unwrap().last().unwrap().pos);
... | rust_cleaned_test_functions.jsonl/124101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
62,
16,
368,
341,
286,
1077,
7050,
284,
4196,
486,
931,
61843,
486,
8611,
1507,
220,
22,
11,
220,
17,
626,
286,
1077,
2169,
284,
19280,
486,
931,
7,
17,
15,
11,
220,
18,
15,
11,
481... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_virtio_write_config() {
let mut block = default_block();
let expected_config_space: [u8; CONFIG_SPACE_SIZE] =
[0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
block.write_config(0, &expected_config_space);
let mut actual_config_space = [0u8; CONFIG_... | rust_cleaned_test_functions.jsonl/76935 | {
"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,
2273,
2106,
815,
9165,
5332,
368,
341,
286,
1077,
5206,
2504,
284,
1638,
7113,
1428,
286,
1077,
3601,
5332,
14663,
25,
508,
84,
23,
26,
13202,
38404,
4098,
60,
4035,
310,
508,
15,
87,
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_b() {
let oxy = solve_b(&input(), Rating::Oxygen, 5);
let co2 = solve_b(&input(), Rating::Co2, 5);
assert_eq!((oxy, co2), (10, 23));
} | rust_cleaned_test_functions.jsonl/32786 | {
"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,
880,
368,
341,
286,
1077,
98590,
284,
11625,
880,
2099,
1355,
1507,
19216,
486,
46,
18936,
11,
220,
20,
317,
286,
1077,
1062,
17,
284,
11625,
880,
2099,
1355,
1507,
19216,
486,
7339,
17,
11,
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_find() {
let skm = make_skipmap();
assert_eq!(
skm.map
.borrow()
.get_greater_or_equal(&"abf".as_bytes().to_vec())
.unwrap()
.key,
"abf".as_bytes().to_vec()
);
assert!(skm
... | rust_cleaned_test_functions.jsonl/89153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
368,
341,
286,
1077,
1901,
76,
284,
1281,
44830,
2186,
543,
286,
2060,
10714,
33673,
310,
1901,
76,
4770,
198,
394,
659,
71141,
741,
394,
659,
455,
97994,
8734,
11478,
2099,
1,
370,
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... | 1 |
#[test]
fn test_map() {
use std::collections::HashMap;
let mut map = HashMap::new();
map.insert((true, false), 4);
map.insert((false, false), 123);
let s = to_string(&map).unwrap();
s.starts_with("{");
s.contains("(true,false):4");
s.contains("(f... | rust_cleaned_test_functions.jsonl/2822 | {
"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,
5376,
368,
341,
286,
990,
1460,
486,
51137,
486,
18497,
401,
286,
1077,
5206,
2415,
284,
10528,
486,
931,
543,
286,
2415,
7030,
1188,
1866,
11,
895,
701,
220,
19,
317,
286,
2415,
7030,
1188,
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_epoch_slots_uncompressed_add_1() {
let mut slots = Uncompressed::new(1);
assert_eq!(slots.slots.capacity(), 8);
assert_eq!(slots.add(&[1]), 1);
assert_eq!(slots.to_slots(1), vec![1]);
assert!(slots.to_slots(2).is_empty());
} | rust_cleaned_test_functions.jsonl/116093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20682,
54161,
4907,
45703,
2891,
62,
16,
368,
341,
286,
1077,
5206,
15711,
284,
1230,
45703,
486,
931,
7,
16,
317,
286,
2060,
10714,
10297,
49767,
25101,
2412,
59168,
1507,
220,
23,
317,
286,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_forced_checkout_locally_modified_tree() -> BitResult<()> {
BitRepo::with_sample_repo(|repo| {
touch!(repo: "dir/bar.l" < "modified");
bit_checkout!(repo: --force "master")?;
assert_eq!(cat!(repo: "dir/bar.l"), "");
Ok(())
})
} | rust_cleaned_test_functions.jsonl/62994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
1998,
68186,
13400,
745,
37749,
11663,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
17491,
37784,
22428,
23476,
91,
341,
286,
5796,
10297,
23476,
25,
330,
3741,
49513,
918,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_register_gauge_trailing_comma() {
let opts = opts!("test_macro_gauge", "help",);
let res1 = register_gauge!(opts,);
assert!(res1.is_ok());
let res2 = register_gauge!("test_macro_gauge_2", "help",);
assert!(res2.is_ok());
} | rust_cleaned_test_functions.jsonl/86369 | {
"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,
14000,
1889,
19392,
3547,
14277,
2965,
1728,
368,
341,
262,
1077,
12185,
284,
12185,
17223,
1944,
58810,
1889,
19392,
497,
330,
8653,
497,
317,
262,
1077,
592,
16,
284,
4161,
1889,
19392,
10297,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aloha_locking() {
let dir = TempDir::new("segment_dir").unwrap();
let segment1 = build_segment_1(dir.path());
let segment2 = build_segment_2(dir.path());
let mut holder = SegmentHolder::default();
let sid1 = holder.add(segment1);
let sid2 = hold... | rust_cleaned_test_functions.jsonl/115811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8418,
65083,
9818,
287,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
23169,
4334,
1827,
15454,
1428,
286,
1077,
10238,
16,
284,
1936,
28061,
62,
16,
14161,
3875,
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... | 2 |
#[test]
fn test_execute_select() {
let db = checked_memory_handle();
let err = db.execute("SELECT 1 WHERE 1 < ?", &[1i32]).unwrap_err();
if err != Error::ExecuteReturnedResults {
panic!("Unexpected error: {}", err);
}
} | rust_cleaned_test_functions.jsonl/25505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
13051,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
1077,
1848,
284,
2927,
7769,
445,
4858,
220,
16,
5288,
220,
16,
366,
42313,
44590,
16,
72,
18,
17,
10697,
15454,
9266... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_decode_teq_reg_w() {
assert_eq!(
decode_32(0xea910f03),
Instruction::TEQ_reg {
params: Reg2ShiftNoSetFlagsParams {
rn: Reg::R1,
rm: Reg::R3,
shift_t: SRType::LSL,
shift_n: 0
}
... | rust_cleaned_test_functions.jsonl/64857 | {
"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,
15227,
528,
11006,
4920,
1670,
368,
341,
14808,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
56570,
24,
16,
15,
69,
15,
18,
1326,
286,
29051,
486,
2446,
48,
4920,
341,
310,
3628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_brace_escape() {
maybe_install_handler().unwrap();
let err = eyre!("unterminated ${{..}} expression");
assert_eq!("unterminated ${..} expression", err.to_string());
} | rust_cleaned_test_functions.jsonl/111497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17682,
578,
21832,
368,
341,
262,
7196,
34245,
10183,
1005,
15454,
1428,
262,
1077,
1848,
284,
3912,
265,
17223,
359,
68659,
400,
2979,
496,
3417,
7493,
797,
262,
2060,
10714,
17223,
359,
68659,
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 |
#[test]
fn test_wrong_calling_convention() {
let isa = lookup(triple!("x86_64"))
.expect("expect x86 ISA")
.finish(Flags::new(builder()));
let mut context = Context::for_function(create_function(CallConv::SystemV, None));
context.compile(&*isa).expect("expected ... | rust_cleaned_test_functions.jsonl/10563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
13429,
287,
3382,
7459,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_fail_2() {
#[derive(Debug, Clone, Copy, RpnFunction)]
#[rpn_function(args = 1)]
struct FnFoo;
impl FnFoo {
fn call(
_ctx: &mut EvalContext,
_payload: RpnFnCallPayload<'_>,
v: &Option<f64>,
... | rust_cleaned_test_functions.jsonl/111593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
22121,
62,
17,
368,
341,
1789,
286,
11506,
27098,
42618,
11,
27913,
11,
14540,
11,
431,
19958,
5152,
5563,
286,
11506,
81,
19958,
9174,
7356,
284,
220,
16,
5563,
286,
2036,
50182,
40923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_response_file() {
assert_eq!(CompilerArguments::CannotCache("@", None),
_parse_arguments(&stringvec!["-c", "foo.c", "@foo", "-o", "foo.o"]));
assert_eq!(CompilerArguments::CannotCache("@", None),
_parse_arguments(&stringvec!["... | rust_cleaned_test_functions.jsonl/15026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
9655,
2458,
368,
341,
286,
2060,
10714,
10297,
38406,
19139,
486,
17444,
8233,
10662,
497,
2240,
1326,
4293,
716,
6400,
43433,
2099,
917,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_part2_e() {
let input =
"#########
#G......#
#.E.#...#
#..##..G#
#...##..#
#...#...#
#.G...G.#
#.....G.#
#########";
assert_eq!(part2(&as_input(input)), 1140);
... | rust_cleaned_test_functions.jsonl/13281 | {
"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,
10495,
17,
2204,
368,
341,
286,
1077,
1946,
4035,
310,
330,
1357,
4956,
1797,
671,
38,
28149,
4956,
1797,
671,
13,
36,
43326,
1112,
4956,
1797,
671,
496,
565,
496,
38,
4956,
1797,
671,
1112,
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_merge_lrs_different_leader() {
let mut target = PartitionStatus::new((5000, 100, 110), vec![(5001, 95, 110).into()]);
let source = PartitionStatus::new((5001, 120, 120), vec![(5000, -1, -1).into()]);
target.merge(source);
assert_eq!(target.leader, (5001, 120, 1... | rust_cleaned_test_functions.jsonl/106844 | {
"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,
20888,
907,
5428,
82741,
79991,
368,
341,
286,
1077,
5206,
2169,
284,
54626,
2522,
486,
931,
1188,
20,
15,
15,
15,
11,
220,
16,
15,
15,
11,
220,
16,
16,
15,
701,
7486,
0,
9697,
20,
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_neuron_merge_follow() {
fn icp(amount: u64) -> u64 {
amount * 100_000_000
}
let n1_stake = icp(1);
let n2_stake = icp(10);
let n3_stake = icp(10);
let mut nns = NNSBuilder::new()
.set_economics(NetworkEconomics::with_default_values())
.with_suppl... | rust_cleaned_test_functions.jsonl/42935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13925,
36090,
20888,
43490,
368,
341,
262,
5168,
17902,
79,
33989,
25,
575,
21,
19,
8,
1464,
575,
21,
19,
341,
286,
3311,
353,
220,
16,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
198,
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_dead_fork_entry_deserialize_failure() {
// Insert entry that causes deserialization failure
let res = check_dead_fork(|_, bank| {
let gibberish = [0xa5u8; PACKET_DATA_SIZE];
let mut data_header = DataShredHeader::default();
data_header.flags |=... | rust_cleaned_test_functions.jsonl/25810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 711
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53427,
761,
669,
9078,
15768,
9050,
43618,
368,
341,
286,
442,
17101,
4343,
429,
11137,
939,
50563,
7901,
198,
286,
1077,
592,
284,
1779,
53427,
761,
669,
22428,
6878,
6073,
91,
341,
310,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gte() {
let a: Array = [0, 1, 2][..].into();
let b: Array = [1][..].into();
assert_eq!(a.gte(&b), [false, true, true][..].into());
assert_eq!(a.gte_const(Number::from(1)), [false, true, true][..].into());
} | rust_cleaned_test_functions.jsonl/45226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
665,
368,
341,
286,
1077,
264,
25,
2910,
284,
508,
15,
11,
220,
16,
11,
220,
17,
1457,
496,
936,
18122,
543,
286,
1077,
293,
25,
2910,
284,
508,
16,
1457,
496,
936,
18122,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_in_memory_io() {
let input: &[u8] = b"50 8";
let mut scan = Scanner::new(input);
let mut out = vec![];
solve(&mut scan, &mut out);
assert_eq!(out, b"50 - 8 = 42\n");
} | rust_cleaned_test_functions.jsonl/129557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
19195,
16939,
368,
341,
286,
1077,
1946,
25,
44590,
84,
23,
60,
284,
293,
1,
20,
15,
220,
23,
876,
286,
1077,
5206,
8569,
284,
17170,
486,
931,
5384,
317,
286,
1077,
5206,
700,
284,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reset_current() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(2);
... | rust_cleaned_test_functions.jsonl/106269 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 631
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18983,
11080,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
50704,
2638,
340,
394,
659,
17119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_characteristic_number() {
assert_eq!(find_characteristic_number("Device Name"), Some(CHARACTERISTIC_NUMBERS[0]));
assert_eq!(find_characteristic_number("aPPEARANCE"), Some(CHARACTERISTIC_NUMBERS[1]));
assert_eq!(find_characteristic_number("fake characteristic name"),... | rust_cleaned_test_functions.jsonl/46713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
40988,
4532,
5500,
368,
341,
286,
2060,
10714,
10297,
3903,
40988,
4532,
5500,
445,
6985,
3988,
3975,
4329,
7,
15237,
37397,
82556,
9631,
44116,
58,
15,
14382,
286,
2060,
10714,
10297,
3903,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_phishtank_client() {
let client = PhishtankClient::new("someapikey");
assert_eq!(client.api_key, "someapikey");
assert_eq!(client.data_endpoint, "https://data.phishtank.com/data");
assert_eq!(
client.check_endpoint,
"https://checkurl.phisht... | rust_cleaned_test_functions.jsonl/21338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9782,
285,
426,
1180,
8179,
368,
341,
286,
1077,
2943,
284,
2350,
285,
426,
1180,
2959,
486,
931,
445,
14689,
72174,
797,
286,
2060,
10714,
10297,
2972,
6183,
3097,
11,
330,
14689,
72174,
797,
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_empty_df_hstack() -> Result<()> {
let mut base = df!(
"a" => [1, 2, 3],
"b" => [1, 2, 3]
)?;
let mut df = base.slice(0, 0);
let out = df.with_column(Series::new("c", [1]))?;
assert_eq!(out.shape(), (0, 3));
assert!... | rust_cleaned_test_functions.jsonl/103189 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
10894,
1523,
7693,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
2331,
284,
6764,
33673,
310,
330,
64,
1,
589,
508,
16,
11,
220,
17,
11,
220,
18,
1259,
310,
330,
65,
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... | 4 |
#[test]
fn test_debug_clone_partialeq() {
let backend = Backend::new(0_usize);
// Test Debug trait
assert_eq!(format!("{:?}", backend), "Backend { number_qubits: 0 }");
// Test Clone trait
assert_eq!(backend.clone(), backend);
// PartialEq
let backend_0 = Backend::new(0_usize);
... | rust_cleaned_test_functions.jsonl/13554 | {
"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,
15446,
54742,
10495,
19893,
80,
368,
341,
262,
1077,
19163,
284,
55260,
486,
931,
7,
15,
11306,
551,
626,
262,
442,
3393,
11091,
17567,
198,
262,
2060,
10714,
10297,
2243,
88928,
25,
52652,
19163,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compression() {
let bytes = include_bytes!("../../test_data/sign/psbt_bip.json");
let (psbt_ser, _) = extract_psbt(bytes);
let mut e = ZlibEncoder::new(Vec::new(), Compression::best());
e.write_all(&psbt_ser).unwrap();
let compressed_bytes = e.finish().unw... | rust_cleaned_test_functions.jsonl/129314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
4011,
368,
341,
286,
1077,
5820,
284,
2924,
12524,
17223,
2748,
1944,
1769,
35763,
14,
1690,
12755,
880,
573,
4323,
797,
286,
1077,
320,
1690,
12755,
75861,
11,
27439,
284,
8649,
26047,
1275... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zmq_unencrypted() {
let inet1 = IpAddr::from_str("127.0.0.1").unwrap();
let inet2 = IpAddr::from_str("127.0.0.2").unwrap();
let locator1 =
PartialNodeAddr::ZmqTcpUnencrypted(ZmqType::Push, inet1, None);
let locator2 =
PartialNodeAddr::ZmqTc... | rust_cleaned_test_functions.jsonl/117290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1065
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
27674,
4907,
36444,
368,
341,
286,
1077,
49476,
16,
284,
35033,
13986,
486,
1499,
2895,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
1827,
15454,
543,
286,
1077,
49476,
17,
284,
35033,
13986... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sync_list_v1() -> anyhow::Result<()> {
env_logger::builder().is_test(true).try_init().ok();
#[derive(Debug, Default)]
struct FakeHttpCaller {
counter: AtomicUsize,
}
impl HttpCaller for FakeHttpCaller {
fn call(&self, request: &mu... | rust_cleaned_test_functions.jsonl/61338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23008,
2019,
2273,
16,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
6105,
27413,
486,
17850,
1005,
285,
4452,
3715,
568,
1539,
6137,
1005,
562,
1428,
286,
11506,
27098,
42618,
11,
7899,
5563,
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_strict_mode_dup_func_parameters() {
// Checks that a function cannot contain duplicate parameter
let scenario = r#"
'use strict';
function f(a, b, b) {}
"#;
let mut context = Context::new();
let string = dbg!(forward(&mut context, scenario));
assert!(stri... | rust_cleaned_test_functions.jsonl/39567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
849,
7302,
51932,
9596,
18263,
368,
341,
262,
442,
24843,
429,
264,
729,
4157,
6644,
22513,
5733,
87079,
262,
1077,
15048,
284,
435,
2,
698,
262,
364,
810,
7304,
1010,
262,
729,
282,
2877,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pause_bg_work() {
let path = TempDir::new("_rust_rocksdb_pause_bg_work").expect("");
let db = DB::open_default(path.path().to_str().unwrap()).unwrap();
let db = Arc::new(db);
let db1 = db.clone();
let builder = thread::Builder::new().name(String::from("put... | rust_cleaned_test_functions.jsonl/99618 | {
"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,
59989,
23122,
11498,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
35788,
26608,
14553,
1999,
59989,
23122,
11498,
1827,
17119,
13056,
286,
1077,
2927,
284,
5952,
486,
2508,
9993,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_join_doesnt_flatten() {
let schema = prepopulated_schema();
let known = Known::for_schema(&schema);
let query = r#"[:find ?x
:where [?x :foo/knows ?y]
(or-join [?x] [?x :foo/parent ?y])]"#;
let cc = al... | rust_cleaned_test_functions.jsonl/44229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 798
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14832,
8734,
31017,
96374,
406,
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,
3239,
284,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create() {
let (process, port) = named_process();
let socket = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1)), port);
let conn = UdpClientConnection::new(socket).unwrap();
let client = create_sig0_ready_client(conn);
let origin = Name::from_str("example.com.").unwra... | rust_cleaned_test_functions.jsonl/96283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 623
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
368,
341,
262,
1077,
320,
4630,
11,
2635,
8,
284,
6941,
11305,
543,
262,
1077,
7575,
284,
20954,
13986,
486,
931,
8972,
79,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_operator() {
equal_tokens! {
<nodes>
">" -> b::token_list(vec![b::op(">")])
}
equal_tokens! {
<nodes>
">=" -> b::token_list(vec![b::op(">=")])
}
equal_tokens! {
<nodes>
"<" -> b::tok... | rust_cleaned_test_functions.jsonl/5857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40594,
368,
341,
286,
6144,
28838,
0,
341,
310,
366,
20008,
397,
310,
90013,
1464,
293,
486,
5839,
2019,
25592,
20703,
65,
486,
453,
63853,
899,
2546,
286,
555,
286,
6144,
28838,
0,
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_from_cow_str() {
assert_eq!(
TinyString::<[u8; 16]>::from(Cow::Borrowed("string")),
"string"
);
assert_eq!(
TinyString::<[u8; 16]>::from(Cow::Owned(String::from("string"))),
"string"
);
} | rust_cleaned_test_functions.jsonl/3620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
666,
363,
2895,
368,
341,
6948,
10714,
33673,
197,
10261,
6441,
703,
27638,
58,
84,
23,
26,
220,
16,
21,
60,
6831,
1499,
3025,
363,
486,
33,
7768,
291,
445,
917,
30154,
197,
197,
1,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_memory_read_and_write_byte() {
// given
let mem: &mut dyn Memory = &mut vec![];
mem.resize(32);
// when
mem.write_byte(U256::from(0x1d), U256::from(0xab));
mem.write_byte(U256::from(0x1e), U256::from(0xcd));
mem.write_byte(U256::from(0x1f), U256::from(0xef));
// then
assert_e... | rust_cleaned_test_functions.jsonl/18677 | {
"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,
19195,
6443,
8378,
9165,
19737,
368,
341,
197,
197,
322,
2661,
198,
197,
10217,
1833,
25,
609,
6984,
31070,
13850,
284,
609,
6984,
7486,
0,
15078,
197,
14145,
17382,
7,
18,
17,
626,
197,
197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_right_binary() {
let cases = vec![
(
Datum::Bytes(b"hello".to_vec()),
Datum::I64(-1),
Datum::Bytes(b"".to_vec()),
),
(
Datum::Bytes(b"hello".to_vec()),
Datum::I64(0),
... | rust_cleaned_test_functions.jsonl/9128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 922
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10539,
31761,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
68459,
486,
7078,
1883,
1,
14990,
3263,
983,
13251,
14702,
394,
68459,
486,
40,
21,
19,
4080,
16,
1326,
394,
68459,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_bbox2_max_extent() {
let bbox = BBox2::new(Point2::new(1, 0), Point2::new(0, 10));
assert!(bbox.max_extent() == 1);
let bbox = BBox2::new(Point2::new(100, 0), Point2::new(0, 10));
assert!(bbox.max_extent() == 0);
} | rust_cleaned_test_functions.jsonl/133235 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59390,
17,
6345,
70102,
368,
341,
286,
1077,
29749,
284,
425,
1611,
17,
486,
931,
32737,
17,
486,
931,
7,
16,
11,
220,
15,
701,
5126,
17,
486,
931,
7,
15,
11,
220,
16,
15,
1106,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_expr_without_name_matches() -> Result<()> {
set_rustflags();
let expr = FilteringExpr::parse(
"test(test_multiply_two) | test(=tests::call_dylib_add_two)",
&*PACKAGE_GRAPH,
)
.expect("filter expression is valid");
let test_filter =
TestFilterB... | rust_cleaned_test_functions.jsonl/118816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
21915,
39904,
1269,
38344,
368,
1464,
5714,
71698,
341,
262,
738,
1710,
590,
11161,
1428,
262,
1077,
15169,
284,
81531,
16041,
486,
6400,
1006,
286,
330,
1944,
8623,
93054,
23241,
8,
760,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_new() {
let mut context = get_context(3_600_000_000_000, false);
testing_env!(context.clone());
let contract = Place::new();
context.is_view = true;
testing_env!(context.clone());
assert_eq!(contract.get_pixel_cost().0, PIXEL_COST);
assert... | rust_cleaned_test_functions.jsonl/79117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
1077,
5206,
2266,
284,
633,
8467,
7,
18,
62,
21,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
11,
895,
317,
286,
7497,
15879,
10297,
2147,
15997,
1423,
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_stable_compatibility() {
if env::var_os("FORCE_STATIC").is_none() && fs::metadata(STATIC_PATH).is_err() {
// run if static files aren't present unless we know they should be.
return;
}
// Ensure we can parse all output from all Linux ... | rust_cleaned_test_functions.jsonl/79906 | {
"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,
1261,
480,
2965,
53053,
368,
341,
286,
421,
6105,
486,
947,
29387,
445,
80205,
31352,
1827,
285,
31488,
368,
1009,
8619,
486,
17637,
7,
40881,
7944,
568,
285,
9266,
368,
341,
3374,
310,
442,
159... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cpu() {
let mut m = MockMachine {
cpu: Cpu::new(),
bus: MockBus { addr: 0, value: 0 },
symtab: symtab::Symtab::prepopulated(),
};
for i in 0..32 {
assert_eq!(m.cpu.regs[i], 0);
}
m.exec("(nop)");
for i in 0..32 {
asser... | rust_cleaned_test_functions.jsonl/9272 | {
"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,
21795,
368,
1476,
262,
1077,
5206,
296,
284,
14563,
21605,
341,
286,
17319,
25,
356,
5584,
486,
931,
3148,
286,
5828,
25,
14563,
15073,
314,
10789,
25,
220,
15,
11,
897,
25,
220,
15,
1153,
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_substitute_lambdas() {
// [x -> s]x = s
let exp = parse(&lexpr::from_str("x").unwrap()).unwrap();
let match_exp = "x";
let replace_with = parse(&lexpr::from_str("s").unwrap()).unwrap();
let expected = parse(&lexpr::from_str("s").unwrap()).unwrap();
... | rust_cleaned_test_functions.jsonl/62139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
7660,
907,
2969,
34889,
368,
341,
286,
442,
508,
87,
1464,
274,
60,
87,
284,
274,
198,
286,
1077,
1343,
284,
4715,
2099,
2571,
649,
486,
1499,
2895,
445,
87,
1827,
15454,
6011,
15454,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stream_lookup_faulty() {
let spec = "input a: UInt8\n output b: Float64 := a";
assert_eq!(1, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
27464,
70097,
88,
368,
341,
286,
1077,
1398,
284,
330,
1355,
264,
25,
22275,
23,
1699,
2550,
293,
25,
13001,
21,
19,
1669,
264,
876,
286,
2060,
10714,
10297,
16,
11,
1629,
1819,
20196,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_file_pattern_match() {
let patts = ["README.md", "*.iml", ".packages"];
assert_eq!(file_pattern_match("test.iml", &patts), true);
assert_eq!(file_pattern_match("test.txt", &patts), false);
assert_eq!(file_pattern_match("README.md", &patts), true);
assert_e... | rust_cleaned_test_functions.jsonl/49959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
21260,
10708,
368,
341,
286,
1077,
281,
20983,
284,
4383,
54675,
21324,
497,
59128,
318,
75,
497,
5933,
43141,
6332,
286,
2060,
10714,
10297,
1192,
21260,
10708,
445,
1944,
12053,
75,
497,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_message_rate_limiting() {
let bucket_size = 5;
let bucket_rate = 3;
let key = "Key";
let rate_limiter = TokenBucketRateLimiter::test(bucket_size, bucket_rate);
let bucket_arc = rate_limiter.bucket(key);
let mut bucket = bucket_arc.lock();
... | rust_cleaned_test_functions.jsonl/129419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
9246,
14763,
287,
368,
341,
286,
1077,
15621,
2368,
284,
220,
20,
280,
286,
1077,
15621,
9246,
284,
220,
18,
280,
286,
1077,
1376,
284,
330,
1592,
876,
286,
1077,
4379,
907,
17700,
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_transaction_updates_inspect() {
let inspector = fuchsia_inspect::Inspector::new();
let node = inspector.root().create_child("rewrite_manager");
let dynamic_config = make_rule_config(vec![]);
let mut manager =
RewriteManagerBuilder::new(Some(&dynamic_co... | rust_cleaned_test_functions.jsonl/46506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
57829,
34386,
987,
368,
341,
286,
1077,
44725,
284,
282,
73391,
34386,
987,
486,
46230,
486,
931,
543,
286,
1077,
2436,
284,
44725,
12576,
1005,
3182,
17268,
445,
52473,
12144,
797,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_latin1_to_utf16() {
let mut src: Vec<u8> = Vec::with_capacity(256);
src.resize(256, 0);
let mut reference: Vec<u16> = Vec::with_capacity(256);
reference.resize(256, 0);
for i in 0..256 {
src[i] = i as u8;
reference[i] = i as... | rust_cleaned_test_functions.jsonl/27311 | {
"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,
34910,
907,
14768,
16,
2346,
39453,
16,
21,
368,
341,
286,
1077,
5206,
2286,
25,
11312,
34837,
23,
29,
284,
11312,
486,
4197,
35603,
7,
17,
20,
21,
317,
286,
2286,
17382,
7,
17,
20,
21,
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_select_cert_alpn_extension() {
let mut server = Server::builder();
let alpn_extension = std::sync::Arc::new(std::sync::Mutex::new(None));
server.ctx().set_select_certificate_callback({
let alpn = alpn_extension.clone();
move |client_hello| {
*alpn.lock().u... | rust_cleaned_test_functions.jsonl/110813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
37097,
8418,
19958,
31035,
368,
341,
262,
1077,
5206,
3538,
284,
8422,
486,
17850,
543,
262,
1077,
452,
19958,
31035,
284,
1460,
486,
12996,
486,
36809,
486,
931,
5194,
486,
12996,
486,
380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.