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_exonum_time_service_with_7_validators() {
let mut testkit = TestKitBuilder::validator()
.with_validators(7)
.with_service(TimeService::new())
.create();
let validators = testkit.network().validators().to_vec();
let mut validators_times = vec![None; 7];
a... | rust_cleaned_test_functions.jsonl/57375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 697
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
263,
372,
3009,
12267,
6615,
62,
22,
8337,
2973,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
3393,
7695,
3297,
486,
16112,
741,
286,
659,
4197,
8337,
2973,
7,
22,
340,
286,
659,
4197,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_url_query() {
let url = Url::parse("http://example.dom?q=value").unwrap();
let req = Request::with_connector(
Get, url, &mut MockConnector
).unwrap();
let bytes = run_request(req);
let s = from_utf8(&bytes[..]).unwrap();
assert!(s.conta... | rust_cleaned_test_functions.jsonl/2066 | {
"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,
2903,
5738,
368,
341,
286,
1077,
2515,
284,
22840,
486,
6400,
445,
1254,
1110,
8687,
21435,
43782,
46538,
1827,
15454,
543,
286,
1077,
4232,
284,
6145,
486,
4197,
76393,
1006,
310,
2126,
11,
2515,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uint_from_sub_no_panic() {
assert_eq!(
Uint256::from(1 as u32).sub(Uint256::from(1)),
Uint256::from(0 as u32)
);
} | rust_cleaned_test_functions.jsonl/47732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
5673,
5228,
6536,
620,
31270,
368,
341,
286,
2060,
10714,
33673,
310,
27883,
17,
20,
21,
486,
1499,
7,
16,
438,
575,
18,
17,
568,
1966,
12317,
396,
17,
20,
21,
486,
1499,
7,
16,
6965,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_buy() {
let mut supplies = Supplies::new();
let mut cout = Cursor::new(Vec::new());
let mut cin = Cursor::new(Vec::new());
cin.write(b"50\r\n75\r\n100\r\n150\r\n").unwrap();
cin.seek(SeekFrom::Start(0)).unwrap();
supplies.buy(&mut cout, &mut cin);
... | rust_cleaned_test_functions.jsonl/28676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46348,
368,
341,
286,
1077,
5206,
16720,
284,
50252,
486,
931,
543,
286,
1077,
5206,
5034,
284,
28067,
486,
931,
49923,
486,
931,
1423,
286,
1077,
5206,
8461,
284,
28067,
486,
931,
49923,
486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_add_mismatched_length() {
let a = Int32Array::from(vec![5, 6, 7, 8, 9]);
let b = Int32Array::from(vec![6, 7, 8]);
let e = add(&a, &b)
.err()
.expect("should have failed due to different lengths");
assert_eq!(
"Co... | rust_cleaned_test_functions.jsonl/17851 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
2891,
717,
24976,
291,
5118,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
2558,
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_line_wrap() {
assert_eq!("abcd".wrap(7), "abcd");
assert_eq!(
"1 3 5 7 9 1 39234 290 290 5 7 9".wrap(10),
"1 3 5 7 9\n1 39234\n290 290 5\n7 9"
);
assert_eq!(
"1 3 5 7 9 1 39234 290 290 5 7 9".wrap(10),
"1 3 5 7 9\n1... | rust_cleaned_test_functions.jsonl/19543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
38550,
368,
341,
286,
2060,
10714,
17223,
68644,
3263,
10097,
7,
22,
701,
330,
68644,
797,
286,
2060,
10714,
33673,
310,
330,
16,
220,
18,
220,
20,
220,
22,
220,
24,
220,
16,
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_host_localhost_open_write_err() {
let host: Localhost = Localhost::new(PathBuf::from("/dev")).ok().unwrap();
let file: tempfile::NamedTempFile = create_sample_file();
fs::set_permissions(file.path(), PermissionsExt::from_mode(0o444)).unwrap();
as... | rust_cleaned_test_functions.jsonl/53628 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12848,
62,
8301,
11311,
9165,
9266,
368,
341,
286,
1077,
3468,
25,
8774,
3790,
284,
8774,
3790,
486,
931,
33030,
15064,
486,
1499,
4283,
3583,
15197,
562,
1005,
15454,
543,
286,
1077,
1034,
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_empty_key() {
let mut handlebars = Registry::new();
assert!(handlebars
.register_template_string("t0", "{{#each this}}{{@key}}-{{value}}\n{{/each}}")
.is_ok());
let r0 = handlebars
.render(
"t0",
&({
... | rust_cleaned_test_functions.jsonl/127937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
3097,
368,
341,
286,
1077,
5206,
3705,
24950,
284,
32112,
486,
931,
543,
286,
2060,
10297,
8192,
24950,
198,
310,
659,
6343,
8693,
3904,
445,
83,
15,
497,
47219,
2,
9547,
419,
77286,
31,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_bits() {
let bytes = Scalar::zero().to_bytes();
assert_eq!(Scalar::from_bits(bytes.as_bits::<Lsb0>()), Scalar::zero());
let bytes = Scalar::one().to_bytes();
assert_eq!(Scalar::from_bits(bytes.as_bits::<Lsb0>()), Scalar::one());
// -1 should work
... | rust_cleaned_test_functions.jsonl/14286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
20034,
368,
341,
286,
1077,
5820,
284,
35176,
486,
14154,
1005,
983,
12524,
543,
286,
2060,
10714,
10297,
20639,
486,
1499,
20034,
23158,
5357,
20034,
27638,
43,
16892,
15,
29,
11858,
35176,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_signature_try_from() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let expected_block_signature = mc_transaction_core::BlockSignature::new(
Ed25519Signature::new([1; 64]),
(&Ed25519Private::from_random(&mut rng)).into(),
313... | rust_cleaned_test_functions.jsonl/57759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
39859,
53283,
5673,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17,
10149,
286,
1077,
3601,
7113,
398... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_change_admin() {
let (init_result, mut deps) = init_helper(vec![InitialBalance {
address: HumanAddr("bob".to_string()),
amount: Uint128(5000),
}]);
assert!(
init_result.is_ok(),
"Init failed: {}",
init_res... | rust_cleaned_test_functions.jsonl/69613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
15947,
12207,
368,
341,
286,
1077,
320,
2327,
5287,
11,
5206,
48178,
8,
284,
2930,
10418,
25592,
20703,
6341,
21190,
341,
310,
2621,
25,
11097,
13986,
445,
47086,
3263,
983,
3904,
14702,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_max_size() {
let token_owner_record = TokenOwnerRecordV2 {
account_type: GovernanceAccountType::TokenOwnerRecordV2,
realm: Pubkey::new_unique(),
governing_token_mint: Pubkey::new_unique(),
governing_token_owner: Pubkey::new_unique(),
... | rust_cleaned_test_functions.jsonl/36012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
2368,
368,
341,
286,
1077,
3950,
29027,
14192,
284,
9660,
13801,
6471,
53,
17,
341,
310,
2692,
1819,
25,
80589,
7365,
929,
486,
3323,
13801,
6471,
53,
17,
345,
310,
21889,
25,
22611,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_shares() {
// arrange
let (tmp, weight) = setup("test_set_shares", CGROUP_CPU_WEIGHT);
let _ = set_fixture(&tmp, CGROUP_CPU_MAX, "")
.unwrap_or_else(|_| panic!("set test fixture for {}", CGROUP_CPU_MAX));
let cpu = LinuxCpuBuilder::new().with_share... | rust_cleaned_test_functions.jsonl/126558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
3712,
5403,
368,
341,
286,
442,
30893,
198,
286,
1077,
320,
5173,
11,
4680,
8,
284,
6505,
445,
1944,
2602,
3712,
5403,
497,
6159,
11838,
29741,
60697,
317,
286,
1077,
716,
284,
738,
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_create_all_and_write() -> io::Result<()> {
let temp = std::env::temp_dir();
let temp = temp.join("gazebo");
let temp = temp.join(random_part());
let remove_dir = RemoveDir(temp.clone());
let temp = temp.join("foo/bar");
... | rust_cleaned_test_functions.jsonl/15674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
5705,
8378,
9165,
368,
1464,
6399,
486,
2077,
71698,
341,
16885,
286,
1077,
2730,
284,
1460,
486,
3160,
486,
3888,
4334,
543,
286,
1077,
2730,
284,
2730,
5446,
445,
70,
9832,
749,
797,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_from_char_iter() {
let s = "\u{0} 0 \u{0}a𐀀𐀀 𐀀a𐀀";
println!("{}", s.len());
let compact: CompactString = s.chars().into_iter().collect();
assert!(!compact.is_heap_allocated());
assert_eq!(s, compact);
} | rust_cleaned_test_functions.jsonl/2785 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
9232,
11723,
368,
341,
262,
1077,
274,
284,
2917,
84,
90,
15,
92,
220,
15,
1124,
84,
90,
15,
92,
64,
123934,
222,
222,
123934,
222,
222,
220,
123934,
222,
222,
64,
123934,
222,
222,
87... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ser_new() {
let date_picker = DatePickerElement::new("action_id");
let json = serde_json::to_string_pretty(&date_picker).unwrap();
let expected = r#"{
"type": "datepicker",
"action_id": "action_id"
}"#;
assert_eq!(json, expected)
} | rust_cleaned_test_functions.jsonl/3897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
5921,
368,
341,
286,
1077,
2400,
68230,
284,
63426,
1691,
486,
931,
445,
1311,
842,
797,
286,
1077,
2951,
284,
61570,
9455,
486,
983,
3904,
620,
21322,
2099,
1028,
68230,
568,
15454,
1428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accountsdb_scan_snapshot_stores_illegal_bins() {
let mut stats = HashStats::default();
AccountsDb::scan_snapshot_stores(&[], &mut stats, 0);
} | rust_cleaned_test_functions.jsonl/44254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
28857,
53265,
1261,
4589,
26743,
6428,
44912,
368,
341,
286,
1077,
5206,
10472,
284,
6531,
16635,
486,
2258,
543,
286,
40655,
7994,
486,
16405,
53265,
1261,
4589,
2099,
12995,
609,
6984... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_string() {
let data = Data {
base: "https://example.com".into(),
client_id: "adbc01234".into(),
client_secret: "0987dcba".into(),
redirect: "urn:ietf:wg:oauth:2.0:oob".into(),
token: "fedc5678".into(),
};
let ... | rust_cleaned_test_functions.jsonl/39221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
3904,
368,
341,
286,
1077,
821,
284,
2885,
341,
310,
2331,
25,
330,
2428,
1110,
8687,
905,
3263,
18122,
3148,
310,
2943,
842,
25,
330,
329,
8904,
15,
16,
17,
18,
19,
3263,
18122,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bolt_invalid_invoices() {
// Tests the BOLT 11 invalid invoice test vectors
assert_eq!(Invoice::from_str(
"lnbc25m1pvjluezpp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5vdhkven9v5sxyetpdeessp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygs9q4psqqqqqqqqqqqqqqqqsgqtqyx5vggfcsll... | rust_cleaned_test_functions.jsonl/22555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1767
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
6181,
31433,
1243,
40683,
368,
341,
197,
322,
20150,
279,
425,
35320,
220,
16,
16,
8318,
24615,
1273,
22879,
198,
6948,
10714,
10297,
34674,
486,
1499,
2895,
1006,
197,
197,
1,
2261,
8904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mdns() {
// lookup to UDP should fail
// then lookup on TCP
let query = Query::query(Name::from_str("www.example.local.").unwrap(), RecordType::A);
let tcp_message: Result<DnsResponse, _> = Err(ResolveError::from("Forced Testing Error"));
let udp_message: Result<DnsRe... | rust_cleaned_test_functions.jsonl/86468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
32994,
4412,
368,
341,
262,
442,
18615,
311,
42394,
1265,
3690,
198,
262,
442,
1221,
18615,
389,
26656,
271,
262,
1077,
3239,
284,
11361,
486,
1631,
21182,
486,
1499,
2895,
445,
2136,
7724,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_work_with_rc() {
parse_code(
"test_work_with_rc",
r#"
foreigner_class!(class Boo {
self_type Boo;
constructor create_boo() -> Rc<RefCell<Boo>>;
method Boo::test(&self, _: bool) -> f32;
method Boo::set_a(&mut self, _: i32);
});
"#,
&[ForeignLang::Java, ... | rust_cleaned_test_functions.jsonl/71614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11498,
6615,
30299,
368,
341,
262,
4715,
4136,
1006,
286,
330,
1944,
11498,
6615,
30299,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
73684,
341,
262,
656,
1819,
73684,
280,
262,
4692,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lockout_is_updated_for_entire_branch() {
let mut stake_lockouts = HashMap::new();
let vote = Lockout {
slot: 2,
confirmation_count: 1,
};
let set: HashSet<u64> = vec![0u64, 1u64].into_iter().collect();
let mut ancestors = HashMap::n... | rust_cleaned_test_functions.jsonl/25575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
411,
6892,
33492,
5478,
27425,
554,
28031,
368,
341,
286,
1077,
5206,
18279,
9818,
11672,
284,
10528,
486,
931,
543,
286,
1077,
6910,
284,
15701,
411,
341,
310,
9446,
25,
220,
17,
345,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_neg_infinity() {
let vec = to_vec(&::std::f64::NEG_INFINITY).unwrap();
assert_eq!(vec, b"\xf9\xfc\x00");
} | rust_cleaned_test_functions.jsonl/110268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
1243,
19888,
368,
341,
262,
1077,
7486,
284,
311,
13251,
2099,
486,
1834,
486,
69,
21,
19,
486,
97127,
91110,
568,
15454,
543,
262,
2060,
10714,
10297,
4083,
11,
293,
11934,
5848,
24,
346... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_from_iter_unchanged() -> Result<()> {
// Given
let unchanged_entry_1 = given_entry("unchanged_1.txt");
let unchanged_entry_2 = given_entry("unchanged_2.txt");
let events = vec![
Event::UNCHANGED {
old: &unchanged_entry_1,
... | rust_cleaned_test_functions.jsonl/4108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 389
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
11723,
62,
3185,
3726,
368,
1464,
5714,
71698,
341,
286,
442,
16246,
198,
286,
1077,
34857,
9078,
62,
16,
284,
2661,
9078,
445,
3185,
3726,
62,
16,
3909,
797,
286,
1077,
34857,
9078,
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_sculpt_enum() {
let value = LabelledEnum1::VariantC {
x: "test".into(),
y: true,
};
let repr = match into_labelled_generic(value).subset() {
Ok(repr) => repr,
Err(rem) => match rem {}, // should be unreachable
};
let new_value: LabelledEnum2 = ... | rust_cleaned_test_functions.jsonl/32229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
3314,
417,
31054,
368,
341,
262,
1077,
897,
284,
9402,
832,
10766,
16,
486,
20746,
34,
341,
286,
856,
25,
330,
1944,
3263,
18122,
3148,
286,
379,
25,
830,
345,
262,
2605,
262,
1077,
30636... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_report_deferred_by_policy() {
block_on(async {
let response = json!({"response":{
"server": "prod",
"protocol": "3.0",
"app": [{
"appid": "{00000000-0000-0000-0000-000000000001}",
"status": "ok",
... | rust_cleaned_test_functions.jsonl/59672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 998
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14813,
7844,
261,
1151,
3710,
22773,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2033,
284,
2951,
0,
16864,
2322,
12602,
1060,
330,
4030,
788,
330,
19748,
756,
1060,
330,
17014,
788,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dkim_header_builder() {
let header = DKIMHeaderBuilder::new()
.add_tag("v", "1")
.add_tag("a", "something")
.build()
.unwrap();
assert_eq!(header.raw_bytes, "v=1; a=something;".to_owned());
} | rust_cleaned_test_functions.jsonl/126127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
57893,
8757,
28532,
368,
341,
286,
1077,
4247,
284,
55240,
1791,
4047,
3297,
486,
931,
741,
310,
659,
718,
9372,
445,
85,
497,
330,
16,
1138,
310,
659,
718,
9372,
445,
64,
497,
330,
33331... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_score_differences() {
let cov_a = Coverage::from_counts(
vec![100, 0, 0, 25],
vec![0, 100, 0, 25],
vec![0, 0, 100, 25],
vec![0, 0, 100, 25],
);
let cov_b = Coverage::from_counts(
vec![0, 0, 100, 50],
... | rust_cleaned_test_functions.jsonl/21912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10405,
814,
58326,
368,
341,
286,
1077,
21836,
4306,
284,
55669,
486,
1499,
25977,
1006,
310,
7486,
20703,
16,
15,
15,
11,
220,
15,
11,
220,
15,
11,
220,
17,
20,
1259,
310,
7486,
20703,
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_priority_update_push_on_request_stream() {
test_wrong_frame_on_request_stream(&[0x80, 0x0f, 0x07, 0x01, 0x01, 0x03]);
} | rust_cleaned_test_functions.jsonl/101900 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38161,
8882,
14218,
4470,
7893,
12673,
368,
341,
286,
1273,
75198,
8929,
4470,
7893,
12673,
2099,
58,
15,
87,
23,
15,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
15,
22,
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 |
#[test]
fn test_incomplet_data_frame() {
test_incomplet_frame(
&[
// headers
0x01, 0x06, 0x00, 0x00, 0xd9, 0x54, 0x01, 0x33,
// the data frame is incomplete.
0x0, 0x3, 0x61, 0x62,
],
Error::MalformedFrame... | rust_cleaned_test_functions.jsonl/10938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
874,
10819,
1769,
8929,
368,
341,
286,
1273,
1243,
874,
10819,
8929,
1006,
310,
609,
9640,
394,
442,
7102,
198,
394,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
21,
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 |
#[test]
fn test_network_max_message_len() {
let first = "127.0.0.1:17202".parse().unwrap();
let second = "127.0.0.1:17303".parse().unwrap();
let max_message_length = ConsensusConfig::DEFAULT_MAX_MESSAGE_LEN as usize;
// Minimal size of protobuf messages can't be determined exactly.
let acce... | rust_cleaned_test_functions.jsonl/46393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20966,
6345,
6462,
6043,
368,
341,
262,
1077,
1156,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
16,
22,
17,
15,
17,
3263,
6400,
1005,
15454,
543,
262,
1077,
2086,
284,
330,
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... | 1 |
#[test]
fn test_null_packet() {
let p: PacketInfo = PacketInfo::null_packet();
assert_eq!(p.pid(), packet::NULL_PACKET_PID);
assert_eq!(p.continuity_counter(), 0);
assert!(p.has_payload());
let payload = p.payload().unwrap();
for i in 0..payload.len() {
... | rust_cleaned_test_functions.jsonl/47177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
21078,
368,
341,
286,
1077,
281,
25,
28889,
1731,
284,
28889,
1731,
486,
2921,
21078,
543,
286,
2060,
10714,
10297,
79,
40939,
1507,
10151,
486,
4576,
40328,
55794,
317,
286,
2060,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_long_only_mode_no_short_parse() {
let mut opts = Options::new();
opts.long_only(true);
opts.optflag("h", "help", "Description");
opts.optflag("i", "ignore", "Description");
opts.optflag("", "hi", "Description");
let args = vec!["-hi"];
let matches = &match opts.parse... | rust_cleaned_test_functions.jsonl/52402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
18410,
7302,
6536,
16673,
21039,
368,
341,
262,
1077,
5206,
12185,
284,
14566,
486,
931,
543,
262,
12185,
23510,
18410,
3715,
317,
262,
12185,
28102,
9903,
445,
71,
497,
330,
8653,
497,
330... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_change_endpoint_cfg() {
let cfg = CdcConfig::default();
let mut suite = mock_endpoint(&cfg, None);
let ep = &mut suite.endpoint;
// Modify min_ts_interval and hibernate_regions_compatible.
{
let mut updated_cfg = cfg.clone();
{
... | rust_cleaned_test_functions.jsonl/29095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
36699,
18343,
368,
341,
286,
1077,
13286,
284,
356,
7628,
2648,
486,
2258,
543,
286,
1077,
5206,
16182,
284,
7860,
36699,
2099,
14072,
11,
2240,
317,
286,
1077,
4155,
284,
609,
6984,
16182,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_gen_protects_chip() {
let floors: Vec<BTreeSet<ScienceThing>> = vec![
[
gen("thulium"), chip("strontium"), gen("strontium")
].iter().cloned().collect(),
];
assert_eq!(true, is_valid(&floors));
} | rust_cleaned_test_functions.jsonl/55909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8337,
16322,
22357,
439,
82,
49514,
368,
341,
10217,
25945,
25,
11312,
32519,
6533,
1649,
27,
35400,
52940,
2452,
284,
7486,
90515,
197,
197,
9640,
298,
82281,
445,
339,
360,
2356,
3975,
163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let res = expression(Span::new(r"\x -> y"));
if let Expr::Lambda(name, expr) = res.unwrap().1 {
assert_eq!(name, "x");
if let Expr::Ref(name) = expr.expr {
assert_eq!(name, "y");
} else {
panic!("Did not expect non-ref")
... | rust_cleaned_test_functions.jsonl/32922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51884,
368,
341,
262,
1077,
592,
284,
7493,
3759,
848,
486,
931,
2601,
11934,
87,
1464,
379,
14929,
262,
421,
1077,
28819,
486,
58266,
3153,
11,
15169,
8,
284,
592,
55395,
1005,
16,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_merge() {
let mut vector_in = vec![10, 20, 11, 13, 24];
merge_sort(&mut vector_in);
debug_assert_eq!(vector_in, vec![10, 11, 13, 20, 24]);
} | rust_cleaned_test_functions.jsonl/25080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
368,
341,
286,
1077,
5206,
4621,
1243,
284,
7486,
20703,
16,
15,
11,
220,
17,
15,
11,
220,
16,
16,
11,
220,
16,
18,
11,
220,
17,
19,
935,
286,
10880,
18435,
2099,
6984,
4621,
1243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add() {
for elm in SUM_TRIPLES.iter() {
let (a_vec, b_vec, c_vec) = *elm;
let a = BigInt::from_slice(Plus, a_vec);
let b = BigInt::from_slice(Plus, b_vec);
let c = BigInt::from_slice(Plus, c_vec);
assert!(a.checked_add(&b).unwrap() == c);
... | rust_cleaned_test_functions.jsonl/56633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56456,
2891,
368,
341,
262,
369,
42205,
304,
30735,
6410,
3298,
14017,
19471,
368,
341,
286,
1077,
320,
64,
13251,
11,
293,
13251,
11,
272,
13251,
8,
284,
353,
23162,
280,
286,
1077,
264,
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... | 2 |
#[test]
fn test_minimize_loop_with_constant_condition_do_while() {
test("do { foo(); } while (true)", "for(;;)foo();");
test("do { foo(); } while (0)", "foo();");
test("do { foo(); } while (0.0)", "foo();");
test("do { foo(); } while (NaN)", "foo();");
test("do { foo(); } while (null)", "foo... | rust_cleaned_test_functions.jsonl/385 | {
"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,
7260,
11853,
17198,
6615,
34967,
27656,
26309,
86069,
368,
341,
262,
1273,
445,
2982,
314,
15229,
2129,
335,
1393,
320,
1866,
11583,
330,
1958,
7,
6768,
8,
7975,
2129,
797,
262,
1273,
445,
2982,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_value_enum_untagged() -> Result<(), Box<dyn std::error::Error>> {
let lua = Lua::new();
lua.globals().set("null", lua.null())?;
#[derive(Deserialize, PartialEq, Debug)]
#[serde(untagged)]
enum Eut {
Unit,
Integer(u64),
Tuple(u32, u32),
St... | rust_cleaned_test_functions.jsonl/50710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
3142,
31054,
62,
3850,
96476,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
20357,
284,
37662,
486,
931,
543,
262,
20357,
1302,
16616,
1005,
746,
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... | 7 |
#[test]
fn test_sum_aggregate() {
quick_test(
"SELECT SUM(age) from person",
"Aggregate: groupBy=[[]], aggr=[[SUM(#age)]]\
\n TableScan: person projection=None",
);
} | rust_cleaned_test_functions.jsonl/29972 | {
"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,
10160,
20587,
14240,
368,
341,
286,
3974,
4452,
1006,
310,
330,
4858,
30735,
66595,
8,
504,
1697,
756,
310,
330,
64580,
25,
1874,
1359,
5818,
1294,
1125,
933,
901,
45937,
27377,
32735,
424,
8,
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 |
#[test]
fn test_hyper_links() {
assert_markdown_eq(
common::parts::hyper_links,
r###"
[](https://example.org/)
[example](https://example.org/)
[](#section-2)
[example](#section-2)
"###,
);
} | rust_cleaned_test_functions.jsonl/133528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93416,
25258,
368,
341,
262,
2060,
18924,
2923,
10714,
1006,
286,
4185,
486,
18252,
486,
68192,
25258,
345,
286,
435,
14374,
698,
50994,
2428,
1110,
8687,
2659,
14,
692,
58,
8687,
9533,
2428,
1110... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_supplies_buy_clothes_insufficient() {
let mut supplies = Supplies::new();
let reason = supplies.buy_clothes(1000).unwrap_err().reason;
assert_eq!(BuyErrorType::InsufficientFunds, reason);
assert_eq!(700, supplies.money);
assert_eq!(0, supplies.clothes);
... | rust_cleaned_test_functions.jsonl/28667 | {
"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,
23723,
7202,
46348,
666,
385,
6375,
34386,
26683,
368,
341,
286,
1077,
5206,
16720,
284,
50252,
486,
931,
543,
286,
1077,
2874,
284,
16720,
63871,
666,
385,
6375,
7,
16,
15,
15,
15,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mask_f64() {
let mask = 0b10101010;
let actual = Float64Type::mask_from_u64(mask);
let expected = expected_mask!(i64, mask);
let expected = m64x8::from_cast(i64x8::from_slice_unaligned(expected.as_slice()));
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/107639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9999,
761,
21,
19,
368,
341,
286,
1077,
6911,
284,
220,
15,
65,
16,
15,
16,
15,
16,
15,
16,
15,
280,
286,
1077,
5042,
284,
13001,
21,
19,
929,
486,
11258,
5673,
7300,
21,
19,
35306,
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_convert_band_info() {
let wlanmac_info = fake_wlanmac_info();
let band0 = convert_ddk_band_info(wlanmac_info.bands[0], 10);
assert_eq!(band0.band_id, fidl_common::Band::WlanBand2Ghz);
assert_eq!(band0.rates, vec![12, 24, 48, 54, 96, 108]);
assert_eq!(band0... | rust_cleaned_test_functions.jsonl/122389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
45344,
3109,
368,
341,
286,
1077,
78353,
11948,
3109,
284,
12418,
1670,
10715,
11948,
3109,
543,
286,
1077,
7055,
15,
284,
5508,
43174,
74,
45344,
3109,
3622,
10715,
11948,
3109,
948,
2844,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expectstaple_basic() {
let json = r#"{
"expect-staple-report": {
"date-time": "2014-04-06T13:00:50Z",
"hostname": "www.example.com",
"port": 443,
"response-status": "ERROR_RESPONSE",
"cert-status"... | rust_cleaned_test_functions.jsonl/4039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68918,
267,
391,
273,
34729,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
310,
330,
17119,
5477,
391,
273,
47411,
788,
341,
394,
330,
1028,
7246,
788,
330,
17,
15,
16,
19,
12,
15,
19,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_anonymous_and_unauthorized_users_cannot_update_icp_xdr_coversion_rate() {
local_test_on_nns_subnet(|runtime| async move {
let attacker_fake = set_up_universal_canister(&runtime).await;
assert_ne!(
attacker_fake.canister_id(),
ic_nns_constants::GOVERNAN... | rust_cleaned_test_functions.jsonl/81877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 967
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12008,
9757,
8378,
4907,
19084,
16348,
666,
3401,
8882,
32747,
79,
3212,
3612,
50028,
1325,
9246,
368,
341,
262,
2205,
4452,
4470,
1089,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_exchange_code_successful_with_minimal_json_response() {
let client = BasicClient::new(
ClientId::new("aaa".to_string()),
Some(ClientSecret::new("bbb".to_string())),
AuthUrl::new("https://example.com/auth".to_string()).unwrap(),
Some(TokenUrl::new("https://exam... | rust_cleaned_test_functions.jsonl/18591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 794
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
4136,
92951,
6615,
7260,
2861,
9455,
9655,
368,
341,
262,
1077,
2943,
284,
14625,
2959,
486,
931,
1006,
286,
8423,
764,
486,
931,
445,
32646,
3263,
983,
3904,
14702,
286,
4329,
46851,
19773... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let stake_address = solana_sdk::pubkey::new_rand();
let minimum_delegation = crate::get_minimum_delegation(&FeatureSet::all_enabled());
let stake_lamports = minimum_delegation * 2;
let split_to_address = solana_sdk::pubkey::new_rand();
let split_... | rust_cleaned_test_functions.jsonl/31641 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2003
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
368,
341,
286,
1077,
18279,
6744,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
8028,
2259,
87566,
284,
17717,
486,
455,
84855,
2259,
87566,
2099,
13859,
1649,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_resharing_added_members() {
// SCENARIO: reshare with some new members
let n = 5;
let thr = default_threshold(n);
let n2 = 8;
let thr2 = 5;
let (dkgs, public) = setup_reshare::<BCurve>(n, thr, n2, thr2);
let (_, reshared) = full_dkg(thr2, d... | rust_cleaned_test_functions.jsonl/75099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2488,
3249,
37653,
30397,
368,
341,
286,
442,
7531,
94274,
25,
63693,
546,
448,
1045,
501,
3613,
198,
286,
1077,
308,
284,
220,
20,
280,
286,
1077,
8807,
284,
1638,
21858,
1445,
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_recognize_utf8_boundary_half_dangle_three() {
let buf: &[u8] = &[0x61, 0x61, 0xF0, 0x90, 0x86, 0x92, 0x0d, 0x0a, 0x0d, 0x0a];
let mut full = buffer_from(buf);
let result = block_on(async { recognize(&mut full).await });
assert_eq!(result.unwrap().find_header("Complex"), Some("aa𐆒".to_st... | rust_cleaned_test_functions.jsonl/48192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
3934,
551,
39453,
23,
54004,
40626,
814,
4044,
50016,
368,
341,
220,
1077,
6607,
25,
44590,
84,
23,
60,
284,
44590,
15,
87,
21,
16,
11,
220,
15,
87,
21,
16,
11,
220,
15,
9770,
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_shift_lineend() {
let mut buffer = setup_buffer("Test");
buffer.shift_mark(Mark::Cursor(0), Direction::LineEnd, 0);
assert_eq!(buffer.get_mark_idx(Mark::Cursor(0)).unwrap(), 4);
} | rust_cleaned_test_functions.jsonl/94761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22230,
6528,
408,
368,
341,
286,
1077,
5206,
4147,
284,
6505,
7776,
445,
2271,
797,
286,
4147,
29154,
18924,
3189,
838,
486,
14543,
7,
15,
701,
18904,
486,
2460,
3727,
11,
220,
15,
626,
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 |
#[test]
fn test_parse_float_no_decimal() {
let res = expression(Span::new("2."));
assert!(res.is_ok());
assert_eq!(res.unwrap().1, Expr::Literal(Literal::Float(2.)))
} | rust_cleaned_test_functions.jsonl/32920 | {
"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,
21039,
17586,
6536,
74429,
368,
341,
262,
1077,
592,
284,
7493,
3759,
848,
486,
931,
445,
17,
1189,
3237,
262,
2060,
10297,
416,
2079,
19817,
5231,
262,
2060,
10714,
10297,
416,
55395,
1005,
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 |
#[test]
fn test_nth() {
let a: VolAddress<i32> = unsafe { VolAddress::new(4) };
let mut i: VolIter<i32> = unsafe { a.iter_slots(2) };
let mut i2: VolIter<i32> = i.clone();
assert_eq!(i.nth(0), i2.next());
assert_eq!(i.nth(0), i2.next());
assert_eq!(i.nth(0), i2.next());
let mut i: VolIter<i32> =... | rust_cleaned_test_functions.jsonl/116634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
78342,
368,
341,
220,
1077,
264,
25,
10882,
4286,
21897,
18,
17,
29,
284,
19860,
314,
10882,
4286,
486,
931,
7,
19,
8,
2605,
220,
1077,
5206,
600,
25,
10882,
8537,
21897,
18,
17,
29,
284,
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_skewness() {
test_case(-0.0, 2.0, 0.0, |x| x.skewness());
test_case(0.0, 2.0, 0.0, |x| x.skewness());
test_case(0.1, 4.0, 0.0, |x| x.skewness());
test_case(1.0, 10.0, 0.0, |x| x.skewness());
test_case(10.0, 11.0, 0.0, |x| x.skewness());
test_case(0... | rust_cleaned_test_functions.jsonl/47371 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33811,
365,
2090,
368,
341,
286,
1273,
19096,
4080,
15,
13,
15,
11,
220,
17,
13,
15,
11,
220,
15,
13,
15,
11,
760,
87,
91,
856,
39454,
365,
2090,
1423,
286,
1273,
19096,
7,
15,
13,
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_generic_opaque_types() {
// Test printing opaque types with generic parameters
reparse_test!(
program {
struct Foo {}
trait Bar<T> {}
opaque type Baz<T>: Bar<T> = Foo;
struct Fou<T> {}
struct Unit {}
trait B... | rust_cleaned_test_functions.jsonl/34206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
10287,
19659,
9763,
368,
341,
262,
442,
3393,
18484,
46484,
4494,
448,
13954,
5029,
198,
262,
312,
6400,
4452,
33673,
286,
2025,
341,
310,
2036,
33428,
5613,
310,
17567,
4716,
3125,
29,
561... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_minimize1() {
let res = minimize_rpaths(&[
"rpath1".to_string(),
"rpath2".to_string(),
"rpath1".to_string()
]);
assert!(res == [
"rpath1",
"rpath2",
]);
} | rust_cleaned_test_functions.jsonl/20102 | {
"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,
7260,
11853,
16,
368,
341,
286,
1077,
592,
284,
29337,
1710,
21623,
2099,
9640,
310,
330,
81,
2343,
16,
3263,
983,
3904,
3148,
310,
330,
81,
2343,
17,
3263,
983,
3904,
3148,
310,
330,
81,
2343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_packet_constraints() {
use PacketConstraints as PC;
// Sanity check.
assert!(PC::try_new(0, 0, 0, 0).is_some());
// header_len + min_body_len + footer_len doesn't overflow usize
assert!(PC::try_new(MAX_USIZE / 2, MAX_USIZE / 2, 0, 0).is_some());
/... | rust_cleaned_test_functions.jsonl/131778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21078,
60267,
368,
341,
286,
990,
28889,
12925,
438,
6673,
401,
286,
442,
96302,
1779,
624,
286,
2060,
10297,
4872,
486,
1539,
5921,
7,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
568,
285,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signal() {
assert_eq!(
calculate_signal(
&mut [3, 15, 3, 16, 1002, 16, 10, 16, 1, 16, 15, 15, 4, 15, 99, 0, 0],
&[4, 3, 2, 1, 0]
),
43210
);
assert_eq!(
calculate_signal(
&mut ... | rust_cleaned_test_functions.jsonl/100798 | {
"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,
21137,
368,
341,
286,
2060,
10714,
33673,
310,
11047,
21137,
1006,
394,
609,
6984,
508,
18,
11,
220,
16,
20,
11,
220,
18,
11,
220,
16,
21,
11,
220,
16,
15,
15,
17,
11,
220,
16,
21,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_5XY0() {
// 0x5XY0 - Skip the following instruction if the value of register VX is equal to the value of register VY
let opcode = 0x5670;
let mut vm = get_vm();
//not equal
vm.v[0x6] = 0x0;
vm.v[0x7] = 0x1;
vm.program_counter = 0x0;
vm.execute_instruction(decode... | rust_cleaned_test_functions.jsonl/245 | {
"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,
62,
20,
16356,
15,
368,
341,
262,
442,
220,
15,
87,
20,
16356,
15,
481,
25784,
279,
2701,
7600,
421,
279,
897,
315,
4161,
78177,
374,
6144,
311,
279,
897,
315,
4161,
647,
56,
271,
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_from_page_type() {
assert_eq!(
PageType::from(parquet::PageType::DataPage),
PageType::DataPage
);
assert_eq!(
PageType::from(parquet::PageType::IndexPage),
PageType::IndexPage
);
assert_eq!(
PageType::from(parquet::PageType::DictionaryPage),
PageType::DictionaryPage
... | rust_cleaned_test_functions.jsonl/126078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6129,
1819,
368,
341,
197,
6948,
10714,
33673,
298,
65439,
929,
486,
1499,
31975,
23300,
486,
2665,
929,
486,
1043,
2665,
1326,
298,
65439,
929,
486,
1043,
2665,
198,
197,
197,
317,
197,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type() {
let mut m = Module::new();
let s = m.new_struct();
s.set_name(String::from("Order"));
s.module_mut();
println!("done");
} | rust_cleaned_test_functions.jsonl/32848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
368,
341,
286,
1077,
5206,
296,
284,
13711,
486,
931,
1428,
286,
1077,
274,
284,
296,
4618,
15126,
543,
286,
274,
980,
1269,
2242,
486,
1499,
445,
4431,
4010,
286,
274,
10076,
29523,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_thread_member() -> Result<(), TimestampParseError> {
const DATETIME: &str = "2021-09-19T14:17:32.000000+00:00";
let join_timestamp = Timestamp::from_str(DATETIME)?;
let value = ThreadMember {
flags: 3,
id: Some(Id::new(1)),
member: No... | rust_cleaned_test_functions.jsonl/101212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 702
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10814,
19388,
368,
1464,
5714,
68843,
32758,
14463,
1454,
29,
341,
286,
733,
39362,
44618,
25,
609,
495,
284,
330,
17,
15,
17,
16,
12,
15,
24,
12,
16,
24,
51,
16,
19,
25,
16,
22,
25,
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_encode_lengths() -> Result<()> {
#[bitcoin_code(crate = "crate")]
#[derive(BitcoinCode, PartialEq, Debug)]
struct Test {
array: ByteArray,
};
fn make(vec: Vec<u8>) -> Test {
Test { array: vec.into() }
}
let encoded =... | rust_cleaned_test_functions.jsonl/77195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
54416,
368,
1464,
5714,
71698,
341,
286,
11506,
83910,
4136,
54907,
284,
330,
61711,
5422,
286,
11506,
27098,
68653,
7160,
2078,
11,
55039,
11,
11091,
5563,
286,
2036,
3393,
341,
310,
1334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_pound_line_to_key_value() {
let a = from_pound_line_to_key_value("# ignore");
assert_eq!(None, a);
let a = from_pound_line_to_key_value("# soooo much space ");
assert_eq!(None, a);
let a = from_pound_line_to_key_value(
... | rust_cleaned_test_functions.jsonl/64385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
620,
795,
6528,
2346,
3097,
3142,
368,
341,
286,
1077,
264,
284,
504,
620,
795,
6528,
2346,
3097,
3142,
3584,
10034,
797,
286,
2060,
10714,
10297,
4064,
11,
264,
626,
286,
1077,
264,
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_duration_seconds_with_frac() {
use std::time::Duration;
let zero = Duration::new(0, 0);
let one_second = Duration::new(1, 0);
let half_second = Duration::new(0, 500_000_000);
#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct Structf64Strict {
... | rust_cleaned_test_functions.jsonl/23051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1591
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
34825,
6615,
70358,
368,
341,
262,
990,
1460,
486,
1678,
486,
12945,
280,
262,
1077,
7168,
284,
21045,
486,
931,
7,
15,
11,
220,
15,
317,
262,
1077,
825,
29644,
284,
21045,
486,
931,
7,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_203() {
assert_eq!(Solution::remove_elements(linked![1,2,6,3,4,5,6], 6), linked![1,2,3,4,5]);
} | rust_cleaned_test_functions.jsonl/2188 | {
"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,
62,
17,
15,
18,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
5399,
22801,
25389,
291,
20703,
16,
11,
17,
11,
21,
11,
18,
11,
19,
11,
20,
11,
21,
1125,
220,
21,
701,
10592,
20703,
16,
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 |
#[test]
fn test_auth() {
let client_auth_port = sccache::dist::client_auth::VALID_PORTS[0];
assert_eq!(TcpStream::connect(("localhost", client_auth_port)).unwrap_err().kind(), io::ErrorKind::ConnectionRefused);
assert_eq!(TcpStream::connect(("localhost", 4444)).unwrap_err().kind... | rust_cleaned_test_functions.jsonl/44088 | {
"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,
14014,
368,
341,
1066,
262,
1077,
2943,
14014,
8716,
284,
274,
638,
1777,
486,
12211,
486,
2972,
14014,
486,
10044,
95559,
58,
15,
935,
262,
2060,
10714,
10297,
77536,
3027,
486,
6459,
30873,
8301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scoring_p2() {
let config = GossipsubConfig::default();
let mut peer_score_params = PeerScoreParams::default();
let topic = Topic::new("test");
let topic_hash = topic.hash();
let mut topic_params = TopicScoreParams::default();
topic_params.time_in_... | rust_cleaned_test_functions.jsonl/66921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1885
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
5503,
620,
17,
368,
341,
286,
1077,
2193,
284,
479,
41473,
1966,
2648,
486,
2258,
543,
286,
1077,
5206,
14397,
10405,
6745,
284,
45147,
10570,
4870,
486,
2258,
543,
286,
1077,
8544,
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... | 2 |
#[test]
fn test_random_seed() {
let perlin = Perlin::new().set_seed(random());
let _ = perlin.get([1.0, 2.0, 3.0]);
} | rust_cleaned_test_functions.jsonl/117173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
33809,
368,
341,
286,
1077,
817,
3732,
284,
3616,
3732,
486,
931,
1005,
746,
33809,
25110,
1423,
286,
1077,
716,
284,
817,
3732,
670,
2561,
16,
13,
15,
11,
220,
17,
13,
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 |
#[test]
fn test_wait_many_connections() {
let path_to_socket = "/tmp/test_socket_http_server4.sock";
fs::remove_file(path_to_socket).unwrap_or_default();
let mut server = HttpServer::new(path_to_socket.to_string()).unwrap();
server.start_server().unwrap();
let mut socke... | rust_cleaned_test_functions.jsonl/2923 | {
"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,
18760,
22101,
56402,
368,
341,
286,
1077,
1815,
2346,
19555,
284,
3521,
5173,
12697,
19555,
25888,
12015,
19,
68171,
876,
286,
8619,
486,
5399,
2458,
5581,
2346,
19555,
568,
15454,
8734,
9993,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ident() {
assert_eq!(ident(&b"foo "[..]), Done(&b" "[..], "foo"));
assert_eq!(ident(&b" foo "[..]), Done(&b" "[..], "foo"));
assert_eq!(ident(&b" bool "[..]), Error(Err::Position(ErrorKind::Custom(1), &b"bool"[..])));
} | rust_cleaned_test_functions.jsonl/11382 | {
"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,
38399,
368,
341,
262,
2060,
10714,
10297,
1713,
2099,
65,
1,
7975,
10545,
496,
9719,
27357,
2099,
65,
1,
10545,
496,
1125,
330,
7975,
4010,
262,
2060,
10714,
10297,
1713,
2099,
65,
1,
15229,
105... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_domain_type_integer() {
let ty = DomainType {
annotation: Default::default(),
id: "ty".to_string(),
r#type: Type::Integer,
};
let prog = Context::new_root(&Default::default())
.with_domain("foo")
.render_with(&ty);
let expect = quote! {
... | rust_cleaned_test_functions.jsonl/26902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20111,
1819,
31725,
368,
341,
262,
1077,
13580,
284,
21070,
929,
341,
286,
21223,
25,
7899,
486,
2258,
3148,
286,
877,
25,
330,
1881,
3263,
983,
3904,
3148,
286,
435,
2,
1313,
25,
3990,
486,
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_blake2s_constraints() {
let cs = ConstraintSystem::<Fr>::new_ref();
let input_bits: Vec<_> = (0..512)
.map(|_| Boolean::new_witness(r1cs_core::ns!(cs, "input bit"), || Ok(true)).unwrap())
.collect();
evaluate_blake2s(&input_bits).unwrap();
... | rust_cleaned_test_functions.jsonl/101935 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13141,
726,
17,
82,
60267,
368,
341,
286,
1077,
10532,
284,
44264,
2320,
27638,
22560,
6831,
931,
7793,
543,
286,
1077,
1946,
20034,
25,
11312,
32399,
29,
284,
320,
15,
496,
20,
16,
17,
340,
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_version_not_equal() {
assert!(Version::parse("1.0").unwrap() != Version::parse("2.0.0").unwrap());
assert!(!(Version::parse("1.0").unwrap() != Version::parse("1.0.0").unwrap()));
} | rust_cleaned_test_functions.jsonl/6350 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
7913,
11478,
368,
341,
286,
2060,
10297,
5637,
486,
6400,
445,
16,
13,
15,
1827,
15454,
368,
961,
6079,
486,
6400,
445,
17,
13,
15,
13,
15,
1827,
15454,
1423,
286,
2060,
0,
33660,
5637,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_format_float() {
assert_eq!(
"%f".parse::<CFormatSpec>()
.unwrap()
.format_float(f64::from(1.2345))
.ok(),
Some("1.234500".to_string())
);
assert_eq!(
"%+f"
.pars... | rust_cleaned_test_functions.jsonl/37689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8378,
8955,
17586,
368,
341,
286,
2060,
10714,
33673,
310,
5962,
69,
3263,
6400,
27638,
34,
4061,
8327,
18949,
394,
659,
15454,
741,
394,
659,
2243,
17586,
955,
21,
19,
486,
1499,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_get_version() {
let expected = vec![0, 3, 0, 0, 0];
let mut bb = ByteBuffer::new();
ShortEncoder::encode(&mut bb, CommandAPDU::new(U2fCommand::Version, 0, 0, vec![], Some(256))).unwrap();
assert_eq!(bb.to_bytes(), expected);
} | rust_cleaned_test_functions.jsonl/124401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
3062,
9438,
368,
341,
286,
1077,
3601,
284,
7486,
20703,
15,
11,
220,
18,
11,
220,
15,
11,
220,
15,
11,
220,
15,
935,
286,
1077,
5206,
16520,
284,
50299,
486,
931,
543,
286,
10698,
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_mention_without_member() {
let value = Mention {
avatar: None,
bot: false,
discriminator: "0001".to_owned(),
id: UserId(1),
member: None,
name: "foo".to_owned(),
public_flags: UserFlags::empty(),
... | rust_cleaned_test_functions.jsonl/67373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 699
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26985,
290,
39904,
19388,
368,
341,
286,
1077,
897,
284,
85148,
341,
310,
20701,
25,
2240,
345,
310,
10924,
25,
895,
345,
310,
81738,
25,
330,
15,
15,
15,
16,
3263,
983,
51973,
3148,
310,
877,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_foldl_consuming() {
let h = hlist![1, false, 42f32];
let folded = h.foldl(
hlist![
|acc, i| i + acc,
|acc, b: bool| if !b && acc > 42 { 9000f32 } else { 0f32 },
|acc, f| f + acc,
],
1,
);
... | rust_cleaned_test_functions.jsonl/24757 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
75,
3382,
61117,
368,
341,
286,
1077,
305,
284,
305,
1607,
20703,
16,
11,
895,
11,
220,
19,
17,
69,
18,
17,
935,
286,
1077,
47035,
284,
305,
55031,
75,
1006,
310,
305,
1607,
90515,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple_patterns() {
assert_eq!(run("foo=warn,bar=trace", "foo", Level::Warn), true);
assert_eq!(run("foo=warn,bar=trace", "foo", Level::Info), false);
assert_eq!(run("foo=warn,bar=trace", "foo", Level::Debug), false);
assert_eq!(run("foo=warn,bar=trace", "bar", ... | rust_cleaned_test_functions.jsonl/126008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
64923,
368,
341,
286,
2060,
10714,
10297,
6108,
445,
7975,
28,
33481,
11,
2257,
28,
15067,
497,
330,
7975,
497,
9395,
486,
38244,
701,
830,
317,
286,
2060,
10714,
10297,
6108,
445,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_executor_multiple_blocks() {
let executor = TestExecutor::new();
let mut parent_block_id = executor.committed_block_id();
for i in 0..100 {
parent_block_id = execute_and_commit_block(&executor, parent_block_id, i);
}
} | rust_cleaned_test_functions.jsonl/12643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
81207,
45233,
25201,
368,
341,
262,
1077,
31558,
284,
3393,
25255,
486,
931,
543,
262,
1077,
5206,
2681,
7113,
842,
284,
31558,
905,
5483,
7113,
842,
1428,
262,
369,
600,
304,
220,
15,
496,
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_parse_static() {
let re = ResourceDef::new("/");
assert!(re.is_match("/"));
assert!(!re.is_match("/a"));
let re = ResourceDef::new("/name");
assert!(re.is_match("/name"));
assert!(!re.is_match("/name1"));
assert!(!re.is_match("/name/"));
... | rust_cleaned_test_functions.jsonl/87890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25360,
368,
341,
286,
1077,
312,
284,
11765,
2620,
486,
931,
58423,
286,
2060,
10297,
265,
2079,
10708,
4283,
4010,
286,
2060,
0,
3471,
265,
2079,
10708,
4283,
64,
14929,
286,
1077,
312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file() {
let tf = parse_test(
r#"; before
test cfg option=5
test verify
set enable_float=false
feature "foo"
feature !"bar"
... | rust_cleaned_test_functions.jsonl/8365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 732
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
368,
341,
286,
1077,
6409,
284,
4715,
4452,
1006,
310,
435,
2,
5123,
1573,
198,
6526,
1273,
13286,
2999,
28,
20,
198,
6526,
1273,
10146,
198,
6526,
738,
7283,
17586,
12219,
198,
6526,
4565... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extract_lock_from_result() {
let raw_key = b"key".to_vec();
let key = Key::from_raw(&raw_key);
let ts = 100;
let mut info = LockInfo::default();
info.set_key(raw_key);
info.set_lock_version(ts);
info.set_lock_ttl(100);
let case = St... | rust_cleaned_test_functions.jsonl/80860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
9818,
5673,
5287,
368,
341,
286,
1077,
7112,
3097,
284,
293,
1,
792,
3263,
983,
13251,
543,
286,
1077,
1376,
284,
5309,
486,
1499,
16067,
2099,
1041,
3097,
317,
286,
1077,
10591,
284,
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_add_timeout_stop() {
System::run(|| {
let _addr = MyActor {
op: Op::TimeoutStop,
}
.start();
})
.unwrap();
} | rust_cleaned_test_functions.jsonl/35702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
20537,
19039,
368,
341,
262,
739,
486,
6108,
79453,
341,
286,
1077,
716,
6214,
284,
3017,
18870,
341,
310,
1179,
25,
10672,
486,
7636,
10674,
345,
286,
456,
286,
659,
2468,
543,
262,
2751,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extract_package_version() -> io::Result<()> {
let config_name = "package.json";
let config_content = json::json!({
"name": "starship",
"version": "0.1.0"
})
.to_string();
let project_dir = create_project_dir()?;
fill_config... | rust_cleaned_test_functions.jsonl/19236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
26328,
9438,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
1722,
4323,
876,
286,
1077,
2193,
7495,
284,
2951,
486,
2236,
0,
2262,
310,
330,
606,
788,
330,
11870... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_base64() {
let tests = vec![
("", ""),
("YWJj", "abc"),
("YWIgYw==", "ab c"),
("YWIKYw==", "ab\nc"),
("YWIJYw==", "ab\tc"),
("cXdlcnR5MTIzNDU2", "qwerty123456"),
(
"QUJDREVGR0hJSktMTU... | rust_cleaned_test_functions.jsonl/9114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
7651,
21,
19,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
497,
72712,
310,
3489,
98117,
41,
73,
497,
330,
13683,
4461,
310,
3489,
56,
60195,
70,
56,
86,
418,
497,
330,
370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_map_api() {
let _setup_guard = setup();
let mut isolate = v8::Isolate::new(Default::default());
{
let mut hs = v8::HandleScope::new(&mut isolate);
let scope = hs.enter();
let context = v8::Context::new(scope);
let mut cs = v8::ContextScope::new(scope, context);
let scop... | rust_cleaned_test_functions.jsonl/77894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
11697,
368,
341,
220,
1077,
716,
15188,
36796,
284,
6505,
543,
220,
1077,
5206,
42123,
284,
348,
23,
486,
3872,
33066,
486,
931,
87874,
486,
2258,
1423,
220,
341,
262,
1077,
5206,
32220,
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_case_9() {
let key = "f999b20ab4769eb1d01c057c5295ed042b4536561dce32478b113adb5b605cac";
let nonce = "75bcfcacb5e3e811b78e72e398fdd118";
let expected_output =
"564eb6b2ac2b92270af7c0b054cc7a721313e4ed3651b0970db9dfcdfda27220";
hchac... | rust_cleaned_test_functions.jsonl/44671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19096,
62,
24,
368,
341,
310,
1077,
1376,
284,
330,
69,
24,
24,
24,
65,
17,
15,
370,
19,
22,
21,
24,
3065,
16,
67,
15,
16,
66,
15,
20,
22,
66,
20,
17,
24,
20,
291,
15,
19,
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_bitwise_or_simd() {
let buf1 = [0b00110011u8; 64];
let buf2 = [0b11110000u8; 64];
let mut buf3 = [0b00000000; 64];
unsafe { bitwise_bin_op_simd(&buf1, &buf2, &mut buf3, |a, b| a | b) };
for i in buf3.iter() {
assert_eq!(&0b11110011u8, i);
... | rust_cleaned_test_functions.jsonl/6792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
4482,
8734,
18314,
67,
368,
341,
286,
1077,
6607,
16,
284,
508,
15,
65,
15,
15,
16,
16,
15,
15,
16,
16,
84,
23,
26,
220,
21,
19,
935,
286,
1077,
6607,
17,
284,
508,
15,
65,
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_validator_info_max_space() {
// 70-character string
let max_short_string =
"Max Length String KWpP299aFCBWvWg1MHpSuaoTsud7cv8zMJsh99aAtP8X1s26yrR1".to_string();
// 300-character string
let max_long_string = "Lorem ipsum dolor sit amet, consectetur adip... | rust_cleaned_test_functions.jsonl/12699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64959,
3109,
6345,
14663,
368,
341,
286,
442,
220,
22,
15,
79225,
914,
198,
286,
1077,
1932,
16673,
3904,
4035,
310,
330,
5974,
17287,
923,
71915,
79,
47,
17,
24,
24,
64,
6754,
77563,
85,
54,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filters() {
let opt_warn = LoggerOptions {
filter: log::LevelFilter::Warn,
..Default::default()
};
assert_eq!(opt_warn.effective_global_filter(), log::LevelFilter::Warn);
assert_eq!(opt_warn.issue_filter(), log::LevelFilter::Error);
let opt_debug = LoggerOpti... | rust_cleaned_test_functions.jsonl/20056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 457
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22481,
368,
341,
262,
1077,
3387,
55045,
284,
9514,
3798,
341,
286,
4051,
25,
1487,
486,
4449,
5632,
486,
38244,
345,
286,
5241,
3675,
486,
2258,
741,
262,
2605,
262,
2060,
10714,
10297,
2912,
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_display_path() {
let dir = TempDir::new("test-display-path").unwrap();
let key = SnapKey::new(1, 1, 1);
let prefix = format!("{}_{}", SNAP_GEN_PREFIX, key);
let display_path = Snap::get_display_path(dir.path(), &prefix);
assert_ne!(display_path, "");
} | rust_cleaned_test_functions.jsonl/9594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
2638,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
1944,
52839,
33095,
1827,
15454,
543,
286,
1077,
1376,
284,
28232,
1592,
486,
931,
7,
16,
11,
220,
16,
11,
220,
16,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_writable_index() {
let message = check_test_loaded_message().0;
assert!(message.is_writable_index(0));
assert!(!message.is_writable_index(1));
assert!(message.is_writable_index(2));
assert!(!message.is_writable_index(3));
assert!(message.is_wri... | rust_cleaned_test_functions.jsonl/34144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
1670,
22533,
3560,
368,
341,
286,
1077,
1943,
284,
1779,
4452,
49205,
6462,
1005,
15,
401,
286,
2060,
10297,
1994,
2079,
1670,
22533,
3560,
7,
15,
1106,
286,
2060,
0,
3471,
1994,
2079,
167... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flags_noatime() {
const FS_NOATIME_FL: std::os::raw::c_long = 0x00000080;
let tempdir = tempfile::tempdir().unwrap();
let tempfile = File::create(tempdir.path().join("foo")).unwrap();
unsafe {
use std::os::unix::io::AsRawFd as _;
... | rust_cleaned_test_functions.jsonl/43879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14130,
6536,
266,
545,
368,
341,
1789,
286,
733,
24289,
9100,
828,
5660,
22588,
25,
1460,
486,
436,
486,
1041,
486,
66,
17799,
284,
220,
15,
87,
15,
15,
15,
15,
15,
15,
23,
15,
401,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peer_close() {
let peer_port = 1025;
let local_port = 1026;
let mut ctx = MuxerTestContext::new("peer_close");
let mut sock = ctx.create_local_listener(local_port);
ctx.init_pkt(local_port, peer_port, uapi::VSOCK_OP_REQUEST);
ctx.send();
l... | rust_cleaned_test_functions.jsonl/37603 | {
"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,
45159,
12704,
368,
341,
286,
1077,
14397,
8716,
284,
220,
16,
15,
17,
20,
280,
286,
1077,
2205,
8716,
284,
220,
16,
15,
17,
21,
280,
286,
1077,
5206,
5635,
284,
386,
2200,
261,
2271,
1972,
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_parse_port_range_fromstr() {
// A single `port` value between 0-65k should parse: the start and end values should be the
// same.
match "22".parse::<PortRange>() {
Ok(v) => {
assert_eq!(v.from, 22u16);
assert_eq!(v.to, 22u16);
... | rust_cleaned_test_functions.jsonl/83832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8716,
9698,
5673,
495,
368,
341,
286,
442,
362,
3175,
1565,
403,
63,
897,
1948,
220,
15,
12,
21,
20,
74,
1265,
4715,
25,
279,
1191,
323,
835,
2750,
1265,
387,
279,
198,
286,
442,
1852... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_register() {
assert_ne!(crate::Type::INVALID, MySharedArc::type_());
assert_ne!(crate::Type::INVALID, MySharedRc::type_());
} | rust_cleaned_test_functions.jsonl/49616 | {
"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,
14000,
368,
341,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
36809,
486,
1313,
62,
1423,
286,
2060,
13925,
10297,
61711,
486,
929,
486,
46859,
11,
3017,
16997,
49,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_statistics_partial_eq() {
let expected = Statistics::int32(Some(12), Some(45), None, 11, true);
assert!(Statistics::int32(Some(12), Some(45), None, 11, true) == expected);
assert!(Statistics::int32(Some(11), Some(45), None, 11, true) != expected);
assert!(Statist... | rust_cleaned_test_functions.jsonl/15834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 712
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49569,
52068,
10714,
368,
341,
286,
1077,
3601,
284,
24624,
486,
396,
18,
17,
65405,
7,
16,
17,
701,
4329,
7,
19,
20,
701,
2240,
11,
220,
16,
16,
11,
830,
626,
286,
2060,
10297,
38599,
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_bound_difference() {
let bound = ClosedInterval::new(0, 3);
let empty = ClosedInterval::empty();
let res = bound.difference(&ClosedInterval::new(-2, -1));
assert_eq!(res.difference, [empty, bound]);
assert_eq!(res.intersection, empty);
let res = ... | rust_cleaned_test_functions.jsonl/105383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19447,
47525,
368,
341,
286,
1077,
6822,
284,
44679,
10256,
486,
931,
7,
15,
11,
220,
18,
317,
286,
1077,
4287,
284,
44679,
10256,
486,
3194,
1428,
286,
1077,
592,
284,
6822,
950,
18192,
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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.