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_pass_decrypt() {
let expected_pt = b"Be sure to drink your Ovaltine";
let pass = b"hackme";
let ciphertext = pass_encrypt_util();
let mut plaintext = Vec::new();
pass_decrypt(
&mut ciphertext.as_slice(),
&mut plaintext,
... | rust_cleaned_test_functions.jsonl/37920 | {
"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,
15464,
80764,
368,
341,
286,
1077,
3601,
20124,
284,
293,
1,
3430,
2704,
311,
7027,
697,
55689,
83,
482,
876,
286,
1077,
1494,
284,
293,
1,
65972,
2660,
3302,
286,
1077,
69789,
284,
1494,
66593,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_search_type_from_str() {
let search_type = SearchType::from_str("artist");
assert_eq!(search_type.unwrap(), SearchType::Artist);
let unknown_search_type = SearchType::from_str("unknown_search_type");
assert_eq!(unknown_search_type.is_err(), true);
} | rust_cleaned_test_functions.jsonl/87168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
10716,
1819,
5673,
2895,
368,
341,
262,
1077,
2711,
1819,
284,
7542,
929,
486,
1499,
2895,
445,
18622,
797,
262,
2060,
10714,
10297,
1836,
1819,
55395,
1507,
7542,
929,
486,
40309,
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_get_physical() {
let num = super::get_physical();
if let Some(n) = env_var("NUM_CPUS_TEST_GET_PHYSICAL") {
assert_eq!(num, n);
} else {
assert!(num > 0);
assert!(num < 236_451);
}
} | rust_cleaned_test_functions.jsonl/35692 | {
"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,
3062,
84980,
368,
341,
286,
1077,
1629,
284,
2256,
486,
455,
84980,
543,
286,
421,
1077,
4329,
1445,
8,
284,
6105,
4612,
445,
17488,
45976,
2034,
11641,
12702,
68356,
15571,
899,
341,
310,
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... | 2 |
#[test]
fn test_symlink() {
use futures::Future;
let dir = TempDir::new("base").unwrap();
let src = dir.path().join("src.txt");
let dst = dir.path().join("dst.txt");
{
let mut file = fs::File::create(&src).unwrap();
file.write_all(b"hello").unwrap();
}
pool::run({ ... | rust_cleaned_test_functions.jsonl/44601 | {
"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,
58530,
44243,
368,
341,
262,
990,
36823,
486,
24206,
401,
262,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
3152,
1827,
15454,
543,
262,
1077,
2286,
284,
5419,
3875,
1005,
5987,
445,
3548,
3909,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asset_lifecycle() {
let dir = create_dir_and_file("fake.png");
let asset_server = setup(dir.path());
asset_server.add_loader(FakePngLoader);
let assets = asset_server.register_asset_type::<PngAsset>();
let mut world = World::new();
world.insert_re... | rust_cleaned_test_functions.jsonl/53390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42299,
907,
19517,
368,
341,
286,
1077,
5419,
284,
1855,
4334,
8378,
2458,
445,
30570,
3508,
797,
286,
1077,
9329,
12015,
284,
6505,
14161,
3875,
1423,
286,
9329,
12015,
1364,
22139,
7832,
726,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kk_session() {
let secret1 = StaticSecret::new(&mut rand::rngs::OsRng);
let public1 = PublicKey::from(&secret1);
let secret2 = StaticSecret::new(&mut rand::rngs::OsRng);
let public2 = PublicKey::from(&secret2);
let mut session1 = SessionBuilder::new("KK")
.secret(se... | rust_cleaned_test_functions.jsonl/51959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 463
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
74,
12316,
368,
341,
262,
1077,
6234,
16,
284,
23105,
19773,
486,
931,
2099,
6984,
10382,
486,
69890,
82,
486,
28867,
49,
968,
317,
262,
1077,
584,
16,
284,
70280,
486,
1499,
2099,
20474,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bookmark_and_unbookmark() {
let conn = crate::Connection::new().unwrap();
let status = crate::api::v1::statuses::post(&conn)
.status("bookmark and unbookmark.")
.send()
.unwrap();
let bookmarked = bookmark::post(&conn, status.id()).send().unwrap();
assert_eq!(status.id(), book... | rust_cleaned_test_functions.jsonl/97301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26421,
3987,
8378,
4907,
60375,
368,
341,
197,
10217,
4534,
284,
17717,
486,
4526,
486,
931,
1005,
15454,
1428,
197,
10217,
2639,
284,
17717,
486,
2068,
486,
85,
16,
486,
65353,
486,
2203,
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 |
#[test]
fn test_calc_now() {
assert_eq!(calc_now(0, 0x000000), 0x0_000000);
assert_eq!(calc_now(0, 0x000001), 0x0_000001);
assert_eq!(calc_now(0, 0x7FFFFF), 0x0_7FFFFF);
assert_eq!(calc_now(1, 0x7FFFFF), 0x1_7FFFFF);
assert_eq!(calc_now(0, 0x800000), 0x0_800000);
... | rust_cleaned_test_functions.jsonl/4360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38241,
20813,
368,
341,
286,
2060,
10714,
10297,
26586,
20813,
7,
15,
11,
220,
15,
87,
15,
15,
15,
15,
15,
15,
701,
220,
15,
87,
15,
62,
15,
15,
15,
15,
15,
15,
317,
286,
2060,
10714,
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_call_expression() {
let (function, mut arguments) = match statement_expression("add(1, 2 * 3, 4 + 5);") {
Expression::Call {
function: Function::Identifier(function),
arguments,
..
} => (function, arguments),
... | rust_cleaned_test_functions.jsonl/64087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
28068,
368,
341,
286,
1077,
320,
1688,
11,
5206,
5977,
8,
284,
2432,
5114,
28068,
445,
718,
7,
16,
11,
220,
17,
353,
220,
18,
11,
220,
19,
488,
220,
20,
1215,
899,
341,
310,
16378,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strip_white_new() {
let string_1 = String::from("fkljjsdjlksfdklj dfiwj wefwefwfe");
let string_2 = String::from("derbrererer\n");
let string_3 = String::from("dee\nwfweww rb tte rererer\n");
assert_eq!(&strip(&string_1), "fkljjsdjlksfdkljdfiwjwefwefwfe");
assert_eq!(&str... | rust_cleaned_test_functions.jsonl/13711 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66130,
44431,
5921,
368,
341,
262,
1077,
914,
62,
16,
284,
923,
486,
1499,
445,
69,
10561,
73,
2519,
67,
43870,
2787,
6902,
10561,
73,
6764,
37081,
73,
582,
20564,
823,
86,
1859,
797,
262,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_child_object() {
let obj: ChildObject = Object::new(&[]).expect("Object::new failed");
assert_eq!(obj, obj.imp().instance());
} | rust_cleaned_test_functions.jsonl/9010 | {
"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,
8657,
17268,
5314,
368,
341,
286,
1077,
2839,
25,
9391,
1190,
284,
3002,
486,
931,
2099,
1294,
568,
17119,
445,
1190,
486,
931,
4641,
3071,
286,
2060,
10714,
10297,
2295,
11,
2839,
80454,
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 |
#[test]
fn test_bool_array_or_validity() {
let a = BooleanArray::from(vec![
None,
None,
None,
Some(false),
Some(false),
Some(false),
Some(true),
Some(true),
Some(true),
]);
let b =... | rust_cleaned_test_functions.jsonl/36445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 564
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
3858,
8734,
8337,
487,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
25592,
90515,
310,
2240,
345,
310,
2240,
345,
310,
2240,
345,
310,
4329,
3576,
1326,
310,
4329,
3576,
1326,
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_double() {
let a = Affine::new(
field_element!("01ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca"),
field_element!("005668060aa49730b7be4801df46ec62de53ecd11abe43a32873000c36e8dc1f"),
);
let b = Affine::new(
field_elemen... | rust_cleaned_test_functions.jsonl/107419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
368,
341,
286,
1077,
264,
284,
9748,
482,
486,
931,
1006,
310,
2070,
7894,
17223,
15,
16,
823,
16,
20,
66,
16,
23,
20,
24,
24,
24,
22,
16,
65,
22,
16692,
291,
19,
16,
20,
64,
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_process_new_vote_state_lockout_violation() {
// Construct on-chain vote state
let mut vote_state1 = VoteState::default();
vote_state1.process_slot_votes_unchecked(&[1, 2, 4, 5]);
assert_eq!(
vote_state1
.votes
.iter()
... | rust_cleaned_test_functions.jsonl/6126 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
5921,
54360,
4387,
9818,
411,
2273,
24903,
367,
368,
341,
286,
442,
18678,
389,
65186,
6910,
1584,
198,
286,
1077,
5206,
6910,
4387,
16,
284,
34034,
1397,
486,
2258,
543,
286,
6910,
4387,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_sig_with_root_ancestor_fork_max_len() {
let sig = Signature::default();
let mut status_cache = BankStatusCache::default();
let blockhash = hash(Hash::default().as_ref());
let ancestors = vec![(2, 2)].into_iter().collect();
status_cache.insert(&blockha... | rust_cleaned_test_functions.jsonl/82709 | {
"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,
21814,
29252,
6615,
12993,
62,
66878,
761,
669,
6345,
6043,
368,
341,
286,
1077,
8366,
284,
32232,
486,
2258,
543,
286,
1077,
5206,
2639,
11529,
284,
8547,
2522,
8233,
486,
2258,
543,
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_method_pass_string_by_value() {
let cxx = indoc! {"
uint32_t Bob::measure_string(std::string z) const {
return z.length();
}
std::unique_ptr<std::string> get_msg() {
return std::make_unique<std::string>(\"hello\");
}
"};
let hdr... | rust_cleaned_test_functions.jsonl/9778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9032,
15464,
3904,
3710,
3142,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
14261,
486,
47799,
3904,
5194,
486,
917,
1147,
8,
733,
341,
310,
470,
1147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_make_with_start() {
mock_mgp_once!(mgp_path_make_with_start_context, |_, _, _| {
mgp_error::MGP_ERROR_UNABLE_TO_ALLOCATE
});
with_dummy!(|memgraph: &Memgraph| {
let vertex = Vertex::new(std::ptr::null_mut(), &memgraph);
assert!(Path::make_with_start(&vertex, ... | rust_cleaned_test_functions.jsonl/101744 | {
"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,
28230,
6615,
4906,
368,
341,
262,
7860,
717,
21888,
7630,
10297,
12311,
79,
2638,
28230,
6615,
4906,
8467,
11,
760,
6878,
8358,
85137,
341,
286,
13742,
79,
4096,
486,
44,
24430,
5414,
6735,
3494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_normalise_ssh_url() {
assert_eq!(
normalise_ssh_url("git@github.com:wezm/grab.git").unwrap(),
"ssh://git@github.com/wezm/grab.git"
);
assert_eq!(
normalise_ssh_url("git@github.com:2222:wezm/grab.git").unwrap(),
"ssh://git@gi... | rust_cleaned_test_functions.jsonl/117916 | {
"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,
13973,
1064,
82805,
2903,
368,
341,
286,
2060,
10714,
33673,
310,
4622,
1064,
82805,
2903,
445,
12882,
31,
5204,
905,
25,
896,
31489,
40336,
370,
32799,
1827,
15454,
3148,
310,
330,
25537,
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... | 1 |
#[test]
fn test_to_packets() {
let keypair = Keypair::new();
let hash = Hash::new(&[1; 32]);
let tx = system_transaction::transfer(&keypair, &keypair.pubkey(), 1, hash);
let rv = to_packets(&vec![tx.clone(); 1]);
assert_eq!(rv.len(), 1);
assert_eq!(rv[0].packets.l... | rust_cleaned_test_functions.jsonl/134293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
63569,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5175,
284,
6531,
486,
931,
2099,
58,
16,
26,
220,
18,
17,
2558,
286,
1077,
9854,
284,
1849,
2888... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_code_module_builder_valid() {
let modules = vec![
create_object_info(true, 0x1000, Some(0x1000)),
create_object_info(true, 0x3000, Some(0x1000)),
];
let valid = ModuleListBuilder {
inner: modules.iter().map(|m| (m.clone(), false)).coll... | rust_cleaned_test_functions.jsonl/12569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
10750,
28532,
8337,
368,
341,
286,
1077,
13454,
284,
7486,
90515,
310,
1855,
5314,
3109,
3715,
11,
220,
15,
87,
16,
15,
15,
15,
11,
4329,
7,
15,
87,
16,
15,
15,
15,
6965,
310,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_factorial() {
let val = Factorial(20u64);
assert_eq!(val.repr().expect("failed to represent math context"), "20!");
assert_eq!(val.resolve(), 2432902008176640000);
} | rust_cleaned_test_functions.jsonl/122673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18588,
530,
368,
341,
286,
1077,
1044,
284,
37729,
530,
7,
17,
15,
84,
21,
19,
317,
286,
2060,
10714,
10297,
831,
1327,
649,
1005,
17119,
445,
16091,
311,
4009,
6888,
2266,
3975,
330,
17,
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_serial_in_buffer_limit() {
let mut serial_in_out = SharedBuffer::new();
serial_in_out.set_loopback(true);
let mut serial = Serial::new_in_out(
EventFd::new(libc::EFD_NONBLOCK).unwrap(),
Box::new(serial_in_out.clone()),
Box::new(serial_... | rust_cleaned_test_functions.jsonl/37141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1001
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
1243,
7776,
14763,
368,
341,
286,
1077,
5206,
6146,
1243,
6068,
284,
16990,
4095,
486,
931,
543,
286,
6146,
1243,
6068,
980,
17198,
1419,
3715,
626,
286,
1077,
5206,
6146,
284,
11215,
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_upgrade_client_low_height() {
let client_id = ClientId::default();
let signer = get_dummy_account_id();
let ctx = MockContext::default().with_client(&client_id, Height::new(0, 42));
let buf: Vec<u8> = Vec::new();
let buf2: Vec<u8> = Vec::new();
... | rust_cleaned_test_functions.jsonl/33743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67794,
8179,
23767,
9561,
368,
341,
286,
1077,
2943,
842,
284,
8423,
764,
486,
2258,
543,
286,
1077,
70039,
284,
633,
60321,
13500,
842,
1428,
286,
1077,
5635,
284,
14563,
1972,
486,
2258,
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... | 2 |
#[test]
fn test_object_object_keys() {
use std::iter::FromIterator;
let mut object = BTreeMap::new();
let keys = vec![
vec!["a"],
vec!["b"],
vec!["c"],
vec!["d"],
vec!["aa"],
vec!["a", "aa"],
].into_iter().map(|v| {
BTreeMap::from_iter(v.in... | rust_cleaned_test_functions.jsonl/110264 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
5314,
12631,
368,
341,
262,
990,
1460,
486,
2015,
486,
3830,
11951,
280,
262,
1077,
5206,
1633,
284,
425,
6533,
2227,
486,
931,
543,
262,
1077,
6894,
284,
7486,
90515,
286,
7486,
0,
1183,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_find_vertices_depths() {
let mut graph = Graph::new(12);
graph.add_edge(1, 4, 0).unwrap();
graph.add_edge(1, 2, 0).unwrap();
graph.add_edge(4, 11, 0).unwrap();
graph.add_edge(4, 12, 0).unwrap();
graph.add_edge(12, 3, 0).unwrap();
graph.add... | rust_cleaned_test_functions.jsonl/118490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
37720,
19061,
82,
368,
341,
286,
1077,
5206,
4771,
284,
12165,
486,
931,
7,
16,
17,
626,
286,
4771,
1364,
17932,
7,
16,
11,
220,
19,
11,
220,
15,
568,
15454,
543,
286,
4771,
1364,
179... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arch_x86() {
test_arch_mode_endian_insns(
&mut Capstone::new()
.x86()
.mode(x86::ArchMode::Mode16)
.build()
.unwrap(),
Arch::X86,
Mode::Mode16,
None,
&[],
&[
("lea", b"\x8d\x4c\x32"),
... | rust_cleaned_test_functions.jsonl/127441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34330,
3212,
23,
21,
368,
341,
262,
1273,
34330,
7302,
87193,
34386,
4412,
1006,
286,
609,
6984,
8012,
10812,
486,
931,
741,
310,
659,
87,
23,
21,
741,
310,
659,
8516,
2075,
23,
21,
486,
18727... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_composition_chain() {
let my_struct = MyTestStruct::new(String::from("Reid"), 25)
.with_weight(100)
.with_weight(150)
.with_weight(75)
.with_married(false)
.with_weight(60);
assert_eq!(my_struct.weight(), &Some(60));
assert_eq!(my_struct.marri... | rust_cleaned_test_functions.jsonl/117670 | {
"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,
2965,
3487,
30583,
368,
341,
262,
1077,
847,
15126,
284,
3017,
2271,
9422,
486,
931,
2242,
486,
1499,
445,
693,
307,
3975,
220,
17,
20,
340,
286,
659,
4197,
15876,
7,
16,
15,
15,
340,
286,
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_rotation2() {
{
let angle = std::f32::consts::TAU / 6.0;
let rot = Rot2::from_angle(angle);
assert!((rot.angle() - angle).abs() < 1e-5);
assert!((rot * rot.inverse()).angle().abs() < 1e-5);
assert!((rot.inverse() * rot).angle().... | rust_cleaned_test_functions.jsonl/23443 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44813,
17,
368,
341,
286,
341,
310,
1077,
9210,
284,
1460,
486,
69,
18,
17,
486,
95773,
486,
15204,
52,
608,
220,
21,
13,
15,
280,
310,
1077,
5749,
284,
27360,
17,
486,
1499,
21727,
29633,
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_pubkey_of() {
let keypair = Keypair::new();
let outfile = tmp_file_path("test_gen_keypair_file.json", &keypair.pubkey());
let _ = write_keypair_file(&keypair, &outfile).unwrap();
let matches = app()
.clone()
.get_matches_from(vec!["test", ... | rust_cleaned_test_functions.jsonl/36686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
792,
3575,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
33178,
284,
4174,
2458,
2638,
445,
1944,
16322,
3097,
12670,
2458,
4323,
497,
609,
792,
12670,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_switch_implies_cfg_test_unless_cfg_test() {
syntax::with_globals(|| {
let matches = &match optgroups().parse(&["--test".to_string(),
"--cfg=test".to_string()]) {
Ok(m) => m,
Err(f) => panic!(... | rust_cleaned_test_functions.jsonl/44816 | {
"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,
27652,
21007,
550,
18343,
4452,
4907,
1717,
18343,
4452,
368,
341,
286,
19482,
486,
4197,
58775,
79453,
341,
310,
1077,
9071,
284,
609,
6347,
3387,
16753,
1005,
6400,
2099,
1183,
313,
1944,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_given() {
let mut state = vec![0, 2, 7, 0];
redistribute(&mut state);
assert_eq!(vec![2, 4, 1, 2], state);
redistribute(&mut state);
assert_eq!(vec![3, 1, 2, 3], state);
redistribute(&mut state);
assert_eq!(vec![0, 2, 3, 4], state);
redistribute(&mut state);
a... | rust_cleaned_test_functions.jsonl/4291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57653,
368,
341,
262,
1077,
5206,
1584,
284,
7486,
20703,
15,
11,
220,
17,
11,
220,
22,
11,
220,
15,
935,
262,
9385,
2099,
6984,
1584,
317,
262,
2060,
10714,
10297,
4083,
20703,
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_new(){
let sys : ContCylindricalSystem = ContCylindricalSystem::new(1, 3.0, 10.0, 2);
assert_eq!(sys.sys_type, SystemType::ContinuousCylindrical(1));
assert_eq!(sys.bctype, BoundaryCond::Mixed(1));
assert_eq!(sys.sys_radius, 3.0);
assert_eq!(sys.sys_lengt... | rust_cleaned_test_functions.jsonl/105917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
3032,
286,
1077,
5708,
549,
2093,
34,
3923,
62406,
2320,
284,
2093,
34,
3923,
62406,
2320,
486,
931,
7,
16,
11,
220,
18,
13,
15,
11,
220,
16,
15,
13,
15,
11,
220,
17,
626,
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_kernel_filter_with_even_kernel_side() {
let image = gray_image!(
3, 2;
4, 1);
let k = vec![1u8, 2u8];
let kernel = Kernel::new(&k, 2, 1);
let filtered = kernel.filter(&image, |c, a| *c = a);
let expected = gray_image!(
... | rust_cleaned_test_functions.jsonl/35610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26876,
8727,
6615,
68347,
26876,
30862,
368,
341,
286,
1077,
2168,
284,
17545,
4954,
33673,
310,
220,
18,
11,
220,
17,
280,
310,
220,
19,
11,
220,
16,
626,
286,
1077,
595,
284,
7486,
20703,
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_get_after_delete() {
let mut registry = Registry::new();
let key = vec![1, 2, 3, 4];
let value = vec![5, 6, 7, 8];
let value2 = vec![9, 10, 11, 12];
assert_empty!(apply_mutations_skip_invariant_checks(
&mut registry,
vec![insert(&ke... | rust_cleaned_test_functions.jsonl/86097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 646
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
19844,
11353,
368,
341,
286,
1077,
5206,
19424,
284,
32112,
486,
931,
543,
286,
1077,
1376,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
1077,
897,
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_toggle() {
run_test!(|client, conn| {
// Issue a request to insert a new task; ensure it's not yet completed.
client.post("/todo")
.header(ContentType::Form)
.body("description=test_for_completion")
.dispatch()
.await;
... | rust_cleaned_test_functions.jsonl/115173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48860,
368,
341,
262,
1598,
4452,
10297,
91,
2972,
11,
4534,
91,
341,
286,
442,
25226,
264,
1681,
311,
5656,
264,
501,
3383,
26,
5978,
432,
594,
537,
3602,
8145,
624,
286,
2943,
6542,
4283,
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_need_up_timeout() {
need_up_timeout(ZERO);
need_up_timeout(BIG_POSITIVE);
need_up_timeout(NEGATIVE);
need_up_timeout(SMALL_NEGATIVE);
} | rust_cleaned_test_functions.jsonl/52052 | {
"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,
71506,
8237,
20537,
368,
341,
286,
1184,
8237,
20537,
27855,
17297,
317,
286,
1184,
8237,
20537,
5349,
1914,
18313,
44350,
317,
286,
1184,
8237,
20537,
7,
97127,
23215,
317,
286,
1184,
8237,
20537,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unit() {
assert_eq!(Vec3::new(233.0, 0.0, 0.0).unit(), Vec3::new(1.0, 0.0, 0.0));
assert_eq!(
Vec3::new(-233.0, 0.0, 0.0).unit(),
Vec3::new(-1.0, 0.0, 0.0)
);
} | rust_cleaned_test_functions.jsonl/35233 | {
"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,
14832,
368,
341,
286,
2060,
10714,
10297,
10050,
18,
486,
931,
7,
17,
18,
18,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
568,
3843,
1507,
11312,
18,
486,
931,
7,
16,
13,
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_from_bytes_be() {
fn check(s: &str, result: &str) {
assert_eq!(BigUint::from_bytes_be(s.as_bytes()),
BigUint::parse_bytes(result.as_bytes(), 10).unwrap());
}
check("A", "65");
check("AA", "16705");
check("AB", "16706");
... | rust_cleaned_test_functions.jsonl/90110 | {
"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,
5673,
12524,
21263,
368,
341,
286,
5168,
1779,
1141,
25,
609,
495,
11,
1102,
25,
609,
495,
8,
341,
310,
2060,
10714,
10297,
15636,
21570,
486,
1499,
12524,
21263,
1141,
5357,
12524,
14702,
5180,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cell_states_from_str() {
let game = Conway3D::from(SAMPLE);
assert_eq!(game.get_cell_at_position((0, 0, 0).into()), Cell::Inactive);
assert_eq!(game.get_cell_at_position((1, 0, 0).into()), Cell::Active);
assert_eq!(game.get_cell_at_position((2, 0, 0).into()), ... | rust_cleaned_test_functions.jsonl/90884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
16648,
22972,
5673,
2895,
368,
341,
286,
1077,
1809,
284,
59474,
18,
35,
486,
1499,
3759,
18918,
317,
286,
2060,
10714,
10297,
5804,
670,
16648,
3752,
9661,
1188,
15,
11,
220,
15,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account_keys_iter() {
let (message, keys) = check_test_loaded_message();
let mut iter = message.account_keys_iter();
for expected_key in keys {
assert_eq!(iter.next(), Some(&expected_key));
}
} | rust_cleaned_test_functions.jsonl/34140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
12631,
11723,
368,
341,
286,
1077,
320,
1994,
11,
6894,
8,
284,
1779,
4452,
49205,
6462,
1428,
286,
1077,
5206,
5367,
284,
1943,
18786,
12631,
11723,
543,
286,
369,
3601,
3097,
304,
6894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sort() {
for len in 4..25 {
for _ in 0..100 {
let mut v: Vec<_> = thread_rng().gen_iter::<i32>().take(len).collect();
let mut v1 = v.clone();
v.sort();
assert!(v.windows(2).all(|w| w[0] <= w[1]));
... | rust_cleaned_test_functions.jsonl/111404 | {
"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,
18435,
368,
341,
286,
369,
2422,
304,
220,
19,
496,
17,
20,
341,
310,
369,
716,
304,
220,
15,
496,
16,
15,
15,
341,
394,
1077,
5206,
348,
25,
11312,
32399,
29,
284,
4516,
66849,
1005,
4370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_span_merge() {
// Overlapping
assert_eq!(
Span::new(0, 2).unwrap().merge(Span::new(0, 1).unwrap()),
MergeResult::Merged(Span::new(0, 2).unwrap())
);
// Adjacent
assert_eq!(
Span::new(2, 3).unwrap().merge(Span::new(0, 1).unwrap()),
MergeResult::... | rust_cleaned_test_functions.jsonl/109249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37382,
20888,
368,
341,
262,
442,
6065,
90619,
198,
262,
2060,
10714,
33673,
286,
11903,
486,
931,
7,
15,
11,
220,
17,
568,
15454,
1005,
19052,
3759,
848,
486,
931,
7,
15,
11,
220,
16,
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_disk_index_enabled() {
let bins = 1;
let config = AccountsIndexConfig {
index_limit_mb: IndexLimitMb::Limit(0),
..AccountsIndexConfig::default()
};
let test = BucketMapHolder::<u64>::new(bins, &Some(config), 1);
assert!(test.is_disk... | rust_cleaned_test_functions.jsonl/5427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41687,
3560,
18220,
368,
341,
286,
1077,
28518,
284,
220,
16,
280,
286,
1077,
2193,
284,
40655,
1552,
2648,
341,
310,
1922,
14763,
53812,
25,
8008,
16527,
87313,
486,
16527,
7,
15,
1326,
310,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_frame_no_mask() {
let mut buf = BytesMut::from(&[0b0000_0001u8, 0b0000_0001u8][..]);
buf.extend(&[1u8]);
assert!(Parser::parse(&mut buf, true, 1024).is_err());
let frame = extract(Parser::parse(&mut buf, false, 1024));
assert!(!frame.finished);
... | rust_cleaned_test_functions.jsonl/86808 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8929,
6536,
9999,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
2099,
58,
15,
65,
15,
15,
15,
15,
62,
15,
15,
15,
16,
84,
23,
11,
220,
15,
65,
15,
15,
15,
15,
62,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash() {
let mut x = Flags::empty();
let mut y = Flags::empty();
assert!(hash::hash(&x) == hash::hash(&y));
x = Flags::all();
y = FlagABC;
assert!(hash::hash(&x) == hash::hash(&y));
} | rust_cleaned_test_functions.jsonl/23260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
414,
1077,
5206,
856,
284,
33205,
486,
3194,
543,
414,
1077,
5206,
379,
284,
33205,
486,
3194,
543,
414,
2060,
10297,
8296,
486,
8296,
2099,
87,
8,
621,
5175,
486,
8296,
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 |
#[test]
fn test_msg_cycles_available_traps() {
let cycles_amount = Cycles::from(123456789012345678901234567890u128);
let available_cycles = Cycles::from(789012345678901234567890u128);
let mut system_state = get_new_running_system_state(cycles_amount, SubnetType::Application);
let... | rust_cleaned_test_functions.jsonl/109063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 463
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6483,
68970,
26962,
3547,
2625,
368,
341,
286,
1077,
24484,
13471,
284,
356,
15805,
486,
1499,
7,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
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_create_vcpu() {
let kvm = Kvm::new().unwrap();
let vm = kvm.create_vm().unwrap();
assert!(vm.create_vcpu(0).is_ok());
} | rust_cleaned_test_functions.jsonl/92509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
2273,
16475,
368,
341,
286,
1077,
94748,
284,
730,
7338,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
94748,
2520,
39008,
1005,
15454,
1428,
286,
2060,
10297,
7338,
2520,
2273,
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 |
#[test]
fn test_cast_err_when_json_array_or_object_to_uint() {
let test_cases = vec![
("{}", ERR_TRUNCATE_WRONG_VALUE),
("[]", ERR_TRUNCATE_WRONG_VALUE),
];
let mut ctx = EvalContext::new(Arc::new(EvalConfig::new()));
for (jstr, exp) in test_cases... | rust_cleaned_test_functions.jsonl/48541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9266,
47636,
9455,
3858,
8734,
5314,
2346,
15807,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
3489,
42351,
10165,
94642,
2336,
89607,
7476,
1326,
310,
3489,
1294,
497,
10165,
9464... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_select_step_v2() {
let client = graph_serializer(GraphSON::V2);
drop_vertices(&client, "test_select_step").unwrap();
create_vertex_with_label(&client, "test_select_step", "Count");
let g = traversal().with_remote(client);
let results = g
.v(())
.has_label(... | rust_cleaned_test_functions.jsonl/26291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
11946,
2273,
17,
368,
341,
262,
1077,
2943,
284,
4771,
67441,
63779,
2703,
486,
53,
17,
626,
262,
5943,
37720,
2099,
2972,
11,
330,
1944,
13051,
11946,
1827,
15454,
1428,
262,
1855,
26611,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mux_command_too_large_length() {
let buf = [
0b10000001, // Type field - DLCParameterNegotiation.
0b00000010,
0b00000010,
0b00000010,
0b00000010,
0b00000010,
0b00000010,
0b0000001... | rust_cleaned_test_functions.jsonl/107770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
80363,
10811,
2346,
78,
45228,
5118,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
65,
16,
15,
15,
15,
15,
15,
15,
16,
11,
442,
3990,
2070,
481,
42919,
4971,
47800,
354,
7101,
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_dead_fork_transaction_error() {
let keypair1 = Keypair::new();
let keypair2 = Keypair::new();
let missing_keypair = Keypair::new();
let missing_keypair2 = Keypair::new();
let res = check_dead_fork(|blockhash, slot| {
let entry = entry::next_en... | rust_cleaned_test_functions.jsonl/43053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 689
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53427,
761,
669,
28884,
4096,
368,
341,
286,
1077,
1376,
12670,
16,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1376,
12670,
17,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
7402,
3097,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pending_peers() {
let mut cluster = new_node_cluster(0, 3);
cluster.cfg.raft_store.pd_heartbeat_tick_interval = ReadableDuration::millis(100);
let region_worker_fp = "region_apply_snap";
let pd_client = Arc::clone(&cluster.pd_client);
// Disable default max peer count check... | rust_cleaned_test_functions.jsonl/30709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37861,
36367,
388,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
10652,
30481,
13,
2944,
14809,
556,
67,
62,
72471,
43612,
20541,
284,
4457,
480,
12945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_regexp_like_match_type_joiner() -> Result<()> {
let tests = vec![
ScalarFunctionTest {
name: "regexp-like-match-type-joiner-error-1",
columns: vec![
Series::from_data(vec!["Abc-", "Abc-"]),
Series::from_data(vec!["abc-", "abc"])... | rust_cleaned_test_functions.jsonl/53022 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 567
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4920,
4580,
25535,
10708,
1819,
31017,
261,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
35176,
5152,
2271,
341,
310,
829,
25,
330,
55796,
12681,
45704,
10604,
12,
5987,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_flat_primitives() -> Result<()> {
let message = "
message test_schema {
REQUIRED BOOLEAN boolean;
REQUIRED INT32 int8 (INT_8);
REQUIRED INT32 int16 (INT_16);
REQUIRED INT32 uint8 (INTEGER(8,false));
REQUIRED INT32... | rust_cleaned_test_functions.jsonl/34420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 770
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49556,
5294,
35209,
368,
1464,
5714,
71698,
341,
286,
1077,
1943,
284,
6228,
286,
1943,
1273,
25371,
341,
310,
66577,
59393,
2710,
280,
310,
66577,
9221,
18,
17,
256,
526,
23,
220,
320,
3221,
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... | 3 |
#[test]
fn test_function_not_applicable_without_self_and_multiple_unnamed_param_lifetimes() {
// this is not permitted under lifetime elision rules
check_assist_not_applicable(
introduce_named_lifetime,
r#"fn my_fun(f: &Foo, b: &Bar) -> X<'_<|>>"#,
);
} | rust_cleaned_test_functions.jsonl/109561 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
7913,
8191,
46114,
39904,
25637,
8378,
45233,
4907,
30245,
4090,
907,
333,
6889,
368,
341,
286,
442,
419,
374,
537,
15129,
1212,
19031,
655,
1816,
5601,
198,
286,
1779,
12083,
380,
7913,
819... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_abstract_up() {
let hdr = indoc! {"
#include <memory>
class A {
public:
virtual void foo() const = 0;
virtual ~A() {}
};
class B : public A {
public:
void foo() const {}
};
inline std::unique_ptr<A> get_a() { return std::make_unique<B>(... | rust_cleaned_test_functions.jsonl/9967 | {
"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,
85939,
8237,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
17269,
397,
262,
536,
362,
341,
262,
584,
510,
286,
4108,
737,
15229,
368,
733,
284,
220,
15,
280,
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_get_broker_pod_owner_kind_other() {
let owner_references: Vec<OwnerReference> = vec![OwnerReference {
kind: "OtherOwner".to_string(),
controller: Some(true),
..Default::default()
}];
assert_eq!(
get_broker_pod_owner_kind(&ma... | rust_cleaned_test_functions.jsonl/55237 | {
"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,
3062,
880,
45985,
85337,
29027,
33162,
30456,
368,
341,
286,
1077,
6372,
92702,
25,
11312,
27,
13801,
8856,
29,
284,
7486,
20703,
13801,
8856,
341,
310,
3093,
25,
330,
11409,
13801,
3263,
983,
390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_app_2() {
let res = expression(Span::new("f 1 2"));
assert!(res.is_ok());
assert_eq!(
res.unwrap().1,
Expr::App(
Box::new(Expr::App(
Box::new(Expr::Ref("f")),
Box::new(Expr::Literal(Literal::Int64(1)))
)),
... | rust_cleaned_test_functions.jsonl/32925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8191,
62,
17,
368,
341,
262,
1077,
592,
284,
7493,
3759,
848,
486,
931,
445,
69,
220,
16,
220,
17,
14929,
262,
2060,
10297,
416,
2079,
19817,
5231,
262,
2060,
10714,
33673,
286,
592,
55395,
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_macro_emits_code_twice() {
check(
"macro_rules! dupe {($a:expr) => (($a, $a))}",
"fn r1() {replace!(41 => 42);}",
"fn f() -> (i32, i32) {dupe!(41)}",
"fn f() -> (i32, i32) {dupe!(42)}",
);
} | rust_cleaned_test_functions.jsonl/94806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58810,
22504,
1199,
4136,
54178,
558,
368,
341,
286,
1779,
1006,
310,
330,
32606,
21407,
0,
3845,
375,
314,
699,
64,
96011,
8,
589,
26856,
64,
11,
400,
64,
593,
24375,
310,
330,
8822,
435,
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_mods() {
#[derive(Default)]
struct ModsLoader {
pub count: Arc<AtomicUsize>,
}
impl ModuleLoader for ModsLoader {
fn resolve(
&self,
specifier: &str,
referrer: &str,
_is_main: bool,
) -> Result<ModuleSpecifier, AnyError> {
... | rust_cleaned_test_functions.jsonl/126048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1570
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7480,
82,
368,
341,
262,
11506,
27098,
87874,
5563,
262,
2036,
85064,
9181,
341,
414,
6675,
1760,
25,
19689,
27,
65857,
52,
2141,
12520,
262,
555,
262,
11605,
13711,
9181,
369,
85064,
9181,
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_eh_frame_cie_personality_function_relative_bad_context() {
let instrs = [1, 2, 3, 4];
let length = Label::new();
let start = Label::new();
let end = Label::new();
let aug_len = Label::new();
let aug_start = Label::new();
let aug_end = Lab... | rust_cleaned_test_functions.jsonl/9399 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 842
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
71,
8929,
666,
645,
23417,
2719,
9174,
29286,
34199,
8467,
368,
341,
286,
1077,
9491,
82,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
4821,
286,
1077,
3084,
284,
9402,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_float_sum() {
let a = Primitive::from_slice(&[1.1f64, 2.2, 3.3, 4.4, 5.5]).to(DataType::Float64);
assert!(16.5 - sum(&a).unwrap() < f64::EPSILON);
} | rust_cleaned_test_functions.jsonl/101313 | {
"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,
84087,
3858,
17586,
10160,
368,
341,
286,
1077,
264,
284,
51460,
486,
1499,
26488,
2099,
58,
16,
13,
16,
69,
21,
19,
11,
220,
17,
13,
17,
11,
220,
18,
13,
18,
11,
220,
19,
13,
19,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arm_op_type() {
use super::arm_op_type::*;
use super::ArmOperandType::*;
fn t(
op_type_value: (arm_op_type, cs_arm_op__bindgen_ty_2),
expected_op_type: ArmOperandType,
) {
let (op_type, op_value) = op_type_value;
le... | rust_cleaned_test_functions.jsonl/19229 | {
"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,
34680,
10287,
1819,
368,
341,
286,
990,
2256,
486,
2178,
10287,
1819,
56162,
286,
990,
2256,
486,
32913,
29940,
929,
79304,
286,
5168,
259,
1006,
310,
1179,
1819,
3142,
25,
320,
2178,
10287,
1819,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_create() {
// Covariance not symmetric
bad_create_case(vec![0., 0.], vec![1., 1., 0., 1.]);
// Covariance not positive-definite
bad_create_case(vec![0., 0.], vec![1., 2., 2., 1.]);
// NaN in mean
bad_create_case(vec![0., f64::NAN], vec![1., 0.,... | rust_cleaned_test_functions.jsonl/106552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
8657,
368,
341,
286,
442,
62636,
36905,
537,
54343,
198,
286,
3873,
8657,
19096,
25592,
20703,
15,
2572,
220,
15,
13,
1125,
7486,
20703,
16,
2572,
220,
16,
2572,
220,
15,
2572,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_projective_negation_and_subtraction() {
let a = G1Projective::generator().double();
assert_eq!(a + (-a), G1Projective::identity());
assert_eq!(a + (-a), a - a);
} | rust_cleaned_test_functions.jsonl/10318 | {
"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,
16352,
533,
28209,
367,
8378,
5228,
26425,
368,
341,
286,
1077,
264,
284,
479,
16,
7849,
533,
486,
35851,
1005,
4331,
543,
286,
2060,
10714,
10297,
64,
488,
10293,
64,
701,
479,
16,
7849,
533,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_do_sponsorship() {
new_test_ext().execute_with(|| {
const ACCOUNT_ID_1: u64 = 1;
const ACCOUNT_ID_2: u64 = 2;
// Dispatch a signed extrinsic.
assert_eq!(Balances::free_balance(ACCOUNT_ID_1), 100_000_000_000_000);
assert_eq!(Balances::free_balance(ACCOUNT_ID_2), 200_000_000_000_000);
... | rust_cleaned_test_functions.jsonl/8489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26309,
643,
30241,
5270,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
4777,
62358,
3450,
62,
16,
25,
575,
21,
19,
284,
220,
16,
280,
197,
4777,
62358,
3450,
62,
17,
25,
575,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uri_to_origin_form() {
let cases = vec![
("/", "/"),
("/foo?bar", "/foo?bar"),
("/foo?bar#nope", "/foo?bar"),
("http://hyper.rs", "/"),
("http://hyper.rs/", "/"),
("http://hyper.rs/path", "/path"),
("http://hyper.rs?query", "/?query"),
... | rust_cleaned_test_functions.jsonl/52044 | {
"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,
15572,
2346,
34043,
7915,
368,
341,
262,
1077,
5048,
284,
7486,
90515,
286,
88889,
497,
3521,
4461,
286,
88889,
7975,
30,
2257,
497,
3521,
7975,
30,
2257,
4461,
286,
88889,
7975,
30,
2257,
2,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_wei_from_u64() {
let x: u64 = rand::random();
assert_eq!(Wei::new_u64(x).raw().as_u64(), x);
} | rust_cleaned_test_functions.jsonl/13446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
27105,
5673,
7300,
21,
19,
368,
341,
286,
1077,
856,
25,
575,
21,
19,
284,
10382,
486,
11463,
543,
286,
2060,
10714,
10297,
86193,
486,
931,
7300,
21,
19,
2075,
568,
1041,
1005,
300,
7300,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_key_register_update1() {
let mut key_register = KeyRegister { a: 0, b: 0 };
key_register.update(1);
let a: u64 = 0b11 << 62;
let b: u64 = 1 << 63;
assert_eq!(a, key_register.a);
assert_eq!(b, key_register.b);
} | rust_cleaned_test_functions.jsonl/23066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
14000,
8882,
16,
368,
341,
286,
1077,
5206,
1376,
14000,
284,
5309,
8690,
314,
264,
25,
220,
15,
11,
293,
25,
220,
15,
2605,
286,
1376,
14000,
5317,
7,
16,
626,
286,
1077,
264,
25,
575... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_strb2() {
assert_eq!(
decode_16(0x5542),
Instruction::STRB_reg {
params: Reg3FullParams {
rt: Reg::R2,
rn: Reg::R0,
rm: Reg::R5,
index: true,
add: true,
wba... | rust_cleaned_test_functions.jsonl/64779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
2895,
65,
17,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
16,
21,
7,
15,
87,
20,
20,
19,
17,
1326,
286,
29051,
486,
6666,
33,
4920,
341,
310,
3628,
25,
3184,
18,
9432,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mut_self() {
syn::parse_str::<Type>("fn(mut self)").unwrap();
syn::parse_str::<Type>("fn(mut self,)").unwrap();
syn::parse_str::<Type>("fn(mut self: ())").unwrap();
syn::parse_str::<Type>("fn(mut self: ...)").unwrap_err();
syn::parse_str::<Type>("fn(mut self: mut self)").unwr... | rust_cleaned_test_functions.jsonl/45550 | {
"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,
29523,
25637,
368,
341,
262,
6782,
486,
6400,
2895,
27638,
929,
13211,
8822,
70305,
656,
63554,
15454,
543,
262,
6782,
486,
6400,
2895,
27638,
929,
13211,
8822,
70305,
656,
46021,
1827,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_value() {
with_key!(key, "DeleteValue" => {
let name = "WinregRsTestVal";
key.set_value(name, &"Qwerty123").unwrap();
assert!(key.delete_value(name).is_ok());
});
} | rust_cleaned_test_functions.jsonl/128094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
3142,
368,
341,
262,
448,
3097,
10297,
792,
11,
330,
6435,
1130,
1,
589,
341,
286,
1077,
829,
284,
330,
16970,
1580,
42327,
2271,
2208,
876,
286,
1376,
980,
3142,
3153,
11,
609,
1,
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... | 1 |
#[test]
fn test_part1() {
assert_eq!(part1(&as_input(INPUT)), vec![32, 8317, 146373, 2764, 54718, 37305]);
} | rust_cleaned_test_functions.jsonl/56454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
16,
368,
341,
286,
2060,
10714,
10297,
4480,
16,
2099,
300,
5898,
57911,
5731,
7486,
20703,
18,
17,
11,
220,
23,
18,
16,
22,
11,
220,
16,
19,
21,
18,
22,
18,
11,
220,
17,
22,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_min() {
let uid = Uid::min();
assert!(uid.position == big(0b1_00000000000000000000));
assert!(uid.site_id == 0);
assert!(uid.counter == 0);
} | rust_cleaned_test_functions.jsonl/58311 | {
"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,
7260,
368,
341,
286,
1077,
14617,
284,
547,
307,
486,
1065,
543,
286,
2060,
10297,
2423,
6187,
621,
2409,
7,
15,
65,
16,
62,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cobalt_metrics() {
let (send, mut recv) = fake_cobalt_sender();
const TEST_DURATION: i64 = 1;
report_stream_metrics(send, &avdtp::MediaCodecType::AUDIO_AAC, TEST_DURATION);
let event = recv.try_next().expect("no stream error").expect("event present");
a... | rust_cleaned_test_functions.jsonl/10324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
674,
3145,
37686,
368,
341,
286,
1077,
320,
6681,
11,
5206,
27006,
8,
284,
12418,
666,
674,
3145,
54356,
543,
286,
733,
13602,
53413,
25,
600,
21,
19,
284,
220,
16,
401,
286,
1895,
12673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_beacon_received_midway() {
let mut counter = LostBssCounter::start(TEST_BEACON_PERIOD, TEST_TIMEOUT_BCN_COUNT);
counter.add_beacon_interval(TEST_TIMEOUT_BCN_COUNT - 1);
assert!(!counter.should_deauthenticate());
counter.reset();
// Verify that c... | rust_cleaned_test_functions.jsonl/51461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
12508,
443,
40783,
43733,
3117,
368,
341,
286,
1077,
5206,
5546,
284,
27252,
33,
778,
14099,
486,
2468,
50320,
27168,
1706,
711,
43166,
11,
13602,
23412,
1668,
28668,
14672,
317,
286,
5546,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push() {
let val1 = PublicKey::ed25519_from(KEY1);
let val2 = PublicKey::ed25519_from(KEY2);
let val3 = PublicKey::ed25519_from(KEY3);
let mut queue: Queue = Default::default();
assert_eq!(Ok(()), queue.push(val1, U512::from(5), BlockTime::new(100)));
... | rust_cleaned_test_functions.jsonl/63415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
368,
341,
286,
1077,
1044,
16,
284,
70280,
486,
291,
17,
20,
20,
16,
24,
5673,
37076,
16,
317,
286,
1077,
1044,
17,
284,
70280,
486,
291,
17,
20,
20,
16,
24,
5673,
37076,
17,
317,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_ethernet_frame() {
use crate::testdata::arp_request::*;
let (body, src_mac, dst_mac, ethertype) =
parse_ethernet_frame(ETHERNET_FRAME.bytes).unwrap();
assert_eq!(body, ÐERNET_FRAME.bytes[14..]);
assert_eq!(src_mac, ETHERNET_FRAME.metadata.src_... | rust_cleaned_test_functions.jsonl/13583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
57757,
13845,
8929,
368,
341,
286,
990,
17717,
486,
92425,
486,
7876,
7893,
56162,
286,
1077,
320,
2599,
11,
2286,
22802,
11,
10648,
22802,
11,
8372,
45069,
8,
4035,
310,
4715,
57757,
13845... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_active_discovery_scan_args_empty() {
let device_info = device_info_with_channel(vec![1, 36, 165]);
let mut sched: ScanScheduler<i32> = ScanScheduler::new(Arc::new(device_info));
let scan_cmd = DiscoveryScan::new(
10,
fidl_sme::ScanRequest::Active(f... | rust_cleaned_test_functions.jsonl/8140 | {
"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,
12930,
9932,
7449,
28857,
8384,
15124,
368,
341,
286,
1077,
3671,
3109,
284,
3671,
3109,
6615,
14571,
25592,
20703,
16,
11,
220,
18,
21,
11,
220,
16,
21,
20,
2558,
286,
1077,
5206,
5575,
25,
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_leader_scheduler1_basic() {
let pubkey = paychains_sdk::pubkey::new_rand();
let genesis_config =
create_genesis_config_with_leader(42, &pubkey, bootstrap_validator_stake_lamports())
.genesis_config;
let bank = Bank::new_for_tests(&genesis_confi... | rust_cleaned_test_functions.jsonl/61004 | {
"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,
79991,
53646,
16,
34729,
368,
341,
286,
1077,
95116,
284,
2291,
58358,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
59366,
5332,
4035,
310,
1855,
16322,
13774,
5332,
6615,
79991,
7,
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_rewrite_identity_if_no_rules_match() {
let rules = vec![
rule!("fuchsia.com" => "fuchsia.com", "/a" => "/aa"),
rule!("fuchsia.com" => "fuchsia.com", "/b" => "/bb"),
];
let dynamic_config = make_rule_config(rules);
let manager = RewriteMana... | rust_cleaned_test_functions.jsonl/46497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74052,
46244,
11119,
6536,
21407,
10708,
368,
341,
286,
1077,
5601,
284,
7486,
90515,
310,
5912,
17223,
69,
73391,
905,
1,
589,
330,
69,
73391,
905,
497,
3521,
64,
1,
589,
3521,
5305,
4461,
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_module_level_from_def_did_you_mean() {
assert::fail(
"def _func(): return func",
"Variable `func` not found, did you mean `_func`?",
);
} | rust_cleaned_test_functions.jsonl/92444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
8274,
5673,
7844,
814,
307,
70456,
16933,
368,
341,
262,
2060,
486,
18403,
1006,
286,
330,
750,
716,
2830,
4555,
470,
2915,
756,
286,
330,
7827,
1565,
2830,
63,
537,
1730,
11,
1521,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sendch_full() {
let mut config = EventLoopConfig::new();
config.notify_capacity(2);
let mut event_loop = EventLoop::configured(config).unwrap();
let ch = SendCh::new(event_loop.channel(), "test");
let _ch = ch.clone();
let h = thread::spawn(move ||... | rust_cleaned_test_functions.jsonl/73865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
331,
16372,
368,
341,
286,
1077,
5206,
2193,
284,
3665,
14620,
2648,
486,
931,
543,
286,
2193,
24681,
35603,
7,
17,
317,
286,
1077,
5206,
1538,
17198,
284,
3665,
14620,
486,
81443,
8754,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zigzag_edge_cases() {
let (zigzag, zigzagp) = (VarintEncoding::zigzag_encode, VarintEncoding::zigzag_decode);
assert_eq!(zigzag(i64::max_value()), u64::max_value() - 1);
assert_eq!(zigzag(i64::min_value()), u64::max_value());
assert_eq!(zigzagp(u64::max_va... | rust_cleaned_test_functions.jsonl/519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
343,
92674,
17932,
41427,
368,
972,
286,
1077,
320,
35363,
92674,
11,
85812,
92674,
79,
8,
284,
320,
3962,
396,
14690,
486,
35363,
92674,
11224,
11,
8735,
396,
14690,
486,
35363,
92674,
1522... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_applicable_if_variable_unused() {
cov_mark::check!(test_not_applicable_if_variable_unused);
check_assist_not_applicable(
inline_local_variable,
r"
fn foo() {
let $0a = 0;
}
",
)
} | rust_cleaned_test_functions.jsonl/3246 | {
"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,
7913,
8191,
46114,
11119,
14635,
66944,
368,
341,
286,
21836,
18924,
486,
2028,
10297,
1944,
7913,
8191,
46114,
11119,
14635,
66944,
317,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
7381,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_if_let_with_match_available_range_right() {
check_assist_not_applicable(
replace_if_let_with_match,
r#"
impl VariantData {
pub fn foo(&self) {
if let VariantData::Struct(..) = *self {$0
self.foo();
}
}
}
"#,
)
} | rust_cleaned_test_functions.jsonl/32542 | {
"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,
11119,
62,
1149,
6615,
10708,
26962,
9698,
10539,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
8290,
11119,
62,
1149,
6615,
10708,
345,
310,
435,
2,
698,
6383,
39292,
1043,
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_fuchsia_replacement() {
verify_fuchsia_replacement("test.example.com", "test.example.com");
verify_fuchsia_replacement("test.fuchsia.com", "test.fuchsia.com");
verify_fuchsia_replacement("a.b-c.d.fuchsia.com", "b-c");
verify_fuchsia_replacement("a.b-c.d.example.co... | rust_cleaned_test_functions.jsonl/57429 | {
"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,
761,
73391,
1288,
16101,
368,
341,
286,
10146,
761,
73391,
1288,
16101,
445,
1944,
7724,
905,
497,
330,
1944,
7724,
905,
797,
286,
10146,
761,
73391,
1288,
16101,
445,
1944,
833,
73391,
905,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_missing_source() {
use crate::matching::plan::Source;
use crate::unification::Element;
use differential_dataflow::input::InputSession;
let x = MetaVar::new("x");
let source = Source::new("foo", 2);
let pattern = [Element::Reference(x.clone()), Element::Reference(... | rust_cleaned_test_functions.jsonl/31139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
40447,
10347,
368,
341,
262,
990,
17717,
486,
89043,
486,
10393,
486,
3608,
280,
262,
990,
17717,
486,
359,
2404,
486,
1691,
280,
262,
990,
40164,
1769,
4965,
486,
1355,
486,
2505,
5283,
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_duplicate_fields() -> Result<()> {
let message = "
message test_schema {
REQUIRED BOOLEAN boolean;
REQUIRED INT32 int8 (INT_8);
}
";
let expected = &[
Field::new("boolean", DataType::Boolean, false),
Field::n... | rust_cleaned_test_functions.jsonl/34422 | {
"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,
70434,
12132,
368,
1464,
5714,
71698,
341,
286,
1077,
1943,
284,
6228,
286,
1943,
1273,
25371,
341,
310,
66577,
59393,
2710,
280,
310,
66577,
9221,
18,
17,
526,
23,
320,
3221,
62,
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... | 3 |
#[test]
fn test_extract_key_error_write_conflict() {
let start_ts = 110.into();
let conflict_start_ts = 108.into();
let conflict_commit_ts = 109.into();
let key = b"key".to_vec();
let primary = b"primary".to_vec();
let case = Error::from(TxnError::from(MvccError::... | rust_cleaned_test_functions.jsonl/82355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 568
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
3097,
4096,
9165,
16059,
21242,
368,
341,
286,
1077,
1191,
25023,
284,
220,
16,
16,
15,
39860,
543,
286,
1077,
12055,
4906,
25023,
284,
220,
16,
15,
23,
39860,
543,
286,
1077,
12055,
3634... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prev() {
assert_eq!(Page::Daily.prev(), Page::Config);
assert_eq!(Page::History.prev(), Page::Daily);
assert_eq!(Page::Config.prev(), Page::History);
} | rust_cleaned_test_functions.jsonl/101091 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25566,
368,
341,
286,
2060,
10714,
10297,
2665,
486,
43553,
28991,
1507,
5755,
486,
2648,
317,
286,
2060,
10714,
10297,
2665,
486,
13424,
28991,
1507,
5755,
486,
43553,
317,
286,
2060,
10714,
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 |
#[test]
fn test_move_iter_reverse() {
let data = vec!(5i, 9, 3);
let iterout = vec!(3i, 5, 9);
let pq = BinaryHeap::from_vec(data);
let v: Vec<int> = pq.into_iter().rev().collect();
assert_eq!(v, iterout);
} | rust_cleaned_test_functions.jsonl/1579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
11723,
43277,
368,
341,
286,
1077,
821,
284,
7486,
10297,
20,
72,
11,
220,
24,
11,
220,
18,
317,
286,
1077,
5367,
411,
284,
7486,
10297,
18,
72,
11,
220,
20,
11,
220,
24,
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_add_one_root_block_device() {
let dummy_file = TempFile::new().unwrap();
let dummy_path = dummy_file.as_path().to_str().unwrap().to_string();
let dummy_block_device = BlockDeviceConfig {
path_on_host: dummy_path,
is_root_device: true,
... | rust_cleaned_test_functions.jsonl/113108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
11667,
12993,
7113,
9204,
368,
341,
286,
1077,
17292,
2458,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
17292,
2638,
284,
17292,
2458,
5357,
2638,
1005,
983,
2895,
1005,
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_from_iter() {
type A<'a> = ArrayVec<Dropped<'a, 16>, 16>;
let t = Track::<16>::new();
let a = A::from_iter(t.take(5));
assert_eq!(t.n_allocated(), 5);
assert!(t.dropped_range(0..0)); // empty range
drop(a);
assert_eq!(t.n_allocated(), 0);
... | rust_cleaned_test_functions.jsonl/40452 | {
"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,
5673,
11723,
368,
341,
286,
943,
362,
18291,
64,
29,
284,
2910,
10050,
29061,
41716,
18291,
64,
11,
220,
16,
21,
8066,
220,
16,
21,
10133,
286,
1077,
259,
284,
19785,
27638,
16,
21,
6831,
931,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_command_line_change_dir() {
let tmp = tempfile::tempdir().unwrap();
fs::create_dir(tmp.path().join("assets")).unwrap();
for file_name in &["four.png", "five.png"] {
let path = tmp.path().join("assets").join(file_name);
File::create(path).unwrap();... | rust_cleaned_test_functions.jsonl/95928 | {
"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,
10811,
6528,
15947,
4334,
368,
341,
286,
1077,
4174,
284,
54819,
486,
3888,
3741,
1005,
15454,
1428,
286,
8619,
486,
3182,
4334,
10368,
3875,
1005,
5987,
445,
5160,
15197,
15454,
543,
286,
369,
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... | 2 |
#[test]
fn test_path_from_root() {
let mut inserter = TreeInserter::default();
let block_store = inserter.block_store();
let genesis = block_store.get_block(block_store.root().id()).unwrap();
let b1 = inserter.insert_block_with_qc(certificate_for_genesis(), &genesis, 1);
let b2 = inserter.in... | rust_cleaned_test_functions.jsonl/50986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
5673,
12993,
368,
341,
262,
1077,
5206,
47325,
465,
284,
8942,
641,
90727,
486,
2258,
543,
262,
1077,
2504,
14809,
284,
47325,
465,
15697,
14809,
543,
262,
1077,
59366,
284,
2504,
14809,
670... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optflag() {
let long_args = vec!("--test".to_string());
let opts = vec!(optflag("t", "test", "testing"));
let rs = getopts(long_args.as_slice(), opts.as_slice());
match rs {
Ok(ref m) => {
assert!(m.opt_present("test"));
assert!(m... | rust_cleaned_test_functions.jsonl/11183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
9903,
368,
341,
286,
1077,
1293,
8384,
284,
7486,
17223,
313,
1944,
3263,
983,
3904,
1423,
286,
1077,
12185,
284,
7486,
10297,
2912,
9903,
445,
83,
497,
330,
1944,
497,
330,
8840,
4010,
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... | 3 |
#[test]
fn test_transaction_submission() {
let (mp_sender, mut mp_events) = channel(1);
let tmp_dir = TempPath::new();
let db = LibraDB::new(&tmp_dir);
let port = utils::get_available_port();
let address = format!("0.0.0.0:{}", port);
let mut runtime = bootstrap(address.parse().unwrap(),... | rust_cleaned_test_functions.jsonl/86601 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28884,
75866,
368,
341,
262,
1077,
320,
1307,
54356,
11,
5206,
10490,
19691,
8,
284,
5496,
7,
16,
317,
262,
1077,
4174,
4334,
284,
19944,
1820,
486,
931,
543,
262,
1077,
2927,
284,
5688,
956,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_print_mint_nft_for_protocol() {
let mut rng = XorShiftRng::from_seed([2, 2, 3, 4]);
let key = gen_pk_and_msg().0;
let mint_nft = MintNFT::new_signed(
gen_account_id(&mut rng),
Address::from(rng.gen::<[u8; 20]>()),
H256::random(),
Address::from(rng.gen:... | rust_cleaned_test_functions.jsonl/118958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
717,
396,
1089,
723,
5478,
34880,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
17,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
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... | 2 |
#[test]
fn test_create_datetime_frac_from_str() {
assert_eq!(Value::DateTime(DateTime::new(Date::new_str("2012", "01", "03"), Some(Time::new_str(
"03", "30", "30", Some("3030"), None
)))), Value::datetime_frac_from_str("2012", "01", "03", "03", "30", "30", "3030").unwrap());
} | rust_cleaned_test_functions.jsonl/86215 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
28943,
70358,
5673,
2895,
368,
341,
262,
2060,
10714,
10297,
1130,
486,
7689,
32083,
486,
931,
19987,
486,
931,
2895,
445,
17,
15,
16,
17,
497,
330,
15,
16,
497,
330,
15,
18,
3975,
4329,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.