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_seq_concat_string() {
Python::with_gil(|py| {
let v = "string";
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
let concat_seq = seq.concat(seq).unwrap();
assert_eq!(12, concat_seq.len().unwrap());
... | rust_cleaned_test_functions.jsonl/70325 | {
"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,
14486,
57478,
3904,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
348,
284,
330,
917,
876,
310,
1077,
1508,
284,
348,
2389,
5314,
46827,
317,
310,
1077,
12981,
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_write_json() {
let data: &str = r#"
{ "error": null,
"id": 0,
"result": [
{
"askEp": 426800,
"bidEp": 426300,
"fundingRateEr": 10000,
"highEp": 429200,
"indexEp": 426585,
... | rust_cleaned_test_functions.jsonl/84061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 787
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
9455,
368,
341,
286,
1077,
821,
25,
609,
495,
284,
435,
2,
698,
310,
314,
330,
841,
788,
845,
345,
1060,
330,
307,
788,
220,
15,
345,
1060,
330,
1382,
788,
2278,
286,
341,
310,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_banned_and_ban_for() {
let mut rng = rand::rngs::OsRng;
let (_sk, pk) = RistrettoPublicKey::random_keypair(&mut rng);
let node_id = NodeId::from_key(&pk).unwrap();
let addresses = MultiaddressesWithStats::from("/ip4/123.0.0.123/tcp/8000".parse::<Multiaddr>().un... | rust_cleaned_test_functions.jsonl/104017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
880,
7295,
8378,
880,
276,
5478,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
69890,
82,
486,
28867,
49,
968,
280,
286,
1077,
5453,
4886,
11,
22458,
8,
284,
431,
380,
2122,
983,
61... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_probe() {
struct TestReaper;
impl Actor for TestReaper {
type Msg = ();
fn receive(&mut self, _: (), _: &mut ActorContext<()>) {}
fn receive_signal(&mut self, signal: Signal, ctx: &mut ActorContext<()>) {
if let Signal::Start... | rust_cleaned_test_functions.jsonl/49289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49108,
368,
341,
286,
2036,
3393,
693,
3191,
401,
286,
11605,
24718,
369,
3393,
693,
3191,
341,
310,
943,
24205,
284,
25162,
310,
5168,
5258,
2099,
6984,
656,
11,
58536,
38104,
58536,
609,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_all_refs_enum_var_privacy() {
check(
r#"
mod m {
pub enum En {
Variant {
field<|>: u8,
}
}
}
fn f() -> m::En {
m::En::Variant { field: 0 }
}
"#,
expect![[r#"
field Field FileId(0) 56..65 56..61 Other
... | rust_cleaned_test_functions.jsonl/47788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
5705,
60638,
31054,
4612,
24726,
2757,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2593,
296,
341,
262,
6675,
7618,
2925,
341,
286,
39292,
341,
310,
2070,
27,
91,
26818,
575,
23,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pow() {
assert_eq!(_1_2.pow(2), Ratio::new(1, 4));
assert_eq!(_1_2.pow(-2), Ratio::new(4, 1));
assert_eq!(_1.pow(1), _1);
assert_eq!(_NEG1_2.pow(2), _1_2.pow(2));
assert_eq!(_NEG1_2.pow(3), -_1_2.pow(3));
assert_eq!(_3_2.pow(0), _1);
assert... | rust_cleaned_test_functions.jsonl/124703 | {
"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,
56183,
368,
341,
286,
2060,
10714,
0,
2490,
16,
62,
17,
25290,
7,
17,
701,
50748,
486,
931,
7,
16,
11,
220,
19,
1106,
286,
2060,
10714,
0,
2490,
16,
62,
17,
25290,
4080,
17,
701,
50748,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execute_invalid_public_key() {
let matches = CreateNodeVssCommand::args().get_matches_from(vec![
"createnodevss",
"--threshold",
"2",
"--public-key",
"x",
"--private-key",
"cQYYBMFS9dRR3Mt16gW4jixCqSiMhCw... | rust_cleaned_test_functions.jsonl/111721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
31433,
27074,
3097,
368,
341,
286,
1077,
9071,
284,
4230,
1955,
53,
778,
4062,
486,
2116,
1005,
455,
38344,
5673,
25592,
90515,
310,
330,
837,
13518,
534,
85,
778,
756,
310,
14482,
28902,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dispatching_with_struct() {
init_test_log();
let tracker = AssertCollect::new();
let system = ActorSystem::create(ActorSystemConfig::default().thread_pool_size(2));
// We create a basic struct with a handler and use that handler to dispatch to other
// i... | rust_cleaned_test_functions.jsonl/1275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42991,
287,
6615,
15126,
368,
341,
286,
2930,
4452,
5224,
1428,
286,
1077,
28331,
284,
5319,
47504,
486,
931,
543,
286,
1077,
1849,
284,
24718,
2320,
486,
3182,
7,
18870,
2320,
2648,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_zero_add() {
type LengthCm = Length<f32, Cm>;
let length: LengthCm = Length::new(5.0);
let result = length - LengthCm::zero();
assert_eq!(result, length);
} | rust_cleaned_test_functions.jsonl/50594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
2891,
368,
341,
286,
943,
17287,
34,
76,
284,
17287,
63895,
18,
17,
11,
356,
76,
10133,
286,
1077,
3084,
25,
17287,
34,
76,
284,
17287,
486,
931,
7,
20,
13,
15,
626,
286,
1077,
1102,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_json() {
assert_eq!(json(true).unwrap(), "true");
assert_eq!(json("foo").unwrap(), r#""foo""#);
assert_eq!(json(&true).unwrap(), "true");
assert_eq!(json(&"foo").unwrap(), r#""foo""#);
assert_eq!(
json(&vec!["foo", "bar"]).unwrap(),
... | rust_cleaned_test_functions.jsonl/120647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
368,
341,
286,
2060,
10714,
10297,
2236,
3715,
568,
15454,
1507,
330,
1866,
797,
286,
2060,
10714,
10297,
2236,
445,
7975,
1827,
15454,
1507,
435,
2,
3014,
7975,
3014,
2,
317,
286,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_missed_votes() {
let account_a = solana_sdk::pubkey::new_rand();
let mut vote_state_a = VoteState::new_for_test(&account_a);
let account_b = solana_sdk::pubkey::new_rand();
let mut vote_state_b = VoteState::new_for_test(&account_b);
// process som... | rust_cleaned_test_functions.jsonl/6092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 535
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
67722,
291,
65116,
368,
341,
286,
1077,
2692,
4306,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
5206,
6910,
4387,
4306,
284,
34034,
1397,
486,
931,
5478,
4452,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nested_class_methods() {
let hdr = indoc! {"
#include <cstdint>
class A {
public:
virtual ~A() {}
struct B {
virtual void b() const {}
};
virtual void a() const {}
struct C {
virtual void b() const {}
};
... | rust_cleaned_test_functions.jsonl/9974 | {
"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,
66279,
4790,
36084,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
397,
262,
536,
362,
341,
262,
584,
510,
286,
4108,
3968,
32,
368,
5613,
286,
2036,
425,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_global_const_i32() {
// create a GlobalType instance
let result = GlobalType::create(ValType::I32, Mutability::Const);
assert!(result.is_ok());
let mut ty = result.unwrap();
assert!(!ty.ctx.is_null());
// create a const Global instance
let... | rust_cleaned_test_functions.jsonl/130796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19296,
13610,
5318,
18,
17,
368,
341,
286,
442,
1855,
264,
7962,
929,
2867,
198,
286,
1077,
1102,
284,
7962,
929,
486,
3182,
7,
2208,
929,
486,
40,
18,
17,
11,
31228,
2897,
486,
19167,
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_mmds_detour_and_injection() {
let mut net = Net::default_net(TestMutators::default());
let sha = MacAddr::parse_str("11:11:11:11:11:11").unwrap();
let spa = Ipv4Addr::new(10, 1, 2, 3);
let tha = MacAddr::parse_str("22:22:22:22:22:22").unwrap();
let tpa = ... | rust_cleaned_test_functions.jsonl/63424 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
2277,
82,
24409,
413,
8378,
1243,
7606,
368,
341,
286,
1077,
5206,
4179,
284,
9374,
486,
2258,
19722,
31159,
51440,
2973,
486,
2258,
5231,
286,
1077,
15870,
284,
7401,
13986,
486,
6400,
2895,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_mul_table() {
let m = G2Poly(0b111);
assert_eq!(include_str!("../tests/mul_table.txt").trim(), generate_mul_table_string(m));
} | rust_cleaned_test_functions.jsonl/728 | {
"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,
48851,
24944,
5237,
368,
341,
286,
1077,
296,
284,
479,
17,
38164,
7,
15,
65,
16,
16,
16,
626,
286,
2060,
10714,
10297,
997,
2895,
17223,
1244,
23841,
3183,
360,
5237,
3909,
1827,
10666,
1507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_uncle_proposals_hash() {
let (shared, chain1, chain2) = prepare();
let dummy_context = dummy_context(&shared);
let block_number = 17;
let uncle = chain1[16]
.to_owned()
.as_advanced_builder()
.parent_hash(chain2[15].hash())
.proposal([1; 10].pack(... | rust_cleaned_test_functions.jsonl/118904 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76576,
273,
21663,
85975,
8950,
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,
317,
262,
1077,
2504,
5500,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_late_binding() {
check_output_default(
"fun a() { b(); }\n\
fun b() { print \"hello world\"; }\n\
\n\
a();\n",
"'hello world'",
)
} | rust_cleaned_test_functions.jsonl/111862 | {
"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,
907,
349,
60815,
368,
341,
286,
1779,
7645,
9993,
1006,
310,
330,
11894,
264,
368,
314,
293,
2129,
51300,
77,
5661,
1797,
2464,
293,
368,
314,
1173,
7245,
14990,
1879,
2105,
26,
51300,
77,
5661,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_du_hard_link() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.hard_link(SUB_FILE, SUB_LINK);
let result = scene.ucmd().arg(SUB_DIR_LINKS).succeeds();
#[cfg(target_os = "linux")]
{
let result_reference = scene.cmd("du").arg(SUB_DIR_L... | rust_cleaned_test_functions.jsonl/23734 | {
"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,
814,
84,
77712,
7233,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
401,
262,
518,
860,
567,
7233,
3759,
4493,
8087,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timestamp() {
use std::collections::HashSet;
let timestamp = ::prost_types::Timestamp {
seconds: 100,
nanos: 42,
};
let mut non_normalized_timestamp = ::prost_types::Timestamp {
seconds: 99,
nanos: 1_000_000_042,
};
let mut hashset = Has... | rust_cleaned_test_functions.jsonl/28035 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23073,
368,
341,
262,
990,
1460,
486,
51137,
486,
44601,
401,
262,
1077,
11441,
284,
3504,
776,
267,
9763,
486,
20812,
341,
286,
6486,
25,
220,
16,
15,
15,
345,
286,
20021,
436,
25,
220,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_redeem_tokens() {
let (bank, alice_keypair) = create_bank(38);
let bank = Arc::new(bank);
let bank_client = BankClient::new_shared(&bank);
let alice_pubkey = alice_keypair.pubkey();
let date_keypair = Keypair::new();
let date_pubkey = date_keypair... | rust_cleaned_test_functions.jsonl/88804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
450,
336,
28838,
368,
341,
286,
1077,
320,
17033,
11,
70433,
3097,
12670,
8,
284,
1855,
35733,
7,
18,
23,
317,
286,
1077,
6073,
284,
19689,
486,
931,
1883,
1180,
317,
286,
1077,
6073,
81... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_repr_parse_valid() {
let packet = Packet::new_unchecked(&REPR_PACKET_BYTES[..]);
let repr = Repr::parse(&packet).unwrap();
assert_eq!(repr, packet_repr());
} | rust_cleaned_test_functions.jsonl/126219 | {
"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,
68535,
21039,
8337,
368,
341,
286,
1077,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
787,
6480,
40328,
40705,
95874,
2558,
286,
1077,
30636,
284,
1032,
649,
486,
6400,
2099,
24829,
568,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_string_debug_malformed() {
let string = NbtString::new(b"foo bar\" \0 \xC0");
let formatted = format!("{:?}", string);
assert_eq!(formatted, r#""foo bar\" \0 \xC0""#);
} | rust_cleaned_test_functions.jsonl/67163 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 93
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
15446,
717,
278,
10155,
368,
341,
262,
1077,
914,
284,
451,
12755,
703,
486,
931,
1883,
1,
7975,
3619,
2105,
1124,
15,
1124,
12125,
15,
3071,
262,
1077,
23126,
284,
3561,
88928,
25,
52652,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rev_iterator() {
let mut m = VecMap::new();
assert!(m.insert(0, 1).is_none());
assert!(m.insert(1, 2).is_none());
assert!(m.insert(3, 5).is_none());
assert!(m.insert(6, 10).is_none());
assert!(m.insert(10, 11).is_none());
let mut it = m.i... | rust_cleaned_test_functions.jsonl/53273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38082,
13491,
368,
341,
286,
1077,
5206,
296,
284,
11312,
2227,
486,
931,
1428,
286,
2060,
10297,
76,
7030,
7,
15,
11,
220,
16,
568,
285,
31488,
1423,
286,
2060,
10297,
76,
7030,
7,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_neuron_proposal() {
check_proposal_status_after_voting_and_after_expiration(
vec![Neuron {
dissolve_state: NOTDISSOLVING_MIN_DISSOLVE_DELAY_TO_VOTE,
cached_neuron_stake_e8s: 1,
..Neuron::default()
}],
"P",
ProposalSta... | rust_cleaned_test_functions.jsonl/1109 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
13925,
36090,
21663,
32556,
368,
341,
262,
1779,
21663,
32556,
4773,
19844,
2273,
11519,
8378,
19844,
2702,
28479,
1006,
286,
7486,
20703,
8813,
36090,
341,
310,
72639,
4387,
25,
4183,
17625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_assignment_node() {
let node = AssignmentNode {
lhs: Box::new(VarNode::new("adsf").into()),
rhs: Box::new(IntNode::new(324).into()),
span: None,
};
let clone = node.clone();
assert_eq!(
ExpressionNode::from(no... | rust_cleaned_test_functions.jsonl/89513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
51891,
5084,
368,
341,
286,
1077,
2436,
284,
34427,
1955,
341,
310,
22505,
25,
8261,
486,
931,
7,
3962,
1955,
486,
931,
445,
7664,
69,
1827,
18122,
14702,
310,
12916,
25,
8261,
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_basic() {
use std::thread;
let x = 5;
let y = Blocker::new(&x);
let z = y.get();
thread::spawn(move || {
thread::sleep_ms(1000);
println!("{}", *z);
});
} | rust_cleaned_test_functions.jsonl/94621 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
262,
990,
1460,
486,
4528,
280,
262,
1077,
856,
284,
220,
20,
280,
262,
1077,
379,
284,
8362,
261,
486,
931,
2099,
87,
317,
262,
1077,
1147,
284,
379,
670,
543,
262,
4516,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_l_to_r_password() {
let test_door: Door = Door("abc".to_string());
assert_eq!(test_door.l_to_r_password(), "18f47a30");
} | rust_cleaned_test_functions.jsonl/125869 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
2346,
1710,
10122,
368,
341,
286,
1077,
1273,
78962,
25,
24191,
284,
24191,
445,
13683,
3263,
983,
3904,
5231,
286,
2060,
10714,
10297,
1944,
78962,
918,
2346,
1710,
10122,
1507,
330,
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 |
#[test]
fn test_to_json() {
let config = Config {
width: 100,
height: 100,
samples_per_pixel: 1,
max_depth: 1,
sky: Some(Sky::new_default_sky()),
camera: Camera::new(
Point3D::new(0.0, 0.0, 0.0),
Point3D::new(0.0, 0.0, -1.0),
... | rust_cleaned_test_functions.jsonl/118684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 657
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
9455,
368,
341,
262,
1077,
2193,
284,
5532,
341,
286,
2374,
25,
220,
16,
15,
15,
345,
286,
2608,
25,
220,
16,
15,
15,
345,
286,
10469,
5678,
29760,
25,
220,
16,
345,
286,
1932,
19061,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_norwegian_lang_serde() {
#[derive(Serialize, Deserialize, PartialEq, Debug)]
struct TestStruct {
no: Lang,
nb: Lang,
en: Lang
}
let test_json = "{\"nb\":\"nb\",\"no\":\"no\",\"en\":\"en\"}";
let test_struct: TestStruc... | rust_cleaned_test_functions.jsonl/24720 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
269,
36565,
17876,
75861,
450,
368,
1476,
286,
11506,
27098,
3759,
9050,
11,
48440,
11,
55039,
11,
11091,
5563,
286,
2036,
3393,
9422,
341,
310,
902,
25,
22463,
345,
310,
16649,
25,
22463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_verify_message_valid_signature() {
let message = "test message".to_owned();
let signature = "304402204146402099809E1F021421569F72BA34DCAFCC832741AB6310F887F60734D9F002203E813AD6A59D67D8EE06C8EA05BCC1BA8F690B631E6F243E8BE60633D27BE05D".to_owned();
let out_dir = std::env::v... | rust_cleaned_test_functions.jsonl/118748 | {
"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,
35638,
6462,
8337,
39859,
368,
341,
286,
1077,
1943,
284,
330,
1944,
1943,
3263,
983,
51973,
543,
286,
1077,
11957,
284,
330,
18,
15,
19,
19,
15,
17,
17,
15,
19,
16,
19,
21,
19,
15,
17,
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... | 3 |
#[test]
fn test_decode_unsigned_byte() {
let byte: u8 = 255;
let decoded: u8 = decode_unsigned_byte(byte);
assert_eq!(byte, decoded)
} | rust_cleaned_test_functions.jsonl/16121 | {
"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,
15227,
67830,
19737,
368,
341,
262,
1077,
4922,
25,
575,
23,
284,
220,
17,
20,
20,
280,
262,
1077,
29213,
25,
575,
23,
284,
16895,
67830,
19737,
19738,
317,
262,
2060,
10714,
10297,
3782,
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 |
#[test]
fn test_de() {
let b= to_bson(&1u64).unwrap();
let c:Bson = from_bson(b).unwrap();
println!("{}",c);
} | rust_cleaned_test_functions.jsonl/12640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
368,
341,
286,
1077,
293,
28,
311,
880,
930,
2099,
16,
84,
21,
19,
568,
15454,
543,
286,
1077,
272,
81268,
930,
284,
504,
880,
930,
1883,
568,
15454,
543,
286,
13751,
79878,
66,
317,
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 |
#[test]
fn test_as_dangerous_str() {
// Valid
assert_eq!(input!(b"").to_dangerous_str::<Expected>().unwrap(), "");
assert_eq!(
input!(b"hello").to_dangerous_str::<Expected>().unwrap(),
"hello"
);
// Invalid
let _ = input!(b"\xff").to_dangerous_str::<Expected>().unwrap_err... | rust_cleaned_test_functions.jsonl/15432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
814,
4003,
782,
2895,
368,
341,
262,
442,
7818,
198,
262,
2060,
10714,
10297,
1355,
10297,
65,
1,
1827,
983,
814,
4003,
782,
2895,
27638,
18896,
10483,
15454,
1507,
14498,
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_benchmarks() {
new_test_ext().execute_with(|| {
assert_ok!(test_benchmark_report_offence_im_online::<Test>());
assert_ok!(test_benchmark_report_offence_grandpa::<Test>());
assert_ok!(test_benchmark_report_offence_babe::<Test>());
assert_ok!(test_benchmark_on_initialize::<Test>());
... | rust_cleaned_test_functions.jsonl/81689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
19762,
15544,
368,
341,
197,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
298,
6948,
19817,
10297,
1944,
880,
39381,
14813,
13651,
763,
17895,
51546,
27638,
2271,
32872,
298,
6948,
19817,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiplication() {
let a = Fp([
0x0397_a383_2017_0cd4,
0x734c_1b2c_9e76_1d30,
0x5ed2_55ad_9a48_beb5,
0x095a_3c6b_22a7_fcfc,
0x2294_ce75_d4e2_6a27,
0x1333_8bd8_7001_1ebb,
]);
let b = Fp([
0xb9c3_c7c5_b119_6af7,
0x2580_e20... | rust_cleaned_test_functions.jsonl/23229 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91802,
1693,
368,
341,
262,
1077,
264,
284,
434,
79,
8956,
286,
220,
15,
87,
15,
18,
24,
22,
4306,
18,
23,
18,
62,
17,
15,
16,
22,
62,
15,
4385,
19,
345,
286,
220,
15,
87,
22,
18,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unconf_chan_via_listen() {
do_test_unconf_chan(true, true, false, ConnectStyle::FullBlockViaListen);
do_test_unconf_chan(false, true, false, ConnectStyle::FullBlockViaListen);
do_test_unconf_chan(true, false, false, ConnectStyle::FullBlockViaListen);
do_test_unconf_chan(false, false, false, ... | rust_cleaned_test_functions.jsonl/97703 | {
"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,
4907,
6135,
45552,
80710,
79286,
368,
341,
19935,
4452,
4907,
6135,
45552,
3715,
11,
830,
11,
895,
11,
13015,
2323,
486,
9432,
4713,
54428,
38714,
317,
19935,
4452,
4907,
6135,
45552,
3576,
11,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 a = Jacobian::from(Affine::new(
field_element!("01ef15c18599971b7beced415a40f0c7deacfd9b0d1819e03d723d8bc943cfca"),
field_element!("005668060aa49730b7be4801df46ec62de53ecd11abe43a32873000c36e8dc1f"),
));
let b = ScalarFieldElement::from... | rust_cleaned_test_functions.jsonl/38966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
341,
286,
1077,
264,
284,
24521,
1103,
486,
1499,
4346,
542,
482,
486,
931,
1006,
310,
2070,
7894,
17223,
15,
16,
823,
16,
20,
66,
16,
23,
20,
24,
24,
24,
22,
16,
65,
22,
16692... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_type_required_double() {
let schemaReplicant = SchemaReplicant::default();
let causetq = r#"[:find ?x :where [?x _ ?e] [(type ?e :edb.type/double)]]"#;
let SQLCausetQ { allegrosql, args } = translate(&schemaReplicant, causetq);
assert_eq!(allegrosql, "SELECT DISTINCT `Causets00... | rust_cleaned_test_functions.jsonl/90702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 280
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
18743,
24598,
368,
341,
262,
1077,
10802,
18327,
35237,
284,
12539,
18327,
35237,
486,
2258,
1428,
262,
1077,
2162,
18187,
80,
284,
435,
55543,
3447,
3903,
937,
87,
549,
2870,
508,
30,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_dict_file_record_corrupted() {
let tempdir = tempfile::tempdir().unwrap();
let mut file_dict_file = FileDictionaryFile::new(
tempdir.path(),
"test_file_dict_file_record_corrupted_1",
true,
10, /*file_rewrite_threshold*/
)
.unwrap();
let in... | rust_cleaned_test_functions.jsonl/132890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 652
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
5243,
2458,
14192,
14734,
85954,
368,
341,
262,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
5206,
1034,
5243,
2458,
284,
2887,
8517,
1703,
486,
931,
1006,
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_persistent_prefixes() {
// to ensure all the variants are tested by this test.
let mut remaining: HashSet<_> = SecureTokenKind::VARIANTS.iter().copied().collect();
let mut ensure = |kind: SecureTokenKind, prefix| {
assert_eq!(kind.prefix(), p... | rust_cleaned_test_functions.jsonl/90684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
13931,
13974,
288,
368,
341,
16885,
286,
442,
311,
5978,
678,
279,
26012,
525,
12510,
553,
419,
1273,
624,
286,
1077,
5206,
9664,
25,
18931,
32399,
29,
284,
34502,
3323,
10629,
486,
53,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_day16() {
let part1 = day16_part1();
assert_eq!(part1, "12541048");
let part2 = day16_part2();
assert_eq!(part2, "62858988");
} | rust_cleaned_test_functions.jsonl/95569 | {
"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,
16763,
16,
21,
368,
341,
286,
1077,
949,
16,
284,
1899,
16,
21,
10495,
16,
543,
286,
2060,
10714,
10297,
4480,
16,
11,
330,
16,
17,
20,
19,
16,
15,
19,
23,
3071,
286,
1077,
949,
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_ip_addrs_split_by_preference() {
let ip_v4 = Ipv4Addr::new(127, 0, 0, 1);
let ip_v6 = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
let v4_addr = (ip_v4, 80).into();
let v6_addr = (ip_v6, 80).into();
let (mut preferred, mut fallback) = SocketAddrs {
... | rust_cleaned_test_functions.jsonl/29699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 956
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10385,
2891,
5428,
17052,
3710,
92718,
368,
341,
286,
1077,
5997,
2273,
19,
284,
358,
30168,
19,
13986,
486,
931,
7,
16,
17,
22,
11,
220,
15,
11,
220,
15,
11,
220,
16,
317,
286,
1077,
5997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_test_query_plus_a_b_plus_d() {
test_parse_query_to_ast_helper("+(a b) +d", "(+(*\"a\" *\"b\") +\"d\")");
} | rust_cleaned_test_functions.jsonl/64421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4452,
5738,
28043,
4306,
880,
28043,
814,
368,
341,
286,
1273,
21039,
5738,
2346,
48019,
10418,
445,
13362,
64,
293,
8,
488,
67,
497,
11993,
10,
4071,
2105,
64,
2105,
353,
2105,
65,
62705... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_model_no_mapping_1() {
let device = device(None);
let uplink = default_uplink(5);
let model_id = eval_data_schema(None, &device, &None, &uplink.port.to_string());
assert_eq!(model_id, None);
} | rust_cleaned_test_functions.jsonl/29637 | {
"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,
5047,
6536,
26930,
62,
16,
368,
341,
286,
1077,
3671,
284,
3671,
26717,
317,
286,
1077,
705,
2080,
284,
1638,
8237,
2080,
7,
20,
626,
286,
1077,
1614,
842,
284,
5603,
1769,
25371,
26717,
11,
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_max() {
assert_eq!(1f32.max(&2f32), 2f32);
assert_eq!(2f32.max(&1f32), 2f32);
} | rust_cleaned_test_functions.jsonl/33101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
368,
341,
286,
2060,
10714,
10297,
16,
69,
18,
17,
6678,
2099,
17,
69,
18,
17,
701,
220,
17,
69,
18,
17,
317,
286,
2060,
10714,
10297,
17,
69,
18,
17,
6678,
2099,
16,
69,
18,
17,
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 |
#[test]
fn test_with_labels_gather() {
let mut labels = HashMap::new();
labels.insert("tkey".to_string(), "tvalue".to_string());
let r = Registry::new_custom(None, Some(labels)).unwrap();
let counter_a = Counter::new("test_a_counter", "test help").unwrap();
r.register(Bo... | rust_cleaned_test_functions.jsonl/132419 | {
"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,
6615,
14547,
1889,
1856,
368,
341,
286,
1077,
5206,
9201,
284,
10528,
486,
931,
543,
286,
9201,
7030,
445,
83,
792,
3263,
983,
3904,
1507,
330,
83,
957,
3263,
983,
3904,
5231,
286,
1077,
435,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_meta_doc_comments() {
let rules = create_rules(
r#"
macro_rules! foo {
($(#[$ i:meta])+) => (
$(#[$ i])+
fn bar() {}
)
}
"#,
);
assert_expansion(
MacroKind::Items,
&rules,
r#"foo! ... | rust_cleaned_test_functions.jsonl/14722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13381,
18869,
30359,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
32735,
3442,
600,
25,
5490,
2467,
36197,
589,
2399,
394,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_routing_id_slice() {
assert_eq!(mem::size_of::<u32>(), mem::size_of::<RoutingId>());
let routing_stack: &[u32] = &[1, 2, 3, 4];
let cast_stack = unsafe {
slice::from_raw_parts(
routing_stack.as_ptr() as *const RoutingId,
... | rust_cleaned_test_functions.jsonl/125622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
97710,
842,
26488,
368,
341,
286,
2060,
10714,
10297,
10536,
486,
2141,
3575,
27638,
84,
18,
17,
39019,
1833,
486,
2141,
3575,
27638,
24701,
764,
32872,
286,
1077,
29058,
15528,
25,
44590,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ceil() {
let cases = vec![
("12345", "12345"),
("0.99999", "1"),
("-0.99999", "0"),
("18446744073709551615", "18446744073709551615"),
("18446744073709551616", "18446744073709551616"),
("-18446744073709551615", "-1844... | rust_cleaned_test_functions.jsonl/13671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 543
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
22058,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
16,
17,
18,
19,
20,
497,
330,
16,
17,
18,
19,
20,
4461,
310,
3489,
15,
13,
24,
24,
24,
24,
24,
497,
330,
16,
4461,
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... | 2 |
#[test]
fn test_global() -> Result<(), Box<dyn Error>> {
let map = {
let mut map = HeaderMap::new();
map.insert(
HeaderName::from_static("x-ratelimit-global"),
HeaderValue::from_static("true"),
);
map.insert(
... | rust_cleaned_test_functions.jsonl/13093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19296,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
2415,
284,
341,
310,
1077,
5206,
2415,
284,
12104,
2227,
486,
931,
543,
310,
2415,
7030,
1006,
394,
12104,
675,
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_multiple_headers_merge_into_one_from_hyp() {
assert_headers!("friend" => ["alice"], "friend" => ["bob"]);
assert_headers!("friend" => ["alice"], "friend" => ["bob"], "friend" => ["carol"]);
assert_headers!("friend" => ["alice"], "friend" => ["bob"], "enemy" => ["carol"]);
} | rust_cleaned_test_functions.jsonl/94551 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
26719,
20888,
45514,
11667,
5673,
1523,
1082,
368,
341,
262,
2060,
26719,
17223,
10701,
1,
589,
4383,
63195,
7914,
330,
10701,
1,
589,
4383,
47086,
15049,
262,
2060,
26719,
17223,
10701,
1,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_incomplete_length() {
let bytes = hex!("30");
let res = parse_ber(&bytes).err().expect("expected error");
assert_eq!(res, Err::Incomplete(Needed::new(1)));
let res = parse_der(&bytes).err().expect("expected error");
assert_eq!(res, Err::Incomplete(Needed::new(1)));
let by... | rust_cleaned_test_functions.jsonl/67470 | {
"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,
1243,
14737,
5118,
368,
341,
262,
1077,
5820,
284,
12371,
17223,
18,
15,
797,
262,
1077,
592,
284,
4715,
88165,
2099,
9651,
568,
615,
1005,
17119,
445,
7325,
1465,
797,
262,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extreme_indices_bad_polygon() {
let poly1 = polygon![
(x: 1.0, y: 0.0),
(x: 1.3, y: 1.),
(x: 2.0, y: 1.0),
(x: 1.75, y: 1.75),
(x: 1.0, y: 2.0),
(x: 0.0, y: 1.0),
(x: 1.0, y: 0.0)
];
... | rust_cleaned_test_functions.jsonl/100477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 381
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9927,
9634,
18333,
34199,
73542,
368,
341,
1789,
286,
1077,
9861,
16,
284,
29372,
90515,
310,
320,
87,
25,
220,
16,
13,
15,
11,
379,
25,
220,
15,
13,
15,
1326,
310,
320,
87,
25,
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,
1... | 1 |
#[test]
fn test_markbase_de() {
let binary_gpos = vec![
0x00, 0x01, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x1e, 0x00, 0x2c, 0x00, 0x01, 0x44, 0x46,
0x4c, 0x54, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x01,
0x00, 0x00, 0x00, 0x01, 0x74, 0x65, 0x73, 0x... | rust_cleaned_test_functions.jsonl/13673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2680
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18924,
3152,
2259,
368,
341,
286,
1077,
7868,
1889,
966,
284,
7486,
90515,
310,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_two_sum() {
assert_eq!(two_sum(&[2, 7, 11, 15], 9), vec![(0usize, 1usize)]);
assert_eq!(two_sum(&[2, 7, 11, 15], 13), vec![(0usize, 2usize)]);
assert_eq!(two_sum(&[2, 7, 11, 15], 18), vec![(1usize, 2usize)]);
assert_eq!(
two_sum(&[2, 7, 4, 5], 9),
... | rust_cleaned_test_functions.jsonl/133926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23241,
10160,
368,
341,
286,
2060,
10714,
10297,
19789,
10160,
2099,
58,
17,
11,
220,
22,
11,
220,
16,
16,
11,
220,
16,
20,
1125,
220,
24,
701,
7486,
0,
9697,
15,
51878,
11,
220,
16,
51878,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_request() {
let init = Package::create_init_request(TEST_ROOMID, "key".to_owned());
match &init {
Package::InitRequest(payload) => assert!(payload.starts_with(PACKAGE_INIT_BEGINNING)),
_ => unreachable!(),
}
let init = init.encode().un... | rust_cleaned_test_functions.jsonl/125888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
7893,
368,
341,
286,
1077,
2930,
284,
16906,
486,
3182,
6137,
7893,
50320,
59966,
915,
11,
330,
792,
3263,
983,
51973,
1423,
286,
2432,
609,
2327,
341,
310,
16906,
486,
3803,
1900,
26772,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_into_authenticator_transport() {
let cbor_authenticator_transport: cbor::Value = cbor_text!("usb");
let authenticator_transport =
AuthenticatorTransport::try_from(cbor_authenticator_transport.clone());
let expected_authenticator_transport = AuthenticatorT... | rust_cleaned_test_functions.jsonl/49005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
45514,
14014,
61393,
46398,
368,
341,
286,
1077,
272,
9368,
14014,
61393,
46398,
25,
272,
9368,
486,
1130,
284,
272,
9368,
4326,
17223,
24343,
797,
286,
1077,
13210,
850,
46398,
4035,
310,
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_time() {
let mut p = Parser::new();
assert_eq!(p.time("T11:22:33.456").1,
Done("", Time::new_str("11", "22", "33", Some("456"), None)));
p = Parser::new();
assert_eq!(p.time("T04:05:06").1,
Done("", Time::new_str("04", "05", "06", None, None)));
} | rust_cleaned_test_functions.jsonl/27414 | {
"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,
3009,
368,
341,
262,
1077,
5206,
281,
284,
21102,
486,
931,
543,
262,
2060,
10714,
10297,
79,
6378,
445,
51,
16,
16,
25,
17,
17,
25,
18,
18,
13,
19,
20,
21,
1827,
16,
345,
414,
27357,
1981... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slot_propagated_threshold_from_votes() {
let keypairs: HashMap<_, _> = iter::repeat_with(|| {
let node_keypair = Keypair::new();
let vote_keypair = Keypair::new();
let stake_keypair = Keypair::new();
let node_pubkey = node_keypair.pu... | rust_cleaned_test_functions.jsonl/91767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 905
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
27563,
21663,
351,
657,
21858,
5673,
65116,
368,
341,
286,
1077,
1376,
77256,
25,
10528,
27,
6878,
716,
29,
284,
5367,
486,
30624,
6615,
79453,
341,
310,
1077,
2436,
3097,
12670,
284,
6569,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_match_section_byte() {
assert!(match_section_byte::QueryParser::new()
.parse("SELECT foo")
.is_ok());
assert!(match_section_byte::QueryParser::new()
.parse("select foo")
.is_ok());
assert!(match_section_byte::QueryParser::new()
.parse("INSERT f... | rust_cleaned_test_functions.jsonl/27434 | {
"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,
10708,
16221,
19737,
368,
341,
262,
2060,
10297,
6347,
16221,
19737,
486,
2859,
6570,
486,
931,
741,
286,
659,
6400,
445,
4858,
15229,
1138,
286,
659,
285,
19817,
1423,
262,
2060,
10297,
6347,
162... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_monitor_update_fail_claim() {
// Basic test for monitor update failures when processing claim_funds calls.
// the payments from C onwards to A.
let chanmon_cfgs = create_chanmon_cfgs(3);
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(3, &n... | rust_cleaned_test_functions.jsonl/58344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1970
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40112,
8882,
22121,
84969,
368,
341,
197,
322,
14625,
1273,
369,
8718,
2647,
27850,
979,
8692,
3717,
761,
42950,
6738,
624,
49106,
197,
322,
279,
14173,
504,
356,
59425,
311,
362,
624,
10217,
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... | 5 |
#[test]
fn test_top_modules() {
let inv = Invoice {
bindle_version: "v1".to_owned(),
yanked: None,
signature: None,
annotations: None,
bindle: BindleSpec {
id: "drink/1.2.3"
.to_owned()
.t... | rust_cleaned_test_functions.jsonl/82234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1722
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
15848,
368,
341,
286,
1077,
1529,
284,
40190,
341,
310,
10719,
273,
9438,
25,
330,
85,
16,
3263,
983,
51973,
3148,
310,
379,
40772,
25,
2240,
345,
310,
11957,
25,
2240,
345,
310,
32207,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_encoders() -> Result<(), ConnectionError> {
assert_bind_encode(true, &[0, 0, 0, 1, 1]);
assert_bind_encode(false, &[0, 0, 0, 1, 0]);
assert_bind_encode(
TimestampValue::new(1650890322, None),
&[0, 0, 0, 8, 255, 252, 162, 254, 196, 225, 80, 2... | rust_cleaned_test_functions.jsonl/14351 | {
"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,
31761,
13781,
52498,
368,
1464,
5714,
68843,
11032,
1454,
29,
341,
286,
2060,
27461,
11224,
3715,
11,
44590,
15,
11,
220,
15,
11,
220,
15,
11,
220,
16,
11,
220,
16,
2558,
286,
2060,
27461,
112... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_search_remote_apps() {
let remote_url =
"https://api.github.com/repos/ScoopInstaller/Main/git/trees/HEAD?recursive=1";
let query = "7zip";
let actual = App::search_remote_apps(remote_url, query).unwrap();
let expect = vec![App {
name: Stri... | rust_cleaned_test_functions.jsonl/9979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10716,
36425,
69899,
368,
341,
286,
1077,
8699,
2903,
4035,
310,
330,
2428,
1110,
2068,
11021,
905,
49505,
11374,
86857,
88096,
65241,
60590,
5523,
7858,
14,
35433,
30,
49512,
28,
16,
876,
286,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_malformed_module() {
// Compile module M.
let code = r#"
module {{ADDR}}::M {
public fun foo() {}
}
"#;
let code = code.replace("{{ADDR}}", &format!("0x{}", TEST_ADDR.to_string()));
let mut units = compile_units(&code).unwrap();
let m = as_mo... | rust_cleaned_test_functions.jsonl/48432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 755
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
278,
10155,
10750,
368,
341,
262,
442,
54467,
4688,
386,
624,
262,
1077,
2038,
284,
435,
2,
698,
286,
4688,
5867,
29210,
3417,
486,
44,
341,
310,
584,
2464,
15229,
368,
5613,
286,
456,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mut() {
let span = span::mock().named("err_mut");
let (collector, handle) = collector::mock()
.new_span(span.clone())
.enter(span.clone())
.event(event::mock().at_level(Level::ERROR))
.exit(span.clone())
.drop_span(span)
.done()
.ru... | rust_cleaned_test_functions.jsonl/3566 | {
"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,
29523,
368,
341,
262,
1077,
9390,
284,
9390,
486,
16712,
1005,
30245,
445,
615,
29523,
797,
262,
1077,
320,
91469,
11,
3705,
8,
284,
31953,
486,
16712,
741,
286,
659,
931,
37382,
66092,
15997,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_schema_from_thrift_with_num_children_set() {
let message_type = "
message schema {
OPTIONAL BYTE_ARRAY id (UTF8);
OPTIONAL BYTE_ARRAY name (UTF8);
OPTIONAL BYTE_ARRAY message (UTF8);
OPTIONAL INT32 type (UINT_8);
OPTIONAL INT64 author_time (TIME... | rust_cleaned_test_functions.jsonl/16694 | {
"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,
25371,
5673,
5854,
41380,
6615,
4273,
31206,
2602,
368,
341,
1789,
286,
1077,
1943,
1819,
284,
6228,
262,
1943,
10802,
341,
414,
76232,
35377,
17724,
877,
320,
8561,
23,
317,
414,
76232,
35377,
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... | 3 |
#[test]
fn test_parse_decimal() {
let tests = [
("123.00", 12300i128),
("123.123", 123123i128),
("0.0123", 123i128),
("0.12300", 12300i128),
("-5.123", -5123i128),
("-45.432432", -45432432i128),
];
for (s, i) in test... | rust_cleaned_test_functions.jsonl/16419 | {
"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,
21039,
74429,
368,
341,
286,
1077,
7032,
284,
2278,
310,
3489,
16,
17,
18,
13,
15,
15,
497,
220,
16,
17,
18,
15,
15,
72,
16,
17,
23,
1326,
310,
3489,
16,
17,
18,
13,
16,
17,
18,
497,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_generic_opaque_type_in_fn_ptr() {
// Test printing a generic opaque type as an fn ptr's parameter
reparse_test!(
program {
struct Foo {}
trait Bar<T> {}
trait Faz {
type Assoc;
}
impl Faz for Foo {
... | rust_cleaned_test_functions.jsonl/34210 | {
"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,
41232,
10287,
19659,
1819,
1243,
15246,
4348,
368,
341,
262,
442,
3393,
18484,
264,
13954,
46484,
943,
438,
458,
5168,
10087,
594,
5733,
198,
262,
312,
6400,
4452,
33673,
286,
2025,
341,
310,
2036... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bank_forks_different_set_root() {
solana_logger::setup();
let leader_keypair = Keypair::new();
let GenesisConfigInfo {
mut genesis_config,
mint_keypair: _,
voting_keypair,
} = create_genesis_config_with_leader(10_000, &leader_ke... | rust_cleaned_test_functions.jsonl/30581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
761,
73302,
82741,
2602,
12993,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
7653,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
40788,
2648,
1731,
341,
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... | 4 |
#[test]
fn test_from_str_vec() {
let vec = vec!["foo", "asdfas", "asdkj", "as"];
let value = vec
.iter()
.map(|i| ExpressionNode::from(*i))
.collect::<Vec<_>>();
assert_eq!(
ExpressionNode::from(vec.to_vec()),
ExpressionNode::A... | rust_cleaned_test_functions.jsonl/89520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
13251,
368,
341,
286,
1077,
7486,
284,
7486,
0,
1183,
7975,
497,
330,
76615,
300,
497,
330,
300,
7584,
73,
497,
330,
300,
31797,
286,
1077,
897,
284,
7486,
198,
310,
659,
2015,
741... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_struct_keep_comments_and_attrs_several_fields_tuple() {
check_assist(
extract_struct_from_enum_variant,
"enum A { $0One(/* comment */ #[attr] u32, /* another */ u32 /* tail */) }",
r#"
struct One(/* comment */ #[attr] u32, /* another */ u32 /* ... | rust_cleaned_test_functions.jsonl/36299 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
15126,
50293,
30359,
8378,
39578,
3453,
17539,
12132,
21773,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
15126,
5673,
31054,
46112,
345,
310,
330,
9018,
362,
314,
400,
15,
3966,
49589,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_addition() {
assert_eq!(Boolean(false) + Boolean(false), Boolean(false));
assert_eq!(Boolean(false) + Boolean(true), Boolean(true));
assert_eq!(Boolean(true) + Boolean(false), Boolean(true));
assert_eq!(Boolean(true) + Boolean(true), Boolean(true));
assert... | rust_cleaned_test_functions.jsonl/101193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
680,
368,
341,
286,
2060,
10714,
10297,
6890,
3576,
8,
488,
6992,
3576,
701,
6992,
3576,
1106,
286,
2060,
10714,
10297,
6890,
3576,
8,
488,
6992,
3715,
701,
6992,
3715,
1106,
286,
2060,
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_strings_in_vec_should_be_concatenated_and_escaped_correctly() {
let params = StreamsParams::new()
.with_channel("StarCraft I")
.with_channel("StarCraft II");
assert_eq!(params.into_query_string(), "?channel=StarCraft%20I,StarCraft%20II");
} | rust_cleaned_test_functions.jsonl/53706 | {
"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,
33500,
1243,
13251,
43378,
21263,
57478,
268,
657,
8378,
62,
65826,
31550,
398,
368,
341,
286,
1077,
3628,
284,
94522,
4870,
486,
931,
741,
394,
659,
4197,
14571,
445,
12699,
38849,
358,
1138,
394... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_logo_scale_down() {
// The goal of this test is to check that the tessellator can handle very small geometry.
let mut builder = Path::builder().flattened(0.011).with_svg();
build_logo_path(&mut builder);
let mut path = builder.build();
scale_path(&mut path, 0.005);
... | rust_cleaned_test_functions.jsonl/102407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
590,
29962,
16727,
13998,
368,
341,
262,
442,
576,
5795,
315,
419,
1273,
374,
311,
1779,
429,
279,
79830,
613,
850,
646,
3705,
1602,
2613,
17047,
382,
262,
1077,
5206,
7363,
284,
7933,
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_rpc_verify_pubkey() {
let pubkey = solana_sdk::pubkey::new_rand();
assert_eq!(verify_pubkey(&pubkey.to_string()).unwrap(), pubkey);
let bad_pubkey = "a1b2c3d4";
assert_eq!(
verify_pubkey(&bad_pubkey.to_string()),
Err(Error::invalid_params("... | rust_cleaned_test_functions.jsonl/3045 | {
"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,
60799,
35638,
34014,
792,
368,
341,
286,
1077,
95116,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
2060,
10714,
10297,
12446,
34014,
792,
2099,
9585,
792,
2389,
3904,
6011,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flags_from_vec_2() {
let (flags, subcommand, argv) =
flags_from_vec(svec!["deno", "-r", "run", "script.ts"]);
assert_eq!(
flags,
DenoFlags {
reload: true,
..DenoFlags::default()
}
);
assert_eq!(subcommand, DenoSubcommand::Run);
assert_e... | rust_cleaned_test_functions.jsonl/112831 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14130,
5673,
13251,
62,
17,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
4035,
414,
8042,
5673,
13251,
1141,
4083,
0,
1183,
5183,
78,
497,
6523,
81,
497,
330,
6108,
497,
330,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tokenomic() {
new_test_ext().execute_with(|| {
let params = TokenomicParameters::<Test>::get().unwrap();
let tokenomic = Tokenomic::<Test>::new(params);
fn pow(x: FixedPoint, n: u32) -> FixedPoint {
let mut i = n;
let mut x_pow2 = x;
let mut z = FixedPoint::from_num... | rust_cleaned_test_functions.jsonl/86889 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1050
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3075,
368,
341,
298,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
571,
10217,
3628,
284,
9660,
3075,
9706,
27638,
2271,
6831,
455,
1005,
15454,
543,
571,
10217,
3950,
3075,
284,
9660,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_parse_unfinished() {
test_parse_err::<Simple>(&["<Simple>
<c>abc</c>
<a/>
<b>2</b>
<d/>"]);
} | rust_cleaned_test_functions.jsonl/54633 | {
"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,
21039,
4907,
12129,
368,
341,
262,
1273,
21039,
9266,
27638,
16374,
44784,
1183,
27,
16374,
397,
310,
366,
66,
29,
13683,
522,
66,
397,
310,
366,
64,
10171,
310,
366,
65,
29,
17,
522,
65,
397,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_init_empty_context_for_sandbox_with_patch_json() -> Result<(), anyhow::Error> {
// init runtime and turn on/off ocaml logging
client::change_runtime_configuration(TezosRuntimeConfiguration {
debug_mode: false,
compute_context_action_tree_hashes: false,
log_enabled... | rust_cleaned_test_functions.jsonl/54418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1064
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
15124,
8467,
5478,
643,
31536,
6615,
39643,
9455,
368,
1464,
5714,
68843,
88964,
486,
1454,
29,
341,
262,
442,
2930,
15592,
323,
2484,
389,
50806,
17796,
9467,
8392,
198,
262,
2943,
486,
337... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_session_config_cacert_not_found() {
let cfg = CloudConfig {
auth_type: Some("password".into()),
auth: Some(Auth {
auth_url: Some("http://127.0.0.1".into()),
username: Some("vasya".into()),
password: Some("hack... | rust_cleaned_test_functions.jsonl/99078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
12316,
5332,
666,
580,
529,
7913,
21480,
368,
341,
286,
1077,
13286,
284,
14817,
2648,
341,
310,
4166,
1819,
25,
4329,
445,
3833,
3263,
18122,
14702,
310,
4166,
25,
4329,
37640,
341,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_valid_half() {
assert_eq!(
FinancialPeriod::Half {
half: 1,
year: 1972
}
.is_valid(),
true
);
assert_eq!(
FinancialPeriod::Half {
half: 5,
year:... | rust_cleaned_test_functions.jsonl/21179 | {
"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,
6892,
8337,
40626,
368,
341,
286,
2060,
10714,
33673,
310,
17503,
23750,
486,
42627,
341,
394,
4279,
25,
220,
16,
345,
394,
1042,
25,
220,
16,
24,
22,
17,
198,
310,
456,
310,
659,
285,
8337,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_as_duration() {
test_none_with_ctx_and_extra(cast_json_as_duration);
// the case that Json::unquote failed had be tested by test_json_unquote
let cs = vec![
Json::from_object(BTreeMap::default()).unwrap(),
Json::from_array(vec![]).unwrap(),
... | rust_cleaned_test_functions.jsonl/1996 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1351
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
11898,
25454,
368,
341,
286,
1273,
31488,
6615,
15147,
8378,
31858,
1337,
559,
9455,
11898,
25454,
626,
286,
442,
279,
1142,
429,
8308,
486,
359,
2949,
4641,
1030,
387,
12510,
553,
1273,
945... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 t1 = Decomposed {
scale: 2.0f64,
rot: Quaternion::new(0.5f64.sqrt(), 0.5f64.sqrt(), 0.0, 0.0),
disp: Vector3::new(1.0f64, 2.0, 3.0),
};
let t2 = Decomposed {
scale: 3.0f64,
rot: Quaternion::new(0.5f64.sqrt(), 0.0, 0.5f64.sqrt(), 0.0... | rust_cleaned_test_functions.jsonl/86457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 346
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
368,
341,
262,
1077,
259,
16,
284,
96378,
3865,
341,
286,
5452,
25,
220,
17,
13,
15,
69,
21,
19,
345,
286,
5749,
25,
24801,
486,
931,
7,
15,
13,
20,
69,
21,
19,
18049,
1507,
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_serde_ser_internally_tagged_enum() -> Result<(), Box<EvalAltResult>> {
#[derive(Serialize)]
#[serde(tag = "tag")]
enum MyEnum {
VariantEmptyStruct {},
VariantStruct { a: i32 },
}
let mut map = to_dynamic(MyEnum::VariantEmptyStruct {})?.cast::<Map>();
asse... | rust_cleaned_test_functions.jsonl/97329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
75861,
4042,
932,
745,
9372,
3556,
31054,
368,
1464,
5714,
68843,
8261,
23835,
831,
26017,
2077,
2452,
341,
262,
11506,
27098,
3759,
9050,
5563,
262,
11506,
47024,
19343,
284,
330,
4578,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_arr() {
let code = vec![0x6B, 0xD1];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.A = 0xFF;
nes.next(&mut memory).unwrap();
assert_eq!(1, nes.C);
assert_eq!(0, nes.V);
assert_eq!(0, nes.N);
assert_eq!(0... | rust_cleaned_test_functions.jsonl/38742 | {
"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,
11210,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
87,
21,
33,
11,
220,
15,
15764,
16,
935,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
543,
286,
1077,
5206,
4938,
284,
501,
19... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assert_range_fail() {
assert_range!((0..10), 11);
assert_range!((1.0..=2.0), 2.1);
} | rust_cleaned_test_functions.jsonl/83469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 60
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
9698,
22121,
368,
341,
262,
2060,
9698,
0,
1188,
15,
496,
16,
15,
701,
220,
16,
16,
317,
262,
2060,
9698,
0,
1188,
16,
13,
15,
496,
28,
17,
13,
15,
701,
220,
17,
13,
16,
317,
92
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_extract_session_metrics_ok() {
let mut metrics = vec![];
let session = SessionUpdate::parse(
r#"{
"init": false,
"started": "2021-04-26T08:00:00+0100",
"attrs": {
"release": "1.0.0"
}... | rust_cleaned_test_functions.jsonl/63638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
12316,
37686,
19817,
368,
341,
286,
1077,
5206,
16734,
284,
7486,
0,
40901,
286,
1077,
3797,
284,
9164,
4289,
486,
6400,
1006,
310,
435,
55543,
515,
394,
330,
2327,
788,
895,
345,
394,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dcx_h() {
let mut state = State8080::empty_state();
state.memory = vec![0x2b];
state.h = 0x98;
state.l = 0x00;
emulate_8080_op(&mut state);
assert_eq!(state.h, 0x97);
assert_eq!(state.l, 0xff);
} | rust_cleaned_test_functions.jsonl/7758 | {
"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,
814,
25844,
1523,
368,
341,
286,
1077,
5206,
1584,
284,
3234,
23,
15,
23,
15,
486,
3194,
4387,
543,
286,
1584,
36611,
284,
7486,
20703,
15,
87,
17,
65,
935,
286,
1584,
860,
284,
220,
15,
87,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cast_noop() {
// check if we can cast categorical twice without panic
let ca = Utf8Chunked::new_from_slice("foo", &["bar", "ham"]);
let out = ca.cast(&DataType::Categorical).unwrap();
let out = out.cast(&DataType::Categorical).unwrap();
assert_eq!(out.dtyp... | rust_cleaned_test_functions.jsonl/5660 | {
"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,
5303,
6536,
453,
368,
341,
286,
442,
1779,
421,
582,
646,
6311,
69536,
10917,
2041,
21975,
198,
286,
1077,
2162,
284,
43432,
23,
28304,
291,
486,
931,
5673,
26488,
445,
7975,
497,
609,
1183,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_none() {
let code = "123qwe";
let span = code.span();
let x = substr("asd");
let t = x.or_else(|| substr("qwe"));
let r = t.parse(span.ref_clone());
println!("{:?}", r);
assert_eq!(r, None);
} | rust_cleaned_test_functions.jsonl/94326 | {
"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,
31488,
368,
341,
286,
1077,
2038,
284,
330,
16,
17,
18,
80,
896,
876,
286,
1077,
9390,
284,
2038,
52869,
543,
286,
1077,
856,
284,
15769,
445,
79102,
797,
286,
1077,
259,
284,
856,
24282,
6262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get() {
assert_eq!(2u32.bit(0), false);
assert_eq!(2u32.bit(1), true);
assert_eq!(2u32.bit(2), false);
assert_eq!(123u32.bits(0..0), 0);
assert_eq!(255u32.bits(0..8), 255);
assert_eq!(255u32.bits(0..9), 255);
assert_eq!(255u32.bits(0..7), 127);
assert_eq!(1234u32.bits(32..), 0);
assert_... | rust_cleaned_test_functions.jsonl/52222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
368,
341,
6948,
10714,
10297,
17,
84,
18,
17,
30099,
7,
15,
701,
895,
317,
6948,
10714,
10297,
17,
84,
18,
17,
30099,
7,
16,
701,
830,
317,
6948,
10714,
10297,
17,
84,
18,
17,
30099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_numeric_valid_nested() {
let mut test = Map::new();
test.assign("numeric", Value::String("3".to_owned())).ok();
let mut params = Map::new();
params.assign("test", Value::Map(test)).ok();
let mut rules = BTreeMap::new();
rules.insert("test.numeric", vec![Rule::Numeric]);
... | rust_cleaned_test_functions.jsonl/74448 | {
"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,
29418,
8337,
66279,
368,
341,
262,
1077,
5206,
1273,
284,
5027,
486,
931,
543,
262,
1273,
17870,
445,
19600,
497,
5162,
486,
703,
445,
18,
3263,
983,
51973,
34670,
562,
543,
262,
1077,
5206,
362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_matches_starts_and_ends_with_correctly() {
check(
&WildcardPattern::StartsAndEndsWith {
pattern: "alf*cats".into(),
starts_with: "alf".into(),
ends_with: "cats".into()
},
vec!["alf-loves-cats", "alfcats",... | rust_cleaned_test_functions.jsonl/80619 | {
"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,
38344,
86552,
8378,
90729,
6615,
31550,
398,
368,
341,
286,
1779,
1006,
310,
609,
92988,
15760,
486,
3479,
82,
3036,
3727,
16056,
341,
394,
5383,
25,
330,
3104,
9,
37452,
3263,
18122,
3148,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vertica_epoch_days() {
assert_eq!(
-358,
NaiveDate::from_ymd(1999, 1, 8)
.to_y2k_epoch_duration()
.num_days()
);
assert_eq!(
0,
NaiveDate::from_ymd(2000, 1, 1)
.to_y2k_epoch_du... | rust_cleaned_test_functions.jsonl/13418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54000,
3001,
20682,
28353,
368,
341,
286,
2060,
10714,
33673,
310,
481,
18,
20,
23,
345,
310,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7,
16,
24,
24,
24,
11,
220,
16,
11,
220,
23,
340,
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_kms_envelope_roundtrip() {
tink_aead::init();
let a = create_kms_envelope_aead();
let original_plaintext = b"hello world";
let ciphertext = a
.encrypt(original_plaintext, &[])
.expect("failed to encrypt");
let plaintext = a.decrypt(&ciphertext, &[]).expect(... | rust_cleaned_test_functions.jsonl/13384 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4698,
1011,
6205,
18853,
29896,
32981,
368,
341,
262,
90584,
4306,
3149,
486,
2327,
543,
262,
1077,
264,
284,
1855,
4698,
1011,
6205,
18853,
4306,
3149,
1428,
262,
1077,
4024,
6317,
1641,
427,
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_peerset_reject_incoming_in_reserved_only() {
let incoming = PeerId::random();
let ii = IncomingIndex(1);
let config = PeersetConfig {
sets: vec![SetConfig {
in_peers: 50,
out_peers: 50,
bootnodes: vec![],
... | rust_cleaned_test_functions.jsonl/50344 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36367,
44146,
1288,
583,
1243,
4959,
1243,
74913,
18410,
368,
341,
286,
1077,
19393,
284,
45147,
764,
486,
11463,
543,
286,
1077,
14460,
284,
96143,
1552,
7,
16,
317,
286,
1077,
2193,
284,
5139,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_5() {
assert_eq!(
parse_column_type(&mut Parser::new("decimal(4,2)")),
ColumnType::Decimal(NumericAttr {
maximum: Some(4),
decimal: Some(2),
unsigned: None,
zero_fill: None,
})
);
... | rust_cleaned_test_functions.jsonl/73834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
20,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
8744,
1819,
2099,
6984,
21102,
486,
931,
445,
23289,
7,
19,
11,
17,
8,
30154,
310,
9332,
929,
486,
11269,
8204,
12572,
13371,
341,
394,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero_size_dom() {
struct TestLayout { }
impl Layout for TestLayout {
fn layout(&self) -> Dom<Self> {
Dom::new(NodeType::Div)
}
}
let mut null_dom =
(0..0)
.map(|_| NodeData { node_type: NodeType::Div, .. Default::default(... | rust_cleaned_test_functions.jsonl/2902 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
2368,
35749,
368,
8022,
262,
2036,
3393,
2175,
314,
2553,
262,
11605,
13821,
369,
3393,
2175,
972,
286,
5168,
6789,
2099,
721,
8,
1464,
20751,
61748,
29,
972,
310,
20751,
486,
931,
22078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issue39() {
let reads = b"GGCGTGGTGGCTTATGCCTGTAATCCCAGCACTTTGGGAGGTCGAAGTGGGCGG$CCGC\
CCACTTCGACCTCCCAAAGTGCTGGGATTACAGGCATAAGCCACCACGCC$CGAAGTGG\
GCGGATCACTTGAGGTCAGGAGTTGGAGACTAGCCTGGCCAACACGATGAAACCCCGTC\
TCTAATA$TA... | rust_cleaned_test_functions.jsonl/18362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
18,
24,
368,
341,
286,
1077,
15804,
284,
293,
1,
22254,
8798,
51,
22254,
51,
22254,
1162,
51,
828,
22863,
1162,
38,
15204,
828,
53873,
1890,
5049,
1162,
14903,
22254,
38,
1890,
38,
7749,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.