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_custom_hash_expression() {
test_struct!([custom_hash="0x12345678", custom_hash_format="expression"]
{}
[(Djb2Hasher, Djb2Hasher, 0x12345678)]);
} | rust_cleaned_test_functions.jsonl/43892 | {
"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,
15875,
8950,
28068,
368,
341,
262,
1273,
15126,
0,
2561,
9163,
8950,
428,
15,
87,
16,
17,
18,
19,
20,
21,
22,
23,
497,
2526,
8950,
8955,
428,
28099,
7026,
338,
5613,
338,
17826,
35,
38978,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode() {
assert_encode_decode::<EventAccumulatorSchema>(
&(100, Position::from_inorder_index(100)),
&HashValue::random(),
);
} | rust_cleaned_test_functions.jsonl/129721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
15227,
368,
341,
262,
2060,
11224,
15227,
27638,
1556,
14603,
372,
10511,
8632,
17055,
286,
22796,
16,
15,
15,
11,
12380,
486,
1499,
1243,
1358,
3560,
7,
16,
15,
15,
6965,
286,
609,
6370,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_replace_newline() {
let mut args = HashMap::new();
args.insert("from".to_string(), to_value(&"\n").unwrap());
args.insert("to".to_string(), to_value(&"<br>").unwrap());
let result = replace(&to_value(&"Animal Alphabets\nB is for Bee-Eater").unwrap(), &args);
... | rust_cleaned_test_functions.jsonl/119648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
5921,
1056,
368,
341,
286,
1077,
5206,
2827,
284,
10528,
486,
931,
543,
286,
2827,
7030,
445,
1499,
3263,
983,
3904,
1507,
311,
3142,
2099,
11934,
77,
1827,
15454,
1423,
286,
2827,
7030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accounts_cluster_bench() {
solana_logger::setup();
let validator_config = ValidatorConfig::default();
let num_nodes = 1;
let mut config = ClusterConfig {
cluster_lamports: 10_000_000,
poh_config: PohConfig::new_sleep(Duration::from_millis(5... | rust_cleaned_test_functions.jsonl/41987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
28441,
880,
19762,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
22935,
5332,
284,
32566,
2648,
486,
2258,
543,
286,
1077,
1629,
14896,
284,
220,
16,
280,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poll() {
let transport = ZmqTransport::default();
tests::test_poll(transport, "zmq:tcp://127.0.0.1:8081", Ready::writable());
} | rust_cleaned_test_functions.jsonl/85534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40002,
368,
341,
286,
1077,
7557,
284,
1863,
27674,
27560,
486,
2258,
1428,
286,
7032,
486,
1944,
40002,
7,
26445,
11,
330,
89,
27674,
25,
27161,
1110,
16,
17,
22,
13,
15,
13,
15,
13,
16,
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 |
#[test]
fn test_perm_two_rotations() {
assert_eq!(perm_to_atoms(&[1, 2, 0, 4, 3]), tvec!((0, 2), (3, 4)));
} | rust_cleaned_test_functions.jsonl/126324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31961,
23241,
38256,
804,
368,
341,
286,
2060,
10714,
10297,
19913,
2346,
67755,
2099,
58,
16,
11,
220,
17,
11,
220,
15,
11,
220,
19,
11,
220,
18,
9719,
259,
4083,
0,
1188,
15,
11,
220,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_part2() {
assert_eq!(
part2(
r"
eyr:1972 cid:100
hcl:#18171d ecl:amb hgt:170 pid:186cm iyr:2018 byr:1926
iyr:2019
hcl:#602927 eyr:1967 hgt:170cm
ecl:grn pid:012533040 byr:1946
hcl:dab227 iyr:2012
ecl:brn hgt:182cm pid:021572410 eyr:2020 byr:1992 cid:277
hgt:59cm ecl:zz... | rust_cleaned_test_functions.jsonl/16295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 462
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
17,
368,
341,
262,
2060,
10714,
33673,
286,
949,
17,
1006,
310,
435,
698,
1195,
81,
25,
16,
24,
22,
17,
32141,
25,
16,
15,
15,
198,
71,
564,
14111,
16,
23,
16,
22,
16,
67,
59958,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_digit10() {
let mut lexer = Cursor::new("1000 +10 10## -1/2 .001");
assert_eq!(lexer.get_token(), Some(Token::new(Number, 4)));
assert_eq!(lexer.get_token(), Some(Token::new(Whitespace, 1)));
assert_eq!(lexer.get_token(), Some(Token::new(Number, 3)));
... | rust_cleaned_test_functions.jsonl/25331 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
48403,
16,
15,
368,
341,
286,
1077,
5206,
53259,
284,
28067,
486,
931,
445,
16,
15,
15,
15,
488,
16,
15,
220,
16,
15,
565,
481,
16,
14,
17,
659,
15,
15,
16,
797,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submit() {
let writer = Arc::new(MockMetricsWriter::new());
let agent = MetricsAgent::new(writer.clone(), Duration::from_secs(10), 1000);
for i in 0..42 {
agent.submit(
DataPoint::new("measurement")
.add_field_i64("i", i)
... | rust_cleaned_test_functions.jsonl/10326 | {
"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,
31674,
368,
341,
286,
1077,
6916,
284,
19689,
486,
931,
66436,
27328,
6492,
486,
931,
1423,
286,
1077,
8315,
284,
54190,
16810,
486,
931,
38356,
15997,
1507,
21045,
486,
1499,
68718,
7,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ipv6_parse() {
assert_eq!("2a02::/32".parse::<BgpAddrV6>(),Ok(BgpAddrV6::new(Ipv6Addr::new(0x2a02, 0, 0, 0, 0, 0, 0, 0), 32)));
assert_eq!("2a02::1".parse::<BgpAddrV6>(),Ok(BgpAddrV6::new(Ipv6Addr::new(0x2a02, 0, 0, 0, 0, 0, 0, 1), 128)));
} | rust_cleaned_test_functions.jsonl/87637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
21039,
368,
341,
286,
2060,
10714,
17223,
17,
64,
15,
17,
486,
14,
18,
17,
3263,
6400,
27638,
33,
21888,
13986,
53,
21,
39019,
11578,
5349,
21888,
13986,
53,
21,
486,
931,
8972,
301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_global_simple() {
let dict = GlobalDictionary::new();
let index = dict.index_of("source.port").unwrap();
assert_eq!(*index,1,"check source port");
let index = dict.index_of("source.service").unwrap();
assert_eq!(*index,158,"check source service");
} | rust_cleaned_test_functions.jsonl/14331 | {
"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,
19296,
30015,
368,
1476,
262,
1077,
6451,
284,
7962,
8517,
486,
931,
543,
262,
1077,
1922,
284,
6451,
5154,
3575,
445,
2427,
14598,
1827,
15454,
543,
262,
2060,
10714,
0,
4071,
1252,
11,
16,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sort_many() -> Result<()> {
// column 1
let a00: &dyn Array = &Int32Array::from_slice(&[0, 1, 2, 3]);
let a01: &dyn Array = &Int32Array::from_slice(&[2, 3, 4]);
// column 2
let a10: &dyn Array = &Utf8Array::<i32>::from_slice(&["a", "c", "d", "e"]);
... | rust_cleaned_test_functions.jsonl/47142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 639
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
18435,
22101,
368,
1464,
5714,
71698,
341,
286,
442,
3250,
220,
16,
198,
286,
1077,
264,
15,
15,
25,
609,
43085,
2910,
284,
609,
1072,
18,
17,
1857,
486,
1499,
26488,
2099,
58,
15,
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... | 2 |
#[test]
fn test_channel() {
let (mut ctx, mut executor) = ockam_node::start_node();
executor
.execute(async move {
let alice_vault = Vault::create(&ctx).expect("failed to create vault");
let bob_vault = Vault::create(&ctx).expect("failed to create vaul... | rust_cleaned_test_functions.jsonl/46786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1083
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14571,
368,
341,
286,
1077,
320,
6984,
5635,
11,
5206,
31558,
8,
284,
297,
377,
309,
5084,
486,
2468,
5084,
543,
286,
31558,
198,
310,
659,
10257,
18285,
3271,
341,
394,
1077,
70433,
2273,
945,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reverse_bits() {
assert_eq!(reverse_bits(0b1101_0101), 0b1010_1011);
} | rust_cleaned_test_functions.jsonl/105388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 57
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43277,
20034,
368,
341,
286,
2060,
10714,
10297,
25903,
20034,
7,
15,
65,
16,
16,
15,
16,
62,
15,
16,
15,
16,
701,
220,
15,
65,
16,
15,
16,
15,
62,
16,
15,
16,
16,
317,
262,
335
] | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_variables_curly() {
let sut = "5*{x} + 4*log2(log(1.5-{gamma}))*({x}*-(tan(cos(sin(652.2-{gamma}))))) + 3*{x}";
let expr = parse_with_default_ops::<f64>(sut).unwrap();
assert_float_eq_f64(expr.eval(&[1.0, 0.0]).unwrap(), 11.429314405093656);
let sut = "2*(4*{x} + ... | rust_cleaned_test_functions.jsonl/66721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28182,
18956,
398,
368,
341,
286,
1077,
34212,
284,
330,
20,
9,
90,
87,
92,
488,
220,
19,
90414,
17,
12531,
7,
16,
13,
20,
63347,
32214,
92,
31870,
2306,
87,
92814,
8013,
52591,
88830,
89383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_symlink_with_invalid_target_path() {
let mut symlink_bytes = BytesMut::new();
symlink_bytes.put_u32(0x01);
symlink_bytes.try_put_str("/linkpath").unwrap();
symlink_bytes.put_u32(0x01); // invalid target path length
assert_eq!(
Symlink::... | rust_cleaned_test_functions.jsonl/43470 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
58530,
44243,
6615,
31433,
11123,
2638,
368,
341,
286,
1077,
5206,
83221,
12524,
284,
30024,
51440,
486,
931,
1428,
286,
83221,
12524,
3597,
7300,
18,
17,
7,
15,
87,
15,
16,
317,
286,
832... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_infinite() {
let nan: f32 = f32::NAN;
let inf: f32 = f32::INFINITY;
let neg_inf: f32 = f32::NEG_INFINITY;
assert!(!nan.is_infinite());
assert!(inf.is_infinite());
assert!(neg_inf.is_infinite());
assert!(!0.0f32.is_infinite());
as... | rust_cleaned_test_functions.jsonl/8101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
1243,
25722,
368,
341,
286,
1077,
20021,
25,
282,
18,
17,
284,
282,
18,
17,
486,
45,
1093,
280,
286,
1077,
4132,
25,
282,
18,
17,
284,
282,
18,
17,
486,
687,
55990,
280,
286,
1077,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lagrange_commitments() {
let n = 64;
let domain = D::<Fp>::new(n).unwrap();
let mut srs = SRS::<VestaG>::create(n);
srs.add_lagrange_basis(domain);
let expected_lagrange_commitments: Vec<_> = (0..n)
.map(|i| {
let mut e = vec!... | rust_cleaned_test_functions.jsonl/104704 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
351,
9669,
36346,
1368,
368,
341,
286,
1077,
308,
284,
220,
21,
19,
280,
286,
1077,
7947,
284,
422,
27638,
37,
79,
6831,
931,
1445,
568,
15454,
1428,
286,
1077,
5206,
274,
5428,
284,
328,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_map_append_fallible() {
let mut a = SgSet::<_, 6>::new();
assert!(a.try_insert(1).is_ok());
assert!(a.try_insert(2).is_ok());
assert!(a.try_insert(3).is_ok());
let mut b = SgSet::<_, 6>::new();
assert!(b.try_insert(4).is_ok());
assert!(b.try_insert(5).is_ok());
... | rust_cleaned_test_functions.jsonl/68252 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 562
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
26041,
761,
541,
1238,
368,
341,
262,
1077,
5206,
264,
284,
328,
70,
1649,
27638,
6878,
220,
21,
6831,
931,
1428,
262,
2060,
10297,
64,
48779,
17678,
7,
16,
568,
285,
19817,
1423,
262,
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_diff() {
let mut t = SimpleTester {};
let mut f = TestFile::new("test.txt");
let res = f.run_tests(&mut t);
assert_eq!(res.as_ref().ok(), Some(&()), "Could not run tests: {:?}", res);
} | rust_cleaned_test_functions.jsonl/120712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15850,
368,
341,
286,
1077,
5206,
259,
284,
8993,
58699,
9321,
286,
1077,
5206,
282,
284,
3393,
1703,
486,
931,
445,
1944,
3909,
797,
286,
1077,
592,
284,
282,
7634,
32509,
2099,
6984,
259,
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_primitive_array_float_sum() {
let a = Float64Array::from(vec![1.1, 2.2, 3.3, 4.4, 5.5]);
assert_eq!(16.5, sum(&a).unwrap());
} | rust_cleaned_test_functions.jsonl/27858 | {
"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,
84087,
3858,
17586,
10160,
368,
341,
286,
1077,
264,
284,
13001,
21,
19,
1857,
486,
1499,
25592,
20703,
16,
13,
16,
11,
220,
17,
13,
17,
11,
220,
18,
13,
18,
11,
220,
19,
13,
19,
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_get_nonexistant_dialogue() {
let querier = new_valid_db("get_nonexistant_dialogue.db");
querier.get_dialogue(1000);
} | rust_cleaned_test_functions.jsonl/107712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
21637,
327,
11202,
24331,
361,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
455,
21637,
327,
11202,
24331,
361,
7076,
3071,
286,
29134,
1268,
670,
24331,
361,
7,
16,
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 |
#[test]
fn test_empty_add_back() {
let mut assr = Assembler::new(16);
assert_eq!(assr.add(12, 4), Ok(()));
assert_eq!(assr, contigs![(12, 4)]);
} | rust_cleaned_test_functions.jsonl/52003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
2891,
3895,
368,
341,
286,
1077,
5206,
1071,
81,
284,
1634,
35401,
486,
931,
7,
16,
21,
317,
286,
2060,
10714,
10297,
395,
81,
1364,
7,
16,
17,
11,
220,
19,
701,
7622,
5065,
1106,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ops_ctor() {
let fb = Firebase::new("https://db.fb.com").ok().unwrap();
let query = fb.ops(&FbOps {
order_by: Some("Hello World"),
limit_to_first: Some(5),
end_at: Some(7),
equal_to: Some(3),
shallow: Some(true),
format: Some(true),
... | rust_cleaned_test_functions.jsonl/37425 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21959,
54185,
368,
341,
262,
1077,
25469,
284,
19683,
486,
931,
445,
2428,
1110,
1999,
53707,
905,
1827,
562,
1005,
15454,
543,
262,
1077,
3239,
284,
25469,
46778,
2099,
37,
65,
38904,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_terms() {
let mut schema_builder = Schema::builder();
let text_field = schema_builder.add_text_field("text", TEXT);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let query_parser = QueryParser::for_index(&index, vec![... | rust_cleaned_test_functions.jsonl/78452 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
37498,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
497,
15762,
317,
286,
1077,
10802,
284,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_positive_int_or_float() {
assert!(NonNegativeIntegerOrFloat::try_from(-1.0).is_err());
let mut v = NonNegativeIntegerOrFloat::try_from(1.0).unwrap();
assert!(v.try_set(-1.0).is_err());
assert!(v.try_set(1.0).is_ok());
} | rust_cleaned_test_functions.jsonl/42769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54160,
4042,
8734,
17586,
368,
341,
286,
2060,
10297,
8121,
38489,
3486,
2195,
5442,
486,
1539,
5673,
4080,
16,
13,
15,
568,
285,
9266,
5231,
286,
1077,
5206,
348,
284,
11581,
38489,
3486,
2195,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slip0010_vectors() {
let tests = test_vectors_slip0010_ed25519();
for t in tests.iter() {
let seed = hex::decode(t.seed).unwrap();
let path = t.path;
let key = Slip0010::derive_from_path(path, &seed).unwrap();
assert_eq!(t.c_code, hex::encode(key.chain_cod... | rust_cleaned_test_functions.jsonl/3307 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11886,
573,
15,
15,
16,
15,
49158,
368,
341,
262,
1077,
7032,
284,
1273,
49158,
11886,
573,
15,
15,
16,
15,
32370,
17,
20,
20,
16,
24,
543,
262,
369,
259,
304,
7032,
19471,
368,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_message_watermark_event_orderings() {
// Test that a message with a timestamp less than the watermark ensures that the watermark
// is dependent on the message.
{
let message_event_a: OperatorEvent = OperatorEvent::new(
Timestamp::new(vec![1]),... | rust_cleaned_test_functions.jsonl/24875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6462,
54550,
3987,
6748,
7869,
819,
368,
341,
286,
442,
3393,
429,
264,
1943,
448,
264,
11441,
2686,
1091,
279,
88006,
25351,
429,
279,
88006,
198,
286,
442,
374,
17749,
389,
279,
1943,
624,
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... | 7 |
#[test]
fn test_huya_live() {
Builder::new_current_thread().enable_all().build().unwrap().block_on(async move {
let u = TestUrl::new();
let b = qliveplayer_lib::streamfinder::huya::Huya::new();
println!("{:?}", b.get_live(u.huya_live_url.as_ref()).await.unwrap());
});
} | rust_cleaned_test_functions.jsonl/25594 | {
"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,
1523,
44544,
55203,
368,
341,
262,
20626,
486,
931,
11080,
10814,
1005,
12552,
5705,
1005,
5834,
1005,
15454,
1005,
4574,
4470,
18285,
3271,
341,
286,
1077,
575,
284,
3393,
2864,
486,
931,
543,
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_vec3a_cmp() {
assert!(!Vec3AMask::default().any());
assert!(!Vec3AMask::default().all());
assert_eq!(Vec3AMask::default().bitmask(), 0x0);
let a = vec3a(-1.0, -1.0, -1.0);
let b = vec3a(1.0, 1.0, 1.0);
let c = vec3a(-1.0, -1.0, 1.0);
let d = vec3a(1.0, -1.0, -1.0);
... | rust_cleaned_test_functions.jsonl/23489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
64,
35193,
368,
341,
262,
2060,
0,
3471,
10050,
18,
1402,
1073,
486,
2258,
1005,
3767,
1423,
262,
2060,
0,
3471,
10050,
18,
1402,
1073,
486,
2258,
1005,
541,
1423,
262,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transport_cc_extension() -> Result<()> {
let raw = Bytes::from_static(&[0x00, 0x02]);
let buf = &mut raw.clone();
let t1 = TransportCcExtension::unmarshal(buf)?;
let t2 = TransportCcExtension {
transport_sequence: 2,
};
assert_eq!(t1, t2);
let mut dst = Bytes... | rust_cleaned_test_functions.jsonl/120379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46398,
28955,
31035,
368,
1464,
5714,
71698,
341,
262,
1077,
7112,
284,
30024,
486,
1499,
25360,
2099,
58,
15,
87,
15,
15,
11,
220,
15,
87,
15,
17,
2558,
262,
1077,
6607,
284,
609,
6984,
7112,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_assembler_shift_ops() {
test_case(&["SHR A, B"], &[0x040d]);
test_case(&["ASR [0x00FF], C"], &[0x0bce, 0x00ff]);
test_case(&["SHL [300], C"], &[0x0bcf, 0x012c]);
} | rust_cleaned_test_functions.jsonl/44760 | {
"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,
11898,
35401,
22230,
21959,
368,
341,
262,
1273,
19096,
2099,
1183,
8590,
49,
362,
11,
425,
7914,
44590,
15,
87,
15,
19,
15,
67,
2558,
262,
1273,
19096,
2099,
1183,
1911,
49,
508,
15,
87,
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_header() {
with_basic_file(&valid_header_v2(), |disk_file: RawFile| {
let q = QcowFile::from(disk_file).unwrap();
assert_eq!(q.virtual_size(), 0x20_0000_0000);
});
with_basic_file(&valid_header_v3(), |disk_file: RawFile| {
let q = QcowF... | rust_cleaned_test_functions.jsonl/96733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8757,
368,
341,
286,
448,
34729,
2458,
2099,
1891,
8757,
2273,
17,
1507,
760,
30496,
2458,
25,
23022,
1703,
91,
341,
310,
1077,
2804,
284,
1207,
18921,
1703,
486,
1499,
1500,
3187,
2458,
568,
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_line_locate_point_line() {
// Some finite examples
let line = Line::new(
Coordinate { x: -1.0, y: 0.0 },
Coordinate { x: 1.0, y: 0.0 },
);
let point = Point::new(0.0, 1.0);
assert_eq!(line.line_locate_point(&point), Some(0.5));
... | rust_cleaned_test_functions.jsonl/63906 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
13400,
349,
6085,
6528,
368,
341,
286,
442,
4329,
34226,
10295,
198,
286,
1077,
1555,
284,
7083,
486,
931,
1006,
310,
41035,
314,
856,
25,
481,
16,
13,
15,
11,
379,
25,
220,
15,
13,
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_square() {
let l1_zeros: [&mut Mod_e414_17; 10] = [ &mut (&ZERO * &ZERO),
&mut (&ONE * &ZERO),
&mut (&TWO * &ZERO),
&mut (&M_ONE * &ZERO),... | rust_cleaned_test_functions.jsonl/15953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39794,
368,
341,
286,
1077,
326,
16,
83761,
25,
34336,
6984,
5650,
2204,
19,
16,
19,
62,
16,
22,
26,
220,
16,
15,
60,
284,
508,
609,
6984,
15899,
73956,
353,
609,
73956,
1326,
17648,
609,
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... | 6 |
#[test]
fn test_prune() {
let cache = CacheTest::new(CACHE_SIZE);
cache.insert(1, 100);
cache.insert(2, 200);
assert_eq!(2, cache.cache.total_charge());
let h = cache.cache.look_up(encoded_u32(1).as_slice()).expect("");
cache.cache.prune();
cache.cache.r... | rust_cleaned_test_functions.jsonl/82679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
2886,
368,
341,
286,
1077,
6500,
284,
19479,
2271,
486,
931,
3025,
17810,
4098,
317,
286,
6500,
7030,
7,
16,
11,
220,
16,
15,
15,
317,
286,
6500,
7030,
7,
17,
11,
220,
17,
15,
15,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_constructors() {
type F = f32;
let x: F = 1.;
let y: F = 2.;
let z: F = 3.;
let w: F = 42.;
let zero: F = 0.;
{
let v = Vector0XYZ::from_xyz(x,y,z);
assert_eq!(v.x, x);
assert_eq!(Into::<[F;4]>::into(v), [zero,x,y,z]);
}
{
let ... | rust_cleaned_test_functions.jsonl/33002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 725
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
1087,
368,
341,
262,
943,
434,
284,
282,
18,
17,
280,
262,
1077,
856,
25,
434,
284,
220,
16,
37403,
262,
1077,
379,
25,
434,
284,
220,
17,
37403,
262,
1077,
1147,
25,
434,
284,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_levels() {
let mut map = BTreeMap::new();
map.check();
assert_eq!(map.height(), None);
assert_eq!(map.len(), 0);
map.insert(0, ());
while map.height() == Some(0) {
let last_key = *map.last_key_value().unwrap().0;
map.insert(last_key + 1, ());
}
ma... | rust_cleaned_test_functions.jsonl/53924 | {
"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,
37819,
368,
341,
262,
1077,
5206,
2415,
284,
425,
6533,
2227,
486,
931,
543,
262,
2415,
9093,
543,
262,
2060,
10714,
10297,
2186,
5727,
1507,
2240,
317,
262,
2060,
10714,
10297,
2186,
19406,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_key0_iv0_offset_1() {
let mut cipher = HC256::new(
&GenericArray::from(PAPER_KEY0),
&GenericArray::from(PAPER_IV0),
);
let mut buf1 = [0; 1];
let mut buf2 = [0; 63];
cipher.encrypt(&mut buf1);
cipher.encrypt(&mut buf2);
for i in 0..1 {
assert... | rust_cleaned_test_functions.jsonl/15797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
15,
51411,
15,
6917,
62,
16,
368,
341,
262,
1077,
5206,
31088,
284,
45828,
17,
20,
21,
486,
931,
1006,
286,
609,
19964,
1857,
486,
1499,
5304,
57567,
6600,
15,
1326,
286,
609,
19964,
185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fast_retransmit_dup_acks_counter() {
let mut s = socket_established();
s.send_slice(b"abc").unwrap(); // This is lost
recv!(s, time 0, Ok(TcpRepr {
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
payload: &b"abc"[..],
... | rust_cleaned_test_functions.jsonl/91895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 739
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35743,
1288,
1458,
1763,
51932,
62,
7821,
15730,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
1428,
286,
274,
5219,
26488,
1883,
1,
13683,
1827,
15454,
2129,
442,
1096,
374,
5558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_record_update_first_seen_time() {
block_on(async {
let config = config_generator();
let mut state_machine = StateMachine::new_stub(&config, make_test_app_set()).await;
let now = time::i64_to_time(123456789);
assert_eq!(state_machine.record... | rust_cleaned_test_functions.jsonl/94238 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
8882,
12978,
60668,
3009,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
5206,
1584,
38695,
284,
3234,
21605,
486,
931,
62781,
2099,
1676,
11,
128... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reference() {
new_ucmd!()
.arg("-v")
.arg("--reference=ref_file")
.arg("/etc")
.fails()
.stderr_contains("chgrp: changing group of '/etc': Operation not permitted (os error 1)\nfailed to change group of '/etc' from ");
} | rust_cleaned_test_functions.jsonl/49272 | {
"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,
25433,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
85,
1138,
286,
659,
858,
21549,
16291,
28,
1097,
2458,
1138,
286,
659,
858,
4283,
12107,
1138,
286,
659,
59631,
741,
1789,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stop_all_aps_succeeds() {
let mut test_values = test_setup();
// Stop an AP
let stop_fut = test_values.iface_manager.stop_all_aps();
pin_mut!(stop_fut);
assert_variant!(test_values.exec.run_until_stalled(&mut stop_fut), Poll::Pending);
// Verify ... | rust_cleaned_test_functions.jsonl/59194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 426
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
5705,
62,
2625,
643,
29264,
82,
368,
341,
286,
1077,
5206,
1273,
9146,
284,
1273,
21363,
1428,
286,
442,
14215,
458,
10106,
198,
286,
1077,
2936,
761,
332,
284,
1273,
9146,
35431,
578,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rules() {
let src = "%%
[0-9]+ 'int'
[a-zA-Z]+ 'id'
\\+ '+'
"
.to_string();
let ast = parse_lex::<u8>(&src).unwrap();
let intrule = ast.get_rule_by_name("int").unwrap();
assert_eq!("int", intrule.name.as_ref().unwrap());
assert_eq!("[0-9]+", intrul... | rust_cleaned_test_functions.jsonl/53998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21407,
368,
341,
286,
1077,
2286,
284,
330,
51377,
58,
15,
12,
24,
7574,
364,
396,
1248,
15481,
21088,
11171,
7574,
364,
307,
1248,
3422,
10,
13902,
1248,
698,
286,
659,
983,
3904,
543,
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... | 1 |
#[test]
fn test_failure_fail() {
let res = CmdResult {
bin_path: "".into(),
util_name: None,
tmpd: None,
code: None,
success: true,
stdout: "".into(),
stderr: "".into(),
};
res.failure();
} | rust_cleaned_test_functions.jsonl/12788 | {
"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,
43618,
22121,
368,
341,
286,
1077,
592,
284,
40210,
2077,
341,
310,
9544,
2638,
25,
44907,
18122,
3148,
310,
4094,
1269,
25,
2240,
345,
310,
4174,
67,
25,
2240,
345,
310,
2038,
25,
2240,
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_t35() {
init();
let product_type = 8;
let result = t35(product_type);
println!("{}", result.len());
println!("{:?}", result)
} | rust_cleaned_test_functions.jsonl/104721 | {
"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,
528,
18,
20,
368,
341,
286,
2930,
543,
286,
1077,
1985,
1819,
284,
220,
23,
280,
286,
1077,
1102,
284,
259,
18,
20,
19475,
1819,
317,
286,
13751,
79878,
1102,
19406,
1423,
286,
13751,
88928,
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 |
#[test]
fn test_build_statistics_inconsistent_length() {
// return an inconsistent length to the actual statistics arrays
let required_columns = RequiredStatColumns::from(vec![(
"s1".into(),
StatisticsType::Min,
Field::new("s1_min", DataType::Int64, true),
... | rust_cleaned_test_functions.jsonl/97675 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
49569,
1243,
78399,
5118,
368,
341,
286,
442,
470,
458,
39140,
3084,
311,
279,
5042,
13142,
18386,
198,
286,
1077,
2567,
22590,
284,
12659,
15878,
13965,
486,
1499,
25592,
20703,
1006,
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_pending_snapshot_pause_replication() {
let l = default_logger();
let mut sm = new_test_raft(1, vec![1, 2], 10, 1, new_storage(), &l);
sm.restore(testing_snap());
sm.persist();
sm.become_candidate();
sm.become_leader();
sm.mut_prs().get_mut(2).unwrap().become_snapshot... | rust_cleaned_test_functions.jsonl/43882 | {
"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,
37861,
53265,
59989,
25533,
1693,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
1525,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_matches_starts_with_correctly() {
check(
&WildcardPattern::StartsWith {
pattern: "alf*".into(),
starts_with: "alf".into()
},
vec!["alf_loves_cats", "alf-loves-eating-cats", "alf"],
vec!["al", "", "cats", "not... | rust_cleaned_test_functions.jsonl/80621 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38344,
86552,
6615,
31550,
398,
368,
341,
286,
1779,
1006,
310,
609,
92988,
15760,
486,
3479,
16056,
341,
394,
5383,
25,
330,
3104,
9,
3263,
18122,
3148,
394,
8471,
6615,
25,
330,
3104,
3263,
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_read_repo_commit_detail() {
let repo_commit_detail: RepoCommitDetail = read_test_file("repo_commit_detail");
assert_eq!(
repo_commit_detail.id,
ObjectId::new("de4ac3cf96cb8a0893be22b03f5171d934f9d392"),
);
assert_eq!(repo_commit_detail.short_id, ObjectId::new("de... | rust_cleaned_test_functions.jsonl/12953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
37784,
36346,
14480,
368,
341,
262,
1077,
15867,
36346,
14480,
25,
71509,
33441,
10649,
284,
1349,
4452,
2458,
445,
23476,
36346,
14480,
3071,
262,
2060,
10714,
33673,
286,
15867,
36346,
14480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_squaring() {
let a = Fp2 {
c0: Fp::from_raw_unchecked([
0xc9a2183163ee70d4,
0xbc3770a7196b5c91,
0xa247f8c1304c5f44,
0xb01fc2a3726c80b5,
0xe1d293e5bbd919c9,
0x4b78e80020ef2ca,
... | rust_cleaned_test_functions.jsonl/97987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 922
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
446,
3249,
368,
341,
286,
1077,
264,
284,
434,
79,
17,
341,
310,
272,
15,
25,
434,
79,
486,
1499,
16067,
4907,
7549,
8956,
394,
220,
15,
8148,
24,
64,
17,
16,
23,
18,
16,
21,
18,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_str() {
let tests = &[("", "\"\""), ("foo", "\"foo\"")];
test_encode_ok(tests);
test_pretty_encode_ok(tests);
} | rust_cleaned_test_functions.jsonl/29817 | {
"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,
9165,
2895,
368,
341,
262,
1077,
7032,
284,
44590,
19814,
15898,
2105,
3975,
3489,
7975,
497,
15898,
7975,
2105,
899,
935,
262,
1273,
11224,
19817,
8623,
82,
317,
262,
1273,
620,
21322,
11224,
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 |
#[test]
fn test_generate_invalid_k() {
let share1 = "2-1-1YAYwmOHqZ69jA".to_string().into_bytes();
sss::split_secret(10, 5, share1.as_slice(), true).unwrap();
} | rust_cleaned_test_functions.jsonl/77609 | {
"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,
48851,
31433,
4698,
368,
341,
262,
1077,
4332,
16,
284,
330,
17,
12,
16,
12,
16,
56,
3022,
19557,
46761,
80,
57,
21,
24,
73,
32,
3263,
983,
3904,
1005,
18122,
12524,
1428,
262,
274,
778,
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 |
#[test]
fn test_question_build_and_parse() {
let domain = DomainBuilder::from_str(DOMAIN_STRING).unwrap();
let unicast = false;
let qtype = Type::Aaaa;
let class = Class::In;
let question = QuestionBuilder::new(domain, qtype, class, unicast);
let mut buf = make_bu... | rust_cleaned_test_functions.jsonl/34439 | {
"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,
28915,
20801,
8378,
21039,
368,
341,
286,
1077,
7947,
284,
21070,
3297,
486,
1499,
2895,
5432,
1898,
6836,
12283,
568,
15454,
543,
286,
1077,
650,
35446,
284,
895,
280,
286,
1077,
2804,
1313,
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_gc_config_validate() {
let cfg = GCConfig::default();
cfg.validate().unwrap();
let mut invalid_cfg = GCConfig::default();
invalid_cfg.batch_keys = 0;
assert!(invalid_cfg.validate().is_err());
} | rust_cleaned_test_functions.jsonl/4823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49423,
5332,
42681,
368,
341,
286,
1077,
13286,
284,
22381,
2648,
486,
2258,
543,
286,
13286,
19520,
1005,
15454,
1428,
286,
1077,
5206,
8318,
18343,
284,
22381,
2648,
486,
2258,
543,
286,
8318,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_cast_int_as_json() {
let mut ctx = EvalContext::new(Arc::new(EvalConfig::default_for_test()));
let cases = vec![
(
Some(FieldTypeFlag::UNSIGNED),
vec![Datum::U64(32)],
Some(Json::U64(32)),
),
(
... | rust_cleaned_test_functions.jsonl/2965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 892
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
4042,
11898,
9455,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
931,
4346,
1287,
486,
931,
10722,
831,
2648,
486,
2258,
5478,
4452,
7392,
286,
1077,
5048,
284,
7486,
90515,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_debug() {
let sgs = SgSet::from([3, 4, 1, 2, 5, 6]);
let bts = BTreeSet::from([3, 4, 1, 2, 5, 6]);
assert!(sgs.iter().eq(bts.iter()));
let sgt_str = format!("{:#?}", sgs);
let bts_str = format!("{:#?}", bts);
assert_eq!(sgt_str, bts_str);
println!("DEBUG:\n{}", sgt_... | rust_cleaned_test_functions.jsonl/68237 | {
"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,
15446,
368,
341,
262,
1077,
274,
5857,
284,
328,
70,
1649,
486,
1499,
2561,
18,
11,
220,
19,
11,
220,
16,
11,
220,
17,
11,
220,
20,
11,
220,
21,
2558,
262,
1077,
293,
2576,
284,
425,
6533,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_dynaerrorkind_to_dynaerror_success() {
let err = DynaError::new(DynaErrorKind::UnhandledError, None);
assert_eq!(err, DynaError::from(DynaErrorKind::UnhandledError));
} | rust_cleaned_test_functions.jsonl/133083 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 94
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
814,
52344,
615,
669,
484,
2346,
814,
52344,
841,
18632,
368,
341,
286,
1077,
1848,
284,
43938,
64,
1454,
486,
931,
5432,
52344,
1454,
10629,
486,
95539,
1454,
11,
2240,
626,
286,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_deposit_eth_to_near_balance_total_supply() {
let (master_account, contract) = init(CUSTODIAN_ADDRESS);
call_deposit_eth_to_near(&contract, CONTRACT_ACC);
let balance = get_eth_on_near_balance(&master_account, DEPOSITED_RECIPIENT, CONTRACT_ACC);
assert_eq!(balance, DEPOSITED_AMOU... | rust_cleaned_test_functions.jsonl/112867 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 312
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
85798,
57757,
2346,
76340,
29396,
10784,
65630,
368,
341,
262,
1077,
320,
13629,
13500,
11,
5116,
8,
284,
2930,
3025,
8553,
2069,
22002,
20135,
317,
262,
1618,
85798,
57757,
2346,
76340,
2099,
20257... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clonemap() {
let mut map: CloneMap = TypeMap::custom();
map.insert::<KeyType>(Value(10));
assert!(map.contains::<KeyType>());
let cloned = map.clone();
assert_eq!(map.get::<KeyType>(), cloned.get::<KeyType>());
} | rust_cleaned_test_functions.jsonl/33447 | {
"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,
6794,
263,
42040,
368,
341,
286,
1077,
5206,
2415,
25,
27913,
2227,
284,
3990,
2227,
486,
9163,
543,
286,
2415,
7030,
27638,
97964,
2235,
1130,
7,
16,
15,
1106,
286,
2060,
10297,
2186,
8786,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int32_fmt_debug() {
let buf = Buffer::from(&[0, 1, 2, 3, 4].to_byte_slice());
let arr = Int32Array::new(5, buf, 0, 0);
assert_eq!(
"PrimitiveArray<Int32>\n[\n 0,\n 1,\n 2,\n 3,\n 4,\n]",
format!("{:?}", arr)
);
} | rust_cleaned_test_functions.jsonl/11591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
18,
17,
38128,
15446,
368,
341,
286,
1077,
6607,
284,
10312,
486,
1499,
2099,
58,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
936,
983,
19737,
26488,
1423,
286,
1077,
2890,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_under_point() {
let ray = Ray {
origin: Tuple::point(0.0, 0.0, -5.0),
direction: Tuple::vector(0.0, 0.0, 1.0),
};
let sphere = Sphere::new(
Matrix::translation(0.0, 0.0, 1.0),
Material::new(
Some(Color::whit... | rust_cleaned_test_functions.jsonl/45910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58228,
6085,
368,
341,
286,
1077,
18299,
284,
13255,
341,
310,
6238,
25,
24622,
486,
2768,
7,
15,
13,
15,
11,
220,
15,
13,
15,
11,
481,
20,
13,
15,
1326,
310,
5106,
25,
24622,
486,
3215,
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_to_string() {
assert_eq!(
"Callback returned an error",
Error::CallbackError.to_string()
);
assert_eq!(
"Callback returned an error",
Error::CallbackError.to_string()
);
} | rust_cleaned_test_functions.jsonl/115373 | {
"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,
2346,
3904,
368,
341,
286,
2060,
10714,
33673,
310,
330,
7494,
5927,
458,
1465,
756,
310,
4600,
486,
7494,
1454,
2389,
3904,
741,
286,
1439,
286,
2060,
10714,
33673,
310,
330,
7494,
5927,
458,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bool() {
test_parse_err::<bool>(&[
("t", "EOF while parsing a value at line 1 column 1"),
("truz", "expected ident at line 1 column 4"),
("f", "EOF while parsing a value at line 1 column 1"),
("faz", "expected ident at line 1 column 3"),
("truea"... | rust_cleaned_test_functions.jsonl/29828 | {
"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,
21039,
22159,
368,
341,
262,
1273,
21039,
9266,
27638,
2641,
44784,
9640,
286,
3489,
83,
497,
330,
23483,
1393,
22314,
264,
897,
518,
1555,
220,
16,
3250,
220,
16,
4461,
286,
3489,
376,
5197,
49... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_storage_insert_get() {
let mut storage = Storage::new(8);
let alice_ref = storage.insert("alice", (1, 3.0, "Alice".to_string()));
assert_eq!(*storage.get(alice_ref), (1, 3.0, "Alice".to_string()));
assert_eq!(*storage.get_by_name("alice").unwrap().0, (1,... | rust_cleaned_test_functions.jsonl/19584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23310,
17678,
3062,
368,
341,
286,
1077,
5206,
5819,
284,
14693,
486,
931,
7,
23,
317,
1789,
286,
1077,
70433,
7793,
284,
5819,
7030,
445,
63195,
497,
320,
16,
11,
220,
18,
13,
15,
11,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_behavior_previously_stuck() {
// any stake accounts activated and deactivated at the same epoch
do_test(
OldDeactivationBehavior::Stuck,
&[
StakeActivationStatus::default(),
StakeAct... | rust_cleaned_test_functions.jsonl/15340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
74540,
10442,
18281,
1261,
1942,
368,
341,
310,
442,
894,
18279,
9618,
21985,
323,
83616,
518,
279,
1852,
16342,
198,
39865,
310,
653,
4452,
1006,
394,
10621,
1912,
23002,
22753,
486,
623,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_close_enough() {
let zh = hash::ZERO_HASH;
// empty check
assert_eq!(close_enough(&vec![], 0), None);
// just 1 locator in history
let heights: Vec<u64> = vec![64, 62, 58, 50, 34, 2, 0];
let history_locator: Vec<(u64, Hash)> = vec![(0, zh.clone())];
let mut locator: Vec<(u64, Has... | rust_cleaned_test_functions.jsonl/32008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12704,
6205,
1384,
368,
341,
197,
10217,
59748,
284,
5175,
486,
73956,
32309,
401,
197,
197,
322,
4287,
1779,
198,
197,
6948,
10714,
10297,
5552,
6205,
1384,
2099,
4083,
0,
12995,
220,
15,
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... | 7 |
#[test]
fn test_aes_siv_ciphertext_modifications() {
let key_str =
"000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f00112233445566778899aabbccddeefff0f1f2f3f4f5f6f7f8f9fafbfcfdfeff";
let key = hex::decode(key_str).unwrap();
let aad = b"Additional data";
let a = tink_daea... | rust_cleaned_test_functions.jsonl/131304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90958,
643,
344,
666,
45043,
7480,
7029,
368,
341,
262,
1077,
1376,
2895,
4035,
286,
330,
15,
15,
15,
16,
15,
17,
15,
18,
15,
19,
15,
20,
15,
21,
15,
22,
15,
23,
15,
24,
15,
64,
15,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_copy4() {
use ndshape::ConstShape4u32;
let src_shape = ConstShape4u32::<10, 11, 12, 13>;
const SRC_SIZE: usize = 10 * 11 * 12 * 13;
let src = [1; SRC_SIZE];
let dst_shape = ConstShape4u32::<11, 12, 13, 14>;
const DST_SIZE: usize = 11 * 12 * 13 * 14;
let mut dst = [0... | rust_cleaned_test_functions.jsonl/85383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 530
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16096,
19,
368,
341,
262,
990,
15581,
12231,
486,
19167,
12301,
19,
84,
18,
17,
401,
262,
1077,
2286,
13597,
284,
24522,
12301,
19,
84,
18,
17,
27638,
16,
15,
11,
220,
16,
16,
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... | 6 |
#[test]
fn test_numbers_2() {
let s = to_chars("01234");
let cur = &mut 0;
expect_next_token(&s, cur, Token::Illegal);
} | rust_cleaned_test_functions.jsonl/21024 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32964,
62,
17,
368,
341,
286,
1077,
274,
284,
311,
37418,
445,
15,
16,
17,
18,
19,
797,
286,
1077,
2847,
284,
609,
6984,
220,
15,
280,
286,
1720,
11257,
6458,
2099,
82,
11,
2847,
11,
9660,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_entropy() {
let entropy = |x: Pareto| x.entropy().unwrap();
test_case(0.1, 0.1, -11.0, entropy);
test_case(1.0, 1.0, -2.0, entropy);
test_case(10.0, 10.0, -1.1, entropy);
test_case(3.0, 1.0, -2.0 - 3f64.ln(), entropy);
test_case(1.0, 3.0, -4.0/3.0 ... | rust_cleaned_test_functions.jsonl/18750 | {
"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,
50374,
368,
341,
286,
1077,
47502,
284,
760,
87,
25,
74185,
983,
91,
856,
13,
49150,
1005,
15454,
543,
286,
1273,
19096,
7,
15,
13,
16,
11,
220,
15,
13,
16,
11,
481,
16,
16,
13,
15,
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_option_encode_some() {
let o1: Option<u8> = Some(0);
let o2: Option<u8> = Some(13);
let o3: Option<u8> = Some(0xFF);
let o4: Option<u64> = Some(13);
let o5: Option<u64> = Some(0x1FF);
let o6: Option<u64> = Some(0xFFFFFFFFFFFFFFFF);
let o7: ... | rust_cleaned_test_functions.jsonl/21858 | {
"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,
9672,
11224,
61855,
368,
341,
286,
1077,
297,
16,
25,
6959,
34837,
23,
29,
284,
4329,
7,
15,
317,
286,
1077,
297,
17,
25,
6959,
34837,
23,
29,
284,
4329,
7,
16,
18,
317,
286,
1077,
297,
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_simple_transaction() {
let sapling = sapling_bls12::SAPLING.clone();
let spender_key = SaplingKey::generate_key(sapling.clone());
let receiver_key = SaplingKey::generate_key(sapling.clone());
let spender_address = spender_key.generate_public_address();
let receiver_address = ... | rust_cleaned_test_functions.jsonl/58437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
28884,
368,
341,
262,
1077,
34635,
2718,
284,
34635,
2718,
880,
4730,
16,
17,
486,
50,
2537,
74115,
15997,
543,
262,
1077,
83888,
3097,
284,
80175,
2718,
1592,
486,
19366,
3097,
1141,
391,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_row_group_metadata_thrift_conversion() {
let schema_descr = get_test_schema_descr();
let mut columns = vec![];
for ptr in schema_descr.columns() {
let column = ColumnChunkMetaData::builder(ptr.clone()).build().unwrap();
columns.push(column);
... | rust_cleaned_test_functions.jsonl/82557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8530,
6288,
22220,
5854,
41380,
64132,
368,
341,
286,
1077,
10802,
64622,
284,
633,
4452,
25371,
64622,
1428,
286,
1077,
5206,
8147,
284,
7486,
0,
15078,
286,
369,
10087,
304,
10802,
64622,
21153,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_de_single_str_bugs() {
let s = "{\"name\": \"my-awesome-package\",\"version\": \"1.0.0\",\"bugs\": \"https://example.com\"}";
let package = Package::from_str(s).unwrap();
} | rust_cleaned_test_functions.jsonl/7116 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
19487,
2895,
880,
13299,
368,
341,
262,
1077,
274,
284,
54734,
606,
11693,
7245,
2408,
28524,
44135,
34333,
4366,
11693,
7245,
16,
13,
15,
13,
15,
34333,
56176,
11693,
7245,
2428,
1110,
8687... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rotate_line() {
let line0 = Line::from([(0., 0.), (0., 2.)]);
let line1 = Line::from([(1., 1.), (-1., 1.)]);
assert_relative_eq!(line0.rotate(90.0), line1);
} | rust_cleaned_test_functions.jsonl/49665 | {
"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,
60834,
6528,
368,
341,
286,
1077,
1555,
15,
284,
7083,
486,
1499,
58590,
15,
2572,
220,
15,
24389,
320,
15,
2572,
220,
17,
6138,
2558,
286,
1077,
1555,
16,
284,
7083,
486,
1499,
58590,
16,
257... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_edit() {
let mut test_env = TestEnvironment::default();
test_env.jj_cmd_success(test_env.env_root(), &["init", "repo", "--git"]);
let repo_path = test_env.env_root().join("repo");
std::fs::write(repo_path.join("file1"), "a\n").unwrap();
std::fs::write(repo_path.join("file2")... | rust_cleaned_test_functions.jsonl/53455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13156,
368,
341,
262,
1077,
5206,
1273,
15879,
284,
3393,
12723,
486,
2258,
543,
262,
1273,
15879,
1169,
73,
11684,
18632,
8623,
15879,
9265,
12993,
1507,
609,
1183,
2327,
497,
330,
23476,
497,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_space() {
let mut reader = Reader::init("x");
let error = space(&mut reader).err().unwrap();
assert_eq!(error.pos, Pos { line: 1, column: 1 });
assert_eq!(reader.state.cursor, 1);
let mut reader = Reader::init(" ");
assert_eq!(
space(... | rust_cleaned_test_functions.jsonl/119569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14663,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
2327,
445,
87,
797,
286,
1077,
1465,
284,
3550,
2099,
6984,
6604,
568,
615,
1005,
15454,
543,
286,
2060,
10714,
10297,
841,
13006,
11,
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_calc_ok() {
assert_eq!(calc("2".to_string(), false).unwrap(), 2);
assert_eq!(calc("+3".to_string(), false).unwrap(), 3);
assert_eq!(calc("2 + 3".to_string(), false).unwrap(), 5);
assert_eq!(calc("2 + 3 * 4".to_string(), false).unwrap(), 14);
assert_eq!(cal... | rust_cleaned_test_functions.jsonl/2814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 791
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38241,
19817,
368,
341,
286,
2060,
10714,
10297,
26586,
445,
17,
3263,
983,
3904,
1507,
895,
568,
15454,
1507,
220,
17,
317,
286,
2060,
10714,
10297,
26586,
34973,
18,
3263,
983,
3904,
1507,
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_get_nibble() {
let hash = b"hello".test_only_hash();
assert_eq!(hash.get_nibble(0), Nibble::from(3));
assert_eq!(hash.get_nibble(1), Nibble::from(3));
assert_eq!(hash.get_nibble(2), Nibble::from(3));
assert_eq!(hash.get_nibble(3), Nibble::from(8));
... | rust_cleaned_test_functions.jsonl/85912 | {
"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,
3062,
1089,
82418,
368,
341,
286,
1077,
5175,
284,
293,
1,
14990,
3263,
1944,
18410,
8950,
543,
286,
2060,
10714,
10297,
8296,
670,
1089,
82418,
7,
15,
701,
451,
82418,
486,
1499,
7,
18,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sandbox_oom() {
use rustwide::cmd::CommandError;
runner::run("out-of-memory", |run| {
let res = run.build(
SandboxBuilder::new()
.enable_networking(false)
.memory_limit(Some(512 * 1024 * 1024)),
|build| {
bu... | rust_cleaned_test_functions.jsonl/74699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
31536,
62,
4191,
368,
341,
262,
990,
23071,
9150,
486,
8710,
486,
4062,
1454,
401,
262,
22259,
486,
6108,
445,
411,
8668,
64096,
497,
760,
6108,
91,
341,
286,
1077,
592,
284,
1598,
13239,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_character() {
let querier = new_valid_db("get_character.db");
let got_character = querier.get_character("Test_Character");
assert_eq!(got_character, common_character());
} | rust_cleaned_test_functions.jsonl/107698 | {
"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,
40988,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
455,
40988,
7076,
3071,
286,
1077,
2684,
40988,
284,
29134,
1268,
670,
40988,
445,
2271,
84529,
797,
286,
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 |
#[test]
fn test_same_module_struct_resolution() {
let allocator = Arena::new();
let vm_cache = VMModuleCache::new(&allocator);
let code = "
modules:
module M1 {
struct X {}
struct T { i: u64, x: Self.X }
}
script:
main() {
... | rust_cleaned_test_functions.jsonl/22994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33574,
10750,
15126,
39849,
368,
341,
262,
1077,
43655,
284,
27047,
486,
931,
543,
262,
1077,
10995,
11529,
284,
17792,
3332,
8233,
486,
931,
2099,
57631,
626,
262,
1077,
2038,
284,
6228,
286,
134... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut pt = PathTransformer::new();
assert_eq!(pt.to_dist(Path::new("C:/a")).unwrap(), "/prefix/disk-C/a");
assert_eq!(pt.to_dist(Path::new(r#"C:\a\b.c"#)).unwrap(), "/prefix/disk-C/a/b.c");
assert_eq!(pt.to_dist(Path::new("X:/other.c")).unwrap(), "/pre... | rust_cleaned_test_functions.jsonl/129911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
286,
1077,
5206,
10817,
284,
7933,
46358,
486,
931,
543,
286,
2060,
10714,
10297,
417,
2389,
16031,
33030,
486,
931,
445,
34,
14375,
64,
15197,
15454,
1507,
3521,
11849,
3446,
318... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_substr_cmp() {
// Test case with empty first string.
assert_eq!(substr_cmp(b"", b"abc"), true);
// Test normal cases.
for b in 0..=u8::MAX {
let buf = vec![b];
match b {
b'a' => { assert_eq!(substr_cmp(&buf, b"abc"), true); ... | rust_cleaned_test_functions.jsonl/99568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 766
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83578,
35193,
368,
341,
286,
442,
3393,
1142,
448,
4287,
1156,
914,
624,
286,
2060,
10714,
10297,
28614,
35193,
1883,
56323,
293,
1,
13683,
3975,
830,
317,
286,
442,
3393,
4622,
5048,
624,
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... | 5 |
#[test]
fn test_spatial_moments() {
let points = [
(53.0, 19.0),
(52.0, 20.0),
(49.0, 20.0),
(48.0, 21.0),
(47.0, 21.0),
(46.0, 22.0),
(45.0, 22.0),
(44.0, 23.0),
(43.0, 23.0),
(42.0, ... | rust_cleaned_test_functions.jsonl/116540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
32414,
717,
316,
805,
368,
341,
286,
1077,
3501,
284,
2278,
310,
320,
20,
18,
13,
15,
11,
220,
16,
24,
13,
15,
1326,
310,
320,
20,
17,
13,
15,
11,
220,
17,
15,
13,
15,
1326,
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_extend_bitflags() {
let src_code = quote! {
#[ubx_extend_bitflags]
#[ubx(from, rest_reserved)]
bitflags! {
#[doc = "Navigation Status Flags"]
pub struct Test: u8 {
#[doc = "position and velocity valid and within DOP and ACC Mask... | rust_cleaned_test_functions.jsonl/16497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
13996,
11161,
368,
341,
262,
1077,
2286,
4136,
284,
12641,
0,
341,
286,
11506,
392,
87,
70265,
13996,
11161,
921,
286,
11506,
392,
87,
17016,
11,
2732,
74913,
5563,
286,
2699,
11161,
0,
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_for_loop_parenthesis_expressions() {
let input = "
FOR I=(1+2)TO(2+3)STEP(1+0)
PRINT I
NEXT
";
assert_prints!(input, "3", "4", "5");
} | rust_cleaned_test_functions.jsonl/64164 | {
"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,
5478,
17198,
620,
9151,
13189,
2702,
39873,
368,
341,
262,
1077,
1946,
284,
6228,
262,
4613,
358,
4539,
16,
10,
17,
8,
5207,
7,
17,
10,
18,
8,
50389,
7,
16,
10,
15,
340,
286,
35893,
358,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_struct_array_from() {
let boolean_data = ArrayData::builder(DataType::Boolean)
.len(4)
.add_buffer(Buffer::from([12_u8]))
.build();
let int_data = ArrayData::builder(DataType::Int32)
.len(4)
.add_buffer(Buffer::from([42,... | rust_cleaned_test_functions.jsonl/11633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
3858,
5673,
368,
341,
286,
1077,
2710,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
6890,
340,
310,
659,
2892,
7,
19,
340,
310,
659,
718,
7776,
55574,
486,
1499,
2561,
16,
17,
7300,
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_map_consuming() {
let h = hlist![9000, "joe", 41f32];
let mapped = h.map(hlist![|n| n + 1, |s| s, |f| f + 1f32]);
assert_eq!(mapped, hlist![9001, "joe", 42f32]);
} | rust_cleaned_test_functions.jsonl/24759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
3382,
61117,
368,
341,
286,
1077,
305,
284,
305,
1607,
20703,
24,
15,
15,
15,
11,
330,
73,
4644,
497,
220,
19,
16,
69,
18,
17,
935,
286,
1077,
23844,
284,
305,
4770,
3203,
1607,
20703,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fail() {
let s = "
# syntax error
scalar
key: [1, 2]]
key1:a2
";
assert!(YamlLoader::load_from_str(s).is_err());
assert!(try_fail(s).is_err());
} | rust_cleaned_test_functions.jsonl/4321 | {
"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,
22121,
368,
341,
286,
1077,
274,
284,
6228,
2,
19482,
1465,
198,
35342,
198,
792,
25,
508,
16,
11,
220,
17,
14288,
792,
16,
43833,
17,
198,
876,
286,
2060,
10297,
56,
9467,
9181,
486,
1078,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_from_seed_with_derivation_path_maintnet() {
let out_dir = std::env::var("OUT_DIR").unwrap();
let mut jscontext = JavaScript::new(format!("{}/xpring.js", out_dir))?;
let wallet = from_seed(
&mut jscontext,
"snYP7oArxKepd3GPDcrjMsJYiJeJB".to_owned(),... | rust_cleaned_test_functions.jsonl/118742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 311
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
33809,
6615,
35345,
39127,
2638,
717,
1641,
4711,
368,
341,
286,
1077,
700,
4334,
284,
1460,
486,
3160,
486,
947,
445,
3656,
8291,
1827,
15454,
543,
286,
1077,
5206,
6994,
2147,
284,
12914,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unknown_causetId() {
let mut cc = ConjoiningGerunds::default();
let schemaReplicant = SchemaReplicant::default();
let knownCauset = KnownCauset::for_schemaReplicant(&schemaReplicant);
cc.apply_parsed_TuringString(knownCauset, TuringString {
source: No... | rust_cleaned_test_functions.jsonl/32584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57507,
666,
11855,
295,
764,
368,
341,
286,
1077,
5206,
12527,
284,
1200,
65205,
65397,
42950,
486,
2258,
543,
286,
1077,
10802,
18327,
35237,
284,
12539,
18327,
35237,
486,
2258,
543,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eat_hex_int() {
let input = "0x05";
let expected = vec![Token::Int(5.into())];
let mut lexer = Lexer::new(input);
for token in expected.into_iter() {
let got = lexer.next_token().unwrap();
assert_eq!(got, token);
}
} | rust_cleaned_test_functions.jsonl/72662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
266,
32655,
4042,
368,
341,
262,
1077,
1946,
284,
330,
15,
87,
15,
20,
3302,
262,
1077,
3601,
284,
7486,
20703,
3323,
486,
1072,
7,
20,
39860,
2140,
935,
262,
1077,
5206,
53259,
284,
850... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_split_last() {
let mut a = vec![11];
let b: &[i32] = &[];
assert!(b.split_last().is_none());
assert_eq!(a.split_last(), Some((&11, b)));
a = vec![11, 12];
let b: &[_] = &[11];
assert_eq!(a.split_last(), Some((&12, b)));
} | rust_cleaned_test_functions.jsonl/12852 | {
"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,
17052,
12195,
368,
341,
262,
1077,
5206,
264,
284,
7486,
20703,
16,
16,
935,
262,
1077,
293,
25,
44590,
72,
18,
17,
60,
284,
609,
15078,
262,
2060,
10297,
65,
5289,
12195,
1005,
285,
31488,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_queen_moves() {
let position =
&Position::from_fen("rnbqkbnr/pppppppp/8/8/8/8/PPP1PPPP/RNBQKBNR w").unwrap();
let mut list = MoveVec::new();
let capture_mask = position.bb_side(position.state().stm.flip());
let push_mask = position.bb_empty();
... | rust_cleaned_test_functions.jsonl/69358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47342,
268,
45390,
368,
341,
286,
1077,
2309,
4035,
310,
609,
3812,
486,
1499,
761,
268,
445,
81,
18080,
80,
74,
11081,
81,
87146,
602,
602,
602,
14,
23,
14,
23,
14,
23,
14,
23,
14,
97252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repo_update() {
let tmpdir = setup("git_repo_update");
let tarball = tmpdir.mash("../../alpine-base.tgz");
assert!(sys::remove_all(&tmpdir).is_ok());
assert_eq!(git::is_repo(&tmpdir), false);
assert!(git::Repo::new(&tmpdir).unwrap().url("https://github.co... | rust_cleaned_test_functions.jsonl/114254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37784,
8882,
368,
341,
286,
1077,
4174,
3741,
284,
6505,
445,
12882,
37784,
8882,
797,
286,
1077,
12183,
3959,
284,
4174,
3741,
744,
988,
36800,
278,
38038,
30013,
734,
46589,
797,
286,
2060,
1029... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accounts_clean_after_snapshot_restore_then_old_revives() {
solana_logger::setup();
let old_lamport = 223;
let zero_lamport = 0;
let no_data = 0;
let dummy_lamport = 999_999;
let owner = AccountSharedData::default().owner;
let account = Acc... | rust_cleaned_test_functions.jsonl/37793 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1968
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
19573,
19844,
53265,
62677,
68367,
21108,
38082,
1886,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2310,
907,
309,
403,
284,
220,
17,
17,
18,
280,
286,
1077,
7168,
907,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pipein_synthesizes() {
let mut uut = rust_hdl_synth::TopWrap::new(PipeIn::new(0x80));
uut.uut.ok1.connect();
uut.connect_all();
rust_hdl_synth::yosys_validate("pipein", &generate_verilog(&uut)).unwrap();
} | rust_cleaned_test_functions.jsonl/55824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41862,
258,
51393,
6375,
4756,
368,
341,
262,
1077,
5206,
575,
332,
284,
23071,
66154,
643,
45809,
486,
5366,
26787,
486,
931,
5304,
3444,
641,
486,
931,
7,
15,
87,
23,
15,
1106,
262,
575,
332... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pool_swap_with_fees() {
let one_near = 10u128.pow(24);
let mut context = VMContextBuilder::new();
context.predecessor_account_id(accounts(0));
testing_env!(context.build());
let mut pool = SimplePool::new(0, vec![accounts(1), accounts(2)], 100, 100, 0);
... | rust_cleaned_test_functions.jsonl/90752 | {
"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,
15709,
40991,
6615,
761,
5516,
368,
341,
286,
1077,
825,
76340,
284,
220,
16,
15,
84,
16,
17,
23,
25290,
7,
17,
19,
317,
286,
1077,
5206,
2266,
284,
17792,
1972,
3297,
486,
931,
543,
286,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.