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_skipmap_iterator_concurrent_insert() {
time_test!();
// Asserts that the map can be mutated while an iterator exists; this is intentional.
let mut skm = make_skipmap();
let mut iter = skm.iter();
assert!(iter.advance());
skm.insert("abccc".as_byte... | rust_cleaned_test_functions.jsonl/89161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44830,
2186,
13491,
3382,
3231,
17678,
368,
341,
286,
882,
4452,
0,
543,
286,
442,
5319,
82,
429,
279,
2415,
646,
387,
84822,
1393,
458,
15091,
6724,
26,
419,
374,
46864,
624,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_exp() {
assert!(close(_1_0i.exp(), _1_0i.scale(f64::consts::E)));
assert!(close(_0_0i.exp(), _1_0i));
assert!(close(_0_1i.exp(), Complex::new(1.0.cos(), 1.0.sin())));
assert!(close(_05_05i.exp() * _05_05i.exp(), _1_1i.exp()));
assert!(c... | rust_cleaned_test_functions.jsonl/105679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 487
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14214,
368,
341,
310,
2060,
10297,
5552,
2490,
16,
62,
15,
72,
13754,
1507,
716,
16,
62,
15,
72,
17266,
955,
21,
19,
486,
95773,
486,
36,
4945,
310,
2060,
10297,
5552,
2490,
15,
62,
15,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_beetle_correct_moves_surrounded()
{
let mut board = Board::default();
let beetle_square = (0, 0, 0);
let beetle = Piece::new(BoardPiece::Beetle, Color::White);
let mut vec = vec![(beetle_square, BoardSquare::new(beetle.clone()))];
for sq in neighbors... | rust_cleaned_test_functions.jsonl/61310 | {
"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,
21263,
295,
273,
31550,
45390,
49946,
43991,
741,
262,
341,
286,
1077,
5206,
4479,
284,
8751,
486,
2258,
1428,
286,
1077,
97386,
39794,
284,
320,
15,
11,
220,
15,
11,
220,
15,
317,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_scalar_sub_assign() {
{
// Test arbitrary subtraction that tests reduction.
let mut tmp = Scalar(blst::blst_fr {
l: [
0x6a68c64b6f735a2b,
0xd5f4d143fe0a1972,
0x37c17f3829267c62,
... | rust_cleaned_test_functions.jsonl/54669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
5228,
20688,
368,
341,
286,
341,
310,
442,
3393,
24168,
75240,
429,
7032,
13951,
624,
310,
1077,
5206,
4174,
284,
35176,
29811,
267,
486,
2024,
267,
41537,
341,
394,
326,
25,
2278,
503,
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_token_revocation_with_refresh_token() {
let client = new_client()
.set_revocation_uri(RevocationUrl::new("https://revocation/url".to_string()).unwrap());
client
.revoke_token(RefreshToken::new("refresh_token_123".to_string()).into())
.unwrap()
.request(mo... | rust_cleaned_test_functions.jsonl/18626 | {
"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,
6458,
38082,
2276,
6615,
42076,
6458,
368,
341,
262,
1077,
2943,
284,
501,
8179,
741,
286,
659,
746,
38082,
2276,
15572,
7,
36184,
2276,
2864,
486,
931,
445,
2428,
1110,
7282,
2276,
57254,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_block_header_hash() -> Result<(), failure::Error> {
let decoded = HashType::BlockHash.string_to_bytes("BKyQ9EofHrgaZKENioHyP4FZNsTmiSEcVmcghgzCC9cGhE7oCET")?;
let decoded = hex::encode(&decoded);
let expected = "2253698f0c94788689fb95ca35eb1535ec3a8b7c613a97e6683f8... | rust_cleaned_test_functions.jsonl/65927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
7113,
8757,
8950,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
29213,
284,
6531,
929,
486,
4713,
6370,
4804,
2346,
12524,
445,
33,
77118,
48,
24,
36,
1055,
39,
1984,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_decode() {
let v: RbBytes = serde_json::from_str("{\"rb_bytes\":[1,2]}").unwrap();
println!("{:?}", v);
let v: RbBytes = serde_json::from_str("[1,2]").unwrap();
println!("{:?}", v);
} | rust_cleaned_test_functions.jsonl/122648 | {
"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,
15227,
368,
341,
286,
1077,
348,
25,
431,
65,
7078,
284,
61570,
9455,
486,
1499,
2895,
99141,
10681,
12524,
59,
8899,
16,
11,
17,
13989,
1827,
15454,
543,
286,
13751,
88928,
25,
52652,
348,
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_file_backend_ase_256_ctr() {
let pt = Vec::from_hex(
"6bc1bee22e409f96e93d7e117393172aae2d8a571e03ac9c9eb76fac45af8e5130c81c46a35ce411\
e5fbc1191a0a52eff69f2445df4f9b17ad2b417be66c3710",
)
.unwrap();
let ct = Vec::from_hex(
... | rust_cleaned_test_functions.jsonl/81006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 572
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
40011,
62,
519,
62,
17,
20,
21,
69096,
368,
341,
1789,
286,
1077,
10817,
284,
11312,
486,
1499,
32655,
1006,
310,
330,
21,
8904,
16,
32031,
17,
17,
68,
19,
15,
24,
69,
24,
21,
68,
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_zero_confirmation_reconciliation() {
let mut dummy_chain = DummyChainImpl::new();
let head_header = block::BlockHeader {
height: 1,
..block::BlockHeader::default()
};
dummy_chain.store_head_header(&head_header);
// single Output
let new_output = DummyOutputSet::empty().with_ou... | rust_cleaned_test_functions.jsonl/17039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 881
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
37681,
1288,
98240,
368,
341,
197,
10217,
5206,
17292,
30583,
284,
50567,
18837,
9673,
486,
931,
543,
197,
10217,
1968,
8757,
284,
2504,
486,
4713,
4047,
341,
298,
30500,
25,
220,
16,
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_serialize() -> SoliResult<()> {
let product_id_bytes = [21u8; 32];
let price_id_bytes = [222u8; 32];
println!("Hex product_id: {:02X?}", &product_id_bytes);
println!("Hex price_id: {:02X?}", &price_id_bytes);
let attestation: PriceAttestation = PriceAttest... | rust_cleaned_test_functions.jsonl/36893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 636
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
368,
1464,
11473,
72,
2077,
71698,
341,
286,
1077,
1985,
842,
12524,
284,
508,
17,
16,
84,
23,
26,
220,
18,
17,
935,
286,
1077,
3349,
842,
12524,
284,
508,
17,
17,
17,
84,
23,
26,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_swap_pairs() {
let head = ListNode::new_from_arr(&vec![1, 2, 3, 4]);
let want = ListNode::new_from_arr(&vec![2, 1, 4, 3]);
let ans = Solution::swap_pairs(head);
assert_eq!(ans, want);
} | rust_cleaned_test_functions.jsonl/73297 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40991,
36430,
368,
341,
286,
1077,
1968,
284,
20501,
486,
931,
5673,
11210,
2099,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
286,
1077,
1366,
284,
20501,
486,
931,
5673,
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_part2() {
assert_eq!(part2(&as_input(INPUT)), 1068781);
assert_eq!(part2(&as_input("0\n17,x,13,19")), 3417);
assert_eq!(part2(&as_input("0\n67,7,59,61")), 754018);
assert_eq!(part2(&as_input("0\n67,x,7,59,61")), 779210);
assert_eq!(part2(&as_input("0\n67,7... | rust_cleaned_test_functions.jsonl/234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
17,
368,
341,
286,
2060,
10714,
10297,
4480,
17,
2099,
300,
5898,
57911,
5731,
220,
16,
15,
21,
23,
22,
23,
16,
317,
286,
2060,
10714,
10297,
4480,
17,
2099,
300,
5898,
445,
15,
1699,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_account_doesnt_exist() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin(BIN_NAME)?;
cmd.arg("config")
.arg("--url")
.arg("https://net.ton.dev");
cmd.assert()
.success();
let mut cmd = Command::cargo_bin(BIN_NAME)?;
cmd.arg(... | rust_cleaned_test_functions.jsonl/118327 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13500,
96374,
406,
35906,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
5349,
687,
4708,
40007,
262,
5439,
21186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mul_assign() {
let mut vector = Vector3D::new(3, 4, 5);
vector *= 3;
assert_eq!(vector, Vector3D::from([9, 12, 15]));
} | rust_cleaned_test_functions.jsonl/21642 | {
"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,
24944,
20688,
368,
341,
310,
1077,
5206,
4621,
284,
4196,
18,
35,
486,
931,
7,
18,
11,
220,
19,
11,
220,
20,
317,
310,
4621,
11404,
220,
18,
280,
310,
2060,
10714,
10297,
3215,
11,
4196,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_space_parse() {
let space: Space = indoc!(
"
..#..........
..#..........
#######...###
#.#...#...#.#
#############
..#...#...#..
..#####...^.."
)
.parse()
.unwrap();
... | rust_cleaned_test_functions.jsonl/109681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14663,
21039,
368,
341,
286,
1077,
3550,
25,
11487,
284,
1257,
509,
33673,
310,
6228,
310,
5241,
2,
4007,
33947,
310,
5241,
2,
4007,
33947,
310,
26274,
14374,
1112,
26840,
310,
671,
43326,
1112,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rand_actuator() {
const TEST_INTERVAL: TimeBaseUnits = 10;
let mut simulato = Simulato::new(&get_test_reference_position());
let mut rng = rand::thread_rng();
simulato.increment_simulated_time();
let start_time = simulato.get_simulated_time();
for... | rust_cleaned_test_functions.jsonl/67807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33864,
29370,
45162,
368,
341,
286,
733,
13602,
37353,
25,
4120,
3978,
26314,
284,
220,
16,
15,
280,
286,
1077,
5206,
75673,
4330,
284,
4467,
360,
4330,
486,
931,
2099,
455,
4452,
25433,
9661,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_btf_type_typedef() {
let endianness = Endianness::default();
let data: &[u8] = &[
0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x0b, 0x00, 0x00, 0x00,
];
match unsafe { BtfType::read(data, endianness) } {
Ok(BtfType::Typedef(_)) => ... | rust_cleaned_test_functions.jsonl/98493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
880,
8935,
1819,
42111,
4219,
368,
341,
286,
1077,
835,
72,
82033,
284,
3972,
72,
82033,
486,
2258,
543,
286,
1077,
821,
25,
44590,
84,
23,
60,
284,
609,
9640,
310,
220,
15,
87,
18,
16... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_keygen() {
let (pk, pks, _sks) = dealer_keygen(5, 15);
assert_eq!(pks.len(), 15);
let pka = pks.aggregate(5);
assert_eq!(pka, pk);
} | rust_cleaned_test_functions.jsonl/31033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
4370,
368,
341,
286,
1077,
320,
20819,
11,
281,
2787,
11,
716,
82,
2787,
8,
284,
23321,
3097,
4370,
7,
20,
11,
220,
16,
20,
317,
286,
2060,
10714,
10297,
79,
2787,
19406,
1507,
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_eval_unary_function_raw_column() {
#[rpn_fn]
fn foo(v: &Option<i64>) -> Result<Option<i64>> {
Ok(Some(v.unwrap() + 5))
}
let mut columns = LazyBatchColumnVec::from(vec![{
let mut col = LazyBatchColumn::raw_with_capacity(3);
... | rust_cleaned_test_functions.jsonl/65654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 806
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
4907,
658,
9174,
16067,
8744,
368,
341,
394,
11506,
81,
19958,
15246,
921,
286,
5168,
15229,
3747,
25,
609,
5341,
21897,
21,
19,
9231,
1464,
5714,
94150,
21897,
21,
19,
2452,
341,
310,
76... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_path() {
let path = Path::builder().build();
test_path(path.as_slice(), &StrokeOptions::default(), Some(0));
let path = Path::builder_with_attributes(1).build();
test_path(path.as_slice(), &StrokeOptions::default(), Some(0));
} | rust_cleaned_test_functions.jsonl/83681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
2638,
368,
341,
262,
1077,
1815,
284,
7933,
486,
17850,
1005,
5834,
543,
262,
1273,
2638,
5581,
5357,
26488,
1507,
609,
31557,
3798,
486,
2258,
1507,
4329,
7,
15,
3237,
262,
1077,
1815,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_hex() {
assert_eq!(vec![0, 0, 0, 0].to_hex(), "00000000");
assert_eq!(vec![10, 11, 12, 13].to_hex(), "0a0b0c0d");
assert_eq!([0, 0, 0, 255].to_hex(), "000000ff");
} | rust_cleaned_test_functions.jsonl/15826 | {
"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,
2346,
32655,
368,
341,
197,
6948,
10714,
10297,
4083,
20703,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
936,
983,
32655,
1507,
330,
15,
15,
15,
15,
15,
15,
15,
15,
797,
197,
6948,
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... | 1 |
#[test]
fn test_multiplication_with_scalar() {
let length_mm: Length<f32, Mm> = Length::new(10.0);
let result = length_mm * 2.0;
let expected: Length<f32, Mm> = Length::new(20.0);
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/50585 | {
"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,
91802,
1693,
6615,
41652,
368,
341,
286,
1077,
3084,
35599,
25,
17287,
63895,
18,
17,
11,
386,
76,
29,
284,
17287,
486,
931,
7,
16,
15,
13,
15,
626,
286,
1077,
1102,
284,
3084,
35599,
353,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compare_different_symbols() {
let ref a = parse_expr("|| let a = 1; let b = 1; a").unwrap();
let ref b = parse_expr("|| let c = 1; let d = 1; c").unwrap();
assert_eq!(ExprHash::from(a).unwrap(), ExprHash::from(b).unwrap());
} | rust_cleaned_test_functions.jsonl/103358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
82741,
55752,
368,
341,
262,
1077,
2053,
264,
284,
4715,
21915,
445,
8484,
1077,
264,
284,
220,
16,
26,
1077,
293,
284,
220,
16,
26,
264,
1827,
15454,
543,
262,
1077,
2053,
293,
284,
47... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_lockfile_json() {
let ver_file = VersionFile {
filename: "package.json".to_string(),
version_value: "0.1.2".to_version().unwrap(),
version_filetype: VersionFiletype::TOML,
lockfile: None,
};
assert_eq!(ver_file.get_trac... | rust_cleaned_test_functions.jsonl/46669 | {
"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,
3062,
9818,
1192,
9455,
368,
341,
286,
1077,
2739,
2458,
284,
6079,
1703,
341,
310,
3899,
25,
330,
1722,
4323,
3263,
983,
3904,
3148,
310,
2319,
3142,
25,
330,
15,
13,
16,
13,
17,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_numeric() {
// vald
assert!(Token::from_str0("10").is_numeric());
assert!(Token::from_str0("10e10").is_numeric());
assert!(Token::from_str0("10e+10").is_numeric());
assert!(Token::from_str0("10e-10").is_numeric());
assert!(Token::from_str0(".11").is_numeric());
ass... | rust_cleaned_test_functions.jsonl/67672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
29418,
368,
341,
262,
442,
1044,
67,
198,
262,
2060,
10297,
3323,
486,
1499,
2895,
15,
445,
16,
15,
1827,
285,
29418,
1423,
262,
2060,
10297,
3323,
486,
1499,
2895,
15,
445,
16,
15,
68,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_protocol_method() {
let class = test_utils::custom_class();
let result: i32 = unsafe { msg_send![class, addNumber: 1, toNumber: 2] };
assert_eq!(result, 3);
} | rust_cleaned_test_functions.jsonl/7128 | {
"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,
34880,
9032,
368,
341,
286,
1077,
536,
284,
1273,
17309,
486,
9163,
4790,
543,
286,
1077,
1102,
25,
600,
18,
17,
284,
19860,
314,
3750,
13565,
20703,
1040,
11,
912,
2833,
25,
220,
16,
11,
311,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_write_zero() {
let packet = Connect {
protocol: Protocol::new("MQTT", 4).unwrap(),
keep_alive: 120,
client_id: "imvj",
clean_session: true,
last_will: None,
username: None,
password: None,
}
.into();
let mut slice = [0u8; 8... | rust_cleaned_test_functions.jsonl/59346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
19359,
368,
341,
262,
1077,
10151,
284,
13015,
341,
286,
11507,
25,
24572,
486,
931,
445,
35169,
14903,
497,
220,
19,
568,
15454,
3148,
286,
2506,
58850,
25,
220,
16,
17,
15,
345,
286,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_poll_async_immediate_ops() {
let mut isolate = TestBehavior::setup(TestBehaviorMode::AsyncImmediate);
js_check(isolate.execute(
"setup2.js",
r#"
let nrecv = 0;
DenoCore.setAsyncHandler((buf) => {
nrecv++;
});
"#,
));
assert_e... | rust_cleaned_test_functions.jsonl/113676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 573
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40002,
28346,
17895,
14636,
21959,
368,
341,
262,
1077,
5206,
42123,
284,
3393,
22753,
486,
15188,
31159,
22753,
3636,
486,
6525,
52734,
626,
262,
6994,
7200,
82669,
7769,
1006,
414,
330,
15188,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_for_loop_with_positive_step() {
let input = "
FOR i% = 1 TO 7 STEP 2
PRINT i%
NEXT
";
let interpreter = interpret(input);
let stdlib = interpreter.stdlib;
assert_eq!(stdlib.output, vec!["1", "3", "5", "7"]);
} | rust_cleaned_test_functions.jsonl/109179 | {
"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,
5478,
17198,
6615,
54160,
11946,
368,
341,
286,
1077,
1946,
284,
6228,
286,
4613,
600,
4,
284,
220,
16,
5146,
220,
22,
48356,
220,
17,
198,
310,
35893,
600,
13744,
286,
45011,
198,
286,
7620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_bzimage_underflow() {
use super::super::super::Error as LoaderError;
let path = concat!(
env!("CARGO_MANIFEST_DIR"),
"/src/loader/x86_64/bzimage/fuzz_invalid_bzimage.bin"
);
let gm = create_guest_mem();
let mut image = Fil... | rust_cleaned_test_functions.jsonl/51145 | {
"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,
31433,
880,
89,
1805,
58228,
4965,
368,
341,
286,
990,
2256,
486,
9522,
486,
9522,
486,
1454,
438,
27811,
1454,
401,
286,
1077,
1815,
284,
33720,
33673,
310,
6105,
17223,
34,
7581,
46,
25143,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stake() {
new_test_ext().execute_with(|| {
set_block_1();
let worker1 = worker_pubkey(1);
assert_ok!(PhalaRegistry::force_register_worker(
Origin::root(),
worker1.clone(),
ecdh_pubkey(1),
Some(1)
));
assert_ok!(PhalaStakePool::create(Origin::signed(1))... | rust_cleaned_test_functions.jsonl/60463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 934
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
368,
341,
298,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
571,
8196,
7113,
62,
16,
543,
571,
10217,
11864,
16,
284,
11864,
34014,
792,
7,
16,
317,
571,
6948,
19817,
10297,
3357,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_virtio_fs_dax_on_cache_size_1_gib() {
test_virtio_fs(true, Some(0x4000_0000), "none", &prepare_virtiofsd, false)
} | rust_cleaned_test_functions.jsonl/23983 | {
"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,
2273,
2106,
815,
34470,
814,
706,
4470,
11529,
2368,
62,
16,
1889,
579,
368,
341,
310,
1273,
2273,
2106,
815,
34470,
3715,
11,
4329,
7,
15,
87,
19,
15,
15,
15,
62,
15,
15,
15,
15,
701,
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 |
#[test]
fn test_functions_reorder() -> TestResult {
let parts = vec![
"f(1)",
"f(2)",
"g(1)",
"g(2)",
"h(2)",
"k(x) if f(x) and g(x) and h(x)",
];
for (i, permutation) in permute(parts).into_iter().enumerate() {
let mut p = Polar::new();
... | rust_cleaned_test_functions.jsonl/97611 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31708,
1288,
1358,
368,
1464,
3393,
2077,
341,
1066,
262,
1077,
5479,
284,
7486,
90515,
286,
330,
69,
7,
16,
15752,
286,
330,
69,
7,
17,
15752,
286,
330,
70,
7,
16,
15752,
286,
330,
70,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_segwit_txid() {
let tx = Transaction::from_hex(
"02000000000101a4fe140f92eb5fa5a4788b6271a22f07fa91cb2f8ac328cd0065bfc43adb16c90100000\
01716001446decf32d70ee1fad5aa11d02158810316e6790bfeffffff02a08601000000000017a9147f14\
23e3359d1754ae9427e313c1d95... | rust_cleaned_test_functions.jsonl/61857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 514
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35325,
88519,
17805,
307,
368,
341,
286,
1077,
9854,
284,
17869,
486,
1499,
32655,
1006,
310,
330,
15,
17,
15,
15,
15,
15,
15,
15,
15,
15,
15,
16,
15,
16,
64,
19,
1859,
16,
19,
15,
69,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_malformed_json() {
assert_matches!(
CreationManifest::from_json("<invalid json document>".as_bytes()),
Err(CreationManifestError::Json(err)) => assert!(err.is_syntax())
);
} | rust_cleaned_test_functions.jsonl/101411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
278,
10155,
9455,
368,
341,
286,
2060,
38344,
33673,
310,
34286,
38495,
486,
1499,
9455,
9639,
11808,
2951,
2197,
52946,
300,
12524,
14702,
310,
15495,
3025,
26453,
38495,
1454,
486,
5014,
3964... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_human_numeric_zero_stable() {
let input = "0M\n0K\n-0K\n-P\n-0M\n";
new_ucmd!()
.arg("-hs")
.pipe_in(input)
.succeeds()
.stdout_only(input);
} | rust_cleaned_test_functions.jsonl/20495 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86247,
29418,
19359,
1261,
480,
368,
341,
262,
1077,
1946,
284,
330,
15,
44,
1699,
15,
42,
1699,
12,
15,
42,
1699,
9299,
1699,
12,
15,
44,
1699,
876,
262,
501,
68887,
2277,
0,
741,
286,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_probability_complex() {
let validators = vec![1, 2, 3, 4];
let mut leaders = HashMap::new();
let random = broken_random(validators.len() as i64 * 10);
for leader in random {
*leaders
.entry(select_winner(&validators, leader).unwrap()... | rust_cleaned_test_functions.jsonl/129486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68589,
41522,
368,
341,
286,
1077,
38588,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
4821,
286,
1077,
5206,
6036,
284,
10528,
486,
931,
1428,
286,
1077,
4194,
284,
10865,
226... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enrich_tf1x_histogram() {
let hp = pb::HistogramProto {
min: -1.999,
max: 1.999,
num: 60.0,
bucket_limit: vec![-2.0, -1.0, 0.0, 1.0, 2.0, f64::MAX],
bucket: vec![0.0, 10.0, 20.0, 20.0, 10.0, 0.0],
... | rust_cleaned_test_functions.jsonl/6204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 904
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
13851,
47719,
16,
87,
68564,
368,
341,
310,
1077,
20630,
284,
17310,
486,
77210,
31549,
341,
394,
1308,
25,
481,
16,
13,
24,
24,
24,
345,
394,
1932,
25,
220,
16,
13,
24,
24,
24,
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_is_computed_topic() {
let p1: PartitionMaps = vec![(1, vec![0]), (2, vec![2])].into();
let t1 = ReplicaSpec::new_assigned(p1);
assert!(!t1.is_computed());
let t2 = ReplicaSpec::new_computed(0, 0, None);
assert!(t2.is_computed());
} | rust_cleaned_test_functions.jsonl/79993 | {
"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,
6892,
2965,
19292,
31414,
368,
341,
286,
1077,
281,
16,
25,
54626,
36562,
284,
7486,
0,
9697,
16,
11,
7486,
20703,
15,
9719,
320,
17,
11,
7486,
20703,
17,
2467,
936,
18122,
543,
286,
1077,
259... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_leading_fields() {
assert_eq!(
"options word ssh-dss abcdefg".parse::<KeyEntry>().unwrap_err(),
ParseKeyError::InvalidKeyType
);
} | rust_cleaned_test_functions.jsonl/31210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
11751,
2228,
12132,
368,
341,
286,
2060,
10714,
33673,
310,
330,
2875,
3409,
29230,
1737,
778,
39022,
750,
70,
3263,
6400,
27638,
1592,
5874,
10483,
15454,
9266,
3148,
310,
14775,
1592,
1454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_partial_negated_isa() -> TestResult {
let p = Polar::new();
p.load_str(
r#"f(y) if (not y matches Foo{} or not g(y)) and y == 1;
g(_: Bar);"#,
)?;
let mut q = p.new_query_from_term(term!(call!("f", [sym!("x")])), false);
assert_p... | rust_cleaned_test_functions.jsonl/63042 | {
"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,
52068,
28209,
657,
6892,
64,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
1006,
310,
435,
55543,
69,
7021,
8,
421,
320,
1921,
379,
9071,
33428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inline_catch_alias_let1() {
test(
concat!(
"try {",
"} catch (e) {",
" let y = e;",
" g();",
" y;y;",
"}",
),
concat!("try {", "} catch (e) {", " g();", " e;e;", "}"),
);
} | rust_cleaned_test_functions.jsonl/27705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41871,
666,
754,
35947,
62,
1149,
16,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
330,
1539,
314,
756,
310,
80548,
2287,
320,
68,
8,
314,
756,
310,
330,
220,
1077,
379,
284,
384,
64497,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_calls() {
use common::traits::{EmptyConfig, SharedServiceState};
use serde_json::Value;
geckobridge::service::GeckoBridgeService::init_shared_state(&EmptyConfig);
let config = DeviceCapabilityConfig::default();
assert_eq!(*config.get("device.bt").unwrap(), Value::Boo... | rust_cleaned_test_functions.jsonl/2415 | {
"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,
34729,
45636,
368,
341,
262,
990,
4185,
486,
62633,
22964,
3522,
2648,
11,
16990,
1860,
1397,
2440,
262,
990,
61570,
9455,
486,
1130,
401,
262,
3893,
377,
674,
11183,
486,
7936,
486,
9499,
31463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_30() {
let (flags, subcommand, argv) = flags_from_vec(svec![
"deno",
"install",
"deno_colors",
"https://deno.land/std/examples/colors.ts"
]);
assert_eq!(
flags,
DenoFlags {
allow_write: true,
allow_net: true,
... | rust_cleaned_test_functions.jsonl/112859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14130,
5673,
13251,
62,
18,
15,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
284,
8042,
5673,
13251,
1141,
4083,
90515,
414,
330,
5183,
78,
756,
414,
330,
12248,
756,
414,
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_minutes() {
let cases: Vec<(&str, i8, u64)> = vec![
("31 11:30:45", 0, 30),
("11:30:45", 0, 30),
("-11:30:45.9233456", 0, 30),
];
for (input, fsp, exp) in cases {
let dur = Duration::parse(input.as_bytes(), fsp).unwrap();
... | rust_cleaned_test_functions.jsonl/17456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67655,
368,
341,
286,
1077,
5048,
25,
11312,
27,
2099,
495,
11,
600,
23,
11,
575,
21,
19,
16018,
284,
7486,
90515,
310,
3489,
18,
16,
220,
16,
16,
25,
18,
15,
25,
19,
20,
497,
220,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_types() {
assert_eq!(parse_test_yaml::<XCheckType>("default"),
XCheckType::Default);
assert_eq!(parse_test_yaml::<XCheckType>("none"),
XCheckType::None);
assert_eq!(parse_test_yaml::<XCheckType>("disabled"),
XCheckT... | rust_cleaned_test_functions.jsonl/30068 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9763,
368,
341,
286,
2060,
10714,
10297,
6400,
4452,
64380,
27638,
55,
3973,
929,
13211,
2258,
4461,
4293,
1599,
3973,
929,
486,
3675,
317,
286,
2060,
10714,
10297,
6400,
4452,
64380,
27638,
55,
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_merge_both_wildcard_diff_prefixes() {
check_assist(
merge_imports,
r"
use std<|>::cell::*;
use std::str::*;
",
r"
use std::{cell::*, str::*};
",
)
} | rust_cleaned_test_functions.jsonl/94000 | {
"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,
20888,
88819,
1670,
695,
4951,
15850,
13974,
288,
368,
341,
286,
1779,
12083,
380,
1006,
310,
10880,
18434,
82,
345,
310,
435,
698,
810,
1460,
27,
91,
6831,
5873,
56162,
810,
1460,
486,
495,
561... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_command_in_shell() {
let subcommand = vec![String::from("foo"), String::from("bar")];
let result = command_in_shell("bash", &subcommand);
let expected = String::from("bash -c \"foo bar\"");
assert!(result == expected);
} | rust_cleaned_test_functions.jsonl/60134 | {
"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,
10811,
1243,
48945,
368,
341,
286,
1077,
1186,
5631,
284,
7486,
20703,
703,
486,
1499,
445,
7975,
3975,
923,
486,
1499,
445,
2257,
899,
4821,
286,
1077,
1102,
284,
3210,
1243,
48945,
445,
46216,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primary_node_only() {
let mut bytecode: Vec<u8> = BIND_HEADER.to_vec();
append_section_header(&mut bytecode, SYMB_MAGIC_NUM, 18);
let device_name: [u8; 5] = [0x49, 0x42, 0x49, 0x53, 0]; // "IBIS"
bytecode.extend_from_slice(&[1, 0, 0, 0]);
bytecode.extend_... | rust_cleaned_test_functions.jsonl/24042 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 835
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45314,
5084,
18410,
368,
341,
286,
1077,
5206,
75129,
25,
11312,
34837,
23,
29,
284,
91370,
20330,
2389,
13251,
543,
286,
8737,
16221,
8757,
2099,
6984,
75129,
11,
16079,
8412,
49194,
9631,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tree_from_one() {
let input = b"test";
let mt = MerkleTree::new(&[input]);
let expected = hash_leaf!(input);
assert_eq!(mt.get_root(), Some(&expected));
} | rust_cleaned_test_functions.jsonl/112979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11663,
5673,
11667,
368,
341,
286,
1077,
1946,
284,
293,
1,
1944,
876,
286,
1077,
11965,
284,
8755,
23089,
6533,
486,
931,
2099,
58,
1355,
2558,
286,
1077,
3601,
284,
5175,
38909,
10297,
1355,
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 |
#[test]
fn test_generate_from_impl_for_enum() {
check_assist(
generate_from_impl_for_enum,
r#"
//- minicore: from
enum A { $0One(u32) }
"#,
r#"
enum A { One(u32) }
impl From<u32> for A {
fn from(v: u32) -> Self {
Self::One(v)
}
}
"#,
);
} | rust_cleaned_test_functions.jsonl/4568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
5673,
21007,
5478,
31054,
368,
341,
286,
1779,
12083,
380,
1006,
310,
6923,
5673,
21007,
5478,
31054,
345,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
504,
198,
9018,
362,
314,
400,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_discard2() {
static FILE_1: &str = r"start
end
";
static FILE_2: &str = r"start
1
2
end
";
static FILE_3: &str = r"start
1
end
";
let (path, repo) = repo_init().unwrap();
let path = path.path().to_str().unwrap();
write_commit_file(&repo, "test.... | rust_cleaned_test_functions.jsonl/105097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37745,
567,
17,
368,
341,
286,
1099,
11837,
62,
16,
25,
609,
495,
284,
435,
1,
2468,
198,
408,
198,
3302,
286,
1099,
11837,
62,
17,
25,
609,
495,
284,
435,
1,
2468,
198,
16,
198,
17,
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_iterate_string_vec() {
let words = vec!["hello", "world"];
let capitalized_words: Vec<String> = words.into_iter().map(|word| {capitalize_first(&word)}).collect();
assert_eq!(capitalized_words, ["Hello", "World"]);
} | rust_cleaned_test_functions.jsonl/22124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
3904,
13251,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
14615,
6332,
286,
1077,
97321,
18981,
25,
11312,
3464,
29,
284,
4244,
39860,
11723,
1005,
2186,
22428,
1158... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_calculate_cost_weight() {
let (mint_keypair, start_hash) = test_setup();
let keypair = Keypair::new();
let simple_transaction = SanitizedTransaction::from_transaction_for_tests(
system_transaction::transfer(&mint_keypair, &keypair.pubkey(), 2, start_hash),
... | rust_cleaned_test_functions.jsonl/109039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
15890,
15876,
368,
341,
286,
1077,
320,
67791,
3097,
12670,
11,
1191,
8950,
8,
284,
1273,
21363,
1428,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
4285,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_missing_argument() {
let err = OptParseError::missing_argument("<input>");
let thing = format!("{}", err);
let expect = "Missing argument: <input>";
assert_eq!(thing, expect);
} | rust_cleaned_test_functions.jsonl/8276 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
9025,
368,
341,
286,
1077,
1848,
284,
16554,
14463,
1454,
486,
30616,
9025,
9639,
1355,
15084,
286,
1077,
3166,
284,
3561,
79878,
1848,
317,
286,
1077,
1720,
284,
330,
25080,
5693,
25,
366,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_header() {
struct Case {
input: String,
want: Header,
tail: String,
}
fn wrap(s: &str) -> String {
format!(" \t {} .", s)
}
let tail = " .";
for case in vec![
Case {
... | rust_cleaned_test_functions.jsonl/78089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8757,
368,
341,
286,
2036,
11538,
341,
310,
1946,
25,
923,
345,
310,
1366,
25,
12104,
345,
310,
9787,
25,
923,
345,
286,
555,
286,
5168,
15061,
1141,
25,
609,
495,
8,
1464,
923,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tx_out_from_tx_out_stored() {
let mut rng: StdRng = SeedableRng::from_seed([1u8; 32]);
let source = tx::TxOut {
amount: Amount::new(1u64 << 13, &RistrettoPublic::from_random(&mut rng)).unwrap(),
target_key: RistrettoPublic::from_random(&mut rng).into(),
... | rust_cleaned_test_functions.jsonl/55002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
6068,
5673,
17805,
6068,
1261,
3018,
368,
341,
286,
1077,
5206,
28422,
25,
42517,
49,
968,
284,
35822,
480,
49,
968,
486,
1499,
33809,
2561,
16,
84,
23,
26,
220,
18,
17,
10149,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_state_from_account() {
let mut nonce_account = nonce_account::create_account(1).into_inner();
assert_eq!(state_from_account(&nonce_account), Ok(State::Uninitialized));
let data = nonce::state::Data {
authority: Pubkey::new(&[1u8; 32]),
blockhash: ... | rust_cleaned_test_functions.jsonl/18821 | {
"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,
4387,
5673,
13500,
368,
341,
286,
1077,
5206,
39676,
13500,
284,
39676,
13500,
486,
3182,
13500,
7,
16,
568,
18122,
34345,
543,
286,
2060,
10714,
10297,
2454,
5673,
13500,
2099,
39593,
13500,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_statement_error() {
let mut mint = Mint::new("tests/it/testdata");
let mut file = mint.new_goldenfile("statement-error.txt").unwrap();
let cases = &[
r#"create table a.b (c integer not null 1, b varchar(10))"#,
r#"create table a (c varchar(10))"#,
r#"create t... | rust_cleaned_test_functions.jsonl/118103 | {
"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,
37404,
4096,
368,
341,
262,
1077,
5206,
28337,
284,
41310,
486,
931,
445,
23841,
14,
275,
12697,
691,
797,
262,
1077,
5206,
1034,
284,
28337,
4618,
54696,
268,
1192,
445,
24184,
18917,
3909,
1827,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file2() -> std::io::Result<()> {
let model = process_file("tests/data/file2.log")?;
assert_eq!(model.terms().len(), 150031);
assert_eq!(model.instantiations().len(), 10242);
Ok(())
} | rust_cleaned_test_functions.jsonl/74600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
17,
368,
1464,
1460,
486,
815,
486,
2077,
71698,
341,
262,
1077,
1614,
284,
1882,
2458,
445,
23841,
13167,
23903,
17,
1665,
899,
37445,
262,
2060,
10714,
10297,
2528,
13,
18347,
1005,
2892,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serde_page_default() {
let src = Page::default();
let str = serde_json::to_string(&src).unwrap();
let out: Page = serde_json::from_str(&str).unwrap();
assert!(out.parent.is_none());
} | rust_cleaned_test_functions.jsonl/114806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
6129,
9993,
368,
341,
286,
1077,
2286,
284,
5755,
486,
2258,
543,
286,
1077,
607,
284,
61570,
9455,
486,
983,
3904,
2099,
3548,
568,
15454,
543,
286,
1077,
700,
25,
5755,
284,
61570,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_primitive() {
let b = Primitive::<u8>::from(vec![Some(1), Some(2), Some(3)]).to(DataType::UInt8);
let mut a = GrowablePrimitive::new(&[&b], false, 3);
a.extend(0, 0, 2);
let result: PrimitiveArray<u8> = a.into();
let expected = Primitive::<u8>::from(vec![S... | rust_cleaned_test_functions.jsonl/80109 | {
"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,
84087,
368,
341,
286,
1077,
293,
284,
51460,
27638,
84,
23,
6831,
1499,
25592,
20703,
8373,
7,
16,
701,
4329,
7,
17,
701,
4329,
7,
18,
7252,
568,
983,
63941,
486,
18777,
23,
317,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_get_config_file_returns_config_file_path() {
let config = Config::default();
assert_eq!(
config.get_config_file_path(),
config.config_file,
"should return config file path"
);
} | rust_cleaned_test_functions.jsonl/91434 | {
"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,
5332,
3062,
5332,
2458,
58900,
5332,
2458,
2638,
368,
341,
286,
1077,
2193,
284,
5532,
486,
2258,
543,
286,
2060,
10714,
33673,
310,
2193,
670,
5332,
2458,
2638,
3148,
310,
2193,
5423,
2458,
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 |
#[test]
fn test_value_of() {
let matches = app()
.clone()
.get_matches_from(vec!["test", "--single", "50"]);
assert_eq!(value_of(&matches, "single"), Some(50));
assert_eq!(value_of::<u64>(&matches, "multiple"), None);
let pubkey = Pubkey::new_rand();
... | rust_cleaned_test_functions.jsonl/36684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
3575,
368,
341,
286,
1077,
9071,
284,
906,
741,
310,
659,
19982,
741,
310,
659,
455,
38344,
5673,
25592,
0,
1183,
1944,
497,
14482,
15338,
497,
330,
20,
15,
15049,
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_uuid() {
let got = RpnFnScalarEvaluator::new()
.evaluate::<Bytes>(ScalarFuncSig::Uuid)
.unwrap();
let r = got.unwrap().into_string().unwrap_or_default();
let v: Vec<&str> = r.split('-').collect();
assert_eq!(v.len(), 5);
assert_eq!(... | rust_cleaned_test_functions.jsonl/59419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25540,
368,
341,
286,
1077,
2684,
284,
431,
19958,
24911,
20639,
89042,
486,
931,
741,
310,
659,
47291,
27638,
7078,
2235,
20639,
9626,
47246,
486,
38431,
340,
310,
659,
15454,
543,
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... | 1 |
#[test]
fn test_retain_latest() {
let mut cached_schedules = HashMap::new();
let mut order = VecDeque::new();
for i in 0..=MAX_SCHEDULES {
cached_schedules.insert(i as u64, Arc::new(LeaderSchedule::default()));
order.push_back(i as u64);
}
LeaderSc... | rust_cleaned_test_functions.jsonl/26068 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21695,
466,
64880,
368,
341,
286,
1077,
5206,
20579,
643,
49613,
284,
10528,
486,
931,
543,
286,
1077,
5206,
1973,
284,
11312,
73891,
486,
931,
543,
286,
369,
600,
304,
220,
15,
496,
28,
10586,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compute_next_update_time() {
let now = clock::now();
let policy_data = PolicyData { current_time: now };
let result = StubPolicy::compute_next_update_time(
&policy_data,
&[],
&SCHEDULING,
&ProtocolState::default(),
)... | rust_cleaned_test_functions.jsonl/80114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
11257,
8882,
3009,
368,
341,
286,
1077,
1431,
284,
8866,
486,
3328,
543,
286,
1077,
4842,
1769,
284,
10974,
1043,
314,
1482,
3009,
25,
1431,
2605,
286,
1077,
1102,
284,
66611,
13825,
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_error_duplicate_value() {
let mut tree = Tree {
raw: "2 + 6 5".to_owned(),
..Default::default()
};
tree.parse_pos().unwrap();
tree.parse_operators().unwrap();
assert_eq!(tree.parse_node(), Err(Error::DuplicateValueNode));
} | rust_cleaned_test_functions.jsonl/28446 | {
"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,
4096,
70434,
3142,
368,
341,
286,
1077,
5206,
4916,
284,
8942,
341,
310,
7112,
25,
330,
17,
488,
220,
21,
220,
20,
3263,
983,
51973,
3148,
310,
5241,
3675,
486,
2258,
741,
286,
3634,
286,
4916... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_idempotence() {
let mut graph = setup_basic_graph();
println!("{:?}", graph);
assert!(graph.contains_vertex(1));
graph.remove_vertex(1, None);
graph.remove_vertex(1, None);
graph.remove_vertex(1, None);
assert!(!graph.contains_vertex(1));
graph.add_vertex(2, Non... | rust_cleaned_test_functions.jsonl/40989 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
842,
3262,
97560,
368,
341,
262,
1077,
5206,
4771,
284,
6505,
34729,
14738,
543,
262,
13751,
88928,
25,
52652,
4771,
317,
262,
2060,
10297,
4439,
8786,
26611,
7,
16,
3237,
262,
4771,
4850,
26611,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pending_update_fee_ack_on_reconnect() {
// previous channel feerate after sending an undelivered revoke_and_ack when re-sending an
// undelivered commitment_signed.
// A sends B update_fee + CS
// reconnect
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_c... | rust_cleaned_test_functions.jsonl/58347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2020
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37861,
8882,
34305,
48447,
4470,
1288,
6459,
368,
341,
1572,
197,
322,
3681,
5496,
1152,
58668,
1283,
11628,
458,
2030,
301,
43056,
72038,
8378,
48447,
979,
312,
1331,
2459,
458,
198,
197,
322,
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... | 4 |
#[test]
fn test_reference_vector_ILL2_ext_switching() {
let test_vector = include_bytes!("../vectors/ILL2_ext_switching.bit");
test_vs_minimp3(test_vector);
} | rust_cleaned_test_functions.jsonl/69796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25433,
12247,
62,
9228,
17,
9927,
27652,
287,
368,
341,
262,
1077,
1273,
12247,
284,
2924,
12524,
17223,
1244,
85,
10605,
14,
9228,
17,
9927,
27652,
287,
30099,
797,
262,
1273,
42434,
7260,
6664,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_err() {
let message = "some error message I'm getting";
let formatted = format!("-ERR {}\r\n", message);
let result = parse_line(&formatted);
assert_eq!(ParseResult::Error(message), result.unwrap());
} | rust_cleaned_test_functions.jsonl/5699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9266,
368,
341,
286,
1077,
1943,
284,
330,
14689,
1465,
1943,
358,
2776,
3709,
876,
286,
1077,
23126,
284,
3561,
0,
13645,
2650,
56057,
81,
1699,
497,
1943,
317,
286,
1077,
1102,
284,
471... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_batch_row_limit() {
let data = vec![
(1, Some("name:0"), 2),
(2, Some("name:4"), 3),
(4, Some("name:3"), 1),
(5, Some("name:1"), 4),
];
let batch_row_limit = 3;
let chunk_datum_limit = batch_row_limit * 3; // we have 3 fields.
let product = Pro... | rust_cleaned_test_functions.jsonl/47088 | {
"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,
14534,
8530,
14763,
368,
341,
262,
1077,
821,
284,
7486,
90515,
286,
320,
16,
11,
4329,
445,
606,
25,
15,
3975,
220,
17,
1326,
286,
320,
17,
11,
4329,
445,
606,
25,
19,
3975,
220,
18,
1326,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pem() {
let key = include_bytes!("../test/key.pem");
let key = PKey::private_key_from_pem(key).unwrap();
let priv_key = key.private_key_to_pem_pkcs8().unwrap();
let pub_key = key.public_key_to_pem().unwrap();
// the `PRIVATE KEY` or `PUBLIC KEY`... | rust_cleaned_test_functions.jsonl/18714 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
336,
368,
341,
286,
1077,
1376,
284,
2924,
12524,
17223,
1244,
1944,
68864,
49373,
797,
286,
1077,
1376,
284,
393,
1592,
486,
1996,
3097,
5673,
620,
336,
4857,
568,
15454,
1428,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lookup_pos_in_expr() {
let expr = "let a = 1;\nbuiltins.trace a 23";
let pos = lookup_pos(
expr,
Position {
line: 0,
character: 0,
},
);
assert_eq!(0, pos.expect("expected position to be not None... | rust_cleaned_test_functions.jsonl/113850 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
6479,
1243,
21915,
368,
341,
286,
1077,
15169,
284,
330,
1149,
264,
284,
220,
16,
17882,
18080,
11227,
1330,
34412,
264,
220,
17,
18,
876,
286,
1077,
1133,
284,
18615,
6479,
1006,
310,
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_eq_hdr_name() {
use self::StandardHeader::Vary;
let a = HeaderName {
inner: Repr::Standard(Vary),
};
let b = HdrName {
inner: Repr::Standard(Vary),
};
assert_eq!(a, b);
let a = HeaderName {
inner: Repr... | rust_cleaned_test_functions.jsonl/3406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 646
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
28238,
1269,
368,
341,
286,
990,
656,
486,
19781,
4047,
486,
53,
658,
401,
286,
1077,
264,
284,
12104,
675,
341,
310,
9179,
25,
1032,
649,
486,
19781,
12410,
658,
1326,
286,
2605,
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_help_argument() -> Result<(), Box<dyn std::error::Error>> {
let mut cmd = Command::cargo_bin("git-mob")?;
cmd.arg("--help");
cmd.assert()
.stdout(predicate::str::contains("git-mob 0.1"))
.stdout(predicate::str::contains(
"James Thompson <james@thomps.onl>... | rust_cleaned_test_functions.jsonl/3013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26926,
9025,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
5206,
5439,
284,
7348,
486,
66715,
21816,
445,
12882,
1448,
674,
899,
37445,
262,
5439,
21186,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_timeout() {
let dir = tmpdir();
let socket_path = dir.path().join("sock");
let _listener = or_panic!(UnixListener::bind(&socket_path));
let mut stream = or_panic!(UnixStream::connect(&socket_path));
or_panic!(stream.set_read_timeout(Some(Duration::f... | rust_cleaned_test_functions.jsonl/98539 | {
"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,
6443,
20537,
368,
341,
286,
1077,
5419,
284,
4174,
3741,
543,
286,
1077,
7575,
2638,
284,
5419,
3875,
1005,
5987,
445,
13199,
3071,
286,
1077,
716,
35039,
284,
476,
620,
31270,
10297,
55832,
2743,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_subscript_neg() {
let parsed: Expression = from_str("abcd[-1]").unwrap();
let expected = Subscript(Box::new(Identifier("abcd".into())), -1);
assert_eq!(parsed, expected);
} | rust_cleaned_test_functions.jsonl/127055 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
2282,
28209,
368,
341,
286,
1077,
15676,
25,
16378,
284,
504,
2895,
445,
68644,
7609,
16,
44891,
15454,
543,
286,
1077,
3601,
284,
3719,
2282,
67758,
486,
931,
7,
8714,
445,
68644,
3263,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_simd_rand() {
let mut rng = new_rng(70812476915813);
// Test updating with random values and update size big enough to test
// simd implementation with overflow
const MIN_BYTES: usize = 1 << 20;
const BUF_LEN: usize = (1 << 21) + 79;
let bu... | rust_cleaned_test_functions.jsonl/113596 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 743
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
18314,
67,
33864,
368,
341,
286,
1077,
5206,
28422,
284,
501,
66849,
7,
22,
15,
23,
16,
17,
19,
22,
21,
24,
16,
20,
23,
16,
18,
626,
286,
442,
3393,
21010,
448,
4194,
2750,
323,
2647... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_spec_order() {
let vs = [
"1.0.0-alpha",
"1.0.0-alpha.1",
"1.0.0-alpha.beta",
"1.0.0-beta",
"1.0.0-beta.2",
"1.0.0-beta.11",
"1.0.0-rc.1",
"1.0.0",
];
let mut i = 1;
wh... | rust_cleaned_test_functions.jsonl/43110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13594,
7869,
368,
341,
286,
1077,
6165,
284,
2278,
310,
330,
16,
13,
15,
13,
15,
64538,
756,
310,
330,
16,
13,
15,
13,
15,
64538,
13,
16,
756,
310,
330,
16,
13,
15,
13,
15,
64538,
61929,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_query_matches_with_multiple_captures_on_a_node() {
allocations::record(|| {
let language = get_language("javascript");
let mut query = Query::new(
language,
"(function_declaration
(identifier) @name1 @name2 @name3
(state... | rust_cleaned_test_functions.jsonl/25180 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 914
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
45233,
666,
2689,
1413,
4470,
4306,
5084,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
5206,
3239,
284,
11361,
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... | 2 |
#[test]
fn test_name_seg() {
let mut context = AmlContext::new();
check_ok!(
name_seg().parse(&[b'A', b'F', b'3', b'Z'], &mut context),
NameSeg([b'A', b'F', b'3', b'Z']),
&[]
);
check_ok!(
name_seg().parse(&[b'A', b'F', b'3', b'Z',... | rust_cleaned_test_functions.jsonl/13930 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 419
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1269,
35325,
368,
341,
286,
1077,
5206,
2266,
284,
362,
1014,
1972,
486,
931,
1428,
286,
1779,
19817,
33673,
310,
829,
35325,
1005,
6400,
2099,
58,
65,
51274,
516,
293,
6,
37,
516,
293,
6,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_linked_list() {
struct TestRdbHandler {
list: Vec<String>,
}
impl EventHandler for TestRdbHandler {
fn handle(&mut self, data: Event) {
match data {
Event::RDB(rdb) => match rdb {
Object::List(list) => {
... | rust_cleaned_test_functions.jsonl/93092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 925
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76145,
2019,
368,
341,
262,
2036,
3393,
49,
1999,
3050,
341,
286,
1140,
25,
11312,
3464,
12520,
262,
555,
262,
11605,
31957,
369,
3393,
49,
1999,
3050,
341,
286,
5168,
3705,
2099,
6984,
656,
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... | 4 |
#[test]
fn test_latin1_bin() {
use crate::codec::collation::collator::CollatorLatin1Bin;
use std::cmp::Ordering;
use std::collections::hash_map::DefaultHasher;
use std::hash::Hasher;
let cases = vec![
(
vec![0xFF, 0x88, 0x00, 0x13],
... | rust_cleaned_test_functions.jsonl/45981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1089
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
14768,
16,
21816,
368,
341,
286,
990,
17717,
486,
34607,
486,
17222,
367,
486,
17222,
850,
486,
15265,
850,
41547,
16,
28794,
280,
286,
990,
1460,
486,
7293,
486,
4431,
287,
280,
286,
990,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unrecognized_file_type_no_theme() {
let mut options = get_command_line_options();
options.theme = Some("none".to_string());
let input = ADDED_FILE_INPUT.replace("a.py", "a");
let output = get_line_of_code_from_delta(&input, &options);
ass... | rust_cleaned_test_functions.jsonl/61841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
46067,
2458,
1819,
6536,
19864,
368,
341,
16885,
286,
1077,
5206,
2606,
284,
633,
10811,
6528,
8743,
543,
286,
2606,
29451,
284,
4329,
445,
6697,
3263,
983,
3904,
1423,
286,
1077,
1946,
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_try_from_record_for_sample() {
let record = build_record();
let actual = Sample::try_from(record);
let mut fields = IndexMap::new();
fields.insert(String::from("Assay"), String::from("WholeGenome"));
let expected = Sample::new(String::from("sample0"), fie... | rust_cleaned_test_functions.jsonl/125329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
14192,
5478,
17491,
368,
341,
286,
1077,
3255,
284,
1936,
14192,
543,
286,
1077,
5042,
284,
19143,
486,
1539,
5673,
23794,
626,
286,
1077,
5206,
5043,
284,
8008,
2227,
486,
931,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_estimatable() {
let mut estimatable = TestEstimateable { point: None };
estimatable.estimate(StoryPoint::new(2).unwrap());
assert_eq!(estimatable.point, Some(StoryPoint::new(2).unwrap()))
} | rust_cleaned_test_functions.jsonl/24246 | {
"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,
18583,
318,
15086,
368,
341,
286,
1077,
5206,
14932,
15086,
284,
3393,
13782,
3426,
480,
314,
1459,
25,
2240,
2605,
286,
14932,
15086,
13,
40130,
7,
17938,
2609,
486,
931,
7,
17,
568,
15454,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_number_errors() {
test_parse_err::<f64>(&[
("+", "expected value at line 1 column 1"),
(".", "expected value at line 1 column 1"),
("-", "invalid number at line 1 column 1"),
("00", "invalid number at line 1 column 2"),
("0x80", "trailing charact... | rust_cleaned_test_functions.jsonl/29830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 930
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5500,
20196,
368,
341,
262,
1273,
21039,
9266,
27638,
69,
21,
19,
44784,
9640,
286,
3489,
44056,
330,
7325,
897,
518,
1555,
220,
16,
3250,
220,
16,
4461,
286,
320,
3263,
497,
330,
7325,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_boolean_equal() {
let a = BooleanArray::from(vec![false, false, true]).data();
let b = BooleanArray::from(vec![false, false, true]).data();
test_equal(a.as_ref(), b.as_ref(), true);
let b = BooleanArray::from(vec![false, false, false]).data();
test_equal(... | rust_cleaned_test_functions.jsonl/46940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 746
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46642,
11478,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
25592,
20703,
3849,
11,
895,
11,
830,
10697,
691,
543,
286,
1077,
293,
284,
6992,
1857,
486,
1499,
25592,
20703,
3849,
11,
895... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ancestor_match() {
let doc_text = br#"
<b><a>rad</a></b>
"#;
let css_text = br#"
* {
color: black;
}
b a {
color:red;
}
"#;
let (doc, stylesheet,stree,lbox, rbox) = standard_test_run(doc_text, css_text).unwrap();
... | rust_cleaned_test_functions.jsonl/101342 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
66878,
10708,
368,
341,
262,
1077,
4629,
4326,
284,
1411,
2,
698,
262,
366,
65,
1784,
64,
29,
13281,
522,
64,
1472,
65,
397,
262,
5869,
280,
262,
1077,
15877,
4326,
284,
1411,
2,
698,
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_naive_time() -> Result<()> {
let db = checked_memory_handle()?;
let time = NaiveTime::from_hms(23, 56, 4);
db.execute("INSERT INTO foo (t) VALUES (?)", [time])?;
let s: String = db.query_row("SELECT t FROM foo", [], |r| r.get(0))?;
assert_eq!("23:56:04", ... | rust_cleaned_test_functions.jsonl/88684 | {
"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,
58631,
533,
3009,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
94136,
286,
1077,
882,
284,
12812,
533,
1462,
486,
1499,
1523,
1011,
7,
17,
18,
11,
220,
20,
21,
11,
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... | 5 |
#[test]
fn test_generic() {
let mut g = Generic::new(
{
let mut v = Zeros::new();
v.push_back((0, 0.69));
v.push_back((1, 0.32));
v.push_back((2, 0.13));
v.push_back((6, 0.4892));
v
... | rust_cleaned_test_functions.jsonl/67275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
368,
341,
286,
1077,
5206,
342,
284,
21281,
486,
931,
1006,
310,
341,
394,
1077,
5206,
348,
284,
1863,
6264,
486,
931,
1428,
394,
348,
2552,
3895,
1188,
15,
11,
220,
15,
13,
21,
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... | 2 |
#[test]
fn test_empty_objects_to_skip2() {
let data = [
0x38, 0x28, 0x01, 0x00, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x38, 0x29, 0x01, 0x00,
0x03, 0x00, 0x38, 0x30, 0x04, 0x00, 0x04, 0x00,
];
let tape = parse(&data[..]).unwrap();
assert_eq!(
ta... | rust_cleaned_test_functions.jsonl/109421 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
24873,
2346,
44830,
17,
368,
341,
286,
1077,
821,
284,
2278,
310,
220,
15,
87,
18,
23,
11,
220,
15,
87,
17,
23,
11,
220,
15,
87,
15,
16,
11,
220,
15,
87,
15,
15,
11,
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_status_service() {
let temp_dir = tempfile::TempDir::new().unwrap();
let mut status_server = StatusServer::new(
1,
ConfigController::default(),
Arc::new(SecurityConfig::default()),
MockRouter,
temp_dir.path().to_path_buf... | rust_cleaned_test_functions.jsonl/6911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4773,
12267,
368,
341,
286,
1077,
2730,
4334,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
2639,
12015,
284,
8104,
5475,
486,
931,
1006,
310,
220,
16,
345,
310,
553... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_alloc_bio_desc() {
let mut f = OpenOptions::new()
.truncate(true)
.create(true)
.write(true)
.read(true)
.open("/tmp/buf_3")
.unwrap();
let mut writer = Box::new(f.try_clone().unwrap()) as RafsIoWriter;
... | rust_cleaned_test_functions.jsonl/74899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1487
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14802,
89641,
10986,
368,
341,
286,
1077,
5206,
282,
284,
5264,
3798,
486,
931,
741,
310,
659,
66054,
3715,
340,
310,
659,
3182,
3715,
340,
310,
659,
4934,
3715,
340,
310,
659,
878,
3715,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unclosed_bracket_errors() {
assert!(Pattern::new("abc[def").unwrap_err().pos == 3);
assert!(Pattern::new("abc[!def").unwrap_err().pos == 3);
assert!(Pattern::new("abc[").unwrap_err().pos == 3);
assert!(Pattern::new("abc[!").unwrap_err().pos == 3);
assert!(... | rust_cleaned_test_functions.jsonl/40567 | {
"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,
76576,
9259,
17682,
5709,
20196,
368,
341,
286,
2060,
10297,
15760,
486,
931,
445,
13683,
58,
750,
1827,
15454,
9266,
1005,
966,
621,
220,
18,
317,
286,
2060,
10297,
15760,
486,
931,
445,
13683,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reconstruct1() {
let result = reconstruct(&vec![
Clue::None,
Clue::Plus,
Clue::Plus,
Clue::Minus,
Clue::Plus,
]);
assert_eq!(result, vec![1, 2, 3, 0, 4]);
} | rust_cleaned_test_functions.jsonl/38562 | {
"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,
1288,
7596,
16,
368,
341,
262,
1077,
1102,
284,
43828,
2099,
4083,
90515,
286,
2435,
361,
486,
4064,
345,
286,
2435,
361,
486,
21807,
345,
286,
2435,
361,
486,
21807,
345,
286,
2435,
361,
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_splice_inclusive_range() {
let mut v = vec![1, 2, 3, 4, 5];
let a = [10, 11, 12];
let t1: Vec<_> = v.splice(2..=3, a.iter().cloned()).collect();
assert_eq!(v, &[1, 2, 10, 11, 12, 5]);
assert_eq!(t1, &[3, 4]);
let t2: Vec<_> = v.splice(1..=2, Some(20)).collect();
asser... | rust_cleaned_test_functions.jsonl/24429 | {
"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,
10123,
4754,
1243,
8336,
9698,
368,
341,
262,
1077,
5206,
348,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
264,
284,
508,
16,
15,
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_multiple_attributes() {
let input = "\x1B[1;31mhi";
let ansistring = ANSIParser::default().parse_ansi(input);
let mut it = ansistring.iter();
let attr = Attr {
fg: Color::AnsiValue(1),
effect: Effect::BOLD,
..Attr::default()
... | rust_cleaned_test_functions.jsonl/92164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
18240,
368,
341,
286,
1077,
1946,
284,
2917,
87,
16,
33,
58,
16,
26,
18,
16,
76,
6023,
876,
286,
1077,
8099,
73756,
284,
2100,
50,
3298,
10425,
486,
2258,
1005,
6400,
62,
52067,
5384,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.