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_get_pair_missing() {
let hole = [&Card {
value: CardValue::Value3,
suit: CardSuit::Spades,
},
&Card {
value: CardValue::Value4,
suit: CardSuit::Spades,
... | rust_cleaned_test_functions.jsonl/45778 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 819
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
14445,
40447,
368,
341,
286,
1077,
14178,
284,
34336,
5770,
341,
664,
897,
25,
6795,
1130,
486,
1130,
18,
345,
664,
7781,
25,
6795,
62898,
486,
6406,
3452,
345,
503,
1153,
503,
609,
5770,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bmp() {
Python::with_gil(|py| {
let s = "\u{1F30F}";
let py_string = s.to_object(py);
assert_eq!(s, py_string.extract::<String>(py).unwrap());
})
} | rust_cleaned_test_functions.jsonl/118012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
880,
1307,
368,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
341,
310,
1077,
274,
284,
2917,
84,
90,
16,
37,
18,
15,
37,
26259,
310,
1077,
4510,
3904,
284,
274,
2389,
5314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_9xy0_skip_if_mismatch_reg() {
let mut machine = Machine::new(TestContext::new());
machine.register_set(0xB, 0xC);
machine.register_set(0xC, 4);
machine.test_opcode(0x9BC0);
// Should skip next instruction
assert_eq!(machine.pc, PC_BEGIN + 4);
// Should not skip if th... | rust_cleaned_test_functions.jsonl/127980 | {
"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,
62,
24,
4130,
15,
44830,
11119,
717,
24976,
4920,
368,
341,
262,
1077,
5206,
5662,
284,
12960,
486,
931,
31159,
1972,
486,
931,
1423,
262,
5662,
9929,
2602,
7,
15,
14377,
11,
220,
15,
12125,
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_mixcolums_bis() {
let mut state = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
let mut state_bis = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15];
mixcolumns(&mut state);
mixcolumns_bis(&mut state_bis);
assert_eq!(state, state_bis);
... | rust_cleaned_test_functions.jsonl/89385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67729,
66,
1132,
82,
880,
285,
368,
341,
286,
1077,
5206,
1584,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
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_get_bit() {
let bytes = vec![0x01, 0x02];
let nibble_path = NibblePath::new(bytes);
assert_eq!(nibble_path.get_bit(0), false);
assert_eq!(nibble_path.get_bit(1), false);
assert_eq!(nibble_path.get_bit(2), false);
assert_eq!(nibble_path.get_bit(7), true);
assert_eq!(ni... | rust_cleaned_test_functions.jsonl/97689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13996,
368,
341,
262,
1077,
5820,
284,
7486,
20703,
15,
87,
15,
16,
11,
220,
15,
87,
15,
17,
935,
262,
1077,
30285,
891,
2638,
284,
451,
82418,
1820,
486,
931,
23158,
317,
262,
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_operator() {
assert_eq!(Angle::<f32>::n_pi(1.0) + Angle::<f32>::n_pi(1.0), Angle::<f32>::n_pi(2.0));
assert_eq!(Angle::<f32>::degrees(90.0) + Angle::<f32>::degrees(90.0), Angle::<f32>::degrees(180.0));
assert_eq!(Angle::<f32>::n_pi(1.0) + Angle::<f32>::degrees(180.0), Ang... | rust_cleaned_test_functions.jsonl/7222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40594,
368,
341,
286,
2060,
10714,
10297,
15939,
27638,
69,
18,
17,
6831,
77,
47771,
7,
16,
13,
15,
8,
488,
36237,
27638,
69,
18,
17,
6831,
77,
47771,
7,
16,
13,
15,
701,
36237,
27638,
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_arg_iterate() {
// test that normal args remain unchanged
assert_eq!(
arg_outputs("head -n -5 -zv"),
Ok("head -n -5 -zv".to_owned())
);
// tests that nonsensical args are unchanged
assert_eq!(
arg_outputs("head -to_be_or... | rust_cleaned_test_functions.jsonl/72118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6057,
11723,
349,
368,
341,
286,
442,
1273,
429,
4622,
2827,
7146,
34857,
198,
286,
2060,
10714,
33673,
310,
1392,
35189,
445,
1983,
481,
77,
481,
20,
481,
89,
85,
4461,
310,
7622,
445,
1983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_last_mut() {
let mut a = vec![];
assert_eq!(a.last_mut(), None);
a = vec![11];
assert_eq!(*a.last_mut().unwrap(), 11);
a = vec![11, 12];
assert_eq!(*a.last_mut().unwrap(), 12);
} | rust_cleaned_test_functions.jsonl/12855 | {
"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,
12195,
29523,
368,
341,
262,
1077,
5206,
264,
284,
7486,
0,
15078,
262,
2060,
10714,
10297,
64,
9110,
29523,
1507,
2240,
317,
262,
264,
284,
7486,
20703,
16,
16,
935,
262,
2060,
10714,
0,
4071,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_doc_attr_multiple_and_mixed() {
check(
r#"
/// bar docs 0
#[doc = "bar docs 1"]
#[doc = "bar docs 2"]
struct Bar;
fn foo() { let bar = Ba<|>r; }
"#,
expect![[r#"
*Bar*
```rust
test
```
... | rust_cleaned_test_functions.jsonl/66137 | {
"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,
53445,
15126,
18869,
10422,
45233,
8378,
717,
3286,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2575,
3619,
26340,
220,
15,
198,
13353,
5236,
284,
330,
2257,
26340,
220,
16,
7026,
13353,
5236,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_item() {
let querier = new_valid_db("get_item.db");
let got_item = querier.get_item("Test_Item");
assert_eq!(common_item(), got_item);
} | rust_cleaned_test_functions.jsonl/107675 | {
"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,
3062,
5634,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
455,
5634,
7076,
3071,
286,
1077,
2684,
5634,
284,
29134,
1268,
670,
5634,
445,
2271,
27518,
797,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_finish() {
tor_rtcompat::test_with_one_runtime!(|_rt| async move {
let ed25519_id = [3_u8; 32].into();
let rsa_id = [4_u8; 20].into();
let peer_addr = "127.1.1.2:443".parse().unwrap();
let ver = VerifiedChannel {
link_protoc... | rust_cleaned_test_functions.jsonl/21665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 404
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42980,
368,
341,
286,
5683,
40169,
18331,
486,
1944,
6615,
11667,
33232,
10297,
91,
62,
3342,
91,
3312,
3271,
341,
310,
1077,
1578,
17,
20,
20,
16,
24,
842,
284,
508,
18,
7300,
23,
26,
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_longer_than() {
let mut result = vec![];
let msgs = vec![
Message { level: 1, duration: Duration::from_nanos(3), message: "bar".to_owned() },
Message { level: 1, duration: Duration::from_nanos(2), message: "bar".to_owned() },
Message { level: 0... | rust_cleaned_test_functions.jsonl/101833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
261,
51613,
368,
341,
286,
1077,
5206,
1102,
284,
7486,
0,
15078,
286,
1077,
41270,
284,
7486,
90515,
310,
4856,
314,
2188,
25,
220,
16,
11,
8090,
25,
21045,
486,
1499,
1089,
43605,
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_output_ser_deser() {
let keychain = ExtKeychain::from_random_seed(false).unwrap();
let key_id = ExtKeychain::derive_key_id(1, 1, 0, 0, 0);
let switch = &keychain::SwitchCommitmentType::Regular;
let commit = keychain.commit(5, &key_id, switch).unwrap();
let builder = proof::ProofBuilder::new... | rust_cleaned_test_functions.jsonl/10195 | {
"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,
7645,
75861,
15768,
261,
368,
341,
10217,
1376,
8819,
284,
9447,
1592,
8819,
486,
1499,
22644,
33809,
3576,
568,
15454,
543,
10217,
1376,
842,
284,
9447,
1592,
8819,
486,
27098,
3097,
842,
7,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_io_buffers() {
let mut buf1 = vec![0x0u8; 16];
let mut buf2 = vec![0x0u8; 16];
let mut bufs = VecDeque::new();
unsafe {
bufs.push_back(VolatileSlice::new(buf1.as_mut_ptr(), buf1.len()));
bufs.push_back(VolatileSlice::new(buf2.as_mut_ptr(), ... | rust_cleaned_test_functions.jsonl/17349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 805
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16939,
54591,
368,
341,
286,
1077,
5206,
6607,
16,
284,
7486,
20703,
15,
87,
15,
84,
23,
26,
220,
16,
21,
935,
286,
1077,
5206,
6607,
17,
284,
7486,
20703,
15,
87,
15,
84,
23,
26,
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 |
#[test]
fn test_mod_mul_constant() -> Result<(), PlonkError> {
test_mod_mul_constant_helper::<FqEd254>()?;
test_mod_mul_constant_helper::<FqEd377>()?;
test_mod_mul_constant_helper::<FqEd381>()?;
test_mod_mul_constant_helper::<Fq377>()
} | rust_cleaned_test_functions.jsonl/60293 | {
"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,
7480,
24944,
34967,
368,
1464,
5714,
68843,
1818,
263,
74,
1454,
29,
341,
286,
1273,
7480,
24944,
34967,
10418,
27638,
37,
80,
2715,
17,
20,
19,
13555,
37445,
286,
1273,
7480,
24944,
34967,
10418,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_typedef() -> Result<()> {
let ir = ir_from_cc(
r#"
// Doc comment for MyTypedefDecl.
typedef int MyTypedefDecl;
// Doc comment for MyTypeAliasDecl.
using MyTypeAliasDecl = int;
"#,
)?;
let int = quote! {
MappedTy... | rust_cleaned_test_functions.jsonl/37169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42111,
4219,
368,
1464,
5714,
71698,
341,
262,
1077,
6216,
284,
6216,
5673,
28955,
1006,
286,
435,
2,
698,
310,
442,
21709,
3980,
369,
3017,
12834,
4219,
21629,
624,
310,
13501,
526,
3017,
12834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array_get_function() -> Result<()> {
let tests = vec![
ScalarFunctionTest {
name: "array_get_int64",
columns: vec![
Series::from_data(vec![
ArrayValue::new(vec![1_i64.into(), 2_i64.into(), 3_i64.into()]),
... | rust_cleaned_test_functions.jsonl/114579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1807
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
3062,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
35176,
5152,
2271,
341,
310,
829,
25,
330,
1653,
3062,
4042,
21,
19,
756,
310,
8147,
25,
7486,
90515,
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_not_with_one_gte_parse() {
let name1 = _random_string(10);
let value1 = _random_string(10);
let json = format!(r#"{{"$not":{{"~{}":{{"$gte":"{}"}}}}}}"#, name1, value1);
let query = parse_from_json(&json).unwrap();
let expected = Operator::Not(
... | rust_cleaned_test_functions.jsonl/11867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 314
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
6615,
11667,
1889,
665,
21039,
368,
341,
286,
1077,
829,
16,
284,
716,
11463,
3904,
7,
16,
15,
317,
286,
1077,
897,
16,
284,
716,
11463,
3904,
7,
16,
15,
626,
286,
1077,
2951,
284,
356... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_memoized() {
let mut client = MemoizeClientHandle::new(TestClient { i: Cell::new(0) });
let mut test1 = Message::new();
test1.add_query(Query::new().set_query_type(RecordType::A).clone());
let mut test2 = Message::new();
test2.add_query(Query::new().set_... | rust_cleaned_test_functions.jsonl/32784 | {
"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,
717,
6726,
1506,
368,
341,
286,
1077,
5206,
2943,
284,
56201,
551,
2959,
6999,
486,
931,
31159,
2959,
314,
600,
25,
13972,
486,
931,
7,
15,
8,
3011,
286,
1077,
5206,
1273,
16,
284,
4856,
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_handle_pause_with_withdrawals() {
let (init_result, mut deps) = init_helper_with_config(
vec![InitialBalance {
address: HumanAddr("lebron".to_string()),
amount: Uint128(5000),
}],
false,
true,
fal... | rust_cleaned_test_functions.jsonl/69620 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 901
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
59989,
6615,
6615,
7633,
1127,
368,
341,
286,
1077,
320,
2327,
5287,
11,
5206,
48178,
8,
284,
2930,
10418,
6615,
5332,
1006,
310,
7486,
20703,
6341,
21190,
341,
394,
2621,
25,
11097,
13986,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_instruction_compute_budget() {
let caller_program_id = solana_sdk::pubkey::new_rand();
let callee_program_id = solana_sdk::pubkey::new_rand();
let builtin_programs = &[BuiltinProgram {
program_id: callee_program_id,
process_instruction: moc... | rust_cleaned_test_functions.jsonl/132073 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
54923,
57028,
68867,
368,
341,
286,
1077,
19865,
25096,
842,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
94800,
25096,
842,
284,
2048,
3362,
61783,
486,
9585,
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... | 2 |
#[test]
fn test_stream_seal_and_open() {
let key = SecretKey::default();
let (mut sealer, nonce) = StreamSealer::new(&key).unwrap();
let plaintext1 = "Secret message 1".as_bytes();
let plaintext2 = "Secret message 2".as_bytes();
let plaintext3 = "Secre... | rust_cleaned_test_functions.jsonl/104200 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 571
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
3453,
278,
8378,
11311,
368,
341,
310,
1077,
1376,
284,
8599,
1592,
486,
2258,
543,
310,
1077,
320,
6984,
511,
13111,
11,
39676,
8,
284,
9203,
1514,
13111,
486,
931,
2099,
792,
568,
15454... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_writer_generate_id() {
let mut writer = create_writer();
assert_eq!(writer.id_count, 0);
writer.generate_id();
assert_eq!(writer.id_count, 1);
} | rust_cleaned_test_functions.jsonl/61027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
48851,
842,
368,
341,
286,
1077,
5206,
6916,
284,
1855,
28908,
1428,
286,
2060,
10714,
10297,
18189,
1764,
3180,
11,
220,
15,
317,
286,
6916,
22019,
842,
543,
286,
2060,
10714,
10297,
18189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_no_tag() {
let file = File::new(TEST_MP3).unwrap();
let tag = file.tag().unwrap();
assert_eq!(tag.album(), None);
} | rust_cleaned_test_functions.jsonl/79491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
6536,
9372,
368,
341,
286,
1077,
1034,
284,
2887,
486,
931,
50320,
53052,
18,
568,
15454,
543,
286,
1077,
4772,
284,
1034,
12399,
1005,
15454,
543,
286,
2060,
10714,
10297,
4578,
62188,
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 |
#[test]
fn test_inline_aliases1d() {
test(
"var x; x = this.foo(); this.bar(); var y; y = x; this.baz(y);",
"var x; x = this.foo(); this.bar(); var y; x; this.baz(x);",
);
} | rust_cleaned_test_functions.jsonl/27671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41871,
90233,
16,
67,
368,
341,
262,
1273,
1006,
286,
330,
947,
856,
26,
856,
284,
419,
58432,
2129,
419,
22001,
2129,
762,
379,
26,
379,
284,
856,
26,
419,
948,
1370,
7021,
1215,
756,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_access_concurrently() {
let buffer = Buffer::from(vec![1, 2, 3, 4, 5]);
let buffer2 = buffer.clone();
assert_eq!(&[1, 2, 3, 4, 5], buffer.data());
let buffer_copy = thread::spawn(move || {
// access buffer in another thread.
buffer.clone()... | rust_cleaned_test_functions.jsonl/20578 | {
"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,
12759,
3382,
58202,
368,
341,
286,
1077,
4147,
284,
10312,
486,
1499,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
2558,
286,
1077,
4147,
17,
284,
4147,
15997,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_protocol_disagreement() {
let mut transport = InprocTransport::default();
let mut orchestrator_transport = transport.clone();
let _listener = transport
.listen("inproc://otherplace:8000")
.expect("Unable to get listener");
let _admin_liste... | rust_cleaned_test_functions.jsonl/47865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34880,
9932,
351,
17150,
368,
341,
286,
1077,
5206,
7557,
284,
758,
15782,
27560,
486,
2258,
543,
286,
1077,
5206,
65128,
850,
46398,
284,
7557,
15997,
1428,
286,
1077,
716,
35039,
284,
7557,
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_redirect_no_follow() {
let check = read_single_check("checks/tests/test3.json").unwrap();
let history = MultiChecker::check_pages(&[check]);
assert_eq!(history.len(), 3);
for story in history {
assert!(story.success.is_some());
assert!(stor... | rust_cleaned_test_functions.jsonl/80331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30043,
6536,
43490,
368,
341,
286,
1077,
1779,
284,
1349,
19487,
7200,
445,
49383,
62468,
12697,
18,
4323,
1827,
15454,
543,
286,
1077,
3840,
284,
17439,
35188,
486,
2028,
21655,
2099,
58,
2028,
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_try_from_unchecked() {
let gil = Python::acquire_gil();
let py = gil.python();
let list = PyList::new(py, &[1, 2, 3]);
let val = unsafe { <PyList as PyTryFrom>::try_from_unchecked(list.as_ref()) };
assert_eq!(list, val);
} | rust_cleaned_test_functions.jsonl/48353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
4907,
7549,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
1140,
284,
5355,
852,
486,
931,
46827,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timestamp_slots() {
let ticks_per_slot = 5;
// Smaller interval than TIMESTAMP_SLOT_INTERVAL for convenience of building blocktree
let timestamp_interval = 7;
/*
Build a blocktree with < TIMESTAMP_SLOT_RANGE roots
*/
let blocktree_p... | rust_cleaned_test_functions.jsonl/116905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
23073,
54161,
368,
341,
286,
1077,
29957,
5678,
27563,
284,
220,
20,
280,
286,
442,
4388,
13956,
9873,
1091,
92592,
53047,
37353,
369,
19132,
315,
4752,
2504,
9344,
198,
286,
1077,
11441,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_compound() {
assert_eq!(
Websites::from_html("").unwrap(),
Websites {
current: None,
links: vec![],
}
);
assert_eq!(
Websites::from_html(
r##"
<div>
<div>
<a href="http... | rust_cleaned_test_functions.jsonl/24111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 832
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
795,
368,
341,
262,
2060,
10714,
33673,
286,
63637,
486,
1499,
9564,
80821,
15454,
3148,
286,
63637,
341,
310,
1482,
25,
2240,
345,
310,
7746,
25,
7486,
20703,
1259,
286,
456,
262,
1439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mars_move_rover_right() {
let mut m = Mars::new(Coordinate::new(5, 5));
let r = Rover::new(Coordinate::new(3, 3), Orientation::N);
let actual = m.move_rover(r, Instructions::R).unwrap();
assert_eq!(actual, Rover::new(Coordinate::new(3, 3), Orientation::E));
} | rust_cleaned_test_functions.jsonl/107061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
1561,
17134,
26608,
423,
10539,
368,
341,
286,
1077,
5206,
296,
284,
21048,
486,
931,
3025,
78,
8730,
486,
931,
7,
20,
11,
220,
20,
1106,
286,
1077,
435,
284,
52176,
486,
931,
3025,
78,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_loop_continue() {
let t = Continue {
values: &[1, 2, 3, 4, 5],
};
assert_eq!(t.render().unwrap(), "x1yx2yx3x4yx5y");
let t = Continue {
values: &[1, 2, 4, 5],
};
assert_eq!(t.render().unwrap(), "x1yx2yx4yx5y");
} | rust_cleaned_test_functions.jsonl/100232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17198,
75297,
368,
341,
262,
1077,
259,
284,
15003,
341,
286,
2750,
25,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
1259,
262,
2605,
262,
2060,
10714,
10297,
83,
8740,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inline_in_function1() {
test(
"function baz() { var x = 1; var z = x; }",
"function baz() { var x; var z; }",
);
} | rust_cleaned_test_functions.jsonl/27600 | {
"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,
41871,
1243,
9174,
16,
368,
341,
262,
1273,
1006,
286,
330,
1688,
50247,
368,
314,
762,
856,
284,
220,
16,
26,
762,
1147,
284,
856,
26,
335,
756,
286,
330,
1688,
50247,
368,
314,
762,
856,
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 |
#[test]
fn test_json_string_literal() {
let n = StringLit {
base: BaseNode::default(),
value: "hello".to_string(),
};
let serialized = serde_json::to_string(&n).unwrap();
assert_eq!(serialized, r#"{"type":"StringLiteral","value":"hello"}"#);
let deserialized: StringLit = serd... | rust_cleaned_test_functions.jsonl/40442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
3904,
34100,
368,
341,
262,
1077,
308,
284,
923,
68954,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
897,
25,
330,
14990,
3263,
983,
3904,
3148,
262,
2605,
262,
1077,
32916,
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_error_cause() {
let orig = io::Error::new(io::ErrorKind::Other, "other");
let desc = orig.to_string();
let e = Error::from(orig);
assert_eq!(format!("{}", e.as_response_error()), desc);
} | rust_cleaned_test_functions.jsonl/18011 | {
"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,
4096,
666,
3454,
368,
341,
286,
1077,
2713,
284,
6399,
486,
1454,
486,
931,
37258,
486,
1454,
10629,
486,
11409,
11,
330,
1575,
797,
286,
1077,
6560,
284,
2713,
2389,
3904,
543,
286,
1077,
384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_apply_infix_op_mismatched_arrays() {
let lhs = Value::Vector(Vector::from_expanded_ident("a", 2));
let rhs = Value::Vector(Vector::from_expanded_ident("b", 3));
lhs.apply_infix_op(&InfixOp::Add, &rhs).unwrap();
} | rust_cleaned_test_functions.jsonl/131952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36551,
1243,
5743,
10287,
717,
24976,
291,
68983,
368,
341,
262,
1077,
22505,
284,
5162,
486,
3781,
20258,
486,
1499,
14214,
6465,
38399,
445,
64,
497,
220,
17,
1106,
262,
1077,
12916,
284,
5162,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_chunks_mut_zip() {
let v1: &mut [i32] = &mut [0, 1, 2, 3, 4];
let v2: &[i32] = &[6, 7, 8, 9, 10];
for (a, b) in v1.array_chunks_mut::<2>().zip(v2.array_chunks::<2>()) {
let sum = b.iter().sum::<i32>();
for v in a {
*v += sum;
}
}
ass... | rust_cleaned_test_functions.jsonl/9655 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
65470,
29523,
42131,
368,
341,
262,
1077,
348,
16,
25,
609,
6984,
508,
72,
18,
17,
60,
284,
609,
6984,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
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... | 3 |
#[test]
fn test_new() {
let rr0 = RewindResult::new(100.into(), [1; REWIND_USER_MESSAGE_LENGTH]);
let rr1 = RewindResult {
committed_value: 100.into(),
proof_message: [1; REWIND_USER_MESSAGE_LENGTH],
};
assert_eq!(rr0, rr1);
} | rust_cleaned_test_functions.jsonl/44097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
1077,
34393,
15,
284,
31691,
484,
2077,
486,
931,
7,
16,
15,
15,
39860,
1507,
508,
16,
26,
3596,
54,
5245,
9107,
14641,
15023,
2558,
286,
1077,
34393,
16,
284,
31691,
484,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rewind_range_proof() {
let keychain = ExtKeychain::from_random_seed(true).unwrap();
let builder = proof::ProofBuilder::new(&keychain);
let key_id = ExtKeychain::derive_key_id(1, 1, 0, 0, 0);
let key_id2 = ExtKeychain::derive_key_id(1, 2, 0, 0, 0);
let switch = &SwitchCommitmentType::Regular... | rust_cleaned_test_functions.jsonl/1570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
19154,
9698,
86757,
368,
341,
10217,
1376,
8819,
284,
9447,
1592,
8819,
486,
1499,
22644,
33809,
3715,
568,
15454,
543,
10217,
7363,
284,
11064,
486,
31076,
3297,
486,
931,
2099,
792,
8819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_udp() {
let pubkey1 = secp256k1::PublicKey::from_str(
"022e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd1af"
).unwrap();
let pubkey2 = secp256k1::PublicKey::from_str(
"032e58afe51f9ed8ad3cc7897f634d881fdbe49a81564629ded8156bebd2ffd1af... | rust_cleaned_test_functions.jsonl/117287 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69432,
368,
341,
286,
1077,
95116,
16,
284,
511,
4672,
17,
20,
21,
74,
16,
486,
61822,
486,
1499,
2895,
1006,
310,
330,
15,
17,
17,
68,
20,
23,
5645,
20,
16,
69,
24,
291,
23,
329,
18,
63... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_message() {
let msg = r#"message ReferenceData
{
repeated ScenarioInfo scenarioSet = 1;
repeated CalculatedObjectInfo calculatedObjectSet = 2;
repeated RiskFactorList riskFactorListSet = 3;
repeated RiskMaturityInfo riskMaturitySet = 4;
repeat... | rust_cleaned_test_functions.jsonl/90074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
368,
341,
286,
1077,
3750,
284,
435,
55543,
1994,
17207,
1043,
198,
262,
341,
286,
11504,
58663,
1731,
220,
15048,
1649,
284,
220,
16,
280,
286,
11504,
31359,
657,
1190,
1731,
16588,
1190,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_boltzmann_pmf() {
assert_abs_diff_eq!(
Array::from_shape_fn(19, |i| {
let k = i as isize;
let lambda = 1.4;
let n = 19;
boltzmann_pmf(k, lambda, n)
}),
array![
7.53403036e-... | rust_cleaned_test_functions.jsonl/82673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 724
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
6181,
89,
17562,
620,
28124,
368,
341,
286,
2060,
31170,
15850,
10714,
33673,
310,
2910,
486,
1499,
13597,
15246,
7,
16,
24,
11,
760,
72,
91,
341,
394,
1077,
595,
284,
600,
438,
91373,
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_sample_p1() {
let contents = fs::read_to_string("sample.txt").unwrap();
let res_p1 = part1(&contents);
assert_eq!(res_p1, 165);
} | rust_cleaned_test_functions.jsonl/28512 | {
"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,
17491,
620,
16,
368,
341,
286,
1077,
8794,
284,
8619,
486,
878,
2346,
3904,
445,
13611,
3909,
1827,
15454,
543,
286,
1077,
592,
620,
16,
284,
949,
16,
2099,
17610,
626,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_encode_tlv() {
let attrs_raw = vec![0, 6, 0, 5, 72, 101, 108, 108, 111, 0, 0, 0];
let mut hm = HashMap::new();
hm.insert(6 as u16, "Hello".to_string());
assert_eq!(encode(&hm), attrs_raw);
} | rust_cleaned_test_functions.jsonl/65985 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
528,
21827,
368,
341,
286,
1077,
16204,
16067,
284,
7486,
20703,
15,
11,
220,
21,
11,
220,
15,
11,
220,
20,
11,
220,
22,
17,
11,
220,
16,
15,
16,
11,
220,
16,
15,
23,
11,
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 |
#[test]
fn test_vote_signature() {
let (vote_pubkey, vote_account) = create_test_account();
let vote = Vote::new(vec![1], Hash::default());
// unsigned
let keyed_accounts = &[KeyedAccount::new(&vote_pubkey, false, &vote_account)];
let signers: HashSet<Pubkey> = get_signe... | rust_cleaned_test_functions.jsonl/43730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3438
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
39859,
368,
341,
286,
1077,
320,
29358,
34014,
792,
11,
6910,
13500,
8,
284,
1855,
4452,
13500,
543,
286,
1077,
6910,
284,
34034,
486,
931,
25592,
20703,
16,
1125,
6531,
486,
2258,
5231,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_0393_example_1() {
let data = vec![197, 130, 1];
let result = true;
assert_eq!(Solution::valid_utf8(data), result);
} | rust_cleaned_test_functions.jsonl/52268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
18,
24,
18,
39304,
62,
16,
368,
341,
286,
1077,
821,
284,
7486,
20703,
16,
24,
22,
11,
220,
16,
18,
15,
11,
220,
16,
935,
286,
1077,
1102,
284,
830,
401,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_finish() -> io::Result<()> {
let mut writer = Writer::new(Vec::new());
writer.write_all(b"noodles")?;
let data = writer.finish()?;
let eof_start = data.len() - BGZF_EOF.len();
assert_eq!(&data[eof_start..], BGZF_EOF);
Ok(())
} | rust_cleaned_test_functions.jsonl/78936 | {
"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,
42980,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
6916,
284,
29404,
486,
931,
49923,
486,
931,
1423,
286,
6916,
3836,
5705,
1883,
1,
77,
97121,
899,
69493,
286,
1077,
821,
284,
691... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_voice_region() {
let region = VoiceRegion {
custom: false,
deprecated: false,
id: "region".to_owned(),
name: "Region".to_owned(),
optimal: false,
vip: false,
};
serde_test::assert_tokens(
... | rust_cleaned_test_functions.jsonl/87693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76765,
20627,
368,
341,
286,
1077,
5537,
284,
27930,
14091,
341,
310,
2526,
25,
895,
345,
310,
31590,
25,
895,
345,
310,
877,
25,
330,
3943,
3263,
983,
51973,
3148,
310,
829,
25,
330,
14091,
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_same_program_id_uses_unqiue_executable_accounts() {
fn nested_processor(
_program_id: &Pubkey,
_data: &[u8],
invoke_context: &mut dyn InvokeContext,
) -> result::Result<(), InstructionError> {
let keyed_accounts = invoke_context.get... | rust_cleaned_test_functions.jsonl/2637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
25096,
842,
62,
4776,
4907,
40187,
361,
18430,
5922,
55665,
368,
341,
286,
5168,
24034,
50127,
1006,
310,
716,
14906,
842,
25,
609,
29162,
792,
345,
310,
716,
691,
25,
44590,
84,
23,
1259... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_receiving_mux_sabm_starts_multiplexer_with_ua_response() {
let mut exec = fasync::Executor::new().unwrap();
let (mut session, mut outgoing_frames, _rfcomm_channels) = setup_session();
// Remote sends us an SABM command - expect a positive UA response.
let sabm =... | rust_cleaned_test_functions.jsonl/14926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
46344,
80363,
643,
370,
76,
86552,
91802,
38815,
6615,
62,
4284,
9655,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
15454,
1428,
286,
1077,
320,
6984,
3797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consume_buffered_packets() {
let ledger_path = get_tmp_ledger_path!();
{
let (transactions, bank, poh_recorder, _entry_receiver, poh_simulator) =
setup_conflicting_transactions(&ledger_path);
let recorder = poh_recorder.lock().unwrap().reco... | rust_cleaned_test_functions.jsonl/2939 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
31323,
7776,
291,
63569,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
320,
41844,
11,
6073,
11,
281,
2267,
7080,
1358,
11,
716,
4085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simple_multiple_a_in_div() {
let doc = Document::from(
"<div class='container'>
<a class='link button' id='linkmain'>
<span>text hi there</span>
</a>
</div>
<div>
<span>text hi there
... | rust_cleaned_test_functions.jsonl/66019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
45233,
4306,
1243,
16237,
368,
341,
286,
1077,
4629,
284,
11789,
486,
1499,
1006,
310,
4055,
611,
536,
1131,
3586,
9531,
2290,
366,
64,
536,
1131,
2080,
3137,
6,
877,
1131,
2080,
3817,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_contact_info() {
let d = ContactInfo::new_localhost(&Pubkey::new_rand(), timestamp());
let cluster_info = ClusterInfo::new_with_invalid_keypair(d);
let entry_label = CrdsValueLabel::ContactInfo(cluster_info.id());
assert!(cluster_info
.gossip
... | rust_cleaned_test_functions.jsonl/28062 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 553
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
20597,
3109,
368,
341,
286,
1077,
294,
284,
9180,
1731,
486,
931,
62,
8301,
2099,
29162,
792,
486,
931,
33864,
1507,
11441,
1423,
286,
1077,
10652,
3109,
284,
35380,
1731,
486,
931,
6615,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_weighted_repair_traversal() {
let stake = 100;
let (bank, vote_pubkeys) = bank_utils::setup_bank_and_vote_pubkeys(1, stake);
let (_, mut heaviest_subtree_fork_choice) = setup_forks();
let weighted_traversal = RepairWeightTraversal::new(&heaviest_subtree_fork_choic... | rust_cleaned_test_functions.jsonl/80140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1082
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
1288,
12670,
3547,
45545,
368,
341,
286,
1077,
18279,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
17033,
11,
6910,
34014,
10563,
8,
284,
6073,
17309,
486,
15188,
35733,
8378,
54360,
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_fill_struct_fields_empty() {
check_fix(
r#"
struct TestStruct { one: i32, two: i64 }
fn test_fn() {
let s = TestStruct {<|>};
}
"#,
r#"
struct TestStruct { one: i32, two: i64 }
fn test_fn() {
let s = TestStruct { one: (), two: ()};
}
"#,
);
} | rust_cleaned_test_functions.jsonl/11422 | {
"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,
30728,
15126,
12132,
15124,
368,
341,
286,
1779,
36060,
1006,
310,
435,
2,
698,
1235,
3393,
9422,
314,
825,
25,
600,
18,
17,
11,
1378,
25,
600,
21,
19,
555,
8822,
1273,
15246,
368,
341,
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_build() {
let mut build = Build::new();
build.file("test");
build.archiver("ar");
build.include("./");
build.include("dir");
build.define("foo", Some("1"));
build.define("bar", None);
build.flag("-test");
build.target("i686-unknown-linux-musl");
build.out_... | rust_cleaned_test_functions.jsonl/62386 | {
"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,
20801,
368,
341,
262,
1077,
5206,
1936,
284,
7854,
486,
931,
543,
262,
1936,
9715,
445,
1944,
797,
262,
1936,
38091,
1524,
445,
277,
797,
262,
1936,
29645,
13988,
797,
262,
1936,
29645,
445,
374... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_into_iter() {
// Empty iter
{
let d: RingBuf<i32> = RingBuf::new();
let mut iter = d.into_iter();
assert_eq!(iter.size_hint(), (0, Some(0)));
assert_eq!(iter.next(), None);
assert_eq!(iter.size_hint(), (0, Some(0)));
... | rust_cleaned_test_functions.jsonl/125100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 983
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
368,
1476,
286,
442,
22228,
5367,
198,
286,
341,
310,
1077,
294,
25,
21525,
15064,
21897,
18,
17,
29,
284,
21525,
15064,
486,
931,
543,
310,
1077,
5206,
5367,
284,
294,
39860,
1172... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_from_str() {
let zdt_result =
"2020-03-18T12:33:34[Europe/Paris]".parse::<ZonedDateTime>();
let zdt = zdt_result.unwrap();
assert_eq!(NaiveDateTime::new(
NaiveDate::from_ymd(2020, 3, 18),
NaiveTime::from_hms(12, 33, 34)),
... | rust_cleaned_test_functions.jsonl/28456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
341,
286,
1077,
1147,
8047,
5287,
4035,
310,
330,
17,
15,
17,
15,
12,
15,
18,
12,
16,
23,
51,
16,
17,
25,
18,
18,
25,
18,
19,
58,
30780,
14,
59604,
60,
3263,
6400,
27638... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_wont_compile_non_literal_regex() {
let exp = compile_expr(r"match(a, a)".to_string()).unwrap();
let r = exp.search(json!({
"a": "2010-03-14"
}));
match r.err() {
Some(
JmespathError {
reason: Error... | rust_cleaned_test_functions.jsonl/35847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
1670,
544,
74170,
21637,
34100,
41832,
368,
341,
286,
1077,
1343,
284,
19192,
21915,
2601,
1,
6347,
2877,
11,
264,
94010,
983,
3904,
6011,
15454,
543,
286,
1077,
435,
284,
1343,
9288,
9304,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_computed_replica_params() {
// -1 indicates an unassigned partition
let t1_result = ReplicaSpec::valid_partition(&-1);
assert!(t1_result.is_err());
assert_eq!(
format!("{}", t1_result.unwrap_err()),
"partition is mandatory for compute... | rust_cleaned_test_functions.jsonl/79994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 677
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
2965,
19292,
25533,
15317,
6745,
368,
341,
286,
442,
481,
16,
14807,
458,
650,
39021,
16658,
198,
286,
1077,
259,
16,
5287,
284,
94036,
8327,
486,
1891,
43840,
2099,
12,
16,
317,
286,
2060... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_var_u32_enc_dec() {
let mut buf = BytesMut::default();
(&mut buf).put_var_u32((1 << 7) - 1);
let mut buf = buf.freeze();
assert_eq!(1, buf.len());
assert_eq!((1 << 7) - 1, (&mut buf).get_var_u32());
assert!(buf.is_empty());
let mut buf = B... | rust_cleaned_test_functions.jsonl/92099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 665
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4612,
7300,
18,
17,
13781,
13783,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
2258,
543,
286,
15899,
6984,
6607,
568,
628,
4612,
7300,
18,
17,
1188,
16,
1115,
220,
22,
8,
481,
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_type_coercion() {
let df = df! {
"foo" => &[1, 2, 3],
"bar" => &[1.0, 2.0, 3.0]
}
.unwrap();
let lp = df.lazy().select([col("foo") * col("bar")]).logical_plan;
let mut expr_arena = Arena::new();
let mut lp_arena = Arena::new();
let rules: &mut [Box<d... | rust_cleaned_test_functions.jsonl/13806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
11393,
2962,
290,
368,
341,
262,
1077,
6764,
284,
6764,
0,
341,
286,
330,
7975,
1,
589,
44590,
16,
11,
220,
17,
11,
220,
18,
1259,
286,
330,
2257,
1,
589,
44590,
16,
13,
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... | 3 |
#[test]
fn test_system_time_bounds_assumptions() {
::check_platform();
assert_eq!(
::PositiveTimestamp::from_unix_timestamp(::SYSTEM_TIME_MAX_UNIX_TIMESTAMP + 1),
Err(::CreationError::TimestampOutOfBounds)
);
assert_eq!(
::ExpiryTime::from_seconds(... | rust_cleaned_test_functions.jsonl/68816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17687,
3009,
36878,
12083,
372,
1300,
368,
341,
197,
197,
486,
2028,
34260,
1428,
286,
2060,
10714,
33673,
310,
3504,
35490,
20812,
486,
1499,
80572,
23073,
38732,
46487,
10051,
6806,
82754,
47854,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encode_data() {
let data = Data::new(1, &b"hello"[..]);
assert_eq!(
data.encode(),
vec![0x00, 0x03, 0x00, 0x01, 0x68, 0x65, 0x6c, 0x6c, 0x6f]
);
} | rust_cleaned_test_functions.jsonl/104033 | {
"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,
11224,
1769,
368,
341,
286,
1077,
821,
284,
2885,
486,
931,
7,
16,
11,
609,
65,
1,
14990,
36864,
496,
2558,
286,
2060,
10714,
33673,
310,
821,
17313,
3148,
310,
7486,
20703,
15,
87,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_top_level_statements() {
assert::pass(
r#"
j = 0
for i in range(10):
if i % 2 == 0:
j += i
assert_eq(j, 20)
"#,
);
} | rust_cleaned_test_functions.jsonl/92428 | {
"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,
10426,
8274,
16271,
3723,
368,
341,
262,
2060,
486,
6385,
1006,
286,
435,
2,
698,
73,
284,
220,
15,
198,
1958,
600,
304,
2088,
7,
16,
15,
982,
262,
421,
600,
1018,
220,
17,
621,
220,
15,
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 |
#[test]
fn test_type() {
assert_eq!(ty().parse("bool").unwrap(), (Type::Bool, ""));
assert_eq!(ty().parse("long").unwrap(), (Type::Int64, ""));
} | rust_cleaned_test_functions.jsonl/66388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1819,
368,
341,
286,
2060,
10714,
10297,
1881,
1005,
6400,
445,
2641,
1827,
15454,
1507,
320,
929,
486,
11233,
11,
55421,
286,
2060,
10714,
10297,
1881,
1005,
6400,
445,
4825,
1827,
15454,
1507,
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 |
#[test]
fn test_size() {
let url = Gravatar::new("email@example.com")
.set_size(Some(50))
.image_url();
assert_eq!(
url.as_str(),
"https://secure.gravatar.com/avatar/5658ffccee7f0ebfda2b226238b1eb6e?s=50"
);
} | rust_cleaned_test_functions.jsonl/61377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2368,
368,
341,
262,
1077,
2515,
284,
2825,
11962,
486,
931,
445,
2332,
35487,
905,
1138,
286,
659,
746,
2368,
65405,
7,
20,
15,
1171,
286,
659,
1805,
2903,
543,
262,
2060,
10714,
33673,
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_read_blob_empty() -> IonResult<()> {
let mut cursor = ion_cursor_for(&[0xA0]);
assert_eq!(cursor.next()?, Some(Value(IonType::Blob, false)));
assert_eq!(cursor.read_blob_bytes()?, Some(vec![]));
Ok(())
} | rust_cleaned_test_functions.jsonl/82747 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
45908,
15124,
368,
1464,
44805,
2077,
71698,
341,
286,
1077,
5206,
8128,
284,
27672,
28601,
5478,
2099,
58,
15,
14673,
15,
2558,
286,
2060,
10714,
10297,
17437,
4529,
368,
12622,
4329,
25346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_time_till_next_departure() {
let bus = Bus{id: 7, offset: 0};
assert_eq!(bus.time_till_next_departure(939), 6);
let bus = Bus{id: 13, offset: 0};
assert_eq!(bus.time_till_next_departure(939), 10);
let bus = Bus{id: 59, offset: 0};
assert_eq!(bus.time_till_next_departure... | rust_cleaned_test_functions.jsonl/77201 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 248
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
528,
483,
11257,
69865,
552,
368,
341,
262,
1077,
5828,
284,
18598,
61761,
25,
220,
22,
11,
4347,
25,
220,
15,
2440,
262,
2060,
10714,
10297,
10338,
6378,
528,
483,
11257,
69865,
552,
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_scan_comment() {
let scanner = Scanner::new();
let source = "// foo".to_owned();
assert_eq!(
Ok(vec![Token {
t: TokenType::Eof,
line: 1,
lexeme: String::new(),
literal: None,
}]),
... | rust_cleaned_test_functions.jsonl/92084 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
17638,
368,
341,
286,
1077,
20775,
284,
17170,
486,
931,
543,
286,
1077,
2530,
284,
35574,
15229,
3263,
983,
51973,
543,
286,
2060,
10714,
33673,
310,
7622,
25592,
20703,
3323,
341,
394,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_function_with_rvalue_ref() {
let hdr = indoc! {"
#include <string>
void moveme(std::string &&);
"};
let rs = quote! {};
run_test("", hdr, rs, &["moveme"], &[]);
} | rust_cleaned_test_functions.jsonl/9918 | {
"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,
58493,
9174,
6615,
1710,
957,
7793,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
917,
1339,
286,
737,
1974,
3894,
5194,
486,
917,
1009,
317,
262,
330,
2440,
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_cas () {
let mut val: usize = 0;
let eptr = ExclusivePtr::<usize>::new(ptr::null_mut());
let ll = eptr.load_linked(Relaxed);
assert_eq!(eptr.load(Relaxed), ptr::null_mut());
assert_eq!(ll.try_store_conditional(&mut val, Relaxed), true);
assert_eq!(... | rust_cleaned_test_functions.jsonl/4614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
300,
1719,
341,
286,
1077,
5206,
1044,
25,
22301,
284,
220,
15,
280,
286,
1077,
384,
3505,
284,
48280,
5348,
27638,
51878,
6831,
931,
23866,
486,
2921,
29523,
1423,
286,
1077,
9323,
284,
38... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_date() {
test_date(1, 1, 1);
test_date(1234, 12, 31);
test_date(1969, 12, 30);
test_date(1969, 12, 31);
test_date(1970, 1, 1);
test_date(2000, 1, 1);
test_date(9999, 12, 31);
} | rust_cleaned_test_functions.jsonl/54045 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
4164,
368,
341,
286,
1273,
4164,
7,
16,
11,
220,
16,
11,
220,
16,
317,
286,
1273,
4164,
7,
16,
17,
18,
19,
11,
220,
16,
17,
11,
220,
18,
16,
317,
286,
1273,
4164,
7,
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... | 1 |
#[test]
fn test_eval_unary_function_scalar() {
#[rpn_fn(nullable)]
fn foo(v: Option<&Real>) -> Result<Option<Real>> {
Ok(v.map(|v| *v * 2.0))
}
let exp = RpnExpressionBuilder::new_for_test()
.push_constant_for_test(1.5f64)
.push_fn_cal... | rust_cleaned_test_functions.jsonl/92662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 557
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
4907,
658,
9174,
41652,
368,
341,
394,
11506,
81,
19958,
15246,
34885,
5563,
286,
5168,
15229,
3747,
25,
6959,
52244,
12768,
9231,
1464,
5714,
94150,
64829,
2452,
341,
310,
7622,
3747,
4770,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_message_with_port() {
let (mut pelcoport, stubdev) = new_stub_port_and_device();
let msg = Message::from([1, 2, 3, 4, 5, 6, 7]);
pelcoport.send_message(msg).expect("Failed sending message");
let received = stubdev.received();
assert_eq!(msg, Message::try_from(&received[... | rust_cleaned_test_functions.jsonl/53592 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13565,
6462,
6615,
8716,
368,
341,
262,
1077,
320,
6984,
11814,
1015,
403,
11,
13633,
3583,
8,
284,
501,
62781,
8716,
8378,
9204,
1428,
262,
1077,
3750,
284,
4856,
486,
1499,
2561,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip_stream_nested_dict() {
let xs = vec!["AA", "BB", "AA", "CC", "BB"];
let dict = Arc::new(
xs.clone()
.into_iter()
.collect::<DictionaryArray<datatypes::Int8Type>>(),
);
let string_array: ArrayRef = Arc::new(Stri... | rust_cleaned_test_functions.jsonl/48762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 618
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
12673,
66279,
5243,
368,
341,
286,
1077,
11943,
284,
7486,
0,
1183,
6029,
497,
330,
10098,
497,
330,
6029,
497,
330,
3706,
497,
330,
10098,
6332,
286,
1077,
6451,
284,
19689,
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_create_generic_param_list() {
fn check_create_gpl<N: GenericParamsOwnerEdit + fmt::Display>(before: &str, after: &str) {
let gpl_owner = ast_mut_from_text::<N>(before);
gpl_owner.get_or_create_generic_param_list();
assert_eq!(gpl_owner.to_string(), aft... | rust_cleaned_test_functions.jsonl/5611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 594
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
41232,
4090,
2019,
368,
341,
286,
5168,
1779,
8657,
1889,
500,
29198,
25,
21281,
4870,
13801,
4036,
488,
8879,
486,
7020,
2235,
14801,
25,
609,
495,
11,
1283,
25,
609,
495,
8,
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... | 1 |
#[test]
fn test_ct_compare() {
let a = vec![1,2,3];
assert_eq!(botan::const_time_compare(&a, &[1,2,3]), true);
assert_eq!(botan::const_time_compare(&a, &[1,2,3,4]), false);
assert_eq!(botan::const_time_compare(&a, &[1,2,4]), false);
assert_eq!(botan::const_time_compare(&a, &a), true);
a... | rust_cleaned_test_functions.jsonl/95311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26134,
32235,
368,
341,
262,
1077,
264,
284,
7486,
20703,
16,
11,
17,
11,
18,
4821,
262,
2060,
10714,
10297,
6331,
276,
486,
1024,
3009,
32235,
2099,
64,
11,
44590,
16,
11,
17,
11,
18,
9719,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dependency_fails_verification() {
let mut executor = FakeExecutor::from_genesis_with_options(VMPublishingOption::Open);
// Get a module that fails verification into the store.
let bad_module_code = "
module Test {
resource R1 { }
struct S1 { r1: Self.R1 }
... | rust_cleaned_test_functions.jsonl/31570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62387,
761,
6209,
84245,
368,
341,
262,
1077,
5206,
31558,
284,
36965,
25255,
486,
1499,
16322,
13774,
6615,
8743,
12410,
5781,
2538,
287,
5341,
486,
5002,
626,
262,
442,
2126,
264,
4688,
429,
145... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_leader_increase_next() {
let l = default_logger();
let previous_ents = vec![empty_entry(1, 1), empty_entry(1, 2), empty_entry(1, 3)];
let mut tests = vec![
// state replicate; optimistically increase next
// previous entries + noop entry + propose + 1
(
... | rust_cleaned_test_functions.jsonl/19134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
73807,
11257,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
3681,
62,
805,
284,
7486,
20703,
3194,
9078,
7,
16,
11,
220,
16,
701,
4287,
9078,
7,
16,
11,
220,
17,
701,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_turn_left() {
let mut ship = Ship::new();
assert_eq!(ship.facing, 90);
ship.turn_left(180);
assert_eq!(ship.facing, 270);
ship.turn_left(90);
assert_eq!(ship.facing, 180);
} | rust_cleaned_test_functions.jsonl/120427 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37274,
9579,
368,
341,
286,
1077,
5206,
8284,
284,
26803,
486,
931,
543,
286,
2060,
10714,
10297,
5270,
833,
4527,
11,
220,
24,
15,
317,
286,
8284,
45634,
9579,
7,
16,
23,
15,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_values_mut() {
let vec = vec![(1, 1), (2, 2), (3, 3)];
let mut map: HashMap<_, _> = vec.into_iter().collect();
for value in map.values_mut() {
*value *= 2;
}
let values: Vec<_> = map.values().copied().collect();
assert_eq!(values.len(),... | rust_cleaned_test_functions.jsonl/26953 | {
"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,
9146,
29523,
368,
341,
286,
1077,
7486,
284,
7486,
0,
9697,
16,
11,
220,
16,
701,
320,
17,
11,
220,
17,
701,
320,
18,
11,
220,
18,
12587,
286,
1077,
5206,
2415,
25,
10528,
27,
6878,
716,
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_load_correctly_data() {
let data_src = Cursor::new(b"12 -92 abc");
let mut data_reader = DataReader::new(data_src);
assert!(matches!(
data_reader.read(),
Ok(TestSystemData {
field_1: 12,
field_2: -92
})... | rust_cleaned_test_functions.jsonl/96292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
31550,
398,
1769,
368,
341,
286,
1077,
821,
16274,
284,
28067,
486,
931,
1883,
1,
16,
17,
481,
24,
17,
39022,
3071,
286,
1077,
5206,
821,
22306,
284,
2885,
5062,
486,
931,
2592,
16274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_opcode_load() {
{
// Test valid opcode.
let (rest, op) = opcode("ld ").unwrap();
assert_eq!(op, Opcode::LOAD);
assert_eq!(rest, "");
}
{
// Test invalid opcode.
let (rest, op) = opcode("aold").unwrap... | rust_cleaned_test_functions.jsonl/108216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71319,
12411,
368,
341,
286,
341,
310,
442,
3393,
2697,
30028,
624,
310,
1077,
320,
3927,
11,
1179,
8,
284,
30028,
445,
507,
27510,
15454,
543,
310,
2060,
10714,
10297,
453,
11,
78899,
486,
1298... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pi() {
let num_points = 500_000;
let result = pi::pi_approximation(num_points);
let reference = std::f64::consts::PI;
assert!((result - reference).abs() < 0.01);
} | rust_cleaned_test_functions.jsonl/31625 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47771,
368,
341,
262,
1077,
1629,
12928,
284,
220,
20,
15,
15,
62,
15,
15,
15,
401,
262,
1077,
1102,
284,
8938,
486,
2493,
90425,
5465,
8068,
12928,
317,
262,
1077,
5785,
284,
1460,
486,
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_rdr_rule_with_to_v4_address_range_to_v4_address_invalid_range() {
assert_eq!(
parse_str_to_rdr_rules(
"rdr proto tcp to 1.2.3.4 range 10000:10005 -> to 192.168.1.1 range 0:5;"
),
Err(Error::Invalid(InvalidReason::InvalidPortRange))
... | rust_cleaned_test_functions.jsonl/29495 | {
"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,
1710,
3612,
21124,
6615,
2346,
2273,
19,
6744,
9698,
2346,
2273,
19,
6744,
31433,
9698,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
2895,
2346,
1710,
3612,
21407,
1006,
394,
330,
81,
3612,
18433... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encodingreference() {
assert_eq!(encodingreference("A"), done_result!(EncodingReference::new("A")));
// Contains lowercase letters
assert_eq!(encodingreference("Good"), Done("ood", EncodingReference::new("G")));
assert_eq!(
encodingreference("WITH-DAS... | rust_cleaned_test_functions.jsonl/30000 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
16291,
368,
341,
286,
2060,
10714,
10297,
17159,
16291,
445,
32,
3975,
2814,
5287,
10297,
14690,
8856,
486,
931,
445,
32,
74385,
286,
442,
30811,
42047,
11931,
198,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitor() {
let a = BooleanBitfield::from_bytes(&vec![2, 8, 1][..]);
let b = BooleanBitfield::from_bytes(&vec![4, 8, 16][..]);
let c = BooleanBitfield::from_bytes(&vec![6, 8, 17][..]);
assert_eq!(c, a | b);
} | rust_cleaned_test_functions.jsonl/30482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1919,
368,
341,
286,
1077,
264,
284,
6992,
8344,
2566,
486,
1499,
12524,
2099,
4083,
20703,
17,
11,
220,
23,
11,
220,
16,
1457,
496,
2558,
286,
1077,
293,
284,
6992,
8344,
2566,
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... | 1 |
#[test]
fn test_collation() {
use tipb::ExprType;
use tipb_helper::ExprDefBuilder;
// This test creates a hash aggregation executor with the following aggregate functions:
// And group by:
// - col_4
let group_by_exp = || {
RpnExpre... | rust_cleaned_test_functions.jsonl/15837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43597,
367,
368,
341,
286,
990,
11552,
65,
486,
16041,
929,
280,
286,
990,
11552,
65,
10418,
486,
16041,
2620,
3297,
401,
286,
442,
1096,
1273,
11450,
264,
5175,
51629,
31558,
448,
279,
2701,
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... | 3 |
#[test]
fn test_invalid_get() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
sender
.write_all(
b"GET /mmds HTTP/1.1\r\n\
Content-Type: text/plain\r\n\
Content-Len... | rust_cleaned_test_functions.jsonl/43134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
3062,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
317,
286,
4646,
198,
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... | 3 |
#[test]
fn test_array() {
let expected: &[u8] = &[
6, 0, 255, 9, 1, 161, 1, 21, 0, 38, 255, 0, 117, 8, 149, 32, 129, 2, 192
];
assert_eq!(CustomArray::desc(), expected);
} | rust_cleaned_test_functions.jsonl/14839 | {
"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,
3858,
368,
341,
286,
1077,
3601,
25,
44590,
84,
23,
60,
284,
609,
9640,
310,
220,
21,
11,
220,
15,
11,
220,
17,
20,
20,
11,
220,
24,
11,
220,
16,
11,
220,
16,
21,
16,
11,
220,
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_parse_url() {
let r = Alphacoders::new(
"https://wall.alphacoders.com",
"https://wall.alphacoders.com/tags.php?tid={}&page={}",
2,
);
let m = r.parse_urls("2315");
println!("{:?}", m);
} | rust_cleaned_test_functions.jsonl/94491 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
2903,
368,
341,
286,
1077,
435,
284,
1674,
759,
580,
52498,
486,
931,
1006,
310,
330,
2428,
1110,
16431,
12168,
759,
580,
52498,
905,
756,
310,
330,
2428,
1110,
16431,
12168,
759,
580,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cow_from() {
let borrowed: &[_] = &["borrowed", "(slice)"];
let owned = vec!["owned", "(vec)"];
match (Cow::from(owned.clone()), Cow::from(borrowed)) {
(Cow::Owned(o), Cow::Borrowed(b)) => assert!(o == owned && b == borrowed),
_ => panic!("invalid `Cow::from`"),
}... | rust_cleaned_test_functions.jsonl/24444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
363,
5673,
368,
341,
262,
1077,
45564,
25,
609,
13496,
60,
284,
609,
1183,
71141,
291,
497,
11993,
24963,
8,
6332,
262,
1077,
12938,
284,
7486,
0,
1183,
18332,
497,
11993,
4083,
8,
6332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_midpoint() {
assert_eq!(midpoint(0, 1), None);
assert_eq!(midpoint(0, 2), Some(1));
assert_eq!(midpoint(0, 3), Some(1));
assert_eq!(midpoint(0, 4), Some(2));
assert_eq!(midpoint(1, 4), Some(2));
assert_eq!(midpoint(2, 4), Some(3));
assert_eq!(midpoint(3, 4), None);
... | rust_cleaned_test_functions.jsonl/64428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43733,
2768,
368,
341,
262,
2060,
10714,
10297,
16106,
2768,
7,
15,
11,
220,
16,
701,
2240,
317,
262,
2060,
10714,
10297,
16106,
2768,
7,
15,
11,
220,
17,
701,
4329,
7,
16,
1106,
262,
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_get_extensions() -> Result<(), Error> {
let extensions = unsafe { get_extensions() }?;
assert_eq!(extensions.len(), 1);
assert_eq!(extensions.get(0), Some("noop"));
Ok(())
} | rust_cleaned_test_functions.jsonl/93813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
60498,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
19721,
284,
19860,
314,
633,
60498,
368,
335,
69493,
262,
2060,
10714,
10297,
27609,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialized() {
assert_eq!(
serialized_val(br###"@json"foo""###),
Ok((
&br""[..],
Record::Serialized(Cow::from("json"), "foo".to_string())
))
);
} | rust_cleaned_test_functions.jsonl/67445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25602,
1506,
368,
341,
262,
2060,
10714,
33673,
286,
32916,
6189,
41237,
14374,
96270,
2236,
1,
7975,
3014,
14374,
1326,
286,
7622,
94702,
310,
609,
1323,
3014,
95874,
1259,
310,
13583,
486,
77521,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_prepare_test_modules_urls() {
let test_data_path = test_util::root_path().join("cli/tests/subdir");
let mut matched_urls = prepare_test_modules_urls(
vec![
"https://example.com/colors_test.ts".to_string(),
"./mod1.ts".to_string(),
"./mod3.js".to_string(),
... | rust_cleaned_test_functions.jsonl/119175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47460,
4452,
15848,
32822,
368,
341,
262,
1077,
1273,
1769,
2638,
284,
1273,
18974,
486,
2888,
2638,
1005,
5987,
445,
19521,
62468,
37885,
3741,
797,
262,
1077,
5206,
18054,
32822,
284,
10549,
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_create_table_with_header() {
let table = create_table(Some(&["Foo", "bar"]));
assert_eq!(&format!("{}", table), " Foo bar \n-----------");
} | rust_cleaned_test_functions.jsonl/76471 | {
"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,
8657,
5237,
6615,
8757,
368,
341,
286,
1077,
1965,
284,
1855,
5237,
65405,
2099,
1183,
40923,
497,
330,
2257,
74446,
286,
2060,
10714,
0,
2099,
2243,
79878,
1965,
701,
330,
33428,
256,
3619,
1124,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stake_is_updated_for_entire_branch() {
let mut voted_stakes = HashMap::new();
let mut account = Account::default();
account.lamports = 1;
let set: HashSet<u64> = vec![0u64, 1u64].into_iter().collect();
let ancestors: HashMap<u64, HashSet<u64>> = [(2u64, se... | rust_cleaned_test_functions.jsonl/77040 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
6892,
33492,
5478,
27425,
554,
28031,
368,
341,
286,
1077,
5206,
16228,
1261,
2050,
284,
10528,
486,
931,
543,
286,
1077,
5206,
2692,
284,
8615,
486,
2258,
543,
286,
2692,
918,
309,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.