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_shorten_ray_top() {
let rect = Rect::new(2, 3, 2, 2);
let mut segment = Segment {
point: (3., 0.),
vector: Vector2D { x: 0., y: 4. },
};
let side = shorten_ray(&mut segment, &rect);
assert_eq!(side, Some(CollisionSide::Top));
... | rust_cleaned_test_functions.jsonl/110315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
268,
72690,
10426,
368,
341,
286,
1077,
7608,
284,
11920,
486,
931,
7,
17,
11,
220,
18,
11,
220,
17,
11,
220,
17,
317,
286,
1077,
5206,
10238,
284,
37103,
341,
310,
1459,
25,
320,
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_vec4mask_and() {
assert_eq!(
(Vec4Mask::new(false, false, false, false) & Vec4Mask::new(false, false, false, false))
.bitmask(),
0b0000,
);
assert_eq!(
(Vec4Mask::new(true, true, true, true) & Vec4Mask::new(true, true, true, true)).bitmask(),
... | rust_cleaned_test_functions.jsonl/68877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
19,
11258,
8378,
368,
341,
262,
2060,
10714,
33673,
286,
320,
10050,
19,
12686,
486,
931,
3576,
11,
895,
11,
895,
11,
895,
8,
609,
11312,
19,
12686,
486,
931,
3576,
11,
895,
11,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_literals() {
assert_has_variable!(interpret("X = 3.14"), "X!", 3.14_f32);
assert_has_variable!(interpret("X# = 3.14"), "X#", 3.14);
assert_has_variable!(interpret("X$ = \"hello\""), "X$", "hello");
assert_has_variable!(interpret("X% = 42"), "X%", 42);
asse... | rust_cleaned_test_functions.jsonl/22644 | {
"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,
49643,
368,
341,
286,
2060,
21778,
14635,
10297,
16897,
445,
55,
284,
220,
18,
13,
16,
19,
3975,
330,
55,
18789,
220,
18,
13,
16,
19,
761,
18,
17,
317,
286,
2060,
21778,
14635,
10297,
16897,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_system_account_kind_uninitialized_nonce_account_fail() {
assert_eq!(
get_system_account_kind(&nonce_account::create_account(42).borrow()),
None
);
} | rust_cleaned_test_functions.jsonl/73079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
17687,
13500,
33162,
4907,
36161,
48508,
13500,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
633,
17687,
13500,
33162,
2099,
39593,
13500,
486,
3182,
13500,
7,
19,
17,
568,
71141,
14702,
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 |
#[test]
fn test_vhost_user_activate() {
use vmm_vhost::{
connection::socket::{Endpoint as SocketEndpoint, Listener as SocketListener},
SlaveListener,
};
const QUEUES_NUM: usize = 2;
let dir = temp_dir();
let mut path = dir.path().to_owned();
... | rust_cleaned_test_functions.jsonl/111009 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 963
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
3790,
3317,
67894,
368,
341,
286,
990,
348,
3821,
2273,
3790,
74843,
310,
3633,
486,
9556,
22964,
27380,
438,
20954,
27380,
11,
47999,
438,
20954,
2743,
1583,
310,
59368,
2743,
345,
286,
363... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shutdown_initiate_immediate_shutdown() {
let (tx_initiate_shutdown, rx_initiate_shutdown) = oneshot::channel();
let (tx_shutdown_event, rx_shutdown_event) = oneshot::channel();
let mut shutdown = ShutdownHandler::new(rx_initiate_shutdown, tx_shutdown_event);
asser... | rust_cleaned_test_functions.jsonl/36425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54804,
6137,
6493,
17895,
14636,
54804,
368,
341,
286,
1077,
320,
3998,
6137,
6493,
54804,
11,
19111,
6137,
6493,
54804,
8,
284,
389,
4288,
354,
486,
10119,
543,
286,
1077,
320,
3998,
54804,
6748,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hamming_dist() {
let s1 = b"this is a test";
let s2 = b"wokka wokka!!!";
let dist = 37;
match hamming_dist_bits(s1,s2) {
Ok(d) => {
println!("d = {}",d);
assert!(d == dist);
},
_ => assert!(false),
}
} | rust_cleaned_test_functions.jsonl/105360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
309,
5311,
16031,
368,
341,
262,
1077,
274,
16,
284,
293,
1,
574,
374,
264,
1273,
876,
262,
1077,
274,
17,
284,
293,
80377,
562,
4554,
289,
562,
4554,
12069,
876,
262,
1077,
1582,
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_parse_customer() {
assert!("cus_123".parse::<CustomerId>().is_ok());
let bad_parse = "zzz_123".parse::<CustomerId>();
assert!(bad_parse.is_err());
if let Err(err) = bad_parse {
assert_eq!(
format!("{}", err),
"invalid `C... | rust_cleaned_test_functions.jsonl/85300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
28840,
368,
341,
286,
2060,
17223,
56340,
62,
16,
17,
18,
3263,
6400,
27638,
95485,
10483,
285,
19817,
1423,
286,
1077,
3873,
21039,
284,
330,
10400,
89,
62,
16,
17,
18,
3263,
6400,
27638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_expand_to_item_list() {
let rules = create_rules(
"
macro_rules! structs {
($($i:ident),*) => {
$(struct $i { field: u32 } )*
}
}
",
);
let expansion = expand(&rules, "structs!(Foo, Bar);"... | rust_cleaned_test_functions.jsonl/85774 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 884
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67875,
2346,
5634,
2019,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
6228,
310,
18072,
21407,
0,
62845,
341,
394,
1711,
699,
72,
25,
1713,
701,
3764,
589,
341,
503,
4930,
1235,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_div() {
let a = Vec1::new(4.0) / 2.0;
assert_eq!(a.x, 2.0);
let b = 4.0f64 / Vec1::new(2.0); // TODO: Why is the f64 needed?
assert_eq!(b.x, 2.0);
} | rust_cleaned_test_functions.jsonl/29308 | {
"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,
16237,
368,
341,
310,
1077,
264,
284,
11312,
16,
486,
931,
7,
19,
13,
15,
8,
608,
220,
17,
13,
15,
280,
310,
2060,
10714,
10297,
64,
1993,
11,
220,
17,
13,
15,
317,
310,
1077,
293,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_layout() {
let tx = test_tx();
let tx_bytes = serialize(&tx).unwrap();
let packet = serialize(&tx).unwrap();
assert_matches!(memfind(&packet, &tx_bytes), Some(0));
assert_matches!(memfind(&packet, &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]), None);
} | rust_cleaned_test_functions.jsonl/22070 | {
"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,
14466,
368,
341,
286,
1077,
9854,
284,
1273,
17805,
543,
286,
1077,
9854,
12524,
284,
24235,
2099,
3998,
568,
15454,
543,
286,
1077,
10151,
284,
24235,
2099,
3998,
568,
15454,
543,
286,
2060,
3834... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mhdr_mtype() {
let examples = [
(0x00, MType::JoinRequest),
(0x20, MType::JoinAccept),
(0x40, MType::UnconfirmedDataUp),
(0x60, MType::UnconfirmedDataDown),
(0x80, MType::ConfirmedDataUp),
(0xa0, MType::ConfirmedDataDown),
(0xc0, MType:... | rust_cleaned_test_functions.jsonl/81585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
28785,
717,
1313,
368,
341,
262,
1077,
10295,
284,
2278,
286,
320,
15,
87,
15,
15,
11,
386,
929,
486,
12292,
1900,
1326,
286,
320,
15,
87,
17,
15,
11,
386,
929,
486,
12292,
16646,
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_bit_extract_long() {
let a = bits::<48>(0xabcd_dead_cafe_babe);
let b: Bits<44> = a.get_bits(4);
assert_eq!(b, bits::<44>(0xabcd_dead_cafe_bab));
let b: Bits<32> = a.get_bits(16);
assert_eq!(b, bits::<32>(0xdead_cafe));
} | rust_cleaned_test_functions.jsonl/75136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
39123,
17799,
368,
341,
286,
1077,
264,
284,
9472,
27638,
19,
23,
2235,
15,
52616,
4385,
53427,
666,
5645,
880,
8229,
317,
286,
1077,
293,
25,
49457,
27,
19,
19,
29,
284,
264,
670,
2003... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_spill1() {
VM::start_logging_trace();
let vm = Arc::new(create_spill1());
let compiler = Compiler::new(CompilerPolicy::default(), &vm);
let func_id = vm.id_of("spill1");
{
let funcs = vm.funcs().read().unwrap();
let func = funcs.get(&func_id).unwrap().read(... | rust_cleaned_test_functions.jsonl/133331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10123,
483,
16,
368,
341,
262,
17792,
486,
2468,
59982,
23575,
1428,
262,
1077,
10995,
284,
19689,
486,
931,
32602,
10123,
483,
16,
5231,
262,
1077,
19415,
284,
45631,
486,
931,
7,
38406,
13825,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_serialize_parameters() {
let program_id = analog_sdk::pubkey::new_rand();
let dup_key = analog_sdk::pubkey::new_rand();
let dup_key2 = analog_sdk::pubkey::new_rand();
let keyed_accounts = [
(
false,
false,
... | rust_cleaned_test_functions.jsonl/35196 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
18263,
368,
341,
286,
1077,
2025,
842,
284,
23400,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
22737,
3097,
284,
23400,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_sort_utf8() {
let ca = Utf8Chunked::new("a", &[Some("a"), None, Some("c"), None, Some("b")]);
let out = ca.sort_with(SortOptions {
descending: false,
nulls_last: false,
});
let expected = &[None, None, Some("a"), Some("b"), Some("c")];
... | rust_cleaned_test_functions.jsonl/16391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
39453,
23,
368,
341,
286,
1077,
2162,
284,
43432,
23,
28304,
291,
486,
931,
445,
64,
497,
44590,
8373,
445,
64,
3975,
2240,
11,
4329,
445,
66,
3975,
2240,
11,
4329,
445,
65,
899,
2558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wasi_get_wasi_version_invalid() {
(assert_c! {
#include "tests/wasmer.h"
int main() {
wasm_engine_t* engine = wasm_engine_new();
wasm_store_t* store = wasm_store_new(engine);
wasm_byte_vec_t wat;
wa... | rust_cleaned_test_functions.jsonl/86304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 576
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
10215,
3062,
1670,
10215,
9438,
31433,
368,
341,
286,
320,
2207,
666,
0,
341,
310,
671,
997,
330,
23841,
6324,
300,
1174,
860,
1837,
310,
526,
1887,
368,
341,
394,
98263,
24823,
528,
9,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatch_with_discover_available_requested_addr_returns_requested_addr() {
let mut disc = new_test_discover();
disc.options.push(ConfigOption {
code: OptionCode::RequestedIpAddr,
value: vec![192, 168, 1, 3],
});
let mut server = new_test_s... | rust_cleaned_test_functions.jsonl/61717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
6615,
9932,
3688,
26962,
72709,
7387,
58900,
72709,
7387,
368,
341,
286,
1077,
5206,
2560,
284,
501,
4452,
9932,
3688,
543,
286,
2560,
10912,
2552,
33687,
5341,
341,
310,
2038,
25,
6959,
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... | 2 |
#[test]
fn test_issue29() {
for w in 2..9 {
let mut vec = BitEnc::with_capacity(w, 1000);
for i in 0..1000 {
println!("Push {}", i);
vec.push(1);
}
}
} | rust_cleaned_test_functions.jsonl/17103 | {
"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,
53340,
17,
24,
368,
341,
286,
369,
289,
304,
220,
17,
496,
24,
341,
310,
1077,
5206,
7486,
284,
6495,
7408,
486,
4197,
35603,
3622,
11,
220,
16,
15,
15,
15,
317,
310,
369,
600,
304,
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... | 3 |
#[test]
fn test_extend_packed_from_empty() {
let s = " 0\u{80}A\u{0}𐀀 𐀀¡a𐀀0";
let mut compact = CompactString::new(s);
assert!(!compact.is_heap_allocated());
// extend from an empty iterator
compact.extend("".chars());
// we should still be heap allocated
assert!(!compact.is_h... | rust_cleaned_test_functions.jsonl/2786 | {
"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,
70265,
620,
11191,
5673,
15124,
368,
341,
262,
1077,
274,
284,
330,
220,
220,
15,
3770,
90,
23,
15,
92,
32,
3770,
90,
15,
92,
123934,
222,
222,
220,
123934,
222,
222,
39832,
64,
123934,
222,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pred_panic_leak() {
let a = CrashTestDummy::new(0);
let b = CrashTestDummy::new(1);
let c = CrashTestDummy::new(2);
let mut set = BTreeSet::new();
set.insert(a.spawn(Panic::Never));
set.insert(b.spawn(Panic::InQuery));
set.insert(c.spawn(Panic::InQuery));... | rust_cleaned_test_functions.jsonl/13748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26680,
466,
8727,
12830,
620,
31270,
11751,
585,
368,
341,
262,
1077,
264,
284,
50335,
2271,
43344,
486,
931,
7,
15,
317,
262,
1077,
293,
284,
50335,
2271,
43344,
486,
931,
7,
16,
317,
262,
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_ease_point_in_quad() {
let start = Point { x: 0.0, y: 0.0 };
let end = Point { x: 1.0, y: 1.0 };
assert_eq!(ease_point(ease_in_quad, start, end, 1.0), end);
} | rust_cleaned_test_functions.jsonl/40070 | {
"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,
2204,
519,
6085,
1243,
68631,
368,
341,
286,
1077,
1191,
284,
5126,
314,
856,
25,
220,
15,
13,
15,
11,
379,
25,
220,
15,
13,
15,
2605,
286,
1077,
835,
284,
5126,
314,
856,
25,
220,
16,
13,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example() {
let input = r#"
#1 @ 1,3: 4x4
#2 @ 3,1: 4x4
#3 @ 5,5: 2x2
"#;
assert_eq!(4, part1(input).unwrap());
} | rust_cleaned_test_functions.jsonl/131958 | {
"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,
39304,
368,
341,
286,
1077,
1946,
284,
435,
2,
698,
2,
16,
569,
220,
16,
11,
18,
25,
220,
19,
87,
19,
198,
2,
17,
569,
220,
18,
11,
16,
25,
220,
19,
87,
19,
198,
2,
18,
569,
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... | 1 |
#[test]
fn test_hierarchy() {
let mut a = Hierarchy::new();
let root = a.add_root_node(1i32);
let sub1 = a.add_sub_node(root, 8);
let sub2 = a.add_sub_node(root, 9);
let _sub3 = a.add_sub_node(sub1, 11);
assert_eq!(4, a.len());
assert_eq!(Some(&8), a.get(... | rust_cleaned_test_functions.jsonl/119133 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95043,
368,
341,
286,
1077,
5206,
264,
284,
472,
33880,
486,
931,
543,
286,
1077,
3704,
284,
264,
1364,
12993,
5084,
7,
16,
72,
18,
17,
317,
286,
1077,
1186,
16,
284,
264,
1364,
5228,
5084,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_endpoint_not_async() {
let (_, errors) = do_endpoint(
quote! {
method = GET,
path = "/a/b/c",
},
quote! {
fn handler_xyz(_rqctx: Arc<RequestContext>) {}
},
)
.unwrap();
... | rust_cleaned_test_functions.jsonl/39859 | {
"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,
36699,
7913,
28346,
368,
341,
286,
1077,
39464,
5975,
8,
284,
653,
36699,
1006,
310,
12641,
0,
341,
394,
1714,
284,
7890,
345,
394,
1815,
284,
3521,
64,
3470,
2899,
756,
310,
1153,
310,
12641,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert() {
let text1 = r#"
a
c
"#;
let text2 = r#"
a
b
c
"#;
let diff = line_diff(text1, text2);
assert_eq!(diff.len(), 1);
for item in diff {
println!("{}", item);
}
} | rust_cleaned_test_functions.jsonl/90341 | {
"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,
17678,
368,
341,
286,
1077,
1467,
16,
284,
435,
2,
698,
64,
198,
66,
198,
57676,
280,
286,
1077,
1467,
17,
284,
435,
2,
698,
64,
198,
65,
198,
66,
198,
57676,
401,
286,
1077,
3638,
284,
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_op_convert() {
// Doesn't matter for this test.
let encoding = encoding4();
check_op_parse(
|s| s.D8(constants::DW_OP_convert.0).uleb(100),
&Operation::Convert {
base_type: UnitOffset(100),
},
encoding,
... | rust_cleaned_test_functions.jsonl/45759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
34910,
368,
341,
286,
442,
48832,
944,
4925,
369,
419,
1273,
624,
286,
1077,
11170,
284,
11170,
19,
1428,
286,
1779,
10287,
21039,
1006,
310,
760,
82,
91,
274,
909,
23,
80368,
486,
54219,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_request_exceeds_size() {
let mut codec = build_codec();
let mut buffer = BytesMut::new();
while !buffer.len() <= MAX_HTTP_REQUEST_SIZE {
buffer.put_slice(b"CONNECT foo.bar.com:443 HTTP/1.1\r\n");
}
buffer.put_slice(REQUEST_END_MARKER);
... | rust_cleaned_test_functions.jsonl/8077 | {
"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,
21039,
7893,
2702,
4635,
82,
2368,
368,
341,
286,
1077,
5206,
34647,
284,
1936,
51084,
543,
286,
1077,
5206,
4147,
284,
30024,
51440,
486,
931,
543,
286,
1393,
753,
7573,
19406,
368,
2651,
8334,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_create_float_from_str() {
assert_eq!(Value::Float("2.22507e-308".into()), Value::float_from_str("2.22507e-308").unwrap());
} | rust_cleaned_test_functions.jsonl/86200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 69
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17586,
5673,
2895,
368,
341,
262,
2060,
10714,
10297,
1130,
486,
5442,
445,
17,
13,
17,
17,
20,
15,
22,
68,
12,
18,
15,
23,
3263,
18122,
11858,
5162,
486,
3649,
5673,
2895,
445,
17,
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 |
#[test]
fn test_byte_array_new_with_error() {
use crate::exceptions::PyValueError;
Python::with_gil(|py| {
let py_bytearray_result = PyByteArray::new_with(py, 10, |_b: &mut [u8]| {
Err(PyValueError::new_err("Hello Crustaceans!"))
});
assert!(py... | rust_cleaned_test_functions.jsonl/47848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 285
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
3858,
5921,
6615,
4096,
368,
341,
286,
990,
17717,
486,
61752,
486,
13828,
1130,
1454,
280,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
4510,
19737,
1653,
5287,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_empty_prefix() {
let (cid, pk, payload) = make_certified_delta(
vec![
make_change(vec![upsert("key1", "value1")]),
make_change(vec![upsert("key2", "value2")]),
],
1..1,
GarbleResponse::LeaveAsIs,
);
match decode_certified... | rust_cleaned_test_functions.jsonl/122446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
15124,
13974,
368,
341,
262,
1077,
320,
20558,
11,
22458,
11,
7729,
8,
284,
1281,
37097,
1870,
26710,
1006,
286,
7486,
90515,
310,
1281,
15947,
25592,
20703,
454,
6047,
445,
792,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_packet_params() {
// Dummy keys -- we will use the same key for each layer
let user_secret_bytes = randombytes(32);
let mix_secret_bytes = randombytes(32);
let user_secret: curve25519::Scalar =
curve25519::Scalar::from_slice(&user_secret_bytes).unwrap... | rust_cleaned_test_functions.jsonl/114623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21078,
6745,
368,
341,
286,
442,
50567,
6894,
1177,
582,
686,
990,
279,
1852,
1376,
369,
1817,
6193,
198,
286,
1077,
1196,
21962,
12524,
284,
4194,
9651,
7,
18,
17,
317,
286,
1077,
6514,
21962,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_output_error() {
let Output {status, stdout, stderr}
= Command::new("mkdir").arg(".").output().unwrap();
assert!(status.code() == Some(1));
assert_eq!(stdout, Vec::new());
assert!(!stderr.is_empty());
} | rust_cleaned_test_functions.jsonl/5982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
7645,
4096,
368,
341,
286,
1077,
9258,
314,
2829,
11,
20075,
11,
26436,
532,
1797,
284,
7348,
486,
931,
445,
26117,
1827,
858,
73133,
568,
3006,
1005,
15454,
1428,
286,
2060,
10297,
2829,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_frame_allocator_add() {
let mut frame = FrameAllocator::new();
assert!(frame.alloc(1).is_none());
frame.insert(0..3);
let num = frame.alloc(1);
assert_eq!(num, Some(2));
let num = frame.alloc(2);
assert_eq!(num, Some(0));
assert!(frame.alloc(1).is_none());
as... | rust_cleaned_test_functions.jsonl/99755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8929,
56910,
2891,
368,
341,
262,
1077,
5206,
4034,
284,
16321,
42730,
486,
931,
543,
262,
2060,
10297,
6763,
78224,
7,
16,
568,
285,
31488,
5231,
262,
4034,
7030,
7,
15,
496,
18,
317,
262,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_usize() { //NOTE: Also tests LE or BE of get_uint256's hex string input
let val = to_usize(&get_uint256("12345"));
assert_eq!(val , 74565);
} | rust_cleaned_test_functions.jsonl/78454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
11306,
551,
368,
314,
442,
27792,
25,
7281,
7032,
11148,
476,
7206,
315,
633,
15807,
17,
20,
21,
594,
12371,
914,
1946,
198,
286,
1077,
1044,
284,
311,
11306,
551,
2099,
455,
15807,
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_set_quota_and_period() {
// arrange
const QUOTA: i64 = 200000;
const PERIOD: u64 = 100000;
let (tmp, max) = setup("test_set_quota_and_period", CGROUP_CPU_MAX);
let cpu = LinuxCpuBuilder::new()
.with_quota(QUOTA)
.with_period(PERIOD)... | rust_cleaned_test_functions.jsonl/126563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
97093,
8378,
20818,
368,
341,
286,
442,
30893,
198,
286,
733,
25999,
36544,
25,
600,
21,
19,
284,
220,
17,
15,
15,
15,
15,
15,
280,
286,
733,
17854,
33291,
25,
575,
21,
19,
284,
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_forward() {
let mut masm = MacroAssembler::new();
let lbl = masm.create_label();
masm.emit_label(lbl);
masm.bind_label(lbl);
assert_eq!(vec![0, 0, 0, 0], masm.data());
} | rust_cleaned_test_functions.jsonl/17050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32121,
368,
341,
286,
1077,
5206,
9243,
76,
284,
53317,
77858,
486,
931,
543,
286,
1077,
16421,
284,
9243,
76,
2520,
6106,
543,
286,
9243,
76,
16812,
6106,
70491,
317,
286,
9243,
76,
6090,
6106,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_results_and_options() {
common::setup();
#[derive(PolarClass)]
struct Foo;
#[derive(Error, Debug)]
#[error("Test error")]
struct Error;
impl Foo {
fn new() -> Self {
Self
}
#[allow(clippy::unnecessary_wraps)]
fn ok(&self)... | rust_cleaned_test_functions.jsonl/30393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 813
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13576,
8378,
8743,
368,
341,
262,
4185,
486,
15188,
1428,
262,
11506,
27098,
5304,
7417,
1957,
5563,
262,
2036,
33428,
401,
262,
11506,
27098,
37396,
11,
11091,
5563,
262,
11506,
841,
445,
2271,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_highlighting() {
check_highlighting(
r#"
//- /main.rs crate:main deps:foo
use inner::{self as inner_mod};
mod inner {}
#[rustc_builtin_macro]
macro Copy {}
// Needed for function consuming vs normal
pub mod marker {
#[lang = "copy"]
pub trait Copy {}
}
pub mod ops {
#[... | rust_cleaned_test_functions.jsonl/5119 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1943
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74546,
287,
368,
341,
262,
1779,
74546,
287,
1006,
286,
435,
2,
698,
61463,
608,
3817,
25638,
17717,
25,
3817,
48178,
25,
7975,
198,
810,
9179,
22964,
721,
438,
9179,
7480,
2440,
2593,
9179,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_out_of_range_positive() {
let arr = [10000, 256, 1000];
let _ = Color::try_from(&arr[..]).unwrap();
} | rust_cleaned_test_functions.jsonl/14004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
6068,
3575,
9698,
54160,
368,
341,
286,
1077,
2890,
284,
508,
16,
15,
15,
15,
15,
11,
220,
17,
20,
21,
11,
220,
16,
15,
15,
15,
935,
286,
1077,
716,
284,
3478,
486,
1539,
5673,
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 |
#[test]
fn test_incompatible_type() {
make_helpers();
let lib = Library::new(LIBPATH).unwrap();
unsafe {
assert!(match lib.get::<()>(b"test_identity_u32\0") {
Err(libloading::Error::IncompatibleSize) => true,
_ => false,
})
}
} | rust_cleaned_test_functions.jsonl/40724 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
34842,
1819,
368,
341,
262,
1281,
54473,
543,
262,
1077,
3051,
284,
11635,
486,
931,
4957,
3256,
13593,
568,
15454,
543,
262,
19860,
341,
286,
2060,
10297,
6347,
3051,
670,
27638,
368,
2235,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_format_docs_handles_plain_text() {
let comment = "```text\nthis is plain text\n```";
assert_eq!(format_docs(comment), "```text\nthis is plain text\n```");
} | rust_cleaned_test_functions.jsonl/57083 | {
"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,
8955,
49692,
68017,
41015,
4326,
368,
341,
286,
1077,
3980,
284,
330,
73594,
1318,
1699,
574,
374,
14396,
1467,
1699,
73594,
876,
286,
2060,
10714,
10297,
2243,
49692,
39327,
701,
330,
73594,
1318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bpe_from_files_merge_token_oov() {
// Set up vocab file.
let mut vocab_file = NamedTempFile::new().unwrap();
vocab_file
.write_all(b"{\"a\": 0, \"b\": 1, \"c\": 2, \"ab\": 3}")
.unwrap();
// Set up merges file.
let mut merges_file ... | rust_cleaned_test_functions.jsonl/43352 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 521
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
375,
5673,
10931,
20888,
6458,
14179,
859,
368,
341,
286,
442,
2573,
705,
23820,
1034,
624,
286,
1077,
5206,
23820,
2458,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
23820,
2458... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merge_nulls_constant_null() {
#[rpn_fn]
fn foo(v: &Real) -> Result<Option<Real>> {
Ok(Some(*v * 2.5))
}
let exp = RpnExpressionBuilder::new_for_test()
.push_constant_for_test(ScalarValue::Real(None))
.push_fn_call_for_t... | rust_cleaned_test_functions.jsonl/92677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
15162,
82,
34967,
15162,
368,
341,
394,
11506,
81,
19958,
15246,
921,
286,
5168,
15229,
3747,
25,
609,
12768,
8,
1464,
5714,
94150,
64829,
2452,
341,
310,
7622,
65405,
4071,
85,
353,
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_read_leader_in_lease() {
let count = 3;
let mut cluster = new_server_cluster(0, count);
cluster.run();
let k1 = b"k1";
let (k2, v2) = (b"k2", b"v2");
// make sure leader has been elected.
assert_eq!(cluster.must_get(k1), None);
let region = cluster.get_region(b... | rust_cleaned_test_functions.jsonl/15822 | {
"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,
6443,
79991,
1243,
62,
1623,
368,
341,
262,
1077,
1760,
284,
220,
18,
280,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
1760,
317,
262,
10652,
7634,
1428,
262,
1077,
595,
16,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_generic_generate_constructor() {
let gen = no_generic_fn();
let expected: TokenStream = quote! {
pub const fn foo_fn_meta() -> crate::coprocessor::dag::rpn_expr::function::RpnFnMeta {
#[inline]
fn run(
ctx: &mut c... | rust_cleaned_test_functions.jsonl/93544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 753
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
41232,
48851,
66210,
368,
341,
286,
1077,
4081,
284,
902,
41232,
15246,
543,
286,
1077,
3601,
25,
9660,
3027,
284,
12641,
0,
341,
310,
6675,
733,
5168,
15229,
15246,
13381,
368,
1464,
17717,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_comparison3() {
fold("x = !1 == !0", "x = false");
fold("x = !0 == !0", "x = true");
fold("x = !1 == !1", "x = true");
fold("x = !1 == null", "x = false");
fold("x = !1 == !0", "x = false");
fold("x = !0 == null", "x = false");
fold("!0 == !0", "true");
fol... | rust_cleaned_test_functions.jsonl/122190 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
90797,
18,
368,
341,
262,
11555,
445,
87,
284,
753,
16,
621,
753,
15,
497,
330,
87,
284,
895,
3071,
262,
11555,
445,
87,
284,
753,
15,
621,
753,
15,
497,
330,
87,
284,
830,
797,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_color_linear() -> Result<(), Error> {
let color = "#fe801970".parse()?;
assert_eq!(RGBA::from(ColorLinear::from(color)), color);
for input in 0..256 {
let output = (linear_to_srgb(SRGB_TO_LIN[input]) * 255.0).round() as u8;
assert_eq!(input as u8,... | rust_cleaned_test_functions.jsonl/129472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6714,
40674,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
1894,
284,
5869,
1859,
23,
15,
16,
24,
22,
15,
3263,
6400,
94136,
286,
2060,
10714,
10297,
58927,
486,
1499,
15028,
31898,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple_generate_setter() {
check_assist(
generate_setter,
r#"
struct Context<T: Clone> {
data: T,
cou$0nt: usize,
}
impl<T: Clone> Context<T> {
/// Set the context's data.
fn set_data(&mut self, data: T) {
self.data = data;
}
}"#,
... | rust_cleaned_test_functions.jsonl/115750 | {
"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,
45233,
48851,
2602,
465,
368,
341,
286,
1779,
12083,
380,
1006,
310,
6923,
2602,
465,
345,
310,
435,
2,
698,
1235,
9608,
3125,
25,
27913,
29,
341,
262,
821,
25,
350,
345,
262,
3933,
3,
15,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_nonce_ix_only_nonce_acc_fail() {
assert_eq!(
process_instruction(
&Pubkey::default(),
vec![KeyedAccount::new(
&Pubkey::default(),
true,
&create_default_account(),
... | rust_cleaned_test_functions.jsonl/73061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
48508,
62686,
18410,
48508,
17737,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
1882,
54923,
1006,
394,
609,
29162,
792,
486,
2258,
3148,
394,
7486,
20703,
1592,
291,
7365,
486,
931,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_buf_into_options_with_invalid_option_parses_other_valid_options() {
let mut msg = Message::new();
msg.options.push(ConfigOption {
code: OptionCode::SubnetMask,
value: vec![255, 255, 255, 0],
});
msg.options.push(ConfigOption {
c... | rust_cleaned_test_functions.jsonl/93683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10363,
45514,
8743,
6615,
31433,
9672,
77113,
288,
30456,
8337,
8743,
368,
341,
286,
1077,
5206,
3750,
284,
4856,
486,
931,
543,
286,
3750,
10912,
2552,
33687,
5341,
341,
310,
2038,
25,
6959,
2078... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_at_utc() {
let _reset = set_time_zone();
let time = Timespec::new(1234567890, 54321);
let utc = at_utc(time);
assert_eq!(utc.tm_sec, 30);
assert_eq!(utc.tm_min, 31);
assert_eq!(utc.tm_hour, 23);
assert_eq!(utc.tm_mday, 13);
assert... | rust_cleaned_test_functions.jsonl/7337 | {
"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,
3752,
84259,
368,
341,
286,
1077,
716,
9716,
284,
738,
3009,
28692,
1428,
286,
1077,
882,
284,
8523,
992,
486,
931,
7,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
11,
220,
20,
19,
18,
17,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timestamp_year_out_of_range() {
#[derive(Debug, FromValue, Default, Empty, ToValue)]
struct Helper {
foo: Annotated<Timestamp>,
}
let x: Annotated<Helper> = Annotated::from_json(r#"{"foo": 1562770897893}"#).unwrap();
assert_eq_str!(
x.to_json_pretty().unwrap(... | rust_cleaned_test_functions.jsonl/57490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
14645,
6068,
3575,
9698,
368,
341,
262,
11506,
27098,
42618,
11,
5542,
1130,
11,
7899,
11,
22228,
11,
2014,
1130,
5563,
262,
2036,
12906,
341,
286,
15229,
25,
1527,
87029,
3125,
4702,
12520... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_end_to_end() {
let helper = StorageHelper::new();
// Each identity works in their own namespace
// Dave is the libra root.
// Each user will upload their contents to *_ns + "shared"
// Common is used by the technical staff for coordinati... | rust_cleaned_test_functions.jsonl/8043 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1986
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6213,
2346,
6213,
368,
341,
286,
1077,
13137,
284,
14693,
5511,
486,
931,
1428,
286,
442,
8886,
9569,
4278,
304,
862,
1828,
4473,
79133,
286,
442,
20238,
374,
279,
3051,
956,
3704,
624,
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... | 6 |
#[test]
fn test_dequantize_and_idct_block_8x8_all_zero() {
let mut output = [0u8; 8 * 8];
dequantize_and_idct_block_8x8(
&[0; 8*8],
&[666; 8*8],
8,
&mut output);
assert_eq!(&output[..], &[128; 8*8][..]);
} | rust_cleaned_test_functions.jsonl/38781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
30448,
551,
8378,
842,
302,
7113,
62,
23,
87,
23,
5705,
19359,
368,
341,
262,
1077,
5206,
2550,
284,
508,
15,
84,
23,
26,
220,
23,
353,
220,
23,
935,
262,
409,
30448,
551,
8378,
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_day_of_month_backward() {
let context = build_context(Moment(Paris.ymd(2017, 04, 25).and_hms(9, 10, 11)));
let day_of_month = DayOfMonth(10);
let walker = day_of_month.to_walker(&context.reference, &context);
assert_eq!(Some(Interval::starting_at(Moment(Paris.ymd... | rust_cleaned_test_functions.jsonl/114662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 630
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16763,
3575,
18933,
70477,
368,
341,
286,
1077,
2266,
284,
1936,
8467,
3189,
12913,
7,
59604,
13,
1600,
67,
7,
17,
15,
16,
22,
11,
220,
15,
19,
11,
220,
17,
20,
568,
437,
1523,
1011,
7,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_context() -> Result<(), failure::Error> {
let decoded = HashType::ContextHash.bytes_to_string(&hex::decode("934484026d24be9ad40c98341c20e51092dd62bbf470bb9ff85061fa981ebbd9")?);
let expected = "CoVmAcMV64uAQo8XvfLr9VDuz7HVZLT4cgK1w1qYmTjQNbGwQwDd";
assert_eq!(expec... | rust_cleaned_test_functions.jsonl/65920 | {
"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,
11224,
8467,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
29213,
284,
6531,
929,
486,
1972,
6370,
42697,
2346,
3904,
2099,
17308,
486,
18196,
445,
24,
18,
19,
19,
23,
19,
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_default_cc() {
let s = UnusualSwiftcallStruct { x0: 0x1111_1111, x1: 0x2222_2222, x2: 0x4444_4444 };
let func_differentiator = 0xffff_0000;
assert_eq!(function_with_default_cc(s), 0x7777_7777 + func_differentiator);
} | rust_cleaned_test_functions.jsonl/106167 | {
"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,
9993,
28955,
368,
341,
286,
1077,
274,
284,
1230,
80224,
55336,
6659,
9422,
314,
856,
15,
25,
220,
15,
87,
16,
16,
16,
16,
62,
16,
16,
16,
16,
11,
856,
16,
25,
220,
15,
87,
17,
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 |
#[test]
fn test_signing() {
// which we are treating as an oracle in this test.
let string_to_sign = "53d7e14aee681a00340300032015-01-01T10:00:00.0000000".to_owned();
let hmac_key = "pXeTVaaaaU9XxH6fPcPlq8Y9D9G3Cdo5Eh2nMSgKj/DWqeSFFXDdmpz5Trv+L2hQNM+nGa704Rf8Z22W9O1jdQ=="
... | rust_cleaned_test_functions.jsonl/19852 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
287,
368,
341,
1789,
286,
442,
892,
582,
525,
26625,
438,
458,
52741,
304,
419,
1273,
624,
286,
1077,
914,
2346,
11172,
284,
330,
20,
18,
67,
22,
68,
16,
19,
64,
2127,
21,
23,
16,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wrong_indentation_char() {
let parsed_data = common::get_file_content_parsed(PARENT_FOLDER, "different_chars.ura");
assert!(parsed_data
.unwrap_err()
.downcast_ref::<InvalidIndentationError>()
.is_some());
} | rust_cleaned_test_functions.jsonl/33289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
69045,
367,
9232,
368,
341,
262,
1077,
15676,
1769,
284,
4185,
486,
455,
2458,
7495,
75788,
5304,
28155,
33637,
11,
330,
63650,
37418,
13,
5690,
797,
262,
2060,
10297,
41030,
1769,
198,
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 |
#[test]
fn test_rpc_request_processor_allow_validator_exit_config() {
let exit = Arc::new(AtomicBool::new(false));
let validator_exit = create_validator_exit(&exit);
let ledger_path = get_tmp_ledger_path!();
let blockstore = Arc::new(Blockstore::open(&ledger_path).unwrap());
... | rust_cleaned_test_functions.jsonl/14449 | {
"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,
60799,
7893,
50127,
55731,
64959,
16880,
5332,
368,
341,
286,
1077,
4869,
284,
19689,
486,
931,
7,
65857,
11233,
486,
931,
3576,
1106,
286,
1077,
22935,
16880,
284,
1855,
64959,
16880,
2099,
13652,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_path() {
let path = ActorPath::from("/acme");
let child = path.clone() / "child";
println!("{}", &child);
assert!(path.is_parent_of(&child))
} | rust_cleaned_test_functions.jsonl/32099 | {
"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,
2891,
2638,
368,
341,
286,
1077,
1815,
284,
24718,
1820,
486,
1499,
4283,
580,
2660,
797,
286,
1077,
1682,
284,
1815,
15997,
368,
608,
330,
3048,
876,
286,
13751,
79878,
609,
3048,
317,
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 |
#[test]
fn test_which_absolute_path_case() {
// Test that an absolute path with an uppercase extension
// is accepted.
let f = TestFixture::new();
let p = &f.bins[4];
assert_eq!(_which(&f, &p).unwrap(), f.bins[4].canonicalize().unwrap());
} | rust_cleaned_test_functions.jsonl/13404 | {
"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,
62,
8206,
50874,
2638,
19096,
368,
341,
262,
442,
3393,
429,
458,
10740,
1815,
448,
458,
39482,
8894,
198,
262,
442,
374,
11666,
624,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_100_continue_sends_header_if_expects_is_wrong() {
let mut req = http::request::Builder::new();
req.headers_mut().expect("Request builder error").append(
HeaderName::from_bytes(b"expect").unwrap(),
HeaderValue::from_bytes(b"111-wrong").unwrap(),
... | rust_cleaned_test_functions.jsonl/42142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
62,
16,
15,
15,
75297,
643,
1412,
8757,
11119,
2702,
7973,
6892,
75198,
368,
341,
286,
1077,
5206,
4232,
284,
1758,
486,
2035,
486,
3297,
486,
931,
543,
286,
4232,
18022,
29523,
1005,
171... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_ledger_options_full_leader_cache() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(123);
let (ledger_path, _blockhash) = create_new_tmp_ledger_auto_delete!(&genesis_config);
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
... | rust_cleaned_test_functions.jsonl/46805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
38367,
1389,
8743,
16372,
79991,
11529,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
17,
18,
317,
286,
1077,
320,
50704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stake_delegate_stake() {
let vote_keypair = Keypair::new();
let mut vote_state = VoteState::default();
for i in 0..1000 {
vote_state.process_vote(&Vote::new(i));
}
let vote_pubkey = vote_keypair.pubkey();
let mut vote_account =
... | rust_cleaned_test_functions.jsonl/43334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
55312,
1261,
726,
368,
341,
286,
1077,
6910,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
543,
286,
369,
600,
304,
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_cp_backup_no_clobber_conflicting_options() {
let ts = TestScenario::new(util_name!());
ts.ucmd()
.arg("--backup")
.arg("--no-clobber")
.arg(TEST_HELLO_WORLD_SOURCE)
.arg(TEST_HOW_ARE_YOU_SOURCE)
.fails().stderr_is(&format!(
"{0}: option... | rust_cleaned_test_functions.jsonl/39642 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39811,
44710,
6536,
666,
91397,
16059,
78208,
8743,
368,
341,
262,
1077,
10591,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
10591,
56334,
2277,
741,
286,
659,
858,
21549,
31371,
1138,
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_read_line() -> io::Result<()> {
let mut buf = Vec::new();
let data = b"noodles\n";
let mut reader = &data[..];
buf.clear();
read_line(&mut reader, &mut buf)?;
assert_eq!(buf, b"noodles");
let data = b"noodles\r\n";
let mut reader ... | rust_cleaned_test_functions.jsonl/28634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
6528,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
1428,
286,
1077,
821,
284,
293,
1,
77,
97121,
1699,
876,
286,
1077,
5206,
6604,
284,
609,
691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple_nullable_grammar() {
let g = examples::make_simple_nullable();
let nullables = calculate_nullables(&g).unwrap();
let nullable_set = nullables.get_nullable_set();
assert!(nullable_set.contains(&NonTerminal::new("start")));
assert!(nullable_set.contains(&NonTerminal::new... | rust_cleaned_test_functions.jsonl/27891 | {
"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,
30015,
69743,
62,
41094,
368,
341,
262,
1077,
342,
284,
10295,
486,
6927,
30015,
69743,
543,
262,
1077,
845,
4788,
284,
11047,
15162,
4788,
2099,
70,
568,
15454,
543,
262,
1077,
13258,
2602,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_adaptive_composition_poly() -> Fallible<()> {
let meas1 = make_dummy_meas::<i32>().into_poly();
let meas2 = make_dummy_meas::<i64>().into_poly();
let data = 999;
let d_in_budget = 1.0;
let d_out_budget = 1.0;
let adaptive = make_adaptive_compositi... | rust_cleaned_test_functions.jsonl/115910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10027,
27781,
2965,
3487,
36133,
368,
1464,
14785,
1238,
71698,
341,
286,
1077,
6893,
16,
284,
1281,
60321,
95786,
27638,
72,
18,
17,
10483,
18122,
36133,
543,
286,
1077,
6893,
17,
284,
1281,
6032... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_failure_in_first_script() {
let _pool = ConstPool::new();
let text = r"
script {
fun step_1() {
assert(false, 1);
}
}
script {
fun step_2() {
assert(true, 2);
}
}
";
let res = execute_script(
MoveFile::with_content(script_path(), text),
... | rust_cleaned_test_functions.jsonl/43931 | {
"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,
43618,
1243,
12978,
14660,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
698,
2282,
341,
262,
2464,
3019,
62,
16,
368,
341,
286,
2060,
3576,
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_parse_wrq_only_use_filename() {
let s = [
0x00, 0x02, 0x2f, 0x66, 0x6f, 0x6f, 0x2f, 0x62, 0x61, 0x72, 0x2e, 0x74, 0x78, 0x74,
0x00, 0x6e, 0x65, 0x74, 0x61, 0x73, 0x63, 0x69, 0x69, 0x00,
];
let res = WritePacket::parse(&s).unwrap();
... | rust_cleaned_test_functions.jsonl/104026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
44074,
80,
18410,
15951,
13323,
368,
341,
1789,
286,
1077,
274,
284,
2278,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
17,
11,
220,
15,
87,
17,
69,
11,
220,
15,
87,
21,
21,
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_force_read_decrement() {
let m = RwLock::new(());
::std::mem::forget(m.read());
::std::mem::forget(m.read());
::std::mem::forget(m.read());
assert!(m.try_write().is_none());
unsafe {
m.force_read_decrement();
m.force_read_de... | rust_cleaned_test_functions.jsonl/125135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40739,
6443,
2259,
13477,
368,
341,
286,
1077,
296,
284,
55294,
11989,
486,
931,
7,
1423,
286,
3504,
1834,
486,
10536,
486,
40019,
1255,
4125,
1423,
286,
3504,
1834,
486,
10536,
486,
40019,
1255,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_unnamed_trait_members_and_default_methods() {
check_assist_not_applicable(
add_missing_impl_members,
r#"
trait Foo {
fn (arg: u32);
fn valid(some: u32) -> bool { false }
}
struct S;
impl Foo for S { <|> }"#,
)
} | rust_cleaned_test_functions.jsonl/110451 | {
"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,
58493,
4907,
30245,
78491,
30397,
8378,
9993,
36084,
368,
341,
286,
1779,
12083,
380,
7913,
8191,
46114,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
435,
2,
698,
29432,
33428,
341,
262,
5168,
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_rust_feature_name() {
assert_eq!("2019-06", to_rust_feature_name("2019-06"));
assert_eq!("2019_06", to_rust_feature_name("2019.06"));
assert_eq!("2019_06", to_rust_feature_name("2019!06"));
} | rust_cleaned_test_functions.jsonl/58215 | {
"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,
1710,
590,
17069,
1269,
368,
341,
286,
2060,
10714,
17223,
17,
15,
16,
24,
12,
15,
21,
497,
311,
1710,
590,
17069,
1269,
445,
17,
15,
16,
24,
12,
15,
21,
4010,
286,
2060,
10714,
17223,
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_subscribe_to_with_invalid_topic() {
let id = "id1".to_string();
let client_id = ClientId::from(id.clone());
let connect1 = transient_connect(id);
let handle1 = connection_handle();
let req1 = ConnReq::new(
client_id.clone(),
peer_ad... | rust_cleaned_test_functions.jsonl/29334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88935,
2346,
6615,
31433,
31414,
368,
341,
286,
1077,
877,
284,
330,
307,
16,
3263,
983,
3904,
543,
286,
1077,
2943,
842,
284,
8423,
764,
486,
1499,
3724,
15997,
1423,
286,
1077,
4564,
16,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_font_memory_layout() {
use std::mem;
assert_eq!(mem::size_of::<Font>(), mem::size_of::<sys::ImFont>());
assert_eq!(mem::align_of::<Font>(), mem::align_of::<sys::ImFont>());
use memoffset::offset_of;
use sys::ImFont;
macro_rules! assert_field_offset {
($l:ident, $r... | rust_cleaned_test_functions.jsonl/98283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17451,
19195,
14466,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
2060,
10714,
10297,
10536,
486,
2141,
3575,
27638,
5447,
39019,
1833,
486,
2141,
3575,
27638,
7791,
486,
1427,
5447,
32872,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tokenizer_point() {
let test_str = "POINT (10 -20)";
let tokens: Vec<Token> = Tokens::from_str(test_str).collect();
assert_eq!(
tokens,
vec![
Token::Word("POINT".to_string()),
Token::ParenOpen,
Token::Number(10.0),
Token... | rust_cleaned_test_functions.jsonl/109319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
6085,
368,
341,
262,
1077,
1273,
2895,
284,
330,
21531,
320,
16,
15,
481,
17,
15,
24023,
262,
1077,
11211,
25,
11312,
83416,
29,
284,
58166,
486,
1499,
2895,
8623,
2895,
568,
17384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_log_tag_kv() {
let mut script = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
script.push("resources/tests/scripts");
let script_dir = script.clone();
script.push("remove_keys.lua");
let config = ProgrammableFilterConfig {
... | rust_cleaned_test_functions.jsonl/41364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
5224,
9372,
97066,
368,
341,
310,
1077,
5206,
5316,
284,
7933,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
4010,
310,
5316,
2552,
445,
12745,
62468,
39372,
797,
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... | 1 |
#[test]
fn test_vote_update_commission() {
let (vote_pubkey, _authorized_voter, authorized_withdrawer, vote_account) =
create_test_account_with_authorized();
let authorized_withdrawer_account = RefCell::new(Account::default());
let keyed_accounts = &[
KeyedAccou... | rust_cleaned_test_functions.jsonl/43729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 878
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
8882,
2965,
2728,
368,
341,
286,
1077,
320,
29358,
34014,
792,
11,
716,
19084,
2273,
25392,
11,
18630,
6615,
80127,
11,
6910,
13500,
8,
4035,
310,
1855,
4452,
13500,
6615,
62,
19084,
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_channel_create_and_write() {
let _exec = fasync::Executor::new().unwrap();
let (recv, send) = Channel::create();
let mut vec = Vec::new();
let datagram_fut = recv.read_datagram(&mut vec);
let heart: &[u8] = &[0xF0, 0x9F, 0x92, 0x96];
send.as_ref(... | rust_cleaned_test_functions.jsonl/76852 | {
"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,
14571,
8657,
8378,
9165,
368,
341,
286,
1077,
716,
11748,
284,
282,
7692,
486,
25255,
486,
931,
1005,
15454,
543,
286,
1077,
320,
33977,
11,
3624,
8,
284,
13434,
486,
3182,
1428,
286,
1077,
5206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sponsored_contract_call_tx() {
let input_path = {
let mut r = PathBuf::new();
r.push(env!("CARGO_MANIFEST_DIR"));
r.push("tests");
r.push("sponsored_contract_call_testnet.json");
r.set_extension("json");
r
};... | rust_cleaned_test_functions.jsonl/134591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 897
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
34741,
51499,
13429,
17805,
368,
341,
286,
1077,
1946,
2638,
284,
341,
310,
1077,
5206,
435,
284,
7933,
15064,
486,
931,
543,
310,
435,
2552,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fee_spike_violation_fails_htlc() {
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 mut nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let chan = create_announce... | rust_cleaned_test_functions.jsonl/16870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34305,
44920,
440,
2273,
24903,
367,
761,
6209,
49086,
17257,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
284,
1855,
5084,
18343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_verify_votes_empty() {
solana_logger::setup();
let votes = vec![];
let labels = vec![];
let (vote_txs, packets) = ClusterInfoVoteListener::verify_votes(votes, labels);
assert!(vote_txs.is_empty());
assert!(packets.is_empty());
} | rust_cleaned_test_functions.jsonl/32281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
65116,
15124,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
12684,
284,
7486,
0,
15078,
286,
1077,
9201,
284,
7486,
0,
15078,
286,
1077,
320,
29358,
17805,
82,
11,
27035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_number() {
let (shared, chain1, chain2) = prepare();
let dummy_context = dummy_context(&shared);
let uncle = chain1[18].as_uncle();
let block = chain2[17]
.clone()
.as_advanced_builder()
.uncle(uncle)
.header(chain2[17].header())
... | rust_cleaned_test_functions.jsonl/118903 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
5500,
368,
341,
262,
1077,
320,
6100,
11,
8781,
16,
11,
8781,
17,
8,
284,
10549,
543,
262,
1077,
17292,
8467,
284,
17292,
8467,
2099,
6100,
626,
262,
1077,
37494,
284,
8781,
16,
58,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bank_block_height() {
let (genesis_config, _mint_keypair) = create_genesis_config(1);
let bank0 = Arc::new(Bank::new(&genesis_config));
assert_eq!(bank0.block_height(), 0);
let bank1 = Arc::new(new_from_parent(&bank0));
assert_eq!(bank1.block_height(), 1);... | rust_cleaned_test_functions.jsonl/2524 | {
"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,
35733,
7113,
9561,
368,
341,
286,
1077,
320,
77894,
5332,
11,
716,
67791,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
16,
317,
286,
1077,
6073,
15,
284,
19689,
486,
931,
5349,
1180,
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_shift_left_wrap() {
let compiled = compile("SET A 1\nSHIFT_LEFT_W A");
let out_cpu = test_program(compiled);
assert_eq!(out_cpu.a.value, 2);
assert_eq!(out_cpu.f.value, 0);
} | rust_cleaned_test_functions.jsonl/63186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22230,
9579,
38550,
368,
341,
262,
1077,
19697,
284,
19192,
445,
5884,
362,
220,
16,
1699,
45743,
19013,
2763,
362,
797,
262,
1077,
700,
21795,
284,
1273,
25096,
30008,
2181,
626,
262,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_first_child_is_not_empty() {
assert!(!execute_selector_query(
SIMPLE_LIST,
"li:first-child",
false,
false,
Span::test_data()
)
.is_empty())
} | rust_cleaned_test_functions.jsonl/121393 | {
"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,
12978,
17268,
6892,
7913,
15124,
368,
341,
286,
2060,
0,
3471,
10257,
28890,
5738,
1006,
310,
91484,
11899,
345,
310,
330,
742,
53374,
23484,
756,
310,
895,
345,
310,
895,
345,
310,
11903,
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 |
#[test]
fn test_recip() {
let nan: f32 = f32::NAN;
let inf: f32 = f32::INFINITY;
let neg_inf: f32 = f32::NEG_INFINITY;
assert_eq!(1.0f32.recip(), 1.0);
assert_eq!(2.0f32.recip(), 0.5);
assert_eq!((-0.4f32).recip(), -2.5);
assert_eq!(0.0f32.recip(), inf);
... | rust_cleaned_test_functions.jsonl/8115 | {
"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,
7080,
573,
368,
341,
286,
1077,
20021,
25,
282,
18,
17,
284,
282,
18,
17,
486,
45,
1093,
280,
286,
1077,
4132,
25,
282,
18,
17,
284,
282,
18,
17,
486,
687,
55990,
280,
286,
1077,
4184,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_row_formatter_with_fs_type() {
let options = Options {
columns: COLUMNS_WITH_FS_TYPE.to_vec(),
block_size: BlockSize::Bytes(1),
..Default::default()
};
let row = Row {
file: Some("/path/to/file".to_string()),
fs_... | rust_cleaned_test_functions.jsonl/110419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
73965,
6615,
34470,
1819,
368,
341,
286,
1077,
2606,
284,
14566,
341,
310,
8147,
25,
356,
48770,
23929,
40398,
4189,
2389,
13251,
3148,
310,
2504,
2368,
25,
8362,
1695,
486,
7078,
7,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mul() {
let v1 = Vec3::new(1.0f64, 2.0f64, 3.0f64);
let v2 = Vec3::new(2.0f64, 4.0f64, 6.0f64);
let v3 = Vec3::new(2.0f64, 8.0f64, 18.0f64);
assert_eq!(v1 * v2, v3);
assert_eq!(v2 * v1, v3);
} | rust_cleaned_test_functions.jsonl/120481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
972,
286,
1077,
348,
16,
284,
11312,
18,
486,
931,
7,
16,
13,
15,
69,
21,
19,
11,
220,
17,
13,
15,
69,
21,
19,
11,
220,
18,
13,
15,
69,
21,
19,
736,
286,
1077,
348,
17,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_thai_bug() {
let original = "ำน\u{e49}ำ3ลำ".to_string();
let normalized = "านา3ลา".to_string();
assert_ne!(original, normalized);
let mut n = NormalizedString::from(original);
NFKD.normalize(&mut n).unwrap();
StripAccents.normalize(&mut n).unwrap()... | rust_cleaned_test_functions.jsonl/42846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5854,
2143,
73232,
368,
341,
286,
1077,
4024,
284,
330,
75069,
20184,
3770,
90,
68,
19,
24,
92,
75069,
18,
130727,
3263,
983,
3904,
543,
286,
1077,
29410,
284,
330,
123895,
20774,
18,
124391,
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_bench_tps_local_cluster_solana() {
let mut config = Config::default();
config.tx_count = 100;
config.duration = Duration::from_secs(10);
test_bench_tps_local_cluster(config);
} | rust_cleaned_test_functions.jsonl/3258 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
528,
1690,
13564,
28441,
53668,
3362,
368,
341,
286,
1077,
5206,
2193,
284,
5532,
486,
2258,
543,
286,
2193,
33807,
3180,
284,
220,
16,
15,
15,
280,
286,
2193,
26265,
284,
21045,
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 |
#[test]
fn test_update_location_wrong_agent_for_org() {
let mock_context = MockTransactionContext::new();
mock_context.create_gs1_schema();
let perm_checker = PermissionChecker::new(&mock_context);
let mut state = LocationState::new(&mock_context);
create_default_locati... | rust_cleaned_test_functions.jsonl/20017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 848
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
13126,
75198,
25730,
5478,
35583,
368,
341,
286,
1077,
7860,
8467,
284,
14563,
8070,
1972,
486,
931,
543,
286,
7860,
8467,
2520,
96930,
16,
25371,
1428,
286,
1077,
13854,
62715,
284,
18135,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lazy_shift() {
let df = get_df();
let new = df
.lazy()
.select([col("sepal.width").alias("foo").shift(2)])
.collect()
.unwrap();
assert_eq!(new.column("foo").unwrap().f64().unwrap().get(0), None);
} | rust_cleaned_test_functions.jsonl/112 | {
"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,
49646,
22230,
368,
341,
262,
1077,
6764,
284,
633,
10894,
543,
262,
1077,
501,
284,
6764,
198,
286,
659,
49013,
741,
286,
659,
1742,
2561,
2074,
445,
325,
19308,
5441,
1827,
14956,
445,
7975,
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_and_or_not_complex_case_parse() {
let name1 = _random_string(10);
let value1 = _random_string(10);
let name2 = _random_string(10);
let value2 = _random_string(10);
let name3 = _random_string(10);
let value3 = _random_string(10);
let name4 =... | rust_cleaned_test_functions.jsonl/11872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
8734,
7913,
41522,
19096,
21039,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
829,
17,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_packed_attestation_statement() {
let certificate: cbor::values::KeyType = cbor_bytes![vec![0x5C, 0x5C, 0x5C, 0x5C]];
let cbor_packed_attestation_statement = cbor_map! {
"alg" => 1,
"sig" => vec![0x55, 0x55, 0x55, 0x55],
"x5c" => cbor_array... | rust_cleaned_test_functions.jsonl/49012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
620,
11191,
13356,
63978,
37404,
368,
341,
286,
1077,
15748,
25,
272,
9368,
486,
3661,
486,
97964,
284,
272,
9368,
12524,
20703,
4083,
20703,
15,
87,
20,
34,
11,
220,
15,
87,
20,
34,
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_raw_string_one_emptyline() {
// one newline
// the value takes the value of the newline??
let mut reader = Reader::init("```\n\n```");
assert_eq!(
raw_string(&mut reader).unwrap(),
RawString {
newline: Whitespace {
... | rust_cleaned_test_functions.jsonl/119584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 912
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
3904,
11667,
15124,
1056,
368,
341,
286,
442,
825,
39027,
198,
286,
442,
279,
897,
4990,
279,
897,
315,
279,
39027,
30,
5267,
286,
1077,
5206,
6604,
284,
25166,
486,
2327,
445,
13874,
610... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_docker_saved_manifest_from_str() {
let data = r#"[
{
"Config": "48e2eeb489cdea15786d3622270750508d7385f3b684306703d17ffd50ecd34a.json",
"RepoTags": [
"a:latest"
],
"Layers": [
"4dc05cb02b54b373232011f781f8a98905d3e10575f2a399094f704d14913a7d/layer.tar"
]... | rust_cleaned_test_functions.jsonl/21472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
13659,
53709,
74269,
5673,
2895,
368,
341,
286,
1077,
821,
284,
435,
55543,
9640,
220,
341,
262,
330,
2648,
788,
330,
19,
23,
68,
17,
2127,
65,
19,
23,
24,
66,
55088,
16,
20,
22,
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_real_as_duration() {
test_none_with_ctx_and_extra(cast_real_as_duration);
let cs: Vec<f64> = vec![
101112.0,
101112.123456,
1112.0,
12.0,
-0.123,
12345.0,
-123.0,
-23.0,
];
... | rust_cleaned_test_functions.jsonl/1991 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
11898,
25454,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
15266,
11898,
25454,
626,
286,
1077,
10532,
25,
11312,
63895,
21,
19,
29,
284,
7486,
90515,
310,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.