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_update_new_slot() {
solana_logger::setup();
let key = Keypair::new();
let mut index = AccountsIndex::<bool>::default();
let ancestors = vec![(0, 0)].into_iter().collect();
let mut gc = Vec::new();
index.insert(0, &key.pubkey(), true, &mut gc);
... | rust_cleaned_test_functions.jsonl/20404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
5921,
27563,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_writer_append() {
let schema = Schema::from_str(SCHEMA).unwrap();
let mut writer = Writer::new(schema.clone(), Vec::new());
let mut record = Record::new(schema.top_node()).unwrap();
record.put("a", 27i64);
record.put("b", "foo");
let n1 = writer.... | rust_cleaned_test_functions.jsonl/43035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 828
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
26041,
368,
341,
286,
1077,
10802,
284,
12539,
486,
1499,
2895,
59461,
35839,
568,
15454,
543,
286,
1077,
5206,
6916,
284,
29404,
486,
931,
42735,
15997,
1507,
11312,
486,
931,
5231,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_command() {
let mut buffer = [0; 128];
let value = CommandBuilder::create_test(&mut buffer, true)
.named("+TEST")
.finish()
.unwrap();
assert_eq!(core::str::from_utf8(value).unwrap(), "AT+TEST=?\r\n");
} | rust_cleaned_test_functions.jsonl/116949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
368,
341,
286,
1077,
5206,
4147,
284,
508,
15,
26,
220,
16,
17,
23,
935,
286,
1077,
897,
284,
7348,
3297,
486,
3182,
4452,
2099,
6984,
4147,
11,
830,
340,
310,
659,
30245,
34973,
10033,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mount() {
let mut blobfs: FilesystemMock = FilesystemMock::new();
let result = match mount_filesystem(&mut blobfs) {
Ok(()) => true,
_ => false,
};
assert!(result);
assert!(blobfs.mount_called);
} | rust_cleaned_test_functions.jsonl/74757 | {
"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,
57593,
368,
341,
286,
1077,
5206,
23404,
3848,
25,
2887,
8948,
11571,
284,
2887,
8948,
11571,
486,
931,
543,
286,
1077,
1102,
284,
2432,
6470,
2458,
8948,
2099,
6984,
23404,
3848,
8,
341,
310,
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_merge_sorted_postinglist_sort_issue() {
create_test_index_posting_list_issue(Some(IndexSettings {
sort_by_field: Some(IndexSortByField {
field: "intval".to_string(),
order: Order::Desc,
}),
..Default::default()
}... | rust_cleaned_test_functions.jsonl/66288 | {
"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,
20888,
41277,
6333,
287,
1607,
18435,
53340,
368,
341,
286,
1855,
4452,
3560,
6333,
287,
2019,
53340,
65405,
45030,
6086,
341,
310,
3378,
3710,
5013,
25,
4329,
45030,
10231,
1359,
1877,
341,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_array() {
let data = [
0xe1, 0x2e, 0x01, 0x00, 0x03, 0x00, 0x0f, 0x00, 0x0a, 0x00, 0x41, 0x72, 0x74, 0x20,
0x6f, 0x66, 0x20, 0x57, 0x61, 0x72, 0x0f, 0x00, 0x14, 0x00, 0x43, 0x6f, 0x6e, 0x71,
0x75, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x50, ... | rust_cleaned_test_functions.jsonl/109412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 766
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
3858,
368,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
8371,
16,
11,
220,
15,
87,
17,
68,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
18,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_apply_unattributed_but_bound_TuringString_with_returned() {
let mut cc = ConjoiningGerunds::default();
let mut schemaReplicant = SchemaReplicant::default();
associate_causetId(&mut schemaReplicant, Keyword::namespaced("foo", "bar"), 99);
add_attribute(&mut schemaR... | rust_cleaned_test_functions.jsonl/32588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 917
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
4907,
44113,
2774,
86874,
19447,
1139,
1677,
703,
6615,
12511,
291,
368,
341,
286,
1077,
5206,
12527,
284,
1200,
65205,
65397,
42950,
486,
2258,
543,
286,
1077,
5206,
10802,
18327,
35237,
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_str_components() {
macro_rules! t(
(b: $arg:expr, $exp:expr) => (
{
let path = Path::new($arg);
let comps = path.str_components().collect::<Vec<Option<&str>>>();
let exp: &[Option<&str>] = $exp;
... | rust_cleaned_test_functions.jsonl/7699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
23258,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
65,
25,
400,
858,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
1815,
284,
7933,
486,
931,
699,
858,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_blob_url_simulated_dir() {
let url = "https://myaccount.blob.core.windows.net/mycontainer/mydir/myblob";
let url = into_urls(&[url]).remove(0);
let url = BlobUrl::new(url).expect("invalid blob URL");
assert_eq!(url.account(), Some("myaccount".into()));
a... | rust_cleaned_test_functions.jsonl/81898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45908,
2903,
18314,
7757,
4334,
368,
341,
286,
1077,
2515,
284,
330,
2428,
1110,
2408,
4608,
96281,
4871,
68113,
5071,
34198,
3586,
34198,
3741,
34198,
35112,
876,
286,
1077,
2515,
284,
1119,
32822,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_import_statement() {
expect_printed("import \"a\";", "import \"a\";\n");
expect_printed("import a from \"b\"", "import a from \"b\";\n");
expect_printed("import { a } from \"b\"", "import { a } from \"b\";\n");
expect_printed(
"import { a, b } from \"b\"",
"import... | rust_cleaned_test_functions.jsonl/93418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 537
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
37404,
368,
341,
262,
1720,
10064,
291,
445,
474,
7245,
64,
2105,
32503,
330,
474,
7245,
64,
2105,
17882,
77,
797,
262,
1720,
10064,
291,
445,
474,
264,
504,
7245,
65,
55853,
330,
474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_twin_double_fails() {
ExternalityBuilder::build().execute_with(|| {
create_twin();
let ip = "10.2.3.3";
assert_noop!(
TfgridModule::create_twin(Origin::signed(alice()), ip.as_bytes().to_vec()),
Error::<TestRuntime>::TwinWithPubkeyExists... | rust_cleaned_test_functions.jsonl/35354 | {
"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,
8657,
528,
7526,
24598,
761,
6209,
368,
341,
262,
1374,
4160,
2719,
3297,
486,
5834,
1005,
10257,
6615,
79453,
341,
286,
1855,
528,
7526,
1428,
286,
1077,
5997,
284,
330,
16,
15,
13,
17,
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... | 2 |
#[test]
fn test_position_at_time_other_direction() {
let motion = BiArcCurveMotion::new(
0.,
Isometry::from_parts(Translation::from(Vector3::new(0., 0., 0.)), UnitQuaternion::identity()),
Vector3::new(0., 0., 1.),
Unit::new_normalize(Vector3::new(1., 0., 0... | rust_cleaned_test_functions.jsonl/6604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 646
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9661,
3752,
3009,
30456,
25438,
368,
341,
286,
1077,
11379,
284,
12100,
36809,
31325,
40338,
486,
931,
1006,
310,
220,
15,
38088,
310,
2160,
6988,
486,
1499,
33217,
7,
24412,
486,
1499,
20258,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_program_subscribe() {
let GenesisBlockInfo {
genesis_block,
mint_keypair,
..
} = create_genesis_block(100);
let bank = Bank::new(&genesis_block);
let blockhash = bank.last_blockhash();
let bank_forks = Arc::new(RwL... | rust_cleaned_test_functions.jsonl/37727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1090
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
25096,
88935,
368,
341,
286,
1077,
40788,
4713,
1731,
341,
310,
59366,
7113,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
7113,
7,
16,
15,
15,
317,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_accessdenied() {
let raised: Result<(), GoogleJWTError> = Err(GoogleJWTError {
error: GoogleJWTErrorType::AccessDenied,
error_description: ACCESSDENIED_MSG.to_string(),
});
assert_eq!(raised.is_err(), true);
match raised {
Ok(_)... | rust_cleaned_test_functions.jsonl/24084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12759,
5183,
1122,
368,
341,
286,
1077,
9226,
25,
5714,
68843,
5085,
55172,
1454,
29,
284,
15495,
6699,
2671,
55172,
1454,
341,
310,
1465,
25,
5085,
55172,
1454,
929,
486,
6054,
54481,
345,
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... | 2 |
#[test]
fn test_solid_character_null() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-sz", "-c", "1", "--", "tr", "[:alnum:]", "@"])
.write_stdin("ABC\nDEF\n\0GHI\nJKL")
.assert()
.stdout("@BC\nDEF\n\0@HI\nJKL");
... | rust_cleaned_test_functions.jsonl/7917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
5192,
40988,
15162,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
2099,
1183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_guild_update() {
let cache = InMemoryCache::new();
let guild = Guild {
afk_channel_id: None,
afk_timeout: 0,
application_id: None,
approximate_member_count: None,
approximate_presence_count: None,
banner: Non... | rust_cleaned_test_functions.jsonl/88893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1846
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
1498,
8882,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
543,
286,
1077,
26411,
284,
32492,
341,
310,
7977,
74,
14571,
842,
25,
2240,
345,
310,
7977,
74,
20537,
25,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_qc() {
let runtime = consensus_runtime();
let (pm, mut new_round_events_receiver) = make_pacemaker(&runtime);
block_on(async move {
// Wait for the initial event for the first round.
expect_qc(1, &mut new_round_events_receiver).await;
pm.process_certif... | rust_cleaned_test_functions.jsonl/37899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
8976,
66,
368,
341,
262,
1077,
15592,
284,
23869,
33232,
543,
262,
1077,
320,
5187,
11,
5206,
501,
29896,
19691,
65691,
8,
284,
1281,
620,
580,
58675,
2099,
22255,
626,
262,
2504,
4470,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_request() {
let id = Uuid::new_v4();
let mut request = raft_cmdpb::ReadIndexRequest::default();
request.set_start_ts(10);
let mut locked = LockInfo::default();
locked.set_lock_version(5);
let ctx = ReadIndexContext {
id,
... | rust_cleaned_test_functions.jsonl/57413 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
7893,
368,
341,
286,
1077,
877,
284,
547,
2423,
486,
931,
2273,
19,
543,
286,
1077,
5206,
1681,
284,
52455,
11684,
16650,
486,
4418,
1552,
1900,
486,
2258,
543,
286,
1681,
980,
4906,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_local_dispatcher_broadcast_message() {
let handler = Box::new(CustomHandler::new(false));
let instance = Dispatcher::default().with_handler(handler.clone());
let (sender, _) = mpsc::unbounded();
let path = Arc::new(BastionPath::root());
const DATA: &str =... | rust_cleaned_test_functions.jsonl/21759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
92189,
74923,
6462,
368,
341,
286,
1077,
7013,
284,
8261,
486,
931,
3025,
1450,
3050,
486,
931,
3576,
1106,
286,
1077,
2867,
284,
58969,
486,
2258,
1005,
4197,
10183,
36514,
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_init_size() {
assert!(new_tester(None, 0));
assert!(new_tester(None, 65));
assert!(new_tester(None, 64));
assert!(new_tester(None, 1));
let sk = SecretKey::from_slice(&[0u8; 64]).unwrap();
assert!(new_tester(Some(&sk), 0));... | rust_cleaned_test_functions.jsonl/56748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
2368,
368,
341,
310,
2060,
10297,
931,
4452,
261,
26717,
11,
220,
15,
1106,
310,
2060,
10297,
931,
4452,
261,
26717,
11,
220,
21,
20,
1106,
310,
2060,
10297,
931,
4452,
261,
26717,
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_pause() {
let f = || {
fail_point!("pause");
};
f();
fail::cfg("pause", "pause").unwrap();
let (tx, rx) = mpsc::channel();
thread::spawn(move || {
// pause
tx.send(f()).unwrap();
tx.send(f()).unwrap();
tx.send(f()... | rust_cleaned_test_functions.jsonl/102082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59989,
368,
341,
262,
1077,
282,
284,
1369,
341,
286,
3690,
6085,
17223,
27448,
797,
262,
2605,
262,
282,
1428,
262,
3690,
486,
14072,
445,
27448,
497,
330,
27448,
1827,
15454,
543,
262,
1077,
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... | 3 |
#[test]
fn test_duration_as_string() {
test_none_with_ctx_and_extra(cast_any_as_string::<Duration>);
let cs = vec![
(
Duration::parse(b"17:51:04.78", 2).unwrap(),
"17:51:04.78".to_string().into_bytes(),
"17:51:04.78".to_string(),
... | rust_cleaned_test_functions.jsonl/101792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
11898,
3904,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
37248,
11898,
3904,
27638,
12945,
29,
626,
286,
1077,
10532,
284,
7486,
90515,
310,
2399,
394,
21045,
486,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_be() {
let mut rng = thread_rng();
let num: u128 = rng.gen();
let (my, test) = get_uints(num);
assert_eq!(test.to_be_bytes(), my.into_be_bytes());
} | rust_cleaned_test_functions.jsonl/6626 | {
"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,
21263,
368,
341,
286,
1077,
5206,
28422,
284,
4516,
66849,
543,
286,
1077,
1629,
25,
575,
16,
17,
23,
284,
28422,
22822,
543,
286,
1077,
320,
2408,
11,
1273,
8,
284,
633,
15807,
82,
8068,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bed() {
let builder = Builder::bed();
assert_eq!(builder.format, Format::Generic(CoordinateSystem::Bed));
assert_eq!(builder.reference_sequence_name_index, 1);
assert_eq!(builder.start_position_index, 2);
assert_eq!(builder.end_position_index, Some(3));
... | rust_cleaned_test_functions.jsonl/102499 | {
"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,
89079,
368,
341,
286,
1077,
7363,
284,
20626,
486,
2721,
543,
286,
2060,
10714,
10297,
17850,
8021,
11,
15042,
486,
19964,
3025,
78,
8730,
2320,
486,
15686,
1106,
286,
2060,
10714,
10297,
17850,
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_steps_between() {
assert_eq!(Step::steps_between(&20_u8, &200_u8), Some(180_usize));
assert_eq!(Step::steps_between(&-20_i8, &80_i8), Some(100_usize));
assert_eq!(Step::steps_between(&-120_i8, &80_i8), Some(200_usize));
assert_eq!(Step::steps_between(&20_u32, &4_000_100_u32), Som... | rust_cleaned_test_functions.jsonl/108057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22731,
48302,
368,
341,
262,
2060,
10714,
10297,
8304,
486,
24080,
48302,
2099,
17,
15,
7300,
23,
11,
609,
17,
15,
15,
7300,
23,
701,
4329,
7,
16,
23,
15,
11306,
551,
1106,
262,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_serialization() {
assert_eq!(json!(MediaType::JavaScript), json!("JavaScript"));
assert_eq!(json!(MediaType::Mjs), json!("Mjs"));
assert_eq!(json!(MediaType::Cjs), json!("Cjs"));
assert_eq!(json!(MediaType::Jsx), json!("JSX"));
assert_eq!(json!(MediaType::TypeScript), json!("... | rust_cleaned_test_functions.jsonl/53922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
2022,
368,
341,
262,
2060,
10714,
10297,
2236,
10297,
65000,
486,
29475,
701,
2951,
17223,
29475,
4010,
262,
2060,
10714,
10297,
2236,
10297,
65000,
486,
44,
2519,
701,
2951,
17223,
44,
2519,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_registration_from_yaml_file() -> Result<()> {
let registration = AppServiceRegistration::try_from_yaml_file("./tests/registration.yaml")?;
assert_eq!(registration.id, "appservice");
Ok(())
} | rust_cleaned_test_functions.jsonl/34973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49101,
5673,
64380,
2458,
368,
1464,
5714,
71698,
341,
286,
1077,
12227,
284,
1845,
1860,
23365,
486,
1539,
5673,
64380,
2458,
13988,
23841,
14,
25862,
33406,
899,
69493,
286,
2060,
10714,
10297,
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
] | 2 |
#[test]
fn test_7_4() {
let favourite = 10 as usize;
assert_eq!(11, get_shortest_route(&favourite, (7, 4), None).unwrap());
} | rust_cleaned_test_functions.jsonl/93853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
22,
62,
19,
368,
341,
286,
1077,
18696,
284,
220,
16,
15,
438,
22301,
401,
286,
2060,
10714,
10297,
16,
16,
11,
633,
16673,
477,
28109,
2099,
69,
51388,
11,
320,
22,
11,
220,
19,
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 |
#[test]
fn test_category() {
assert!(from_str::<String>("123").unwrap_err().is_data());
assert!(from_str::<String>("]").unwrap_err().is_syntax());
assert!(from_str::<String>("").unwrap_err().is_eof());
assert!(from_str::<String>("\"").unwrap_err().is_eof());
assert!(from_str::<String>("\"\... | rust_cleaned_test_functions.jsonl/29868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 795
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11847,
368,
341,
262,
2060,
10297,
1499,
2895,
27638,
703,
13211,
16,
17,
18,
1827,
15454,
9266,
1005,
285,
1769,
5231,
262,
2060,
10297,
1499,
2895,
27638,
703,
13211,
44891,
15454,
9266,
1005,
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_profile_data() {
let stream = {
let mut stream = Stream::default();
let t0 = stream.begin_scope(100, "top", "top.rs", "data_top");
let m1 = stream.begin_scope(200, "middle_0", "middle.rs", "data_middle_0");
stream.end_scope(m1, 300);
let m1 = stream.be... | rust_cleaned_test_functions.jsonl/7463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 860
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13789,
1769,
368,
341,
262,
1077,
4269,
284,
341,
286,
1077,
5206,
4269,
284,
9203,
486,
2258,
543,
286,
1077,
259,
15,
284,
4269,
6848,
23199,
7,
16,
15,
15,
11,
330,
3481,
497,
330,
3481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vector() -> Result<(), Box<dyn std::error::Error>> {
let lua = Lua::new();
let globals = lua.globals();
globals.set(
"vector",
lua.create_function(|_, (x, y, z)| Ok(Value::Vector(x, y, z)))?,
)?;
let val = lua.load("{_vector = vector(1, 2, 3)}").ev... | rust_cleaned_test_functions.jsonl/50703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
12247,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
20357,
284,
37662,
486,
931,
1428,
262,
1077,
37785,
284,
20357,
1302,
16616,
543,
262,
37785,
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... | 6 |
#[test]
fn test_stb() {
test_interpreter_and_jit_asm!(
"
stb [r1+2], 0x11
ldxb r0, [r1+2]
exit",
[0xaa, 0xbb, 0xff, 0xcc, 0xdd],
(),
{ |_vm, res: Result| { res.unwrap() == 0x11 } },
3
);
} | rust_cleaned_test_functions.jsonl/58993 | {
"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,
1261,
65,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
357,
65,
508,
81,
16,
10,
17,
1125,
220,
15,
87,
16,
16,
198,
286,
26129,
7929,
435,
15,
11,
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_read_conn_aborted() {
let pool = mocked!();
pool.connect("127.0.0.1", 3000, "http").unwrap();
let mut stream = pool.connect("127.0.0.1", 3000, "http").unwrap();
let err = stream.read(&mut [0]).unwrap_err();
assert_eq!(err.kind(), ::std::io::ErrorKind::Con... | rust_cleaned_test_functions.jsonl/53081 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
17241,
22885,
13595,
368,
341,
286,
1077,
7314,
284,
46149,
0,
1428,
286,
7314,
10800,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
497,
220,
18,
15,
15,
15,
11,
330,
1254,
1827,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interval_ym_add_sub_interval_ym() {
assert!(IntervalYM::try_from_ym(178000000, 0)
.unwrap()
.add_interval_ym(IntervalYM::try_from_ym(0, 1).unwrap())
.is_err());
assert!(IntervalYM::try_from_ym(178000000, 0)
.unwrap()
.s... | rust_cleaned_test_functions.jsonl/51037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 758
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20541,
62,
1600,
2891,
5228,
20541,
62,
1600,
368,
341,
286,
2060,
10297,
10256,
63787,
486,
1539,
5673,
62,
1600,
7,
16,
22,
23,
15,
15,
15,
15,
15,
15,
11,
220,
15,
340,
310,
659,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_should_preserve_final_newline_when_line_longer_than_fold() {
new_ucmd!()
.arg("-w2")
.pipe_in("1234\n")
.succeeds()
.stdout_is("12\n34\n");
} | rust_cleaned_test_functions.jsonl/23273 | {
"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,
43378,
32116,
5852,
20676,
5921,
1056,
47636,
6528,
17799,
261,
51613,
61187,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
86,
17,
1138,
286,
659,
13768,
1243,
445,
16,
17,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repair_with_repair_validators() {
let cluster_slots = ClusterSlots::default();
let me = ContactInfo::new_localhost(&analog_sdk::pubkey::new_rand(), timestamp());
let cluster_info = Arc::new(new_test_cluster_info(me.clone()));
// Insert two peers on the network
... | rust_cleaned_test_functions.jsonl/3910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
12670,
6615,
1288,
12670,
8337,
2973,
368,
341,
286,
1077,
10652,
54161,
284,
35380,
51647,
486,
2258,
543,
286,
1077,
752,
284,
9180,
1731,
486,
931,
62,
8301,
2099,
276,
30951,
61783,
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_matrix_swap_columns() {
let mut result = Matrix2x2::new(1, 2, 3, 4);
result.swap_columns(0, 1);
let expected = Matrix2x2::new(3, 4, 1, 2);
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/128984 | {
"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,
10193,
40991,
22590,
368,
341,
286,
1077,
5206,
1102,
284,
11631,
17,
87,
17,
486,
931,
7,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
317,
286,
1102,
54537,
22590,
7,
15,
11,
220,
16,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mv_rename_dir() {
let (at, mut ucmd) = at_and_ucmd!();
let dir1 = "test_mv_rename_dir";
let dir2 = "test_mv_rename_dir2";
at.mkdir(dir1);
ucmd.arg(dir1).arg(dir2).succeeds().no_stderr();
assert!(at.dir_exists(dir2));
} | rust_cleaned_test_functions.jsonl/41602 | {
"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,
73187,
79399,
4334,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
5419,
16,
284,
330,
1944,
73187,
79399,
4334,
876,
262,
1077,
5419,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_input_stream_must_support_read() {
let mut ctx = TestContext::new("");
let is = ctx.as_stream(
/*isatty=*/ true, /*support_read=*/ false, /*support_write=*/ false,
);
let os = ctx.as_stream(
/*isatty=*/ true, /*support_read=*/ false, /*support_write=*/ true,
)... | rust_cleaned_test_functions.jsonl/110976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
12673,
717,
590,
25827,
6443,
368,
341,
262,
1077,
5206,
5635,
284,
3393,
1972,
486,
931,
13056,
262,
1077,
374,
284,
5635,
5357,
12673,
1006,
286,
1391,
285,
22908,
81813,
830,
11,
1391,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_storage() {
let backend = make_local_backend(Path::new("/tmp/a"));
create_storage(&backend).unwrap();
let backend = make_noop_backend();
create_storage(&backend).unwrap();
let backend = StorageBackend::default();
assert!(create_storage(&ba... | rust_cleaned_test_functions.jsonl/33024 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
23310,
368,
341,
286,
1077,
19163,
284,
1281,
13564,
40011,
33030,
486,
931,
4283,
5173,
14186,
4010,
286,
1855,
23310,
2099,
20942,
568,
15454,
1428,
286,
1077,
19163,
284,
1281,
6536,
453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_format_user_activated_protocol_overrides() -> Result<(), failure::Error> {
let expected_json = serde_json::json!(
[
{
"replaced_protocol": "PsBABY5HQTSkA4297zNHfsZNKtxULfL18y95qb3m53QJiXGmrbU",
"replacement_protocol": "PsBabyM... | rust_cleaned_test_functions.jsonl/24461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
8955,
3317,
62,
30162,
34880,
15431,
18245,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
3601,
9455,
284,
61570,
9455,
486,
2236,
33673,
310,
2278,
1060,
341,
394,
330,
265,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_bitfield() {
let mut r = Reader::new();
r.state = State::Len;
let v = vec![0u8, 0, 0, 5, 5, 0xff, 0xff, 0xff, 0xff];
let mut data = Cursor::new(&v);
// Test one shot
match r.readable(&mut data).unwrap().unwrap() {
Message::Bitfield... | rust_cleaned_test_functions.jsonl/46449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
13996,
2566,
368,
341,
286,
1077,
5206,
435,
284,
25166,
486,
931,
543,
286,
435,
3467,
284,
3234,
486,
11271,
280,
286,
1077,
348,
284,
7486,
20703,
15,
84,
23,
11,
220,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_for_loop_with_specified_next_counter() {
let input = "
FOR i% = 1 TO 5
PRINT i%
NEXT i%
";
let interpreter = interpret(input);
let stdlib = interpreter.stdlib;
assert_eq!(stdlib.output, vec!["1", "2", "3", "4", "5"]);
} | rust_cleaned_test_functions.jsonl/109183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5478,
17198,
6615,
13594,
1870,
11257,
15730,
368,
341,
286,
1077,
1946,
284,
6228,
286,
4613,
600,
4,
284,
220,
16,
5146,
220,
20,
198,
310,
35893,
600,
13744,
286,
45011,
600,
13744,
286,
7620... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_type() {
let i = Instr {
bits: 0b10101_01010_11001_1101110_011_0000000,
format: Format::B(BType {}),
};
match i.format {
Format::B(f) => {
assert_eq!(0b01010, f.rs1(i.bits));
assert_eq!(0b11001, f.rs2(i.bits));
assert_eq!(... | rust_cleaned_test_functions.jsonl/60975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1819,
368,
341,
262,
1077,
600,
284,
758,
495,
341,
286,
9472,
25,
220,
15,
65,
16,
15,
16,
15,
16,
62,
15,
16,
15,
16,
15,
62,
16,
16,
15,
15,
16,
62,
16,
16,
15,
16,
16,
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... | 2 |
#[test]
fn test_join_absolute_path() {
assert_eq!(
PathBuf::from("sample/a/")
.join_absolute_path(&PathBuf::from("/b"))
.unwrap(),
PathBuf::from("sample/a/b")
);
} | rust_cleaned_test_functions.jsonl/55641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31017,
50874,
2638,
368,
341,
286,
2060,
10714,
33673,
310,
7933,
15064,
486,
1499,
445,
13611,
14186,
53006,
394,
659,
5987,
50874,
2638,
2099,
1820,
15064,
486,
1499,
4283,
65,
5455,
394,
659,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_yclip_suffix_custom() {
let y = b"GAAAA";
let x = b"CG";
let score = |a: u8, b: u8| if a == b { 1i32 } else { -3i32 };
let scoring = Scoring::new(-5, -1, &score).yclip(-5).xclip(0);
let mut aligner = banded::Aligner::with_scoring(scoring, 10, 10);
... | rust_cleaned_test_functions.jsonl/126762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4178,
7974,
37151,
15875,
368,
341,
286,
1077,
379,
284,
293,
89199,
25699,
876,
286,
1077,
856,
284,
293,
1,
8798,
3302,
286,
1077,
5456,
284,
760,
64,
25,
575,
23,
11,
293,
25,
575,
23,
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... | 2 |
#[test]
fn test_increase_total_stake_panic_overflow() {
new_test_ext().execute_with(|| {
let initial_total_stake = u64::MAX;
let increment : u64 = 1;
// Setup initial total stake
Subtensor::increase_total_stake(initial_total_stake);
Subtensor::increase_total_stake(increment); // Should trigger... | rust_cleaned_test_functions.jsonl/17167 | {
"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,
73807,
10784,
1261,
726,
620,
31270,
79073,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
286,
1077,
2856,
10784,
1261,
726,
284,
575,
21,
19,
486,
10586,
280,
197,
10217,
16252,
549,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_records() -> io::Result<()> {
let data = b"\
##gff-version 3
sq0\tNOODLES\tgene\t8\t13\t.\t+\t.\tgene_id=ndls0;gene_name=gene0
";
let mut reader = Reader::new(&data[..]);
let mut n = 0;
for result in reader.records() {
let _ = result?;
n ... | rust_cleaned_test_functions.jsonl/69014 | {
"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,
31279,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
293,
83383,
565,
70,
542,
45367,
220,
18,
198,
28343,
15,
4955,
8996,
2069,
14017,
4955,
42371,
4955,
23,
4955,
16,
18,
4955,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_concat() {
let gil = Python::acquire_gil();
let py = gil.python();
let d = [("ByteSequence", py.get_type::<ByteSequence>())].into_py_dict(py);
let run = |code| py.run(code, None, Some(d)).unwrap();
let err = |code| py.run(code, None, Some(d)).unwrap_err();
run("s1 = Byt... | rust_cleaned_test_functions.jsonl/64049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57478,
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,
1819,
27638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_week_without_mode() {
let cases = vec![
("2000-01-01", Some(0i64)),
("2008-02-20", Some(7i64)),
("2017-01-01", Some(1i64)),
("0000-00-00", None),
("2018-12-00", None),
("2018-00-03", None),
];
let mut... | rust_cleaned_test_functions.jsonl/36232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31277,
39904,
7302,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
15,
15,
12,
15,
16,
12,
15,
16,
497,
4329,
7,
15,
72,
21,
19,
6965,
310,
3489,
17,
15,
15,
23,
12,
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... | 2 |
#[test]
fn test_primitive_writer_schema() {
let valid_reader = Schema::String;
assert!(SchemaCompatibility::can_read(
&Schema::String,
&valid_reader
));
assert_eq!(
SchemaCompatibility::can_read(&Schema::Int, &Schema::String),
false... | rust_cleaned_test_functions.jsonl/21775 | {
"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,
84087,
28908,
25371,
368,
341,
286,
1077,
2697,
22306,
284,
12539,
486,
703,
280,
286,
2060,
10297,
8632,
85880,
486,
4814,
6443,
1006,
310,
609,
8632,
486,
703,
345,
310,
609,
1891,
22306,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array() -> Result<()> {
generic_test_array(
ScalarValue::Utf8(Some("aa".to_string())),
ScalarValue::Utf8(Some("aa".to_string())),
DataType::Utf8,
"StringArray\n[\n \"aa\",\n \"aa\",\n]",
)?;
generic_test_array(
... | rust_cleaned_test_functions.jsonl/21908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
368,
1464,
5714,
71698,
341,
286,
13954,
4452,
3858,
1006,
310,
35176,
1130,
486,
38980,
23,
65405,
445,
5305,
3263,
983,
3904,
73727,
310,
35176,
1130,
486,
38980,
23,
65405,
445,
5305,
326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_header_type_with_invalid_object() {
let header = [0x65, 32u8, 0x31, 0x35, 0x0];
let _ = get_header_type(&header);
} | rust_cleaned_test_functions.jsonl/108329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8757,
1819,
6615,
31433,
5314,
368,
341,
286,
1077,
4247,
284,
508,
15,
87,
21,
20,
11,
220,
18,
17,
84,
23,
11,
220,
15,
87,
18,
16,
11,
220,
15,
87,
18,
20,
11,
220,
15,
87,
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 |
#[test]
fn test_set_memory() {
let mut xs = [0u8, ..20];
let ptr = xs.as_mut_ptr();
unsafe { set_memory(ptr, 5u8, xs.len()); }
assert!(xs == [5u8, ..20]);
} | rust_cleaned_test_functions.jsonl/86 | {
"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,
2602,
19195,
368,
341,
286,
1077,
5206,
11943,
284,
508,
15,
84,
23,
11,
5241,
17,
15,
935,
286,
1077,
10087,
284,
11943,
5357,
29523,
4348,
543,
286,
19860,
314,
738,
19195,
23866,
11,
220,
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_register_worker() {
new_test_ext().execute_with(|| {
set_block_1();
setup_relaychain_genesis_allowlist();
// New registration without valid genesis_block_hash
assert_noop!(
PhalaRegistry::register_worker(
Origin::signed(1),
WorkerRegistrationInfo::<u64> {
... | rust_cleaned_test_functions.jsonl/23211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1001
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
40385,
368,
341,
298,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
571,
8196,
7113,
62,
16,
543,
571,
84571,
1288,
6651,
8819,
16322,
13774,
55731,
1607,
1428,
571,
197,
322,
1532,
1222... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vectors() -> Result<()> {
let lua = Lua::new();
let v: [f32; 3] = lua.load("vector(1, 2, 3) + vector(3, 2, 1)").eval()?;
assert_eq!(v, [4.0, 4.0, 4.0]);
// Test vector methods
lua.load(
r#"
local v = vector(1, 2, 3)
assert(v.x == 1)
assert(v.... | rust_cleaned_test_functions.jsonl/57440 | {
"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,
49158,
368,
1464,
5714,
71698,
341,
262,
1077,
20357,
284,
37662,
486,
931,
1428,
262,
1077,
348,
25,
508,
69,
18,
17,
26,
220,
18,
60,
284,
20357,
5104,
445,
3215,
7,
16,
11,
220,
17,
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... | 4 |
#[test]
fn test_part_1() {
assert_eq!(run(INPUT, 10), 1588);
assert_eq!(run(include_str!("../../input/14.txt"), 10), 2068);
} | rust_cleaned_test_functions.jsonl/4499 | {
"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,
10495,
62,
16,
368,
341,
286,
2060,
10714,
10297,
6108,
57911,
11,
220,
16,
15,
701,
220,
16,
20,
23,
23,
317,
286,
2060,
10714,
10297,
6108,
77863,
2895,
17223,
2748,
1355,
14,
16,
19,
3909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_scheme() -> Result<(), Box<dyn Error>> {
assert_eq!(
ShardScheme::Range {
from: 0,
to: 9,
total: 10,
},
ShardScheme::try_from((0..=9, 10))?
);
Ok(())
} | rust_cleaned_test_functions.jsonl/28586 | {
"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,
53293,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
2060,
10714,
33673,
310,
95366,
28906,
486,
6046,
341,
394,
504,
25,
220,
15,
345,
394,
311,
25,
220,
24,
345,
394,
2790,
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... | 2 |
#[test]
fn test_verifier_find_message_to_handle_from_initiated_state() {
let _setup = SetupAriesMocks::init();
let verifier = _verifier_sm();
// No messages
{
let messages = map!(
"key_1".to_string() => A2AMessage::Presentatio... | rust_cleaned_test_functions.jsonl/57253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26042,
3049,
21814,
6462,
2346,
10630,
5673,
6137,
10029,
4387,
368,
341,
310,
1077,
716,
15188,
284,
18626,
32,
4019,
72577,
486,
2327,
1428,
310,
1077,
88737,
284,
716,
423,
3049,
15874,
1428,
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_scrypt() {
let tests = tests();
for t in tests.iter() {
let mut result = Vec::from_elem(t.expected.len(), 0u8);
let params = ScryptParams::new(t.log_n, t.r, t.p);
scrypt(t.password.as_bytes(), t.salt.as_bytes(), ¶ms, result[mut]);
... | rust_cleaned_test_functions.jsonl/13236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
3571,
368,
341,
286,
1077,
7032,
284,
7032,
543,
286,
369,
259,
304,
7032,
19471,
368,
341,
310,
1077,
5206,
1102,
284,
11312,
486,
1499,
28179,
1155,
56835,
19406,
1507,
220,
15,
84,
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... | 2 |
#[test]
fn test_default_reshaping() {
let cases = [
("چۆمان", "ﭼﯚﻣﺎﻥ"),
("گۆیژە", "ﮔﯚﯾﮋە"),
("ﺧﯚﻣﺎﻥ ﺧﯚﺵ", "ﺧﯚﻣﺎﻥ ﺧﯚﺵ"),
];
cases.iter().for_each(|case| {
assert_eq!(arabic_reshape(case.0), case.1);
});
} | rust_cleaned_test_functions.jsonl/9521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
62,
2488,
14216,
368,
341,
262,
1077,
5048,
284,
2278,
286,
3489,
144751,
145576,
125559,
497,
330,
147609,
149840,
144253,
140672,
144614,
4461,
286,
3489,
63732,
145576,
14391,
145837,
145151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_client_pref() {
let client = vec![
CipherSuite::TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
CipherSuite::TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
];
let server = vec![
&super::TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
&super::TLS_ECDH... | rust_cleaned_test_functions.jsonl/54997 | {
"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,
8179,
43331,
368,
341,
286,
1077,
2943,
284,
7486,
90515,
310,
63288,
28000,
486,
45439,
2089,
6484,
1799,
76994,
23929,
69381,
62,
16,
17,
23,
2646,
9985,
38096,
17,
20,
21,
345,
310,
63288,
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_length_of_list_in_if() {
let env = add_builtins(Env::new_empty());
let nine = "(if (> 1 (length (list 1 2 3))) (quote conseq) (quote alt))".to_string();
let (out_expr, _) = test_eval!(nine, env);
assert_eq!(out_expr.unwrap().print().unwrap(), "alt".to_string());
... | rust_cleaned_test_functions.jsonl/67643 | {
"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,
5118,
3575,
2019,
1243,
11119,
368,
341,
286,
1077,
6105,
284,
912,
880,
11227,
1330,
7,
14359,
486,
931,
15124,
1423,
286,
1077,
11627,
284,
11993,
333,
76852,
220,
16,
320,
4129,
320,
1607,
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_fq12_mul_by_014() {
let mut rng = ark_std::test_rng();
for _ in 0..1000 {
let c0 = Fq2::rand(&mut rng);
let c1 = Fq2::rand(&mut rng);
let c5 = Fq2::rand(&mut rng);
let mut a = Fq12::rand(&mut rng);
let mut b = a;
a.mul_by_014(&c0, &c1, &c... | rust_cleaned_test_functions.jsonl/3560 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
16,
17,
24944,
3710,
62,
15,
16,
19,
368,
341,
262,
1077,
5206,
28422,
284,
55217,
15656,
486,
1944,
66849,
1428,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
341,
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_igmp_integration_delay_reset_timer() {
let mut ctx = setup_simple_test_environment();
// This seed value was chosen to later produce a timer duration > 100ms.
ctx.seed_rng(123456);
ctx.igmp_join_group(DummyLinkDeviceId, GROUP_ADDR);
assert_eq!(ctx.timers()... | rust_cleaned_test_functions.jsonl/128911 | {
"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,
62,
343,
1307,
90250,
22198,
18983,
16255,
368,
341,
286,
1077,
5206,
5635,
284,
6505,
30015,
4452,
51774,
543,
286,
442,
1096,
10320,
897,
572,
11882,
311,
2937,
8193,
264,
9021,
8090,
861,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buffered_read() {
let data = vec![1, 2, 3, 4];
let bytes: i64 = -1;
let mut buffered = BufferedIO {
cursor: Cursor::new(data.clone()),
};
assert_eq!(buffered.read(bytes).unwrap(), data);
} | rust_cleaned_test_functions.jsonl/123339 | {
"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,
7776,
291,
6443,
368,
341,
286,
1077,
821,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
5820,
25,
600,
21,
19,
284,
481,
16,
280,
286,
1077,
5206,
53057,
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_separate() {
for (msg, expect) in &[
("abc", "abc"),
("zyx", "zyx"),
(
"abcdefghijklmnopqrstuvwxyz",
"abcde fghij klmno pqrst uvwxy z",
),
(
"thequickbrownfoxjumpedoverthelazydog",... | rust_cleaned_test_functions.jsonl/108454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
67598,
368,
341,
286,
369,
320,
3236,
11,
1720,
8,
304,
609,
9640,
310,
3489,
13683,
497,
330,
13683,
4461,
310,
3489,
4246,
87,
497,
330,
4246,
87,
4461,
310,
2399,
394,
330,
67512,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_amoskvin() {
#[derive(Debug, Deserialize, PartialEq, Serialize)]
struct Root {
foo: Vec<Foo>,
}
#[derive(Debug, Deserialize, PartialEq, Serialize)]
struct Foo {
a: String,
b: Option<String>,
}
test_parse_ok(&[(
"
<root>
<foo>
<a>Hello... | rust_cleaned_test_functions.jsonl/54628 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
10585,
74,
9603,
368,
341,
262,
11506,
27098,
42618,
11,
48440,
11,
55039,
11,
39900,
5563,
262,
2036,
18854,
341,
286,
15229,
25,
11312,
30499,
2624,
12520,
262,
555,
262,
11506,
27098,
42618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_legal_moves_banmen_with_kin_7_squares_and_contiguous_self_gote() {
test_legal_moves_banmen_with_kin_7_squares_and_contiguous_self_gote_impl(GKin)
} | rust_cleaned_test_functions.jsonl/81251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
8378,
10260,
27029,
25637,
1889,
1272,
368,
972,
18185,
82324,
45390,
880,
276,
5676,
6615,
4698,
258,
62,
22,
643,
40856,
8378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_proof_path_suffix_overflow() {
let b = ProofPath::from_raw(*b"\x00qwertyuiopasdfghjklzxcvbnm123456\xFF");
assert_eq!(b"\x01qwertyuiopasdfghjklzxcvbnm123456\x00".len(), 34);
b.suffix(255).suffix(2);
} | rust_cleaned_test_functions.jsonl/25540 | {
"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,
86757,
2638,
37151,
79073,
368,
341,
262,
1077,
293,
284,
36991,
1820,
486,
1499,
16067,
4071,
65,
11934,
87,
15,
15,
69291,
1344,
1963,
453,
76615,
866,
73,
10561,
89,
8148,
85,
11081,
76,
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_no_xcheck() {
#[cross_check(none)]
fn abcd() {}
abcd();
expect_xcheck(FUNCTION_ENTRY_TAG, 0x7c93ee4f_u64);
expect_xcheck(FUNCTION_EXIT_TAG, 0x7c93ee4f_u64);
expect_no_xchecks();
} | rust_cleaned_test_functions.jsonl/41186 | {
"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,
6536,
3212,
2028,
368,
341,
286,
11506,
28842,
7200,
1445,
603,
5563,
286,
5168,
668,
4385,
368,
10086,
286,
668,
4385,
543,
286,
1720,
3212,
2028,
7832,
9083,
22659,
16592,
11,
220,
15,
87,
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_array_unsigned_long_long() {
check([] as [u64; 0], Some(0));
check([0u64, 1, 2], Some(24));
} | rust_cleaned_test_functions.jsonl/79674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 61
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
67830,
17799,
17799,
368,
341,
262,
1779,
10556,
438,
508,
84,
21,
19,
26,
220,
15,
1125,
4329,
7,
15,
1106,
262,
1779,
2561,
15,
84,
21,
19,
11,
220,
16,
11,
220,
17,
1125,
4329,
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 |
#[test]
fn test_random_poly_sum_difference() {
// Test sum and difference of randomly generated polynomials.
let num_test_cases = 100;
let mut rng = rand::thread_rng();
let start = Instant::now();
for _ in 0..num_test_cases {
let left = UnivarPolynomial::rando... | rust_cleaned_test_functions.jsonl/51314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 947
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
36133,
10160,
47525,
368,
341,
286,
442,
3393,
2629,
323,
6672,
315,
26618,
7907,
1471,
76961,
624,
286,
1077,
1629,
4452,
41427,
284,
220,
16,
15,
15,
280,
286,
1077,
5206,
28422,
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... | 4 |
#[test]
fn test_find_mut() {
let mut m = HashMap::new();
assert!(m.insert(1, 12).is_none());
assert!(m.insert(2, 8).is_none());
assert!(m.insert(5, 14).is_none());
let new = 100;
match m.get_mut(&5) {
None => panic!(),
Some(x) => *x = new,
... | rust_cleaned_test_functions.jsonl/8503 | {
"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,
21814,
29523,
368,
341,
286,
1077,
5206,
296,
284,
10528,
486,
931,
543,
286,
2060,
10297,
76,
7030,
7,
16,
11,
220,
16,
17,
568,
285,
31488,
1423,
286,
2060,
10297,
76,
7030,
7,
17,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_blocktxids_cache_hit_and_miss() {
let block1: BlockHash = gen_hash(1);
let block2: BlockHash = gen_hash(2);
let block3: BlockHash = gen_hash(3);
let txids: Vec<Txid> = vec![gen_hash(4), gen_hash(5)];
let misses: Mutex<usize> = Mutex::new(0);
let m... | rust_cleaned_test_functions.jsonl/58477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 709
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
3998,
3365,
11529,
37697,
8378,
67722,
368,
341,
286,
1077,
2504,
16,
25,
8362,
6370,
284,
4081,
8950,
7,
16,
317,
286,
1077,
2504,
17,
25,
8362,
6370,
284,
4081,
8950,
7,
17,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_fx55_dump_registers() {
let mut machine = Machine::new(TestContext::new());
machine.idx = 0xBCD;
machine.register_set(0, 0xC);
machine.register_set(1, 4);
machine.register_set(2, 123);
machine.register_set(3, 98);
machine.register_set(4, 12);
machine.test_opcode(0... | rust_cleaned_test_functions.jsonl/127976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62691,
20,
20,
18296,
78360,
368,
341,
262,
1077,
5206,
5662,
284,
12960,
486,
931,
31159,
1972,
486,
931,
1423,
262,
5662,
51806,
284,
220,
15,
80979,
35,
280,
262,
5662,
9929,
2602,
7,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_a_ray_through_the_near_corner_of_the_canvas() {
let camera = camera::Camera::new(201, 101, std::f64::consts::PI / 2.0);
let ray = camera.ray_for_pixel(0, 0);
assert_tuple_approx_eq!(ray.origin, tuple::Point::new(0.0, 0.0, 0.0));
assert_tuple_approx_eq!(
... | rust_cleaned_test_functions.jsonl/116187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
72690,
87399,
16068,
76340,
66884,
3575,
16068,
47136,
368,
341,
286,
1077,
6249,
284,
6249,
486,
13445,
486,
931,
7,
17,
15,
16,
11,
220,
16,
15,
16,
11,
1460,
486,
69,
21,
19,
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... | 1 |
#[test]
fn test_mmds_version() {
let mut mmds = Mmds::new().unwrap();
// Test default MMDS version.
assert_eq!(mmds.version().to_string(), MmdsVersion::V2.to_string());
// Test setting MMDS version to v1.
mmds.set_version(MmdsVersion::V1).unwrap();
assert_eq!(mm... | rust_cleaned_test_functions.jsonl/40961 | {
"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,
717,
2277,
82,
9438,
368,
341,
286,
1077,
5206,
296,
2277,
82,
284,
386,
2277,
82,
486,
931,
1005,
15454,
1428,
286,
442,
3393,
1638,
21665,
5936,
2319,
624,
286,
2060,
10714,
10297,
76,
2277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sampler() {
// set the time decay parameter large enough that it should be very
// rare for a new point to not be accepted into the sampler
let mut sampler = StreamSampler::new(2, 100000.0);
assert_eq!(sampler.capacity(), 2);
assert_eq!(sampler.size(), 0);... | rust_cleaned_test_functions.jsonl/48754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72812,
368,
341,
286,
442,
738,
279,
882,
30715,
5733,
3460,
3322,
429,
432,
1265,
387,
1602,
198,
286,
442,
8848,
369,
264,
501,
1459,
311,
537,
387,
11666,
1119,
279,
41799,
198,
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... | 9 |
#[test]
fn test_to_lower_snake_case() {
check(to_lower_snake_case, "lower_snake_case", expect![[""]]);
check(to_lower_snake_case, "UPPER_SNAKE_CASE", expect![["upper_snake_case"]]);
check(to_lower_snake_case, "Weird_Case", expect![["weird_case"]]);
check(to_lower_snake_case, "Cam... | rust_cleaned_test_functions.jsonl/87745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
30425,
28022,
726,
19096,
368,
341,
286,
1779,
12186,
30425,
28022,
726,
19096,
11,
330,
14772,
28022,
726,
19096,
497,
1720,
20703,
1183,
1341,
2558,
286,
1779,
12186,
30425,
28022,
726,
1909... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_v6_inode_compact() {
let pa = TempDir::new().unwrap();
let pa_reg = TempFile::new_in(pa.as_path()).unwrap();
let pa_pyc = pa.as_path().join("foo.pyc");
let _ = File::create(&pa_pyc).unwrap();
let reg_node = Node::new(
RafsVersion::V6,
... | rust_cleaned_test_functions.jsonl/98421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
2273,
21,
46748,
18177,
531,
368,
341,
286,
1077,
7106,
284,
19944,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
7106,
4920,
284,
19944,
1703,
486,
931,
1243,
78637,
5357,
2638,
6011,
15454,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_strore_bcd_of_vx_to_i() {
let mut vm = VirtualMachine::new();
vm.v[0].0 = 146;
vm.i = 0;
vm.store_bcd_of_vx_to_i(0);
assert!(vm.ram[0] == 1);
assert!(vm.ram[1] == 4);
assert!(vm.ram[2] == 6);
} | rust_cleaned_test_functions.jsonl/99212 | {
"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,
1261,
299,
265,
880,
4385,
3575,
2273,
87,
2346,
5318,
368,
341,
262,
1077,
5206,
10995,
284,
20721,
21605,
486,
931,
543,
262,
10995,
3133,
58,
15,
936,
15,
284,
220,
16,
19,
21,
280,
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_array_convert() {
let from = "EPSG:2230";
let to = "EPSG:26946";
let ft_to_m = Proj::new_known_crs(&from, &to, None).unwrap();
let mut v = vec![
MyPoint::new(4760096.421921, 3744293.729449),
MyPoint::new(4760197.421921, 3744394.729449),
... | rust_cleaned_test_functions.jsonl/133389 | {
"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,
3858,
34910,
368,
341,
286,
1077,
504,
284,
330,
45177,
38,
25,
17,
17,
18,
15,
876,
286,
1077,
311,
284,
330,
45177,
38,
25,
17,
21,
24,
19,
21,
876,
286,
1077,
10482,
2346,
717,
284,
429... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dummy_excluded() {
let opt = Default::default();
let m = mount_info("ext4", "/mnt/foo", false, true);
assert!(!is_included(&m, &opt));
} | rust_cleaned_test_functions.jsonl/7068 | {
"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,
60321,
2702,
10181,
368,
341,
310,
1077,
3387,
284,
7899,
486,
2258,
543,
310,
1077,
296,
284,
6470,
3109,
445,
427,
19,
497,
3521,
40882,
60555,
497,
895,
11,
830,
317,
310,
2060,
0,
3471,
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 |
#[test]
fn test_validate_email() {
// Test cases taken from Django
let tests = vec![
("email@here.com", true),
("weirder-email@here.and.there.com", true),
(r#"!def!xyz%abc@example.com"#, true),
("email@[127.0.0.1]", true),
("em... | rust_cleaned_test_functions.jsonl/133238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
9172,
368,
341,
286,
442,
3393,
5048,
4429,
504,
52604,
8945,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
2332,
31,
6739,
905,
497,
830,
1326,
310,
3489,
896,
404,
1107,
42117,
31,
6739... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ticks_change_state() {
let (genesis_config, _) = create_genesis_config(500);
let bank = Arc::new(Bank::new(&genesis_config));
let bank1 = new_from_parent(&bank);
let hash1 = bank1.hash_internal_state();
// ticks don't change its state unless a block bounda... | rust_cleaned_test_functions.jsonl/2615 | {
"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,
49961,
15947,
4387,
368,
341,
286,
1077,
320,
77894,
5332,
11,
27439,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
486,
931,
2099,
77894,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_indexed_reader_by_rid_all() {
_test_indexed_reader_by_rid_all(&FASTA_FILE, &FAI_FILE, _read_buffer_by_rid_all);
} | rust_cleaned_test_functions.jsonl/62837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
291,
22306,
3710,
1710,
307,
5705,
368,
341,
286,
716,
1944,
3560,
291,
22306,
3710,
1710,
307,
5705,
2099,
59206,
32,
8087,
11,
609,
3627,
40,
8087,
11,
716,
878,
7776,
3710,
1710,
307,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_224() {
assert_eq!(Solution::calculate("(1+(4+5+2)-3)+(6+8)".to_owned()), 23);
assert_eq!(Solution::calculate("1+1".to_owned()), 2);
assert_eq!(Solution::calculate("0".to_owned()), 0);
assert_eq!(Solution::calculate("2147483647".to_owned()), 2147483647);
} | rust_cleaned_test_functions.jsonl/49288 | {
"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,
62,
17,
17,
19,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
35597,
31732,
16,
13362,
19,
10,
20,
10,
17,
7287,
18,
41794,
21,
10,
23,
94010,
983,
51973,
11858,
220,
17,
18,
317,
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_call_with_bad_args() {
let output = Command::new("./target/release/tio")
.arg("bad-command")
.output()
.expect("failed to execute binary");
assert_eq!(String::from_utf8_lossy(&output.stderr), INVALID_COMMAND)
} | rust_cleaned_test_functions.jsonl/41465 | {
"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,
13429,
6615,
34199,
8384,
368,
341,
286,
1077,
2550,
284,
7348,
486,
931,
13988,
5657,
88648,
5523,
815,
1138,
310,
659,
858,
445,
13855,
48419,
1138,
310,
659,
3006,
741,
310,
659,
17119,
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_which_re_in_without_matches() {
let f = TestFixture::new();
let re = Regex::new(r"bi[^n]").unwrap();
let result: Vec<PathBuf> = which::which_re_in(re, Some(f.paths))
.unwrap()
.into_iter()
.collect();
assert_eq!(result, Vec::<PathBuf>::new())
} | rust_cleaned_test_functions.jsonl/13396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
8206,
1288,
1243,
39904,
38344,
368,
341,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
312,
284,
26146,
486,
931,
2601,
1,
8221,
38813,
77,
44891,
15454,
1428,
262,
1077,
1102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_overflows() {
let mut testing_hll = TestingHll::new(12);
let mut hll1 = DenseHll::new(12);
let mut hll2 = DenseHll::new(12);
// these two numbers cause overflows
// TODO: ported directly from Java.
// Ensur... | rust_cleaned_test_functions.jsonl/78018 | {
"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,
20888,
6615,
15431,
38140,
368,
341,
310,
1077,
5206,
7497,
1523,
654,
284,
26768,
39,
654,
486,
931,
7,
16,
17,
317,
310,
1077,
5206,
305,
654,
16,
284,
42522,
39,
654,
486,
931,
7,
16,
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_serialize_empty_setoption() {
assert_eq!(UciMessage::SetOption {
name: "ABC".to_string(),
value: Some(String::from("")),
}.serialize(), "setoption name ABC value <empty>")
} | rust_cleaned_test_functions.jsonl/19072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15124,
2602,
2047,
368,
341,
286,
2060,
10714,
10297,
52,
5855,
2052,
486,
1649,
5341,
341,
310,
829,
25,
330,
25411,
3263,
983,
3904,
3148,
310,
897,
25,
4329,
2242,
486,
1499,
445,
3015... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stack() {
let mut stack = Stack::new();
check_stack(&stack, vec![None]);
stack.push(1);
check_stack(&stack, vec![None, Some(1)]);
stack.push(2);
check_stack(&stack, vec![None, Some(1), Some(2)]);
stack.enter();
check_stack(&sta... | rust_cleaned_test_functions.jsonl/13445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 958
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15528,
368,
341,
286,
1077,
5206,
5611,
284,
14284,
486,
931,
2129,
715,
286,
1779,
15528,
2099,
7693,
11,
7486,
20703,
4064,
10149,
286,
5611,
2552,
7,
16,
1215,
715,
286,
1779,
15528,
2099,
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_read_overflow_arithmetic() {
let pos = <u32>::max_value();
let buf = vec![255; 0];
<Vec<u8> as Field>::check(&buf, pos.into(), 8.into(), pos.into())
.expect("Found error in check");
} | rust_cleaned_test_functions.jsonl/118837 | {
"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,
6443,
79073,
25842,
25922,
368,
341,
262,
1077,
1133,
284,
366,
84,
18,
17,
6831,
2810,
3142,
543,
262,
1077,
6607,
284,
7486,
20703,
17,
20,
20,
26,
220,
15,
4821,
262,
366,
10050,
34837,
23,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_states_index_iterator() -> Fallible<()> {
let mut fst = VectorFst::new();
// States
let s1 = fst.add_state();
let s2 = fst.add_state();
let s3 = fst.add_state();
fst.set_start(s1)?;
// Arcs
let arc_1_2 = Arc::new(0, 0, Probabilit... | rust_cleaned_test_functions.jsonl/47861 | {
"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,
22972,
3560,
13491,
368,
1464,
14785,
1238,
71698,
341,
286,
1077,
5206,
48434,
284,
4196,
37,
267,
486,
931,
1428,
286,
442,
4180,
198,
286,
1077,
274,
16,
284,
48434,
1364,
4387,
543,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_existing_playlist() {
let spotify = Spotify::default()
.client_credentials_manager(CLIENT_CREDENTIAL.lock().unwrap().clone())
.build();
let playlist = spotify.playlist("37i9dQZF1DZ06evO45P0Eo", None, None);
assert!(playlist.is_ok());
} | rust_cleaned_test_functions.jsonl/96525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62630,
69267,
368,
341,
14808,
262,
1077,
87790,
284,
40537,
486,
2258,
741,
286,
659,
2972,
47396,
12144,
52991,
10757,
920,
81509,
21003,
1005,
15454,
1005,
19982,
2398,
286,
659,
5834,
1428,
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_report_next() {
let subcommand = Subcommand::Report {
filter: Filter {
..Default::default()
},
report_name: "next".to_owned(),
};
assert_eq!(
Subcommand::parse(argv![]).unwrap(),
(&EMPTY[..], subc... | rust_cleaned_test_functions.jsonl/84287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
11257,
368,
341,
286,
1077,
1186,
5631,
284,
3719,
5631,
486,
10361,
341,
310,
4051,
25,
12339,
341,
394,
5241,
3675,
486,
2258,
741,
310,
1153,
310,
1895,
1269,
25,
330,
3600,
3263,
983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_opaque_delivery() {
let mut ctx = setup_encoder::<u8>(
64,
80,
10,
100,
8,
ChromaSampling::Cs420,
0,
5,
0,
false,
0,
false,
10,
None,
);
let kf_at = 3;
let limit = 5;
for i in 0..limit {
send_frame_kf(&mut ctx, kf_at == i);
... | rust_cleaned_test_functions.jsonl/80118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
19659,
50562,
368,
341,
220,
1077,
5206,
5635,
284,
6505,
39068,
27638,
84,
23,
17055,
262,
220,
21,
19,
345,
262,
220,
23,
15,
345,
262,
220,
16,
15,
345,
262,
220,
16,
15,
15,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_no_run() {
let p = project()
.file("src/lib.rs", "#[test] fn foo() { panic!() }")
.build();
p.cargo("test --no-run")
.with_stderr(
"\
[COMPILING] foo v0.0.1 ([CWD])
[FINISHED] dev [unoptimized + debuginfo] target(s) in [..]
",
)
.run()... | rust_cleaned_test_functions.jsonl/95356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
14007,
368,
341,
262,
1077,
281,
284,
2390,
741,
286,
659,
1192,
445,
3548,
8194,
25638,
497,
5869,
58,
1944,
60,
5168,
15229,
368,
314,
21975,
0,
368,
335,
1138,
286,
659,
5834,
1428,
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_create_datetime_from_str_fail() {
assert!(Value::datetime_from_str("2012", "01", "03", "3", "30", "30").is_err());
assert!(Value::datetime_from_str("2012", "01", "03", "03", "3", "30").is_err());
assert!(Value::datetime_from_str("2012", "01", "03", "03", "30", "3").is_err());
ass... | rust_cleaned_test_functions.jsonl/86212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
28943,
5673,
2895,
22121,
368,
341,
262,
2060,
10297,
1130,
486,
15450,
5673,
2895,
445,
17,
15,
16,
17,
497,
330,
15,
16,
497,
330,
15,
18,
497,
330,
18,
497,
330,
18,
15,
497,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.