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_borrow() {
// make sure these compile -- using the Borrow trait
{
let mut map = BTreeMap::new();
map.insert("0".to_string(), 1);
assert_eq!(map["0"], 1);
}
{
let mut map = BTreeMap::new();
map.insert(Box::new(0), 1);
assert_eq!(map... | rust_cleaned_test_functions.jsonl/49394 | {
"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,
880,
7768,
368,
341,
262,
442,
1281,
2704,
1493,
19192,
1177,
1667,
279,
77947,
17567,
198,
262,
341,
286,
1077,
5206,
2415,
284,
425,
6533,
2227,
486,
931,
543,
286,
2415,
7030,
445,
15,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_angle_x_rotate_point1() {
let rotation = Rotation3::from_angle_x(Degrees(90_f64));
let point = Point3::new(0_f64, 1_f64, 0_f64);
let expected = Point3::new(0_f64, 0_f64, 1_f64);
let result = rotation.rotate_point(&point);
assert!(relative_eq!(result,... | rust_cleaned_test_functions.jsonl/70484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
3212,
60834,
6085,
16,
368,
341,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
3212,
5432,
791,
7858,
7,
24,
15,
761,
21,
19,
1106,
286,
1077,
1459,
284,
5126,
18,
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_date_time() {
let (val, remaining) = date_time()
.parse("2015-08-02T18:54:42+02:30")
.expect("cannot parse date");
assert_eq!(val, "2015-08-02T18:54:42+02:30");
assert_eq!(remaining, "");
assert!(date_time().parse("2015-08-02T18:54:42+02").... | rust_cleaned_test_functions.jsonl/64402 | {
"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,
4164,
3009,
368,
341,
286,
1077,
320,
831,
11,
9664,
8,
284,
2400,
3009,
741,
310,
659,
6400,
445,
17,
15,
16,
20,
12,
15,
23,
12,
15,
17,
51,
16,
23,
25,
20,
19,
25,
19,
17,
10,
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_statns_to_nslist() {
let mut listns: Vec<NsCtx> = Vec::<NsCtx>::new();
let test_nsid = 4000000000u64;
let test_pid = 12345;
let test_ppid = 1234;
listns.push(NsCtx {
nsid: test_nsid,
nstype: Namespace::Mount... | rust_cleaned_test_functions.jsonl/102375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 620
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16271,
4412,
2346,
34728,
1607,
368,
341,
286,
1077,
5206,
1140,
4412,
25,
11312,
29198,
82,
23684,
29,
284,
11312,
27638,
47360,
23684,
6831,
931,
543,
286,
1077,
1273,
1089,
21027,
284,
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_string_ext() {
let mut s = String::new();
let t = "αβγabc";
StringExt::insert_str(&mut s, 0, t);
assert_eq!(s, t);
StringExt::insert_str(&mut s, 2, "x");
assert_eq!(s, "αxβγabc");
} | rust_cleaned_test_functions.jsonl/4259 | {
"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,
3904,
9927,
368,
341,
262,
1077,
5206,
274,
284,
923,
486,
931,
543,
262,
1077,
259,
284,
330,
18945,
51255,
59374,
13683,
876,
262,
923,
6756,
486,
4208,
2895,
2099,
6984,
274,
11,
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... | 1 |
#[test]
fn test_add_datetime_and_duration() {
let mut ctx = EvalContext::default();
let cases = vec![
// null cases
(None, None, None),
(None, Some("11:30:45.123456"), None),
(Some("2019-01-01 01:00:00"), None, None),
// normal cases
... | rust_cleaned_test_functions.jsonl/36244 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
28943,
8378,
25454,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
5048,
284,
7486,
90515,
310,
442,
845,
5048,
198,
310,
320,
4064,
11,
2240,
11,
2240,
1326... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parser_errors() {
let p = Commands::default().line_parser();
let (err, _) = p
.parse(":map <ctrl> :tool sampler {:tool/prev")
.unwrap_err();
assert_eq!(err.to_string(), "unclosed '{' delimiter".to_string());
let (err, _) = p.parse(":map <... | rust_cleaned_test_functions.jsonl/95937 | {
"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,
18517,
20196,
368,
341,
286,
1077,
281,
284,
47183,
486,
2258,
1005,
1056,
18517,
1428,
286,
1077,
320,
615,
11,
27439,
284,
281,
198,
310,
659,
6400,
18893,
2186,
366,
11933,
29,
549,
14172,
41... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_uniform_good_limits_equal_int() {
let mut rng = crate::test::rng(804);
let dist = Uniform::new_inclusive(10, 10);
for _ in 0..20 {
assert_eq!(rng.sample(dist), 10);
}
} | rust_cleaned_test_functions.jsonl/42154 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45066,
44781,
31820,
11478,
4042,
368,
341,
286,
1077,
5206,
28422,
284,
17717,
486,
1944,
486,
69890,
7,
23,
15,
19,
317,
286,
1077,
1582,
284,
47889,
486,
931,
1243,
8336,
7,
16,
15,
11,
220... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_clean_dropped_unrooted_unfrozen_banks() {
solana_logger::setup();
do_test_clean_dropped_unrooted_banks(FreezeBank1::No);
} | rust_cleaned_test_functions.jsonl/2682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19573,
814,
41716,
4907,
2888,
291,
4907,
69,
42240,
880,
4039,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
653,
4452,
19573,
814,
41716,
4907,
2888,
291,
880,
4039,
7832,
27633,
25828... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ceil_int_to_int() {
let cases = vec![
(1, 1),
(2, 2),
(666, 666),
(-3, -3),
(-233, -233),
(i64::MAX, i64::MAX),
(i64::MIN, i64::MIN),
];
for (expected, input) in cases {
let e... | rust_cleaned_test_functions.jsonl/9479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
22058,
4042,
2346,
4042,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
16,
11,
220,
16,
1326,
310,
320,
17,
11,
220,
17,
1326,
310,
320,
21,
21,
21,
11,
220,
21,
21,
21,
1326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_casting_implicit_types() {
let spec = "input x: UInt8\noutput y: Float32 := cast(x)";
assert_eq!(0, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110713 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
287,
62,
30940,
9763,
368,
341,
286,
1077,
1398,
284,
330,
1355,
856,
25,
22275,
23,
1699,
3006,
379,
25,
13001,
18,
17,
1669,
6311,
2075,
24023,
286,
2060,
10714,
10297,
15,
11,
1629,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_find_subcmd_invalid_inpath_validation() {
let rw = Recurse::Find {
extension: None,
find: "test".to_string(),
hidden: false,
inpath: PathBuf::from("path/to/bogus"),
mindepth: None,
maxdepth: None,
symlink... | rust_cleaned_test_functions.jsonl/111970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5228,
8710,
31433,
1243,
2343,
19416,
368,
341,
286,
1077,
25991,
284,
4067,
29285,
486,
9885,
341,
310,
8894,
25,
2240,
345,
310,
1477,
25,
330,
1944,
3263,
983,
3904,
3148,
310,
8177,
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_level_triggered() {
let poll = Poll::new().unwrap();
let mut events = Events::with_capacity(1024);
let mut timer = Timer::default();
poll.register(&timer, Token(0), Ready::readable(), PollOpt::level())
.unwrap();
timer.set_timeout(Duration::from_millis(400), "hello"... | rust_cleaned_test_functions.jsonl/95275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8274,
78678,
368,
341,
262,
1077,
7085,
284,
24385,
486,
931,
1005,
15454,
543,
262,
1077,
5206,
4357,
284,
17627,
486,
4197,
35603,
7,
16,
15,
17,
19,
317,
262,
1077,
5206,
9021,
284,
17759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rate_limiter_debug() {
let l = RateLimiter::new(1, 2, 3, 4, 5, 6).unwrap();
assert_eq!(
format!("{:?}", l),
format!(
"RateLimiter {{ bandwidth: {:?}, ops: {:?} }}",
l.bandwidth(),
l.ops()
),
... | rust_cleaned_test_functions.jsonl/15894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9246,
907,
17700,
15446,
368,
341,
286,
1077,
326,
284,
19775,
43,
17700,
486,
931,
7,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
568,
15454,
543,
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_find() {
let v: &[int] = &[1, 3, 9, 27, 103, 14, 11];
assert_eq!(*v.iter().find(|x| *x & 1 == 0).unwrap(), 14);
assert_eq!(*v.iter().find(|x| *x % 3 == 0).unwrap(), 3);
assert!(v.iter().find(|x| *x % 12 == 0).is_none());
} | rust_cleaned_test_functions.jsonl/1015 | {
"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,
21814,
368,
341,
286,
1077,
348,
25,
44590,
396,
60,
284,
44590,
16,
11,
220,
18,
11,
220,
24,
11,
220,
17,
22,
11,
220,
16,
15,
18,
11,
220,
16,
19,
11,
220,
16,
16,
935,
286,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_minimal_solution() {
let sol8 = MinimalSolution::new(8);
assert_eq!(8, sol8.size());
assert_eq!("MinimalSolution", sol8.name());
let sol9 = MinimalSolution::new(9);
assert_eq!(9, sol9.size());
let sol23 = MinimalSolution::new(23);
assert_eq... | rust_cleaned_test_functions.jsonl/132691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
2861,
50274,
368,
341,
286,
1077,
2048,
23,
284,
75112,
36842,
486,
931,
7,
23,
317,
286,
2060,
10714,
10297,
23,
11,
2048,
23,
2486,
1423,
286,
2060,
10714,
17223,
88328,
36842,
497,
2048... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_setup() {
KeysManagerTest::new(ALICE)
.assert_keys(vec![(ALICE, Weight::new(1))])
.assert_deployment_threshold(1)
.assert_key_management_threshold(1);
} | rust_cleaned_test_functions.jsonl/96208 | {
"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,
6137,
21363,
368,
341,
262,
24133,
2043,
2271,
486,
931,
46232,
5487,
340,
286,
659,
2207,
12631,
25592,
0,
9697,
969,
5487,
11,
16516,
486,
931,
7,
16,
593,
2546,
286,
659,
2207,
2259,
52799,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_next_with_f64() {
let mut stoch = SlowStochastic::new(3, 2).unwrap();
assert_eq!(stoch.next(10.0), 50.0);
assert_eq!(stoch.next(50.0).round(), 83.0);
assert_eq!(stoch.next(50.0).round(), 94.0);
assert_eq!(stoch.next(30.0).round(), 31.0);
assert_eq!... | rust_cleaned_test_functions.jsonl/72384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
6615,
761,
21,
19,
368,
341,
286,
1077,
5206,
357,
4953,
284,
38147,
623,
65954,
486,
931,
7,
18,
11,
220,
17,
568,
15454,
543,
286,
2060,
10714,
10297,
267,
4953,
4529,
7,
16,
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_probe_advanced() {
let (mut testkit, api) = init_testkit();
let tx = {
let (pubkey, key) = crypto::gen_keypair();
TxIncrement::new(&pubkey, 6, &key)
};
let other_tx = {
let (pubkey, key) = crypto::gen_keypair();
TxIncrement::new(&pubkey, 10, &key)... | rust_cleaned_test_functions.jsonl/86871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 977
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49108,
83843,
368,
341,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
1428,
262,
1077,
9854,
284,
341,
286,
1077,
320,
9585,
792,
11,
1376,
8,
284,
19028,
486,
4370,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lib_with_a_build_command() {
let p = project()
.file(
"Cargo.toml",
r#"
[project]
name = "foo"
version = "0.5.0"
authors = []
build = "build.rs"
"#,
)
.file(
"src... | rust_cleaned_test_functions.jsonl/43478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 706
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
16142,
6615,
4306,
20801,
10811,
368,
341,
262,
1077,
281,
284,
2390,
741,
286,
659,
1192,
1006,
310,
330,
98228,
73494,
75,
756,
310,
435,
2,
698,
310,
508,
4987,
921,
310,
829,
284,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_col_iter() {
let mat = m!(1, 2; 3, 4; 5, 6);
let mut iter = mat.col_iter();
let col1 = iter.next();
assert_eq!(col1, Some(m![1; 3; 5])); // column format
let col2 = iter.next();
assert_eq!(col2, Some(m![2; 4; 6]));
assert_eq!(iter.next()... | rust_cleaned_test_functions.jsonl/61505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10211,
11723,
368,
341,
286,
1077,
5517,
284,
296,
10297,
16,
11,
220,
17,
26,
220,
18,
11,
220,
19,
26,
220,
20,
11,
220,
21,
626,
286,
1077,
5206,
5367,
284,
5517,
13414,
11723,
1428,
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_peerset_incoming() {
let bootnode = PeerId::random();
let incoming = PeerId::random();
let incoming2 = PeerId::random();
let incoming3 = PeerId::random();
let ii = IncomingIndex(1);
let ii2 = IncomingIndex(2);
let ii3 = IncomingIndex(3);
... | rust_cleaned_test_functions.jsonl/50343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 705
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36367,
44146,
1243,
4959,
368,
341,
286,
1077,
10459,
3509,
284,
45147,
764,
486,
11463,
543,
286,
1077,
19393,
284,
45147,
764,
486,
11463,
543,
286,
1077,
19393,
17,
284,
45147,
764,
486,
11463,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_job_result() {
fn fn_ok(_: String, _: Vec<String>) -> Result<String, Box<Error>> {
sleep(Duration::from_millis(1000));
Ok("ok".to_string())
}
let queue = Queue::new("redis://localhost/", "test-result");
queue.drop().unwrap();
let uuid = queue.enqueue(vec![],... | rust_cleaned_test_functions.jsonl/124823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20298,
5287,
368,
341,
262,
5168,
5168,
19817,
73834,
923,
11,
58536,
11312,
3464,
9231,
1464,
5714,
3464,
11,
8261,
27,
1454,
2452,
341,
286,
6084,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_integer_literal() {
fn lit(
base: IntegerBase,
is_unterminated: bool,
has_invalid_characters: bool,
has_duplicate_underscore: bool,
) -> Token {
Token::IntegerLiteral {
base,
is_unterminat... | rust_cleaned_test_functions.jsonl/80518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 648
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
34100,
368,
341,
286,
5168,
13020,
1006,
310,
2331,
25,
4440,
3978,
345,
310,
374,
4907,
68659,
25,
1807,
345,
310,
702,
31433,
79060,
25,
1807,
345,
310,
702,
70434,
62,
53933,
25,
1807,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_const_witness() {
// Test that all of the addresses that we initialize at compile time
// using `new_unchecked` constructors are valid for their witness types.
assert!(Ipv4::LOOPBACK_ADDRESS.0.is_specified());
assert!(Ipv6::LOOPBACK_ADDRESS.0.is_specified());
... | rust_cleaned_test_functions.jsonl/31867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13610,
1670,
8091,
368,
341,
286,
442,
3393,
429,
678,
315,
279,
14230,
429,
582,
9468,
518,
19192,
882,
198,
286,
442,
1667,
1565,
931,
4907,
7549,
63,
54717,
525,
2697,
369,
862,
11298,
4494,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_symbolfile_from_lf_file() {
test_symbolfile_from_file(
"testdata/symbols/test_app.pdb/5A9832E5287241C1838ED98914E9B7FF1/test_app.sym",
);
} | rust_cleaned_test_functions.jsonl/54412 | {
"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,
21179,
1192,
5673,
907,
69,
2458,
368,
341,
286,
1273,
21179,
1192,
5673,
2458,
1006,
310,
330,
92425,
2687,
11786,
12697,
8191,
556,
1999,
14,
20,
32,
24,
23,
18,
17,
36,
20,
17,
23,
22,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_trailing_tab() {
new_ucmd!()
.arg("with-trailing-tab.txt")
.succeeds()
.stdout_contains("with tabs=> ")
.stdout_does_not_contain("\t");
} | rust_cleaned_test_functions.jsonl/121786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
3547,
14277,
17344,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
445,
4197,
10188,
14277,
27411,
3909,
1138,
286,
659,
82,
29264,
82,
741,
286,
659,
36358,
63598,
445,
4197,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sample_gif() {
let input = vec![
71, 73, 70, 56, 57, 97, 10, 0, 10, 0, 145, 0, 0, 255, 255, 255, 255, 0, 0, 0, 0, 255,
0, 0, 0, 33, 249, 4, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 10, 0, 10, 0, 0, 2, 22, 140, 45,
153, 135, 42, 28, 220, 51, 160, 2, 117, 236, 149... | rust_cleaned_test_functions.jsonl/98616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2492
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
1889,
333,
368,
341,
286,
1077,
1946,
284,
7486,
90515,
310,
220,
22,
16,
11,
220,
22,
18,
11,
220,
22,
15,
11,
220,
20,
21,
11,
220,
20,
22,
11,
220,
24,
22,
11,
220,
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... | 2 |
#[test]
fn test_insert_phi_nodes_semi_pruned() {
// Given:
// block 0
// v
// +-------> block 1
// | v v
// | block 2 block 3 +---+
// | x = 0 | |
... | rust_cleaned_test_functions.jsonl/13501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
42009,
14896,
3453,
8155,
5294,
48883,
368,
341,
286,
442,
16246,
510,
286,
442,
1843,
2504,
220,
15,
8945,
286,
442,
1797,
348,
198,
286,
442,
488,
16565,
405,
2504,
220,
16,
8945,
16885... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_too_few_tokens() {
let err = Model::train("data/few_tokens.ffm").unwrap_err();
assert_eq!(err.to_string(), "FFM error (line: 1, node: 1, token: 3): missing token".to_string());
} | rust_cleaned_test_functions.jsonl/25229 | {
"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,
2346,
78,
761,
365,
28838,
368,
341,
286,
1077,
1848,
284,
4903,
486,
10397,
445,
691,
6663,
365,
28838,
83885,
76,
1827,
15454,
9266,
543,
286,
2060,
10714,
10297,
615,
2389,
3904,
1507,
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... | 1 |
#[test]
fn test_append() {
let mut chain = Chain::new();
// Transactions
let (t0, t0_s) = Transaction::debug_make_register(format!("SN1337BIKE"));
let (t1, _) = Transaction::debug_make_register(format!("MYCOOLBIKE"));
let (t2, _) = Transaction::debug_make_transfer(&t0, &... | rust_cleaned_test_functions.jsonl/102216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
368,
341,
286,
1077,
5206,
8781,
284,
28525,
486,
931,
1428,
286,
442,
55285,
198,
286,
1077,
320,
83,
15,
11,
259,
15,
643,
8,
284,
17869,
486,
8349,
28230,
14000,
20698,
17223,
18966,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cli_get_config_empty_json() {
let json = r#"{}"#;
let mut tmpfile = NamedTempFile::new().expect("Failed to create tmp file");
writeln!(tmpfile, "{}", json).expect("Failed to write to tmp file");
// should use the default values
let cli = Cli {
... | rust_cleaned_test_functions.jsonl/115806 | {
"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,
47147,
3062,
5332,
15124,
9455,
368,
341,
286,
1077,
2951,
284,
435,
55543,
6257,
57676,
401,
286,
1077,
5206,
4174,
1192,
284,
40459,
12151,
1703,
486,
931,
1005,
17119,
445,
9408,
311,
1855,
417... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve() {
let mut m = PathMap::new();
let id1 = m.get_or_insert(PathBuf::from("/foo"), Root::Workspace);
let id2 = m.get_or_insert(PathBuf::from("/foo/bar.rs"), Root::Workspace);
assert_eq!(
m.resolve(id1, &RelativePath::new("bar.rs")),
S... | rust_cleaned_test_functions.jsonl/113488 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
368,
341,
286,
1077,
5206,
296,
284,
7933,
2227,
486,
931,
543,
286,
1077,
877,
16,
284,
296,
670,
8734,
17678,
33030,
15064,
486,
1499,
4283,
7975,
3975,
18854,
486,
45981,
317,
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_cmd_epoch_checker() {
use engine_test::kv::KvTestSnapshot;
use std::sync::mpsc;
fn new_admin_request(cmd_type: AdminCmdType) -> RaftCmdRequest {
let mut request = RaftCmdRequest::default();
request.mut_admin_request().set_cmd_type(cmd_type);
... | rust_cleaned_test_functions.jsonl/10523 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11684,
20682,
62715,
368,
341,
286,
990,
4712,
4452,
486,
43408,
486,
42,
85,
2271,
15009,
280,
286,
990,
1460,
486,
12996,
486,
1307,
2388,
280,
286,
5168,
501,
12207,
7893,
14160,
1819,
25,
75... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_negate() {
let s = Secp256k1::new();
let (sk1, _) = s.generate_keypair(&mut thread_rng()).unwrap();
let mut sk2: SecretKey = sk1.clone();
sk2.neg_assign().unwrap();
assert!(sk2.add_assign(&sk1).is_err());
let (sk1, _) = s.generate_keypair(&mut th... | rust_cleaned_test_functions.jsonl/41408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
349,
368,
341,
286,
1077,
274,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
1428,
286,
1077,
320,
4886,
16,
11,
27439,
284,
274,
22019,
3097,
12670,
2099,
6984,
4516,
66849,
6011,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize_2() {
let line = r#"{"type":"match","data":{"path":{"text":"src/handlers/submodule.rs"},"lines":{"text":" .paint(minus_commit.chars().take(7).collect::<String>()),\n"},"line_number":41,"absolute_offset":1430,"submatches":[{"match":{"text":"("},"start":3... | rust_cleaned_test_functions.jsonl/70466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2043
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
62,
17,
368,
341,
286,
1077,
1555,
284,
435,
55543,
4913,
1313,
3252,
6347,
2198,
691,
22317,
2343,
22317,
1318,
3252,
3548,
7530,
437,
9254,
37885,
4352,
25638,
58640,
7969,
22317,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partition_wise_sampling() -> Result<()> {
let sc = CONTEXT.clone();
{
let rdd = sc.clone().parallelize(vec![1, 2, 3, 4, 5], 6);
let result = rdd.take_sample(false, 6, Some(123))?;
assert!(result.len() == 5);
// guaranteed with this seed:
asser... | rust_cleaned_test_functions.jsonl/27946 | {
"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,
43840,
1670,
1064,
77716,
368,
1464,
5714,
71698,
341,
262,
1077,
1136,
284,
87336,
15997,
543,
1066,
262,
341,
286,
1077,
435,
631,
284,
1136,
15997,
1005,
46103,
551,
25592,
20703,
16,
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... | 4 |
#[test]
fn test_default_value_int() {
let msg = r#"message Sample {
optional int32 x = 1 [default = 17];
}"#;
let mess = parse_opt(msg, |p| p.next_message_opt());
assert_eq!("default", mess.fields[0].options[0].name);
assert_eq!("17", mess.fields[0].options[0... | rust_cleaned_test_functions.jsonl/70459 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
3142,
4042,
368,
341,
286,
1077,
3750,
284,
435,
55543,
1994,
19143,
341,
310,
10101,
526,
18,
17,
856,
284,
220,
16,
508,
2258,
284,
220,
16,
22,
935,
286,
335,
57676,
401,
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_next() {
let mut min = Minimum::new(3).unwrap();
assert_eq!(min.next(4.0), 4.0);
assert_eq!(min.next(1.2), 1.2);
assert_eq!(min.next(5.0), 1.2);
assert_eq!(min.next(3.0), 1.2);
assert_eq!(min.next(4.0), 3.0);
assert_eq!(min.next(6.0), 3.0)... | rust_cleaned_test_functions.jsonl/18118 | {
"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,
11257,
368,
341,
286,
1077,
5206,
1308,
284,
30925,
486,
931,
7,
18,
568,
15454,
1428,
286,
2060,
10714,
10297,
1065,
4529,
7,
19,
13,
15,
701,
220,
19,
13,
15,
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 |
#[test]
fn test_cifar_10_loader_rs() {
let path = get_cifar_10();
let cifar_dataset = super::CifarDataset::new(path).unwrap();
let rng = &mut rand::thread_rng();
test_load_data(&cifar_dataset);
test_output(&cifar_dataset, rng).unwrap();
} | rust_cleaned_test_functions.jsonl/133813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
92927,
62,
16,
15,
22139,
47115,
368,
341,
262,
1077,
1815,
284,
633,
666,
92927,
62,
16,
15,
543,
262,
1077,
65472,
277,
18999,
284,
2256,
486,
34,
92927,
33363,
486,
931,
5581,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aoc11() {
let sample_input = "L.LL.LL.LL\nLLLLLLL.LL\nL.L.L..L..\nLLLL.LL.LL\nL.LL.LL.LL\nL.LLLLL.LL\n..L.L.....\nLLLLLLLLLL\nL.LLLLLL.L\nL.LLLLL.LL";
let sample_res = parse_data(&sample_input).unwrap();
assert_eq!(run_a(&sample_res).ok(), Some(37));
assert_eq!(run_b(&sample_res).ok(), Some... | rust_cleaned_test_functions.jsonl/23913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
509,
16,
16,
368,
341,
10217,
6077,
5898,
284,
330,
43,
1214,
43,
1214,
43,
1214,
43,
1699,
49356,
86708,
1214,
43,
1699,
43,
1214,
1214,
496,
43,
60402,
77,
49356,
1214,
43,
1214,
43,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple() {
let s = expr("1 + 2");
assert_eq!(s.to_string(), "(+ 1 2)");
let val = eval_expr(&s);
match val {
Value::PosNumber(x) => assert_eq!(x, 3.0),
_ => panic!("Error")
}
} | rust_cleaned_test_functions.jsonl/99661 | {
"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,
21296,
30015,
368,
341,
286,
1077,
274,
284,
15169,
445,
16,
488,
220,
17,
797,
286,
2060,
10714,
10297,
82,
2389,
3904,
1507,
11993,
10,
220,
16,
220,
17,
20996,
286,
1077,
1044,
284,
5603,
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_atom_reset_id() {
let mut atoms = AtomSpace::default();
let mut atom = Atom::Tx(new_tx_port(1));
atom.set_atom_id(unsafe { AtomId::new_unchecked(1) });
let _ = atoms.do_share_atom(atom);
} | rust_cleaned_test_functions.jsonl/5082 | {
"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,
42292,
18983,
842,
368,
341,
286,
1077,
5206,
32199,
284,
39516,
9914,
486,
2258,
543,
286,
1077,
5206,
19124,
284,
39516,
486,
31584,
1755,
17805,
8716,
7,
16,
1106,
286,
19124,
980,
42292,
842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_corrupted_slice() {
let input = make_test_input(20_000);
let slice_start = 5_000;
let slice_len = 10_000;
let (encoded, hash) = encode::encode(&input);
// Slice out the middle 10_000 bytes;
let mut slice = Vec::new();
let mut extractor = e... | rust_cleaned_test_functions.jsonl/118142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 936
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14734,
85954,
26488,
368,
341,
286,
1077,
1946,
284,
1281,
4452,
5898,
7,
17,
15,
62,
15,
15,
15,
317,
286,
1077,
15983,
4906,
284,
220,
20,
62,
15,
15,
15,
280,
286,
1077,
15983,
6043,
284,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_node_merge_catch_up_logs_empty_entries() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
cluster.run();
cluster.must_put(b"k1", b"v1");
cluster.must_put(b"k3", b"v3");
let pd_client = Arc::clone(&cluster.pd_client);
let region = pd_cli... | rust_cleaned_test_functions.jsonl/27253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 830
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
666,
754,
8237,
42899,
15124,
26092,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
10652,
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_aggregatable_svc() {
let rng = &mut test_rng();
let size: usize = 8;
let params = key_gen::<E, _>(size, rng).unwrap();
let domain: GeneralEvaluationDomain<Fr> = EvaluationDomain::<Fr>::new(size).unwrap();
let mut values = Vec::<Fr>::new();
values.push(Fr::rand(rng));
... | rust_cleaned_test_functions.jsonl/131393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2033
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
7998,
15086,
78198,
368,
341,
262,
1077,
28422,
284,
609,
6984,
1273,
66849,
543,
262,
1077,
1379,
25,
22301,
284,
220,
23,
280,
262,
1077,
3628,
284,
1376,
16322,
27638,
36,
11,
716,
223... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_d() {
let mut state = State8080::empty_state();
state.memory = vec![0x82];
state.a = 0x6c;
state.d = 0x2e;
emulate_8080_op(&mut state);
assert_eq!(state.a, 0x9a);
assert_eq!(state.cc.z, 0);
assert_eq!(state.cc.cy, 0);
as... | rust_cleaned_test_functions.jsonl/7779 | {
"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,
2891,
814,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
23,
17,
935,
286,
1584,
5849,
284,
220,
15,
87,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xorps() {
assert_emit!(0x0f, 0x57, 0x05, 0xf6, 0xff, 0xff, 0xff;
xorps(XMM0, Mem::Base(RIP, -10)));
assert_emit!(0x66, 0x0f, 0x57, 0x05, 0xf6, 0xff, 0xff, 0xff;
xorpd(XMM0, Mem::Base(RIP, -10)));
} | rust_cleaned_test_functions.jsonl/85509 | {
"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,
76462,
1690,
368,
341,
286,
2060,
69082,
10297,
15,
87,
15,
69,
11,
220,
15,
87,
20,
22,
11,
220,
15,
87,
15,
20,
11,
220,
15,
5848,
21,
11,
220,
15,
9020,
11,
220,
15,
9020,
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_compilation_of_all_default_patterns() {
let mut grok = Grok::default();
let mut num_checked = 0;
for &(key, _) in patterns::PATTERNS {
let pattern = format!("%{{{}}}", key);
grok.compile(&pattern, false).expect(&format!(
"Pattern {}... | rust_cleaned_test_functions.jsonl/117573 | {
"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,
18177,
13455,
3575,
5705,
9993,
64923,
368,
341,
286,
1077,
5206,
10487,
74,
284,
17888,
74,
486,
2258,
543,
286,
1077,
5206,
1629,
56456,
284,
220,
15,
280,
286,
369,
22796,
792,
11,
27439,
304... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_namespaces() {
lazy_static::initialize(&NAMESPACES);
assert_eq!(NAMESPACES.len(), 7);
let ns = NAMESPACES.get("user");
assert!(ns.is_some());
let ns = NAMESPACES.get("ipc");
assert!(ns.is_some());
let ns = NAMESPACES.get("pid");
... | rust_cleaned_test_functions.jsonl/16614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9187,
27338,
368,
341,
286,
15678,
25360,
486,
21641,
2099,
45,
15608,
47,
52081,
317,
286,
2060,
10714,
10297,
45,
15608,
47,
52081,
19406,
1507,
220,
22,
626,
286,
1077,
12268,
284,
90910,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_qmp_event_macro() {
use crate::socket::{Socket, SocketRWHandler};
use std::io::Read;
// Pre test. Environment preparation
QmpChannel::object_init();
let mut buffer = [0u8; 200];
let (listener, mut client, server) = prepare_unix_socket_environment(... | rust_cleaned_test_functions.jsonl/66357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 875
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
1307,
6748,
58810,
368,
341,
286,
990,
17717,
486,
9556,
22964,
10286,
11,
20954,
56368,
3050,
2440,
286,
990,
1460,
486,
815,
486,
4418,
401,
286,
442,
4968,
1273,
13,
11586,
17975,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_rotate_left_parts() {
let mut v: VecDeque<_> = (1..=7).collect();
v.rotate_left(2);
assert_eq!(v.as_slices(), (&[3, 4, 5, 6, 7, 1][..], &[2][..]));
v.rotate_left(2);
assert_eq!(v.as_slices(), (&[5, 6, 7, 1][..], &[2, 3, 4][..]));
v.rotate_left(2);
assert_eq!(v.as_slic... | rust_cleaned_test_functions.jsonl/73737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60834,
9579,
33217,
368,
341,
262,
1077,
5206,
348,
25,
11312,
73891,
32399,
29,
284,
320,
16,
496,
28,
22,
568,
17384,
543,
262,
348,
35944,
9579,
7,
17,
317,
262,
2060,
10714,
10297,
85,
535... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ord() {
let mut a = TrieSet::new();
let mut b = TrieSet::new();
assert!(a <= b && a >= b);
assert!(a.insert(1u));
assert!(a > b && a >= b);
assert!(b < a && b <= a);
assert!(b.insert(2u));
assert!(b > a && b >= a);
assert!(... | rust_cleaned_test_functions.jsonl/7313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67324,
368,
341,
286,
1077,
5206,
264,
284,
62783,
1649,
486,
931,
543,
286,
1077,
5206,
293,
284,
62783,
1649,
486,
931,
1428,
286,
2060,
10297,
64,
2651,
293,
1009,
264,
2604,
293,
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... | 6 |
#[test]
fn test_pi_radians_exactly_180_degrees() {
assert_eq!(Angle(PI).rad(), PI);
assert_eq!(Angle(PI).deg(), 180.);
assert_eq!(Angle::from(Deg(180.)).rad(), PI);
assert_eq!(Angle::from(Deg(180.)).deg(), 180.);
assert_eq!(Angle(PI / 2.).deg(), 90.);
assert_eq... | rust_cleaned_test_functions.jsonl/18315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47771,
1710,
20736,
2702,
32739,
62,
16,
23,
15,
46057,
7858,
368,
341,
286,
2060,
10714,
10297,
15939,
7,
1893,
568,
13281,
1507,
22578,
317,
286,
2060,
10714,
10297,
15939,
7,
1893,
568,
16508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tokens() {
sub_test("id123_OK", &[Token::Word("id123_OK")]);
sub_test(
"92No",
&[Token::Number(Ok(Number::I32(92))), Token::Word("No")],
);
sub_test(
"2u3o",
&[
Token::Number(Ok(Number::U32(2))),
Token::Number(Ok(Number::I32... | rust_cleaned_test_functions.jsonl/81350 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 915
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28838,
368,
341,
262,
1186,
4452,
445,
307,
16,
17,
18,
8375,
497,
44590,
3323,
486,
10879,
445,
307,
16,
17,
18,
8375,
899,
2558,
262,
1186,
4452,
1006,
286,
330,
24,
17,
2753,
756,
286,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_normalized_newlines_stdout_is_fail() {
let res = CmdResult {
tmpd: None,
code: None,
success: true,
stdout: "A\r\nB\nC".into(),
stderr: "".into(),
};
res.normalized_newlines_stdout_is("A\r\nB\nC\n");
} | rust_cleaned_test_functions.jsonl/74691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80006,
5921,
7969,
67416,
6892,
22121,
368,
341,
286,
1077,
592,
284,
40210,
2077,
341,
310,
4174,
67,
25,
2240,
345,
310,
2038,
25,
2240,
345,
310,
2393,
25,
830,
345,
310,
20075,
25,
330,
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_total_risk_cycle1() {
let grid: Grid<Risk> = GRAPH_STR.parse().unwrap();
let g = CaveRiskGraph::from_grid_and_cycle(&grid, 1);
assert_eq!(g.total_risk(), 40);
} | rust_cleaned_test_functions.jsonl/134631 | {
"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,
10784,
1710,
3187,
39079,
16,
368,
341,
286,
1077,
5827,
25,
10587,
23370,
3187,
29,
284,
68636,
7159,
4632,
1005,
15454,
543,
286,
1077,
342,
284,
49392,
85307,
11212,
486,
1499,
15604,
8378,
390... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_number_literal_binary() {
// binary
assert_parse_success!(numeric_literal, "0b1010", NumericLiteral(10f64));
assert_parse_success!(numeric_literal, "0B1010", NumericLiteral(10f64));
} | rust_cleaned_test_functions.jsonl/66452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5500,
34100,
31761,
368,
341,
262,
442,
7868,
198,
262,
2060,
21039,
18632,
10297,
19600,
34100,
11,
330,
15,
65,
16,
15,
16,
15,
497,
50367,
17350,
7,
16,
15,
69,
21,
19,
1106,
262,
2060,
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_is_simple() {
let points = [[1, -1], [1, 1], [-1, 1], [-1, -1]];
assert!(is_simple(&points));
} | rust_cleaned_test_functions.jsonl/60094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 64
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
30015,
368,
341,
262,
1077,
3501,
284,
4318,
16,
11,
481,
16,
1125,
508,
16,
11,
220,
16,
1125,
10055,
16,
11,
220,
16,
1125,
10055,
16,
11,
481,
16,
13204,
262,
2060,
10297,
285,
3001... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_strmode() {
let tests = [
(0o100644, "-rw-r--r--", "file, 644"),
(0o100600, "-rw-------", "file, 600"),
(0o100777, "-rwxrwxrwx", "file, 777"),
(0o040755, "drwxr-xr-x", "directory, 755"),
(0o040711, "drwx--x--x", "directory, 711"),
(0o020660, "c... | rust_cleaned_test_functions.jsonl/74075 | {
"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,
2895,
8516,
368,
341,
262,
1077,
7032,
284,
2278,
286,
320,
15,
78,
16,
15,
15,
21,
19,
19,
11,
6523,
31768,
3795,
313,
81,
313,
497,
330,
1192,
11,
220,
21,
19,
19,
4461,
286,
320,
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... | 2 |
#[test]
fn test_leb_writer() {
assert_eq!(write_signed_leb_as_vector(0), [0x00]);
assert_eq!(write_signed_leb_as_vector(1), [0x01]);
assert_eq!(write_signed_leb_as_vector(0x80), [0x80, 0x01]);
assert_eq!(write_signed_leb_as_vector(0xFF), [0xFF, 0x01]);
assert_eq!(write_signed_leb_as_vector(0... | rust_cleaned_test_functions.jsonl/45665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11751,
65,
28908,
368,
341,
262,
2060,
10714,
10297,
4934,
55617,
11751,
65,
11898,
12247,
7,
15,
701,
508,
15,
87,
15,
15,
2558,
262,
2060,
10714,
10297,
4934,
55617,
11751,
65,
11898,
12247,
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_stream_tx() {
let conn_fc = connection_fc(4096);
let conn_events = ConnectionEvents::default();
let mut s = SendStream::new(4.into(), 1024, Rc::clone(&conn_fc), conn_events);
let res = s.send(&[4; 100]).unwrap();
assert_eq!(res, 100);
s.mark_as_s... | rust_cleaned_test_functions.jsonl/112152 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 606
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
17805,
368,
341,
286,
1077,
4534,
46506,
284,
3633,
46506,
7,
19,
15,
24,
21,
317,
286,
1077,
4534,
19691,
284,
11032,
7900,
486,
2258,
1428,
286,
1077,
5206,
274,
284,
11000,
3027,
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_malformed_int() {
assert!(Tuple::try_from(&[21, 0]).is_ok());
assert!(Tuple::try_from(&[22, 0]).is_err());
assert!(Tuple::try_from(&[22, 0, 0]).is_ok());
assert!(Tuple::try_from(&[19, 0]).is_ok());
assert!(Tuple::try_from(&[18, 0]).is_err());
asse... | rust_cleaned_test_functions.jsonl/127218 | {
"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,
717,
278,
10155,
4042,
368,
341,
286,
2060,
10297,
28681,
486,
1539,
5673,
2099,
58,
17,
16,
11,
220,
15,
10697,
285,
19817,
1423,
286,
2060,
10297,
28681,
486,
1539,
5673,
2099,
58,
17,
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_reset_only_unstaged() {
let (_td, repo) = repo_init().unwrap();
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
let res =
get_status(repo_path, StatusType::WorkingDir).unwrap();
assert_eq!(res.len(... | rust_cleaned_test_functions.jsonl/82912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 615
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18983,
18410,
4907,
267,
3279,
368,
341,
286,
1077,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
1005,
15454,
543,
286,
1077,
3704,
284,
15867,
3875,
1005,
3765,
1005,
15454,
543,
286,
1077,
15867,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eip155_decode_signed() {
let expected_signed_bytes = hex::decode("f86c098504a817c800825208943535353535353535353535353535353535353535880de0b6b3a76400008025a028ef61340bd939bc2195fe537567866003e1a15d3c71ff63e1590620aa636276a067cbe9d8997f761aecb703304b3800ccf555c9f3dc64214b297fb1966a3b6d83")... | rust_cleaned_test_functions.jsonl/15450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 567
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
573,
16,
20,
20,
15227,
55617,
368,
341,
286,
1077,
3601,
55617,
12524,
284,
12371,
486,
18196,
445,
69,
23,
21,
66,
15,
24,
23,
20,
15,
19,
64,
23,
16,
22,
66,
23,
15,
15,
23,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte_parser_mapping() {
let data = "{\"a\": 1, \"b\":2}";
let parser = parser::YamlByteParser::init(data.as_bytes(), YamlUtf8Encoding);
let expected = Ok(vec![
YamlStreamStartEvent(YamlUtf8Encoding),
YamlDocumentStartEvent(None, vec![], true),
... | rust_cleaned_test_functions.jsonl/58258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 615
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
18517,
26930,
368,
341,
286,
1077,
821,
284,
54734,
64,
11693,
220,
16,
11,
7245,
65,
11693,
17,
26259,
286,
1077,
6729,
284,
6729,
486,
56,
9467,
7153,
6570,
486,
2327,
2592,
5357,
12524... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize() {
let mut buffer: Vec<u8> = vec![0; VoteState::size_of()];
let mut vote_state = VoteState::default();
vote_state
.votes
.resize(MAX_LOCKOUT_HISTORY, Lockout::default());
vote_state.root_slot = Some(1);
let versioned... | rust_cleaned_test_functions.jsonl/6084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
88686,
368,
341,
286,
1077,
5206,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
26,
34034,
1397,
486,
2141,
3575,
33800,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_padded() {
let len = 1016; // Use a multiple of 254.
let mut data = vec![255u8; len];
let buf = Vec::new();
let mut cursor = Cursor::new(buf);
let padded_written = write_padded(&mut data[..].as_ref(), &mut cursor).unwrap();
let padded = ... | rust_cleaned_test_functions.jsonl/33000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
9165,
620,
16828,
368,
341,
286,
1077,
2422,
284,
220,
16,
15,
16,
21,
26,
442,
5443,
264,
5248,
315,
220,
17,
20,
19,
624,
286,
1077,
5206,
821,
284,
7486,
20703,
17,
20,
20,
84,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dynamic_spendable_outputs_local_htlc_timeout_tx() {
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 = create_network(2, &node_cfgs, &node_chanmgrs);
// Create so... | rust_cleaned_test_functions.jsonl/28319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 801
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45992,
643,
3740,
480,
35189,
13564,
49086,
17257,
20537,
17805,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
284,
1855,
5084,
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_atomic_accesses() {
let addr = GuestAddress(0x1000);
let mem = GuestMemoryMmap::from_ranges(&[(addr, 0x1000)]).unwrap();
let bad_addr = addr.unchecked_add(0x1000);
crate::bytes::tests::check_atomic_accesses(mem, addr, bad_addr);
} | rust_cleaned_test_functions.jsonl/112627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51367,
12759,
288,
368,
341,
286,
1077,
10789,
284,
26215,
4286,
7,
15,
87,
16,
15,
15,
15,
317,
286,
1077,
1833,
284,
26215,
10642,
44,
2186,
486,
1499,
58748,
2099,
9697,
6214,
11,
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_cast() {
let length_as_i32: Length<i32, Cm> = Length::new(5);
let result: Length<f32, Cm> = length_as_i32.cast();
let length_as_f32: Length<f32, Cm> = Length::new(5.0);
assert_eq!(result, length_as_f32);
} | rust_cleaned_test_functions.jsonl/50591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
368,
341,
286,
1077,
3084,
11898,
5318,
18,
17,
25,
17287,
21897,
18,
17,
11,
356,
76,
29,
284,
17287,
486,
931,
7,
20,
626,
286,
1077,
1102,
25,
17287,
63895,
18,
17,
11,
356,
76,
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_neg32() {
test_interpreter_and_jit_asm!(
"
mov32 r0, 2
neg32 r0
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0xfffffffe } },
3
);
} | rust_cleaned_test_functions.jsonl/58928 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
18,
17,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
18,
17,
435,
15,
11,
220,
17,
198,
286,
4184,
18,
17,
435,
15,
198,
286,
4869,
756,
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_route_match_many() {
let rt = Route::new("/api/v1/foo/<int:foo_id>/bar/<str:bar>/baz/<int:baz_id>", Method::Get, utils::err_404);
let rm = rt.parse("/api/v1/foo/123/bar/bar/baz/456");
assert_eq!("123", rm.get("foo_id").unwrap());
assert_eq!("bar", rm.get("bar").u... | rust_cleaned_test_functions.jsonl/47136 | {
"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,
28109,
10708,
22101,
368,
341,
286,
1077,
16677,
284,
9572,
486,
931,
4283,
2068,
5457,
16,
60555,
23012,
396,
25,
7975,
842,
18105,
2257,
23012,
495,
25,
2257,
18105,
42573,
23012,
396,
25,
42573... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_finals() {
let model =
"1\n\
";
match DFAReader::new_from_string(model) {
Err(DFAReaderError::MissingFinalStates) => assert!(true),
_ => assert!(false, "MissingFinalStates expected."),
}
} | rust_cleaned_test_functions.jsonl/47828 | {
"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,
6536,
20676,
82,
368,
341,
286,
1077,
1614,
4035,
310,
330,
16,
1699,
5661,
310,
7620,
286,
2432,
93631,
5062,
486,
931,
5673,
3904,
7635,
8,
341,
310,
15495,
5432,
3627,
5062,
1454,
486,
25080,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_no_full_names_no_problem() {
let (font_catalog, font_pkgs, product_config) = make_font_db_args();
let font_info_loader = TestFontInfoLoader::new(btreemap! {
("AlphaSans.ttc".to_string(), 0) => FontInfo {
char_set: CharSet::new(vec![0x1, 0x2]),
... | rust_cleaned_test_functions.jsonl/58070 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
16372,
9187,
6536,
60139,
368,
341,
286,
1077,
320,
4026,
47310,
11,
3301,
33321,
5857,
11,
1985,
5332,
8,
284,
1281,
17451,
8685,
8384,
543,
286,
1077,
3301,
3109,
22139,
284,
3393,
5447,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fft_frequencies() {
let freq = fft_frequencies(22050, 2048);
let larynx_fft: Array1<f64> = read_npy("tests/data/audio/larynx-fft-frequencies.npy").unwrap();
assert_relative_eq!(freq, larynx_fft);
} | rust_cleaned_test_functions.jsonl/104235 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67059,
761,
71731,
368,
341,
197,
10217,
20895,
284,
43700,
761,
71731,
7,
17,
17,
15,
20,
15,
11,
220,
17,
15,
19,
23,
317,
197,
10217,
326,
658,
23357,
67059,
25,
2910,
16,
63895,
21,
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_resolve_module_3() {
// unsupported schemes
let test_cases = [
"ftp://localhost:4545/testdata/subdir/print_hello.ts",
"blob:https://whatwg.org/d0360e2f-caee-469f-9a2f-87d5b0456f6f",
];
for &test in test_cases.iter() {
let url = Url::parse(test).unwrap();
... | rust_cleaned_test_functions.jsonl/16765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
10750,
62,
18,
368,
341,
262,
442,
40409,
30856,
198,
262,
1077,
1273,
41427,
284,
2278,
414,
330,
25068,
1110,
8301,
25,
19,
20,
19,
20,
12697,
691,
37885,
3741,
92221,
96724,
21288,
756... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_strong_count() {
let a = Rc::new(0u32);
assert!(strong_count(&a) == 1);
let w = a.downgrade();
assert!(strong_count(&a) == 1);
let b = w.upgrade().expect("upgrade of live rc failed");
assert!(strong_count(&b) == 2);
assert!(strong_count(&a)... | rust_cleaned_test_functions.jsonl/54219 | {
"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,
2895,
644,
3180,
368,
341,
286,
1077,
264,
284,
81463,
486,
931,
7,
15,
84,
18,
17,
317,
286,
2060,
10297,
4519,
3180,
2099,
64,
8,
621,
220,
16,
317,
286,
1077,
289,
284,
264,
18148,
6937,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_containing_polygon() {
let la = Point::new(-118.2437, 34.0522);
let poly = Polygon::new(
vec![
[-119.53125, 33.75],
[-118.125, 33.75],
[-118.125, 35.15625],
[-119.53125, 35.15625],
[-119.5... | rust_cleaned_test_functions.jsonl/93758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 390
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10260,
2056,
73542,
368,
341,
286,
1077,
1187,
284,
5126,
486,
931,
4080,
16,
16,
23,
13,
17,
19,
18,
22,
11,
220,
18,
19,
13,
15,
20,
17,
17,
317,
286,
1077,
9861,
284,
48159,
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... | 2 |
#[test]
fn test_mint() {
let mut service = TestService::new();
let ctx = mock_context(TestService::caller());
let asset = create_asset!(service, ctx.clone(), 10000, 10);
let recipient = Address::from_hex("0x666cdba6ae4f479f7164792b318b2a06c759833b").unwrap();
let asset_to_mint = MintAssetP... | rust_cleaned_test_functions.jsonl/32946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 625
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
396,
368,
341,
262,
1077,
5206,
2473,
284,
3393,
1860,
486,
931,
543,
262,
1077,
5635,
284,
7860,
8467,
31159,
1860,
486,
56126,
1423,
262,
1077,
9329,
284,
1855,
42299,
10297,
7936,
11,
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_create_connection_agency_failure() {
let _setup = SetupIndyMocks::init();
let handle = create_connection("invalid").unwrap();
let rc = connect(handle, None);
assert_eq!(rc.unwrap_err().kind(), VcxErrorKind::PostMessageFailed);
} | rust_cleaned_test_functions.jsonl/20871 | {
"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,
8657,
15866,
20587,
2251,
43618,
368,
341,
286,
1077,
716,
15188,
284,
18626,
1425,
88,
72577,
486,
2327,
1428,
286,
1077,
3705,
284,
1855,
15866,
445,
11808,
1827,
15454,
543,
286,
1077,
10192,
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_deserialize_signed_tx_parity() {
// taken from RPC docs.
let tx_str = r#"{
"raw": "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
"tx": {
"hash": "0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b"... | rust_cleaned_test_functions.jsonl/68220 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
55617,
17805,
620,
10748,
368,
341,
286,
442,
4429,
504,
34008,
26340,
624,
286,
1077,
9854,
2895,
284,
435,
55543,
515,
286,
330,
1041,
788,
330,
15,
9703,
19,
21,
68,
23,
631,
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_intersect_regions_new_ranges_within_existing() {
let actual = intersect_regions(
vec![UnchangedRange {
base_range: 20..70,
offsets: vec![3],
}],
&[(25..30, 35..40), (40..50, 40..50)],
);
let expected = ve... | rust_cleaned_test_functions.jsonl/89253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
58035,
5921,
58748,
72385,
62630,
368,
341,
286,
1077,
5042,
284,
31796,
58035,
1006,
310,
7486,
20703,
1806,
17353,
6046,
341,
394,
2331,
9698,
25,
220,
17,
15,
496,
22,
15,
345,
394,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_quality_scores_with_sequence_and_no_quality_scores() -> io::Result<()> {
let data = [0xff, 0xff, 0xff, 0xff];
let mut buf = &data[..];
let mut quality_scores = sam::record::QualityScores::default();
get_quality_scores(&mut buf, &mut quality_scores, 4)?;
... | rust_cleaned_test_functions.jsonl/75437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
55074,
27198,
6615,
23735,
8378,
6536,
55074,
27198,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
508,
15,
9020,
11,
220,
15,
9020,
11,
220,
15,
9020,
11,
220,
15,
9020,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_clock_timestamp() {
let leader_pubkey = solana_sdk::pubkey::new_rand();
let GenesisConfigInfo {
genesis_config,
voting_keypair,
..
} = create_genesis_config_with_leader(5, &leader_pubkey, 3);
let mut bank = Bank::new(&gen... | rust_cleaned_test_functions.jsonl/2660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
23062,
23073,
368,
341,
286,
1077,
7653,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
15668,
3097,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_naive_time() -> Result<()> {
let mut db = checked_memory_handle()?;
let time = NaiveTime::from_hms_micro(23, 56, 4, 12_345);
db.execute("INSERT INTO foo (tt) VALUES (?)", [time])?;
let s: String = db.query_row("SELECT tt FROM foo", [], |r| r.get(0))?;
ass... | rust_cleaned_test_functions.jsonl/76835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58631,
533,
3009,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
2927,
284,
10067,
19195,
10630,
94136,
286,
1077,
882,
284,
12812,
533,
1462,
486,
1499,
1523,
1011,
73003,
7,
17,
18,
11,
220,
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... | 5 |
#[test]
fn test_manage_and_reward_node_providers() {
let p: PathBuf = ["tests", "neurons.csv"].iter().collect();
let mut builder = GovernanceCanisterInitPayloadBuilder::new();
let init_neurons = &mut builder.add_all_neurons_from_csv_file(&p).proto.neurons;
let voter_pid = *init_neurons[&42].con... | rust_cleaned_test_functions.jsonl/42512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56473,
8378,
38260,
5084,
2540,
17761,
368,
341,
262,
1077,
281,
25,
7933,
15064,
284,
4383,
23841,
497,
330,
811,
53669,
11219,
5521,
2015,
1005,
17384,
543,
262,
1077,
5206,
7363,
284,
80589,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_log() {
let path_to_current_dir = file_system::get_current_dir()
.ok()
.expect("Failed read current directory.");
let target_dir = Path::new(&path_to_current_dir)
.join("targ... | rust_cleaned_test_functions.jsonl/89801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
368,
1476,
286,
1077,
1815,
2346,
11080,
4334,
284,
1034,
17687,
486,
455,
11080,
4334,
741,
8333,
659,
562,
741,
8333,
659,
17119,
445,
9408,
1349,
1482,
6220,
7320,
286,
1077,
2169,
4334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_copy_expand_with_type_params() {
let expanded = expand_builtin_derive(
r#"
#[derive(Copy)]
struct Foo<A, B>;
"#,
known::Copy,
);
assert_eq!(
expanded,
"impl<T0:core::marker::Copy,T1:core::marker::Copy>core::... | rust_cleaned_test_functions.jsonl/86380 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16096,
67875,
6615,
1819,
6745,
368,
341,
286,
1077,
17183,
284,
9225,
73829,
35345,
533,
1006,
310,
435,
2,
698,
286,
11506,
27098,
3025,
1266,
5563,
286,
2036,
33428,
30192,
11,
425,
10133,
5767... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_operators() {
type F = f32;
type V = Vector0XYZ<F>;
{
let v123 = V::from_xyz(1.,2.,3.);
let v123neg= V::from_xyz(-1.,-2.,-3.);
let v246 = V::from_xyz(2.,4.,6.);
assert!((v123 + v123neg).is_zero());
assert!((v123 + v123 - v246).is_zero());
... | rust_cleaned_test_functions.jsonl/33004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25634,
2973,
368,
341,
262,
943,
434,
284,
282,
18,
17,
280,
262,
943,
647,
284,
4196,
15,
32196,
30499,
19421,
262,
341,
286,
1077,
348,
16,
17,
18,
284,
647,
486,
1499,
64974,
7,
16,
2572,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tail_empty() {
let dir = tempdir().unwrap();
let repo = LogRepository::new(dir.path());
let paths = repo.tail(5).unwrap();
assert_eq!(paths.len(), 0);
} | rust_cleaned_test_functions.jsonl/101106 | {
"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,
35471,
15124,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
15867,
284,
2835,
4624,
486,
931,
14161,
3875,
1423,
286,
1077,
12716,
284,
15867,
38711,
7,
20,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_list_neurons_determinism() {
local_test_on_sns_subnet(|runtime| async move {
let users = vec![
Sender::from_keypair(&TEST_USER1_KEYPAIR),
Sender::from_keypair(&TEST_USER2_KEYPAIR),
Sender::from_keypair(&TEST_USER3_KEYPAIR),
Sender::from... | rust_cleaned_test_functions.jsonl/107244 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
96156,
814,
16483,
2142,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
1077,
3847,
284,
7486,
90515,
310,
54610,
486,
1499,
3097,
12670,
2099,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_module_defined_types_limit() {
let limits = ModuleLimits {
types: 0,
..Default::default()
};
let mut module = Module::default();
assert!(limits.validate(&module).is_ok());
module
.types
.push(ModuleType::Fu... | rust_cleaned_test_functions.jsonl/48863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
52870,
9763,
14763,
368,
341,
286,
1077,
13388,
284,
13711,
94588,
341,
310,
4494,
25,
220,
15,
345,
310,
5241,
3675,
486,
2258,
741,
286,
3634,
286,
1077,
5206,
4688,
284,
13711,
486,
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_try_panic_message_owned_str() {
match thread::spawn(move|| {
panic!("owned string".to_string());
}).join() {
Err(e) => {
type T = String;
assert!(e.is::<T>());
assert_eq!(*e.downcast::<T>().unwrap(), "owned s... | rust_cleaned_test_functions.jsonl/8569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
620,
31270,
6462,
51973,
2895,
368,
341,
286,
2432,
4516,
486,
46087,
34081,
8484,
341,
310,
21975,
17223,
18332,
914,
3263,
983,
3904,
1423,
286,
8533,
5987,
368,
341,
310,
15495,
2026,
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... | 3 |
#[test]
fn test_raw_text() {
let (sql, params) = Postgres::build(Select::default().value("foo".raw())).unwrap();
assert_eq!("SELECT 'foo'", sql);
assert!(params.is_empty());
} | rust_cleaned_test_functions.jsonl/6458 | {
"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,
16067,
4326,
368,
341,
286,
1077,
320,
3544,
11,
3628,
8,
284,
3877,
17818,
486,
5834,
7,
3379,
486,
2258,
1005,
957,
445,
7975,
3263,
1041,
34670,
15454,
543,
286,
2060,
10714,
17223,
4858,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_listen_timeout() {
let mut s = socket_listen();
s.set_timeout(Some(Duration::from_millis(100)));
assert_eq!(s.poll_at(), None);
} | rust_cleaned_test_functions.jsonl/1777 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79286,
20537,
368,
341,
286,
1077,
5206,
274,
284,
7575,
79286,
543,
286,
274,
980,
20537,
65405,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
4945,
286,
2060,
10714,
10297,
82,
41477,
3752,
150... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_part1() {
assert_eq!(part1(&parse("R2, L3")), 5);
assert_eq!(part1(&parse("R2, R2, R2")), 2);
assert_eq!(part1(&parse("R5, L5, R5, R3")), 12);
} | rust_cleaned_test_functions.jsonl/52823 | {
"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,
10495,
16,
368,
341,
286,
2060,
10714,
10297,
4480,
16,
2099,
6400,
445,
49,
17,
11,
444,
18,
35674,
220,
20,
317,
286,
2060,
10714,
10297,
4480,
16,
2099,
6400,
445,
49,
17,
11,
431,
17,
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_try_from_record_for_reference_sequence_with_invalid_length(
) -> Result<(), record::value::TryFromIteratorError> {
let record = Record::new(
record::Kind::ReferenceSequence,
record::Value::try_from_iter(vec![("LN", "thirteen")])?,
);
assert!(m... | rust_cleaned_test_functions.jsonl/23401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
14192,
5478,
25433,
23735,
6615,
31433,
5118,
1006,
262,
873,
1464,
5714,
68843,
3255,
486,
957,
486,
21453,
3830,
11951,
1454,
29,
341,
286,
1077,
3255,
284,
13583,
486,
931,
1006,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_fmt_debug() {
let tree = RTree::bulk_load(vec![[0, 1], [0, 1]]);
let debug: String = format!("{:?}", tree);
assert_eq!(debug, "RTree { size: 2, items: {[0, 1], [0, 1]} }");
} | rust_cleaned_test_functions.jsonl/71303 | {
"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,
38128,
15446,
368,
341,
286,
1077,
4916,
284,
431,
6533,
486,
67142,
12411,
25592,
0,
15505,
15,
11,
220,
16,
1125,
508,
15,
11,
220,
16,
49854,
286,
1077,
7390,
25,
923,
284,
3561,
88928,
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_matched() {
let mut ps = ParseStream {
content: "Hello World".to_string(),
cursor: 2,
};
let val = ps.matched("[a-z]+").unwrap();
assert_eq!(ps.cursor, 5);
assert_eq!(val, "llo".to_string());
} | rust_cleaned_test_functions.jsonl/41146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
93900,
368,
341,
286,
1077,
5206,
4726,
284,
14775,
3027,
341,
310,
2213,
25,
330,
9707,
4337,
3263,
983,
3904,
3148,
310,
8128,
25,
220,
17,
345,
286,
3634,
286,
1077,
1044,
284,
4726,
11072,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.