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_decoder_valid_partial_non_bmp() {
let mut d = UTF_16BE.decoder();
assert_feed_ok!(d, [], [0xd8], "");
assert_feed_ok!(d, [], [0x08], "");
assert_feed_ok!(d, [], [0xdf], "");
assert_feed_ok!(d, [0x45], [0xd9], "\U00012345");
assert_feed_ok!(d, [], [... | rust_cleaned_test_functions.jsonl/15678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
8337,
52068,
21637,
880,
1307,
368,
341,
286,
1077,
5206,
294,
284,
20076,
62,
16,
21,
11594,
74047,
543,
286,
2060,
42390,
19817,
10297,
67,
11,
10071,
508,
15,
9703,
23,
1125,
14498,
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_document_from_mg_mval_mmol_with_null() {
let it = doc! {
KEY_MG: Bson::Null,
KEY_MVAL: Bson::Null,
KEY_MMOL: Bson::Null,
KEY_MVAL_PERCENT: Bson::Null
};
let r = MgMvalMmol::try_from(&it);
assert!(r.is_ok());
... | rust_cleaned_test_functions.jsonl/16360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26231,
5673,
717,
70,
717,
831,
35599,
337,
6615,
15162,
368,
341,
286,
1077,
432,
284,
4629,
0,
341,
310,
12013,
1245,
38,
25,
425,
930,
486,
3280,
345,
310,
12013,
1245,
5594,
25,
425,
930,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bot_that_compares() {
let config = parse_input("value 5 goes to bot 2
bot 2 gives low to bot 1 and high to bot 0
value 3 goes to bot 1
bot 1 gives low to output 1 and high to bot 0
bot 0 gives low to output 2 and high to output 0
value 2 goes to bot 2");
assert_eq!(find_bot_that_compares(... | rust_cleaned_test_functions.jsonl/62745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
38883,
70197,
18177,
5403,
368,
341,
10217,
2193,
284,
4715,
5898,
445,
957,
220,
20,
5780,
311,
10924,
220,
17,
198,
6331,
220,
17,
6696,
3347,
311,
10924,
220,
16,
323,
1550,
311,
10924... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_bogus_instruction() {
// Attempt to assign with no accounts
let instruction = SystemInstruction::Assign {
owner: solana_sdk::pubkey::new_rand(),
};
let data = serialize(&instruction).unwrap();
let result = process_instruction(&system_pr... | rust_cleaned_test_functions.jsonl/73050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
880,
538,
355,
54923,
368,
341,
286,
442,
43517,
311,
9793,
448,
902,
9618,
198,
286,
1077,
7600,
284,
739,
16664,
486,
28933,
341,
310,
6372,
25,
2048,
3362,
61783,
486,
9585,
792,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_winner() {
let mut game = Game::new(n!("player1").into(), n!("player2").into());
assert_eq!(game.winner, EMPTY);
game.make_move(0, 0);
assert_eq!(game.winner, EMPTY);
game.make_move(1, 0);
assert_eq!(game.winner, EMPTY);
game.make_move(... | rust_cleaned_test_functions.jsonl/43532 | {
"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,
3062,
92588,
368,
341,
286,
1077,
5206,
1809,
284,
4050,
486,
931,
1445,
17223,
3434,
16,
1827,
18122,
1507,
308,
17223,
3434,
17,
1827,
18122,
1423,
286,
2060,
10714,
10297,
5804,
1418,
4382,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multi_basic_1() {
let engine = new_sample_engine();
let mut getter = new_multi_point_getter(&engine, 200.into());
// Get a deleted key
must_get_none(&mut getter, b"foo1");
let s = getter.take_statistics();
assert_seek_next_prev(&s.write, 1, 0, 0)... | rust_cleaned_test_functions.jsonl/32891 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 752
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
34729,
62,
16,
368,
341,
286,
1077,
4712,
284,
501,
17491,
24823,
1428,
286,
1077,
5206,
33429,
284,
501,
25133,
6085,
3062,
465,
2099,
8512,
11,
220,
17,
15,
15,
39860,
5231,
286,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cpx_imm() {
let mut r = Register::new();
r.set_X(0x40);
cpx_imm(0x50, &mut r);
assert_eq!(r.get_status_negative(), true);
assert_eq!(r.get_status_carry(), false)
} | rust_cleaned_test_functions.jsonl/14203 | {
"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,
666,
1767,
71370,
368,
341,
262,
1077,
5206,
435,
284,
8451,
486,
931,
543,
262,
435,
980,
6859,
7,
15,
87,
19,
15,
317,
262,
272,
1767,
71370,
7,
15,
87,
20,
15,
11,
609,
6984,
435,
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_multiple() {
let (_td, repo) = repo_init().unwrap();
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
create_branch(repo_path, "test").unwrap();
assert!(checkout_branch(repo_path, "refs/heads/test").is_ok());
... | rust_cleaned_test_functions.jsonl/96506 | {
"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,
45233,
368,
341,
286,
1077,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
1005,
15454,
543,
286,
1077,
3704,
284,
15867,
3875,
1005,
3765,
1005,
15454,
543,
286,
1077,
15867,
2638,
284,
3704,
5357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_side_metadata_atomic_fetch_add_sub_ge8bits() {
serial_test(|| {
let data_addr = vm_layout_constants::HEAP_START;
let metadata_1_spec = SideMetadataSpec {
scope: SideMetadataScope::Global,
offset: 0,
log_num_of_bits:... | rust_cleaned_test_functions.jsonl/134485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30862,
22220,
51367,
11803,
2891,
5228,
32933,
23,
11516,
368,
341,
286,
6146,
4452,
79453,
341,
310,
1077,
821,
7387,
284,
10995,
14466,
55642,
486,
1799,
2537,
13044,
401,
310,
1077,
11160,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_make_inspect_loggable() {
let (inspector, mut node) = inspector_and_list_node();
let obj = make_inspect_loggable!(k1: "1", k2: 2i64, k3: "3");
inspect_log!(node, some_key: obj);
let point = Some((10i64, 50i64));
inspect_log!(node, point?: point.map(|(x, ... | rust_cleaned_test_functions.jsonl/96867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
34386,
987,
5224,
35034,
368,
341,
286,
1077,
320,
1330,
18997,
11,
5206,
2436,
8,
284,
44725,
8378,
2019,
5084,
1428,
286,
1077,
2839,
284,
1281,
34386,
987,
5224,
35034,
10297,
74,
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_trim_2_args() {
let test_cases = vec![
(None, None, None),
(Some("x"), None, None),
(None, Some("x"), None),
(Some("xxx"), Some("x"), Some("")),
(Some("xxxbarxxx"), Some("x"), Some("bar")),
(Some("xxxbarxxx"), Some("... | rust_cleaned_test_functions.jsonl/60532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70025,
62,
17,
8384,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
11,
2240,
1326,
310,
320,
8373,
445,
87,
3975,
2240,
11,
2240,
1326,
310,
320,
4064,
11,
4329... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_array_with_two_integers() {
let data = vec![0x82, 0x01, 0x02];
let parsed: ParsedArray<super::ParsedArraySize2> =
ParsedArray::deserialize_data(&data).expect("Failed to parse");
assert_eq!(parsed.raw_values(), vec![vec![0x01], vec![0x02]]);
assert_eq!(... | rust_cleaned_test_functions.jsonl/10819 | {
"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,
3858,
6615,
23241,
4042,
67592,
368,
341,
286,
1077,
821,
284,
7486,
20703,
15,
87,
23,
17,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
935,
286,
1077,
15676,
25,
393,
18112,
1857,
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_i2c_mock_mode_err() {
let expectations = [Transaction::read(0xaa, vec![10, 12])];
let mut i2c = Mock::new(&expectations);
i2c.write(0xaa, &vec![10, 12]).unwrap();
i2c.done();
} | rust_cleaned_test_functions.jsonl/49258 | {
"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,
5318,
17,
66,
34134,
7302,
9266,
368,
341,
286,
1077,
16665,
284,
508,
8070,
486,
878,
7,
15,
43300,
11,
7486,
20703,
16,
15,
11,
220,
16,
17,
2467,
935,
286,
1077,
5206,
600,
17,
66,
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_squeeze_blank_before_numbering() {
for same_param in vec!["-s", "--squeeze-blank"] {
new_ucmd!()
.args(&[same_param, "-n", "-"])
.pipe_in("a\n\n\nb")
.succeeds()
.stdout_only(" 1\ta\n 2\t\n 3\tb");
}
} | rust_cleaned_test_functions.jsonl/90941 | {
"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,
643,
19340,
56103,
23708,
5500,
287,
368,
341,
262,
369,
1852,
4090,
304,
7486,
0,
1183,
12,
82,
497,
14482,
51913,
16278,
1180,
1341,
341,
286,
501,
68887,
2277,
0,
741,
310,
659,
2116,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bomful_invalid_utf8_as_windows_1257_to_cow() {
let (cow, encoding, had_errors) =
WINDOWS_1257.decode(b"\xEF\xBB\xBF\xE2\x82\xAC\x80\xC3\xA4");
match cow {
Cow::Borrowed(_) => unreachable!(),
Cow::Owned(s) => {
assert_eq!(... | rust_cleaned_test_functions.jsonl/90248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
880,
316,
1262,
31433,
39453,
23,
11898,
58220,
62,
16,
17,
20,
22,
2346,
666,
363,
368,
341,
286,
1077,
320,
18921,
11,
11170,
11,
1030,
20196,
8,
4035,
310,
75165,
62,
16,
17,
20,
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... | 2 |
#[test]
fn test_enabled() {
match parse_response(b"* ENABLED QRESYNC X-GOOD-IDEA\r\n") {
Ok((_, capabilities)) => assert_eq!(
capabilities,
Response::Capabilities(vec![
Capability::Atom("QRESYNC"),
Capability::Atom("X-GOOD-IDEA"),
]... | rust_cleaned_test_functions.jsonl/24544 | {
"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,
18220,
368,
341,
262,
2432,
4715,
9655,
1883,
61593,
33240,
35,
1207,
7012,
71401,
1599,
12010,
55250,
12,
12146,
32,
12016,
1699,
899,
341,
286,
7622,
1188,
6878,
16928,
593,
589,
2060,
10714,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_ok() {
let input = &["a = ", "a="];
let expected_state = ParseState::Expression;
let expected_binding = ApplyMode::After;
let ctx = &Ctx::empty();
for input in input {
let result = Assign.parse(input, &ctx, ParseState::Expression);
... | rust_cleaned_test_functions.jsonl/14380 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19817,
368,
341,
286,
1077,
1946,
284,
609,
1183,
64,
284,
3670,
330,
64,
428,
935,
286,
1077,
3601,
4387,
284,
14775,
1397,
486,
9595,
280,
286,
1077,
3601,
60815,
284,
20552,
3636,
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_json_as_uint() {
// no clip to zero
let cs: Vec<(Json, u64, Option<i32>)> = vec![
(Json::Double(-1.0), -1.0f64 as i64 as u64, None),
(Json::String(String::from("10")), 10, None),
(
Json::String(String::from("+10abc"... | rust_cleaned_test_functions.jsonl/101772 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
15807,
368,
341,
286,
442,
902,
12327,
311,
7168,
198,
286,
1077,
10532,
25,
11312,
28706,
5014,
11,
575,
21,
19,
11,
6959,
21897,
18,
17,
9231,
29,
284,
7486,
90515,
3374,
310,
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_digest_message() {
// TODO
const EXAMPLE_CBOR_DATA: &str =
"885501fd1d0f4dfcd7e99afcb99a8326b7dc459d32c6285501b882619d46558f3d9e316d11b48dcf211327025a0144000186a0430009c4430061a80040";
let message_digest = get_digest(&decode(EXAMPLE_CBOR_DATA.as_bytes()).unwr... | rust_cleaned_test_functions.jsonl/48750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52994,
6462,
368,
341,
286,
442,
5343,
198,
286,
733,
66246,
48933,
868,
7896,
25,
609,
495,
4035,
310,
330,
23,
23,
20,
20,
15,
16,
6902,
16,
67,
15,
69,
19,
2940,
4385,
22,
68,
24,
24,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_profile() {
let base_path = PathBuf::from("/tmp/data");
let last_offset_file = PathBuf::from("consumer2.offset");
let profile_path = get_base_dir().join(PROFILE_MIN);
let profile_file = Config::load(&profile_path);
if let Err(err) = &profile_file {
... | rust_cleaned_test_functions.jsonl/99224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 693
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
13789,
368,
341,
286,
1077,
2331,
2638,
284,
7933,
15064,
486,
1499,
4283,
5173,
13167,
797,
286,
1077,
1537,
6917,
2458,
284,
7933,
15064,
486,
1499,
445,
46764,
17,
14760,
797,
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_stakes_multiple_stakers() {
let stakes_cache = StakesCache::new(Stakes {
epoch: 4,
..Stakes::default()
});
let ((vote_pubkey, vote_account), (stake_pubkey, stake_account)) =
create_staked_node_accounts(10);
let (stake_pubkey2,... | rust_cleaned_test_functions.jsonl/22039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
2050,
45233,
1261,
8312,
368,
341,
286,
1077,
44425,
11529,
284,
794,
2050,
8233,
486,
931,
7,
623,
2050,
341,
310,
16342,
25,
220,
19,
345,
310,
5241,
623,
2050,
486,
2258,
741,
286,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_field_name_to_tag_name() {
let cases = [
["item_id", "ItemID"],
[
"classified_ad_pay_per_lead_fee",
"ClassifiedAdPayPerLeadFee",
],
];
for pair in cases.into_iter() {
assert_eq!(field_name_to_tag_name(pair[0]), pair[1])
}
} | rust_cleaned_test_functions.jsonl/72054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
1269,
2346,
9372,
1269,
368,
341,
220,
1077,
5048,
284,
2278,
262,
4383,
1203,
842,
497,
330,
1234,
915,
8097,
262,
2278,
414,
330,
64874,
10027,
28925,
5678,
87052,
34305,
756,
414,
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... | 2 |
#[test]
fn test_stop_ap_no_ifaces() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
let test_values = test_setup(&mut exec);
// Create an empty PhyManager and IfaceManager.
let phy_manager = phy_manager::PhyManager::new(
test_v... | rust_cleaned_test_functions.jsonl/62716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
21093,
6536,
11119,
2434,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
1273,
9146,
284,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_fee_with_fundee_update_add_htlc() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let chan = create_... | rust_cleaned_test_functions.jsonl/16866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2025
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
34305,
6615,
761,
1241,
2127,
8882,
2891,
49086,
17257,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
284,
1855,
5084,
18343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_text_rs() {
test_in_db("strings", |conn| {
let result = conn
.query("SELECT text_rs('hello world!')", &[])
.expect("query failed");
assert_eq!(result.len(), 1);
let row = result.get(0);
let col: String = row.get(0);
assert_eq!... | rust_cleaned_test_functions.jsonl/34714 | {
"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,
4326,
47115,
368,
341,
262,
1273,
1243,
8685,
445,
18594,
497,
760,
5148,
91,
341,
286,
1077,
1102,
284,
4534,
198,
310,
659,
1631,
445,
4858,
1467,
47115,
492,
14990,
1879,
0,
863,
497,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negatives() {
assert!(Decimal::try_from("-1").is_some());
assert_eq!(decimal("0") - decimal("1"), decimal("-1"));
assert_eq!(decimal("5.5") + decimal("-6.5"), decimal("-1"));
} | rust_cleaned_test_functions.jsonl/58123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
5859,
368,
341,
262,
2060,
10297,
11269,
486,
1539,
5673,
13645,
16,
1827,
285,
61855,
1423,
262,
2060,
10714,
10297,
23289,
445,
15,
899,
481,
12122,
445,
16,
3975,
12122,
13645,
16,
4010,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fvm_version_invalid() {
let header_invalid_magic = FvmHeader {
magic: FVM_MAGIC,
version: 123,
pslice_count: 1,
slice_size: FVM_BLOCK_SIZE,
fvm_partition_size: FVM_BLOCK_SIZE,
vpartition_table_size: FVM_BLOCK_SIZE,
... | rust_cleaned_test_functions.jsonl/67406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
7338,
9438,
31433,
368,
341,
286,
1077,
4247,
31433,
54612,
284,
434,
7338,
4047,
341,
310,
10963,
25,
434,
11187,
49194,
345,
310,
2319,
25,
220,
16,
17,
18,
345,
310,
4726,
4754,
3180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_checked_fixed_point_mul() {
run_test(|| {
let currency = Token(DOT);
let tests: Vec<(Amount<Test>, UnsignedFixedPoint, Amount<Test>)> = vec![
(
Amount::new(1 * 10u128.pow(8), currency), // 1 BTC
UnsignedFixedPoint::c... | rust_cleaned_test_functions.jsonl/110275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 889
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56456,
37839,
6085,
24944,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1077,
11413,
284,
9660,
5432,
1793,
317,
286,
1077,
7032,
25,
11312,
28706,
10093,
71273,
8066,
97747,
13520,
2609,
11,
25783,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ref() {
let anyof: &AnyOf<MyTrait> = &AnyOf::new(MyStruct1(1i32));
assert_eq!(anyof.get(), 1i32);
assert_eq!(anyof.downcast_ref::<MyStruct1>(), Some(&MyStruct1(1i32)));
assert_eq!(anyof.downcast_ref::<MyStruct2>(), None);
let anyof: &AnyOf<MyTrait> = &AnyO... | rust_cleaned_test_functions.jsonl/66296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7793,
368,
341,
286,
1077,
894,
1055,
25,
609,
8610,
2124,
79333,
49257,
29,
284,
609,
8610,
2124,
486,
931,
37485,
9422,
16,
7,
16,
72,
18,
17,
1106,
286,
2060,
10714,
10297,
3767,
1055,
670,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_rev_states_json_empty() {
init!("ledger");
// empty vector
assert_eq!(build_rev_states_json(Vec::new().as_mut()).unwrap(), "{}".to_string());
// no rev_reg_id
let cred1 = CredInfo {
requested_attr: "height_1".to_string(),
re... | rust_cleaned_test_functions.jsonl/106032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
38082,
22972,
9455,
15124,
368,
341,
286,
2930,
17223,
50704,
3071,
286,
442,
4287,
4621,
198,
286,
2060,
10714,
10297,
5834,
38082,
22972,
9455,
49923,
486,
931,
1005,
300,
29523,
6011,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sys_no_proxy() {
// Stop other threads from modifying process-global ENV while we are.
let _lock = ENVLOCK.lock();
// save system setting first.
let _g1 = env_guard("HTTP_PROXY");
let _g2 = env_guard("NO_PROXY");
let target = "http://example... | rust_cleaned_test_functions.jsonl/6816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
20344,
6536,
29712,
368,
341,
286,
442,
14215,
1008,
14564,
504,
46041,
1882,
73319,
32791,
1393,
582,
525,
624,
286,
1077,
716,
1023,
284,
32791,
8044,
21003,
543,
286,
442,
3581,
1849,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_muldiv() {
assert_eq!(mul_div_i64( 1_000_000_000_001, 1_000_000_000, 1_000_000),
1_000_000_000_001_000);
assert_eq!(mul_div_i64(-1_000_000_000_001, 1_000_000_000, 1_000_000),
-1_000_000_000_001_000);
assert_eq!(mul_div_i64(-1_000_000_... | rust_cleaned_test_functions.jsonl/131788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
611,
368,
341,
286,
2060,
10714,
10297,
24160,
16237,
5318,
21,
19,
7,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
16,
11,
220,
16,
62,
15,
15,
15,
62,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sky130_pdk_layers() -> Result<(), Box<dyn std::error::Error>> {
let pdk = super::super::pdk()?;
let _ = pdk.diff();
let _ = pdk.poly();
let _ = pdk.npc();
let _ = pdk.nwell();
let _ = pdk.licon1();
let _ = pdk.li1();
let _ = pdk.met... | rust_cleaned_test_functions.jsonl/111919 | {
"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,
643,
7891,
16,
18,
15,
620,
7584,
26091,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
1077,
281,
7584,
284,
2256,
486,
9522,
486,
79,
7584,
94136,
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_ban_delete_message_days() {
assert!(ban_delete_message_days(0));
assert!(ban_delete_message_days(1));
assert!(ban_delete_message_days(7));
assert!(!ban_delete_message_days(8));
} | rust_cleaned_test_functions.jsonl/29937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
276,
11353,
6462,
28353,
368,
341,
286,
2060,
10297,
6850,
11353,
6462,
28353,
7,
15,
1106,
286,
2060,
10297,
6850,
11353,
6462,
28353,
7,
16,
1106,
286,
2060,
10297,
6850,
11353,
6462,
28353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_assembler_case_correctness_string_literals() {
// String literals are case sensitive
test_case(&["DAT \"Aa\""], &[0x0041, 0x0061]);
test_case(&["Dat \"Aa\""], &[0x0041, 0x0061]);
} | rust_cleaned_test_functions.jsonl/44775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
35401,
19096,
31550,
2090,
3904,
49643,
368,
341,
262,
442,
923,
75275,
525,
1142,
16216,
198,
262,
1273,
19096,
2099,
1183,
47892,
7245,
32,
64,
2105,
7914,
44590,
15,
87,
15,
15,
19,
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_remove_lonely_vertices()
{
let mut mesh = MeshBuilder::new().subdivided_triangle().build().unwrap();
let mut iter = mesh.face_iter();
let face_id1 = iter.next().unwrap();
let face_id2 = iter.next().unwrap();
mesh.remove_face_unsafe(face_id1);
m... | rust_cleaned_test_functions.jsonl/88710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
57688,
974,
37720,
741,
262,
341,
286,
1077,
5206,
11294,
284,
25122,
3297,
486,
931,
1005,
1966,
611,
4490,
70575,
1005,
5834,
1005,
15454,
543,
286,
1077,
5206,
5367,
284,
11294,
46031,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collect_vote_lockouts_no_epoch_stakes() {
let accounts = gen_stakes(&[(1, &[0])]);
let epoch_stakes = EpochStakes::new_for_tests(2);
let tower = Tower::new(epoch_stakes, 0, 0.67);
let ancestors = vec![(1, vec![0].into_iter().collect()), (0, HashSet::new())]
... | rust_cleaned_test_functions.jsonl/113926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
54360,
9818,
11672,
6536,
20682,
1261,
2050,
368,
341,
286,
1077,
9618,
284,
4081,
1261,
2050,
2099,
9697,
16,
11,
44590,
15,
2467,
2558,
286,
1077,
16342,
1261,
2050,
284,
87379,
623,
2050... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_and_iterator() {
let mut cnt = 0;
let mut vec1 = BitVec::with_capacity(0);
let mut vec2 = BitVec::with_capacity(0);
let mut vec3 = BitVec::with_capacity(0);
let mut vec5 = BitVec::with_capacity(0);
let size = 2333;
for i in 0..size {
... | rust_cleaned_test_functions.jsonl/59464 | {
"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,
13996,
8378,
13491,
368,
341,
286,
1077,
5206,
13195,
284,
220,
15,
280,
286,
1077,
5206,
7486,
16,
284,
6495,
10050,
486,
4197,
35603,
7,
15,
317,
286,
1077,
5206,
7486,
17,
284,
6495,
10050,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_adjacently_a_ser() {
let v = EnumStructAdjacently::VariantA {
foo: 1,
bar: 2,
different: Inner::Foo,
};
let e = "(type:\"VariantA\",content:(foo:1,bar:2,different:Foo,),)";
test_ser(&v, e);
} | rust_cleaned_test_functions.jsonl/110471 | {
"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,
42559,
580,
4402,
4306,
75861,
368,
341,
262,
1077,
348,
284,
14086,
9422,
54866,
580,
4402,
486,
20746,
32,
341,
286,
15229,
25,
220,
16,
345,
286,
3619,
25,
220,
17,
345,
286,
2155,
25,
3635... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_end_training_selected_participant_no_success_run_selection() {
let fl_settings = FederatedLearningSettings {
rounds: 1,
participants_ratio: 1.0,
min_clients: 15,
heartbeat_timeout: 15,
};
let mut protocol = Protocol::new(fl_... | rust_cleaned_test_functions.jsonl/97788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6213,
32891,
23755,
10495,
21757,
6536,
18632,
14007,
23672,
368,
341,
286,
1077,
1320,
10853,
284,
21099,
657,
47467,
6086,
341,
310,
19531,
25,
220,
16,
345,
310,
13026,
19917,
25,
220,
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... | 1 |
#[test]
fn test_is_proxy() {
let mut runtime = JsRuntime::new(RuntimeOptions::default());
let all_true: v8::Global<v8::Value> = runtime
.execute_script(
"is_proxy.js",
r#"
(function () {
const { isProxy } = Deno.core;
const o = { a: 1, b: 2};
const p =... | rust_cleaned_test_functions.jsonl/27012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
29712,
368,
341,
262,
1077,
5206,
15592,
284,
39122,
15123,
486,
931,
52610,
3798,
486,
2258,
1423,
262,
1077,
678,
16082,
25,
348,
23,
486,
11646,
39297,
23,
486,
1130,
29,
284,
15592,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generator() {
let generator = JubJubAffine::prime_subgroup_generator();
assert!(generator.is_on_curve());
assert!(generator.is_in_correct_subgroup_assuming_on_curve());
} | rust_cleaned_test_functions.jsonl/76305 | {
"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,
25813,
368,
341,
262,
1077,
13823,
284,
79280,
41,
392,
25841,
482,
486,
32338,
5228,
4074,
25813,
543,
262,
2060,
10297,
35851,
2079,
4470,
43407,
1423,
262,
2060,
10297,
35851,
2079,
1243,
31550,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iterate_no_roots() {
let mut tables = TableCollection::new(100.).unwrap();
tables.build_index().unwrap();
let treeseq = tables.tree_sequence(TreeSequenceFlags::default()).unwrap();
let mut tree_iter = treeseq.tree_iterator(TreeFlags::default()).unwrap();
w... | rust_cleaned_test_functions.jsonl/23025 | {
"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,
11723,
349,
6536,
26608,
2412,
368,
341,
286,
1077,
5206,
12632,
284,
6633,
6482,
486,
931,
7,
16,
15,
15,
35334,
15454,
543,
286,
12632,
13239,
3560,
1005,
15454,
543,
286,
1077,
4258,
2367,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_navigation_push() {
let mut state = BrowserState::new();
assert_eq!(*state.current_screen(), ScreenName::Home);
assert_eq!(state.count(), 1);
let new_screen = ScreenName::Artist("some_id".to_string());
state.update_with(BrowserAction::NavigationPush(new_... | rust_cleaned_test_functions.jsonl/32246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58051,
14218,
368,
341,
286,
1077,
5206,
1584,
284,
16482,
1397,
486,
931,
1428,
286,
2060,
10714,
0,
4071,
2454,
4952,
17649,
1507,
13948,
675,
486,
7623,
317,
286,
2060,
10714,
10297,
2454,
6501... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_oct_int() {
let cases = vec![
(
Datum::I64(-1),
Datum::Bytes(b"1777777777777777777777".to_vec()),
),
(Datum::I64(0), Datum::Bytes(b"0".to_vec())),
(Datum::I64(1), Datum::Bytes(b"1".to_vec())),
(Da... | rust_cleaned_test_functions.jsonl/44106 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 799
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70135,
4042,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
68459,
486,
40,
21,
19,
4080,
16,
1326,
394,
68459,
486,
7078,
1883,
1,
16,
22,
22,
22,
22,
22,
22,
22,
22,
22,
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... | 2 |
#[test]
fn test_to_bytes() {
let mut bv = Bitv::from_elem(3, true);
bv.set(1, false);
assert_eq!(bv.to_bytes(), vec!(0b10100000));
let mut bv = Bitv::from_elem(9, false);
bv.set(2, true);
bv.set(8, true);
assert_eq!(bv.to_bytes(), vec!(0b00100000, 0b10000... | rust_cleaned_test_functions.jsonl/119287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
12524,
368,
341,
286,
1077,
5206,
56937,
284,
6495,
85,
486,
1499,
28179,
7,
18,
11,
830,
317,
286,
56937,
980,
7,
16,
11,
895,
317,
286,
2060,
10714,
10297,
54929,
2389,
12524,
1507,
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_substitute_parameters_error() {
pyo3::prepare_freethreaded_python();
Python::with_gil(|py| -> () {
let input_type = py.get_type::<BasisRotationInputWrapper>();
let input = input_type
.call1((3, false))
.unwrap()
.cast_as::<PyCell<Basis... | rust_cleaned_test_functions.jsonl/5786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 736
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
7660,
18263,
4096,
368,
341,
262,
4510,
78,
18,
486,
13609,
74179,
769,
878,
291,
55869,
1428,
262,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
1464,
1719,
341,
286,
1077,
1946,
1819,
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_modified_asolute() {
let te = TestEnv::new(&[], &["15mar2018", "30dec2017"]);
change_file_modified(te.test_root().join("15mar2018"), "2018-03-15T12:00:00Z");
change_file_modified(te.test_root().join("30dec2017"), "2017-12-30T23:59:00Z");
te.assert_output(
&["", "--change... | rust_cleaned_test_functions.jsonl/10896 | {
"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,
37749,
11898,
6268,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
2099,
12995,
609,
1183,
16,
20,
5612,
17,
15,
16,
23,
497,
330,
18,
15,
8169,
17,
15,
16,
22,
15049,
262,
2297,
245... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_directory_chain_allocation() {
let (format, mut d64) = get_fresh_d64();
let start = Location(format.directory_track, 1);
let (blocks_allocated, disk_full) = allocate_chain(&mut d64, None, Some(start));
println!(
"blocks allocated: {} disk_full={:?}",
... | rust_cleaned_test_functions.jsonl/9181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14846,
30583,
81267,
368,
341,
286,
1077,
320,
2243,
11,
5206,
294,
21,
19,
8,
284,
633,
761,
2488,
814,
21,
19,
543,
286,
1077,
1191,
284,
9866,
20698,
59937,
28545,
11,
220,
16,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unblock_multi_16() {
new_ucmd!()
.args(&["conv=unblock", "cbs=16"])
.pipe_in_fixture("dd-unblock-cbs16.test")
.succeeds()
.stdout_is_fixture_bytes("dd-unblock-cbs16.spec");
} | rust_cleaned_test_functions.jsonl/99845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
4574,
25133,
62,
16,
21,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12027,
28,
359,
4574,
497,
330,
66,
1279,
28,
16,
21,
14108,
286,
659,
13768,
1243,
74409,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mars_move_forward_over_scent() {
// Given mars
let mut m = Mars::new(Coordinate::new(5, 5));
// And rover on edge
let r1 = Rover::new(Coordinate::new(5, 5), Orientation::N);
// When rover moves off map
let _ignore = m.move_rover(r1, Instructions::... | rust_cleaned_test_functions.jsonl/107064 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
1561,
17134,
32121,
15431,
643,
1168,
368,
341,
286,
442,
16246,
47349,
198,
286,
1077,
5206,
296,
284,
21048,
486,
931,
3025,
78,
8730,
486,
931,
7,
20,
11,
220,
20,
1106,
286,
442,
1597... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_extern_crate() {
assert!(is_extern_crate("extern crate "));
assert!(is_extern_crate("pub extern crate abc"));
assert!(!is_extern_crate("pub extern crat"));
} | rust_cleaned_test_functions.jsonl/578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
62,
4301,
666,
7698,
368,
341,
262,
2060,
10297,
285,
62,
4301,
666,
7698,
445,
4301,
17717,
60240,
262,
2060,
10297,
285,
62,
4301,
666,
7698,
445,
9585,
15637,
17717,
39022,
4010,
262,
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 |
#[test]
fn test_plan_build_ignores_workspace_crates() {
let mut settings = dummy_raze_settings();
settings.genmode = GenMode::Vendored;
let planner = BuildPlannerImpl::new(
dummy_workspace_crate_metadata(templates::BASIC_METADATA),
settings,
);
let planned_build_res = plann... | rust_cleaned_test_functions.jsonl/31789 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26564,
20801,
62,
622,
4589,
75560,
32331,
973,
368,
341,
262,
1077,
5206,
5003,
284,
17292,
59969,
2986,
10853,
543,
262,
5003,
22822,
8516,
284,
9316,
3636,
486,
53,
408,
3018,
401,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eq() {
let a = U32(123456);
let b = U32(123456);
assert_eq!(U32::declassify(a.comp_eq(b)), u32::max_value());
let b = U32(123457);
assert_eq!(U32::declassify(a.comp_eq(b)), 0);
} | rust_cleaned_test_functions.jsonl/112389 | {
"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,
10714,
368,
341,
262,
1077,
264,
284,
547,
18,
17,
7,
16,
17,
18,
19,
20,
21,
317,
262,
1077,
293,
284,
547,
18,
17,
7,
16,
17,
18,
19,
20,
21,
317,
262,
2060,
10714,
10297,
52,
18,
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_tuples() {
check_round_trip(vec![('x', (), false, 0.5f32)]);
check_round_trip(vec![(9i8, 10u16, 1.5f64)]);
check_round_trip(vec![(-12i16, 11u8, 12usize)]);
check_round_trip(vec![(1234567isize, 100000000000000u64, 99999999999999i64)]);
check_round_trip(vec![(String::new(), "so... | rust_cleaned_test_functions.jsonl/24201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
89269,
368,
341,
262,
1779,
29896,
63883,
25592,
20703,
492,
87,
516,
38104,
895,
11,
220,
15,
13,
20,
69,
18,
17,
41958,
262,
1779,
29896,
63883,
25592,
0,
9697,
24,
72,
23,
11,
220,
16,
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_decompiler() {
use std::fs::{self};
let mut data_path = env::current_dir().unwrap();
data_path.push("test_data");
//let mut success = 0;
//let mut skipped = 0;
for entry in fs::read_dir(data_path).expect("Error reading test_data directory.") {
... | rust_cleaned_test_functions.jsonl/114787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 661
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
33620,
368,
341,
286,
990,
1460,
486,
3848,
22964,
721,
2315,
286,
1077,
5206,
821,
2638,
284,
6105,
486,
3231,
4334,
1005,
15454,
543,
286,
821,
2638,
2552,
445,
1944,
1769,
797,
286,
442... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pubsub_new() {
let pubsub_addr = SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0);
let exit = Arc::new(AtomicBool::new(false));
let max_complete_transaction_status_slot = Arc::new(AtomicU64::default());
let GenesisConfigInfo { genesis_config, .. } = creat... | rust_cleaned_test_functions.jsonl/94188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
1966,
5921,
368,
341,
286,
1077,
6675,
1966,
7387,
284,
20954,
13986,
486,
931,
8972,
79,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
15,
11,
220,
15,
11,
220,
15,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_node_step() {
let l = default_logger();
for msg_t in MessageType::values() {
let mut raw_node = new_raw_node(1, vec![1], 10, 1, new_storage(), &l);
let res = raw_node.step(new_message(0, 0, *msg_t, 0));
// local msg should be ignored.
if vec![
... | rust_cleaned_test_functions.jsonl/89564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
5084,
11946,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
369,
3750,
528,
304,
62336,
486,
3661,
368,
341,
286,
1077,
5206,
7112,
5084,
284,
501,
16067,
5084,
7,
16,
11,
7486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_at_end_of_script() {
let mut ctx = EvalPtr::new("123");
assert!(!ctx.at_end_of_script());
let mut ctx = EvalPtr::new("");
assert!(ctx.at_end_of_script());
let mut ctx = EvalPtr::new("]");
assert!(!ctx.at_end_of_script());
ctx.set_bracket_... | rust_cleaned_test_functions.jsonl/58901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
6213,
3575,
14660,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
5348,
486,
931,
445,
16,
17,
18,
797,
286,
2060,
0,
3471,
3773,
6847,
6213,
3575,
14660,
5231,
286,
1077,
5206,
5635,
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_request_from_stream() {
let test_data = b"GET /testpath?foo=bar HTTP/1.1\r\nHost: localhost\r\n\r\n";
let mut stream = MockStream::with_data(VecDeque::from_iter(test_data.iter().cloned()));
let request = Request::from_stream(&mut stream, "1.2.3.4:5678".parse().unwrap());
let req... | rust_cleaned_test_functions.jsonl/77693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
5673,
12673,
368,
341,
262,
1077,
1273,
1769,
284,
293,
1,
3806,
608,
1944,
2343,
30,
7975,
28,
2257,
10130,
14,
16,
13,
16,
12016,
1699,
9296,
25,
47422,
12016,
1699,
12016,
1699,
876,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_authorize_and_withdraw() {
let mint_keypair = Keypair::new();
let mint_pubkey = mint_keypair.pubkey();
let faucet_addr = run_local_faucet(mint_keypair, None);
let test_validator =
TestValidator::with_no_fees(mint_pubkey, Some(faucet_addr), SocketAddrSpace::Unspecifie... | rust_cleaned_test_functions.jsonl/103532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2908
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
22938,
551,
8378,
6615,
7633,
368,
341,
262,
1077,
28337,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
28337,
34014,
792,
284,
28337,
3097,
12670,
47773,
792,
543,
262,
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... | 1 |
#[test]
fn test_list_del_slice() {
Python::with_gil(|py| {
let list = PyList::new(py, &[1, 1, 2, 3, 5, 8]);
list.del_slice(1, 4).unwrap();
assert_eq!([1, 5, 8], list.extract::<[i32; 3]>().unwrap());
list.del_slice(1, 100).unwrap();
assert_eq!([... | rust_cleaned_test_functions.jsonl/108647 | {
"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,
2019,
18029,
26488,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
1140,
284,
5355,
852,
486,
931,
46827,
11,
44590,
16,
11,
220,
16,
11,
220,
17,
11,
220,
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_slice() {
// Test fixed length vector.
let vec_fixed = [1, 2, 3, 4];
let v_a = vec_fixed[1..vec_fixed.len()].to_vec();
assert_eq!(v_a.len(), 3);
assert_eq!(v_a[0], 2);
assert_eq!(v_a[1], 3);
assert_eq!(v_a[2], 4);
// Test on stack.
let vec_stack: &[_] = &[1,... | rust_cleaned_test_functions.jsonl/12856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
262,
442,
3393,
8356,
3084,
4621,
624,
262,
1077,
7486,
37839,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
262,
1077,
348,
4306,
284,
7486,
37839,
58,
16,
496,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmd_dove_call_with_type() {
let project_name = "project_call_with_type";
let project_folder = new_demo_project(project_name).unwrap();
for call in [
vec!["call", "with_type<u8>(1)"],
vec!["call", "with_type(1)", "-t", "u8"],
vec!["call", "with_type", "-a", "1... | rust_cleaned_test_functions.jsonl/70406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11684,
814,
994,
13429,
6615,
1819,
368,
341,
262,
1077,
2390,
1269,
284,
330,
4987,
13429,
6615,
1819,
876,
262,
1077,
2390,
15268,
284,
501,
47830,
16352,
21168,
1269,
568,
15454,
1428,
262,
369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_50limit_250offset_paging_response() {
let test_paging_response = get_response_paging_info(50, 250, TEST_LINK, 1000);
let generated_paging_response = create_test_paging_response(50, 250, 300, 200, 950);
assert_eq!(test_paging_response, generated_paging_response);
... | rust_cleaned_test_functions.jsonl/18447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
20,
15,
9506,
62,
17,
20,
15,
3176,
620,
4118,
9655,
368,
341,
1789,
286,
1077,
1273,
620,
4118,
9655,
284,
633,
9655,
620,
4118,
3109,
7,
20,
15,
11,
220,
17,
20,
15,
11,
13602,
26147... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_conversion() {
let url_str = "https://user:password@iron.com:8080/path?q=wow#fragment";
let url = Url::parse(url_str).unwrap();
// Convert to a generic URL and check fidelity.
let raw_url: ::url::Url = url.clone().into();
assert_eq!(::url::Url::parse(url_... | rust_cleaned_test_functions.jsonl/80270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64132,
368,
341,
286,
1077,
2515,
2895,
284,
330,
2428,
1110,
872,
25,
3833,
31,
2475,
905,
25,
23,
15,
23,
15,
50976,
43782,
28,
57454,
2,
42202,
876,
286,
1077,
2515,
284,
22840,
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_solve_second() {
let input: HashMap<u32, u32> = [(0, 3), (1, 2), (4, 4), (6, 4)].iter().cloned().collect();
assert_eq!(solve_second(&input), 10);
} | rust_cleaned_test_functions.jsonl/76140 | {
"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,
86246,
29644,
368,
341,
286,
1077,
1946,
25,
10528,
34837,
18,
17,
11,
575,
18,
17,
29,
284,
17826,
15,
11,
220,
18,
701,
320,
16,
11,
220,
17,
701,
320,
19,
11,
220,
19,
701,
320,
21,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_only_semiglobal() {
let x = b"TTTT";
let y = b"AAAA";
let score = |a: u8, b: u8| if a == b { 1i32 } else { -3i32 };
let mut aligner = Aligner::new(-5, -1, &score);
let alignment = aligner.semiglobal(x, y);
assert_eq!(alignment.operations, ... | rust_cleaned_test_functions.jsonl/16848 | {
"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,
17678,
18410,
30442,
343,
2042,
368,
341,
286,
1077,
856,
284,
293,
1,
14903,
14903,
876,
286,
1077,
379,
284,
293,
1,
25699,
3302,
286,
1077,
5456,
284,
760,
64,
25,
575,
23,
11,
293,
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... | 2 |
#[test]
fn test_get_log_topics() {
assert_eq!(LOG0.log_topics(), Some(0));
assert_eq!(LOG2.log_topics(), Some(2));
assert_eq!(LOG4.log_topics(), Some(4));
} | rust_cleaned_test_functions.jsonl/43366 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
5224,
64358,
368,
341,
197,
6948,
10714,
10297,
7243,
15,
1665,
64358,
1507,
4329,
7,
15,
1106,
197,
6948,
10714,
10297,
7243,
17,
1665,
64358,
1507,
4329,
7,
17,
1106,
197,
6948,
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 |
#[test]
fn test_filter() {
let passed_events = Rc::new(Cell::new(0));
frp::new_network! { network
source <- source::<bool>();
filtered <- source.filter(|&value| value);
eval filtered ([passed_events](&value) {
assert!(value);
... | rust_cleaned_test_functions.jsonl/98537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
368,
341,
286,
1077,
5823,
19691,
284,
81463,
486,
931,
82530,
486,
931,
7,
15,
1106,
286,
1422,
79,
486,
931,
20966,
0,
314,
3922,
198,
310,
2530,
256,
9119,
2530,
27638,
2641,
3913,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_binary_search_recurse() {
let mut seg = Seg::new(10, || 0);
assert_eq!(seg.reduce(0, 10), 0);
seg.set(5, 10);
let is_ok = &|sum: &usize| *sum < 10;
assert_eq!(
seg.max_right_recurse(is_ok, 0),
5
... | rust_cleaned_test_functions.jsonl/38815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 725
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
10716,
1288,
2352,
325,
368,
972,
310,
1077,
5206,
4810,
284,
17209,
486,
931,
7,
16,
15,
11,
1369,
220,
15,
736,
310,
2060,
10714,
10297,
14607,
23792,
7,
15,
11,
220,
16,
15,
701,
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... | 2 |
#[test]
fn test_create_and_update_policy() {
new_test_ext().execute_with(|| {
let su_policy = super::types::Policy {
value: 150000,
unit: super::types::Unit::Gigabytes,
};
let nu_policy = super::types::Policy {
value: 1000,
unit: super:... | rust_cleaned_test_functions.jsonl/35367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
8378,
8882,
22773,
368,
341,
262,
501,
4452,
9927,
1005,
10257,
6615,
79453,
341,
286,
1077,
913,
22773,
284,
2256,
486,
9242,
486,
13825,
341,
310,
897,
25,
220,
16,
20,
15,
15,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_dkg_pool_filter_by_age() {
let mut pool = DkgPoolImpl::new(MetricsRegistry::new());
let now = current_time();
// 200 sec old
let msg = make_message(Height::from(1), node_test_id(1));
pool.validated.insert(
ic_crypto::crypto_hash(&msg),
... | rust_cleaned_test_functions.jsonl/96879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
7351,
15709,
8727,
3710,
32053,
368,
341,
286,
1077,
5206,
7314,
284,
422,
7351,
10551,
9673,
486,
931,
3189,
13468,
15603,
486,
931,
1423,
286,
1077,
1431,
284,
1482,
3009,
1428,
286,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_secure_join_symlink() {
use std::os::unix::fs::symlink;
let tmp = create_temp_dir("root").unwrap();
let test_root_dir = tmp.path();
symlink("somepath", PathBuf::from(&test_root_dir).join("etc")).unwrap();
symlink(
"../../../../../../../../../... | rust_cleaned_test_functions.jsonl/51832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 589
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73088,
31017,
58530,
44243,
368,
341,
286,
990,
1460,
486,
436,
486,
56646,
486,
3848,
486,
22860,
44243,
401,
286,
1077,
4174,
284,
1855,
11771,
4334,
445,
2888,
1827,
15454,
543,
286,
1077,
1273... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_statsd_client_as_setted() {
let client: Box<dyn Setted<i64>> = Box::new(StatsdClient::from_sink("myapp", NopMetricSink));
client.set("some.set", 5).unwrap();
} | rust_cleaned_test_functions.jsonl/10630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15381,
67,
8179,
11898,
2602,
6565,
368,
341,
286,
1077,
2943,
25,
8261,
92846,
2573,
6565,
21897,
21,
19,
2452,
284,
8261,
486,
931,
7,
16635,
67,
2959,
486,
1499,
51567,
445,
2408,
676,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unknown_long_tag() {
let bytes = hex!("9f 22 01 00");
let res = parse_ber(&bytes).expect("parsing failed");
assert!(res.0.is_empty());
assert_eq!(
res.1,
BerObject {
class: 2,
structured: 0,
tag: BerTag(0x22),
conten... | rust_cleaned_test_functions.jsonl/73529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
17799,
9372,
368,
341,
262,
1077,
5820,
284,
12371,
17223,
24,
69,
220,
17,
17,
220,
15,
16,
220,
15,
15,
797,
262,
1077,
592,
284,
4715,
88165,
2099,
9651,
568,
17119,
445,
79,
28598,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u21_build_valid() {
test_valid::<U21>(r"\u{fa4e}","fa4e",token::EscapeStyle::U21);
} | rust_cleaned_test_functions.jsonl/35030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
17,
16,
20801,
8337,
368,
341,
286,
1273,
8337,
27638,
52,
17,
16,
2235,
81,
11934,
84,
90,
3632,
19,
68,
92,
2198,
3632,
19,
68,
497,
5839,
486,
48124,
2323,
486,
52,
17,
16,
317,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_i8() {
let mut vec = vec![];
for i in ::std::i8::MIN..::std::i8::MAX {
vec.push(i);
}
check_round_trip(vec);
} | rust_cleaned_test_functions.jsonl/24186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
23,
368,
341,
262,
1077,
5206,
7486,
284,
7486,
0,
15078,
262,
369,
600,
304,
3504,
1834,
486,
72,
23,
486,
16413,
496,
486,
1834,
486,
72,
23,
486,
10586,
341,
286,
7486,
2552,
1956,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sub() {
let rusage_a = Rusage::default();
let mut rusage_b = Rusage::default();
rusage_b.nvcsw += 1;
assert!(rusage_b.checked_sub(rusage_a).is_some());
let _ = rusage_b - rusage_a;
assert!(rusage_a.checked_sub(rusage_b).is_none());
} | rust_cleaned_test_functions.jsonl/117666 | {
"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,
5228,
368,
341,
286,
1077,
435,
17698,
4306,
284,
431,
17698,
486,
2258,
543,
286,
1077,
5206,
435,
17698,
880,
284,
431,
17698,
486,
2258,
543,
286,
435,
17698,
880,
1253,
7362,
2280,
1421,
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_append() -> Result<()> {
let ignore_file_path = Path::new(".gitignore");
let file_path = Path::new("foo.txt");
let (_td, repo) = repo_init()?;
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
File::crea... | rust_cleaned_test_functions.jsonl/68778 | {
"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,
26041,
368,
1464,
5714,
71698,
341,
286,
1077,
10034,
2458,
2638,
284,
7933,
486,
931,
5680,
12882,
13130,
797,
286,
1077,
1034,
2638,
284,
7933,
486,
931,
445,
7975,
3909,
797,
286,
1077,
5453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_override_fn_call_width_exceeds_max_width() {
let mut config = Config::default();
config.override_value("fn_call_width", "101");
assert_eq!(config.fn_call_width(), 100);
} | rust_cleaned_test_functions.jsonl/130658 | {
"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,
48576,
15246,
13429,
7927,
2702,
4635,
82,
6345,
7927,
368,
341,
310,
1077,
5206,
2193,
284,
5532,
486,
2258,
543,
310,
2193,
96802,
3142,
445,
8822,
13429,
7927,
497,
330,
16,
15,
16,
797,
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 |
#[test]
fn test_upgrade() {
let resp = Response::build(StatusCode::OK)
.upgrade("websocket")
.finish();
assert!(resp.upgrade());
assert_eq!(
resp.headers().get(header::UPGRADE).unwrap(),
HeaderValue::from_static("websocket")
);
... | rust_cleaned_test_functions.jsonl/18835 | {
"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,
67794,
368,
341,
286,
1077,
9039,
284,
5949,
486,
5834,
7,
15872,
486,
3925,
340,
310,
659,
44230,
445,
83208,
1138,
310,
659,
30150,
543,
286,
2060,
10297,
18243,
17652,
6937,
1423,
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_decode_zero() {
let mut de = TarsDecoder::from(&b"\x0c\x1c\x2c\x3c\x4c\x5c\xfc\xff\x9c\xac\xec"[..]);
let o0 = de.read_int8(128, false, 0).unwrap();
let o1 = de.read_int8(128, false, 13).unwrap();
let v0: u8 = de.read_uint8(0, true, 0).unwrap();
let v1: u... | rust_cleaned_test_functions.jsonl/128472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 740
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
19359,
368,
341,
286,
1077,
5206,
409,
284,
350,
1561,
20732,
486,
1499,
2099,
65,
11934,
87,
15,
66,
3462,
16,
66,
3462,
17,
66,
3462,
18,
66,
3462,
19,
66,
3462,
20,
66,
3462,
8316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_num_set_bits() {
let field = BooleanBitfield::from_bytes(INPUT);
assert_eq!(field.num_set_bits(), 2);
let field = BooleanBitfield::new();
assert_eq!(field.num_set_bits(), 0);
} | rust_cleaned_test_functions.jsonl/30473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4273,
2602,
20034,
368,
341,
286,
1077,
2070,
284,
6992,
8344,
2566,
486,
1499,
12524,
57911,
317,
286,
2060,
10714,
10297,
2566,
10522,
2602,
20034,
1507,
220,
17,
626,
286,
1077,
2070,
284,
6992... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_axes_keep_dim() {
let x =
ndarray::Array::from_shape_vec((2, 3, 4, 5, 6), (0..2 * 3 * 4 * 5 * 6).collect()).unwrap();
let y = map_axes_keep_dim(&x, &[1, 3], |x| x.mean_axis(Axis(1)).unwrap());
assert_eq!(y.shape(), &[2, 1, 4, 1, 6]);
} | rust_cleaned_test_functions.jsonl/114647 | {
"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,
5376,
58394,
50293,
10791,
368,
341,
262,
1077,
856,
4035,
286,
66883,
486,
1857,
486,
1499,
13597,
13251,
1188,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
701,
320,
15,
496,
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_double() {
match Variant::VLong(5).multiply(Variant::VDouble(2.0)).unwrap() {
Variant::VDouble(result) => assert_eq!(result, 10.0),
_ => panic!("assertion failed"),
}
} | rust_cleaned_test_functions.jsonl/84599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
368,
341,
394,
2432,
39292,
486,
53,
6583,
7,
20,
568,
64648,
12410,
15341,
486,
53,
7378,
7,
17,
13,
15,
4579,
15454,
368,
341,
503,
39292,
486,
53,
7378,
4456,
8,
589,
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_shadow_read_write_file() -> Result<()> {
let ts = SystemTime::now()
.duration_since(SystemTime::UNIX_EPOCH)
.context("Failed to get timestamp")?;
let tmpdir = std::env::temp_dir().join(format!("test_shadow_read_write_file_{:?}", ts));
std::fs::crea... | rust_cleaned_test_functions.jsonl/3935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 516
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53120,
6443,
9165,
2458,
368,
1464,
5714,
71698,
341,
286,
1077,
10591,
284,
739,
1462,
486,
3328,
741,
310,
659,
17021,
56262,
10407,
1462,
486,
99089,
2089,
69945,
340,
310,
659,
2147,
445,
9408... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_check_signature_subscribe() {
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(100);
let bank = Bank::new_for_tests(&genesis_config);
let blockhash = bank.last_blockhash();
let mut bank_... | rust_cleaned_test_functions.jsonl/14339 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
39859,
88935,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
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... | 1 |
#[test]
fn test_inner_attr() {
let tokens = quote! {
#![no_std]
};
let expected = "# ! [no_std]";
assert_eq!(expected, tokens.to_string());
} | rust_cleaned_test_functions.jsonl/53423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34345,
10422,
368,
341,
262,
1077,
11211,
284,
12641,
0,
341,
286,
671,
20703,
2152,
15656,
921,
262,
2605,
262,
1077,
3601,
284,
5869,
753,
508,
2152,
15656,
59757,
262,
2060,
10714,
10297,
7325,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_main_export_is_a_memory() {
let wasm: Vec<u8> = vec![
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x05, 0x03, 0x01, 0x00, 0x00, 0x07,
0x08, 0x01, 0x04, 0x6d, 0x61, 0x69, 0x6e, 0x02, 0x00,
];
let mut checker = EcicChecker::default(&wasm);
... | rust_cleaned_test_functions.jsonl/10742 | {
"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,
11027,
27114,
6892,
4306,
19195,
368,
341,
286,
1077,
98263,
25,
11312,
34837,
23,
29,
284,
7486,
90515,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
22,
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_path_cch_canonicalize_ex() {
assert_eq!(
path_cch_canonicalize_ex(r#"C:\Users\Valarauca\Documents\"#).unwrap(),
r#"C:\Users\Valarauca\Documents\"#
);
assert_eq!(
path_cch_canonicalize_ex(r#"C:\Users\Valarauca\Documents\..\..\"#).unwrap(),
r#"C:\Users\"... | rust_cleaned_test_functions.jsonl/84139 | {
"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,
2638,
666,
331,
27421,
22391,
551,
2702,
368,
341,
262,
2060,
10714,
33673,
286,
1815,
666,
331,
27421,
22391,
551,
2702,
2601,
55543,
34,
7190,
7137,
59,
2208,
277,
2863,
924,
59,
27143,
2105,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_issue_reference() {
let issue_reference: IssueReference = read_test_file("issue_reference");
let issue = if let IssueReference::Internal(issue) = issue_reference {
issue
} else {
panic!("expected to have an internal issue reference");
};
assert_eq!(issu... | rust_cleaned_test_functions.jsonl/12943 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 705
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
53340,
25433,
368,
341,
262,
1077,
4265,
25433,
25,
25226,
8856,
284,
1349,
4452,
2458,
445,
11159,
25433,
3071,
262,
1077,
4265,
284,
421,
1077,
25226,
8856,
486,
11569,
94439,
8,
284,
4265... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_concurrent_write_after_transfer_leader_invalidates_locks() {
let mut cluster = new_server_cluster(0, 1);
cluster.cfg.pessimistic_txn.pipelined = true;
cluster.cfg.pessimistic_txn.in_memory = true;
cluster.run();
cluster.must_transfer_leader(1, new_peer(1, 1));
let txn_ex... | rust_cleaned_test_functions.jsonl/8374 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 879
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
9165,
19844,
35403,
79991,
31433,
973,
9818,
82,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
16,
317,
262,
10652,
30481,
556,
66733,
4532,
92299,
556,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cubic_glancing_intersection() {
use std::panic;
// The f64 version currently fails on a very close fat line miss after 57 recursions.
let result = panic::catch_unwind(|| {
do_test(
&CubicBezierSegment {
from: point(0.0, 0.0),
ctrl1:... | rust_cleaned_test_functions.jsonl/14575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 799
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
41181,
34569,
8974,
82558,
368,
341,
262,
990,
1460,
486,
19079,
280,
262,
442,
576,
282,
21,
19,
2319,
5023,
14525,
389,
264,
1602,
3265,
8664,
1555,
3116,
1283,
220,
20,
22,
24724,
908,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_reflect_x() {
assert_relative_eq!(Deg(359.9999999999).reflect_x(),
Deg(0.0000000000001), epsilon=1e-5);
assert_relative_eq!(Deg(180.0).reflect_x(), Deg(180.0));
assert_relative_eq!(Deg(90.0).reflect_x(), Deg(90.0));
assert_relative_eq!(Deg(0.0).reflec... | rust_cleaned_test_functions.jsonl/58810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7793,
767,
3212,
368,
341,
286,
2060,
29286,
10714,
10297,
45657,
7,
18,
20,
24,
13,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
568,
34913,
3212,
1507,
715,
310,
57237,
7,
15,
13,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_huge_buffer() -> anyhow::Result<()> {
let root = Box::new(Echo::<Msg>::new(false));
let mut console = test_console(root);
console.emit(vec![vec!["line 1"].try_into()?; MAX_GRAPHEME_BUFFER * 2]);
let msg = Msg(vec![vec!["line"].try_into()?; 1]);
let state =... | rust_cleaned_test_functions.jsonl/122136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
4733,
7776,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
1077,
3704,
284,
8261,
486,
931,
10722,
958,
27638,
6611,
6831,
931,
3576,
1106,
286,
1077,
5206,
2339,
284,
1273,
51724,
9206,
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... | 4 |
#[test]
fn test_early_exit() {
let (service, client, _server) = prepare_suite();
let (tx, rx) = std_mpsc::channel();
*service.list_feature_listener.lock().unwrap() = Some(tx);
let rect = Rectangle::default();
let l = client.list_features(&rect).unwrap();
let f = l.into_future();
mat... | rust_cleaned_test_functions.jsonl/4346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
22140,
16880,
368,
341,
262,
1077,
320,
7936,
11,
2943,
11,
716,
4030,
8,
284,
10549,
57239,
543,
262,
1077,
320,
3998,
11,
19111,
8,
284,
1460,
717,
81984,
486,
10119,
543,
262,
353,
7936... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_connect_write_then_read() {
Runtime::new().unwrap().block_on(async {
let (mut con1, mut con2) = init_connection_pair().await;
con1.write(&[1u8, 2, 3, 4, 5]).await.unwrap();
let mut buff = [0u8; 1024];
let read = con2.read(&mut buff).await... | rust_cleaned_test_functions.jsonl/54776 | {
"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,
15720,
9165,
68367,
6443,
368,
341,
286,
10954,
486,
931,
1005,
15454,
1005,
4574,
4470,
18285,
341,
310,
1077,
320,
6984,
390,
16,
11,
5206,
390,
17,
8,
284,
2930,
15866,
14445,
1005,
11421,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ovs_dpdk() {
// Create OVS-DPDK bridge and ports
assert!(exec_host_command_status(
"ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev",
)
.success());
assert!(exec_host_command_status("ovs-vsctl add-port ... | rust_cleaned_test_functions.jsonl/29420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83981,
82,
53872,
7584,
368,
341,
310,
442,
4230,
506,
26050,
9420,
47,
18301,
14164,
323,
20325,
198,
310,
2060,
10297,
11748,
12848,
10811,
4773,
1006,
394,
330,
859,
82,
97874,
12373,
912,
3011... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_start_as_follower() {
setup_for_test();
let r = new_test_raft(1, vec![1, 2, 3], 10, 1, new_storage());
assert_eq!(r.state, StateRole::Follower);
} | rust_cleaned_test_functions.jsonl/54462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4906,
11898,
761,
29034,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
435,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
1125,
220,
16,
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
] | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.