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_from_public_key() {
let mut rng = rand::rngs::OsRng;
let sk = CommsSecretKey::random(&mut rng);
let pk = CommsPublicKey::from_secret_key(&sk);
let node_id = NodeId::from_key(&pk).unwrap();
assert_ne!(node_id.0.to_vec(), NodeId::new().0.to_vec());
/... | rust_cleaned_test_functions.jsonl/76525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
27074,
3097,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
69890,
82,
486,
28867,
49,
968,
280,
286,
1077,
1901,
284,
1198,
1011,
19773,
1592,
486,
11463,
2099,
6984,
28422,
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_snapshot_failure() {
let l = default_logger();
let mut sm = new_test_raft(1, vec![1, 2], 10, 1, new_storage(), &l);
sm.restore(testing_snap());
sm.persist();
sm.become_candidate();
sm.become_leader();
sm.mut_prs().get_mut(2).unwrap().next_idx = 1;
sm.mut_prs().g... | rust_cleaned_test_functions.jsonl/43883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53265,
43618,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
1525,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
16,
15,
11,
220,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_truncate() {
let mut bv = BitVec::from_elem(9, false);
bv.truncate(1);
assert_eq!(bv.iter().collect::<Vec<bool>>(), vec![false]);
assert_eq!(bv.count_ones(), 0);
assert_eq!(bv.count_zeros(), 1);
} | rust_cleaned_test_functions.jsonl/128600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
26900,
368,
341,
286,
1077,
5206,
56937,
284,
6495,
10050,
486,
1499,
28179,
7,
24,
11,
895,
626,
286,
56937,
5427,
26900,
7,
16,
317,
286,
2060,
10714,
10297,
54929,
19471,
1005,
17384,
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_rwlock_try_read() {
let lock = RwLock::new(0isize);
{
let read_guard = lock.read();
let read_result = lock.try_read();
assert!(
read_result.is_some(),
"try_read should succeed while read_guard is in scope"
... | rust_cleaned_test_functions.jsonl/15753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 538
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
98850,
53283,
6443,
368,
341,
286,
1077,
5296,
284,
55294,
11989,
486,
931,
7,
15,
285,
551,
317,
286,
341,
310,
1077,
1349,
36796,
284,
5296,
4125,
1428,
310,
1077,
1349,
5287,
284,
5296,
48779... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_svg() {
use std::fs::File;
use std::io::Write;
let mut file = File::create("test.svg").unwrap();
let options = BadgeOptions {
subject: "build".to_owned(),
status: "passing".to_owned(),
..BadgeOptions::default()
};
... | rust_cleaned_test_functions.jsonl/17845 | {
"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,
2346,
76849,
368,
341,
286,
990,
1460,
486,
3848,
486,
1703,
280,
286,
990,
1460,
486,
815,
486,
7985,
280,
286,
1077,
5206,
1034,
284,
2887,
486,
3182,
445,
1944,
15228,
1827,
15454,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hover_self() {
let (analysis, position) = single_file_with_position(
"
struct Thing { x: u32 }
impl Thing {
fn new() -> Self {
Self<|> { x: 0 }
}
}
",
);
let hover ... | rust_cleaned_test_functions.jsonl/27087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1008
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
25637,
368,
341,
286,
1077,
320,
34484,
11,
2309,
8,
284,
3175,
2458,
6615,
9661,
1006,
310,
6228,
310,
2036,
37200,
314,
856,
25,
575,
18,
17,
456,
310,
11605,
37200,
341,
394,
5168,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_coinbase_amount() {
let hs = [1, 1000, 1_000_000];
let ds = [1, 255, 512];
let expected = [
[Coinbase::BASE_AMOUNT, 609377028, 608649080],
[1250000000, 761721286, 760811350],
[1643935564, 1001776569, 1000579870],
];
let mut coinbase = Coinbase::defaul... | rust_cleaned_test_functions.jsonl/70433 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75718,
3152,
13471,
368,
341,
262,
1077,
32220,
284,
508,
16,
11,
220,
16,
15,
15,
15,
11,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
935,
262,
1077,
11472,
284,
508,
16,
11,
220,
17,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_distinct_prime_factors() {
let test_list = vec![
(46, vec![2, 23]),
(2, vec![2]),
(3, vec![3]),
(162, vec![2, 3]),
];
for (input, expected) in test_list {
let factors = distinct_prime_factors(input);
... | rust_cleaned_test_functions.jsonl/33858 | {
"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,
16031,
7800,
38217,
73040,
368,
341,
286,
1077,
1273,
2019,
284,
7486,
90515,
310,
320,
19,
21,
11,
7486,
20703,
17,
11,
220,
17,
18,
17036,
310,
320,
17,
11,
7486,
20703,
17,
17036,
310,
320,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_extract_tags() {
let (tags, text) = extract_tags(r#"<tag fn>fn <tag>main</tag>() {}</tag>"#, "tag");
let actual = tags.into_iter().map(|(range, attr)| (&text[range], attr)).collect::<Vec<_>>();
assert_eq!(actual, vec![("fn main() {}", Some("fn".into())), ("main", None),]);
} | rust_cleaned_test_functions.jsonl/51604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
16333,
368,
341,
262,
1077,
320,
14082,
11,
1467,
8,
284,
8649,
16333,
2601,
2,
22476,
4578,
5168,
29,
8822,
366,
4578,
29,
3817,
522,
4578,
13555,
4687,
522,
4578,
9877,
60778,
330,
4578... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rev_iter() {
let mut m = TreeMap::new();
assert!(m.insert(3i, 6i));
assert!(m.insert(0, 0));
assert!(m.insert(4, 8));
assert!(m.insert(2, 4));
assert!(m.insert(1, 2));
let mut n = 4;
for (k, v) in m.rev_iter() {
assert... | rust_cleaned_test_functions.jsonl/66367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38082,
11723,
368,
341,
286,
1077,
5206,
296,
284,
76883,
486,
931,
1428,
286,
2060,
10297,
76,
7030,
7,
18,
72,
11,
220,
21,
72,
1106,
286,
2060,
10297,
76,
7030,
7,
15,
11,
220,
15,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_noninvertible_matrix_returns_none() {
let matrix: Matrix4x4<f64> = Matrix4x4::new(
1_f64, 2_f64, 3_f64, 4_f64,
5_f64, 6_f64, 7_f64, 8_f64,
5_f64, 6_f64, 7_f64, 8_f64,
9_f64, 10_f64, 11_f64, 12_f64
);
ass... | rust_cleaned_test_functions.jsonl/129097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
83729,
1238,
10193,
58900,
31488,
368,
341,
286,
1077,
6172,
25,
11631,
19,
87,
19,
63895,
21,
19,
29,
284,
11631,
19,
87,
19,
486,
931,
1006,
310,
220,
16,
761,
21,
19,
11,
220,
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_rfc3339_opts() {
use SecondsFormat::*;
let pst = FixedOffset::east(8 * 60 * 60);
let dt = pst.ymd(2018, 1, 11).and_hms_nano(10, 5, 13, 084_660_000);
assert_eq!(dt.to_rfc3339_opts(Secs, false), "2018-01-11T10:05:13+08:00");
assert_eq!(dt.to_rfc3339_opts(S... | rust_cleaned_test_functions.jsonl/17720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 790
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
8316,
18,
18,
18,
24,
32354,
368,
341,
286,
990,
60983,
4061,
56162,
286,
1077,
43802,
284,
20149,
6446,
486,
60501,
7,
23,
353,
220,
21,
15,
353,
220,
21,
15,
317,
286,
1077,
7594,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_unquote() {
// test unquote json string
let mut test_cases = vec![
("\\b", true, Some("\x08")),
("\\f", true, Some("\x0C")),
("\\n", true, Some("\x0A")),
("\\r", true, Some("\x0D")),
("\\t", true, Some("\x09")),
... | rust_cleaned_test_functions.jsonl/105266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
4907,
2949,
368,
341,
286,
442,
1273,
650,
2949,
2951,
914,
198,
286,
1077,
5206,
1273,
41427,
284,
7486,
90515,
310,
3489,
3422,
65,
497,
830,
11,
4329,
4921,
87,
15,
23,
30154,
310,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_division_by_scalar() {
let length: Length<f32, Cm> = Length::new(5.0);
let result = length / 2.0;
let expected: Length<f32, Cm> = Length::new(2.5);
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/50588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16237,
1816,
3710,
41652,
368,
341,
286,
1077,
3084,
25,
17287,
63895,
18,
17,
11,
356,
76,
29,
284,
17287,
486,
931,
7,
20,
13,
15,
626,
286,
1077,
1102,
284,
3084,
608,
220,
17,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_select_1() {
let expected = expected_values("SELECT ?", vec![1]);
let query = Select::default().value(1);
let (sql, params) = Sqlite::build(query).unwrap();
assert_eq!(expected.0, sql);
assert_eq!(expected.1, params);
} | rust_cleaned_test_functions.jsonl/52896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
62,
16,
368,
341,
286,
1077,
3601,
284,
3601,
9146,
445,
4858,
42313,
7486,
20703,
16,
10149,
286,
1077,
3239,
284,
8427,
486,
2258,
1005,
957,
7,
16,
317,
286,
1077,
320,
3544,
11,
362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pathset_try_from() {
let hex = hex::decode(TEST_PATH_SET_BUFFER).expect("");
let pathset = PathSet::try_from(PATH_SET_TEST).unwrap();
assert_eq!(pathset.as_ref(), hex)
} | rust_cleaned_test_functions.jsonl/77246 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
746,
53283,
5673,
368,
341,
286,
1077,
12371,
284,
12371,
486,
18196,
50320,
7944,
8481,
14394,
568,
17119,
13056,
286,
1077,
1815,
746,
284,
7933,
1649,
486,
1539,
5673,
72791,
8481,
11641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_transform_iv_all_ffs() {
let cv = INITIALIZATION_VECTOR;
let to_test = [0xFF; 8];
assert_eq!(transform(cv, to_test), 0xDB47BA4E73CAF7F5);
} | rust_cleaned_test_functions.jsonl/54029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18449,
51411,
5705,
58708,
82,
368,
341,
286,
1077,
5544,
284,
29964,
32601,
3495,
47993,
280,
286,
1077,
311,
4452,
284,
508,
15,
9264,
26,
220,
23,
935,
286,
2060,
10714,
10297,
4701,
38210,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_minimize_linear_up() {
let quad = BoundedQuadratic::new(-1., 1., 0., 1., 0.);
assert_eq!(quad.minimize(), (-1., -1.));
} | rust_cleaned_test_functions.jsonl/19884 | {
"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,
7260,
11853,
40674,
8237,
368,
341,
286,
1077,
27082,
284,
425,
13082,
2183,
88678,
486,
931,
4080,
16,
2572,
220,
16,
2572,
220,
15,
2572,
220,
16,
2572,
220,
15,
58957,
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,
1,
1,
1
] | 1 |
#[test]
fn test_create_negative_lamports() {
// Attempt to create account with more lamports than from_account has
let new_owner = Pubkey::new(&[9; 32]);
let from = Pubkey::new_unique();
let from_account = AccountSharedData::new(100, 0, &Pubkey::new_unique());
let to = Pu... | rust_cleaned_test_functions.jsonl/95874 | {
"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,
8657,
53865,
907,
309,
3394,
368,
341,
286,
442,
43517,
311,
1855,
2692,
448,
803,
31603,
3394,
1091,
504,
13500,
702,
198,
286,
1077,
501,
29027,
284,
22611,
792,
486,
931,
2099,
58,
24,
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... | 1 |
#[test]
fn test_buffering_tokens_should_immediately_update_position() {
fn src(byte: usize, line: usize, col: usize) -> SourcePos {
SourcePos { byte, line, col }
}
let mut tok_iter = TokenIter::new(std::iter::empty());
let pos = src(4, 4, 4);
tok_iter.buffe... | rust_cleaned_test_functions.jsonl/39732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
287,
28838,
43378,
17895,
43187,
8882,
9661,
368,
341,
286,
5168,
2286,
19738,
25,
22301,
11,
1555,
25,
22301,
11,
1375,
25,
22301,
8,
1464,
8748,
4859,
341,
310,
8748,
4859,
314,
4922,
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_purge_fork_not_root() {
let paths = get_tmp_accounts_path!();
let accounts = AccountsDB::new(&paths.paths);
let mut pubkeys: Vec<Pubkey> = vec![];
create_account(&accounts, &mut pubkeys, 0, 1, 0, 0);
let ancestors = vec![(0, 0)].into_iter().collect();
... | rust_cleaned_test_functions.jsonl/49134 | {
"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,
620,
39823,
761,
669,
7913,
12993,
368,
341,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
9618,
284,
40655,
3506,
486,
931,
2099,
21623,
65345,
317,
286,
1077,
5206,
6675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inner_tuple_array_param() {
let abi = "((uint256,bytes32)[],address)";
let read = HumanReadableParser::parse_type(abi).unwrap();
let param = ParamType::Tuple(vec![
ParamType::Array(Box::new(ParamType::Tuple(vec![
ParamType::Uint(256),
... | rust_cleaned_test_functions.jsonl/77871 | {
"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,
21039,
34345,
21773,
3858,
4090,
368,
341,
286,
1077,
61050,
284,
330,
1188,
2496,
17,
20,
21,
11,
9651,
18,
17,
6620,
1125,
4995,
24023,
286,
1077,
1349,
284,
11097,
57938,
6570,
486,
6400,
181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_strptime() {
let _reset = set_time_zone();
match strptime("", "") {
Ok(ref tm) => {
assert!(tm.tm_sec == 0);
assert!(tm.tm_min == 0);
assert!(tm.tm_hour == 0);
assert!(tm.tm_mday == 0);
a... | rust_cleaned_test_functions.jsonl/7341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3928
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
28941,
368,
341,
286,
1077,
716,
9716,
284,
738,
3009,
28692,
1428,
286,
2432,
607,
28941,
19814,
11700,
341,
310,
7622,
13321,
17333,
8,
589,
341,
394,
2060,
10297,
13730,
33533,
17242,
621... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_cast_range_i16_max() {
assert_eq!(i16::MAX.to_int(), Some(i16::MAX as int));
assert_eq!(i16::MAX.to_i8(), None);
assert_eq!(i16::MAX.to_i16(), Some(i16::MAX as i16));
assert_eq!(i16::MAX.to_i32(), Some(i16::MAX as i32));
assert_eq!(i16::MAX.to_i64(), ... | rust_cleaned_test_functions.jsonl/23650 | {
"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,
5303,
9698,
5318,
16,
21,
6345,
368,
341,
286,
2060,
10714,
10297,
72,
16,
21,
486,
10586,
2389,
4042,
1507,
220,
4329,
1956,
16,
21,
486,
10586,
438,
526,
1106,
286,
2060,
10714,
10297,
72,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_groupby_apply() {
let df = df! {
"A" => &[1, 2, 3, 4, 5],
"fruits" => &["banana", "banana", "apple", "apple", "banana"],
"B" => &[5, 4, 3, 2, 1],
"cars" => &["beetle", "audi", "beetle", "beetle", "beetle"]
}
.unwrap();
... | rust_cleaned_test_functions.jsonl/14685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
6288,
1694,
36551,
368,
341,
286,
1077,
6764,
284,
6764,
0,
341,
310,
330,
32,
1,
589,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
1259,
310,
330,
1626,
11797,
1,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_internally_tagged_borrow() {
#[derive(Debug, PartialEq, Serialize, Deserialize)]
#[serde(tag = "type")]
pub enum Input<'a> {
Package { name: &'a str },
}
assert_tokens(
&Input::Package { name: "borrowed" },
&[
Token::Struct {
... | rust_cleaned_test_functions.jsonl/56439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
932,
745,
9372,
3556,
880,
7768,
368,
341,
262,
11506,
27098,
42618,
11,
55039,
11,
39900,
11,
48440,
5563,
262,
11506,
47024,
19343,
284,
330,
1313,
5422,
262,
6675,
7618,
5571,
18291,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_kv_scan_memory_lock() {
let (_cluster, client, ctx) = must_new_cluster_and_kv_client();
let mut req = ScanRequest::default();
req.set_context(ctx);
req.set_start_key(b"a".to_vec());
req.version = 50;
fail::cfg("raftkv_async_snapshot_err", "return").unwrap();
let res... | rust_cleaned_test_functions.jsonl/26792 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
97066,
28857,
19195,
9818,
368,
341,
262,
1077,
5453,
18855,
11,
2943,
11,
5635,
8,
284,
1969,
5921,
28441,
8378,
97066,
8179,
1428,
262,
1077,
5206,
4232,
284,
31108,
1900,
486,
2258,
543,
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_json_test_statement() {
let n = TestStmt {
base: BaseNode::default(),
assignment: VariableAssgn {
base: BaseNode::default(),
id: Identifier {
base: BaseNode::default(),
name: "mean".to_string(),
},
... | rust_cleaned_test_functions.jsonl/40422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
4452,
37404,
368,
341,
262,
1077,
308,
284,
3393,
31063,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
16319,
25,
12407,
5615,
4905,
341,
310,
2331,
25,
5351,
1955,
486,
2258,
3148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cmp() {
assert!(T1(1).cmp(&T1(2)) == Ordering::Less);
assert!(T1(1).cmp(&T1(1)) == Ordering::Equal);
assert!(T1(1).cmp(&T1(0)) == Ordering::Greater);
assert!(T2(1, 1).cmp(&T2(1, 1)) == Ordering::Equal);
assert!(T2(1, 1).cmp(&T2(2, 1)) == Ordering::Less);
... | rust_cleaned_test_functions.jsonl/23921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35193,
368,
341,
286,
2060,
10297,
51,
16,
7,
16,
568,
7293,
2099,
51,
16,
7,
17,
593,
621,
68621,
486,
27451,
317,
286,
2060,
10297,
51,
16,
7,
16,
568,
7293,
2099,
51,
16,
7,
16,
593,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pop_packed() {
let mut repr = Repr::new("i am 24 characters long!");
repr.pop();
assert_eq!(repr.len(), 23);
assert_eq!(repr.as_str(), "i am 24 characters long");
} | rust_cleaned_test_functions.jsonl/14399 | {
"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,
17061,
620,
11191,
368,
341,
286,
1077,
5206,
30636,
284,
1032,
649,
486,
931,
445,
72,
1079,
220,
17,
19,
5766,
1293,
11142,
286,
30636,
8288,
1428,
286,
2060,
10714,
10297,
30837,
19406,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 mut src = UpdateInfo::default();
src.0.ucodeUpdate = 1;
src.0.csmeFwUpdate = 2;
src.0.pswUpdate = 3;
assert_eq!(
format!("{}", &src),
"Microcode 1, Management Engine Firmware 2, Platform Services 3"
);
} | rust_cleaned_test_functions.jsonl/67475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
286,
1077,
5206,
2286,
284,
5549,
1731,
486,
2258,
543,
286,
2286,
13,
15,
56334,
534,
4289,
284,
220,
16,
280,
286,
2286,
13,
15,
18775,
2660,
37,
86,
4289,
284,
220,
17,
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_shabal384_hash_password() {
let password = "password";
let hash = Shabal384Hasher.hash_str((), password).unwrap();
assert_eq!("673f98958f04371edad63fe095e6903fdf894324b9944f36a6828e2b8b6dd2f4986cd4a61e29bf2866f021bbbaa02e8a", hash.as_hex());
} | rust_cleaned_test_functions.jsonl/65767 | {
"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,
3712,
62794,
18,
23,
19,
8950,
10122,
368,
341,
286,
1077,
3552,
284,
330,
3833,
3302,
286,
1077,
5175,
284,
1417,
62794,
18,
23,
19,
6370,
261,
15101,
2895,
7,
1507,
3552,
568,
15454,
1428,
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_length() {
let mut m = Message::new();
m.information_elements.push(
InformationElement::TeidDataI(
information_elements::teid_data_i::InformationElement::new(0x12345678)
)
);
let nsapi = information_elements::nsapi::Inform... | rust_cleaned_test_functions.jsonl/7744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1056
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5118,
368,
341,
286,
1077,
5206,
296,
284,
4856,
486,
931,
1428,
286,
296,
1858,
1627,
22801,
2552,
1006,
310,
8085,
1691,
486,
6639,
307,
1043,
40,
1006,
394,
1995,
22801,
486,
665,
307,
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... | 2 |
#[test]
fn test_check_if_pangram() {
{
let sentence = "thequickbrownfoxjumpsoverthelazydog";
assert!(check_if_pangram(sentence.to_string()))
}
{
let sentence = "leetcode";
assert!(!check_if_pangram(sentence.to_string()))
}
} | rust_cleaned_test_functions.jsonl/18744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
11119,
620,
524,
2396,
368,
341,
262,
341,
286,
1077,
11652,
284,
330,
1782,
27763,
64461,
15011,
43296,
704,
423,
339,
301,
13619,
18457,
876,
286,
2060,
10297,
2028,
11119,
620,
524,
2396,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_colinear_touching_squares2() {
// Two squares touching.
// x-----x
// | x-----x
// x-----x |
// x-----x
let mut builder = Path::builder();
builder.begin(point(0.0, 0.0));
builder.line_to(point(10.0, 0.0));
builder.line_to(point(10.... | rust_cleaned_test_functions.jsonl/102423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10211,
88921,
60840,
287,
643,
40856,
17,
368,
341,
262,
442,
9043,
31340,
30587,
624,
1066,
262,
442,
856,
15081,
87,
198,
262,
442,
760,
257,
856,
15081,
87,
7213,
262,
442,
856,
15081,
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_table_scope() {
let lua = Lua::new();
let globals = lua.globals();
lua.exec::<()>(
r#"
touter = {
tin = {1, 2, 3}
}
"#,
None,
).unwrap();
let tin;
{
let touter = globals.get::<_, Table>("touter"... | rust_cleaned_test_functions.jsonl/87409 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
23199,
368,
341,
262,
1077,
20357,
284,
37662,
486,
931,
543,
262,
1077,
37785,
284,
20357,
1302,
16616,
543,
262,
20357,
15776,
27638,
368,
17055,
286,
435,
2,
698,
310,
259,
2676,
284,
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_inr_mem() {
let mut state = State8080::empty_state();
state.memory = vec![0x34, 0x99];
state.set_hl(0x01);
emulate_8080_op(&mut state);
assert_eq!(state.read_memory(0x01), 0x9a);
} | rust_cleaned_test_functions.jsonl/7804 | {
"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,
1243,
81,
12976,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
18,
19,
11,
220,
15,
87,
24,
24,
935,
286,
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_get_char_ranges() {
struct Row {
chars: Vec<char>,
ruled_out_chars: Vec<char>,
expected_ranges: Vec<Range<char>>,
}
let table = [
Row {
chars: vec!['a'],
ruled_out_chars: vec![],
... | rust_cleaned_test_functions.jsonl/27473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 775
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9232,
58748,
368,
341,
286,
2036,
10801,
341,
310,
23000,
25,
11312,
21919,
12520,
310,
21286,
6068,
37418,
25,
11312,
21919,
12520,
310,
3601,
58748,
25,
11312,
27,
6046,
21919,
61340,
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... | 2 |
#[test]
fn test_bittestandcomplement() {
unsafe {
let mut a = 0b0101_0000i32;
assert_eq!(_bittestandcomplement(&mut a as _, 4), 1);
assert_eq!(_bittestandcomplement(&mut a as _, 4), 0);
assert_eq!(_bittestandcomplement(&mut a as _, 4), 1);
asse... | rust_cleaned_test_functions.jsonl/46673 | {
"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,
880,
14267,
437,
874,
2764,
368,
341,
286,
19860,
341,
310,
1077,
5206,
264,
284,
220,
15,
65,
15,
16,
15,
16,
62,
15,
15,
15,
15,
72,
18,
17,
280,
310,
2060,
10714,
0,
2490,
65,
14267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_name() {
assert!(match_name(".", ".my.protos"));
assert!(match_name(".", ".protos"));
assert!(match_name(".my", ".my"));
assert!(match_name(".my", ".my.protos"));
assert!(match_name(".my.protos.Service", ".my.protos.Service"));
assert!(matc... | rust_cleaned_test_functions.jsonl/32467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
1269,
368,
341,
286,
2060,
10297,
6347,
1269,
64217,
5933,
2408,
5340,
436,
4010,
286,
2060,
10297,
6347,
1269,
64217,
5933,
4391,
436,
14929,
286,
2060,
10297,
6347,
1269,
5680,
2408,
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_withdraw() {
let mut deps = mock_dependencies(&[]);
let msg = InstantiateMsg {
anchor_token: "reward0000".to_string(),
staking_token: "staking0000".to_string(),
distribution_schedule: vec![
(
mock_env().block.time.seconds(),
... | rust_cleaned_test_functions.jsonl/2051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 855
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
7633,
368,
341,
262,
1077,
5206,
48178,
284,
7860,
71841,
2099,
1294,
626,
262,
1077,
3750,
284,
32288,
6611,
341,
286,
17105,
6458,
25,
330,
49007,
15,
15,
15,
15,
3263,
983,
3904,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_home_generate_shuffle_accounts_path() {
let dir = tempdir().unwrap();
fs::create_dir_all(dir.path().join(".shuffle")).unwrap();
let home = Home::new(dir.path()).unwrap();
home.generate_shuffle_accounts_path().unwrap();
assert_eq!(dir.path().join(".shuffle... | rust_cleaned_test_functions.jsonl/123535 | {
"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,
21653,
48851,
73484,
55665,
2638,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
8619,
486,
3182,
4334,
5705,
14161,
3875,
1005,
5987,
5680,
65355,
15197,
15454,
1428,
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_use_exceeds_cache_size() {
let cache = CacheTest::new(CACHE_SIZE);
let mut handles = vec![];
for i in 0..(CACHE_SIZE + 100) as u32 {
handles.push(cache.insert_and_return(1000 + i, 2000 + i))
}
// check that all the entries can be foun... | rust_cleaned_test_functions.jsonl/82680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15951,
2702,
4635,
82,
11529,
2368,
368,
341,
286,
1077,
6500,
284,
19479,
2271,
486,
931,
3025,
17810,
4098,
317,
286,
1077,
5206,
13469,
284,
7486,
0,
15078,
1789,
286,
369,
600,
304,
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... | 4 |
#[test]
fn test_fs_type() {
assert_eq!("ext2/ext3", pretty_fstype(0xEF53));
assert_eq!("tmpfs", pretty_fstype(0x01021994));
assert_eq!("nfs", pretty_fstype(0x6969));
assert_eq!("btrfs", pretty_fstype(0x9123683e));
assert_eq!("xfs", pretty_fstype(0x58465342));
asse... | rust_cleaned_test_functions.jsonl/36730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34470,
1819,
368,
341,
286,
2060,
10714,
17223,
427,
17,
81143,
18,
497,
5020,
761,
73520,
7,
15,
65769,
20,
18,
1106,
286,
2060,
10714,
17223,
5173,
3848,
497,
5020,
761,
73520,
7,
15,
87,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_print_stats() {
let mut x: Vec<(String, u64, u64)> = Vec::new();
x.push(("dupa".to_string(), 100, 10));
x.push(("dupadupadupadupa".to_string(), 100, 10));
x.push(("dupa2".to_string(), 100, 13213120));
let (mut k, mut t) = print_stats(&x, 10, 10);
} | rust_cleaned_test_functions.jsonl/110362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
15381,
368,
341,
286,
1077,
5206,
856,
25,
11312,
28706,
703,
11,
575,
21,
19,
11,
575,
21,
19,
16018,
284,
11312,
486,
931,
543,
286,
856,
2552,
30873,
21912,
64,
3263,
983,
3904,
1507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_token_revocation_with_unsupported_token_type() {
let client = new_client()
.set_revocation_uri(RevocationUrl::new("https://revocation/url".to_string()).unwrap());
let revocation_response = client
.revoke_token(AccessToken::new("access_token_123".to_string()).into()).unwr... | rust_cleaned_test_functions.jsonl/18622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 786
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
38082,
2276,
6615,
4907,
18216,
6458,
1819,
368,
341,
262,
1077,
2943,
284,
501,
8179,
741,
286,
659,
746,
38082,
2276,
15572,
7,
36184,
2276,
2864,
486,
931,
445,
2428,
1110,
7282,
2276,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_solve_checksum_second() {
let input = "5 9 2 8\n9 4 7 3\n3 8 6 5";
let matrix = generate_matrix(input);
assert_eq!(solve_checksum_second(&matrix), 9);
} | rust_cleaned_test_functions.jsonl/10561 | {
"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,
86246,
64038,
29644,
368,
341,
286,
1077,
1946,
284,
330,
20,
220,
24,
220,
17,
220,
23,
1699,
24,
220,
19,
220,
22,
220,
18,
1699,
18,
220,
23,
220,
21,
220,
20,
876,
286,
1077,
6172,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_oracle_date() {
test_oracle_date(1, 1, 1, 0, 0, 0);
test_oracle_date(1, 1, 1, 1, 1, 1);
test_oracle_date(1969, 12, 30, 23, 30, 30);
test_oracle_date(1969, 12, 31, 23, 59, 59);
test_oracle_date(1970, 1, 1, 0, 0, 0);
test_oracle_date(1970, 10, ... | rust_cleaned_test_functions.jsonl/54050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
8734,
7902,
4164,
368,
341,
286,
1273,
8734,
7902,
4164,
7,
16,
11,
220,
16,
11,
220,
16,
11,
220,
15,
11,
220,
15,
11,
220,
15,
317,
286,
1273,
8734,
7902,
4164,
7,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_set_difference() {
let a = SgSet::from_iter([1, 3, 9, 7]);
let b = SgSet::<_, 4>::from_iter([2, 8, 9, 1]);
assert_eq!(
a.difference(&b).copied().collect::<Vec<usize>>(),
vec![3, 7]
);
} | rust_cleaned_test_functions.jsonl/68245 | {
"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,
2602,
47525,
368,
341,
262,
1077,
264,
284,
328,
70,
1649,
486,
1499,
11723,
2561,
16,
11,
220,
18,
11,
220,
24,
11,
220,
22,
2558,
262,
1077,
293,
284,
328,
70,
1649,
27638,
6878,
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_request_from_settings() {
const TIME_ZONE_ID: &'static str = "PDT";
let intl_settings = IntlSettings {
locales: Some(vec![fidl_fuchsia_intl::LocaleId { id: "blah".into() }]),
temperature_unit: Some(fidl_fuchsia_intl::TemperatureUnit::Celsius),
... | rust_cleaned_test_functions.jsonl/95265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
5673,
10853,
368,
341,
286,
733,
22236,
60742,
3450,
25,
30136,
1978,
607,
284,
330,
47,
10599,
3302,
286,
1077,
95015,
10853,
284,
84578,
6086,
341,
310,
52297,
25,
4329,
25592,
20703,
3243... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_late_reward_report() {
use crate::mining::pallet::OnReward;
new_test_ext().execute_with(|| {
set_block_1();
setup_workers(1);
setup_pool_with_workers(1, &[1]); // pid = 0
// Simulate no share in the pool.
let _ = take_events();
PhalaStakePool::on_reward(&vec![Settl... | rust_cleaned_test_functions.jsonl/60467 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 618
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
349,
38260,
14813,
368,
341,
298,
41819,
17717,
486,
1065,
287,
486,
79,
7464,
486,
1925,
59622,
280,
298,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
571,
8196,
7113,
62,
16,
543,
571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_f64x4_move_mask() {
let a = f64x4::from([-1.0, 0.0, -2.0, -3.0]);
let expected = 0b1101;
let actual = a.move_mask();
assert_eq!(expected, actual);
let a = f64x4::from([1.0, 0.0, 2.0, -3.0]);
let expected = 0b1000;
let actual = a.move_mask();
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/34779 | {
"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,
761,
21,
19,
87,
19,
17134,
9999,
368,
341,
220,
1077,
264,
284,
282,
21,
19,
87,
19,
486,
1499,
41197,
16,
13,
15,
11,
220,
15,
13,
15,
11,
481,
17,
13,
15,
11,
481,
18,
13,
15,
2558,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dedup_by_key() {
fn case(a: Vec<i32>, b: Vec<i32>) {
let mut v = a;
v.dedup_by_key(|i| *i / 10);
assert_eq!(v, b);
}
case(vec![], vec![]);
case(vec![10], vec![10]);
case(vec![10, 11], vec![10]);
case(vec![10, 20, 30], vec![10, 20, 30]);
case(ve... | rust_cleaned_test_functions.jsonl/24401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
291,
454,
3710,
3097,
368,
341,
262,
5168,
1142,
2877,
25,
11312,
21897,
18,
17,
8066,
293,
25,
11312,
21897,
18,
17,
9231,
341,
286,
1077,
5206,
348,
284,
264,
280,
286,
348,
950,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_evaluate_error() {
let register = vec![vec![
Complex64::new(1.0, 0.0),
Complex64::new(0.0, 0.0),
Complex64::new(0.0, 0.0),
]];
let mut bri = CheatedInput::new(1);
let test_matrix = vec![
(0, 0, Complex64::new(1.0, 0.0)),
(0, 1, Complex64::n... | rust_cleaned_test_functions.jsonl/16062 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 919
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
19642,
4096,
368,
341,
262,
1077,
4161,
284,
7486,
20703,
4083,
90515,
286,
22096,
21,
19,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
1326,
286,
22096,
21,
19,
486,
931,
7,
15,
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_values() {
let mut map = VecMap::new();
map.insert(1, 'a');
map.insert(2, 'b');
map.insert(3, 'c');
let values = map.values().map(|&v| v).collect::<Vec<char>>();
assert_eq!(values.len(), 3);
assert!(values.contains(&'a'));
assert!(v... | rust_cleaned_test_functions.jsonl/108791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9146,
368,
341,
286,
1077,
5206,
2415,
284,
11312,
2227,
486,
931,
543,
286,
2415,
7030,
7,
16,
11,
364,
64,
1157,
286,
2415,
7030,
7,
17,
11,
364,
65,
1157,
286,
2415,
7030,
7,
18,
11,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_constant_should_add_to_constants() {
let mut lsys: LSystem = LSystem::new("A".to_string());
lsys.add_constant('B');
assert!(lsys.constants.contains(&'B'));
} | rust_cleaned_test_functions.jsonl/101644 | {
"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,
2891,
34967,
43378,
2891,
2346,
55642,
368,
341,
286,
1077,
5206,
326,
7791,
25,
444,
2320,
284,
444,
2320,
486,
931,
445,
32,
3263,
983,
3904,
1423,
286,
326,
7791,
1364,
34967,
492,
33,
1157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_time_errors() {
run_test_parse_time_errors(
"26:01:02.345",
"invalid input syntax for time: HOUR must be [0, 23], got 26: \"26:01:02.345\"",
);
run_test_parse_time_errors(
"01:60:02.345",
"invalid input syntax for time: MINUTE must be [0, 59], go... | rust_cleaned_test_functions.jsonl/55837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 476
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
3009,
20196,
368,
341,
262,
1598,
4452,
21039,
3009,
20196,
1006,
286,
330,
17,
21,
25,
15,
16,
25,
15,
17,
13,
18,
19,
20,
756,
286,
330,
11808,
1946,
19482,
369,
882,
25,
95964,
196... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_addition_infinity() {
let summand1 = ExtendedBigInt::BigInt(BigInt::zero());
let summand2 = ExtendedBigInt::Infinity;
assert_eq!(summand1 + summand2, ExtendedBigInt::Infinity);
} | rust_cleaned_test_functions.jsonl/101398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
680,
1243,
19888,
368,
341,
286,
1077,
2629,
1928,
16,
284,
40565,
87474,
486,
87474,
5349,
343,
1072,
486,
14154,
1423,
286,
1077,
2629,
1928,
17,
284,
40565,
87474,
486,
45090,
280,
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 |
#[test]
fn test_shorten_url() {
let key = key();
let client = Client::new();
let res = client.shorten_url(&key, "https://google.com")
.expect("shorten err");
assert!(res.len() > 1);
assert!(res.split('/').collect::<Vec<_>>().len() > 2);
} | rust_cleaned_test_functions.jsonl/79500 | {
"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,
16673,
268,
2903,
368,
341,
262,
1077,
1376,
284,
1376,
543,
262,
1077,
2943,
284,
8423,
486,
931,
1428,
262,
1077,
592,
284,
2943,
26666,
268,
2903,
2099,
792,
11,
330,
2428,
1110,
17485,
905,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slot_data_iterator() {
// Construct the shreds
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Blocktree::open(&blocktree_path).unwrap();
let shreds_per_slot = 10;
let slots = vec![2, 4, 8, 12];
let all_shreds = make_chaining_slot_entr... | rust_cleaned_test_functions.jsonl/116894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27563,
1769,
13491,
368,
341,
286,
442,
18678,
279,
557,
53369,
198,
286,
1077,
2504,
9344,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
1077,
2504,
9344,
284,
8362,
9344,
486,
2508,
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_edges_to_tree_constructs() {
let edges: Vec<(&'static str, Option<&'static str>, ())> = vec![
("F", None, ()),
("B", Some("F"), ()),
("A", Some("B"), ()),
("D", Some("B"), ()),
("C", Some("D"), ()),
("E", Some("D"), ... | rust_cleaned_test_functions.jsonl/2841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 597
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28026,
2346,
11663,
64803,
82,
368,
341,
286,
1077,
12822,
25,
11312,
27,
2099,
6,
1978,
607,
11,
6959,
52244,
6,
1978,
607,
8066,
44481,
29,
284,
7486,
90515,
310,
3489,
37,
497,
2240,
11,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_auto_intersection_multi() {
let mut path = Path::builder();
path.begin(point(20.0, 20.0));
path.line_to(point(60.0, 20.0));
path.line_to(point(60.0, 60.0));
path.line_to(point(20.0, 60.0));
path.end(true);
path.begin(... | rust_cleaned_test_functions.jsonl/102403 | {
"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,
27740,
82558,
25133,
368,
341,
80719,
80719,
9401,
262,
1077,
5206,
1815,
284,
7933,
486,
17850,
543,
262,
1815,
6848,
20235,
7,
17,
15,
13,
15,
11,
220,
17,
15,
13,
15,
1106,
262,
1815,
10932... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hashmap_into_dict() {
Python::with_gil(|py| {
let mut map = HashMap::<i32, i32>::new();
map.insert(1, 1);
let py_map = map.into_py_dict(py);
assert_eq!(py_map.len(), 1);
assert_eq!(py_map.get_item(1).unwrap().extract::<i32>().... | rust_cleaned_test_functions.jsonl/7735 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2186,
45514,
5243,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
5206,
2415,
284,
10528,
27638,
72,
18,
17,
11,
600,
18,
17,
6831,
931,
543,
310,
2415,
703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_a_flow_mapping() {
let s = "
{
a simple key: a value, # Note that the KEY token is produced.
? a complex key: another value,
}
";
let mut p = Scanner::new(s.chars());
next!(p, StreamStart(..));
next!(p, FlowMappingStart);
next!(p, Key);
nex... | rust_cleaned_test_functions.jsonl/91006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
27441,
26930,
368,
341,
286,
1077,
274,
284,
6228,
515,
262,
264,
4285,
1376,
25,
264,
897,
11,
671,
7036,
429,
279,
12013,
3950,
374,
8947,
624,
262,
937,
264,
6351,
1376,
25,
2441,
897... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_change_spend_policy_no_internal() {
let change_spend_policy = ChangeSpendPolicy::ChangeForbidden;
let filtered = get_test_utxos()
.into_iter()
.filter(|u| change_spend_policy.is_satisfied_by(u))
.collect::<Vec<_>>();
assert_eq!(filtere... | rust_cleaned_test_functions.jsonl/5559 | {
"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,
15947,
643,
3740,
22773,
6536,
23472,
368,
341,
286,
1077,
2297,
643,
3740,
22773,
284,
10388,
50,
3740,
13825,
486,
4072,
69115,
280,
286,
1077,
18293,
284,
633,
4452,
60363,
87,
436,
741,
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_broadcast_addr() {
assert_eq!(
BroadcastAddr::new(Address::GlobalBroadcast),
Some(BroadcastAddr(Address::GlobalBroadcast))
);
assert_eq!(BroadcastAddr::new(Address::GlobalUnicast), None);
assert_eq!(
unsafe { BroadcastAddr::new_... | rust_cleaned_test_functions.jsonl/33646 | {
"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,
74923,
7387,
368,
341,
286,
2060,
10714,
33673,
310,
31965,
13986,
486,
931,
68492,
486,
11646,
43362,
1326,
310,
4329,
5349,
19105,
13986,
68492,
486,
11646,
43362,
1171,
286,
1439,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_list_dex_ids_empty_should_pass() {
let mut ext = ExtBuilder {
..Default::default()
}
.build();
ext.execute_with(|| {
assert_eq!(DEXModule::list_dex_ids(), Vec::<DEXId>::new());
})
} | rust_cleaned_test_functions.jsonl/110307 | {
"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,
2019,
814,
327,
8077,
15124,
43378,
15464,
368,
341,
262,
1077,
5206,
1303,
284,
9447,
3297,
341,
286,
5241,
3675,
486,
2258,
741,
262,
456,
262,
659,
5834,
543,
262,
1303,
7769,
6615,
79453,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merge_pessimistic_locks_with_concurrent_prewrite() {
let mut cluster = new_server_cluster(0, 2);
configure_for_merge(&mut cluster);
cluster.cfg.pessimistic_txn.pipelined = true;
cluster.cfg.pessimistic_txn.in_memory = true;
let pd_client = Arc::clone(&cluster.pd_client);
... | rust_cleaned_test_functions.jsonl/56296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
620,
66733,
4532,
9818,
82,
6615,
3382,
3231,
620,
52473,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
17,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_dh_key_exchange_random_shares() {
let (kg_party_one_first_message, kg_ec_key_pair_party1) = Party1FirstMessage::first();
let (kg_party_two_first_message, kg_ec_key_pair_party2) = Party2FirstMessage::first();
assert_eq!(
compute_pubkey(
&kg_ec_... | rust_cleaned_test_functions.jsonl/3400 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
71,
3097,
59212,
22644,
3712,
5403,
368,
341,
286,
1077,
320,
7351,
44021,
11667,
12978,
6462,
11,
20972,
36844,
3097,
14445,
44021,
16,
8,
284,
8554,
16,
5338,
2052,
486,
3896,
543,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_onig_multiple() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-Gog", "C\\K\\d+(?=D)", "sed", "s/./@/g"])
.write_stdin("ABC123DEF456\nEFG123ABC456DEF\n")
.assert()
.stdout("ABC@@@DEF456\nEFG123ABC@@... | rust_cleaned_test_functions.jsonl/7905 | {
"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,
4470,
343,
45233,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
2099,
1183,
12,
38,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_category_display() {
let ax = Category::new(vec!["A", "B", "C"]);
println!("{}", ax);
assert_eq!(format!("{}", ax), "{{A}, {B}, {C}, {overflow}}")
} | rust_cleaned_test_functions.jsonl/27586 | {
"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,
11847,
14825,
368,
341,
262,
1077,
3859,
284,
10054,
486,
931,
25592,
0,
1183,
32,
497,
330,
33,
497,
330,
34,
15049,
262,
13751,
79878,
3859,
317,
262,
2060,
10714,
10297,
2243,
79878,
3859,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_inner_outer_rect() {
let inner_rect: Rect<i32> = Rect::new(Point2D::new(20, 40), Size2D::new(80, 100));
let offsets = SideOffsets2D::new(20, 10, 10, 10);
let outer_rect = inner_rect.outer_rect(offsets);
assert_eq!(outer_rect.origin.x, 10);
assert_eq!(outer... | rust_cleaned_test_functions.jsonl/27464 | {
"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,
34345,
67258,
16979,
368,
341,
286,
1077,
9179,
16979,
25,
11920,
21897,
18,
17,
29,
284,
11920,
486,
931,
32737,
17,
35,
486,
931,
7,
17,
15,
11,
220,
19,
15,
701,
8478,
17,
35,
486,
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_format_java_version_zulu() {
let java_8 = String::from("OpenJDK 64-Bit Server VM (25.222-b10) for linux-amd64 JRE (Zulu 8.40.0.25-CA-linux64) (1.8.0_222-b10), built on Jul 11 2019 11:36:39 by \"zulu_re\" with gcc 4.4.7 20120313 (Red Hat 4.4.7-3)");
let java_11 = String::from("Ope... | rust_cleaned_test_functions.jsonl/104944 | {
"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,
8955,
77323,
9438,
6415,
24411,
368,
341,
286,
1077,
1642,
62,
23,
284,
923,
486,
1499,
445,
5002,
41,
18301,
220,
21,
19,
7671,
275,
8422,
17792,
320,
17,
20,
13,
17,
17,
17,
1455,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aim() {
assert_eq!(best_in_range_f64(-0.2, 0.0), 0.0, "Prefer zero");
assert_eq!(best_in_range_f64(-10_004.23, 3.14), 0.0, "Prefer zero");
assert_eq!(best_in_range_f64(-0.2, 100.0), 0.0, "Prefer zero");
assert_eq!(best_in_range_f64(0.2, 0.0), 0.0, "Prefer zero");
assert_eq!(b... | rust_cleaned_test_functions.jsonl/24700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
2640,
368,
341,
262,
2060,
10714,
10297,
15862,
1243,
9698,
761,
21,
19,
4080,
15,
13,
17,
11,
220,
15,
13,
15,
701,
220,
15,
13,
15,
11,
330,
4703,
802,
7168,
797,
262,
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... | 1 |
#[test]
fn test_solid_character_null_invert() {
let mut cmd = assert_cmd::Command::cargo_bin(env!("CARGO_PKG_NAME")).unwrap();
cmd.args(&["-sz", "-v", "-c", "1", "--", "tr", "[:alnum:]", "@"])
.write_stdin("ABC\nDEF\n\0GHI\nJKL")
.assert()
.stdout("A@@\n@@@\n\... | rust_cleaned_test_functions.jsonl/7918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
5192,
40988,
15162,
1243,
1621,
368,
341,
286,
1077,
5206,
5439,
284,
2060,
11684,
486,
4062,
486,
66715,
21816,
16978,
17223,
34,
7581,
46,
94126,
4708,
15197,
15454,
543,
286,
5439,
16365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_random() {
let ca = Int32Chunked::new_from_slice("a", &[1, 2, 3]);
assert_eq!(ca.get(0), Some(1));
assert_eq!(ca.get(1), Some(2));
assert_eq!(ca.get(2), Some(3));
let ca = Utf8Chunked::new_from_slice("a", &["a", "b", "c"]);
assert_eq!(ca.get(... | rust_cleaned_test_functions.jsonl/65328 | {
"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,
73261,
22644,
368,
341,
286,
1077,
2162,
284,
1333,
18,
17,
28304,
291,
486,
931,
5673,
26488,
445,
64,
497,
44590,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
2060,
10714,
10297,
924,
670,
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_hello() {
// Set up environment.
let mut ledger = InMemorySubstateStore::with_bootstrap();
let mut executor = TransactionExecutor::new(&mut ledger, false);
let key = executor.new_public_key();
let account = executor.new_account(key);
let package = executor.publish_package... | rust_cleaned_test_functions.jsonl/7853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96724,
368,
341,
262,
442,
2573,
705,
4573,
624,
262,
1077,
5206,
46933,
284,
758,
10642,
3136,
2454,
6093,
486,
4197,
88424,
543,
262,
1077,
5206,
31558,
284,
17869,
25255,
486,
931,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_1() {
let mut a = MF::<i64, 2, 2>::new_stack();
a[0][0] = 2i64;
a[1][1] = 4i64;
let b = 2i64 * a;
println!("{:?}", b);
let mut a = MF::<i64, 2, 2>::new_heap();
a[0][0] = 2i64;
a[1][1] = 4i64;
let b = 2i64 * a;
... | rust_cleaned_test_functions.jsonl/74976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
368,
972,
286,
1077,
5206,
264,
284,
38254,
27638,
72,
21,
19,
11,
220,
17,
11,
220,
17,
6831,
931,
15528,
1647,
286,
264,
58,
15,
1457,
15,
60,
284,
220,
17,
72,
21,
19,
463,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_in_and_out_of_workspace() {
let p = project("foo")
.file("ws/Baler.toml", r#"
[project]
name = "ws"
version = "0.1.0"
authors = []
[dependencies]
foo = { path = "../foo" }
[workspace]
me... | rust_cleaned_test_functions.jsonl/66867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 946
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
8378,
6068,
3575,
75560,
368,
341,
262,
1077,
281,
284,
2390,
445,
7975,
1138,
286,
659,
1192,
445,
8915,
16276,
13111,
73494,
75,
497,
435,
2,
698,
310,
508,
4987,
921,
310,
829,
284,
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_serialization() {
let id = NetworkId::Private("fooo".to_string());
let encoded = serde_yaml::to_string(&id).unwrap();
let decoded: NetworkId = serde_yaml::from_str(encoded.as_str()).unwrap();
assert_eq!(id, decoded);
let encoded = serde_yaml::to_vec(&id).u... | rust_cleaned_test_functions.jsonl/25068 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
2022,
368,
341,
286,
1077,
877,
284,
8141,
764,
486,
16787,
445,
824,
2624,
3263,
983,
3904,
1423,
286,
1077,
20498,
284,
61570,
64380,
486,
983,
3904,
2099,
307,
568,
15454,
543,
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_create_tx_invalid_rbf_sequence() {
let (wallet, _, _) = get_funded_wallet(get_test_wpkh());
let addr = wallet.get_new_address().unwrap();
wallet
.create_tx(
TxBuilder::with_recipients(vec![(addr.script_pubkey(), 25_000)])
.e... | rust_cleaned_test_functions.jsonl/11321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17805,
31433,
1710,
13233,
23735,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
10789,
284,
15085,
670,
5921,
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_successors() {
let mut powers_of_10 = successors(Some(1_u16), |n| n.checked_mul(10));
assert_eq!(powers_of_10.by_ref().collect::<Vec<_>>(), &[1, 10, 100, 1_000, 10_000]);
assert_eq!(powers_of_10.next(), None);
let mut empty = successors(None::<u32>, |_| unimplemented!());
as... | rust_cleaned_test_functions.jsonl/54172 | {
"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,
18632,
1087,
368,
341,
262,
1077,
5206,
13430,
3575,
62,
16,
15,
284,
74896,
65405,
7,
16,
7300,
16,
21,
701,
760,
77,
91,
308,
29101,
24944,
7,
16,
15,
1106,
262,
2060,
10714,
10297,
77304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_applicable_rules() -> TestResult {
let mut p = Polar::new();
qnull(&mut p, "f()");
p.load_str("f(_);")?;
qnull(&mut p, "f()");
Ok(())
} | rust_cleaned_test_functions.jsonl/97615 | {
"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,
6536,
8191,
46114,
21407,
368,
1464,
3393,
2077,
341,
262,
1077,
5206,
281,
284,
55896,
486,
931,
543,
262,
2804,
2921,
2099,
6984,
281,
11,
330,
69,
45961,
262,
281,
5104,
2895,
445,
69,
2490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_qdate_is_valid() {
let valid_qdate = QDate::from_y_m_d(2019, 10, 26);
assert!(valid_qdate.is_valid());
let invalid_qdate = QDate::from_y_m_d(-1, -1, -1);
assert!(!invalid_qdate.is_valid());
} | rust_cleaned_test_functions.jsonl/45518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
1028,
6892,
8337,
368,
341,
262,
1077,
2697,
8976,
1028,
284,
1207,
1916,
486,
1499,
4178,
717,
814,
7,
17,
15,
16,
24,
11,
220,
16,
15,
11,
220,
17,
21,
317,
262,
2060,
10297,
1891,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_splitator_inclusive() {
let xs = &[1, 2, 3, 4, 5];
let splits: &[&[_]] = &[&[1, 2], &[3, 4], &[5]];
assert_eq!(xs.split_inclusive(|x| *x % 2 == 0).collect::<Vec<_>>(), splits);
let splits: &[&[_]] = &[&[1], &[2, 3, 4, 5]];
assert_eq!(xs.split_inclusive(|x| *x == 1).collect::... | rust_cleaned_test_functions.jsonl/80786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
850,
1243,
8336,
368,
341,
262,
1077,
11943,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
4821,
262,
1077,
40467,
25,
44590,
5,
13496,
5053,
284,
44590,
5,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compress_incomplete_slots() {
let mut incomplete_slots: BTreeSet<Slot> = BTreeSet::new();
assert_eq!(
EpochIncompleteSlots::default(),
ClusterInfo::compress_incomplete_slots(&incomplete_slots)
);
incomplete_slots.insert(100);
let ... | rust_cleaned_test_functions.jsonl/12828 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87845,
1243,
14737,
54161,
368,
341,
286,
1077,
5206,
32143,
54161,
25,
425,
6533,
1649,
27,
19877,
29,
284,
425,
6533,
1649,
486,
931,
1428,
286,
2060,
10714,
33673,
310,
87379,
96698,
51647,
486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_recursion_level() {
assert_eq!(
get_recursion_level(&serde_json::from_str("[]").unwrap()),
Ok(1)
);
assert_eq!(
get_recursion_level(&serde_json::from_str("[[]]").unwrap()),
Ok(2)
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/78274 | {
"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,
3062,
7080,
34280,
8274,
368,
341,
286,
2060,
10714,
33673,
310,
633,
7080,
34280,
8274,
2099,
47024,
9455,
486,
1499,
2895,
445,
1294,
1827,
15454,
14702,
310,
7622,
7,
16,
340,
286,
1439,
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_slice() {
let s = rvec![1, 2, 3, 4, 5];
assert_eq!(s.slice(..), rslice![1, 2, 3, 4, 5]);
assert_eq!(s.slice(..2), rslice![1, 2]);
assert_eq!(s.slice(1..2), rslice![2]);
assert_eq!(s.slice(3..), rslice![4, 5]);
} | rust_cleaned_test_functions.jsonl/27986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
286,
1077,
274,
284,
435,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
4821,
286,
2060,
10714,
10297,
82,
14530,
56422,
701,
10036,
4754,
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_load_from_path() {
// Given
let trained_engine_dir = Path::new("data")
.join("tests")
.join("models")
.join("nlu_engine");
let classifier_path = trained_engine_dir
.join("probabilistic_intent_parser")
.join("int... | rust_cleaned_test_functions.jsonl/76919 | {
"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,
12411,
5673,
2638,
368,
341,
286,
442,
16246,
198,
286,
1077,
16176,
24823,
4334,
284,
7933,
486,
931,
445,
691,
1138,
310,
659,
5987,
445,
23841,
1138,
310,
659,
5987,
445,
6507,
1138,
310,
659... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tiledinputpart_read_tiles_failure_invalid_level_and_frame_buffer() {
let input = MultiPartInputFile::new(&*SRC_IMAGE_PATH, 0, true).unwrap();
let mut tiled_input_part = super::TiledInputPart::new(&input, 0);
unsafe {
tiled_input_part
.read_tile... | rust_cleaned_test_functions.jsonl/59316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
2181,
1355,
4480,
6443,
60857,
43618,
31433,
8274,
8378,
8929,
7776,
368,
341,
286,
1077,
1946,
284,
17439,
5800,
2505,
1703,
486,
931,
2099,
9,
56017,
19121,
7944,
11,
220,
15,
11,
830,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sandwiched_double_wildcard() {
let file = build_ignore("a/**/b");
assert!(file.is_excluded(&base_dir().join("a").join("b")));
assert!(file.is_excluded(&base_dir().join("a").join("x").join("b")));
assert!(file.is_excluded(&base_dir().join("a").join("x").join("y").... | rust_cleaned_test_functions.jsonl/9290 | {
"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,
643,
437,
16889,
291,
24598,
1670,
695,
4951,
368,
341,
286,
1077,
1034,
284,
1936,
58493,
445,
64,
3663,
14,
65,
3071,
286,
2060,
10297,
1192,
2079,
2702,
10181,
2099,
3152,
4334,
1005,
5987,
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_generated_cpp_ref_classes() {
let gen_code = parse_code(
"test_generated_cpp_ref_classes",
r#"
foreigner_class!(class Foo {
self_type Foo;
constructor Foo::new(_: i32) -> Foo;
method Foo::eq(&self, _: &Foo) -> bool;
method Foo::f(&self, _: i32, _: i32, _: Stri... | rust_cleaned_test_functions.jsonl/71643 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67313,
59686,
7793,
16833,
368,
341,
262,
1077,
4081,
4136,
284,
4715,
4136,
1006,
286,
330,
1944,
67313,
59686,
7793,
16833,
756,
286,
435,
2,
698,
28443,
261,
4790,
10297,
1040,
33428,
341,
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_error_proof_already_exist() {
new_test_ext().execute_with(|| {
let claim = vec![1];
// create
assert_ok!(PoeModule::create_claim(Origin::signed(1), claim.clone()));
// exist
assert_noop!(
PoeModule::create_claim(Origin::signed(1), claim.clone()),
Error::<Test>::ProofAlreadyExi... | rust_cleaned_test_functions.jsonl/12047 | {
"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,
4096,
86757,
80772,
35906,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
3717,
284,
7486,
20703,
16,
4821,
197,
197,
322,
1855,
198,
197,
6948,
19817,
10297,
47,
4644,
333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tx_return_data() {
solana_logger::setup();
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(
1_000_000_000_000_000,
&Pubkey::new_unique(),
bootstrap_valid... | rust_cleaned_test_functions.jsonl/28991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1807
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
12511,
1769,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
1632... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_comp() {
let (comp, count) = Comp::parse("0").unwrap();
assert_eq!(comp, Comp::ZERO);
assert_eq!(count, "");
let (comp, count) = Comp::parse("M+1").unwrap();
assert_eq!(comp, Comp::M_PLUS_ONE);
assert_eq!(count, "");
let (comp, coun... | rust_cleaned_test_functions.jsonl/134385 | {
"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,
21039,
18177,
368,
341,
286,
1077,
320,
5689,
11,
1760,
8,
284,
13317,
486,
6400,
445,
15,
1827,
15454,
543,
286,
2060,
10714,
10297,
5689,
11,
13317,
486,
73956,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pessimistic_lock() {
let (_cluster, client, ctx) = must_new_cluster_and_kv_client();
let (k, v) = (b"key".to_vec(), b"value".to_vec());
// Prewrite
let mut mutation = Mutation::default();
mutation.set_op(Op::Put);
mutation.set_key(k.clone());
mutation.set_value(v.clo... | rust_cleaned_test_functions.jsonl/61697 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 957
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
66733,
4532,
9818,
368,
341,
262,
1077,
5453,
18855,
11,
2943,
11,
5635,
8,
284,
1969,
5921,
28441,
8378,
97066,
8179,
543,
262,
1077,
320,
74,
11,
348,
8,
284,
320,
65,
1,
792,
3263,
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... | 5 |
#[test]
fn test_proc_macro_rpc_works() {
let tt = fixture_token_tree();
let task = ExpandMacro {
macro_body: FlatTree::new(&tt),
macro_name: Default::default(),
attributes: None,
lib: std::env::current_dir().unwrap(),
env: Default::defa... | rust_cleaned_test_functions.jsonl/121551 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24436,
58810,
60799,
11498,
82,
368,
341,
286,
1077,
17853,
284,
12507,
6458,
11663,
543,
286,
1077,
3383,
284,
50141,
60175,
341,
310,
18072,
14114,
25,
23577,
6533,
486,
931,
2099,
5566,
1326,
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_serialize_string() {
let the_string = "There goes the baker with his tray, like always";
let serialized = serialize(&the_string).unwrap();
let deserialized: &str = deserialize(&serialized).unwrap();
assert_eq!(deserialized, the_string);
} | rust_cleaned_test_functions.jsonl/75003 | {
"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,
88686,
3904,
368,
341,
286,
1077,
279,
3904,
284,
330,
3862,
5780,
279,
75828,
448,
806,
34688,
11,
1075,
2677,
876,
286,
1077,
32916,
284,
24235,
2099,
1782,
3904,
568,
15454,
543,
286,
1077,
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_encode() -> Result<()> {
assert_eq!(encode("some_project:utils"), "some_project_colon_utils");
assert_eq!(&encode("_quotedot_"), "_quotequote_dot_");
Ok(())
} | rust_cleaned_test_functions.jsonl/83021 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
368,
1464,
5714,
71698,
341,
286,
2060,
10714,
10297,
6180,
445,
14689,
16352,
25,
6031,
3975,
330,
14689,
16352,
10211,
263,
17309,
797,
286,
2060,
10714,
0,
2099,
6180,
16975,
63725,
354,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_votes_in_range() {
// Create some voters at genesis
let stake_per_validator = 100;
let (vote_tracker, _, validator_voting_keypairs, subscriptions) = setup();
let (votes_sender, votes_receiver) = unbounded();
let (verified_vote_sender, _verified_vote_receiv... | rust_cleaned_test_functions.jsonl/32275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65116,
1243,
9698,
368,
341,
286,
442,
4230,
1045,
11707,
518,
59366,
198,
286,
1077,
18279,
5678,
64959,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
29358,
50264,
11,
8358,
22935,
2273,
11519,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.