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_disruptive_follower() {
setup_for_test();
let mut n1 = new_test_raft(1, vec![1, 2, 3], 10, 1, new_storage());
let mut n2 = new_test_raft(2, vec![1, 2, 3], 10, 1, new_storage());
let mut n3 = new_test_raft(3, vec![1, 2, 3], 10, 1, new_storage());
n1.check_quorum = true;
n... | rust_cleaned_test_functions.jsonl/107130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9932,
6585,
533,
761,
29034,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5206,
308,
16,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
1125,
220,
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... | 2 |
#[test]
fn test_iter_no_id() {
let mention = "this is not <# actually a mention";
let mut iter = Id::<ChannelMarker>::iter(mention);
assert!(iter.next().is_none());
} | rust_cleaned_test_functions.jsonl/99690 | {
"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,
11723,
6536,
842,
368,
341,
286,
1077,
6286,
284,
330,
574,
374,
537,
366,
2,
3520,
264,
6286,
876,
286,
1077,
5206,
5367,
284,
5223,
27638,
9629,
20613,
6831,
2015,
7,
29248,
626,
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 |
#[test]
fn test_update_accounts() {
let mut accounts = [(Pubkey::default(), Account::default())];
let mut keyed_accounts = create_keyed_accounts(&mut accounts);
let lua = Lua::new();
set_accounts(&lua, "xs", &keyed_accounts).unwrap();
keyed_accounts[0].account.tokens = 42... | rust_cleaned_test_functions.jsonl/113679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
55665,
368,
341,
286,
1077,
5206,
9618,
284,
17826,
29162,
792,
486,
2258,
1507,
8615,
486,
2258,
2140,
935,
286,
1077,
5206,
90529,
55665,
284,
1855,
3097,
291,
55665,
2099,
6984,
9618,
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_encodable_rng_serialization() {
let rng = EncodableRng::new();
let serialized = serde_json::to_string(&rng).unwrap();
let _: EncodableRng = serde_json::from_str(&serialized).unwrap();
} | rust_cleaned_test_functions.jsonl/129760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13781,
69129,
66849,
25602,
2022,
368,
341,
286,
1077,
28422,
284,
10751,
69129,
49,
968,
486,
931,
1428,
286,
1077,
32916,
284,
61570,
9455,
486,
983,
3904,
2099,
69890,
568,
15454,
543,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_static_string_to_hex() {
let plaintxt = "My name is David L. Whitehurst";
let hex = static_to_hex(plaintxt);
assert_eq!("4d79206e616d65206973204461766964204c2e2057686974656875727374",
&hex);
} | rust_cleaned_test_functions.jsonl/33300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
3904,
2346,
32655,
368,
972,
262,
1077,
23372,
2252,
284,
330,
5050,
829,
374,
6798,
444,
13,
5807,
69100,
3534,
10217,
12371,
284,
1099,
2346,
32655,
7,
31297,
2252,
736,
262,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone() {
let str_pool : Pool<String> = Pool::with_size(2);
{
assert_eq!(2, str_pool.size());
let text = str_pool.new_from("cat");
let text_clone = text.clone();
assert_eq!(text, text_clone);
assert_eq!(0, str_pool.size());
}
assert_eq!(2, str_pool.s... | rust_cleaned_test_functions.jsonl/121193 | {
"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,
54742,
368,
341,
262,
1077,
607,
15709,
549,
22728,
3464,
29,
284,
22728,
486,
4197,
2368,
7,
17,
317,
262,
341,
414,
2060,
10714,
10297,
17,
11,
607,
15709,
2486,
1423,
414,
1077,
1467,
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_validate_config_failures() {
let invalid = "invalid";
let valid_did = DEFAULT_DID;
let valid_ver = DEFAULT_VERKEY;
::utils::libindy::wallet::set_wallet_handle(0);
let mut config: HashMap<String, String> = HashMap::new();
assert_eq!(validate_config... | rust_cleaned_test_functions.jsonl/1644 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
5332,
22121,
1413,
368,
341,
286,
1077,
8318,
284,
330,
11808,
876,
286,
1077,
2697,
814,
307,
284,
11955,
1557,
915,
280,
286,
1077,
2697,
26042,
284,
11955,
14815,
4784,
401,
286,
3504,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shebang() {
assert_eq!(filter_shebang(b"".to_vec()), b"");
assert_eq!(filter_shebang(b"#".to_vec()), b"#");
assert_eq!(filter_shebang(b"#!".to_vec()), b"");
assert_eq!(filter_shebang(b"#!\n\n".to_vec()), b"\n\n");
let code = b"#!/usr/bin/env deno\nconsole.log('hello');... | rust_cleaned_test_functions.jsonl/75264 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
643,
383,
27174,
368,
341,
262,
2060,
10714,
10297,
5315,
643,
383,
27174,
1883,
69355,
983,
13251,
11858,
293,
1,
797,
262,
2060,
10714,
10297,
5315,
643,
383,
27174,
1883,
57676,
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_right_encode() {
let mut buf = [0; 9];
let n = right_encode(&mut buf, 0);
assert_eq!(&buf[n..], [0, 1]);
let n = right_encode(&mut buf, 128);
assert_eq!(&buf[n..], [128, 1]);
let n = right_encode(&mut buf, 65536);
assert_eq!(&buf[n..], [1, 0, 0, 3]);
let n = ri... | rust_cleaned_test_functions.jsonl/43775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10539,
11224,
368,
341,
262,
1077,
5206,
6607,
284,
508,
15,
26,
220,
24,
935,
262,
1077,
308,
284,
1290,
11224,
2099,
6984,
6607,
11,
220,
15,
317,
262,
2060,
10714,
0,
2099,
5909,
7669,
496,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mac_to_eui() {
assert_eq!(
Mac::new([0x00, 0x1a, 0xaa, 0x12, 0x34, 0x56]).to_eui64(),
[0x02, 0x1a, 0xaa, 0xff, 0xfe, 0x12, 0x34, 0x56]
);
assert_eq!(
Mac::new([0x00, 0x1a, 0xaa, 0x12, 0x34, 0x56]).to_eui64_with_magic([0xfe, 0xfe]),
... | rust_cleaned_test_functions.jsonl/19935 | {
"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,
22802,
2346,
2204,
1963,
368,
341,
286,
2060,
10714,
33673,
310,
7401,
486,
931,
2561,
15,
87,
15,
15,
11,
220,
15,
87,
16,
64,
11,
220,
15,
43300,
11,
220,
15,
87,
16,
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_serialize_delete() {
let cmd = DevopsCommand {
target_actor_selection: "/system/sharding/connection".to_string(),
headers: Default::default(),
piggyback_command: PiggybackCommand::DeleteConnection {
connection_id: "connection-id".to_str... | rust_cleaned_test_functions.jsonl/61458 | {
"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,
88686,
11353,
368,
341,
286,
1077,
5439,
284,
6040,
3721,
4062,
341,
310,
2169,
54818,
23672,
25,
3521,
8948,
14688,
28410,
93406,
3263,
983,
3904,
3148,
310,
7102,
25,
7899,
486,
2258,
3148,
310,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_adjacently_b_de() {
let s = "(type:\"VariantB\",content:(foo:1,bar:2,),)";
let e = EnumStructAdjacently::VariantB {
foo: 1,
bar: 2,
};
test_de(s, e);
} | rust_cleaned_test_functions.jsonl/110480 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42559,
580,
4402,
880,
2259,
368,
341,
262,
1077,
274,
284,
11993,
1313,
75035,
20746,
33,
16215,
1796,
3269,
7975,
25,
16,
11,
2257,
25,
17,
59564,
24023,
262,
1077,
384,
284,
14086,
9422,
5486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_map_from_iter_panic() {
let _: SgMap<usize, usize, DEFAULT_CAPACITY> =
SgMap::from_iter((0..(DEFAULT_CAPACITY + 1)).map(|val| (val, val)));
} | rust_cleaned_test_functions.jsonl/18647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
5673,
11723,
620,
31270,
368,
341,
262,
1077,
58536,
328,
70,
2227,
90244,
11,
22301,
11,
11955,
92153,
29,
4035,
286,
328,
70,
2227,
486,
1499,
11723,
1188,
15,
496,
7,
17285,
92153,
488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rfc_section_5_iter() {
let mut k = BASEPOINT;
let mut u = BASEPOINT;
// 1 iter
let ret = key_agreement(&PrivateKey::from(k), &PublicKey::from(u)).unwrap();
u = k;
k = ret.value;
let mut expected = SharedKey::from([0u8; 32]);
hex::... | rust_cleaned_test_functions.jsonl/4454 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
8316,
16221,
62,
20,
11723,
368,
341,
286,
1077,
5206,
595,
284,
22194,
21531,
280,
286,
1077,
5206,
575,
284,
22194,
21531,
401,
286,
442,
220,
16,
5367,
198,
286,
1077,
2112,
284,
1376,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_jwt_unpack() {
let token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRGUiLCJpYXQiOjE1MTYyMzkwMjJ9.1bxegY2QzMgmi4VjfhxtumdUCSGl8ohztW8878wScAA";
let result = jwt_unpack(token);
println!("{:?}", result)
} | rust_cleaned_test_functions.jsonl/128610 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
95576,
54889,
368,
341,
286,
1077,
3950,
284,
330,
84609,
49039,
38,
5855,
81096,
45064,
52,
89,
40,
16,
56494,
3872,
641,
49,
20,
66,
11237,
21,
40,
48495,
55,
11287,
41,
24,
13,
84609,
48655... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() -> Result<()> {
let mut s = b"<191>1 2021-03-18T20:30:00.123Z - - - - - message".to_vec();
let mut codec = test_codec();
let decoded = codec.decode(s.as_mut_slice(), 0)?.unwrap();
let expected = literal!({
"severity": "debug",
... | rust_cleaned_test_functions.jsonl/89206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
15124,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
274,
284,
293,
22476,
16,
24,
16,
29,
16,
220,
17,
15,
17,
16,
12,
15,
18,
12,
16,
23,
51,
17,
15,
25,
18,
15,
25,
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... | 4 |
#[test]
fn test_only_cached_option_once() {
assert!(only_cached_option_once("z".to_string(), true).is_none());
let a = only_cached_option_once("a".to_string(), false).unwrap();
let b = only_cached_option_once("b".to_string(), false).unwrap();
assert_eq!(a, b);
sleep(Duration::new(1, 0));
... | rust_cleaned_test_functions.jsonl/13141 | {
"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,
18410,
64369,
9672,
7630,
368,
341,
262,
2060,
10297,
3243,
64369,
9672,
7630,
445,
89,
3263,
983,
3904,
1507,
830,
568,
285,
31488,
1423,
262,
1077,
264,
284,
1172,
64369,
9672,
7630,
445,
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_redc() {
let a = u256h!("0548c135e26faa9c977fb2eda057b54b2e0baa9a77a0be7c80278f4f03462d4c");
let b = u256h!("024385f6bebc1c496e09955db534ef4b1eaff9a78e27d4093cfa8f7c8f886f6b");
let c = u256h!("012e440f0965e7029c218b64f1010006b5c4ba8b1497c4174a32fec025c197bc");
ass... | rust_cleaned_test_functions.jsonl/10080 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26058,
66,
368,
341,
286,
1077,
264,
284,
575,
17,
20,
21,
71,
17223,
15,
20,
19,
23,
66,
16,
18,
20,
68,
17,
21,
3632,
64,
24,
66,
24,
22,
22,
10798,
17,
13830,
15,
20,
22,
65,
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_uint_from_div_no_panic() {
assert_eq!(
Uint256::from(6u8).div(Uint256::from(2u8)),
Uint256::from(3u8)
);
} | rust_cleaned_test_functions.jsonl/118525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
5673,
16237,
6536,
620,
31270,
368,
341,
262,
2060,
10714,
33673,
286,
27883,
17,
20,
21,
486,
1499,
7,
21,
84,
23,
568,
611,
12317,
396,
17,
20,
21,
486,
1499,
7,
17,
84,
23,
6965,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_collect_accounts_to_store() {
let keypair0 = Keypair::new();
let keypair1 = Keypair::new();
let pubkey = solana_sdk::pubkey::new_rand();
let account0 = AccountSharedData::new(1, 0, &Pubkey::default());
let account1 = AccountSharedData::new(2, 0, &Pubkey::d... | rust_cleaned_test_functions.jsonl/49728 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1957
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
55665,
2346,
14809,
368,
341,
286,
1077,
1376,
12670,
15,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1376,
12670,
16,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
95116,
284,
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_sum_relationship_proof() {
let c1_value = 30u64;
let c2_value = 10u64;
let c1_blinding = get_random_scalar();
let c2_blinding = get_random_scalar();
let c3_blinding = get_random_scalar();
let value_basepoint = *BASEPOINT_G1;
let blinding_ba... | rust_cleaned_test_functions.jsonl/118809 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 875
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
69031,
86757,
368,
341,
286,
1077,
272,
16,
3142,
284,
220,
18,
15,
84,
21,
19,
280,
286,
1077,
272,
17,
3142,
284,
220,
16,
15,
84,
21,
19,
280,
286,
1077,
272,
16,
13141,
3961,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_syscall_sol_log_u64() {
prepare_mockup!(
invoke_context,
transaction_context,
program_id,
bpf_loader::id(),
);
let cost = invoke_context.get_compute_budget().log_64_units;
let mut syscall_sol_log_u64 = SyscallLogU64 ... | rust_cleaned_test_functions.jsonl/69888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 679
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20344,
6659,
53668,
5224,
7300,
21,
19,
368,
341,
286,
10549,
34134,
454,
33673,
310,
19873,
8467,
345,
310,
7745,
8467,
345,
310,
2025,
842,
345,
310,
293,
15897,
22139,
486,
307,
3148,
286,
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 |
#[test]
fn test_vec_truncate_drop() {
static mut drops: usize = 0;
#[derive(Clone)]
struct Elem(usize);
impl Drop for Elem {
fn drop(&mut self) {
unsafe { drops += 1; }
}
}
let mut v = Soa2::new();
v.push_all(
&[Elem(1), Elem(2), Elem(3), Elem(4),... | rust_cleaned_test_functions.jsonl/121406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 297
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
3547,
26900,
29584,
368,
341,
262,
1099,
5206,
21025,
25,
22301,
284,
220,
15,
280,
262,
11506,
27098,
65297,
5563,
262,
2036,
78768,
7,
51878,
317,
262,
11605,
15733,
369,
78768,
341,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nfd_chars() {
macro_rules! t {
($input: expr, $expected: expr) => {
assert_eq!($input.nfd_chars().collect::<String>(), $expected);
}
}
t!("abc", "abc");
t!("\u{1e0b}\u{1c4}", "d\u{307}\u{1c4}");
t!("\u{2026}", "\u{20... | rust_cleaned_test_functions.jsonl/2476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
6902,
37418,
368,
341,
286,
18072,
21407,
0,
259,
341,
310,
1711,
1355,
25,
15169,
11,
400,
7325,
25,
15169,
8,
589,
341,
394,
2060,
10714,
0,
699,
1355,
1253,
6902,
37418,
1005,
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_member_return_reference() {
let hdr = indoc! {"
#include <string>
class A {
public:
virtual const std::string& get_str() { return a; }
virtual ~A() {}
std::string a;
};
"};
let rs = quote! {
let mut b = ffi::... | rust_cleaned_test_functions.jsonl/9795 | {
"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,
19388,
12511,
25433,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
917,
397,
286,
536,
362,
341,
286,
584,
510,
310,
4108,
733,
1460,
486,
917,
5,
633,
2895,
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_export_named_declaration() {
expect_printed("export { a }", "export { a };\n");
expect_printed("export { a as b }", "export { a as b };\n");
expect_printed("export { a } from \"b\"", "export { a } from \"b\";\n");
expect_printed(
"export { a as b } from \"c\"",
"e... | rust_cleaned_test_functions.jsonl/93447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27114,
71834,
77926,
368,
341,
262,
1720,
10064,
291,
445,
1533,
314,
264,
335,
497,
330,
1533,
314,
264,
335,
17882,
77,
797,
262,
1720,
10064,
291,
445,
1533,
314,
264,
438,
293,
335,
497,
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_favicon_url_fallback() {
let base = favicon_url(
None,
"http://example.org/post/with/some/long/path?and=query&also=presents",
);
assert!(base.is_ok());
assert_eq!(base.unwrap(), "http://example.org/favicon.ico");
} | rust_cleaned_test_functions.jsonl/64940 | {
"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,
761,
27921,
2903,
761,
3420,
368,
341,
286,
1077,
2331,
284,
82804,
2903,
1006,
310,
2240,
345,
310,
330,
1254,
1110,
8687,
2659,
29996,
14,
4197,
2687,
635,
14,
4825,
50976,
30,
437,
79194,
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_get_basic_blocks() {
let context = Context::create();
let module = context.create_module("test");
let bool_type = context.bool_type();
let fn_type = bool_type.fn_type(&[], false);
let function = module.add_function("testing", fn_type, None);
assert_eq!(function.get_nam... | rust_cleaned_test_functions.jsonl/125601 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
34729,
25201,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
1944,
3071,
262,
1077,
1807,
1819,
284,
2266,
28791,
1819,
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_call_add_cycles_no_effect_when_perform_not_called() {
with_hypervisor(|hypervisor, tmp_path| {
let (canister, _, _, _) = execute_update(
&hypervisor,
r#"(module
(import "ic0" "call_new"
(func $ic0_call_new
... | rust_cleaned_test_functions.jsonl/57858 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
2891,
68970,
6536,
27125,
47636,
5678,
627,
7913,
27859,
368,
341,
262,
448,
1523,
1082,
31396,
22428,
78243,
31396,
11,
4174,
2638,
91,
341,
286,
1077,
320,
4814,
1571,
11,
8358,
8358,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_null_equal() {
let a = NullArray::new(12);
let a = a.data();
let b = NullArray::new(12);
let b = b.data();
test_equal(&a, &b, true);
let b = NullArray::new(10);
let b = b.data();
test_equal(&a, &b, false);
// Test the case... | rust_cleaned_test_functions.jsonl/24203 | {
"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,
15162,
11478,
368,
341,
286,
1077,
264,
284,
18084,
1857,
486,
931,
7,
16,
17,
317,
286,
1077,
264,
284,
264,
2196,
543,
286,
1077,
293,
284,
18084,
1857,
486,
931,
7,
16,
17,
317,
286,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_null_buffer_ref() {
let mut bit_v: [u8; 2] = [0; 2];
bit_util::set_bit(&mut bit_v, 0);
bit_util::set_bit(&mut bit_v, 3);
bit_util::set_bit(&mut bit_v, 10);
let arr_data = ArrayData::builder(DataType::Int32)
.len(16)
.null_bit_buffer... | rust_cleaned_test_functions.jsonl/133940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
7776,
7793,
368,
341,
286,
1077,
5206,
2699,
2273,
25,
508,
84,
23,
26,
220,
17,
60,
284,
508,
15,
26,
220,
17,
935,
286,
2699,
18974,
486,
746,
13996,
2099,
6984,
2699,
2273,
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_method_eq() {
assert_eq!(Method::GET, Method::GET);
assert_eq!(Method::GET, "GET");
assert_eq!(&Method::GET, "GET");
assert_eq!("GET", Method::GET);
assert_eq!("GET", &Method::GET);
assert_eq!(&Method::GET, Method::GET);
assert_eq!(Method::GET, &Method::GET);
} | rust_cleaned_test_functions.jsonl/67359 | {
"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,
9032,
10714,
368,
341,
262,
2060,
10714,
10297,
3523,
486,
3806,
11,
6730,
486,
3806,
317,
262,
2060,
10714,
10297,
3523,
486,
3806,
11,
330,
3806,
797,
262,
2060,
10714,
0,
2099,
3523,
486,
380... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_highest_value_achieved() {
let inputs = to_string_vector("test_inputs/day_8_part_1.txt").unwrap();
let mut test_registers = Registers::new(&inputs);
assert_eq!(test_registers.highest_register_value_achieved, 0);
test_registers.run_instructions();
assert... | rust_cleaned_test_functions.jsonl/113415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
7504,
3142,
62,
610,
30977,
368,
341,
286,
1077,
11127,
284,
311,
3904,
12247,
445,
1944,
28557,
44739,
62,
23,
10495,
62,
16,
3909,
1827,
15454,
543,
286,
1077,
5206,
1273,
78360,
284,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_full() {
let engine = TestEngineBuilder::new().build().unwrap();
let engine_lock = Arc::new(Mutex::new(engine.clone()));
let read_pool = readpool::Builder::from_config(&readpool::Config {
normal_concurrency: 1,
max_tasks_per_worker_normal: 2,
... | rust_cleaned_test_functions.jsonl/40859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1059
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
286,
1077,
4712,
9818,
284,
19689,
486,
931,
3189,
9371,
486,
931,
48974,
15997,
7392,
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... | 8 |
#[test]
fn test_chunks() {
// Set 1 Challenge 6
let input = &[1, 2, 3, 4, 5, 6];
let expected = vec![vec![1, 4], vec![2, 5], vec![3, 6]];
assert_eq!(chunks(input, 3), expected);
} | rust_cleaned_test_functions.jsonl/74994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65470,
368,
341,
286,
442,
2573,
220,
16,
25257,
220,
21,
198,
286,
1077,
1946,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
935,
286,
1077,
3601,
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_setlint() {
let hv = hypervisor::new().unwrap();
let vm = hv.create_vm().expect("new VM fd creation failed");
assert!(hv.check_required_extensions().is_ok());
// Calling get_lapic will fail if there is no irqchip before hand.
assert!(vm.create_irq_chip().i... | rust_cleaned_test_functions.jsonl/38423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 586
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
14957,
368,
341,
286,
1077,
22747,
284,
9751,
31396,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
22747,
2520,
39008,
1005,
17119,
445,
931,
17792,
12414,
9688,
4641,
797,
286,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_valid() {
let converter = Base64Converter::new();
let options = Options {
input_type: String::from("all"),
verbose: false,
reverse: false,
converter_specific: HashMap::new(),
};
assert_eq!(
conver... | rust_cleaned_test_functions.jsonl/83344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
8337,
368,
341,
286,
1077,
27058,
284,
5351,
21,
19,
14920,
486,
931,
543,
286,
1077,
2606,
284,
14566,
341,
310,
1946,
1819,
25,
923,
486,
1499,
445,
541,
4461,
310,
13694,
25,
895,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_third_order_problem_rkf45_adaptive() -> Result<(), Error> {
let alpha = 0.1;
let square = |x: f64| -> f64 { x * x };
let dydt = |t: f64, y: &[f64]| -> Vec<f64> {
vec![y[1], y[2], -12.0 * square(alpha) * t * y[0] - 4.0 * square(alpha * t) * y[1]]
};
... | rust_cleaned_test_functions.jsonl/23085 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79519,
7869,
60139,
1710,
81869,
19,
20,
10027,
27781,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
8287,
284,
220,
15,
13,
16,
280,
286,
1077,
9334,
284,
760,
87,
25,
282,
21,
19,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_possible_intersection() {
let (s, c) = fixture_shapes("two_shapes.geojson");
let mut q: BinaryHeap<Rc<SweepEvent<f64>>> = BinaryHeap::new();
let (se1, _other1) = make_simple(s.exterior().0[3], s.exterior().0[2], true);
let (se2, _other2) = make_simple(c.exterior().0[0], c.exteri... | rust_cleaned_test_functions.jsonl/130746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 762
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71244,
82558,
368,
341,
262,
1077,
320,
82,
11,
272,
8,
284,
12507,
71315,
445,
19789,
71315,
61188,
2236,
797,
262,
1077,
5206,
2804,
25,
17718,
27909,
23370,
66,
18858,
48542,
1556,
63895,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_message_readonly_handling() {
#[derive(Serialize, Deserialize)]
enum MockSystemInstruction {
Correct,
AttemptCredit { lamports: u64 },
AttemptDataChange { data: u8 },
}
fn mock_system_process_instruction(
_p... | rust_cleaned_test_functions.jsonl/71239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1884
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
6462,
6443,
3243,
75642,
368,
341,
286,
11506,
27098,
3759,
9050,
11,
48440,
5563,
286,
7618,
14563,
2320,
16664,
341,
310,
39970,
345,
310,
43517,
33493,
314,
31603,
3394,
25,
575,
21,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_truncate() {
let mut x = BitVec::with_capacity(0);
x.push(true);
x.push(false);
x.push(true);
x.push(false);
x.push(true);
x.push(false);
x.push(true);
x.truncate(4);
assert_eq!(x.len(), 4);
x.truncate(100);
... | rust_cleaned_test_functions.jsonl/59462 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
26900,
368,
341,
286,
1077,
5206,
856,
284,
6495,
10050,
486,
4197,
35603,
7,
15,
317,
286,
856,
2552,
3715,
317,
286,
856,
2552,
3576,
317,
286,
856,
2552,
3715,
317,
286,
856,
2552,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_quote() {
let as_string = "form-data; name=upload; filename=\"Quote\\\"here.png\"";
as_string
.find(['\\', '\"'].iter().collect::<String>().as_str())
.unwrap(); // ensure `\"` is there
let a = HeaderValue::from_static(as_string);
le... | rust_cleaned_test_functions.jsonl/129592 | {
"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,
14825,
45236,
368,
341,
286,
1077,
438,
3904,
284,
330,
627,
13945,
26,
829,
28,
6120,
26,
3899,
4070,
19466,
3422,
2105,
6739,
3508,
95349,
286,
438,
3904,
198,
310,
659,
3903,
6425,
3422,
516,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_macos_conf() {
let mut config = resolv_conf::Config::new();
config.set_domain(String::from("example.com."));
config.set_search(vec!["example.com.".into(), "sub.example.com.".into()]);
config.nameservers = vec![
ScopedIp::V6(
Ipv6Addr::new(0x2001, 0x4860,... | rust_cleaned_test_functions.jsonl/121164 | {
"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,
21039,
22802,
436,
16059,
368,
341,
262,
1077,
5206,
2193,
284,
592,
35315,
16059,
486,
2648,
486,
931,
543,
262,
2193,
980,
20111,
2242,
486,
1499,
445,
8687,
905,
54136,
262,
2193,
980,
10716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_opaque_struct() {
test_file! {
#[diplomat::bridge]
mod ffi {
#[diplomat::opaque]
struct MyStruct(UnknownType);
impl MyStruct {
pub fn new(a: u8, b: u8) -> Box<MyStruct> {
... | rust_cleaned_test_functions.jsonl/42850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
10287,
19659,
15126,
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,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_str() {
let ident = token::str_to_ident("principal_skinner");
let var = codemap::respan(codemap::DUMMY_SP, ast::Variant_ {
name: ident,
attrs: Vec::new(),
kind: ast::TupleVariantKind(Vec::new()),
id: 0,
... | rust_cleaned_test_functions.jsonl/2693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
2346,
2895,
368,
341,
286,
1077,
3524,
284,
3950,
486,
495,
2346,
38399,
445,
66450,
33811,
4382,
3071,
286,
1077,
762,
284,
20329,
42040,
486,
416,
848,
1337,
347,
42040,
486,
35,
58673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let specifier =
ModuleSpecifier::parse("file:///a/test.ts").expect("bad specifier");
let source = Arc::new(
r#"import {
A,
B,
C,
D,
} from "https://deno.land/x/example@v1.0.0/mod.ts";
export * from "./mod.ts";
import type { Comp... | rust_cleaned_test_functions.jsonl/18982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
262,
1077,
97616,
4035,
414,
13711,
87297,
486,
6400,
445,
1192,
60896,
64,
12697,
21288,
1827,
17119,
445,
13855,
97616,
797,
262,
1077,
2530,
284,
19689,
486,
931,
1006,
414,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compact_raft_group() {
let dir = tempfile::Builder::new()
.prefix("test_compact_raft_group")
.tempdir()
.unwrap();
let cfg = Config {
dir: dir.path().to_str().unwrap().to_owned(),
target_file_size: ReadableSize(1),
... | rust_cleaned_test_functions.jsonl/91524 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1880
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
531,
62,
2944,
6288,
368,
341,
286,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
310,
659,
11849,
445,
1944,
18177,
531,
62,
2944,
6288,
1138,
310,
659,
3888,
3741,
741,
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_cast_decimal_as_time() {
let cases = vec![
("2019-09-16 10:11:12", "20190916101112", 0),
("2019-09-16 10:11:12", "190916101112", 0),
("1909-12-10 00:00:00", "19091210", 0),
("2020-02-29 10:00:00", "20200229100000", 0),
("2019-09... | rust_cleaned_test_functions.jsonl/1953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1505
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
74429,
11898,
3009,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
24,
12,
15,
24,
12,
16,
21,
220,
16,
15,
25,
16,
16,
25,
16,
17,
497,
330,
17,
15,
16,
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... | 7 |
#[test]
fn test_boxed_anyhow() {
let error = anyhow!("oh no!").context("it failed");
let error = anyhow!(error);
assert_eq!("oh no!", error.source().unwrap().to_string());
} | rust_cleaned_test_functions.jsonl/91395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10194,
291,
37248,
5158,
368,
341,
262,
1077,
1465,
284,
88964,
17223,
2267,
902,
0,
1827,
2147,
445,
275,
4641,
797,
262,
1077,
1465,
284,
88964,
10297,
841,
317,
262,
2060,
10714,
17223,
2267,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_program_errors_and_collect_fee() {
let leader = solana_sdk::pubkey::new_rand();
let GenesisConfigInfo {
mut genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(100, &leader, 3);
genesis_config.fee_rate_... | rust_cleaned_test_functions.jsonl/2569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
25096,
20196,
8378,
68140,
34305,
368,
341,
286,
1077,
7653,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
345,
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_tokenize() {
let test_input: String = "(a b c)".to_string();
assert_eq!(tokenize(test_input),
vec!("(","a","b","c", ")"));
} | rust_cleaned_test_functions.jsonl/119322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86508,
368,
341,
262,
1077,
1273,
5898,
25,
923,
220,
284,
11993,
64,
293,
272,
94010,
983,
3904,
543,
262,
2060,
10714,
10297,
5839,
551,
8623,
5898,
701,
715,
2290,
7486,
17223,
47503,
64,
219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_version_parse() {
let error = Err(crate::InstanceError);
assert_eq!(Adapter::parse_version("1"), error);
assert_eq!(Adapter::parse_version("1."), error);
assert_eq!(Adapter::parse_version("1 h3l1o. W0rld"), error);
assert_eq!(Adapter::parse_version("1. h3l... | rust_cleaned_test_functions.jsonl/65290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
21039,
368,
341,
286,
1077,
1465,
284,
15495,
54907,
486,
2523,
1454,
317,
286,
2060,
10714,
10297,
5940,
486,
6400,
9438,
445,
16,
3975,
1465,
317,
286,
2060,
10714,
10297,
5940,
486,
6400,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_map_insert() {
let mut map = HashMap::<(Currency, Currency), i32>::new();
map.insert(("CHF", "USD"), 2);
assert_eq!(Some(2), map.get(&("CHF", "USD")).cloned());
map.insert(("CHF", "USD"), 3);
assert_eq!(Some(3), map.get(&("CHF", "USD")).cloned());
... | rust_cleaned_test_functions.jsonl/133369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
5376,
17678,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
27638,
7,
26321,
11,
28453,
701,
600,
18,
17,
6831,
931,
543,
286,
2415,
7030,
30873,
2149,
37,
497,
330,
26749,
3975,
220,
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_send_with_request_builder() {
let domain = "sandbox0123456789abcdef0123456789abcdef.mailgun.org";
let key = "0123456789abcdef0123456789abcdef-01234567-89abcdef";
let recipient = "user@example.com";
let creds = Credentials::new(&key, &domain);
let recipien... | rust_cleaned_test_functions.jsonl/56134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 735
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
6615,
7893,
28532,
368,
341,
286,
1077,
7947,
284,
330,
76756,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
41202,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
41202,
33156,
13259,
2659,
876,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_complex() {
let res = parse_cfg::<(_, nom::error::ErrorKind)>(
"cfg(all(not(target_os = \"macos\"), not(windows), not(target_os = \"ios\")))",
);
println!("res = {:?}", res);
assert_eq!(
res,
Ok((
... | rust_cleaned_test_functions.jsonl/50604 | {
"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,
41522,
368,
341,
310,
1077,
592,
284,
4715,
18343,
27638,
41117,
9662,
486,
841,
486,
1454,
10629,
16018,
1006,
394,
330,
14072,
20388,
24772,
8637,
29387,
284,
7245,
11948,
436,
2105,
701,
537,
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_too_many_args() {
const EXPECTED: &str =
"error: The value 'u' was provided to '<FILE>...', but it wasn't expecting any more values";
let args = ["am", "i", "u"];
new_ucmd!().args(&args).fails().stderr_contains(EXPECTED);
} | rust_cleaned_test_functions.jsonl/79399 | {
"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,
2346,
78,
22101,
8384,
368,
341,
262,
733,
8921,
1479,
25,
609,
495,
4035,
286,
330,
841,
25,
576,
897,
364,
84,
6,
572,
3897,
311,
3857,
6041,
29,
68386,
714,
432,
5710,
944,
22331,
894,
80... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commit_callback() {
// consensus commit callback should unlock txns in parking lot
let mut pool = setup_mempool().0;
let txns = add_txns_to_mempool(&mut pool, vec![TestTransaction::new(1, 6, 1)]);
// check that pool is empty
assert!(pool.get_block(1, HashSet::new()).is_... | rust_cleaned_test_functions.jsonl/1801 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
12519,
368,
341,
262,
442,
23869,
5266,
4822,
1265,
15055,
9854,
4412,
304,
12921,
2696,
198,
262,
1077,
5206,
7314,
284,
6505,
717,
3262,
1749,
1005,
15,
280,
1066,
262,
1077,
9854,
4412,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_envelope() {
let bytes = Bytes::from("{\"event_id\":\"9ec79c33ec9942ab8353589fcb2e04dc\"}");
let envelope = Envelope::parse_request(bytes, request_meta()).unwrap();
let meta = envelope.meta();
// This test asserts that all information from the envel... | rust_cleaned_test_functions.jsonl/103613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
7893,
6205,
18853,
368,
341,
286,
1077,
5820,
284,
30024,
486,
1499,
99141,
3087,
842,
23488,
24,
757,
22,
24,
66,
18,
18,
757,
24,
24,
19,
17,
370,
23,
18,
20,
18,
20,
23,
24,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hover_return_impl_traits_has_goto_type_action() {
check_actions(
r#"
trait Foo {}
trait Bar {}
fn foo() -> impl Foo + Bar {}
fn main() { let s<|>t = foo(); }
"#,
expect![[r#"
[
GoToType(
[
... | rust_cleaned_test_functions.jsonl/66168 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1786
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
12511,
21007,
39693,
21778,
97732,
1819,
7931,
368,
341,
286,
1779,
25368,
1006,
310,
435,
2,
698,
29432,
33428,
5613,
29432,
4716,
5613,
8822,
15229,
368,
1464,
11605,
33428,
488,
4716,
1008... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_result() {
assert_eq! {
rune! { i64 =>
pub fn main() { match Err("err") { Err("err") => 1, _ => 2 } }
},
1,
};
assert_eq! {
rune! { i64 =>
pub fn main() { match Err("err") { Ok("ok") => 1, _ => 2 } }
},
2,
... | rust_cleaned_test_functions.jsonl/50508 | {
"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,
5287,
368,
341,
262,
2060,
10714,
0,
341,
286,
63499,
0,
314,
600,
21,
19,
6274,
310,
6675,
5168,
1887,
368,
314,
2432,
15495,
445,
615,
899,
314,
15495,
445,
615,
899,
589,
220,
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... | 2 |
#[test]
fn test_extra_fields() {
let json = r#"{
".tag": "deleted",
"name": "f",
"some extra field": "whatever",
"some more": {"some": "complex", "other": "stuff"},
"parent_shared_folder_id": "spaghetti",
"one more extra": "~~~~"
}"#;
let x = serde_jso... | rust_cleaned_test_functions.jsonl/12416 | {
"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,
31858,
12132,
368,
341,
262,
1077,
2951,
284,
435,
55543,
515,
286,
5933,
4578,
788,
330,
26521,
756,
286,
330,
606,
788,
330,
69,
756,
286,
330,
14689,
4960,
2070,
788,
330,
68286,
756,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parsing_with_a_newly_included_range() {
let source_code = "<div><%= foo() %></div><div><%= bar() %>";
let first_code_start_index = source_code.find(" foo").unwrap();
let first_code_end_index = first_code_start_index + 7;
let second_code_start_index = source_code.find(" bar").unwr... | rust_cleaned_test_functions.jsonl/7396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 961
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
6615,
4306,
5921,
398,
1243,
10181,
9698,
368,
341,
262,
1077,
2530,
4136,
284,
4055,
611,
1784,
35205,
15229,
368,
1018,
1472,
611,
1784,
611,
1784,
35205,
3619,
368,
1018,
6734,
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_overflow_behaviour() {
let mut incrementing: Incrementing<u8> = Incrementing {
count: 0,
step: 1,
overflowed: false
};
let mut rng = OsRng::default();
for i in 0..255 {
assert_eq!(i, incrementing.next(&mut rng).int... | rust_cleaned_test_functions.jsonl/104780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79073,
43241,
8897,
368,
341,
286,
1077,
5206,
16252,
287,
25,
52835,
287,
34837,
23,
29,
284,
52835,
287,
341,
310,
1760,
25,
220,
15,
345,
310,
3019,
25,
220,
16,
345,
310,
16484,
291,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_build_manifest_not_exist() -> Result<()> {
let cmd = BuildCommand {
build_manifest_path: PathBuf::from("invalid path"),
package_manifest_path: Some(PathBuf::from("./package_manifest.json")),
out: PathBuf::from("./out"),
published_name: Stri... | rust_cleaned_test_functions.jsonl/104040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
74269,
7913,
35906,
368,
1464,
5714,
71698,
341,
286,
1077,
5439,
284,
7854,
4062,
341,
310,
1936,
74269,
2638,
25,
7933,
15064,
486,
1499,
445,
11808,
1815,
4461,
310,
6328,
74269,
2638,
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_random_access_zip() {
let xs = [1, 2, 3, 4, 5];
let ys = [7, 9, 11];
check_randacc_iter(xs.iter().zip(ys.iter()), cmp::min(xs.len(), ys.len()));
} | rust_cleaned_test_functions.jsonl/1028 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
12759,
42131,
368,
341,
286,
1077,
11943,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
286,
1077,
31810,
284,
508,
22,
11,
220,
24,
11,
220,
16,
16,
935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_coil_booleanness() {
let a: Coil = true.into();
assert_ne!(a, !a);
assert_eq!(a, !!a);
let b: Coil = false.into();
assert_eq!(a, !b);
} | rust_cleaned_test_functions.jsonl/86708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11393,
321,
56013,
1263,
82033,
368,
341,
286,
1077,
264,
25,
67665,
284,
830,
39860,
543,
286,
2060,
13925,
10297,
64,
11,
753,
64,
317,
286,
2060,
10714,
10297,
64,
11,
11015,
64,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ordered_sub_contiguous() {
macro_rules! test {
($ordered:expr, $a:expr, $b:expr, $expected:expr) => {
assert_eq!(
OrderedIntegerSet::from_slice($ordered)
- ContiguousIntegerSet::new($a, $b),
Order... | rust_cleaned_test_functions.jsonl/21306 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75272,
5228,
10260,
27029,
368,
341,
286,
18072,
21407,
0,
1273,
341,
310,
1711,
10544,
96011,
11,
400,
64,
96011,
11,
400,
65,
96011,
11,
400,
7325,
96011,
8,
589,
341,
394,
2060,
10714,
33673,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invert() {
assert_ulps_eq!(Deg(0.0).invert(), Deg(180.0));
assert_ulps_eq!(Deg(180.0).invert().normalize(), Deg(0.0));
assert_ulps_eq!(Deg(80.0).invert(), Deg(260.0));
} | rust_cleaned_test_functions.jsonl/58809 | {
"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,
1243,
1621,
368,
341,
286,
2060,
61039,
1690,
10714,
10297,
45657,
7,
15,
13,
15,
568,
83729,
1507,
57237,
7,
16,
23,
15,
13,
15,
1106,
286,
2060,
61039,
1690,
10714,
10297,
45657,
7,
16,
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_select() {
let bits: BitVec<u8> = bit_vec![true, false];
let rs = RankSelect::new(bits, 1);
assert_eq!(rs.select_0(0), Some(0));
assert_eq!(rs.select_1(0), None);
assert_eq!(rs.select_0(1), Some(1));
assert_eq!(rs.select_1(1), Some(0));
... | rust_cleaned_test_functions.jsonl/110833 | {
"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,
13051,
368,
341,
286,
1077,
9472,
25,
6495,
10050,
34837,
23,
29,
284,
2699,
13251,
20703,
1866,
11,
895,
935,
286,
1077,
10036,
284,
19298,
3379,
486,
931,
68901,
11,
220,
16,
626,
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_quoted_name() -> Result<()> {
let name = SqlName::new("some 'awesome' name").quoted();
assert_eq!(&name, "'some ''awesome'' name'");
let name = SqlName::new("some 'awesome' name")
.alias("awesome name")
.quoted();
assert_eq!(&name, "'some ... | rust_cleaned_test_functions.jsonl/74807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 456
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
9253,
1269,
368,
1464,
5714,
71698,
341,
286,
1077,
829,
284,
7224,
675,
486,
931,
445,
14689,
364,
16875,
6,
829,
1827,
63725,
543,
286,
2060,
10714,
0,
2099,
606,
11,
7178,
14689,
3355,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parent_account_spend() {
let (genesis_block, mint_keypair) = GenesisBlock::new(2);
let key1 = Keypair::new();
let key2 = Keypair::new();
let parent = Arc::new(Bank::new(&genesis_block));
let tx =
system_transaction::transfer(&mint_keypair... | rust_cleaned_test_functions.jsonl/41899 | {
"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,
35733,
15960,
13500,
643,
3740,
368,
341,
286,
1077,
320,
77894,
7113,
11,
28337,
3097,
12670,
8,
284,
40788,
4713,
486,
931,
7,
17,
317,
286,
1077,
1376,
16,
284,
6569,
1082,
1310,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rot13() {
let plain = "hello";
let encrypted = encrypt_rot13(plain);
assert_eq!(encrypted, "uryyb");
let decrypted = decrypt_rot13(&encrypted);
assert_eq!(plain, decrypted);
} | rust_cleaned_test_functions.jsonl/8402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38256,
16,
18,
368,
341,
286,
1077,
14396,
284,
330,
14990,
876,
286,
1077,
24455,
284,
29625,
38256,
16,
18,
7,
20772,
626,
286,
2060,
10714,
10297,
36444,
11,
330,
3350,
84307,
3071,
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 |
#[test]
fn test_graph_store_update() {
let root_dir = "data/small_data";
let mut graphdb: MutableGraphDB<DefaultId, InternalId> =
GraphDBConfig::default().root_dir(root_dir).number_vertex_labels(20).new();
assert!(graphdb.add_vertex(PIDS[0], [1, INVALID_LABEL_ID]));
/... | rust_cleaned_test_functions.jsonl/22814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14738,
14809,
8882,
368,
341,
286,
1077,
3704,
4334,
284,
330,
691,
96816,
1769,
876,
286,
1077,
5206,
4771,
1999,
25,
31143,
11212,
3506,
27,
3675,
764,
11,
15412,
764,
29,
4035,
310,
12165,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple_inversion2() {
let a: Secp256r1Scalar = ECScalar::from(&BigInt::from(2));
let a_inv = a.invert();
let a_inv_int = a_inv.to_big_int();
assert_eq!(
a_inv_int,
BigInt::from_hex("7fffffff800000007fffffffffffffffde737d56d38bcf4279dce5617e... | rust_cleaned_test_functions.jsonl/12363 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
1243,
4366,
17,
368,
341,
286,
1077,
264,
25,
4520,
79,
17,
20,
21,
81,
16,
20639,
284,
20633,
20639,
486,
1499,
2099,
87474,
486,
1499,
7,
17,
1106,
286,
1077,
264,
19996,
284,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_non_ascii_filenames() {
let tmp_dir = TempDir::new().expect("failed to make tempdir");
Exporter::new(
PathBuf::from("tests/testdata/input/non-ascii/"),
tmp_dir.path().to_path_buf(),
)
.run()
.expect("exporter returned error");
let walker = WalkDir::new("... | rust_cleaned_test_functions.jsonl/116604 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 560
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
50238,
80632,
368,
341,
262,
1077,
4174,
4334,
284,
19944,
6184,
486,
931,
1005,
17119,
445,
16091,
311,
1281,
2730,
3741,
3071,
262,
22191,
261,
486,
931,
1006,
286,
7933,
15064,
486,
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... | 3 |
#[test]
fn test_debug() {
let fb = FooBar(1_234_567_890);
let expected = "FooBar { .0: 1234567890, foo1: 0, foo2: 0, foo3: 2, foo3: 2, foo4: 4, foo5: [0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0], foo6: [2, 3, 1], getter_only: 1, getter_only_array: [2, ... | rust_cleaned_test_functions.jsonl/2275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
368,
341,
262,
1077,
25469,
284,
33428,
3428,
7,
16,
62,
17,
18,
19,
62,
20,
21,
22,
62,
23,
24,
15,
317,
262,
1077,
3601,
284,
330,
40923,
3428,
314,
659,
15,
25,
220,
16,
17,
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_merge_bu_empty() {
let mut vector_in:Vec<i32> = vec![];
merge_bottom_up_sort(&mut vector_in);
debug_assert_eq!(vector_in, &[]);
} | rust_cleaned_test_functions.jsonl/25084 | {
"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,
20888,
880,
84,
15124,
368,
341,
286,
1077,
5206,
4621,
1243,
25,
10050,
21897,
18,
17,
29,
284,
7486,
0,
15078,
286,
10880,
25473,
8237,
18435,
2099,
6984,
4621,
1243,
317,
286,
7390,
16553,
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 |
#[test]
fn test_parse_expectations_latency() {
assert_expectation(
indoc!(
"
mysql:
expectation:
- type: LATENCY
threshold: 10
"
),
Some(Expectation::Latency(10)),
);
} | rust_cleaned_test_functions.jsonl/74663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
68918,
804,
74832,
368,
341,
286,
2060,
68918,
367,
1006,
310,
1257,
509,
33673,
394,
6228,
12272,
510,
220,
30193,
510,
262,
481,
943,
25,
53187,
42458,
198,
414,
12171,
25,
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 |
#[test]
fn test_merge_compatible_schema() {
let schema1 = SchemaBuilder::new()
.tag("the_tag")
.influx_field("int_field", Integer)
.build()
.unwrap();
let schema2 = SchemaBuilder::new()
.measurement("my_measurement")
... | rust_cleaned_test_functions.jsonl/44074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
2965,
37079,
25371,
368,
341,
286,
1077,
10802,
16,
284,
12539,
3297,
486,
931,
741,
310,
659,
4578,
445,
1782,
9372,
1138,
310,
659,
258,
36706,
5013,
445,
396,
5013,
497,
4440,
340,
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_mimc_groth16() {
// We're going to use the Groth-Maller17 proving system.
use ark_groth16::{
create_random_proof, generate_random_parameters, prepare_verifying_key,
verify_proof as raw_verify_proof,
};
use ark_std::test_rng;
let rng = &mut test_rng(... | rust_cleaned_test_functions.jsonl/64266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
318,
66,
1889,
299,
339,
16,
21,
368,
341,
262,
442,
1205,
2299,
2087,
311,
990,
279,
17888,
339,
5251,
13956,
16,
22,
38758,
1849,
624,
262,
990,
55217,
1889,
299,
339,
16,
21,
74843,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_if_board_is_won() {
let (boards, _input_numbers) = parse_puzzle::input(SAMPLE_INPUT);
let boards = boards.to_owned();
let mut chosen_board = boards[0].clone();
let is_won_before_played = check_if_board_is_won(&chosen_board);
assert_eq!(is_won_before... | rust_cleaned_test_functions.jsonl/55616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
11119,
23919,
6892,
1670,
263,
368,
341,
286,
1077,
320,
19270,
11,
716,
1355,
32964,
8,
284,
4715,
620,
14945,
486,
1355,
3759,
18918,
21022,
317,
286,
1077,
20490,
284,
20490,
2389,
51973,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_feature_set_activate_deactivate() {
let mut feature_set = FeatureSet::default();
let feature = Pubkey::new_unique();
assert!(!feature_set.is_active(&feature));
feature_set.activate(&feature, 0);
assert!(feature_set.is_active(&feature));
feature_se... | rust_cleaned_test_functions.jsonl/38677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17069,
2602,
67894,
2259,
16856,
368,
341,
286,
1077,
5206,
4565,
2602,
284,
19998,
1649,
486,
2258,
1428,
286,
1077,
4565,
284,
22611,
792,
486,
931,
21218,
543,
286,
2060,
0,
3471,
12753,
2602,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sigils() {
assert_eq!(&["#"], ChannelId::SIGILS);
assert_eq!(&[":"], EmojiId::SIGILS);
assert_eq!(&["#", ":", "@&", "@!", "@", "t:"], MentionType::SIGILS);
assert_eq!(&["@&"], RoleId::SIGILS);
assert_eq!(&["@!", "@"], UserId::SIGILS);
} | rust_cleaned_test_functions.jsonl/3587 | {
"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,
29252,
8669,
368,
341,
286,
2060,
10714,
0,
2099,
1183,
2,
7914,
13434,
764,
486,
50631,
1715,
50,
317,
286,
2060,
10714,
0,
2099,
58,
3252,
1125,
82367,
764,
486,
50631,
1715,
50,
317,
286,
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_topological_sort() -> Result<(), Error> {
let ns: Vec<StackString> = (0..8).map(|i| format!("n{}", i).into()).collect();
let dependencies = hashmap! {
"n0".into() => btreeset!["n1".into(), "n2".into(), "n3".into()],
"n1".into() => btreeset!["n4".into(), "n... | rust_cleaned_test_functions.jsonl/25439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
5729,
18435,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
12268,
25,
11312,
27,
4336,
703,
29,
284,
320,
15,
496,
23,
568,
2186,
22428,
72,
91,
3561,
17223,
77,
42351,
600,
568,
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... | 2 |
#[test]
fn test_query_stats_inspect_error_counters() {
let mut exec = fasync::TestExecutor::new_with_fake_time().unwrap();
const START_NANOS: i64 = 1_234_567;
let () = exec.set_fake_time(fasync::Time::from_nanos(START_NANOS));
let env = TestEnvironment::new();
let inspec... | rust_cleaned_test_functions.jsonl/101207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1032
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
15381,
34386,
987,
4096,
85632,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
6615,
56881,
3009,
1005,
15454,
543,
286,
733,
20998,
1604,
1093,
3126,
25,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vcx_endorse_cred_def() {
let _setup = SetupLibraryWalletPoolZeroFees::init();
let (_, schema_id, did, revocation_details) = prepare_create_cred_def_data(false);
let (endorser_did, _) = add_new_did(Some("ENDORSER"));
let (handle, cred_def_request, rev_reg_def_re... | rust_cleaned_test_functions.jsonl/96773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
6213,
10836,
73475,
7844,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16915,
38259,
10551,
17999,
37,
5516,
486,
2327,
1428,
286,
1077,
39464,
10802,
842,
11,
1521,
11,
5772,
2276,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_type_for_char() {
assert_eq!(char::from(Type::Char), 'A');
assert_eq!(char::from(Type::Int8), 'c');
assert_eq!(char::from(Type::UInt8), 'C');
assert_eq!(char::from(Type::Int16), 's');
assert_eq!(char::from(Type::UInt16), 'S');
assert_eq!(char:... | rust_cleaned_test_functions.jsonl/23141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
1819,
5478,
9232,
368,
341,
286,
2060,
10714,
10297,
1762,
486,
1499,
22498,
486,
4768,
701,
364,
32,
1157,
286,
2060,
10714,
10297,
1762,
486,
1499,
22498,
486,
1072,
23,
701,
364,
66,
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_fixed_strings() {
let dirs = &["test1", "test2"];
let files = &["test1/a.foo", "test1/a_foo", "test2/Download (1).tar.gz"];
let te = TestEnv::new(dirs, files);
te.assert_output(
&["a.foo"],
"test1/a.foo
test1/a_foo",
);
te.assert_outpu... | rust_cleaned_test_functions.jsonl/10892 | {
"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,
37839,
33500,
368,
341,
262,
1077,
42248,
284,
609,
1183,
1944,
16,
497,
330,
1944,
17,
6332,
262,
1077,
3542,
284,
609,
1183,
1944,
16,
14186,
58432,
497,
330,
1944,
16,
14186,
761,
2624,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shift_right_3() {
let original: Vec<u8> = vec![0xE6, 0x38, 0x6D, 0x84];
let expected: Vec<u8> = vec![0x0E, 0x63, 0x86, 0xD8, 0x40];
assert_array_eq(expected.clone(), common::shift_right(&original.clone(), 12));
assert_array_eq(expected.clone(), common::shift_left(&original.clone... | rust_cleaned_test_functions.jsonl/57142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22230,
10539,
62,
18,
368,
341,
262,
1077,
4024,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
12606,
21,
11,
220,
15,
87,
18,
23,
11,
220,
15,
87,
21,
35,
11,
220,
15,
87,
23,
19,
935... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issue486() {
let hdr = indoc! {"
namespace a {
namespace spanner {
class Key;
}
} // namespace a
namespace spanner {
class Key {
public:
bool b(a::spanner::Key &);
};
... | rust_cleaned_test_functions.jsonl/9928 | {
"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,
53340,
19,
23,
21,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
4473,
264,
341,
310,
4473,
9390,
1194,
341,
394,
536,
5309,
280,
310,
456,
286,
335,
442,
4473,
264,
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,
1... | 1 |
#[test]
fn test_graph_construction_1() {
let w1 = vec![
None, Some(-1.0f64),
Some(4.0f64), None
];
let mut g = super::Digraph::from_vec(&w1);
let edges1 = vec![
g.get_edge((0, 0)), g.get_edge((0, 1)),
g.get_edge((1, 0)), g.get_edge((1... | rust_cleaned_test_functions.jsonl/42288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1032
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14738,
3382,
3024,
62,
16,
368,
341,
286,
1077,
289,
16,
284,
7486,
90515,
310,
2240,
11,
4329,
4080,
16,
13,
15,
69,
21,
19,
1326,
310,
4329,
7,
19,
13,
15,
69,
21,
19,
701,
2240,
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_append() {
let mut a = SortedVecSet::new();
a.insert(1);
a.insert(2);
a.insert(3);
let mut b = SortedVecSet::new();
b.insert(3);
b.insert(4);
b.insert(5);
a.append(&mut b);
assert_eq!(a.len(), 5);
assert_e... | rust_cleaned_test_functions.jsonl/110160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26041,
368,
341,
286,
1077,
5206,
264,
284,
52688,
10050,
1649,
486,
931,
543,
286,
264,
7030,
7,
16,
317,
286,
264,
7030,
7,
17,
317,
286,
264,
7030,
7,
18,
626,
286,
1077,
5206,
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_join_for_different_lengths() {
let empty: &[&str] = &[];
test_join!("", empty, "-");
test_join!("a", ["a"], "-");
test_join!("a-b", ["a", "b"], "-");
test_join!("-a-bc", ["", "a", "bc"], "-");
} | rust_cleaned_test_functions.jsonl/17590 | {
"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,
31017,
5478,
82741,
54416,
368,
341,
262,
1077,
4287,
25,
44590,
5,
495,
60,
284,
609,
15078,
262,
1273,
31017,
17223,
497,
4287,
11,
6523,
797,
262,
1273,
31017,
17223,
64,
497,
4383,
64,
7914,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ns_constructor() {
let cxx = indoc! {"
A::Bob::Bob() {}
"};
let hdr = indoc! {"
#include <cstdint>
#include <memory>
namespace A {
struct Bob {
Bob();
uint32_t a;
uint32_t b;
};
... | rust_cleaned_test_functions.jsonl/9790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34728,
66210,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
362,
486,
32388,
486,
32388,
368,
5613,
262,
330,
2440,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keywords_after_if() {
check(
r#"fn quux() { if true { () } <|> }"#,
expect![[r#"
kw const
kw else
kw else if
kw extern
kw fn
kw if
kw if let
... | rust_cleaned_test_functions.jsonl/99574 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51354,
19844,
11119,
368,
341,
286,
1779,
1006,
310,
435,
55543,
8822,
922,
2200,
368,
314,
421,
830,
314,
1719,
335,
82639,
29,
335,
57676,
345,
310,
1720,
0,
15505,
81,
2,
698,
394,
29525,
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_contract_sig_validation() {
// First create a funding transaction
let secp = Secp256k1::new();
let priv_1 =
PrivateKey::from_wif("cVt4o7BGAig1UXywgGSmARhxMdzP5qvQsxKkSsc1XEkw3tDTQFpy").unwrap();
let priv_2 =
PrivateKey::from_wif("5JYkZjmN7P... | rust_cleaned_test_functions.jsonl/112482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1591
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51499,
29252,
19416,
368,
341,
286,
442,
5512,
1855,
264,
10773,
7745,
198,
286,
1077,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
286,
1077,
6095,
62,
16,
4035,
310,
9679,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_draw_prediction() {
init(
DATA_GEN_RADIUS,
SPIN_SPAN,
DATA_NUM,
NUM_CLASSES,
DATA_GEN_RAND_MAX,
NETWORK_GEN_RAND_MAX,
FC_SIZE,
DESCENT_RATE,
REGULAR_RATE,
);
let wi... | rust_cleaned_test_functions.jsonl/48786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
51446,
368,
341,
286,
2930,
1006,
310,
14112,
42362,
60226,
345,
310,
9256,
687,
17747,
1093,
345,
310,
14112,
9631,
345,
310,
15943,
69164,
345,
310,
14112,
42362,
2568,
3976,
6806,
345,
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_replace_missing_arg() {
let mut args = HashMap::new();
args.insert("from".to_string(), to_value(&"Hello").unwrap());
let result = replace(to_value(&"Hello world!").unwrap(), args);
assert!(result.is_err());
assert_eq!(
result.err().unwrap().des... | rust_cleaned_test_functions.jsonl/49418 | {
"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,
10633,
40447,
6057,
368,
341,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
1499,
3263,
983,
3904,
1507,
311,
3142,
2099,
1,
9707,
1827,
15454,
1423,
286,
1077,
1102,
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_builder_should_return_zero_number_of_game_playable_with_one_player() {
let t = TournamentBuilder::new()
.add("sylvain")
.finalize();
let ng = t.number_of_games_playable();
let np = t.number_of_player();
assert_eq!(0, ng);
assert_e... | rust_cleaned_test_functions.jsonl/109239 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
43378,
12511,
19359,
5500,
3575,
18547,
22144,
480,
6615,
11667,
15524,
368,
341,
286,
1077,
259,
284,
18371,
3297,
486,
931,
741,
310,
659,
718,
445,
82,
14753,
466,
1138,
310,
659,
94405,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resolve_url() -> Result<(), ParseError> {
let resolved_url = resolve_url("https://www.kernel.org", "../category/signatures.html")?;
assert_eq!(
resolved_url.as_str(),
"https://www.kernel.org/../category/signatures.html"
);
let resolved_url... | rust_cleaned_test_functions.jsonl/41748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 714
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
2903,
368,
1464,
5714,
68843,
14775,
1454,
29,
341,
286,
1077,
19673,
2903,
284,
8830,
2903,
445,
2428,
1110,
2136,
31226,
2659,
497,
7005,
5471,
35763,
2789,
2564,
899,
37445,
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... | 6 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.