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_union() {
let schema = Schema::from_str(UNION_SCHEMA).unwrap();
let union = Value::Union {
index: 1,
inner: Box::new(Value::Long(3)),
n_variants: 2,
null_variant: Some(0),
};
let mut expected = Vec::new();
z... | rust_cleaned_test_functions.jsonl/43034 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
286,
1077,
10802,
284,
12539,
486,
1499,
2895,
7,
1861,
1271,
46220,
568,
15454,
543,
286,
1077,
11300,
284,
5162,
486,
32658,
341,
310,
1922,
25,
220,
16,
345,
310,
9179,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_dir_entries_rejects_invalid_utf8() {
#[rustfmt::skip]
let buf = &[
// entry 0
// ino
1, 0, 0, 0, 0, 0, 0, 0,
// name length
1,
// type
fio::DIRENT_TYPE_FILE,
0x80,
... | rust_cleaned_test_functions.jsonl/4609 | {
"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,
21039,
4334,
26092,
1288,
583,
82,
31433,
39453,
23,
368,
341,
286,
11506,
35788,
12501,
486,
20599,
921,
286,
1077,
6607,
284,
609,
9640,
310,
442,
4343,
220,
15,
198,
310,
442,
304,
78,
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_job_failed() {
fn fn_err(_: String, _: Vec<String>) -> Result<String, Box<Error>> {
sleep(Duration::from_millis(1000));
Err(From::from("err"))
}
let queue = Queue::new("redis://localhost/", "test-failed");
queue.drop().unwrap();
let uuid = queue.enqueue(vec!... | rust_cleaned_test_functions.jsonl/124824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20298,
35060,
368,
341,
262,
5168,
5168,
9266,
73834,
923,
11,
58536,
11312,
3464,
9231,
1464,
5714,
3464,
11,
8261,
27,
1454,
2452,
341,
286,
6084,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alias_before_cast() -> Result<()> {
let out = df![
"a" => [1, 2, 3],
]?
.lazy()
.select([col("a").alias("d").cast(DataType::Int32)])
.select([all()])
.collect()?;
assert_eq!(
Vec::from(out.column("d")?.i32()?),
&[Some(1), Some(2), Some(3)]
... | rust_cleaned_test_functions.jsonl/5218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35947,
23708,
5303,
368,
1464,
5714,
71698,
341,
262,
1077,
700,
284,
6764,
90515,
286,
330,
64,
1,
589,
508,
16,
11,
220,
17,
11,
220,
18,
1259,
262,
2279,
5267,
262,
659,
49013,
741,
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... | 5 |
#[test]
fn test_discovery_scan_result_not_scanning() {
let mut sched = create_sched();
let (_inspector, sme_inspect) = sme_inspect();
assert_variant!(
sched.on_mlme_scan_result(
fidl_mlme::ScanResult {
txn_id: 0,
timesta... | rust_cleaned_test_functions.jsonl/8145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
7449,
28857,
5287,
7913,
13171,
5947,
368,
341,
286,
1077,
5206,
5575,
284,
1855,
67394,
543,
286,
1077,
5453,
1330,
18997,
11,
90467,
34386,
987,
8,
284,
90467,
34386,
987,
543,
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_load_rules() {
let data = vec![
"0: 4 1 5",
"1: 2 3 | 3 2",
"2: 4 4 | 5 5",
"3: 4 5 | 5 4",
"4: \"a\"",
"5: \"b\"",
];
let rules = load_rules(&data);
assert_eq!(rules.len(), 6);
assert_eq!(*rules.get(&0).unwrap(), Rule::And(vec![4, 1, 5]));... | rust_cleaned_test_functions.jsonl/50119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
21407,
368,
341,
262,
1077,
821,
284,
7486,
90515,
414,
330,
15,
25,
220,
19,
220,
16,
220,
20,
756,
414,
330,
16,
25,
220,
17,
220,
18,
760,
220,
18,
220,
17,
756,
414,
330,
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_state_push_write_panic_wrong_sequence_number_equal() {
let state =
MockBufferSharedState::empty_with_n_sequencers(NonZeroU32::try_from(2).unwrap());
state.push_lp(Sequence::new(0, 13), "upc,region=east user=1 100");
state.push_lp(Sequence::new(0, 13), "upc,reg... | rust_cleaned_test_functions.jsonl/53063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
14218,
9165,
620,
31270,
75198,
23735,
5500,
11478,
368,
341,
286,
1077,
1584,
4035,
310,
14563,
4095,
16997,
1397,
486,
3194,
6615,
1089,
3453,
446,
62294,
7,
8121,
17999,
52,
18,
17,
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_non_square_matrix_high() {
let input = vec![vec![1, 5], vec![3, 6], vec![2, 7], vec![3, 8]];
assert_eq!(vec![(0, 1)], find_saddle_points(&input));
} | rust_cleaned_test_functions.jsonl/26643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
39794,
10193,
22680,
368,
341,
262,
1077,
1946,
284,
7486,
20703,
4083,
20703,
16,
11,
220,
20,
1125,
7486,
20703,
18,
11,
220,
21,
1125,
7486,
20703,
17,
11,
220,
22,
1125,
7486,
20703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_configure_vcpu() {
let (vm, mut vcpu) = setup_vcpu();
let vm_config = VmConfig::default();
assert!(vcpu.configure(&vm_config, GuestAddress(0), &vm).is_ok());
// Test configure while using the T2 template.
let mut vm_config = VmConfig::default();
... | rust_cleaned_test_functions.jsonl/26653 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75887,
2273,
16475,
368,
341,
286,
1077,
320,
7338,
11,
5206,
348,
16475,
8,
284,
6505,
2273,
16475,
1428,
286,
1077,
10995,
5332,
284,
647,
76,
2648,
486,
2258,
543,
286,
2060,
10297,
85,
16475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_more_than_staked() {
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_balance(StakeState::size_of());
let minimum_delegation = crate::get_minimum_delegation(&FeatureSet::all_enabled());
let stake_lamports = (rent_exempt_reserve + minimum_de... | rust_cleaned_test_functions.jsonl/31657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1048
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
36664,
51613,
1261,
7741,
368,
341,
286,
1077,
8016,
284,
29737,
486,
2258,
543,
286,
1077,
8016,
95736,
89591,
284,
8016,
57790,
29396,
7,
623,
726,
1397,
486,
2141,
3575,
1423,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_numbers_128bit() {
// unsigned positive
the_same(5u128);
the_same(u128::max_value());
// signed positive
the_same(5i128);
the_same(i128::max_value());
// signed negative
the_same(-5i128);
the_same(i128::min_value());
} | rust_cleaned_test_functions.jsonl/24923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32964,
62,
16,
17,
23,
4489,
368,
341,
262,
442,
3774,
6785,
198,
262,
279,
33574,
7,
20,
84,
16,
17,
23,
317,
262,
279,
33574,
8154,
16,
17,
23,
486,
2810,
3142,
1423,
262,
442,
8499,
678... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parses_sdk_info_from_header() {
let mut event = Annotated::new(Event::default());
let mut processor = NormalizeProcessor::new(
Arc::new(StoreConfig {
client: Some("_fooBar/0.0.0".to_string()),
..StoreConfig::default()
}),
None,
);
p... | rust_cleaned_test_functions.jsonl/14103 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77113,
288,
61783,
3109,
5673,
8757,
368,
341,
262,
1077,
5206,
1538,
284,
1527,
87029,
486,
931,
30469,
486,
2258,
1423,
262,
1077,
5206,
17654,
284,
68092,
22946,
486,
931,
1006,
286,
19689,
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_execute_issue_not_found_fails() {
run_test(|| {
ext::vault_registry::get_active_vault_from_id::<Test>
.mock_safe(|_| MockResult::Return(Ok(init_zero_vault(VAULT))));
assert_noop!(execute_issue(USER, &H256([0; 32])), TestError::IssueIdNotFound);
})
} | rust_cleaned_test_functions.jsonl/104084 | {
"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,
44329,
53340,
7913,
21480,
761,
6209,
368,
341,
262,
1598,
4452,
79453,
341,
286,
1303,
486,
82983,
50650,
486,
455,
12930,
2273,
945,
5673,
842,
27638,
2271,
397,
310,
659,
16712,
34067,
22428,
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... | 2 |
#[test]
fn test_hover_test_has_action() {
check_actions(
r#"
#[test]
fn foo_<|>test() {}
"#,
expect![[r#"
[
Runnable(
Runnable {
nav: NavigationTarget {
file_id... | rust_cleaned_test_functions.jsonl/66160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1077
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
4452,
21778,
7931,
368,
341,
286,
1779,
25368,
1006,
310,
435,
2,
698,
13353,
1944,
921,
8822,
15229,
41743,
91,
29,
1944,
368,
5613,
57676,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
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_local_request() {
let mut ctx = CsmTestContext::new(ConnState::LocalInit);
// Host-initiated connections should first yield a connection request packet.
assert!(ctx.conn.has_pending_rx());
// armed.
assert!(!ctx.conn.will_expire());
ctx.re... | rust_cleaned_test_functions.jsonl/83285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
7893,
368,
341,
286,
1077,
5206,
5635,
284,
356,
3563,
2271,
1972,
486,
931,
7,
9701,
1397,
486,
7319,
3803,
317,
286,
442,
16102,
54773,
10029,
13234,
1265,
1156,
7540,
264,
3633,
1681,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index_aggr_first() {
let data = vec![
(1, Some("name:0"), 2),
(2, Some("name:3"), 3),
(4, Some("name:0"), 1),
(5, Some("name:5"), 4),
(6, Some("name:5"), 4),
(7, None, 4),
];
let product = ProductTable::new();
let (_, endpoint) = i... | rust_cleaned_test_functions.jsonl/34864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
20587,
901,
12978,
368,
341,
262,
1077,
821,
284,
7486,
90515,
286,
320,
16,
11,
4329,
445,
606,
25,
15,
3975,
220,
17,
1326,
286,
320,
17,
11,
4329,
445,
606,
25,
18,
3975,
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... | 2 |
#[test]
fn test_parse_radial_gradient_1() {
assert_eq!(parse_css_background("radial-gradient(circle, lime, blue, yellow)"),
Ok(StyleBackground::RadialGradient(RadialGradientPreInfo {
shape: Shape::Circle,
extend_mode: ExtendMode::Clamp,
stops: ... | rust_cleaned_test_functions.jsonl/37095 | {
"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,
21039,
39764,
530,
49482,
62,
16,
368,
341,
286,
2060,
10714,
10297,
6400,
25924,
24103,
445,
13281,
530,
42738,
86154,
11,
41719,
11,
6303,
11,
13753,
8,
4461,
310,
7622,
7,
2323,
8706,
486,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sample_simple_messages_columns() {
let mut output = Cursor::new(Vec::new());
let parquet = api::tests::temp_file("msg", ".parquet");
let path_str = parquet.path().to_str().unwrap();
let path = parquet.path();
let expected = vec![
"field_boolean... | rust_cleaned_test_functions.jsonl/118651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
30015,
23428,
22590,
368,
341,
286,
1077,
5206,
2550,
284,
28067,
486,
931,
49923,
486,
931,
1423,
286,
1077,
1346,
23300,
284,
6330,
486,
23841,
486,
3888,
2458,
445,
3236,
497,
5933,
1732... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consts() {
// check our constants are what Complex::new creates
fn test(c: Complex64, r: f64, i: f64) {
assert_eq!(c, Complex::new(r, i));
}
test(_0_0i, 0.0, 0.0);
test(_1_0i, 1.0, 0.0);
test(_1_1i, 1.0, 1.0);
test(_neg1_1i, -1.... | rust_cleaned_test_functions.jsonl/105652 | {
"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,
48530,
368,
341,
286,
442,
1779,
1039,
18021,
525,
1128,
22096,
486,
931,
11450,
198,
286,
5168,
1273,
1337,
25,
22096,
21,
19,
11,
435,
25,
282,
21,
19,
11,
600,
25,
282,
21,
19,
8,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type_coersion() -> Result<()> {
test_coercion!(
Int32Array,
DataType::Int32,
vec![1i32, 2i32],
UInt32Array,
DataType::UInt32,
vec![1u32, 2u32],
Operator::Plus,
Int32Array,
DataType... | rust_cleaned_test_functions.jsonl/22556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1936
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
11393,
1325,
368,
1464,
5714,
71698,
341,
286,
1273,
11393,
2962,
290,
33673,
310,
1333,
18,
17,
1857,
345,
310,
33172,
486,
1072,
18,
17,
345,
310,
7486,
20703,
16,
72,
18,
17,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decoder_receive_return_value() {
let seed = "Wolf";
let message_size = 1000;
let max_fragment_length = 10;
let message = crate::xoshiro::test_utils::make_message(seed, message_size);
let mut encoder = Encoder::new(&message, max_fragment_length);
l... | rust_cleaned_test_functions.jsonl/106875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
38557,
12511,
3142,
368,
341,
286,
1077,
10320,
284,
330,
95434,
876,
286,
1077,
1943,
2368,
284,
220,
16,
15,
15,
15,
280,
286,
1077,
1932,
43012,
5118,
284,
220,
16,
15,
401,
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... | 2 |
#[test]
fn test_roundtrip_hyphenated() {
let uuid_orig = new();
let orig_str = uuid_orig.to_hyphenated().to_string();
let uuid_out = Uuid::parse_str(&orig_str).unwrap();
assert_eq!(uuid_orig, uuid_out);
} | rust_cleaned_test_functions.jsonl/114741 | {
"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,
29896,
32981,
1523,
88,
14769,
657,
368,
341,
286,
1077,
16040,
35328,
284,
501,
543,
286,
1077,
2713,
2895,
284,
16040,
35328,
2389,
1523,
88,
14769,
657,
1005,
983,
3904,
543,
286,
1077,
16040,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_incr() {
assert_eq!(incr("key", 1), "incr key 1\r\n");
assert_eq!(incr("key", 1000), "incr key 1000\r\n");
} | rust_cleaned_test_functions.jsonl/26813 | {
"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,
1243,
5082,
368,
341,
286,
2060,
10714,
10297,
98428,
445,
792,
497,
220,
16,
701,
330,
98428,
1376,
220,
16,
12016,
1699,
797,
286,
2060,
10714,
10297,
98428,
445,
792,
497,
220,
16,
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 |
#[test]
fn test_partial_factors_divide_by() {
for n in 2..200 {
let factors = PartialFactors::compute(n);
for power2 in 0..5 {
for power3 in 0..4 {
for power5 in 0..3 {
for power7 in 0..3 {
f... | rust_cleaned_test_functions.jsonl/33863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 987
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52068,
73040,
16237,
577,
3710,
368,
341,
286,
369,
308,
304,
220,
17,
496,
17,
15,
15,
341,
310,
1077,
9363,
284,
24552,
97769,
486,
27706,
1445,
626,
310,
369,
2355,
17,
304,
220,
15,
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... | 9 |
#[test]
fn test_is_utf8_latin1_invalid() {
assert!(!is_utf8_latin1(b"\xC3"));
assert!(!is_utf8_latin1(b"a\xC3"));
assert!(!is_utf8_latin1(b"\xFF"));
assert!(!is_utf8_latin1(b"a\xFF"));
assert!(!is_utf8_latin1(b"\xC3\xFF"));
assert!(!is_utf8_latin1(b"a\xC3\xFF"));
... | rust_cleaned_test_functions.jsonl/27306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
39453,
23,
907,
14768,
16,
31433,
368,
341,
286,
2060,
0,
3471,
285,
39453,
23,
907,
14768,
16,
1883,
11934,
12125,
18,
4010,
286,
2060,
0,
3471,
285,
39453,
23,
907,
14768,
16,
1883,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chan_drop_order() {
// we make the async just block on a channel which we can control from outside
let (tx, rx) = chan::bounded(1);
let a = Async::run(crate::logging::test_logger(), move || rx.recv());
let c = a.chan();
assert_eq!(
c.r... | rust_cleaned_test_functions.jsonl/42283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45552,
29584,
7869,
368,
341,
286,
442,
582,
1281,
279,
3312,
1101,
2504,
389,
264,
5496,
892,
582,
646,
2524,
504,
4889,
198,
286,
1077,
320,
3998,
11,
19111,
8,
284,
26023,
486,
65686,
7,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_domain_type_object_array_object() {
// FIXME
let ty = DomainType {
annotation: Default::default(),
id: "ty".to_string(),
r#type: Type::Object(vec![Property {
annotation: Default::default(),
name: "object".into(),
r#type: Type::A... | rust_cleaned_test_functions.jsonl/26910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 746
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
1819,
5314,
3858,
5314,
368,
341,
262,
442,
27475,
198,
262,
1077,
13580,
284,
21070,
929,
341,
286,
21223,
25,
7899,
486,
2258,
3148,
286,
877,
25,
330,
1881,
3263,
983,
3904,
3148,
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_decode() {
let buf:Vec<u8> = vec![0u8, 0, 0, 0, 0, 0, 0, 0, 0, 16, 0, 10, 0, 15, 0, 1, 0, 2, 104, 105];
let msg = Testproto::decode(&mut &buf[..]).unwrap();
assert!(Testproto::Message { a: 10, b: 15, c: Arr::<u16,String>::new(vec!["hi".to_string()]) } == msg);
} | rust_cleaned_test_functions.jsonl/69299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
368,
341,
286,
1077,
6607,
25,
10050,
34837,
23,
29,
284,
7486,
20703,
15,
84,
23,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vcx_connection_create() {
init!("true");
let cb = return_types_u32::Return_U32_U32::new().unwrap();
let rc = vcx_connection_create(cb.command_handle,
CString::new("test_create").unwrap().into_raw(),
... | rust_cleaned_test_functions.jsonl/25719 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
15866,
8657,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
9858,
284,
470,
9763,
7300,
18,
17,
486,
5598,
6665,
18,
17,
6665,
18,
17,
486,
931,
1005,
15454,
543,
286,
1077,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compression_ratio() {
let path = TempDir::new("_util_rocksdb_test_compression_ratio").expect("");
let path_str = path.path().to_str().unwrap();
let opts = DBOptions::new();
let cf_opts = CFOptions::new(CF_DEFAULT, ColumnFamilyOptions::new());
let db = new... | rust_cleaned_test_functions.jsonl/90345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
4011,
19917,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
1314,
26608,
14553,
1999,
4452,
2965,
4011,
19917,
1827,
17119,
13056,
286,
1077,
1815,
2895,
284,
1815,
3875,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_valid_block_invalid_node_state() {
let state = NodeState::Joining;
let blockhash = SHA256Hash::from_slice(&hex::decode(HASH).unwrap()[..]).unwrap();
assert!(get_valid_block(&state, blockhash).is_err());
} | rust_cleaned_test_functions.jsonl/75389 | {
"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,
3062,
8337,
7113,
31433,
5084,
4387,
368,
341,
286,
1077,
1584,
284,
6018,
1397,
486,
12292,
287,
280,
286,
1077,
2504,
8296,
284,
21721,
17,
20,
21,
6370,
486,
1499,
26488,
2099,
17308,
486,
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_batch() {
let keyspace = MyKeyspace::new();
let req = keyspace
.batch()
.logged()
.insert(&3, &9.0)
.update_query(&3, &8.0)
.insert_prepared(&3, &8.0)
.delete_prepared::<_, f32>(&3)
.consistency(... | rust_cleaned_test_functions.jsonl/37456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
368,
341,
286,
1077,
6894,
1306,
284,
3017,
8850,
1306,
486,
931,
543,
286,
1077,
4232,
284,
6894,
1306,
198,
310,
659,
14049,
741,
310,
659,
24867,
368,
715,
310,
659,
4208,
2099,
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_longest_consecutive_3() {
let tree = tree_node!(1, tree_node!(2, tree_leaf!(4), None), tree_leaf!(3));
assert_eq!(Solution::longest_consecutive(tree), 2);
} | rust_cleaned_test_functions.jsonl/88516 | {
"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,
17799,
477,
3382,
85780,
62,
18,
368,
341,
286,
1077,
4916,
284,
4916,
5084,
10297,
16,
11,
4916,
5084,
10297,
17,
11,
4916,
38909,
10297,
19,
701,
2240,
701,
4916,
38909,
10297,
18,
1106,
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 |
#[test]
fn test_input() {
use super::*;
let input_json = r#"
{
"root": "/home/user/rust_projects/tikv",
"file": "src/utils.rs",
"pos": "12:10: 12:31"
}"#;
let input_struct: Input = serde_json::from_str(input_json).unwrap();
let input_str... | rust_cleaned_test_functions.jsonl/99535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
368,
341,
286,
990,
2256,
56162,
286,
1077,
1946,
9455,
284,
435,
2,
698,
286,
341,
7472,
330,
2888,
788,
3521,
5117,
11739,
7382,
590,
58774,
5523,
1579,
85,
756,
7472,
330,
1192,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_erasure_generate_coding_reset_on_new_slot() {
morgan_logger::setup();
let mut coding_generator = CodingGenerator::default();
// test coding by iterating one blob at a time
let data_blobs = generate_test_blobs(0, NUM_DATA * 2);
for i in NUM_DATA..NUM_DAT... | rust_cleaned_test_functions.jsonl/12501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80604,
3970,
48851,
666,
3700,
18983,
4470,
5921,
27563,
368,
341,
286,
296,
8462,
27413,
486,
15188,
1428,
286,
1077,
5206,
10822,
25813,
284,
48075,
12561,
486,
2258,
1428,
286,
442,
1273,
10822,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vaporization_order_test() {
let map = string_to_asteroid_map(
".#....#####...#..\n\
##...##.#####..##\n\
##...#...#.#####.\n\
..#.....#...###..\n\
..#.#.....#....##",
);
let station_loc = AsteroidLocation::ne... | rust_cleaned_test_functions.jsonl/69388 | {
"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,
2273,
20715,
2022,
7869,
4452,
368,
341,
286,
1077,
2415,
284,
914,
2346,
62,
2300,
588,
5376,
1006,
310,
5933,
2,
1934,
67331,
1112,
2,
60402,
77,
5661,
1797,
7704,
1112,
565,
13,
67331,
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_process_new_vote_state_slots_not_ordered() {
let mut vote_state1 = VoteState::default();
let bad_votes: VecDeque<Lockout> = vec![
Lockout {
slot: 1,
confirmation_count: 2,
},
Lockout {
slot: 0,
... | rust_cleaned_test_functions.jsonl/6120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 813
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
5921,
54360,
4387,
54161,
7913,
75272,
368,
341,
286,
1077,
5206,
6910,
4387,
16,
284,
34034,
1397,
486,
2258,
1428,
286,
1077,
3873,
65116,
25,
11312,
73891,
27,
11989,
411,
29,
284,
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... | 1 |
#[test]
fn test_readuntil() {
run_on(|| {
let (mut sender, payload) = Payload::create(false);
let mut payload = PayloadBuffer::new(payload);
assert_eq!(None, payload.read_until(b"ne").unwrap());
sender.feed_data(Bytes::from("line1"));
sender.... | rust_cleaned_test_functions.jsonl/43770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
38730,
368,
341,
286,
1598,
4470,
79453,
341,
310,
1077,
320,
6984,
4646,
11,
7729,
8,
284,
52916,
486,
3182,
3576,
317,
310,
1077,
5206,
7729,
284,
52916,
4095,
486,
931,
26772,
626,
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_transcribes_thymine_to_adenine() {
assert_eq!(dna::RibonucleicAcid::new("A"), dna::DeoxyribonucleicAcid::new("T").to_rna());
} | rust_cleaned_test_functions.jsonl/36949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
55136,
5854,
1600,
482,
2346,
10027,
268,
482,
368,
341,
262,
2060,
10714,
10297,
92877,
486,
98884,
263,
22147,
292,
11654,
307,
486,
931,
445,
32,
3975,
75334,
486,
1912,
60163,
1897,
263,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_write_list() {
test_encode_ok(&[
(vec![], "[]"),
(vec![true], "[true]"),
(vec![true, false], "[true,false]"),
]);
test_encode_ok(&[
(vec![vec![], vec![], vec![]], "[[],[],[]]"),
(vec![vec![1, 2, 3], vec![], vec![]], "[[1,2,3],[],[]]"),
... | rust_cleaned_test_functions.jsonl/29820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 797
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
2019,
368,
341,
262,
1273,
11224,
19817,
2099,
9640,
286,
320,
4083,
0,
12995,
330,
1294,
4461,
286,
320,
4083,
20703,
1866,
1125,
10545,
1866,
60,
4461,
286,
320,
4083,
20703,
1866,
11,
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_simple_name() -> Result<()> {
let name = SqlName::new("safe_name").safe();
assert_eq!(&name, "safe_name");
let name = SqlName::new("safe_name").alias("sn").safe();
assert_eq!(&name, "safe_name AS sn");
let name = name!("safe_name");
assert_eq!(&n... | rust_cleaned_test_functions.jsonl/74805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
1269,
368,
1464,
5714,
71698,
341,
286,
1077,
829,
284,
7224,
675,
486,
931,
445,
18675,
1269,
1827,
18675,
543,
286,
2060,
10714,
0,
2099,
606,
11,
330,
18675,
1269,
3071,
286,
1077,
829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type() {
assert_eq!(
rsass(
"a {b: type-of(ie-hex-str(#daddee))}\
\n"
)
.unwrap(),
"a {\
\n b: string;\
\n}\
\n"
);
} | rust_cleaned_test_functions.jsonl/73578 | {
"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,
1819,
368,
341,
286,
2060,
10714,
33673,
310,
10036,
395,
1006,
394,
330,
64,
314,
65,
25,
943,
8668,
7,
645,
2832,
327,
41628,
32735,
55844,
57894,
593,
92,
5661,
310,
1124,
77,
698,
310,
172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug_error() {
let code = 6;
let msg = error_string(code);
let err = Error { repr: super::Repr::Os(code) };
let expected = format!("Error {{ repr: Os {{ code: {:?}, message: {:?} }} }}", code, msg);
assert_eq!(format!("{:?}", err), expected);
} | rust_cleaned_test_functions.jsonl/8215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
4096,
368,
341,
286,
1077,
2038,
284,
220,
21,
280,
286,
1077,
3750,
284,
1465,
3904,
15842,
317,
286,
1077,
1848,
284,
4600,
314,
30636,
25,
2256,
486,
693,
649,
486,
28867,
15842,
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_parse_bits() {
let bits = EXAMPLE_BITS.chars().map(|c| if c == '1' { H } else { L });
let packet = Packet::parse_bits(bits).unwrap();
assert_eq!(packet.version_sum(), 7 + 2 + 4 + 1);
} | rust_cleaned_test_functions.jsonl/129857 | {
"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,
21039,
20034,
368,
341,
286,
1077,
9472,
284,
66246,
32695,
85062,
1005,
2186,
22428,
66,
91,
421,
272,
621,
364,
16,
6,
314,
472,
335,
770,
314,
444,
1625,
286,
1077,
10151,
284,
28889,
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_apply_pwa() {
use crate::apps_registry::AppsRegistry;
use crate::config;
use config::Config;
use std::env;
let _ = env_logger::try_init();
// Init apps from test-fixtures/webapps and verify in test-apps-dir-pwa.
let current = env::current_dir().unwrap();
let roo... | rust_cleaned_test_functions.jsonl/127288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2036
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
620,
9991,
368,
341,
262,
990,
17717,
486,
27635,
50650,
486,
53602,
15603,
280,
262,
990,
17717,
486,
1676,
280,
262,
990,
2193,
486,
2648,
280,
262,
990,
1460,
486,
3160,
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... | 9 |
#[test]
fn test_status() {
let list = SongList::new_from_initial_batch(batch(0));
assert_eq!(list.status(0), SongIndexStatus::Present);
assert_eq!(list.status(6), SongIndexStatus::Absent);
assert_eq!(list.status(10), SongIndexStatus::OutOfBounds);
} | rust_cleaned_test_functions.jsonl/101860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
368,
341,
286,
1077,
1140,
284,
18971,
852,
486,
931,
5673,
15809,
14534,
30139,
7,
15,
1106,
286,
2060,
10714,
10297,
1607,
4299,
7,
15,
701,
18971,
1552,
2522,
486,
21195,
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_system_path() {
let mut pathbufs: Vec<PathBuf> = Vec::new();
pathbufs.push(shim_dir());
pathbufs.push(PathBuf::from("C:\\\\somebin"));
pathbufs.push(PathBuf::from("D:\\\\ProbramFlies"));
let path_with_shims = std::env::join_paths(pathbufs.iter())
... | rust_cleaned_test_functions.jsonl/132774 | {
"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,
17687,
2638,
368,
341,
286,
1077,
5206,
1815,
5909,
82,
25,
11312,
82883,
15064,
29,
284,
11312,
486,
931,
543,
286,
1815,
5909,
82,
2552,
23254,
318,
4334,
1423,
286,
1815,
5909,
82,
2552,
3303... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_latest_slot() {
let slot_slice = vec![(0, true), (5, true), (3, true), (7, true)];
let index = AccountsIndex::<bool>::default();
assert!(index.latest_slot(None, &slot_slice, None).is_none());
index.add_root(5, false);
assert_eq!(index.l... | rust_cleaned_test_functions.jsonl/2238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 637
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64880,
27563,
368,
341,
286,
1077,
9446,
26488,
284,
7486,
0,
9697,
15,
11,
830,
701,
320,
20,
11,
830,
701,
320,
18,
11,
830,
701,
320,
22,
11,
830,
12587,
286,
1077,
1922,
284,
40655,
1552... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_initialized() {
with_rewards_default(|_, accounts| {
for (picasso_account, remote_account) in accounts.into_iter() {
assert_noop!(remote_account.associate(picasso_account), Error::<Test>::NotInitialized);
}
});
} | rust_cleaned_test_functions.jsonl/41088 | {
"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,
7913,
62421,
368,
341,
46948,
77997,
9993,
22428,
6878,
9618,
91,
341,
197,
2023,
320,
15587,
28863,
13500,
11,
8699,
13500,
8,
304,
9618,
39860,
11723,
368,
341,
298,
6948,
6536,
453,
10297,
1814... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nested_in_records_not_supported_yet() {
let ir = ir_from_cc("struct SomeStruct { struct NestedStruct {}; };").unwrap();
assert_ir_matches!(
ir,
quote! { UnsupportedItem {
name: "SomeStruct::NestedStruct",
message: "Nested classes are not suppor... | rust_cleaned_test_functions.jsonl/37197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31279,
66279,
1243,
31279,
7913,
57885,
4178,
295,
368,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
445,
1235,
4329,
9422,
314,
2036,
71742,
9422,
52166,
20066,
1827,
15454,
543,
262,
2060,
51433,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_avg_return_type() -> Result<()> {
let observed = return_type(&AggregateFunction::Avg, &[DataType::Float32])?;
assert_eq!(DataType::Float64, observed);
let observed = return_type(&AggregateFunction::Avg, &[DataType::Float64])?;
assert_eq!(DataType::Float64, observ... | rust_cleaned_test_functions.jsonl/4598 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26631,
12511,
1819,
368,
1464,
5714,
71698,
341,
286,
1077,
13166,
284,
470,
1819,
2099,
64580,
5152,
486,
39447,
11,
44590,
22653,
486,
5442,
18,
17,
2467,
37445,
286,
2060,
10714,
10297,
22653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_conf_change_check_before_campaign() {
let l = default_logger();
let mut nt = Network::new(vec![None, None, None], &l);
nt.send(vec![new_message(1, 1, MessageType::MsgHup, 0)]);
assert_eq!(nt.peers[&1].state, StateRole::Leader);
let mut m = new_message(1, 1, MessageType::MsgP... | rust_cleaned_test_functions.jsonl/19192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1042
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16059,
15947,
7200,
23708,
58561,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
31412,
284,
8141,
486,
931,
25592,
20703,
4064,
11,
2240,
11,
2240,
1125,
609,
75,
317,
262,
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_format_mem_access() {
let mut bus = Bus::new(test_rom(), |ppu: &NesPPU, &mut Joypad| {});
bus.mem_write(100, 0x11);
bus.mem_write(101, 0x33);
// Data
bus.mem_write(0x33, 00);
bus.mem_write(0x34, 04);
// Target Cell
bus.me... | rust_cleaned_test_functions.jsonl/82245 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8955,
12976,
12759,
368,
341,
286,
1077,
5206,
5828,
284,
18598,
486,
931,
8623,
81383,
1507,
760,
602,
84,
25,
609,
45,
288,
4406,
52,
11,
609,
6984,
10946,
54295,
91,
35311,
1789,
286,
5828,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aes128_cmac() {
// NOTE: CMAC-KEY 为 前面的一半。
let key = hex::decode("2b7e151628aed2a6abf7158809cf4f3c\
fffefdfcfbfaf9f8f7f6f5f4f3f2f1f0").unwrap();
let cipher = AesSivCmac256::new(&key);
let k1 = &cipher.cmac_k1;
let k2 = &cipher.cmac_k2;
assert_eq!(&k1[..], &hex::deco... | rust_cleaned_test_functions.jsonl/78461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 727
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
16,
17,
23,
666,
11948,
368,
341,
262,
442,
16743,
25,
18090,
1706,
12,
4784,
220,
17714,
4891,
231,
235,
27091,
99774,
99369,
8997,
262,
1077,
1376,
284,
12371,
486,
18196,
445,
17,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issues_16() {
// See: https://github.com/sile/libflate/issues/16
let encoded =
include_bytes!("../data/issues_16/crash-1bb6d408475a5bd57247ee40f290830adfe2086e");
assert_eq!(
decode_all(&encoded[..]).err().map(|e| e.to_string()),
Some(... | rust_cleaned_test_functions.jsonl/37992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 510
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90232,
62,
16,
21,
368,
341,
286,
442,
3496,
25,
3703,
1110,
5204,
905,
2687,
457,
8194,
16716,
38745,
14,
16,
21,
271,
286,
1077,
20498,
4035,
310,
2924,
12524,
17223,
1244,
691,
38745,
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... | 1 |
#[test]
fn test_lambda() {
assert_eq!(lambda("||{}"), nom_ok(Expr::Lambda(vec![], Block::new())));
assert_eq!(lambda("|a|{ a::b; }"), nom_ok(Expr::Lambda(
vec!["a".to_string()],
nom_eval(block_body("a::b;")),
)));
} | rust_cleaned_test_functions.jsonl/14403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51884,
368,
341,
286,
2060,
10714,
10297,
12935,
445,
8484,
6257,
3975,
9662,
19817,
7,
16041,
486,
58266,
25592,
0,
12995,
8362,
486,
931,
45722,
286,
2060,
10714,
10297,
12935,
38547,
64,
91,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crypto1() {
let ev = new_fin_event(100);
let mut encrypt_ctx = CryptoContext::new(
METHOD_CHACHA20_POLY1305,
"21321321321321312321321321212asdfasdasdas1",
21321312,
);
let mut decrypt_ctx = encrypt_ctx.clone();
let mut b... | rust_cleaned_test_functions.jsonl/34285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78298,
16,
368,
341,
286,
1077,
3637,
284,
501,
39737,
6748,
7,
16,
15,
15,
317,
286,
1077,
5206,
29625,
15147,
284,
32886,
1972,
486,
931,
1006,
310,
32397,
6466,
11873,
32,
17,
15,
33165,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arithmetic() {
let input = "echo $((foo bar baz bing 3 * 2))";
let expected = vec![
WordToken::Normal("echo".into(), false, false),
WordToken::Whitespace(" "),
WordToken::Arithmetic("foo bar baz bing 3 * 2"),
];
compare(input, expected);
} | rust_cleaned_test_functions.jsonl/33791 | {
"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,
25842,
25922,
368,
341,
262,
1077,
1946,
284,
330,
3047,
400,
1188,
7975,
3619,
50247,
293,
287,
220,
18,
353,
220,
17,
593,
876,
262,
1077,
3601,
284,
7486,
90515,
286,
9322,
3323,
486,
12206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compute_num_bits() {
assert_eq!(compute_num_bits(1), 1u8);
assert_eq!(compute_num_bits(0), 0u8);
assert_eq!(compute_num_bits(2), 2u8);
assert_eq!(compute_num_bits(3), 2u8);
assert_eq!(compute_num_bits(4), 3u8);
assert_eq!(compute_num_bits(255), 8u8... | rust_cleaned_test_functions.jsonl/86451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
4273,
20034,
368,
341,
286,
2060,
10714,
10297,
27706,
4273,
20034,
7,
16,
701,
220,
16,
84,
23,
317,
286,
2060,
10714,
10297,
27706,
4273,
20034,
7,
15,
701,
220,
15,
84,
23,
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_ldxb_all() {
test_interpreter_and_jit_asm!(
"
mov r0, r1
ldxb r9, [r0+0]
lsh r9, 0
ldxb r8, [r0+1]
lsh r8, 4
ldxb r7, [r0+2]
lsh r7, 8
ldxb r6, [r0+3]
lsh r6, 12
ldxb r5, [r0+4]
lsh r5, 16
... | rust_cleaned_test_functions.jsonl/58987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50573,
7929,
5705,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
435,
16,
198,
286,
26129,
7929,
435,
24,
11,
508,
81,
15,
10,
15,
921,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_page_iterator() {
let file = get_test_file("alltypes_plain.parquet");
let file_reader = Arc::new(SerializedFileReader::new(file).unwrap());
let mut page_iterator = FilePageIterator::new(0, file_reader.clone()).unwrap();
// read first page
let page = page... | rust_cleaned_test_functions.jsonl/27263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 412
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6129,
13491,
368,
341,
286,
1077,
1034,
284,
633,
4452,
2458,
445,
541,
9242,
41015,
33277,
23300,
797,
286,
1077,
1034,
22306,
284,
19689,
486,
931,
3759,
67577,
1703,
5062,
486,
931,
4866,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nonexistent_file_does_not_exist() {
new_ucmd!()
.args(&["-e", "nonexistent_file"])
.run()
.status_code(1);
} | rust_cleaned_test_functions.jsonl/11008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
64085,
2458,
96374,
7913,
35906,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
68,
497,
330,
6280,
64085,
2458,
14108,
286,
659,
6108,
741,
286,
659,
2829,
4136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_write_contrast_color_variables() {
let mut w = Writer {
table: HashMap::new(),
highlights: &[],
term_colors: DUMMY_TERM_COLORS,
airline_theme: dummy_airline_theme(),
out: Vec::new(),
};
w.write_contrast_color_variables().unwrap();
assert_eq... | rust_cleaned_test_functions.jsonl/76925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 895
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
62663,
559,
6714,
28182,
368,
341,
262,
1077,
5206,
289,
284,
29404,
341,
286,
1965,
25,
10528,
486,
931,
3148,
286,
21314,
25,
44590,
1259,
286,
4647,
33670,
25,
422,
58673,
75220,
85436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_u64() {
let mut schema_builder = Schema::builder();
let field = schema_builder.add_u64_field("value", INDEXED);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let mut index_writer = index.writer_with_num_threads(1, ... | rust_cleaned_test_functions.jsonl/41946 | {
"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,
3560,
291,
7300,
21,
19,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
2070,
284,
10802,
28532,
1364,
7300,
21,
19,
5013,
445,
957,
497,
39300,
1479,
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_touch_leave_event() {
let event: TouchLeave = js!(
return new TouchEvent( @{TouchLeave::EVENT_TYPE} );
).try_into().unwrap();
assert_eq!( event.event_type(), TouchLeave::EVENT_TYPE );
} | rust_cleaned_test_functions.jsonl/86595 | {
"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,
60840,
62666,
6748,
368,
341,
286,
1077,
1538,
25,
19338,
21833,
284,
6994,
33673,
310,
470,
501,
19338,
1556,
7,
33267,
11309,
21833,
486,
37349,
4189,
92,
1439,
286,
7457,
1539,
45514,
1005,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_accounts_trait_for_vec_empty() {
let program_id = Pubkey::default();
let mut bumps = std::collections::BTreeMap::new();
let mut accounts = &[][..];
Vec::<Test>::try_accounts(&program_id, &mut accounts, &[], &mut bumps).unwrap();
} | rust_cleaned_test_functions.jsonl/74419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
78491,
5478,
13251,
15124,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
2258,
543,
286,
1077,
5206,
64722,
284,
1460,
486,
51137,
486,
33,
6533,
2227,
486,
931,
543,
286,
1077,
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_optflag_short_arg() {
let args = vec!["-t".to_string(), "20".to_string()];
match Options::new().optflag("t", "test", "testing").parse(&args) {
Ok(ref m) => {
// The next variable after the flag is just a free argument
assert!(m.free[0] == "20");
}... | rust_cleaned_test_functions.jsonl/52368 | {
"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,
15032,
9903,
16673,
6057,
368,
341,
262,
1077,
2827,
284,
7486,
0,
1183,
12,
83,
3263,
983,
3904,
1507,
330,
17,
15,
3263,
983,
3904,
33800,
262,
2432,
14566,
486,
931,
1005,
2912,
9903,
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... | 2 |
#[test]
fn test_parsing() {
let mut arena = Arena::default();
let doc = arena.parse_str("");
let root = doc.root;
assert_eq!(root.text(&arena), "");
assert_eq!(0, root.level(&arena));
assert!(root.parent(&arena).is_none());
assert_eq!(0, root.children(&arena).count());
let doc ... | rust_cleaned_test_functions.jsonl/5627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1874
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
368,
341,
262,
1077,
5206,
24902,
284,
27047,
486,
2258,
1428,
262,
1077,
4629,
284,
24902,
4632,
2895,
13056,
262,
1077,
3704,
284,
4629,
12576,
280,
262,
2060,
10714,
10297,
2888,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_single_tank() {
let single_tank = Key::Tank {
ns: prawnspace(),
id: 1,
};
assert_eq!(single_tank.to_string(), "prawnspace/tanks/1");
} | rust_cleaned_test_functions.jsonl/64451 | {
"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,
19487,
528,
1180,
368,
341,
286,
1077,
3175,
528,
1180,
284,
5309,
486,
66033,
341,
310,
12268,
25,
548,
39996,
1306,
3148,
310,
877,
25,
220,
16,
345,
286,
2605,
286,
2060,
10714,
10297,
15338,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sum(){
let mut data = DataSet::new();
data.push(&[0f64, 0f64], &[0f64]);
data.push(&[1f64, 0f64], &[1f64]);
data.push(&[0f64, 1f64], &[1f64]);
data.push(&[1f64, 1f64], &[0f64]);
let (x, y) = data.sum();
assert_eq!(x[0], 2.0);
assert_eq!(x[1], 2.0);
assert_e... | rust_cleaned_test_functions.jsonl/84735 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
3032,
262,
1077,
5206,
821,
284,
27036,
486,
931,
1428,
262,
821,
2552,
2099,
58,
15,
69,
21,
19,
11,
220,
15,
69,
21,
19,
1125,
44590,
15,
69,
21,
19,
2558,
262,
821,
2552,
2099,
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_port() -> Result<()> {
init();
let mut counter = 0;
let prop = prop::for_all(gens::port_gen(), move |s| {
counter += 1;
log::debug!("{:>03}, port:string = {}", counter, s);
let input = s.as_bytes();
let result = (port() - end()).parse(input).to_result();
... | rust_cleaned_test_functions.jsonl/83597 | {
"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,
8716,
368,
1464,
5714,
71698,
341,
262,
2930,
543,
262,
1077,
5206,
5546,
284,
220,
15,
280,
262,
1077,
2004,
284,
2004,
486,
1958,
5705,
3268,
724,
486,
403,
16322,
1507,
3271,
760,
82,
91,
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_flow_controller_basic() {
let stub = EngineStub::new();
let (_tx, rx) = mpsc::channel();
let flow_controller = FlowController::new(&FlowControlConfig::default(), stub, rx);
// enable flow controller
assert_eq!(flow_controller.enabled(), true);
ass... | rust_cleaned_test_functions.jsonl/120659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27441,
21600,
34729,
368,
341,
286,
1077,
13633,
284,
8200,
33838,
486,
931,
543,
286,
1077,
5453,
3998,
11,
19111,
8,
284,
296,
81984,
486,
10119,
543,
286,
1077,
6396,
21600,
284,
22452,
2051,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zigzag_decode() {
// zigzag'
let zigzagp = VarintEncoding::zigzag_decode;
for x in (0..512).map(|x| x * 2) {
assert_eq!(zigzagp(x), x as i64 / 2);
assert_eq!(zigzagp(x + 1), -(x as i64) / 2 - 1);
}
} | rust_cleaned_test_functions.jsonl/518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
343,
92674,
15227,
368,
972,
286,
442,
85812,
92674,
9739,
286,
1077,
85812,
92674,
79,
284,
8735,
396,
14690,
486,
35363,
92674,
15227,
463,
286,
369,
856,
304,
320,
15,
496,
20,
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_cancel() {
let mut g = Gn::<()>::new(|| {
let mut i = 0;
loop {
yield_with(i);
i += 1;
}
i
});
loop {
// rust 1.17 can't deduce the output type!
let i: i32 = g.next().unwrap();
if i > 10 {
un... | rust_cleaned_test_functions.jsonl/91422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28895,
368,
341,
262,
1077,
5206,
342,
284,
95151,
27638,
368,
6831,
931,
79453,
341,
286,
1077,
5206,
600,
284,
220,
15,
280,
286,
6337,
341,
310,
7540,
6615,
1956,
317,
310,
600,
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... | 3 |
#[test]
fn test_binary_array_alignment() {
let ptr = memory::allocate_aligned(8);
let buf = unsafe { Buffer::from_raw_parts(ptr, 8, 8) };
let buf2 = buf.slice(1);
let values: [u8; 12] = [0; 12];
let array_data = ArrayData::builder(DataType::Binary)
.add_buff... | rust_cleaned_test_functions.jsonl/11639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
3858,
51006,
368,
341,
286,
1077,
10087,
284,
4938,
486,
31191,
66385,
7,
23,
317,
286,
1077,
6607,
284,
19860,
314,
10312,
486,
1499,
16067,
33217,
23866,
11,
220,
23,
11,
220,
23,
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_implementation() {
let input = buffer(r#"(@interface implement (func 0) (func 1))"#);
let output = Interface::Implementation(Implementation {
core_function_type: 0,
adapter_function_type: 1,
});
assert_eq!(parser::parse::<Interface>(&input... | rust_cleaned_test_functions.jsonl/102977 | {
"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,
62,
14369,
368,
341,
286,
1077,
1946,
284,
4147,
2601,
55543,
5957,
4970,
4211,
320,
2830,
220,
15,
8,
320,
2830,
220,
16,
593,
57676,
317,
286,
1077,
2550,
284,
20019,
486,
36850,
7,
36850,
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_device_info() {
let start_addr1 = GuestAddress(0x0);
let start_addr2 = GuestAddress(0x1000);
let guest_mem = GuestMemory::new(&[(start_addr1, 0x1000), (start_addr2, 0x1000)]).unwrap();
let mut device_manager =
MMIODeviceManager::new(guest_mem, &mut 0xd... | rust_cleaned_test_functions.jsonl/102332 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 750
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9204,
3109,
368,
341,
286,
1077,
1191,
7387,
16,
284,
26215,
4286,
7,
15,
87,
15,
317,
286,
1077,
1191,
7387,
17,
284,
26215,
4286,
7,
15,
87,
16,
15,
15,
15,
317,
286,
1077,
8640,
12976,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cast_by_str() -> Result<()> {
struct Test {
name: &'static str,
literal: &'static str,
value: DataValue,
}
let tests = vec![
Test {
name: "zero",
literal: "0",
value: DataValue::UInt8(Some(0)),
},
Te... | rust_cleaned_test_functions.jsonl/61760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
3710,
2895,
368,
1464,
5714,
71698,
341,
262,
2036,
3393,
341,
286,
829,
25,
30136,
1978,
607,
345,
286,
23141,
25,
30136,
1978,
607,
345,
286,
897,
25,
2885,
1130,
345,
262,
555,
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... | 3 |
#[test]
fn test_error_handling() {
let tests = vec![
("5 + true;", "type mismatch: INTEGER + BOOLEAN"),
("5 + true; 5;", "type mismatch: INTEGER + BOOLEAN"),
("-true", "unknown operator: -BOOLEAN"),
("true + false", "unknown operator: BOOLEAN + BOOLEAN"),
("5; true + ... | rust_cleaned_test_functions.jsonl/84231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
75642,
368,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
3489,
20,
488,
830,
32503,
330,
1313,
35301,
25,
30381,
488,
59393,
4461,
286,
3489,
20,
488,
830,
26,
220,
20,
32503,
330,
1313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_marksof () {
let stopname = 242;
let name1 = 243;
let mut t = new_sctable_internal();
assert_eq!(marksof_internal (EMPTY_CTXT,stopname,&t),Vec::new());
// FIXME #5074: ANF'd to dodge nested calls
{ let ans = unfold_marks(vec!(4,98),EMPTY_CTXT,&mut ... | rust_cleaned_test_functions.jsonl/105290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 825
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
704,
69,
1719,
341,
286,
1077,
2936,
606,
284,
220,
17,
19,
17,
280,
286,
1077,
829,
16,
284,
220,
17,
19,
18,
280,
286,
1077,
5206,
259,
284,
501,
643,
302,
480,
23472,
543,
286,
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_random() -> Fallible<()> {
let cryptosys = LibSodiumCryptoSystem::new(Default::default())?;
let mut bytes = [0u8; 16];
cryptosys.fill_random_bytes(&mut bytes);
assert_ne!(&bytes, &[0u8; 16]);
Ok(())
} | rust_cleaned_test_functions.jsonl/49534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
368,
1464,
14785,
1238,
71698,
341,
286,
1077,
14436,
436,
1047,
284,
5688,
50,
46776,
58288,
2320,
486,
931,
87874,
486,
2258,
2140,
69493,
286,
1077,
5206,
5820,
284,
508,
15,
84,
23,
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_unary_minus_float() {
assert_has_variable!(interpret("X = -1.1"), "X!", -1.1_f32);
assert_has_variable!(interpret("X = -1.1#"), "X!", -1.1_f32);
assert_has_variable!(interpret("X = -1"), "X!", -1.0_f32);
assert_linter_err!("X = -\"hello\"", LinterE... | rust_cleaned_test_functions.jsonl/22657 | {
"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,
4907,
658,
38457,
17586,
368,
341,
310,
2060,
21778,
14635,
10297,
16897,
445,
55,
284,
481,
16,
13,
16,
3975,
330,
55,
18789,
481,
16,
13,
16,
761,
18,
17,
317,
310,
2060,
21778,
14635,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_strings() {
let gil = Python::acquire_gil();
let py = gil.python();
let v = vec!["It", "was", "the", "worst", "of", "times"];
let seq = v.to_py_object(py).into_object().cast_into::<PySequence>(py).unwrap();
let bad_needle = "blurst".to_py_object(py);
... | rust_cleaned_test_functions.jsonl/22532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
33500,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
284,
7486,
0,
1183,
2132,
497,
330,
16123,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitvec_pb_convert() {
let bv = BitVec::from_bytes(&[0b_1010_0000, 0b_0001_0010]);
let pb_bv = bv.to_pb();
let pb_round_trip: BitVec = ProtobufConvert::from_pb(pb_bv).unwrap();
assert_eq!(pb_round_trip, bv);
} | rust_cleaned_test_functions.jsonl/14333 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
4083,
31409,
34910,
368,
341,
262,
1077,
56937,
284,
6495,
10050,
486,
1499,
12524,
2099,
58,
15,
65,
62,
16,
15,
16,
15,
62,
15,
15,
15,
15,
11,
220,
15,
65,
62,
15,
15,
15,
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_to_avro_datum() {
let schema = Schema::parse_str(SCHEMA).unwrap();
let mut record = Record::new(&schema).unwrap();
record.put("a", 27i64);
record.put("b", "foo");
let mut expected = Vec::new();
zig_i64(27, &mut expected);
zig_i64(3, &mut e... | rust_cleaned_test_functions.jsonl/37656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
26173,
299,
15353,
372,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
59461,
35839,
568,
15454,
543,
286,
1077,
5206,
3255,
284,
13583,
486,
931,
2099,
17349,
568,
15454,
543,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_storage() {
let tmpdir = starcoin_config::temp_dir();
let storage = Storage::new(StorageInstance::new_cache_and_db_instance(
CacheStorage::new(None),
DBStorage::new(tmpdir.path(), RocksdbConfig::default(), None).unwrap(),
))
.unwrap();
let transaction_info1 = ... | rust_cleaned_test_functions.jsonl/73684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
368,
341,
262,
1077,
4174,
3741,
284,
6774,
7160,
5332,
486,
3888,
4334,
543,
262,
1077,
5819,
284,
14693,
486,
931,
7,
5793,
2523,
486,
931,
11529,
8378,
8685,
11904,
1006,
286,
19479,
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_get_neuron_ids_by_principal() {
let principal1 = principal(1);
let principal2 = principal(2);
let principal3 = principal(3);
let principal4 = principal(4);
let mut driver = fake::FakeDriver::default();
let neuron_a = Neuron {
id: Some(NeuronId { id: 1 }),
... | rust_cleaned_test_functions.jsonl/1140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 816
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13925,
36090,
8077,
3710,
82402,
368,
341,
262,
1077,
12435,
16,
284,
12435,
7,
16,
317,
262,
1077,
12435,
17,
284,
12435,
7,
17,
317,
262,
1077,
12435,
18,
284,
12435,
7,
18,
317,
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_half_connect() {
let mut data = bm(&[
0b00010000, 39, 0x00, 0x04, 'M' as u8, 'Q' as u8, 'T' as u8, 'T' as u8, 0x04,
0b11001110,
0x00,
0x0a, // 10 sec
]);
assert_... | rust_cleaned_test_functions.jsonl/95612 | {
"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,
40626,
15720,
368,
341,
262,
1077,
5206,
821,
284,
34868,
2099,
9640,
286,
220,
15,
65,
15,
15,
15,
16,
15,
15,
15,
15,
11,
220,
18,
24,
11,
220,
15,
87,
15,
15,
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,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_and_decode_jwt_hs256() {
let p1 = json!({
"key1" : "val1",
"key2" : "val2",
"key3" : "val3"
});
let secret = "secret123".to_string();
let header = json!({});
let jwt1 = encode(header, &secret, &p1, Algorithm::HS... | rust_cleaned_test_functions.jsonl/45836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
8378,
15227,
95576,
85956,
17,
20,
21,
368,
341,
286,
1077,
281,
16,
284,
2951,
0,
2262,
310,
330,
792,
16,
1,
549,
330,
831,
16,
756,
310,
330,
792,
17,
1,
549,
330,
831,
17,
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... | 1 |
#[test]
fn test_mul_5() {
let z = c(3i32, 2i32);
assert_eq!(z * 3, c(9, 6));
} | rust_cleaned_test_functions.jsonl/99220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 59
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
62,
20,
368,
341,
262,
1077,
1147,
284,
272,
7,
18,
72,
18,
17,
11,
220,
17,
72,
18,
17,
317,
262,
2060,
10714,
10297,
89,
353,
220,
18,
11,
272,
7,
24,
11,
220,
21,
1106,
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 |
#[test]
fn test_progress_update() {
let (prev_m, prev_n) = (3u64, 5u64);
let tests = vec![
(prev_m - 1, prev_m, prev_n, false),
(prev_m, prev_m, prev_n, false),
(prev_m + 1, prev_m + 1, prev_n, true),
(prev_m + 2, prev_m + 2, prev_n + 1, true),
];
for (i, &(update... | rust_cleaned_test_functions.jsonl/30236 | {
"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,
27200,
8882,
368,
341,
262,
1077,
320,
9883,
717,
11,
7872,
1089,
8,
284,
320,
18,
84,
21,
19,
11,
220,
20,
84,
21,
19,
317,
262,
1077,
7032,
284,
7486,
90515,
286,
320,
9883,
717,
481,
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... | 5 |
#[test]
fn test_ipv4_fragment_not_multiple_of_offset_unit() {
let mut ctx = DummyCtx::<Ipv4>::default();
let mut cache = IpPacketFragmentCache::<Ipv4>::default();
let fragment_id = 0;
assert_eq!(cache.size, 0);
// Test that fragment bodies must be a multiple of
... | rust_cleaned_test_functions.jsonl/52572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
19,
43012,
7913,
45233,
3575,
6917,
14832,
368,
341,
286,
1077,
5206,
5635,
284,
50567,
23684,
27638,
80656,
19,
6831,
2258,
543,
286,
1077,
5206,
6500,
284,
35033,
16679,
9488,
8233,
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_change_shared_block_cache() {
let (mut cfg, _dir) = TiKvConfig::with_tmp().unwrap();
cfg.storage.block_cache.shared = true;
cfg.validate().unwrap();
let (storage, cfg_controller, ..) = new_engines(cfg);
let db = storage.get_engine().get_rocksdb();
... | rust_cleaned_test_functions.jsonl/2158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
20405,
7113,
11529,
368,
341,
286,
1077,
320,
6984,
13286,
11,
716,
3741,
8,
284,
22325,
42,
85,
2648,
486,
4197,
16125,
1005,
15454,
543,
286,
13286,
22403,
15697,
11529,
18062,
284,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mark_valid_invalid_forks() {
let mut heaviest_subtree_fork_choice = setup_forks();
let stake = 100;
let (bank, vote_pubkeys) = bank_utils::setup_bank_and_vote_pubkeys(3, stake);
let pubkey_votes: Vec<(Pubkey, SlotHashKey)> = vec![
(vote_pubkeys[0], (6... | rust_cleaned_test_functions.jsonl/85883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
8337,
31433,
761,
73302,
368,
341,
286,
1077,
5206,
566,
98362,
5228,
9344,
761,
669,
31936,
284,
6505,
761,
73302,
543,
286,
1077,
18279,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
17033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_auth_enc_ciphertext_less_than_41_err() {
let key = SecretKey::default();
let ciphertext = [0u8; XCHACHA_NONCESIZE + POLY1305_OUTSIZE];
assert!(open(&key, &ciphertext).is_err());
} | rust_cleaned_test_functions.jsonl/104185 | {
"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,
14014,
13781,
666,
45043,
50747,
51613,
62,
19,
16,
9266,
368,
341,
310,
1077,
1376,
284,
8599,
1592,
486,
2258,
543,
310,
1077,
69789,
284,
508,
15,
84,
23,
26,
1599,
2149,
11873,
32,
22128,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execute_cost_table_upsert_within_capacity() {
solana_logger::setup();
let mut testee = ExecuteCostTable::default();
let key1 = Pubkey::new_unique();
let key2 = Pubkey::new_unique();
let cost1: u64 = 100;
let cost2: u64 = 110;
// query emp... | rust_cleaned_test_functions.jsonl/71275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 663
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
15890,
5237,
8237,
6047,
72385,
35603,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
5206,
1273,
2127,
284,
20848,
14940,
2556,
486,
2258,
1428,
286,
1077,
1376,
16,
284,
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_get_timeout() {
let mut event_loop = Runtime::new().unwrap();
let pool = event_loop
.block_on(lazy(|| {
Pool::builder()
.max_size(1)
.connection_timeout(Duration::from_millis(100))
.build(OkManager::<FakeConnection>::new... | rust_cleaned_test_functions.jsonl/127890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 605
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
20537,
368,
341,
262,
1077,
5206,
1538,
17198,
284,
10954,
486,
931,
1005,
15454,
543,
262,
1077,
7314,
284,
1538,
17198,
198,
286,
659,
4574,
4470,
2333,
13619,
79453,
341,
310,
22728,
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... | 3 |
#[test]
fn test_ungetch() {
let w = initscr();
let chars = [
'a', 'b', 'c', 'ä', 'ö', 'å', 'A', 'B', 'C', 'Ä', 'Ö', 'Å', '𤭢', '𐍈',
'€', 'ᚠ', 'ᛇ', 'ᚻ', 'þ', 'ð', 'γ', 'λ', 'ώ', 'б', 'е', 'р', 'ვ',
'ე', 'პ', 'ხ', 'இ', 'ங', 'க', 'ಬ', 'ಇ', 'ಲ', 'ಸ',
];
... | rust_cleaned_test_functions.jsonl/45141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
455,
331,
368,
341,
286,
1077,
289,
284,
304,
1199,
5082,
1428,
286,
1077,
23000,
284,
2278,
310,
364,
64,
516,
364,
65,
516,
364,
66,
516,
364,
2305,
516,
364,
2956,
516,
364,
3785,
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_ptrace_peekpoke() {
use nix::sys::ptrace;
use nix::sys::signal::{raise, Signal};
use nix::sys::wait::{waitpid, WaitStatus};
use nix::unistd::fork;
use nix::unistd::ForkResult::*;
let _m = ::FORK_MTX.lock().expect(
"Mutex got poisoned by another test",
);
... | rust_cleaned_test_functions.jsonl/63568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2579
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4348,
578,
62,
29107,
48098,
368,
341,
262,
990,
308,
941,
486,
7791,
486,
3505,
578,
280,
262,
990,
308,
941,
486,
7791,
486,
26622,
22964,
18704,
11,
27230,
2440,
262,
990,
308,
941,
486,
77... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bytes() {
// The test case is copied from
use serde_test::{assert_de_tokens, assert_tokens, Token};
use serde_with::Bytes;
use std::borrow::Cow;
#[serde_as]
#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct Test<'a> {
#[serde_as(as = "Byte... | rust_cleaned_test_functions.jsonl/45735 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
368,
341,
262,
442,
576,
1273,
1142,
374,
21774,
504,
7213,
14808,
262,
990,
61570,
4452,
22964,
2207,
2259,
28838,
11,
2060,
28838,
11,
9660,
2440,
262,
990,
61570,
6615,
486,
7078,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.