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_matches_did() {
let did: IotaDID = IotaDID::new(b"").unwrap();
assert!(Network::matches_did(Network::Mainnet, &did));
assert!(!Network::matches_did(Network::Devnet, &did));
let did: IotaDID = IotaDID::new_with_network(b"", "main").unwrap();
assert!(Network::matches_did(Netwo... | rust_cleaned_test_functions.jsonl/64591 | {
"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,
38344,
814,
307,
368,
341,
262,
1077,
1521,
25,
358,
6089,
35,
915,
284,
358,
6089,
35,
915,
486,
931,
1883,
1,
1827,
15454,
543,
262,
2060,
10297,
12320,
486,
19914,
814,
307,
77623,
486,
620... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fin_after_headers_and_a_empty_data_frame() {
let (mut hconn, mut peer_conn, request_stream_id) = connect_and_send_request();
// Send some good data wo fin
let data = &[
// headers
0x01, 0x06, 0x00, 0x00, 0xd9, 0x54, 0x01, 0x33, // data
... | rust_cleaned_test_functions.jsonl/10945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1019
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
39737,
19844,
26719,
8378,
4306,
15124,
1769,
8929,
368,
341,
286,
1077,
320,
6984,
305,
5148,
11,
5206,
14397,
17241,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
543,
286,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_longest_increasing_path() {
assert_eq!(
Solution::longest_increasing_path(vec![vec![9, 9, 4], vec![6, 6, 8], vec![2, 1, 1]]),
4
);
assert_eq!(
Solution::longest_increasing_path(vec![vec![3, 4, 5], vec![3, 2, 6], vec![2, 2, 1]]),
... | rust_cleaned_test_functions.jsonl/131002 | {
"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,
17799,
477,
1243,
75462,
2638,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
4825,
477,
1243,
75462,
2638,
25592,
20703,
4083,
20703,
24,
11,
220,
24,
11,
220,
19,
1125,
7486,
20703,
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... | 1 |
#[test]
fn test_head() -> Result<()> {
let (_td, repo) = repo_init()?;
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
assert_eq!(get_head(repo_path).is_ok(), true);
Ok(())
} | rust_cleaned_test_functions.jsonl/36670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13138,
368,
1464,
5714,
71698,
341,
286,
1077,
5453,
1296,
11,
15867,
8,
284,
15867,
6137,
94136,
286,
1077,
3704,
284,
15867,
3875,
1005,
3765,
1005,
15454,
543,
286,
1077,
15867,
2638,
284,
3704... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nal_iter() {
let sps_pps_idr = [
0x00, 0x00, 0x00, 0x01, 0x67, 0x4d, 0x00, 0x28, 0xf4, 0x03, 0xc0, 0x11, 0x3f, 0x2a,
0x00, 0x00, 0x00, 0x01, 0x68, 0xee, 0x38, 0x80, 0x00, 0x00, 0x00, 0x01, 0x65, 0x88,
0x84, 0x01,
];
let iter = H264NalI... | rust_cleaned_test_functions.jsonl/37441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
278,
11723,
368,
341,
286,
1077,
978,
82,
31600,
82,
842,
81,
284,
2278,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
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_fr() {
let mut rng = ark_std::test_rng();
for _ in 0..ITERATIONS {
let a: Fr = UniformRand::rand(&mut rng);
let b: Fr = UniformRand::rand(&mut rng);
field_test(a, b);
primefield_test::<Fr>();
sqrt_field_test(b);
}
} | rust_cleaned_test_functions.jsonl/65015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
368,
341,
262,
1077,
5206,
28422,
284,
55217,
15656,
486,
1944,
66849,
543,
262,
369,
716,
304,
220,
15,
496,
24733,
21792,
341,
286,
1077,
264,
25,
2869,
284,
47889,
56124,
486,
11335,
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_single_tuple_encode() {
// derived from python impl
assert_eq!(&(1,).to_vec(), &1.to_vec());
assert_eq!(&(1, (1,)).to_vec(), &[21, 1, 5, 21, 1, 0]);
assert_eq!(&(1, (1, (1,))).to_vec(), &[21, 1, 5, 21, 1, 5, 21, 1, 0, 0]);
... | rust_cleaned_test_functions.jsonl/127225 | {
"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,
19487,
21773,
11224,
368,
341,
286,
442,
14257,
504,
10135,
11605,
198,
286,
2060,
10714,
0,
29089,
16,
11,
568,
983,
13251,
1507,
609,
16,
2389,
13251,
5231,
16885,
286,
2060,
10714,
0,
29089,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_default_modules() {
let options = CommonOptions::from_iter_safe(vec!["foo", "--wasi-modules=default"]).unwrap();
assert_eq!(
options.wasi_modules.unwrap(),
WasiModules {
wasi_common: true,
wasi_nn: false,
was... | rust_cleaned_test_functions.jsonl/73302 | {
"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,
9993,
15848,
368,
341,
286,
1077,
2606,
284,
7718,
3798,
486,
1499,
11723,
34067,
25592,
0,
1183,
7975,
497,
14482,
86,
10215,
61079,
92628,
45014,
15454,
543,
286,
2060,
10714,
33673,
310,
2606,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sparse_i32() {
let mut builder = UnionBuilder::new_sparse(7);
builder.append::<Int32Type>("a", 1).unwrap();
builder.append::<Int32Type>("b", 2).unwrap();
builder.append::<Int32Type>("c", 3).unwrap();
builder.append::<Int32Type>("a", 4).unwrap();
bu... | rust_cleaned_test_functions.jsonl/25635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 989
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
5318,
18,
17,
368,
341,
286,
1077,
5206,
7363,
284,
9145,
3297,
486,
931,
71123,
7,
22,
317,
286,
7363,
2057,
27638,
1072,
18,
17,
929,
13211,
64,
497,
220,
16,
568,
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... | 3 |
#[test]
fn test_update_many() {
// Use a length of inputs that will exercise all of the power-of-two loops.
const LEN: usize = 2 * guts::MAX_DEGREE - 1;
// different spot each time.
let mut input = [0; LEN * BLOCKBYTES];
paint_test_input(&mut input);
for... | rust_cleaned_test_functions.jsonl/41746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 923
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
22101,
368,
341,
286,
442,
5443,
264,
3084,
315,
11127,
429,
686,
10158,
678,
315,
279,
2355,
8668,
37402,
29753,
624,
286,
733,
83099,
25,
22301,
284,
220,
17,
353,
64873,
486,
10586,
288... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_neg() {
let a = Polynomial::new(coefficients![1f32, 3.0, 3.0, 0.0]);
let expected = coefficients![-1f32, -3.0, -3.0, 0.0];
let b = -&a;
assert_eq!(b.coeffs(), expected);
// -Polynomial
let b = -a;
assert_eq!(b.coeffs(), expected);
} | rust_cleaned_test_functions.jsonl/106881 | {
"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,
28209,
368,
972,
197,
10217,
264,
284,
75153,
486,
931,
67018,
28142,
20703,
16,
69,
18,
17,
11,
220,
18,
13,
15,
11,
220,
18,
13,
15,
11,
220,
15,
13,
15,
12006,
197,
10217,
3601,
284,
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_lzma() {
let tdir = TmpDir::new();
tdir.test_rw("test.lzma", [CompressType::Lzma, CompressType::Lzma], false);
} | rust_cleaned_test_functions.jsonl/95084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
89,
1728,
368,
341,
197,
10217,
259,
3741,
284,
350,
1307,
6184,
486,
931,
543,
197,
76373,
404,
5958,
49566,
445,
1944,
918,
89,
1728,
497,
508,
1092,
1873,
929,
486,
43,
89,
1728,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_or() -> Result<(), TestingError> {
VMTestRunner::new()
.add(PushConst::new(0.into(), ScalarType::Boolean))
.add(PushConst::new(0.into(), ScalarType::Boolean))
.add(Or)
.add(PushConst::new(0.into(), ScalarType::Boolean))
.add(Pus... | rust_cleaned_test_functions.jsonl/20941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8734,
368,
1464,
5714,
68843,
26768,
1454,
29,
341,
286,
17792,
2271,
19486,
486,
931,
741,
310,
659,
718,
5304,
1116,
19167,
486,
931,
7,
15,
39860,
1507,
35176,
929,
486,
6890,
1171,
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_get_guild_vanity_url() {
let route = Route::GetGuildVanityUrl { guild_id: GUILD_ID };
assert_eq!(
route.to_string(),
format!("guilds/{guild_id}/vanity-url", guild_id = GUILD_ID)
);
} | rust_cleaned_test_functions.jsonl/119937 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1889,
1498,
2273,
38270,
2903,
368,
341,
286,
1077,
6021,
284,
9572,
486,
1949,
72574,
53,
38270,
2864,
314,
26411,
842,
25,
479,
18023,
3450,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_member() {
let route = Route::UpdateMember {
guild_id: GUILD_ID,
user_id: USER_ID,
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/members/{user_id}",
guild_id = GUILD_ID,... | rust_cleaned_test_functions.jsonl/119836 | {
"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,
8882,
19388,
368,
341,
286,
1077,
6021,
284,
9572,
486,
4289,
9366,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
1196,
842,
25,
13872,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
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_231() {
assert_eq!(Solution::is_power_of_two(-1), false);
assert_eq!(Solution::is_power_of_two(1), true);
assert_eq!(Solution::is_power_of_two(1024), true);
} | rust_cleaned_test_functions.jsonl/45220 | {
"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,
62,
17,
18,
16,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
285,
20421,
3575,
23241,
4080,
16,
701,
895,
317,
286,
2060,
10714,
10297,
36842,
486,
285,
20421,
3575,
23241,
7,
16,
701,
830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_initialize() -> anyhow::Result<()> {
let eng = Engine::<u64>::default;
let log_id0 = LogId {
leader_id: LeaderId::new(0, 0),
index: 0,
};
let vote0 = Vote::new(0, 0);
let m12 = || Membership::<u64>::new(vec![btreeset! {1,2}], None);
let payload = EntryPa... | rust_cleaned_test_functions.jsonl/41779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40889,
368,
1464,
88964,
486,
2077,
71698,
341,
262,
1077,
2922,
284,
8200,
27638,
84,
21,
19,
6831,
2258,
401,
262,
1077,
1487,
842,
15,
284,
2835,
764,
341,
286,
7653,
842,
25,
23030,
764,
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... | 3 |
#[test]
fn test_consistent_messages_hash() {
let test_ent_id =
PublicKey::from("4ea5328f943ef6f66daaed74cb0e99c3b1c45f76307b425003dbc7cb3638ed35");
let q = quantity::Quantity::from(1000u32);
let mut st = BTreeMap::new();
st.insert(staking::ThresholdKind::Ki... | rust_cleaned_test_functions.jsonl/90823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3706
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31971,
18128,
23428,
8950,
368,
341,
1789,
286,
1077,
1273,
27425,
842,
4035,
310,
70280,
486,
1499,
445,
19,
12508,
20,
18,
17,
23,
69,
24,
19,
18,
823,
21,
69,
21,
21,
3235,
61454,
22,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_no_relative_index_when_empty() {
let vas = VirtualAddressSpace::default();
let res = vas.relative_base(0, 0);
assert_eq!(res, Err(Error::BadRelativeIndex(0)));
} | rust_cleaned_test_functions.jsonl/17701 | {
"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,
6536,
29286,
3560,
47636,
15124,
368,
341,
286,
1077,
43396,
284,
20721,
4286,
9914,
486,
2258,
543,
286,
1077,
592,
284,
43396,
74314,
7651,
7,
15,
11,
220,
15,
317,
286,
2060,
10714,
10297,
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 |
#[test]
fn test_transfers_in_single_block() {
let mut testkit = init_testkit();
let (alice_pubkey, alice_key) = crypto::gen_keypair();
let (bob_pubkey, bob_key) = crypto::gen_keypair();
testkit.create_block_with_transactions(txvec![
TxCreateWallet::sign(ALICE_NAME, &alice_pubkey, &alice_... | rust_cleaned_test_functions.jsonl/25289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
49793,
1243,
19487,
7113,
368,
341,
262,
1077,
5206,
1273,
8226,
284,
2930,
4452,
8226,
543,
262,
1077,
320,
63195,
34014,
792,
11,
70433,
3097,
8,
284,
19028,
486,
4370,
3097,
12670,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_schema_attrs_success() {
let _setup = SetupMocks::init();
let (handle, schema_json) = get_schema_attrs("Check For Success".to_string(), SCHEMA_ID.to_string()).unwrap();
check_schema(handle, &schema_json, SCHEMA_ID, r#"["name","age","height","sex"]"#);
} | rust_cleaned_test_functions.jsonl/33231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
25371,
39578,
18632,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
320,
8192,
11,
10802,
9455,
8,
284,
633,
25371,
39578,
445,
3973,
1752,
13047,
3263,
983,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asinh() {
assert_eq!(0.0f32.asinh(), 0.0f32);
assert_eq!((-0.0f32).asinh(), -0.0f32);
assert_eq!(Float::infinity::<f32>().asinh(), Float::infinity::<f32>());
assert_eq!(Float::neg_infinity::<f32>().asinh(), Float::neg_infinity::<f32>());
assert!(Float::NaN... | rust_cleaned_test_functions.jsonl/101558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
20868,
368,
341,
286,
2060,
10714,
10297,
15,
13,
15,
69,
18,
17,
5357,
20868,
1507,
220,
15,
13,
15,
69,
18,
17,
317,
286,
2060,
10714,
0,
54934,
15,
13,
15,
69,
18,
17,
568,
300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_evenly_split_e8s_over_12_months() {
let e8s = ICPTs::from_icpts(1000).unwrap().get_e8s();
let e8s1 = 8_333_333_333;
let e8s2 = 8_333_333_337;
let expected_stakes = vec![
e8s1, e8s1, e8s1, e8s1, e8s1, e8s1, e8s1, e8s1, e8s1, e8s1, e8s1, e8s2,
]... | rust_cleaned_test_functions.jsonl/97862 | {
"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,
68347,
398,
17052,
2204,
23,
82,
15431,
62,
16,
17,
88462,
368,
341,
286,
1077,
384,
23,
82,
284,
19288,
2828,
82,
486,
1499,
32747,
12754,
7,
16,
15,
15,
15,
568,
15454,
1005,
455,
2204,
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_option_collector_some() -> crate::Result<()> {
let searcher = make_test_searcher()?;
let counts = searcher.search(&AllQuery, &Some(Count))?;
assert_eq!(counts, Some(2));
Ok(())
} | rust_cleaned_test_functions.jsonl/130047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
10211,
27669,
61855,
368,
1464,
17717,
486,
2077,
71698,
341,
262,
1077,
94674,
284,
1281,
4452,
10716,
261,
94136,
262,
1077,
14579,
284,
94674,
9288,
2099,
2403,
2859,
11,
609,
8373,
7,
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
] | 3 |
#[test]
fn test_dim_after_variable_assignment_duplicate_definition() {
let program = r#"
A = 42
DIM A AS INTEGER
"#;
assert_linter_err!(program, QError::DuplicateDefinition, 3, 17);
} | rust_cleaned_test_functions.jsonl/122456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10791,
19844,
14635,
51891,
70434,
31698,
368,
341,
262,
1077,
2025,
284,
435,
2,
698,
310,
362,
284,
220,
19,
17,
198,
310,
50859,
362,
5752,
30381,
198,
310,
5869,
280,
262,
2060,
907,
2245,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_macros() {
let empty_includes: [PathBuf; 0] = [];
let defines = vec![("NAME1", ""), ("NAME2", "58")];
let no_defines: [(String, String); 0] = [];
let need_defines = "
#version 450
#if defined(NAME1) && NAME2 > 29
void main() {}
#end... | rust_cleaned_test_functions.jsonl/3150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
85904,
368,
341,
286,
1077,
4287,
1243,
7396,
25,
508,
1820,
15064,
26,
220,
15,
60,
284,
5907,
286,
1077,
18653,
284,
7486,
20703,
445,
7535,
16,
497,
77130,
3489,
7535,
17,
497,
330,
20,
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_deserialize_envelope_empty_newline() {
// With terminating newline after header
let bytes = Bytes::from("{\"event_id\":\"9ec79c33ec9942ab8353589fcb2e04dc\",\"dsn\":\"https://e12d836b15bb49d7bbf99e64295d995b:@sentry.io/42\"}\n");
let envelope = Envelope::parse_bytes(bytes)... | rust_cleaned_test_functions.jsonl/103610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
6205,
18853,
15124,
5921,
1056,
368,
341,
286,
442,
3085,
70581,
39027,
1283,
4247,
198,
286,
1077,
5820,
284,
30024,
486,
1499,
99141,
3087,
842,
23488,
24,
757,
22,
24,
66,
18,
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_fold_assign() {
test("x=x", "");
test_same("x=xy");
test_same("x=x + 1");
test_same("x.a=x.a");
test("var y=(x=x)", "var y=x");
test("y=1 + (x=x)", "y=1 + x");
} | rust_cleaned_test_functions.jsonl/467 | {
"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,
61187,
20688,
368,
341,
262,
1273,
445,
87,
25387,
497,
14498,
262,
1273,
33574,
445,
87,
28,
4130,
797,
262,
1273,
33574,
445,
87,
25387,
488,
220,
16,
797,
262,
1273,
33574,
445,
87,
5849,
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_whitespace() {
use Token::*;
let (tokens, maybe_error) =
tokenize_string(" add \n\t \t\tsubtract\nend\tfrom # loop loop\tend\ntimes ");
assert_eq!(tokens, vec![Add, Subtract, End, From, Times]);
assert!(maybe_error.is_none());
} | rust_cleaned_test_functions.jsonl/78237 | {
"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,
86175,
368,
341,
286,
990,
9660,
56162,
286,
1077,
320,
30566,
11,
7196,
4096,
8,
4035,
310,
77651,
3904,
445,
220,
912,
256,
1124,
77,
4955,
256,
1124,
83,
4955,
59442,
1699,
408,
4955,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_var_eof() {
let mut buf = vec![0x80; 9];
buf.push(0x2);
check_error!(buf.as_slice().decode_var_u64(), ErrorKind::InvalidData);
check_error!(buf.as_slice().decode_var_i64(), ErrorKind::InvalidData);
buf = vec![0x80; 3];
check_error!(buf.as_slice().... | rust_cleaned_test_functions.jsonl/39060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
90792,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
20703,
15,
87,
23,
15,
26,
220,
24,
935,
286,
6607,
2552,
7,
15,
87,
17,
317,
286,
1779,
4096,
10297,
5909,
5357,
26488,
1005,
18196,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prefix_punctuation() {
check_word_count(
"!%%#testing, 1, 2 testing",
vec![("testing", 2),
("1", 1),
("2", 1)]);
} | rust_cleaned_test_functions.jsonl/109973 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13974,
620,
72299,
368,
341,
262,
1779,
13533,
3180,
1006,
286,
53074,
2769,
2,
8840,
11,
220,
16,
11,
220,
17,
7497,
756,
286,
7486,
20703,
445,
8840,
497,
220,
17,
1326,
1797,
3489,
16,
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 |
#[test]
fn test_validate_circuit_empty_endpoint() {
let store = setup_admin_service_store();
let event_store = store.clone_boxed();
let (mesh, cm, pm, peer_connector) = setup_peer_connector(None);
let orchestrator = setup_orchestrator();
let signature_verifier = Secp256... | rust_cleaned_test_functions.jsonl/47877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 802
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
666,
37268,
15124,
36699,
368,
341,
286,
1077,
3553,
284,
6505,
12207,
12267,
14809,
543,
286,
1077,
1538,
14809,
284,
3553,
15997,
10194,
291,
1428,
286,
1077,
320,
23506,
11,
9961,
11,
88... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_edge_present_directed() {
let mut net: Network<&str, usize> = Network::new(true);
net.add_edge("A", "B", 1);
assert!(
net.edge_data("A", "B").is_some(),
"There should be an edge between A and B"
);
assert!(
net.edge_data("B", "A").is_none(),
... | rust_cleaned_test_functions.jsonl/127180 | {
"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,
17932,
36976,
32871,
291,
368,
341,
262,
1077,
5206,
4179,
25,
8141,
52244,
495,
11,
22301,
29,
284,
8141,
486,
931,
3715,
626,
262,
4179,
1364,
17932,
445,
32,
497,
330,
33,
497,
220,
16,
626... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_variant() {
#[allow(dead_code)]
#[derive(Debug, CandidType)]
enum E {
Foo,
Bar(bool, i32),
Baz { a: i32, b: u32 },
Newtype(bool),
}
let v = E::Bar(true, 42);
assert_eq!(
get_type(&v),
Type::Variant(vec![
field(
... | rust_cleaned_test_functions.jsonl/103096 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
368,
341,
262,
11506,
7183,
83207,
4136,
5563,
262,
11506,
27098,
42618,
11,
93816,
929,
5563,
262,
7618,
468,
341,
286,
33428,
345,
286,
4716,
9764,
11,
600,
18,
17,
1326,
286,
91711,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte_array() {
ByteArrayType::test(Encoding::PLAIN, TEST_SET_SIZE, -1);
ByteArrayType::test(Encoding::PLAIN_DICTIONARY, TEST_SET_SIZE, -1);
ByteArrayType::test(Encoding::DELTA_LENGTH_BYTE_ARRAY, TEST_SET_SIZE, -1);
ByteArrayType::test(Encoding::DELTA_BYTE_ARRAY, TEST_SET_SIZE, -1... | rust_cleaned_test_functions.jsonl/45126 | {
"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,
19737,
3858,
368,
341,
262,
32920,
929,
486,
1944,
85177,
486,
90889,
11,
13602,
8481,
4098,
11,
481,
16,
317,
262,
32920,
929,
486,
1944,
85177,
486,
90889,
44663,
3580,
8642,
11,
13602,
8481,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type_executable() {
use std::os::unix::fs::OpenOptionsExt;
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
fs::OpenOptions::new()
.create(true)
.write(true)
.mode(0o777)
.open(te.test_root().join("executable-file.sh"))
.unwrap();
te.... | rust_cleaned_test_functions.jsonl/10881 | {
"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,
1819,
18430,
5922,
368,
341,
262,
990,
1460,
486,
436,
486,
56646,
486,
3848,
486,
5002,
3798,
6756,
401,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte_get_value_of_bits() {
fn run(byte: u8, range: RangeInclusive<u8>) -> u8 {
let out = Byte::new(byte);
out.get_value_of_bits(range)
}
assert_eq!(run(0x00, 0..=7), 0x00);
assert_eq!(run(0xFF, 0..=7), 0xFF);
assert_eq!(run(0b0000_... | rust_cleaned_test_functions.jsonl/126283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
3062,
3142,
3575,
20034,
368,
341,
286,
5168,
1598,
19738,
25,
575,
23,
11,
2088,
25,
16437,
641,
8336,
34837,
23,
9231,
1464,
575,
23,
341,
310,
1077,
700,
284,
10906,
486,
931,
19738,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_duration() {
let cases = vec![("11:30:45.123456"), ("-35:30:46")];
let tz = Tz::utc();
for s in cases {
let d = MyDuration::parse(s.as_bytes(), MAX_FSP).unwrap();
let get = Time::from_duration(&tz, TimeType::DateTime, d).unwrap();
... | rust_cleaned_test_functions.jsonl/93961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
25454,
368,
341,
286,
1077,
5048,
284,
7486,
20703,
445,
16,
16,
25,
18,
15,
25,
19,
20,
13,
16,
17,
18,
19,
20,
21,
3975,
98670,
18,
20,
25,
18,
15,
25,
19,
21,
899,
935,
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... | 2 |
#[test]
fn test_new_containing_spread_2() {
// be preserved.
test("new Date(foo(), ...c, bar())", "(foo(), [...c], bar())");
} | rust_cleaned_test_functions.jsonl/464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
10260,
2056,
10123,
878,
62,
17,
368,
341,
1066,
262,
442,
387,
33583,
624,
262,
1273,
445,
931,
2631,
71880,
1507,
2503,
66,
11,
3619,
2140,
497,
11993,
7975,
1507,
16303,
66,
1125,
3619,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_drain_filter_drop_panic_leak() {
static PREDS: AtomicU32 = AtomicU32::new(0);
static DROPS: AtomicU32 = AtomicU32::new(0);
#[derive(PartialEq, Eq, PartialOrd, Ord)]
struct D(i32);
impl Drop for D {
fn drop(&mut self) {
if DROPS.fetch_add(1, SeqCst) == 1 {... | rust_cleaned_test_functions.jsonl/12216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
8727,
29584,
620,
31270,
11751,
585,
368,
341,
262,
1099,
20952,
5936,
25,
30316,
52,
18,
17,
284,
30316,
52,
18,
17,
486,
931,
7,
15,
317,
262,
1099,
422,
1285,
5012,
25,
30316,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_env_assign_to_keyword() {
let mut env = Environment::new();
let value = Value::Scalar(YololNumber::zero().into());
env.let_value("sum", value.clone()).unwrap();
} | rust_cleaned_test_functions.jsonl/131946 | {
"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,
15879,
20688,
2346,
45824,
368,
341,
262,
1077,
5206,
6105,
284,
11586,
486,
931,
543,
262,
1077,
897,
284,
5162,
486,
20639,
20206,
337,
337,
2833,
486,
14154,
1005,
18122,
1423,
262,
6105,
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 |
#[test]
fn test_for_loop() {
test! {
let it = AST::SimpleIdentifier(SimpleIdentifier::new_wrapped("i".to_string()));
let vec = AST::SimpleIdentifier(SimpleIdentifier::new_wrapped("vec".to_string()));
let sym = AST::SimpleIdentifier(SimpleIdentifier::new_wrapped("a".t... | rust_cleaned_test_functions.jsonl/75443 | {
"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,
5478,
17198,
368,
341,
286,
1273,
0,
341,
310,
1077,
432,
284,
22465,
486,
16374,
8714,
3759,
6456,
8714,
486,
931,
44074,
5677,
445,
72,
3263,
983,
3904,
7392,
310,
1077,
7486,
284,
22465,
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_display_traffic_model() {
assert_eq!("best_guess", TrafficModel::BestGuess.to_string());
assert_eq!("optimistic", TrafficModel::Optimistic.to_string());
assert_eq!("pessimistic", TrafficModel::Pessimistic.to_string());
} | rust_cleaned_test_functions.jsonl/75494 | {
"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,
14825,
90012,
5047,
368,
341,
286,
2060,
10714,
17223,
15862,
54737,
497,
36981,
1712,
486,
14470,
45730,
2389,
3904,
1423,
286,
2060,
10714,
17223,
19133,
4532,
497,
36981,
1712,
486,
21367,
318,
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 |
#[test]
fn test_verifies_input_files() {
new_ucmd!()
.args(&["/dev/random", "nonexistent_file"])
.fails()
.status_code(2)
.stderr_is("sort: cannot read: nonexistent_file: No such file or directory");
} | rust_cleaned_test_functions.jsonl/20543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26042,
9606,
5898,
10931,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
14,
3583,
79442,
497,
330,
6280,
64085,
2458,
14108,
286,
659,
59631,
741,
286,
659,
2829,
4136,
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_associated_function() {
check_highlighting(
r#"
fn not_static() {}
struct foo {}
impl foo {
pub fn is_static() {}
pub fn is_not_static(&self) {}
}
trait t {
fn t_is_static() {}
fn t_is_not_static(&self) {}
}
impl t for foo {
pub fn is_static() {}
pub fn is... | rust_cleaned_test_functions.jsonl/5127 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58665,
657,
9174,
368,
341,
262,
1779,
74546,
287,
1006,
286,
435,
2,
698,
8822,
537,
25360,
368,
10086,
1235,
15229,
10086,
6383,
15229,
341,
262,
6675,
5168,
374,
25360,
368,
5613,
262,
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_p2p_magic_number_fmt() {
assert_eq!(format!("{}", P2pNetworkId::Mainnet), "mainnet");
assert_eq!(format!("{}", P2pNetworkId::Testnet), "testnet");
assert_eq!(format!("{}", P2pNetworkId::Regtest), "regtest");
assert_eq!(format!("{}", P2pNetworkId::Signet), "signet"... | rust_cleaned_test_functions.jsonl/115616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
17,
79,
54612,
5500,
38128,
368,
341,
286,
2060,
10714,
10297,
2243,
79878,
393,
17,
79,
12320,
764,
486,
6202,
4711,
701,
330,
3817,
4711,
797,
286,
2060,
10714,
10297,
2243,
79878,
393,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_read_multiple_registers() {
let (_s, cfg) = start_dummy_server_with_cfg();
let mut trans = Transport::new_with_cfg("127.0.0.1", cfg).unwrap();
assert!(trans.write_multiple_registers(0, &[23]).is_ok());
assert_eq!(trans.read_holding_registers(0, 1).u... | rust_cleaned_test_functions.jsonl/46843 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
6443,
45233,
78360,
368,
341,
286,
1077,
5453,
82,
11,
13286,
8,
284,
1191,
60321,
12015,
6615,
18343,
543,
286,
1077,
5206,
1356,
284,
16742,
486,
931,
6615,
18343,
445,
16,
17,
22,
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_arc_string() {
let b = Arc::new("test".to_owned());
assert_eq!(Binary::from(b.clone()).len(), 4);
assert_eq!(Binary::from(b.clone()).as_ref(), b"test");
assert_eq!(Binary::from(&b).len(), 4);
assert_eq!(Binary::from(&b).as_ref(), b"test");
} | rust_cleaned_test_functions.jsonl/89000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62914,
3904,
368,
341,
286,
1077,
293,
284,
19689,
486,
931,
445,
1944,
3263,
983,
51973,
1423,
286,
2060,
10714,
10297,
21338,
486,
1499,
1883,
15997,
6011,
2892,
1507,
220,
19,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_against_prim() {
for _ in 0..NRANDOM {
let m = random::<u8>() | 1;
let e = random::<u8>();
let (a, b) = (random::<u8>(), random::<u8>());
let am = MontgomeryInt::new(a, m);
let bm = am.convert(b);
assert_eq!((am + bm... | rust_cleaned_test_functions.jsonl/17998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1902
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62427,
267,
87419,
368,
341,
286,
369,
716,
304,
220,
15,
496,
26319,
36415,
341,
310,
1077,
296,
284,
4194,
27638,
84,
23,
13555,
760,
220,
16,
280,
310,
1077,
384,
284,
4194,
27638,
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... | 2 |
#[test]
fn test_run_and_sum() {
let full_program: Vec<Program> = vec![
Program {
mask: "000000000000000000000000000000X1001X".to_owned(),
mem: vec![(42, 100)],
},
Program {
mask: "00000000000000000000000000000000X0XX".to... | rust_cleaned_test_functions.jsonl/89717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
8378,
10160,
368,
341,
286,
1077,
2480,
25096,
25,
11312,
27,
10690,
29,
284,
7486,
90515,
310,
6687,
341,
394,
6911,
25,
330,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_visiblestring() {
assert_writes::<VisibleString>(&[
(
VisibleString::new("Test User 1").unwrap(),
b"\x1a\x0bTest User 1",
),
(
VisibleString::new("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx... | rust_cleaned_test_functions.jsonl/129890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
34371,
917,
368,
341,
286,
2060,
1670,
23262,
27638,
5715,
703,
44784,
9640,
310,
2399,
394,
70296,
703,
486,
931,
445,
2271,
2657,
220,
16,
1827,
15454,
3148,
394,
293,
11934,
87,
16,
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_decode_ldrh_reg_w() {
assert_eq!(
decode_32(0xf838301a),
Instruction::LDRH_reg {
params: Reg3FullParams {
rt: Reg::R3,
rn: Reg::R8,
rm: Reg::R10,
shift_t: SRType::LSL,
shift_n: 1... | rust_cleaned_test_functions.jsonl/64847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
50573,
40096,
4920,
1670,
368,
341,
14808,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
23,
18,
23,
18,
15,
16,
64,
1326,
286,
29051,
486,
43,
7687,
39,
4920,
341,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_csdv1b() {
const EXAMPLE: CsdV1 = CsdV1 {
data: hex!("00 26 00 32 5F 59 83 C8 AD DB CF FF D2 40 40 A5"),
};
// CSD Structure: describes version of CSD structure
// 0b00 [Interpreted: Version 1.0]
assert_eq!(EXAMPLE.csd_ver(), 0x00);
/... | rust_cleaned_test_functions.jsonl/130555 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2057
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
13446,
85,
16,
65,
368,
341,
286,
733,
66246,
25,
356,
13446,
53,
16,
284,
356,
13446,
53,
16,
341,
310,
821,
25,
12371,
17223,
15,
15,
220,
17,
21,
220,
15,
15,
220,
18,
17,
220,
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_report() {
let subcommand = Subcommand::Report {
filter: Default::default(),
report_name: "myreport".to_owned(),
};
assert_eq!(
Subcommand::parse(argv!["myreport"]).unwrap(),
(&EMPTY[..], subcommand)
);
} | rust_cleaned_test_functions.jsonl/84283 | {
"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,
14813,
368,
341,
286,
1077,
1186,
5631,
284,
3719,
5631,
486,
10361,
341,
310,
4051,
25,
7899,
486,
2258,
3148,
310,
1895,
1269,
25,
330,
2408,
11736,
3263,
983,
51973,
3148,
286,
2605,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_same_key_type() {
static key1: Key<int> = &Key;
static key2: Key<int> = &Key;
static key3: Key<int> = &Key;
static key4: Key<int> = &Key;
static key5: Key<int> = &Key;
key1.replace(Some(1));
key2.replace(Some(2));
key3.replace(Some(... | rust_cleaned_test_functions.jsonl/73201 | {
"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,
33574,
3097,
1819,
368,
341,
286,
1099,
1376,
16,
25,
5309,
4159,
29,
284,
609,
1592,
280,
286,
1099,
1376,
17,
25,
5309,
4159,
29,
284,
609,
1592,
280,
286,
1099,
1376,
18,
25,
5309,
4159,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mp_reach_nlri_path_attribute() {
let mp_reach_bytes: &[u8] = &[
0x00, 0x02, // IPv6
0x01, // Unicast
0x10, // Length of IPv6 nexthop
0x20, 0x01, 0x0d, 0xb8, 0x00, 0x00, 0x00, 0x00, // nh addr part one
0x00, 0x00, 0x00, 0x00, 0x0... | rust_cleaned_test_functions.jsonl/49694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 842
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39898,
1288,
610,
81052,
461,
2638,
16791,
368,
341,
286,
1077,
10490,
1288,
610,
12524,
25,
44590,
84,
23,
60,
284,
609,
9640,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
17,
11,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_index() {
let mut map = VecDequeMap::new();
map.insert(1, 2);
map.insert(2, 1);
map.insert(3, 4);
assert_eq!(map[3], 4);
} | rust_cleaned_test_functions.jsonl/51626 | {
"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,
3560,
368,
341,
310,
1077,
5206,
2415,
284,
11312,
73891,
2227,
486,
931,
1428,
310,
2415,
7030,
7,
16,
11,
220,
17,
317,
310,
2415,
7030,
7,
17,
11,
220,
16,
317,
310,
2415,
7030,
7,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_remove_nonleaf_table() {
given(r#"
title = "not relevant"
# comment 1
[a.b.c] # comment 1.1
key1 = 1 # comment 1.2
# comment 2
[b] # comment 2.1
key2 = 2 # comment 2.2
# comment 3
[a] # comment 3.1
key3 = 3 # c... | rust_cleaned_test_functions.jsonl/36879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 506
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
21637,
24153,
5237,
368,
341,
262,
2661,
2601,
2,
698,
286,
2265,
284,
330,
1921,
9760,
1837,
286,
671,
3980,
220,
16,
198,
286,
508,
64,
948,
520,
60,
671,
3980,
220,
16,
13,
16,
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... | 1 |
#[test]
fn test_eval_nhwc_3() {
setup_test_logger();
let op = Conv::default().nhwc().hwio().padding(PaddingSpec::SameUpper);
let i = rctensor4(&[[[[0.0f32, 1.0], [2.0, 3.0]], [[10.0, 11.0], [12.0, 13.0]]]]);
let k = rctensor4(&[[[[1.0f32, 0.0], [0.0, 1.0]]]]);
let res = o... | rust_cleaned_test_functions.jsonl/51978 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
93934,
24028,
62,
18,
368,
341,
286,
6505,
4452,
27413,
543,
286,
1077,
1179,
284,
28988,
486,
2258,
1005,
16719,
24028,
1005,
27827,
815,
1005,
9571,
5304,
2998,
8327,
486,
19198,
14251,
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_mount_to_container() {
let tmp_dir = create_temp_dir("test_mount_to_container").unwrap();
{
let m = Mount::new();
let mount = &SpecMountBuilder::default()
.destination(PathBuf::from("/dev/pts"))
.typ("devpts")
... | rust_cleaned_test_functions.jsonl/2894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2018
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57593,
2346,
15847,
368,
341,
286,
1077,
4174,
4334,
284,
1855,
11771,
4334,
445,
1944,
57593,
2346,
15847,
1827,
15454,
543,
286,
341,
310,
1077,
296,
284,
10423,
486,
931,
543,
310,
1077,
6470,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all_valid_paths_small_sample() {
let inputs = read_lines("data/day_12_sample.txt");
let (_, cave_edges) = parse_cave_system(&inputs);
let paths = all_paths(&cave_edges, 1);
assert_eq!(paths.len(), 10);
let paths = all_paths(&cave_edges, 2);
assert_eq!(paths.len(), 36);
... | rust_cleaned_test_functions.jsonl/42447 | {
"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,
5705,
8337,
24152,
31966,
17491,
368,
341,
262,
1077,
11127,
284,
1349,
18323,
445,
691,
44739,
62,
16,
17,
17491,
3909,
797,
262,
1077,
39464,
25385,
28026,
8,
284,
4715,
666,
523,
17687,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_maturities_are_invariant_by_stake_scaling() {
assert_eq!(compute_maturities(vec![1], vec!["P"]), vec![100]);
assert_eq!(compute_maturities(vec![2], vec!["P"],), vec![100]);
assert_eq!(compute_maturities(vec![43_330], vec!["P"]), vec![100]);
} | rust_cleaned_test_functions.jsonl/1131 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
2628,
1361,
56855,
1243,
15969,
3710,
1261,
726,
79216,
368,
341,
262,
2060,
10714,
10297,
27706,
717,
2628,
1361,
25592,
20703,
16,
1125,
7486,
0,
1183,
47,
63624,
7486,
20703,
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_is_code_block_start() {
#[derive(Debug)]
struct TestCase {
it: String,
input: String,
expected: bool,
}
let test_cases = [
TestCase {
it: String::from("should retur... | rust_cleaned_test_functions.jsonl/957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 781
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
4136,
7113,
4906,
368,
341,
310,
11506,
27098,
42618,
5563,
310,
2036,
30573,
341,
394,
432,
25,
923,
345,
394,
1946,
25,
923,
345,
394,
3601,
25,
1807,
345,
310,
456,
310,
1077,
1273,
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... | 2 |
#[test]
fn test_subs_to_float() {
let subs = vec!["a", "b", "c", "c", "b", "d", "a"];
assert_eq!(vec![0f32, 1f32, 2f32, 2f32, 1f32, 3f32, 0f32],
subs_to_float(&subs[..]))
} | rust_cleaned_test_functions.jsonl/787 | {
"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,
82767,
2346,
17586,
368,
341,
286,
1077,
5147,
284,
7486,
0,
1183,
64,
497,
330,
65,
497,
330,
66,
497,
330,
66,
497,
330,
65,
497,
330,
67,
497,
330,
64,
6332,
286,
2060,
10714,
10297,
4083... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_config_date() {
let mut c = Config::with_none();
c.date = Some("date".into());
assert_eq!(Some(DateFlag::Date), DateFlag::from_config(&c));
} | rust_cleaned_test_functions.jsonl/1306 | {
"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,
5673,
5332,
4164,
368,
341,
286,
1077,
5206,
272,
284,
5532,
486,
4197,
31488,
543,
286,
272,
9907,
284,
4329,
445,
1028,
3263,
18122,
5231,
286,
2060,
10714,
10297,
8373,
19987,
12135,
486,
1916,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pycrypto_xsalsa20() {
let key = "a6a7251c1e72916d11c2cb214d3c252539121d8e234e652d651fa4c8cff88030"
.from_hex()
.expect("Failed to decode hex string.");
let iv = "9e645a74e9e0a60d8243acd9177ab51a1beb8d5a2f5d700c"
.from_hex()
.expect(... | rust_cleaned_test_functions.jsonl/68302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
3337,
9444,
80646,
41826,
17,
15,
368,
341,
286,
1077,
1376,
284,
330,
64,
21,
64,
22,
17,
20,
16,
66,
16,
68,
22,
17,
24,
16,
21,
67,
16,
16,
66,
17,
7221,
17,
16,
19,
67,
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... | 3 |
#[test]
fn test_required_unless_valid_not_match() {
let mut params = Map::new();
params.assign("required", Value::String("".to_owned())).ok();
params.assign("other", Value::Boolean(true)).ok();
let mut rules = BTreeMap::new();
rules.insert("required",
vec![Rule::RequiredUnl... | rust_cleaned_test_functions.jsonl/108927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18743,
4907,
1717,
8337,
7913,
10708,
368,
341,
262,
1077,
5206,
3628,
284,
5027,
486,
931,
543,
262,
3628,
17870,
445,
6279,
497,
5162,
486,
703,
445,
3263,
983,
51973,
34670,
562,
543,
262,
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_filter_run_union_array_dense() {
let mut builder = UnionBuilder::new_dense(3);
builder.append::<Int32Type>("A", 1).unwrap();
builder.append::<Int32Type>("A", 3).unwrap();
builder.append::<Int32Type>("A", 34).unwrap();
let array = builder.build().unwrap();
... | rust_cleaned_test_functions.jsonl/75316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
14007,
51621,
3858,
72619,
368,
341,
286,
1077,
5206,
7363,
284,
9145,
3297,
486,
931,
72619,
7,
18,
317,
286,
7363,
2057,
27638,
1072,
18,
17,
929,
13211,
32,
497,
220,
16,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rdr_rule_with_to_v4_address_port_to_v4_address_port() {
assert_eq!(
parse_str_to_rdr_rules("rdr to 1.2.3.4 port 10000 -> to 192.168.1.1 port 20000;"),
Ok(vec![filter::Rdr {
proto: filter::SocketProtocol::Any,
dst_addr: net::IpAddres... | rust_cleaned_test_functions.jsonl/29492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
3612,
21124,
6615,
2346,
2273,
19,
6744,
8716,
2346,
2273,
19,
6744,
8716,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
2895,
2346,
1710,
3612,
21407,
445,
81,
3612,
311,
220,
16,
13,
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_poisson_10() {
let poisson = Poisson::new(10.0).unwrap();
let mut rng = crate::test::rng(123);
let mut sum_u64 = 0;
let mut sum_f64 = 0.;
for _ in 0..1000 {
let s_u64: u64 = poisson.sample(&mut rng);
let s_f64: f64 = poisson.sample(... | rust_cleaned_test_functions.jsonl/118283 | {
"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,
620,
29048,
930,
62,
16,
15,
368,
341,
286,
1077,
3193,
48263,
284,
13808,
48263,
486,
931,
7,
16,
15,
13,
15,
568,
15454,
543,
286,
1077,
5206,
28422,
284,
17717,
486,
1944,
486,
69890,
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... | 3 |
#[test]
fn test_debug() {
assert_eq!(
format!(
"{:?}",
Fp([0x5360bb5978678032, 0x7dd275ae799e128e, 0x5c5b5071ce4f4dcf, 0xcdb21f93078dbb3e, 0xc32365c5e73f474a, 0x115a2a5489babe5b])
),
"0x104bf052ad3bc99bcb176c24a06a6c3aad4eaf2308fc4d282e106c84a757d0610526305153... | rust_cleaned_test_functions.jsonl/70425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
368,
341,
262,
2060,
10714,
33673,
286,
3561,
33673,
310,
13868,
76475,
24375,
310,
434,
79,
2561,
15,
87,
20,
18,
21,
15,
6066,
20,
24,
22,
23,
21,
22,
23,
15,
18,
17,
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_inner_doc_comment_of_items() {
let file = SourceFile::parse(
r#"
//! doc
// non-doc
mod foo {}
"#,
)
.ok()
.unwrap();
let module = file.syntax().descendants().find_map(Module::cast).unwrap();
assert!(module.doc_comments().doc_commen... | rust_cleaned_test_functions.jsonl/60277 | {
"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,
34345,
18869,
17638,
3575,
12134,
368,
341,
262,
1077,
1034,
284,
8748,
1703,
486,
6400,
1006,
286,
435,
2,
698,
286,
17664,
4629,
198,
286,
442,
2477,
11527,
198,
286,
1463,
15229,
5613,
286,
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_summarization_t5() -> anyhow::Result<()> {
// Set-up translation model
let summarization_config = SummarizationConfig {
model_type: ModelType::T5,
model_resource: Box::new(RemoteResource::from_pretrained(T5ModelResources::T5_SMALL)),
config_resource: Box::new(R... | rust_cleaned_test_functions.jsonl/48975 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 990
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
5612,
2022,
528,
20,
368,
1464,
88964,
486,
2077,
71698,
341,
262,
442,
262,
2573,
5239,
14468,
1614,
198,
262,
1077,
28285,
2022,
5332,
284,
8116,
5612,
2022,
2648,
341,
286,
1614,
1819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_xor() {
assert_eq!(false, xor(false, false));
assert_eq!(true, xor(false, true));
assert_eq!(true, xor(true, false));
assert_eq!(false, xor(true, true));
} | rust_cleaned_test_functions.jsonl/90316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76462,
368,
341,
220,
2060,
10714,
10297,
3849,
11,
53941,
3576,
11,
895,
1106,
220,
2060,
10714,
10297,
1866,
11,
53941,
3576,
11,
830,
1106,
220,
2060,
10714,
10297,
1866,
11,
53941,
3715,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_validators_in_whitelist() {
let regular = make_keys(REGULAR_PEERS, 4);
let validators = make_keys(VALIDATORS[0], 2);
let mut connect_list = ConnectList::default();
check_in_connect_list(&connect_list, ®ular, &[], &[0, 1, 2, 3]);
check_in_connect_list(&c... | rust_cleaned_test_functions.jsonl/28573 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
2973,
1243,
36225,
57645,
368,
341,
286,
1077,
5792,
284,
1281,
12631,
61211,
7081,
45784,
4321,
11,
220,
19,
317,
286,
1077,
38588,
284,
1281,
12631,
7,
10044,
60345,
58,
15,
1125,
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... | 1 |
#[test]
fn test_builder() {
let child_arr_data = ArrayData::new(
DataType::Int32,
5,
Some(0),
None,
0,
vec![Buffer::from_slice_ref(&[1i32, 2, 3, 4, 5])],
vec![],
);
let v = vec![0, 1, 2, 3];
let b... | rust_cleaned_test_functions.jsonl/133938 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 602
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
368,
341,
286,
1077,
1682,
11210,
1769,
284,
2910,
1043,
486,
931,
1006,
310,
33172,
486,
1072,
18,
17,
345,
310,
220,
20,
345,
310,
4329,
7,
15,
1326,
310,
2240,
345,
310,
220,
15,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_externs_tracking_hash_different_construction_order() {
let mut v1 = Options::default();
let mut v2 = Options::default();
let mut v3 = Options::default();
v1.externs = Externs::new(mk_map(vec![
(String::from("a"), new_public_extern_entry(vec!["b", "c"])),
(String:... | rust_cleaned_test_functions.jsonl/100716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
4301,
82,
66105,
8950,
82741,
3382,
3024,
7869,
368,
341,
262,
1077,
5206,
348,
16,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
17,
284,
14566,
486,
2258,
543,
262,
1077,
5206,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_array_slice() {
let a_slice = Int32Array::from(vec![5, 6, 7, 8, 9]).slice(1, 4);
let a = a_slice.as_ref();
let b = BooleanArray::from(vec![true, false, false, true]);
// filtering with sliced filter array is not currently supported
... | rust_cleaned_test_functions.jsonl/18779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
3858,
26488,
368,
341,
286,
1077,
264,
26488,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
10697,
24963,
7,
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... | 1 |
#[test]
fn test_c_str_len_panic() {
// expect panic because there is no terminating null
let _ = c_str_len_ptr("hallo".repeat(100000).as_ptr());
} | rust_cleaned_test_functions.jsonl/117736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2895,
6043,
620,
31270,
368,
341,
286,
442,
1720,
21975,
1576,
1052,
374,
902,
70581,
845,
198,
286,
1077,
716,
284,
272,
2895,
6043,
4348,
445,
11866,
385,
3263,
30624,
7,
16,
15,
15,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_clone() {
use std::sync::{
atomic::{AtomicUsize, Ordering},
Arc,
};
let count = Arc::new(AtomicUsize::new(0));
let value = Value::new(Foo(count.clone()));
assert_eq!(0, count.load(Ordering::SeqCst));
drop(value.clone());
... | rust_cleaned_test_functions.jsonl/51065 | {
"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,
54742,
368,
341,
286,
990,
1460,
486,
12996,
74843,
310,
24510,
22964,
65857,
52,
2141,
11,
68621,
1583,
310,
19689,
345,
286,
3634,
286,
1077,
1760,
284,
19689,
486,
931,
7,
65857,
52,
2141,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_response_json() {
let server = server::http(move |_req| async { http::Response::new("\"Hello\"".into()) });
let url = format!("http://{}/json", server.addr());
let res = reqwest::blocking::get(&url).unwrap();
assert_eq!(res.url().as_str(), &url);
assert_eq!(res.status(), req... | rust_cleaned_test_functions.jsonl/131402 | {
"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,
9655,
9455,
368,
341,
262,
1077,
3538,
284,
3538,
486,
1254,
34081,
70886,
2958,
91,
3312,
314,
1758,
486,
2582,
486,
931,
38915,
9707,
2105,
3263,
18122,
2140,
3011,
262,
1077,
2515,
284,
3561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_qr_code_url() {
let qr_code_url = authenticator::create_qr_code_url("foobar", "DGF3J5CSIU2JN6WEHECHIUUCLYHCNYAW");
println!("{}", qr_code_url)
} | rust_cleaned_test_functions.jsonl/89602 | {
"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,
8976,
81,
4136,
2903,
368,
341,
286,
1077,
49290,
4136,
2903,
284,
13210,
850,
486,
3182,
8976,
81,
4136,
2903,
445,
50267,
497,
330,
35,
36332,
18,
41,
20,
48407,
52,
17,
41,
45,
21,
12457,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_unity_android_api_version() {
let description = "Android OS 11 / API-30 (RP1A.201005.001/2107031736)";
assert_eq_dbg!(Some("30"), get_android_api_version(description));
} | rust_cleaned_test_functions.jsonl/68968 | {
"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,
62,
2439,
56665,
11697,
9438,
368,
341,
262,
1077,
4008,
284,
330,
21831,
10085,
220,
16,
16,
608,
5333,
12,
18,
15,
320,
21657,
16,
32,
13,
17,
15,
16,
15,
15,
20,
13,
15,
15,
16,
14,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_enum_not_applicable_for_element_with_no_fields() {
check_assist_not_applicable(extract_struct_from_enum_variant, r#"enum A { $0One }"#);
} | rust_cleaned_test_functions.jsonl/36313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
31054,
7913,
8191,
46114,
5478,
7894,
6615,
6536,
12132,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
5463,
2144,
15126,
5673,
31054,
46112,
11,
435,
55543,
9018,
362,
314,
400,
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 |
#[test]
fn test_ctoption() {
let a = CtOption::new(10, Choice::from(1));
let b = CtOption::new(9, Choice::from(1));
let c = CtOption::new(10, Choice::from(0));
let d = CtOption::new(9, Choice::from(0));
// Test is_some / is_none
assert!(bool::from(a.is_some()));
assert!(bool::from(!... | rust_cleaned_test_functions.jsonl/106392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26134,
2047,
368,
341,
262,
1077,
264,
284,
62279,
5341,
486,
931,
7,
16,
15,
11,
27107,
486,
1499,
7,
16,
1106,
262,
1077,
293,
284,
62279,
5341,
486,
931,
7,
24,
11,
27107,
486,
1499,
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... | 7 |
#[test]
fn test_account_one() {
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();
let ... | rust_cleaned_test_functions.jsonl/49129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
11667,
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,
10563,
25,
11312,
21604... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_reader_get_value_boundary() {
let buffer = vec![10, 0, 0, 0, 20, 0, 30, 0, 0, 0, 40, 0];
let mut bit_reader = BitReader::from(buffer);
assert_eq!(bit_reader.get_value::<i64>(32), Some(10));
assert_eq!(bit_reader.get_value::<i64>(16), Some(20));
assert_... | rust_cleaned_test_functions.jsonl/115729 | {
"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,
13996,
22306,
3062,
3142,
54004,
368,
341,
286,
1077,
4147,
284,
7486,
20703,
16,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
17,
15,
11,
220,
15,
11,
220,
18,
15,
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_get_info_string() {
macro_rules! assert_get_info_string {
($markdown:expr, $start:expr, $expected_range: expr) => {{
let bytes = $markdown.as_bytes();
let slice = get_info_string(bytes, $start);
if let Some((s, e)) = $expected_... | rust_cleaned_test_functions.jsonl/21608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
3109,
3904,
368,
341,
286,
18072,
21407,
0,
2060,
3062,
3109,
3904,
341,
310,
1711,
60073,
96011,
11,
400,
2468,
96011,
11,
400,
7325,
9698,
25,
15169,
8,
589,
80505,
394,
1077,
5820,
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_wait_one_connection() {
let path_to_socket = "/tmp/test_socket_http_server1.sock";
fs::remove_file(path_to_socket).unwrap_or_default();
let mut server = HttpServer::new(path_to_socket.to_string()).unwrap();
server.start_server().unwrap();
// Test one inc... | rust_cleaned_test_functions.jsonl/2920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 678
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
11667,
15866,
368,
341,
286,
1077,
1815,
2346,
19555,
284,
3521,
5173,
12697,
19555,
25888,
12015,
16,
68171,
876,
286,
8619,
486,
5399,
2458,
5581,
2346,
19555,
568,
15454,
8734,
9993,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_current_channel() {
let dir = tempfile::tempdir().unwrap();
fs::write(
dir.path().join("current_channel.json"),
r#"{"version":"1","content":{"legacy_amber_source_name":"stable"}}"#,
)
.unwrap();
assert_matches!(read_current_c... | rust_cleaned_test_functions.jsonl/110840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
11080,
14571,
368,
341,
286,
1077,
5419,
284,
54819,
486,
3888,
3741,
1005,
15454,
1428,
286,
8619,
486,
4934,
1006,
310,
5419,
3875,
1005,
5987,
445,
3231,
14571,
4323,
4461,
310,
435,
5554... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple() {
let mut map = MultiMap::<char, u8>::new();
map.insert('x', 1);
map.insert('x', 3);
map.insert('x', 1);
map.insert('x', 5);
assert_tokens(
&map,
&[
Token::Map { len: Some(1) },
To... | rust_cleaned_test_functions.jsonl/28210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
368,
341,
286,
1077,
5206,
2415,
284,
17439,
2227,
27638,
1762,
11,
575,
23,
6831,
931,
543,
286,
2415,
7030,
492,
87,
516,
220,
16,
317,
286,
2415,
7030,
492,
87,
516,
220,
18,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_instance_of_prom() {
log::info!("> test_instance_of_prom");
let rt = init_test_rt();
let io = rt.exe_rt_task_in_event_loop(|q_js_rt| {
let q_ctx = q_js_rt.get_main_context();
let res = q_ctx.eval(Script::new(
"test_instance_of_prom... | rust_cleaned_test_functions.jsonl/6887 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 675
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11904,
3575,
47877,
368,
341,
286,
1487,
486,
2733,
17223,
29,
1273,
11904,
3575,
47877,
3071,
286,
1077,
16677,
284,
2930,
4452,
40169,
543,
286,
1077,
6399,
284,
16677,
19399,
40169,
12184,
1243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_devices() -> Result<(), Box<dyn Error>> {
test_init()?;
let num_devices = Device::num_devices()?;
let all_devices: CudaResult<Vec<_>> = Device::devices()?.collect();
let all_devices = all_devices?;
assert_eq!(num_devices as usize, all_devices.len());
... | rust_cleaned_test_functions.jsonl/39768 | {
"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,
41334,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1273,
6137,
94136,
286,
1077,
1629,
41334,
284,
13903,
486,
2413,
41334,
94136,
286,
1077,
678,
41334,
25,
356,
8053,
2077,
50439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pointer_types() {
test_file! {
#[diplomat::bridge]
mod ffi {
#[diplomat::opaque]
struct MyOpaqueStruct(UnknownType);
struct MyStruct {
a: Box<MyOpaqueStruct>,
b: u8,
... | rust_cleaned_test_functions.jsonl/61351 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21425,
9763,
368,
341,
286,
1273,
2458,
0,
341,
310,
11506,
8579,
500,
80768,
486,
13709,
921,
310,
1463,
76956,
341,
394,
11506,
8579,
500,
80768,
486,
95480,
921,
394,
2036,
3017,
69398,
9422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_item_unchecked_sanity() {
Python::with_gil(|py| {
let list = PyList::new(py, &[2, 3, 5, 7]);
let obj = unsafe { list.get_item_unchecked(0) };
assert_eq!(obj.extract::<i32>().unwrap(), 2);
});
} | rust_cleaned_test_functions.jsonl/108637 | {
"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,
2019,
3062,
5634,
4907,
7549,
643,
38270,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
1140,
284,
5355,
852,
486,
931,
46827,
11,
44590,
17,
11,
220,
18,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_load() {
let mut file = File::open("tests/elfs/noop.so").expect("file open failed");
let mut elf_bytes = Vec::new();
file.read_to_end(&mut elf_bytes)
.expect("failed to read elf file");
ElfExecutable::load(Config::default(), &elf_bytes).expect("validat... | rust_cleaned_test_functions.jsonl/55862 | {
"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,
12411,
368,
341,
286,
1077,
5206,
1034,
284,
2887,
486,
2508,
445,
23841,
14,
490,
82,
33100,
453,
26476,
1827,
17119,
445,
1192,
1787,
4641,
797,
286,
1077,
5206,
40745,
12524,
284,
11312,
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_should_preserve_empty_lines() {
new_ucmd!().pipe_in("\n").succeeds().stdout_is("\n");
new_ucmd!()
.arg("-w1")
.pipe_in("0\n1\n\n2\n\n\n")
.succeeds()
.stdout_is("0\n1\n\n2\n\n\n");
} | rust_cleaned_test_functions.jsonl/23267 | {
"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,
43378,
32116,
5852,
15124,
18323,
368,
341,
262,
501,
68887,
2277,
0,
1005,
13768,
1243,
4921,
77,
1827,
82,
29264,
82,
1005,
36358,
6892,
4921,
77,
3071,
262,
501,
68887,
2277,
0,
741,
286,
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_step_three_cells_rotate() {
let mut world = World::new(10);
world.set(2, 1, true);
world.set(2, 2, true);
world.set(2, 3, true);
world = world.step();
assert_eq!(world.is_alive(1, 2), true);
assert_eq!(world.is_alive(2, 2), true);
a... | rust_cleaned_test_functions.jsonl/23844 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11946,
50016,
37796,
60834,
368,
341,
286,
1077,
5206,
1879,
284,
4337,
486,
931,
7,
16,
15,
317,
286,
1879,
980,
7,
17,
11,
220,
16,
11,
830,
317,
286,
1879,
980,
7,
17,
11,
220,
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_checked_id() {
assert!(checked_id("dummy").is_ok());
assert!(checked_id("dummy_1").is_ok());
assert_eq!(
format!("{}", checked_id("").unwrap_err()),
"The ID cannot be empty."
);
assert_eq!(
format!("{}", checked_id("dum... | rust_cleaned_test_functions.jsonl/106564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56456,
842,
368,
341,
286,
2060,
10297,
7549,
842,
445,
31390,
1827,
285,
19817,
1423,
286,
2060,
10297,
7549,
842,
445,
31390,
62,
16,
1827,
285,
19817,
5231,
286,
2060,
10714,
33673,
310,
3561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_one_lq_zero() {
let text = " {% if 1 > 0 %} true {% else %} false {% endif %} ";
assert_template_result!(" true ", text);
} | rust_cleaned_test_functions.jsonl/28124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11667,
907,
80,
19359,
368,
341,
262,
1077,
1467,
284,
330,
52261,
421,
220,
16,
861,
220,
15,
1018,
92,
830,
52261,
770,
1018,
92,
895,
52261,
12330,
1018,
92,
7620,
262,
2060,
8693,
5287,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.