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_restore() {
let temp_dir = TempDir::new().unwrap();
let temp_dir_str = format!("{}/", temp_dir.path().display());
let key_name_random = "test_restore_random".to_string();
let rand_opts = RandomOptions::new(key_name_random);
let name_counter = 0;
l... | rust_cleaned_test_functions.jsonl/73420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62677,
368,
341,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
2730,
4334,
2895,
284,
3561,
88928,
4472,
497,
2730,
4334,
3875,
1005,
5493,
1423,
286,
1077,
1376,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_admin_controlled_admin_can_peform_actions_when_paused() {
let (_master_account, contract) = init(CUSTODIAN_ADDRESS);
// 1st deposit call when unpaused - should succeed
let promises = call_deposit_with_proof(&contract, CONTRACT_ACC, PROOF_DATA_NEAR);
for p in promises.iter() {
... | rust_cleaned_test_functions.jsonl/112877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 974
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12207,
13436,
832,
12207,
27421,
36367,
627,
25368,
47636,
55475,
2591,
368,
341,
262,
1077,
5453,
13629,
13500,
11,
5116,
8,
284,
2930,
3025,
8553,
2069,
22002,
20135,
626,
262,
442,
220,
16,
267... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_binary_fixed_sized_offsets() {
let array =
FixedSizeBinaryArray::from(vec![vec![0, 0], vec![0, 1], vec![0, 2]]).data();
let array = array.slice(1, 2);
let arrays = vec![&array];
let mut mutable = MutableArrayData::new(arrays, false, 0);
... | rust_cleaned_test_functions.jsonl/102350 | {
"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,
31761,
37839,
643,
1506,
56924,
368,
341,
286,
1077,
1334,
4035,
310,
20149,
1695,
21338,
1857,
486,
1499,
25592,
20703,
4083,
20703,
15,
11,
220,
15,
1125,
7486,
20703,
15,
11,
220,
16,
1125,
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_extract_bytes() {
assert_eq!(extract_bytes("ábc", &[0..1]), "�".to_string());
assert_eq!(extract_bytes("ábc", &[0..2]), "á".to_string());
assert_eq!(extract_bytes("ábc", &[0..3]), "áb".to_string());
assert_eq!(extract_bytes("ábc", &[0..4]), "ábc".to_string());
... | rust_cleaned_test_functions.jsonl/34701 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
12524,
368,
341,
286,
2060,
10714,
10297,
23493,
12524,
445,
1953,
8904,
497,
44590,
15,
496,
16,
9719,
330,
5691,
3263,
983,
3904,
1423,
286,
2060,
10714,
10297,
23493,
12524,
445,
1953,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_struct() {
let the_struct = TestStruct {
vec: vec![233, 123, 0, 12],
integer: 4_242_424_242,
float: 1.2345,
};
let serialized = serialize(&the_struct).unwrap();
let deserialized: TestStruct = deserialize(&serialized).u... | rust_cleaned_test_functions.jsonl/75004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15126,
368,
341,
286,
1077,
279,
15126,
284,
3393,
9422,
341,
310,
7486,
25,
7486,
20703,
17,
18,
18,
11,
220,
16,
17,
18,
11,
220,
15,
11,
220,
16,
17,
1259,
310,
7546,
25,
220,
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_PoK_sig_with_incorrect_reveal_indices() {
let count_msgs = 5;
let params = Params::new("test".as_bytes());
let (vk, sk) = keygen(count_msgs, ¶ms);
let msgs = FieldElementVector::random(count_msgs);
let sig = Signature::new(msgs.as_slice(), &sk, ¶ms... | rust_cleaned_test_functions.jsonl/62470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1088,
78,
42,
29252,
6615,
1243,
19928,
1288,
40611,
18333,
368,
341,
286,
1077,
1760,
20777,
284,
220,
20,
280,
286,
1077,
3628,
284,
34352,
486,
931,
445,
1944,
3263,
300,
12524,
1423,
286,
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_serde_roundtrip() {
::init().unwrap();
macro_rules! test_roundrip(
($value:expr) => {
let value_ser = ron::ser::to_string(&$value).unwrap();
let value_de: GenericFormattedValue = ron::de::from_str(value_ser.as_str()).unwrap();
... | rust_cleaned_test_functions.jsonl/21903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 495
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
29896,
32981,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
18072,
21407,
0,
1273,
29896,
4561,
1006,
310,
1711,
957,
96011,
8,
589,
341,
394,
1077,
897,
75861,
284,
435,
263,
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_request_cookies() {
let req = TestRequest::default()
.append_header((header::COOKIE, "cookie1=value1"))
.append_header((header::COOKIE, "cookie2=value2"))
.to_http_request();
{
let cookies = req.cookies().unwrap();
asser... | rust_cleaned_test_functions.jsonl/39761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
94158,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
2258,
741,
310,
659,
5090,
8757,
1188,
2708,
486,
44796,
11,
330,
16236,
16,
46538,
16,
5455,
310,
659,
5090,
8757,
1188,
2708,
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_0297_example_2() {
let root = tree![];
let codec = Codec::new();
let data = codec.serialize(root.clone());
let result = codec.deserialize(data);
assert_eq!(root, result);
} | rust_cleaned_test_functions.jsonl/114939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
17,
24,
22,
39304,
62,
17,
368,
341,
286,
1077,
3704,
284,
4916,
0,
15078,
286,
1077,
34647,
284,
67077,
486,
931,
543,
286,
1077,
821,
284,
34647,
33969,
9206,
15997,
1423,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bool() {
let mut rng = crate::new();
const N: usize = 10000;
let mut results = [0i32; 2];
for _ in 0..N {
results[rng.coin_flip() as usize] += 1;
}
assert!((results[0] - results[1]).abs() < 1000, "Unbalanced coin flips!! heads = {}, tails = {} out of {} trails ", results[1], results[0]... | rust_cleaned_test_functions.jsonl/85584 | {
"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,
22159,
368,
341,
10217,
5206,
28422,
284,
17717,
486,
931,
543,
4777,
451,
25,
22301,
284,
220,
16,
15,
15,
15,
15,
401,
10217,
5206,
3059,
284,
508,
15,
72,
18,
17,
26,
220,
17,
935,
2023,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_to_spanner_array() {
let array = vec![0, 1, 2, 3, 4];
assert_eq!(
array.to_spanner().ok(),
Some(Value::Array(
Type::Int64,
vec![
Value::Int64(0),
Value::Int64(1),
V... | rust_cleaned_test_functions.jsonl/105723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
37382,
1194,
3858,
368,
341,
286,
1077,
1334,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
2060,
10714,
33673,
310,
1334,
2389,
37382,
1194,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fs_display() {
assert_eq!(
format!("{}", Fs::from_repr(FsRepr([0x5528efb9998a01a3, 0x5bd2add5cb357089, 0xc061fa6adb491f98, 0x70db9d143db03d9])).unwrap()),
"Fs(0x070db9d143db03d9c061fa6adb491f985bd2add5cb3570895528efb9998a01a3)".to_string()
);
assert_eq!(
forma... | rust_cleaned_test_functions.jsonl/95522 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34470,
14825,
368,
341,
262,
2060,
10714,
33673,
286,
3561,
79878,
84619,
486,
1499,
68535,
7832,
82,
693,
649,
2561,
15,
87,
20,
20,
17,
23,
823,
65,
24,
24,
24,
23,
64,
15,
16,
64,
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... | 1 |
#[test]
fn test_select_utxos_for_optimization_behavior_around_fee() {
// place.
{
let mut utxos = generate_utxos(6);
utxos[0].value = Mob::MINIMUM_FEE / 10;
utxos[1].value = Mob::MINIMUM_FEE / 10;
utxos[2].value = Mob::MINIMUM_FEE / 10;
... | rust_cleaned_test_functions.jsonl/527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
60363,
87,
436,
5478,
15032,
65964,
74540,
62,
19454,
34305,
368,
341,
1789,
286,
442,
1992,
624,
286,
341,
310,
1077,
5206,
8621,
87,
436,
284,
6923,
60363,
87,
436,
7,
21,
626,
310,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_index_expr() {
let tests = vec![
("{\"foo\": 5}[\"foo\"]", Some(Object::Int(5))),
("{\"foo\": 5}[\"bar\"]", Some(Object::Null)),
("let key = \"foo\"; {\"foo\": 5}[key]", Some(Object::Int(5))),
("{}[\"foo\"]", Some(Object::Null)),
... | rust_cleaned_test_functions.jsonl/12294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
3560,
21915,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
64238,
7975,
11693,
220,
20,
43389,
2105,
7975,
75104,
497,
4329,
12526,
486,
1072,
7,
20,
41749,
310,
3489,
64238,
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... | 2 |
#[test]
fn test_xdh_parsing() {
for test in wycheproof::xdh::TestName::all() {
let _kat = wycheproof::xdh::TestSet::load(test).unwrap();
}
} | rust_cleaned_test_functions.jsonl/5845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3212,
30621,
620,
28598,
368,
341,
262,
369,
1273,
304,
289,
5641,
747,
75636,
486,
9703,
71,
486,
2271,
675,
486,
541,
368,
341,
286,
1077,
716,
33755,
284,
289,
5641,
747,
75636,
486,
9703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_var_in_block1() {
test(
"function f(x) { if (true) {var y = x; y; y;} }",
"function f(x) { if (true) {var y; x; x;} }",
);
} | rust_cleaned_test_functions.jsonl/27708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
1243,
7113,
16,
368,
341,
262,
1273,
1006,
286,
330,
1688,
282,
2075,
8,
314,
421,
320,
1866,
8,
314,
947,
379,
284,
856,
26,
379,
26,
379,
30031,
335,
756,
286,
330,
1688,
282,
2075,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_propagation_failure() {
let writer = WriterId::new(1u8);
let model = &mut Model::new();
let a = model.new_bvar("a");
let b = model.new_bvar("b");
let mut sat = SatSolver::new(writer);
let a_or_b = vec![Lit::geq(a, 1), Lit::geq(b, 1)];
sat... | rust_cleaned_test_functions.jsonl/55206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21663,
27137,
43618,
368,
341,
286,
1077,
6916,
284,
29404,
764,
486,
931,
7,
16,
84,
23,
317,
286,
1077,
1614,
284,
609,
6984,
4903,
486,
931,
543,
286,
1077,
264,
284,
1614,
4618,
880,
947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_publish_dhcp_logs_success() {
let dhcp: Dhcp = Dhcp::default();
let kafka: Kafka = Kafka::default();
assert_eq!(publish_dhcp_logs(false, SERVICE_DISCOVERED,
dhcp, kafka), STREAM_SUCCESS);
} | rust_cleaned_test_functions.jsonl/13562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58779,
814,
62169,
42899,
18632,
368,
341,
286,
1077,
85787,
25,
43227,
4672,
284,
43227,
4672,
486,
2258,
543,
286,
1077,
67852,
25,
57025,
284,
57025,
486,
2258,
543,
286,
2060,
10714,
10297,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_create_routed_vlan_properties() {
let mut test_config = create_test_config_no_paths();
test_config.device_config = Some(build_full_config());
let rvi = RoutedVlan {
vlan_id: 2,
ipv4: Some(IpAddressConfig {
addresses: vec![IpAddress ... | rust_cleaned_test_functions.jsonl/83826 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 679
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1710,
18533,
71296,
25158,
368,
341,
286,
1077,
5206,
1273,
5332,
284,
1855,
4452,
5332,
6536,
24152,
543,
286,
1273,
5332,
18355,
5332,
284,
4329,
43333,
16372,
5332,
1423,
286,
1077,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fixed_header() {
let mut v = BytesMut::with_capacity(270);
let p = Packet::PingRequest;
assert_eq!(p.encoded_size(MAX_PACKET_SIZE), 0);
p.encode(&mut v, 0).unwrap();
assert_eq!(&v[..2], b"\xc0\x00".as_ref());
v.clear();
let p = Pa... | rust_cleaned_test_functions.jsonl/93708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
37839,
8757,
368,
341,
286,
1077,
5206,
348,
284,
30024,
51440,
486,
4197,
35603,
7,
17,
22,
15,
317,
286,
1077,
281,
284,
28889,
486,
69883,
1900,
401,
286,
2060,
10714,
10297,
79,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cancel() {
set_logger_for_test();
let mut executor = fasync::Executor::new_with_fake_time().unwrap();
let (mut t, mut rcv) = TestContext::new();
// timer 1 and 2 are scheduled.
// timer 1 is going to be cancelled even before we allow the loop to
/... | rust_cleaned_test_functions.jsonl/52879 | {
"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,
28895,
368,
341,
286,
738,
27413,
5478,
4452,
543,
286,
1077,
5206,
31558,
284,
282,
7692,
486,
25255,
486,
931,
6615,
56881,
3009,
1005,
15454,
543,
286,
1077,
320,
6984,
259,
11,
5206,
10192,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_large_program() {
let mut prog = vec![0; ebpf::PROG_MAX_INSNS * ebpf::INSN_SIZE];
let mut add_insn = vec![0; ebpf::INSN_SIZE];
write_insn(&mut add_insn, 0, "mov64 r0, 0");
for insn in (0..(ebpf::PROG_MAX_INSNS - 1) * ebpf::INSN_SIZE).step_by(ebpf::INSN_SIZE) {
prog[insn..... | rust_cleaned_test_functions.jsonl/15548 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 653
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
25096,
368,
341,
262,
1077,
5206,
29271,
284,
7486,
20703,
15,
26,
24463,
15897,
486,
9117,
38,
6806,
31650,
2448,
353,
24463,
15897,
486,
9557,
45,
4098,
935,
262,
1077,
5206,
912,
79799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ambiguous_parameter_field_declaration() {
use parser::translation_unit;
let env = &mut Env::new();
assert!(translation_unit(
r"
typedef int a;
int foo(int a* b) {}",
env
)
.is_err());
} | rust_cleaned_test_functions.jsonl/107571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
90213,
24899,
5013,
77926,
368,
341,
262,
990,
6729,
486,
3053,
14832,
280,
262,
1077,
6105,
284,
609,
6984,
37039,
486,
931,
543,
1066,
262,
2060,
10297,
3053,
14832,
1006,
286,
435,
698,
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_trap_return() -> Result<()> {
let store = get_store(false);
let wat = r#"
(module
(func $hello (import "" "hello"))
(func (export "run") (call $hello))
)
"#;
let module = Module::new(&store, wat)?;
let hello_type = FunctionType::new(vec![], ve... | rust_cleaned_test_functions.jsonl/38854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88536,
12511,
368,
1464,
5714,
71698,
341,
262,
1077,
3553,
284,
633,
14809,
3576,
317,
262,
1077,
29025,
284,
435,
2,
698,
286,
320,
4352,
198,
286,
320,
2830,
400,
14990,
320,
474,
1591,
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... | 3 |
#[test]
fn test_trima1() {
let mut candles = RandomCandles::default();
let mut ma = TestingMethod::new(1, &candles.first().close).unwrap();
candles.take(100).for_each(|x| {
assert_eq_float(x.close, ma.next(&x.close));
});
} | rust_cleaned_test_functions.jsonl/87170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
7523,
16,
368,
341,
197,
10217,
5206,
51205,
284,
10612,
34,
20125,
486,
2258,
1428,
197,
10217,
5206,
7491,
284,
26768,
3523,
486,
931,
7,
16,
11,
609,
66,
20125,
7389,
1005,
5552,
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_key_neighbors() {
let mut t = RbTree::<Vec<u8>, Vec<u8>>::new();
t.insert(vec![1], vec![10]);
t.insert(vec![3], vec![30]);
assert_eq!(t.left_neighbor(&[0u8][..]), None);
assert_eq!(t.left_neighbor(&[1u8][..]), None);
assert_eq!(t.left_neighbor(&[2u8][..]), Some(&[1u8][..... | rust_cleaned_test_functions.jsonl/57902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
55925,
368,
341,
262,
1077,
5206,
259,
284,
431,
65,
6533,
27638,
10050,
34837,
23,
8066,
11312,
34837,
23,
77595,
931,
543,
262,
259,
7030,
25592,
20703,
16,
1125,
7486,
20703,
16,
15,
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_json_length() {
let cases = vec![
(None, None, None),
(None, Some(Datum::Null), None),
(Some(r#"{}"#), Some(Datum::Null), None),
(Some("null"), None, Some(1)),
(
Some(r#"{"a":{"a":1},"b":2}"#),
So... | rust_cleaned_test_functions.jsonl/5031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2943
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
5118,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
4064,
11,
2240,
11,
2240,
1326,
310,
320,
4064,
11,
4329,
5432,
26253,
486,
3280,
701,
2240,
1326,
310,
320,
8373,
2601,
55543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tile_from_lines() {
assert_eq!(
Tile::from_lines(vec![
"Tile 3079:".to_string(),
"#.#.#####.".to_string(),
".#..######".to_string(),
"..#.......".to_string(),
"######....".to_string(),
... | rust_cleaned_test_functions.jsonl/34529 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1007
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29844,
5673,
18323,
368,
341,
286,
2060,
10714,
33673,
310,
20744,
486,
1499,
18323,
25592,
90515,
394,
330,
15628,
220,
18,
15,
22,
24,
95740,
983,
3904,
3148,
394,
5869,
43326,
13,
67331,
36911,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_malloc() {
let r = parse_and_eval(
r#"
block 0 {
r0 = malloc(10);
exit(r0);
}"#,
).unwrap();
assert!(r == 1);
} | rust_cleaned_test_functions.jsonl/55936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38303,
368,
341,
286,
1077,
435,
284,
4715,
8378,
21296,
1006,
310,
435,
2,
698,
310,
2504,
220,
15,
341,
394,
435,
15,
284,
15731,
7,
16,
15,
317,
394,
4869,
2601,
15,
317,
310,
335,
57676,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let as_string = "attachment; filename*=UTF-8'en'%C2%A3%20and%20%E2%82%AC%20rates";
let a = HeaderValue::from_static(as_string);
let a: ContentDisposition = ContentDisposition::from_raw(&a).unwrap();
let display_rendered = format!("{}",a);
asser... | rust_cleaned_test_functions.jsonl/18668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
1077,
438,
3904,
284,
330,
21981,
26,
3899,
40008,
8561,
12,
23,
40801,
36165,
34,
17,
52585,
18,
4,
17,
15,
437,
4,
17,
15,
39798,
17,
4,
23,
17,
4,
1706,
4,
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... | 1 |
#[test]
fn test_window_post_two_partitions_smaller_2kib_base_8() -> Result<()> {
let sector_size = SECTOR_SIZE_2_KIB;
let sector_count = *WINDOW_POST_SECTOR_COUNT
.read()
.unwrap()
.get(§or_size)
.unwrap();
window_post::<SectorShape2KiB>(sector_size, 2 * sector_c... | rust_cleaned_test_functions.jsonl/6772 | {
"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,
12571,
6333,
23241,
99097,
15874,
13956,
62,
17,
74,
579,
7651,
62,
23,
368,
1464,
5714,
71698,
341,
262,
1077,
10486,
2368,
284,
5052,
26275,
4098,
62,
17,
10102,
3256,
280,
262,
1077,
10486,
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_merge_unsorted_index() {
let index = create_test_index(
Some(IndexSettings {
..Default::default()
}),
false,
);
let reader = index.reader().unwrap();
let searcher = reader.searcher();
assert_eq!(searcher... | rust_cleaned_test_functions.jsonl/66291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
4907,
28298,
3560,
368,
341,
286,
1077,
1922,
284,
1855,
4452,
3560,
1006,
310,
4329,
45030,
6086,
341,
394,
5241,
3675,
486,
2258,
741,
310,
11973,
310,
895,
345,
286,
3475,
286,
1077,
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... | 3 |
#[test]
fn test_force_checkout_of_independently_added_blob() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
rm!(repo: "foo");
bit_commit_all!(repo);
touch!(repo: "foo" < "default foo contents");
bit_checkout!(repo: --force "HEAD^")?;
assert_eq!(cat!(repo: "fo... | rust_cleaned_test_functions.jsonl/62942 | {
"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,
40739,
68186,
3575,
1243,
19510,
4402,
37653,
45908,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
18998,
10297,
23476,
25,
330,
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... | 2 |
#[test]
fn test_distance_to() {
let point = Point3d::new(3, 4, 12);
let expected = 13.0;
let result = ORIGIN_POINT.distance_to(&point);
assert!((result - expected).abs() < EPSILON);
} | rust_cleaned_test_functions.jsonl/37338 | {
"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,
19464,
2346,
368,
341,
286,
1077,
1459,
284,
5126,
18,
67,
486,
931,
7,
18,
11,
220,
19,
11,
220,
16,
17,
626,
286,
1077,
3601,
284,
220,
16,
18,
13,
15,
401,
286,
1077,
1102,
284,
2726,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_spoofed_stake_accounts() {
process_instruction_as_one_arg(
&instruction::initialize(
&spoofed_stake_state_pubkey(),
&Authorized::default(),
&Lockup::default(),
),
Err(InstructionError::InvalidAccountOwner... | rust_cleaned_test_functions.jsonl/31631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2072
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
5368,
1055,
291,
1261,
726,
55665,
368,
341,
286,
1882,
54923,
11898,
11667,
6057,
1006,
310,
609,
54974,
486,
21641,
1006,
394,
609,
82859,
1055,
291,
1261,
726,
4387,
34014,
792,
3148,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merkle_tree_insert() {
let mut tree = TestSMT::new(3);
assert_eq!(tree.capacity(), 8);
tree.insert(0, 1);
println!("{:?}", tree);
assert_eq!(tree.root_hash(), 697516875);
tree.insert(0, 2);
println!("{:?}", tree);
assert_eq!(tree... | rust_cleaned_test_functions.jsonl/88490 | {
"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,
717,
16754,
273,
11663,
17678,
368,
341,
286,
1077,
5206,
4916,
284,
3393,
50,
8505,
486,
931,
7,
18,
626,
286,
2060,
10714,
10297,
9344,
59168,
1507,
220,
23,
626,
286,
4916,
7030,
7,
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_add_tags() {
let (input, modification) = Modification::parse(argv!["+abc", "+def"]).unwrap();
assert_eq!(input.len(), 0);
assert_eq!(
modification,
Modification {
add_tags: set![tag!("abc"), tag!("def")],
..Default::... | rust_cleaned_test_functions.jsonl/28811 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
16333,
368,
341,
286,
1077,
320,
1355,
11,
17030,
8,
284,
73855,
486,
6400,
15329,
0,
80128,
13683,
497,
6630,
750,
45014,
15454,
543,
286,
2060,
10714,
10297,
1355,
19406,
1507,
220,
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_fp() {
let mut rng = test_rng();
let a: Fp = rng.gen();
let b: Fp = rng.gen();
field_test(a, b);
sqrt_field_test(a);
primefield_test::<Fp>();
} | rust_cleaned_test_functions.jsonl/92585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34160,
368,
341,
262,
1077,
5206,
28422,
284,
1273,
66849,
543,
262,
1077,
264,
25,
434,
79,
284,
28422,
22822,
543,
262,
1077,
293,
25,
434,
79,
284,
28422,
22822,
543,
262,
2070,
4452,
2877,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_invalid_uncle_hash_case1() {
let (shared, chain1, chain2) = prepare();
let dummy_context = dummy_context(&shared);
// body has 1 uncles
let block = chain1
.last()
.cloned()
.unwrap()
.as_advanced_builder()
.uncles_count(1u32.pack())
... | rust_cleaned_test_functions.jsonl/118898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
76576,
273,
8950,
19096,
16,
368,
341,
262,
1077,
320,
6100,
11,
8781,
16,
11,
8781,
17,
8,
284,
10549,
543,
262,
1077,
17292,
8467,
284,
17292,
8467,
2099,
6100,
626,
1066,
262,
442,
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_vote_process_instruction() {
solana_logger::setup();
let instructions = create_account(
&Pubkey::default(),
&Pubkey::default(),
&VoteInit::default(),
100,
);
assert_eq!(
process_instruction(&instructions[... | rust_cleaned_test_functions.jsonl/97474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
11305,
54923,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
11221,
284,
1855,
13500,
1006,
310,
609,
29162,
792,
486,
2258,
3148,
310,
609,
29162,
792,
486,
2258,
3148,
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_quality_item_fmt_q_0() {
// Custom value
let x = QualityItem{
item: EncodingExt("identity".to_owned()),
quality: Quality(0),
};
assert_eq!(x.to_string(), "identity; q=0");
} | rust_cleaned_test_functions.jsonl/65731 | {
"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,
55074,
5634,
38128,
8976,
62,
15,
368,
341,
286,
442,
8406,
897,
198,
286,
1077,
856,
284,
17927,
1234,
515,
310,
1509,
25,
29330,
6756,
445,
16912,
3263,
983,
51973,
14702,
310,
4271,
25,
17927... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bounds_on_fields_only() {
#![allow(dead_code)]
use std::marker::PhantomData;
struct NoDebug;
struct TemplatedType<T> {
_phantom: PhantomData<T>,
};
test_derive! {
custom_debug_derive {
struct WantDebug<T> {
foo: TemplatedType... | rust_cleaned_test_functions.jsonl/61114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36878,
4470,
12132,
18410,
368,
341,
262,
671,
20703,
7183,
83207,
4136,
27771,
262,
990,
1460,
486,
27742,
486,
3357,
30002,
1043,
401,
262,
2036,
2308,
7939,
280,
262,
2036,
78810,
657,
929,
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... | 2 |
#[test]
fn test_add_or_update_edges_update_error() {
// test that when an existing edge is added and EdgeDedupeStrategy is Error
let graph = get_basic_graph(None);
let new_edges = vec![Edge::with_weight("n1", "n3", &4.4)];
let graph = graph.add_or_update_edges(new_edges);
... | rust_cleaned_test_functions.jsonl/100461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
8734,
8882,
28026,
8882,
4096,
368,
341,
286,
442,
1273,
429,
979,
458,
6350,
6821,
374,
3694,
323,
10349,
35,
55101,
375,
19816,
374,
4600,
198,
286,
1077,
4771,
284,
633,
34729,
14738,
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_enum_variant_from_module_2() {
test_rename(
r#"
mod foo {
pub struct Foo {
pub bar<|>: uint,
}
}
fn foo(f: foo::Foo) {
let _ = f.bar;
}
"#,
"baz",
r#"
mod foo {
pub struct Foo {
... | rust_cleaned_test_functions.jsonl/58100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
46112,
5673,
10750,
62,
17,
368,
341,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
1463,
15229,
341,
286,
6675,
2036,
33428,
341,
310,
6675,
3619,
27,
91,
26818,
2622,
345,
286,
456,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmd_arg_idx() {
let mut c = Cmd::new();
assert_eq!(c.arg_idx(0), None);
c.arg("SET");
assert_eq!(c.arg_idx(0), Some(&b"SET"[..]));
assert_eq!(c.arg_idx(1), None);
c.arg("foo").arg("42");
assert_eq!(c.arg_idx(1), Some(&b"foo"[..]));
... | rust_cleaned_test_functions.jsonl/2119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11684,
6057,
7258,
368,
341,
286,
1077,
5206,
272,
284,
40210,
486,
931,
543,
286,
2060,
10714,
10297,
66,
21186,
7258,
7,
15,
701,
2240,
626,
286,
272,
21186,
445,
5884,
797,
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 |
#[test]
fn test_read_write() {
// TOOD: Make this test more thorough
let mut memory_manager = MemoryManager::new();
let data: [u8; 4] = [1, 2, 3, 4];
let result: &[u8];
let mut i = 0;
memory_manager.write(0, &[1, 2, 3, 4]);
result = memory_manager.read(0,... | rust_cleaned_test_functions.jsonl/96775 | {
"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,
6443,
9165,
368,
341,
286,
442,
5146,
2069,
25,
7405,
419,
1273,
803,
17423,
198,
286,
1077,
5206,
4938,
12144,
284,
13850,
2043,
486,
931,
543,
286,
1077,
821,
25,
508,
84,
23,
26,
220,
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... | 2 |
#[test]
fn test_simple_operator_lte_plaintext_to_string() {
let name1 = _random_vector(10);
let value1 = _random_string(10);
let query = Operator::Lte(
TagName::PlainTagName(name1.clone()),
TargetValue::Unencrypted(value1.clone())
);
let json = q... | rust_cleaned_test_functions.jsonl/11883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
40594,
907,
665,
6317,
1641,
427,
2346,
3904,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
12247,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_automatic_rollover() {
let mut t = spooled_tempfile(10);
let mut buf = Vec::new();
assert!(!t.is_rolled());
assert_eq!(t.seek(SeekFrom::Current(0)).unwrap(), 0);
assert_eq!(t.read_to_end(&mut buf).unwrap(), 0);
assert_eq!(buf.as_slice(), b"");
buf.clear();
asser... | rust_cleaned_test_functions.jsonl/115751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32808,
13487,
62,
43684,
423,
368,
341,
262,
1077,
5206,
259,
284,
978,
45073,
11771,
1192,
7,
16,
15,
317,
262,
1077,
5206,
6607,
284,
11312,
486,
931,
1428,
262,
2060,
0,
3471,
83,
2079,
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_normalize() {
assert!(Vector2::new(3.0f64, 4.0f64).normalize().approx_eq( &Vector2::new(3.0/5.0, 4.0/5.0) ));
assert!(Vector3::new(2.0f64, 3.0f64, 6.0f64).normalize().approx_eq( &Vector3::new(2.0/7.0, 3.0/7.0, 6.0/7.0) ));
assert!(Vector4::new(1.0f64, 2.0f64, 4.0f64, 10.0f64).no... | rust_cleaned_test_functions.jsonl/5671 | {
"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,
80807,
368,
341,
1066,
262,
2060,
10297,
3781,
17,
486,
931,
7,
18,
13,
15,
69,
21,
19,
11,
220,
19,
13,
15,
69,
21,
19,
568,
30590,
1005,
48053,
10714,
7,
609,
3781,
17,
486,
931,
7,
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_no_constructor_make_unique_ns() {
let hdr = indoc! {"
#include <stdint.h>
namespace B {
struct A {
uint32_t a;
};
}
"};
let rs = quote! {
ffi::B::A::make_unique();
};
run_test("", hdr, rs, &["B::A"], &[]);
} | rust_cleaned_test_functions.jsonl/9962 | {
"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,
6536,
66210,
28230,
21218,
34728,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
31435,
860,
397,
262,
4473,
425,
341,
262,
2036,
362,
341,
286,
2622,
18,
17,
528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_csv() {
let schema = Schema::new(vec![
Field::new("city", DataType::Utf8, false),
Field::new("lat", DataType::Float64, false),
Field::new("lng", DataType::Float64, false),
]);
let file = File::open("test/data/uk_cities.csv").unwrap();
... | rust_cleaned_test_functions.jsonl/23951 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14020,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
90515,
310,
8601,
486,
931,
445,
8926,
497,
33172,
486,
38980,
23,
11,
895,
1326,
310,
8601,
486,
931,
445,
5524,
497,
33172,
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_preimage_storage() {
// Simple test of payment preimage storage allowing no client-side storage to claim payments
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes ... | rust_cleaned_test_functions.jsonl/16953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 778
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
1805,
23310,
368,
341,
197,
322,
8993,
1273,
315,
8160,
855,
1805,
5819,
10693,
902,
2943,
24067,
5819,
311,
3717,
14173,
198,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_tokenizer_1number() {
let test_str = "4.2";
let tokens: Vec<Token> = Tokens::from_str(test_str).collect();
assert_eq!(tokens, vec![Token::Number(4.2)]);
} | rust_cleaned_test_functions.jsonl/109316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
62,
16,
4082,
368,
341,
262,
1077,
1273,
2895,
284,
330,
19,
13,
17,
876,
262,
1077,
11211,
25,
11312,
83416,
29,
284,
58166,
486,
1499,
2895,
8623,
2895,
568,
17384,
543,
262,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parsing_invalid_chars_at_eof() {
let mut parser = Parser::new();
parser.set_language(get_language("json")).unwrap();
let tree = parser.parse(b"\xdf", None).unwrap();
assert_eq!(tree.root_node().to_sexp(), "(ERROR (UNEXPECTED INVALID))");
} | rust_cleaned_test_functions.jsonl/15863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
31433,
37418,
3752,
90792,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
543,
262,
6729,
980,
29021,
5433,
29021,
445,
2236,
15197,
15454,
543,
262,
1077,
4916,
284,
6729,
463... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_into_traits() {
assert_ser_tokens(&EnumToU32::One, &[Token::Some, Token::U32(1)]);
assert_ser_tokens(&EnumToU32::Nothing, &[Token::None]);
assert_de_tokens(&EnumToU32::Two, &[Token::Some, Token::U32(2)]);
assert_ser_tokens(&StructFromEnum(Some(5)), &[Token::None]);
asser... | rust_cleaned_test_functions.jsonl/59155 | {
"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,
5673,
45514,
39693,
368,
341,
262,
2060,
75861,
28838,
2099,
10766,
1249,
52,
18,
17,
486,
3966,
11,
44590,
3323,
486,
8373,
11,
9660,
486,
52,
18,
17,
7,
16,
41958,
262,
2060,
75861,
28838,
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_vld1q_u8() {
unsafe {
let a: [u8; 16] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
let e = transmute(a);
let r = vld1q_u8(transmute(&a));
assert!(cmp_arm(r, e));
}
} | rust_cleaned_test_functions.jsonl/33016 | {
"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,
2273,
507,
16,
80,
7300,
23,
368,
341,
286,
19860,
341,
310,
1077,
264,
25,
508,
84,
23,
26,
220,
16,
21,
60,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
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_match_quality() {
let matcher = ClangdMatcher::default();
// case
assert_order(&matcher, "monad", &["monad", "Monad", "mONAD"]);
// initials
assert_order(&matcher, "ab", &["ab", "aoo_boo", "acb"]);
assert_order(&matcher, "CC", &["CamelCase", "came... | rust_cleaned_test_functions.jsonl/17185 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 703
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
55074,
368,
341,
286,
1077,
36052,
284,
2435,
524,
67,
37554,
486,
2258,
543,
286,
442,
1142,
198,
286,
2060,
7869,
2099,
70826,
11,
330,
1645,
329,
497,
609,
1183,
1645,
329,
497,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_parse_host_header_and_absolute_uri() {
let mut hyper_request = HttpRequest::new(Body::empty());
*hyper_request.method_mut() = Method::GET;
*hyper_request.uri_mut() = "http://my-host-uri/path".parse().unwrap();
hyper_request
.headers_mut()
... | rust_cleaned_test_functions.jsonl/73134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
21039,
12848,
8757,
8378,
50874,
15572,
368,
341,
286,
1077,
5206,
17071,
7893,
284,
44049,
486,
931,
5349,
1076,
486,
3194,
1423,
286,
353,
68192,
7893,
12908,
29523,
368,
284,
6730,
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_on_pong() {
let frames = vec![HttpFrame::PingFrame(PingFrame::new_ack(123))];
let mut conn = HttpConnection::new(HttpScheme::Http);
let mut session = TestSession::new();
let mut frame_provider = MockReceiveFrame::new(frames);
conn.handle_next_frame(&mut f... | rust_cleaned_test_functions.jsonl/131345 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4470,
62,
59102,
368,
341,
286,
1077,
14087,
284,
7486,
20703,
2905,
4369,
486,
69883,
4369,
5304,
287,
4369,
486,
931,
48447,
7,
16,
17,
18,
81956,
286,
1077,
5206,
4534,
284,
4823,
4526,
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_zero_division() {
type LengthCm = Length<f32, Cm>;
let length: LengthCm = Length::new(5.0);
let length_zero: LengthCm = Length::zero();
let result = length / length_zero;
let expected: Scale<f32, Cm, Cm> = Scale::new(INFINITY);
assert_eq!(result,... | rust_cleaned_test_functions.jsonl/50595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
16237,
1816,
368,
341,
286,
943,
17287,
34,
76,
284,
17287,
63895,
18,
17,
11,
356,
76,
10133,
286,
1077,
3084,
25,
17287,
34,
76,
284,
17287,
486,
931,
7,
20,
13,
15,
317,
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_player2_palces_stone_at_3_12_and_player1_takes_the_turn() {
ExtBuilder::build().execute_with(|| {
let alice_pair = account_pair("Alice");
let bob_pair = account_pair("Bob");
let (players, players_pair)
= get_sorted_peer(alice_pair, bob_pair);
... | rust_cleaned_test_functions.jsonl/78908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 680
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15524,
17,
73310,
1603,
1261,
603,
3752,
62,
18,
62,
16,
17,
8378,
15524,
16,
528,
2050,
16068,
37274,
368,
341,
262,
9447,
3297,
486,
5834,
1005,
10257,
6615,
79453,
341,
286,
1077,
70433,
1444... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_csi_xterm_mouse() {
let mut map = HashMap::<_, _>::from_iter(IntoIter::new([
(
"[<0;65;8;M",
Event::Mouse(MouseEvent::Press(MouseButton::Left, 65, 8)),
),
(
"[<1;5;2;M",
Event:... | rust_cleaned_test_functions.jsonl/122257 | {
"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,
21039,
8337,
666,
6321,
3212,
4991,
39203,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
27638,
6878,
716,
6831,
1499,
11723,
24123,
78,
8537,
486,
931,
8956,
310,
2399,
394,
10545,
27,
15,
26,
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_mod_str() {
let mut args = Parsed::new();
args.flg = vec!['u'];
assert_eq!(mod_str("upper-case", &args), "UPPER-CASE");
args.flg = vec!['u', 'a'];
args.app = String::from("-case");
assert_eq!(mod_str("upper", &args), "UPPER-CASE");
args.flg... | rust_cleaned_test_functions.jsonl/27506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 466
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7480,
2895,
368,
341,
286,
1077,
5206,
2827,
284,
393,
18112,
486,
931,
543,
286,
2827,
8103,
70,
284,
7486,
0,
677,
84,
3860,
286,
2060,
10714,
10297,
2593,
2895,
445,
13574,
38485,
497,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_option() {
let config: Value = Value::String(String::from("S"));
assert_eq!(<Option<&str>>::from_config(&config).unwrap(), Some("S"));
} | rust_cleaned_test_functions.jsonl/8248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
9672,
368,
341,
286,
1077,
2193,
25,
5162,
284,
5162,
486,
703,
2242,
486,
1499,
445,
50,
4010,
286,
2060,
10714,
10297,
27,
5341,
52244,
495,
77595,
1499,
5332,
2099,
1676,
568,
15454,
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 |
#[test]
fn test_indices_iter_f_size_hint() {
let dim = (3, 4);
let mut it = indices_iter_f(dim);
let mut len = dim.0 * dim.1;
assert_eq!(it.len(), len);
while let Some(_) = it.next() {
len -= 1;
assert_eq!(it.len(), len);
}
assert_e... | rust_cleaned_test_functions.jsonl/33889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18333,
11723,
761,
2368,
45825,
368,
341,
286,
1077,
5103,
284,
320,
18,
11,
220,
19,
317,
286,
1077,
5206,
432,
284,
14937,
11723,
761,
36902,
317,
286,
1077,
5206,
2422,
284,
5103,
13,
15,
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_iter() {
let mut coll = NonEmptyVec::new('g');
coll.push('a');
coll.push('l');
coll.push('h');
coll.push('b');
let mut iter = coll.iter();
assert_eq!(iter.next(), Some(&'g'));
assert_eq!(iter.next(), Some(&'a'));
assert_eq!... | rust_cleaned_test_functions.jsonl/67657 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
368,
341,
286,
1077,
5206,
4530,
284,
11581,
3522,
10050,
486,
931,
492,
70,
1157,
286,
4530,
2552,
492,
64,
1157,
286,
4530,
2552,
492,
75,
1157,
286,
4530,
2552,
492,
71,
1157,
286,
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_dial_disconnect() {
::diem_logger::Logger::init_for_testing();
let runtime = ::tokio::runtime::Runtime::new().unwrap();
// Create a list of ordered PeerIds so we can ensure how PeerIds will be compared.
let ids = ordered_peer_ids(2);
let (mut peer_manager, _request_tx, _conn... | rust_cleaned_test_functions.jsonl/38534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
530,
67972,
368,
341,
262,
3504,
8579,
336,
27413,
486,
7395,
486,
2327,
5478,
70962,
543,
262,
1077,
15592,
284,
3504,
29594,
815,
486,
22255,
486,
15123,
486,
931,
1005,
15454,
1428,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_greater_my_semver() {
let my = Version::new("5.1.2").unwrap();
let other = Version::new("3.12.99").unwrap();
assert_eq!(my.partial_cmp(&other), Some(Ordering::Greater));
assert_ne!(my, other);
} | rust_cleaned_test_functions.jsonl/54504 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
97994,
35686,
30442,
423,
368,
341,
286,
1077,
847,
284,
6079,
486,
931,
445,
20,
13,
16,
13,
17,
1827,
15454,
543,
286,
1077,
1008,
284,
6079,
486,
931,
445,
18,
13,
16,
17,
13,
24,
24,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dont_fold_mixed_object_and_array_spread() {
fold_same("x = [...{}]");
fold_same("x = {...[]}");
fold("x = [a, ...[...{}]]", "x = [a, ...{}]");
fold("x = {a, ...{...[]}}", "x = {a, ...[]}");
} | rust_cleaned_test_functions.jsonl/122201 | {
"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,
814,
544,
61187,
717,
3286,
5314,
8378,
3858,
10123,
878,
368,
341,
262,
11555,
33574,
445,
87,
284,
16303,
6257,
37389,
262,
11555,
33574,
445,
87,
284,
14916,
1294,
20305,
262,
11555,
445,
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_method_this_binding_3() {
check_output_default(
"class Foo {\n
init(x) {\n\
this.x = x;\n\
}\n\
getX() {\n\
return this.x;\n\
}\n\
}\n\
\n\
var... | rust_cleaned_test_functions.jsonl/111854 | {
"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,
9032,
24868,
60815,
62,
18,
368,
341,
286,
1779,
7645,
9993,
1006,
310,
330,
1040,
33428,
28152,
77,
198,
2290,
2930,
2075,
8,
28152,
77,
5661,
338,
419,
1993,
284,
856,
17882,
77,
5661,
2290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build_remappings() {
use super::*;
let root = dunce::canonicalize("./test-data/test-contract-remappings").unwrap();
let paths = ProjectPathsConfig::builder()
.root(&root)
.sources(root.join("src"))
.lib(root.join("lib"))
.b... | rust_cleaned_test_functions.jsonl/25400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
19194,
23036,
368,
341,
286,
990,
2256,
79304,
286,
1077,
3704,
284,
49016,
346,
486,
77942,
551,
13988,
1944,
13945,
12697,
14859,
2144,
12,
1826,
23036,
1827,
15454,
543,
286,
1077,
12716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_param_taggypar() {
test_parameterized::<Taggypar<int>>(Onepar::<int>(1),
Twopar::<int>(1, 2),
Threepar::<int>(1, 2, 3),
Twopar::<int>(17, 42));
} | rust_cleaned_test_functions.jsonl/26213 | {
"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,
4090,
9372,
70,
1082,
277,
368,
341,
286,
1273,
24899,
1506,
27638,
5668,
70,
1082,
277,
4159,
25526,
1925,
11584,
27638,
396,
2235,
16,
1326,
3344,
11753,
453,
277,
27638,
396,
2235,
16,
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_async_ring_buffer() {
let ring_buffer = Arc::new(RingBuffer::new(32960));
let mut reader = RingBufferReader::new(ring_buffer.clone());
let mut writer = RingBufferWriter::new(ring_buffer.clone());
let t1 = thread::spawn(move ||{
let handle = task::spawn(async move {
... | rust_cleaned_test_functions.jsonl/22913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28346,
34683,
7776,
368,
341,
262,
1077,
10058,
7776,
284,
19689,
486,
931,
2785,
287,
4095,
486,
931,
7,
18,
17,
24,
21,
15,
1106,
1066,
262,
1077,
5206,
6604,
284,
21525,
4095,
5062,
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... | 7 |
#[test]
fn test_rebuild() {
let flag = NumberFormat::CSHARP7_LITERAL;
let rebuilt = flag.rebuild().decimal_point(b',').build().unwrap();
assert_eq!(flag.digit_separator(), b'_');
assert_eq!(rebuilt.digit_separator(), b'_');
assert_eq!(rebuilt.flags(), flag.flags());
... | rust_cleaned_test_functions.jsonl/70031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
5834,
368,
341,
286,
1077,
5181,
284,
5624,
4061,
486,
6412,
39,
42793,
22,
78047,
280,
286,
1077,
59585,
284,
5181,
1327,
5834,
1005,
23289,
6085,
1883,
516,
1823,
5834,
1005,
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_signature_unsubscribe() {
let GenesisBlockInfo {
genesis_block,
mint_keypair: alice,
..
} = create_genesis_block(10_000);
let bob_pubkey = Pubkey::new_rand();
let bank = Bank::new(&genesis_block);
let arc_bank = Arc::new... | rust_cleaned_test_functions.jsonl/103081 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 841
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
4907,
9384,
368,
341,
286,
1077,
40788,
4713,
1731,
341,
310,
59366,
7113,
345,
310,
28337,
3097,
12670,
25,
70433,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
7113,
7,
16,
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_gelf_decoder_bad_timestamp() {
let msg = r#"{"timestamp": "a string not a timestamp", "host": "anhostname"}"#;
let _res = GelfDecoder.decode(&msg).unwrap();
} | rust_cleaned_test_functions.jsonl/7192 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
490,
49843,
34199,
23073,
368,
341,
286,
1077,
3750,
284,
435,
55543,
4913,
13035,
788,
330,
64,
914,
537,
264,
11441,
497,
330,
3790,
788,
330,
276,
27806,
9207,
57676,
280,
286,
1077,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_factor() {
fn factor(n: uint) -> BigUint {
let mut f: BigUint = One::one();
for i in range(2, n + 1) {
f = f * FromPrimitive::from_uint(i).unwrap();
}
return f;
}
fn check(n... | rust_cleaned_test_functions.jsonl/96912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18588,
368,
341,
286,
5168,
8168,
1445,
25,
2622,
8,
1464,
6164,
21570,
341,
310,
1077,
5206,
282,
25,
6164,
21570,
284,
3776,
486,
603,
543,
310,
369,
600,
304,
2088,
7,
17,
11,
308,
488,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_forkpty() {
use nix::unistd::ForkResult::*;
use nix::sys::signal::*;
use nix::sys::wait::wait;
let _m0 = crate::PTSNAME_MTX.lock();
// forkpty spawns a child process
let _m1 = crate::FORK_MTX.lock();
let string = "naninani\n";
let echoed_string = "naninani\r... | rust_cleaned_test_functions.jsonl/72584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
669,
1595,
368,
341,
262,
990,
308,
941,
486,
27483,
486,
37,
669,
2077,
56162,
262,
990,
308,
941,
486,
7791,
486,
26622,
56162,
262,
990,
308,
941,
486,
7791,
486,
11489,
486,
11489,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_serialize_fail_packet_too_long_ipv4() {
let ser = (&[0; (1 << 16) - HEADER_BYTES][..]).into_serializer().encapsulate(
UdpPacketBuilder::new(TEST_SRC_IPV4, TEST_DST_IPV4, None, NonZeroU16::new(1).unwrap()),
);
let _ = ser.serialize_vec_outer();
} | rust_cleaned_test_functions.jsonl/112492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
22121,
21078,
2346,
78,
17799,
49378,
19,
368,
341,
286,
1077,
1420,
284,
15899,
58,
15,
26,
320,
16,
1115,
220,
16,
21,
8,
481,
39665,
40705,
1457,
496,
10697,
18122,
67441,
1005,
954,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_flag_satisfied_prereq() {
let mut store = TestStore::new();
let flag = store.flag("flagWithSatisfiedPrereq").unwrap().clone();
let alice = User::with_key("alice").build();
let bob = User::with_key("bob").build();
let detail = evaluate(&store, &flag,... | rust_cleaned_test_functions.jsonl/133346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 562
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
10933,
643,
46265,
5294,
485,
80,
368,
341,
286,
1077,
5206,
3553,
284,
3393,
6093,
486,
931,
543,
286,
1077,
5181,
284,
3553,
41230,
445,
9903,
2354,
50,
46265,
3533,
485,
80,
1827,
1545... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_double_ended_chain() {
let xs = [1, 2, 3, 4, 5];
let ys = [7, 9, 11];
let mut it = xs.iter().chain(&ys).rev();
assert_eq!(it.next().unwrap(), &11);
assert_eq!(it.next().unwrap(), &9);
assert_eq!(it.next_back().unwrap(), &1);
assert_eq!(it.next_back().unwrap(), &2);
... | rust_cleaned_test_functions.jsonl/25947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24598,
62,
2883,
30583,
368,
341,
262,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
31810,
284,
508,
22,
11,
220,
24,
11,
220,
16,
16,
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_simple_text() {
let expected_attr_value = AttrValue::from_primitive("my text");
let widget = WidgetUse::simple_text(expected_attr_value.clone());
assert_eq!(
widget,
WidgetUse {
name: "label".to_owned(),
children: Ve... | rust_cleaned_test_functions.jsonl/80195 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
4326,
368,
341,
286,
1077,
3601,
10422,
3142,
284,
50943,
1130,
486,
1499,
84087,
445,
2408,
1467,
797,
286,
1077,
9086,
284,
12980,
10253,
486,
22944,
4326,
15253,
10422,
3142,
15997,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sysconf_unsupported() {
// we test.
let open_max = sysconf(SysconfVar::_XOPEN_CRYPT);
assert!(open_max.expect("sysconf failed").is_none())
} | rust_cleaned_test_functions.jsonl/9002 | {
"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,
20344,
6135,
4907,
18216,
368,
341,
9401,
262,
442,
582,
1273,
624,
262,
1077,
1787,
6345,
284,
5708,
6135,
3759,
1047,
6135,
3962,
13541,
55,
30933,
920,
40755,
317,
262,
2060,
10297,
2508,
6345,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_extract_var_part_of_expr_stmt() {
check_assist(
extract_variable,
"
fn foo() {
$01$0 + 1;
}",
"
fn foo() {
let $0var_name = 1;
var_name + 1;
}",
);
} | rust_cleaned_test_functions.jsonl/132831 | {
"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,
39123,
4612,
10495,
3575,
21915,
21824,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
262,
400,
15,
16,
3,
15,
488,
220,
16,
280,
24375,
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_iterate_string_vec() {
let words = vec!["hello", "world"];
let capitalized_words: Vec<String> = words.iter().map(|a| {
capitalize_first(&a)
}).collect();
assert_eq!(capitalized_words, ["Hello", "World"]);
} | rust_cleaned_test_functions.jsonl/48143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
3904,
13251,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
14615,
6332,
286,
1077,
97321,
18981,
25,
11312,
3464,
29,
284,
4244,
19471,
1005,
2186,
22428,
64,
91,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_invalid_directory() {
let inspector = &Inspector::new();
process_file(&PathBuf::from("/i_dont_exist"), inspector.root());
assert_data_tree!(
inspector,
root: contains {
read_error: AnyProperty,
write_error: AnyProperty,
... | rust_cleaned_test_functions.jsonl/29241 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
31433,
14846,
368,
341,
286,
1077,
44725,
284,
609,
46230,
486,
931,
543,
286,
1882,
2458,
2099,
1820,
15064,
486,
1499,
4283,
72,
814,
544,
35906,
3975,
44725,
12576,
1423,
286,
2060,
1769... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hinter_empty() {
let data_model = test_model();
let dispatcher = Arc::new(RwLock::new(ControllerDispatcher::new(data_model)));
let helper = ScrutinyHelper::new(dispatcher);
let result = helper.complete("", 0).unwrap();
assert_eq!(result.1.len(), BuiltinCom... | rust_cleaned_test_functions.jsonl/76575 | {
"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,
1523,
2245,
15124,
368,
341,
286,
1077,
821,
5047,
284,
1273,
5047,
543,
286,
1077,
38799,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
95482,
21839,
486,
931,
2592,
5047,
4945,
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... | 1 |
#[test]
fn test_decode_mux_command_empty_buf() {
let empty_buf = [];
assert_matches!(MuxCommand::decode(&empty_buf[..]), Err(FrameParseError::BufferTooSmall));
} | rust_cleaned_test_functions.jsonl/107768 | {
"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,
15227,
80363,
10811,
15124,
10363,
368,
341,
286,
1077,
4287,
10363,
284,
5907,
286,
2060,
38344,
10297,
44,
2200,
4062,
486,
18196,
2099,
3194,
10363,
95874,
9719,
15495,
91008,
14463,
1454,
486,
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 |
#[test]
fn test_journal_skip_fields() {
if !ensure_journald_socket() {
return;
}
let mut map: HashMap<&str, &str> = HashMap::new();
let priority = format!("{}", u8::from(Priority::Warning));
map.insert("TEST_JOURNALD_LOG3", "result");
map.insert("PRIO... | rust_cleaned_test_functions.jsonl/39387 | {
"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,
85075,
44830,
12132,
368,
341,
286,
421,
753,
27289,
5374,
3431,
4747,
19555,
368,
341,
310,
470,
280,
286,
555,
286,
1077,
5206,
2415,
25,
10528,
52244,
495,
11,
609,
495,
29,
284,
10528,
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_match_histograms() {
fn match_to_zebra_histogram(image: &GrayImage) -> GrayImage {
let zebra = load_input_image("zebra.png").to_luma();
imageproc::contrast::match_histogram(image, &zebra)
}
compare_to_truth_grayscale("elephant.png", "elephant_matched.png", match_to_ze... | rust_cleaned_test_functions.jsonl/20073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
68564,
82,
368,
341,
262,
5168,
2432,
2346,
62,
2986,
14383,
68564,
10075,
25,
609,
28174,
1906,
8,
1464,
23366,
1906,
341,
286,
1077,
1147,
50213,
284,
2795,
5898,
4954,
445,
2986,
14383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keywords_inside_block() {
check(
r"fn quux() { if true { $0 } }",
expect![[r#"
kw unsafe
kw fn
kw const
kw type
kw impl
kw extern
kw use
... | rust_cleaned_test_functions.jsonl/22463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
72860,
7113,
368,
341,
286,
1779,
1006,
310,
435,
1,
8822,
922,
2200,
368,
314,
421,
830,
314,
400,
15,
335,
335,
756,
310,
1720,
0,
15505,
81,
2,
698,
394,
29525,
19860,
198,
394,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_migration() {
let mut deps = mock_dependencies(20, &[]);
let mut legacy_state_store = state_old_store(&mut deps.storage);
legacy_state_store
.save(&LegacyState {
contract_addr: CanonicalAddr::default(),
poll_count: 0,
... | rust_cleaned_test_functions.jsonl/44521 | {
"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,
4387,
90373,
368,
341,
286,
1077,
5206,
48178,
284,
7860,
71841,
7,
17,
15,
11,
609,
56703,
286,
1077,
5206,
19588,
4387,
14809,
284,
1584,
21108,
14809,
2099,
6984,
48178,
22403,
317,
286,
19588,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_identical_squares() {
// Two identical sub paths. It is pretty much the worst type of input for
// the tessellator as far as I know.
let mut builder = Path::builder();
builder.begin(point(0.0, 0.0));
builder.line_to(point(1.0, 0.0));
builder.line_to(point(1.0, 1.0));
... | rust_cleaned_test_functions.jsonl/102433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38399,
938,
643,
40856,
368,
341,
262,
442,
9043,
19516,
1186,
12716,
13,
1084,
374,
5020,
1753,
279,
11785,
943,
315,
1946,
369,
198,
262,
442,
279,
79830,
613,
850,
438,
3041,
438,
358,
1414,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_public_ip_addr_tcp_unreachable() {
solana_logger::setup();
let ip_addr = IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0));
let (_server_port, (server_udp_socket, _server_tcp_listener)) =
bind_common_in_range(ip_addr, (3200, 3250)).unwrap();
// make the socke... | rust_cleaned_test_functions.jsonl/43716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
27074,
10385,
7387,
45562,
4907,
46550,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
5997,
7387,
284,
35033,
13986,
486,
53,
19,
8972,
30168,
19,
13986,
486,
931,
7,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_multiplication() {
let c = 33.249539;
let p = Point1::from(27.6189);
let expected = Point1::from(p.x * c);
let result = p * c;
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/4524 | {
"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,
41652,
91802,
1693,
368,
341,
286,
1077,
272,
284,
220,
18,
18,
13,
17,
19,
24,
20,
18,
24,
26,
715,
286,
1077,
281,
284,
5126,
16,
486,
1499,
7,
17,
22,
13,
21,
16,
23,
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_newtype_variant() {
#[derive(Debug, PartialEq, Valuable, Serialize)]
enum E {
V(u8),
}
assert_ser_eq!(
E::V(0),
&[
Token::NewtypeVariant {
name: "E",
variant: "V"
},
Token::U8(0)
... | rust_cleaned_test_functions.jsonl/44213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
1313,
46112,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
4104,
13128,
11,
39900,
5563,
262,
7618,
468,
341,
286,
647,
8154,
23,
1326,
262,
555,
262,
2060,
75861,
10714,
33673,
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_send() {
use std::{fmt::Display, sync::mpsc, thread};
let mut stack: DynStack<dyn Display + Send> = DynStack::new();
dyn_push!(stack, String::from("1"));
let (sender, receiver) = mpsc::channel();
thread::spawn(move || {
dyn_push!(stack, String::from("2"));
s... | rust_cleaned_test_functions.jsonl/21301 | {
"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,
13565,
368,
341,
262,
990,
1460,
22964,
12501,
486,
7020,
11,
12811,
486,
1307,
2388,
11,
4516,
2315,
262,
1077,
5206,
5611,
25,
43938,
4336,
92846,
10623,
488,
11000,
29,
284,
43938,
4336,
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_prune_shreds() {
use {
crate::serve_repair::ShredRepairType,
std::net::{IpAddr, Ipv4Addr},
};
solana_logger::setup();
let (common, coding) = Shredder::new_coding_shred_header(
5, // slot
5, // index
5, //... | rust_cleaned_test_functions.jsonl/59860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 752
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
2886,
3712,
53369,
368,
341,
286,
990,
341,
310,
17717,
486,
13267,
1288,
12670,
486,
2016,
1151,
98386,
929,
345,
310,
1460,
486,
4711,
22964,
23378,
13986,
11,
358,
30168,
19,
13986,
1583,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lif_manager_get_inexisting() {
let mut lm = LIFManager::new();
let l = LIF::new(
3,
LIFType::LAN,
"lan1",
PortId::from(0),
vec![PortId::from(1), PortId::from(2)],
0,
None,
)
.unwra... | rust_cleaned_test_functions.jsonl/81916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
333,
12144,
3062,
1243,
36895,
368,
341,
286,
1077,
5206,
40238,
284,
444,
2773,
2043,
486,
931,
543,
286,
1077,
326,
284,
444,
2773,
486,
931,
1006,
310,
220,
18,
345,
310,
444,
2773,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inflation_fixed() {
let inflation = Inflation::new_fixed(0.001);
for year in &[0.1, 0.5, 1.0, DEFAULT_FOUNDATION_TERM, 100.0] {
assert_eq!(inflation.total(*year), 0.001);
}
} | rust_cleaned_test_functions.jsonl/19629 | {
"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,
1243,
64149,
37839,
368,
341,
286,
1077,
24527,
284,
758,
64149,
486,
931,
37839,
7,
15,
13,
15,
15,
16,
317,
286,
369,
1042,
304,
44590,
15,
13,
16,
11,
220,
15,
13,
20,
11,
220,
16,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.