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_mmap_region_build() {
let a = Arc::new(TempFile::new().unwrap().into_file());
let prot = libc::PROT_READ | libc::PROT_WRITE;
let flags = libc::MAP_NORESERVE | libc::MAP_PRIVATE;
let offset = 4096;
let size = 1000;
// Offset + size will overflow.
... | rust_cleaned_test_functions.jsonl/39 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
2186,
20627,
20801,
368,
341,
286,
1077,
264,
284,
19689,
486,
931,
75387,
1703,
486,
931,
1005,
15454,
1005,
18122,
2458,
5231,
286,
1077,
1724,
284,
42142,
486,
9117,
51,
13117,
760,
42142,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serde_pubkey() {
let ElGamalKeypair { public, secret: _ } = ElGamalKeypair::new_rand();
let encoded = bincode::serialize(&public).unwrap();
let decoded: ElGamalPubkey = bincode::deserialize(&encoded).unwrap();
assert_eq!(public, decoded);
} | rust_cleaned_test_functions.jsonl/36655 | {
"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,
75861,
450,
34014,
792,
368,
341,
286,
1077,
3984,
78884,
278,
6608,
1082,
1310,
314,
584,
11,
6234,
25,
716,
335,
284,
3984,
78884,
278,
6608,
1082,
1310,
486,
931,
33864,
1428,
286,
1077,
2049... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() -> TestResult {
let p = polar();
p.load_str(
r#"f(1);
f(2);
g(1);
g(2);
h(2);
k(x) if f(x) and h(x) and g(x);"#,
)?;
qnull(&p, "k(1)");
qeval(&p, "k(2)");
qnull(&p, "k(3)");
qvar(&p, "k(a)", "a... | rust_cleaned_test_functions.jsonl/68088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31708,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
7,
16,
317,
1843,
282,
7,
17,
317,
1843,
342,
7,
16,
317,
1843,
342,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_escaped_backslash_char() {
assert_eq!(
apply(
r#"
'\\' +
"#
.trim()
),
Ok(vec![
Token::Char(span(1, 1, "'\\\\'")),
Token::Symbol(span(1, 6, "+"))
])
)
} | rust_cleaned_test_functions.jsonl/27570 | {
"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,
62,
65826,
3895,
50256,
9232,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
1006,
394,
435,
2,
698,
6,
3422,
6,
3610,
1,
4956,
503,
659,
10666,
741,
310,
2837,
310,
7622,
25592,
90515,
394,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let x =
b"ACGTATCATAGACCCTAGATAGGGTTGTGTAGATGATCCACAGACGTATCATAGATTAGATAGGGTTGTGTAGATGATTCC\
ACAG";
let y = *x;
compare_to_full_alignment_local(x, &y);
compare_to_full_alignment_global(x, &y);
compare_to_full_alignment_semiglob... | rust_cleaned_test_functions.jsonl/126726 | {
"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,
33574,
368,
341,
286,
1077,
856,
4035,
310,
293,
1,
1706,
25388,
828,
28196,
1890,
29442,
1162,
1890,
828,
1890,
22254,
14903,
25388,
25388,
1890,
828,
38,
828,
3706,
1706,
1890,
1706,
25388,
828,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_init_wizard() -> Result<(), Error> {
let server = test::Server::new()?;
assert!(Path::new(&server.wg_conf_path()).exists());
Ok(())
} | rust_cleaned_test_functions.jsonl/15775 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
1670,
13722,
368,
1464,
5714,
68843,
4600,
29,
341,
1789,
286,
1077,
3538,
284,
1273,
486,
5475,
486,
931,
368,
69493,
286,
2060,
10297,
1820,
486,
931,
2099,
4030,
1418,
70,
16059,
2638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sg_map_range_mut_panic_1() {
let mut map = SgMap::<usize, usize, DEFAULT_CAPACITY>::new();
map.insert(3, 3);
map.insert(5, 5);
map.insert(8, 8);
let _bad_range = map.range_mut((Included(&8), Included(&3)));
} | rust_cleaned_test_functions.jsonl/18662 | {
"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,
76318,
5376,
9698,
29523,
620,
31270,
62,
16,
368,
341,
262,
1077,
5206,
2415,
284,
328,
70,
2227,
27638,
51878,
11,
22301,
11,
11955,
92153,
6831,
931,
543,
262,
2415,
7030,
7,
18,
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... | 1 |
#[test]
fn test_recover_pk() {
let message = "test message";
let sig = "d9tibmnic9t5y41hg7hkakdcra94akas9ku3rmmj4ag9mritc8ok4p5qzefs78c9pqfhpuftqqzhydbdwfg7u6w6wdxcqpqn4sj4e73e";
let pk = recover_pk(message.as_bytes(), sig);
assert_eq!(pk.unwrap(), PublicKey::from_secret_key(&Se... | rust_cleaned_test_functions.jsonl/74468 | {
"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,
1288,
3688,
33321,
368,
341,
286,
1077,
1943,
284,
330,
1944,
1943,
876,
286,
1077,
8366,
284,
330,
67,
24,
83,
579,
76,
11590,
24,
83,
20,
88,
19,
16,
66602,
22,
85511,
585,
7628,
956,
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_add_stake_dispatch_info_ok() {
new_test_ext().execute_with(|| {
let account_id = 0;
let stake = 5000;
let call = Call::Subtensor(SubtensorCall::add_stake(account_id, stake));
assert_eq!(call.get_dispatch_info(), DispatchInfo {
weight: 0,
class: DispatchClass::Normal,
pays... | rust_cleaned_test_functions.jsonl/17148 | {
"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,
2891,
1261,
726,
42991,
3109,
19817,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
10217,
2692,
842,
284,
220,
15,
280,
197,
10217,
18279,
284,
220,
20,
15,
15,
15,
280,
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_to_packets() {
let keypair = Keypair::new();
let hash = Hash::new(&[1; 32]);
let tx = Transaction::system_new(&keypair, keypair.pubkey(), 1, hash);
let rv = to_packets(&vec![tx.clone(); 1]);
assert_eq!(rv.len(), 1);
assert_eq!(rv[0].read().unwrap()... | rust_cleaned_test_functions.jsonl/89211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
63569,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5175,
284,
6531,
486,
931,
2099,
58,
16,
26,
220,
18,
17,
2558,
286,
1077,
9854,
284,
17869,
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_parse() {
let expected = vec![
Direction::Forward(5),
Direction::Down(5),
Direction::Forward(8),
Direction::Up(3),
Direction::Down(8),
Direction::Forward(2),
];
let dirs = Direction::from_lines(INPUT)... | rust_cleaned_test_functions.jsonl/53309 | {
"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,
21039,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
18904,
486,
25925,
7,
20,
1326,
310,
18904,
486,
4454,
7,
20,
1326,
310,
18904,
486,
25925,
7,
23,
1326,
310,
18904,
486,
2324,
7,
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_inline_this() {
test(
concat!(
"/** @constructor */",
"function C() {}",
"",
"C.prototype.m = function() {",
" var self = this;",
" if (true) {",
" alert(self);",
" }",
"... | rust_cleaned_test_functions.jsonl/27707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41871,
24868,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
3521,
334,
569,
21846,
639,
756,
310,
330,
1688,
356,
368,
4687,
756,
310,
8324,
310,
330,
34,
6003,
744,
284,
729,
368,
314,
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_chain_insert_delete() {
let base_rope: Rope = vec![0, 1, 2, 3].into();
let mut delta_builder = DeltaBuilder::new(base_rope.len());
delta_builder.replace(0..0, Into::<Rope>::into(vec![5, 6, 7]).into_node());
let insertion = delta_builder.build();
let mid_ro... | rust_cleaned_test_functions.jsonl/10026 | {
"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,
30583,
17678,
11353,
368,
341,
286,
1077,
2331,
26608,
375,
25,
97896,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
936,
18122,
543,
286,
1077,
5206,
9477,
28532,
284,
24957,
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_address_resolution() {
// Test a basic ARP resolution scenario with both sides participating.
// We expect the following steps:
// ARP request and set a request retry timer.
// layer is notified of the resolution.... | rust_cleaned_test_functions.jsonl/16997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1643
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6744,
39849,
368,
341,
286,
442,
3393,
264,
6770,
91337,
10935,
15048,
448,
2176,
11067,
23528,
624,
286,
442,
1205,
1720,
279,
2701,
7354,
510,
1789,
286,
442,
262,
91337,
1681,
323,
738,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_lambda() {
let ref a = parse_expr("|a: i32| let a = 1; let b = 1; a").unwrap();
let ref b = parse_expr("|a: i32| let a = 1; let c = 1; a").unwrap();
assert_eq!(ExprHash::from(a).unwrap(), ExprHash::from(b).unwrap());
} | rust_cleaned_test_functions.jsonl/103360 | {
"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,
51884,
368,
341,
262,
1077,
2053,
264,
284,
4715,
21915,
38547,
64,
25,
600,
18,
17,
91,
1077,
264,
284,
220,
16,
26,
1077,
293,
284,
220,
16,
26,
264,
1827,
15454,
543,
262,
1077,
2053,
293... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_synth() {
let mut rng = XorShiftRng::from_seed([0x3dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0654]);
let window_size = 4;
let mut assignment = vec![Fr::zero(); 1 << window_size];
let constants: Vec<_> = (0..(1 << window_size)).map(|_| Fr::rand(&mut rng)).collect();... | rust_cleaned_test_functions.jsonl/66528 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
45809,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
18,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
18,
16,
18,
67,
22,
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... | 4 |
#[test]
fn test_decode_date_time() {
let buf = [11, 218, 7, 10, 17, 19, 27, 30, 1, 0, 0, 0];
let date1 = <NaiveDateTime as Decode<MySql>>::decode(Some(MySqlValue::Binary(&buf))).unwrap();
assert_eq!(date1.to_string(), "2010-10-17 19:27:30.000001");
let buf = [7, 218, 7, 10, 17, 19, 27, 30]... | rust_cleaned_test_functions.jsonl/18497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
4164,
3009,
368,
341,
1066,
262,
1077,
6607,
284,
508,
16,
16,
11,
220,
17,
16,
23,
11,
220,
22,
11,
220,
16,
15,
11,
220,
16,
22,
11,
220,
16,
24,
11,
220,
17,
22,
11,
220,
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_method_not_found() {
let io = IoHandler::new();
let request = r#"{"jsonrpc": "2.0", "method": "say_hello", "params": [42, 23], "id": 1}"#;
let response = r#"{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"},"id":1}"#;
assert_eq!(io.handle_request_sync(request), Some... | rust_cleaned_test_functions.jsonl/95532 | {
"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,
9032,
7913,
21480,
368,
341,
197,
10217,
6399,
284,
29655,
3050,
486,
931,
1428,
197,
10217,
1681,
284,
435,
55543,
4913,
2236,
29414,
788,
330,
17,
13,
15,
497,
330,
4393,
788,
330,
36790,
9672... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vertex_traversal_with_label_and_has_v2() {
let client = graph_serializer(GraphSON::V2);
drop_vertices(&client, "test_simple_vertex_traversal_with_label_and_has").unwrap();
let vertex = create_vertex_with_label(
&client,
"test_simple_vertex_traversal_with_labe... | rust_cleaned_test_functions.jsonl/26272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 750
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
26611,
3547,
45545,
6615,
6106,
8378,
21778,
2273,
17,
368,
341,
262,
1077,
2943,
284,
4771,
67441,
63779,
2703,
486,
53,
17,
626,
262,
5943,
37720,
2099,
2972,
11,
330,
1944,
30015,
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_version_sort_overwrite_by_timesort() {
let dir = tempdir();
dir.child("2").touch().unwrap();
dir.child("11").touch().unwrap();
cmd()
.arg("-v")
.arg("-t")
.arg("--ignore-config")
.arg(dir.path())
.assert()
.stdout(predicate::str::is... | rust_cleaned_test_functions.jsonl/639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9438,
18435,
15431,
4934,
3710,
22353,
371,
368,
341,
262,
1077,
5419,
284,
2730,
3741,
543,
262,
5419,
17531,
445,
17,
1827,
22020,
1005,
15454,
543,
262,
5419,
17531,
445,
16,
16,
1827,
22020,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_geq_same_num_digits_gt_true() {
// Given:
let a = Counter::from(vec![0, 1]);
let b = Counter::from(vec![0, 2]);
// Then:
assert!(b >= a);
} | rust_cleaned_test_functions.jsonl/79532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32933,
80,
33574,
4273,
41432,
37479,
16082,
368,
341,
310,
442,
16246,
510,
310,
1077,
264,
284,
19735,
486,
1499,
25592,
20703,
15,
11,
220,
16,
2558,
310,
1077,
293,
284,
19735,
486,
1499,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_to_vec() {
let data = Data {
base: "https://example.com".into(),
client_id: "adbc01234".into(),
client_secret: "0987dcba".into(),
redirect: "urn:ietf:wg:oauth:2.0:oob".into(),
token: "fedc5678".into(),
};
let v =... | rust_cleaned_test_functions.jsonl/39222 | {
"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,
2346,
13251,
368,
341,
286,
1077,
821,
284,
2885,
341,
310,
2331,
25,
330,
2428,
1110,
8687,
905,
3263,
18122,
3148,
310,
2943,
842,
25,
330,
329,
8904,
15,
16,
17,
18,
19,
3263,
18122,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_ascii() {
// always inlined on all archs
let strs = vec!["nyc", "statue", "liberty", "img_1234.png"];
for s in strs {
let compact = CompactString::new(s);
assert_eq!(compact, s);
assert_eq!(s, compact);
assert_eq!(compact.is_heap_allocated(), fa... | rust_cleaned_test_functions.jsonl/2780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
50238,
368,
341,
262,
442,
2677,
304,
15121,
389,
678,
5325,
82,
198,
262,
1077,
57584,
284,
7486,
0,
1183,
77,
3337,
497,
330,
9878,
361,
497,
330,
2740,
1344,
497,
330,
1892,
62,
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_introspection() {
let conn = PgConnection::establish(&TEST_DATABASE_URL)
.expect(&format!("Error connecting to {}", TEST_DATABASE_URL));
let seed_user = seed::user_journey(&conn);
let seed_token = seed::auth_token(&conn, seed_user);
let user = endpoin... | rust_cleaned_test_functions.jsonl/123717 | {
"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,
4042,
3630,
16076,
368,
341,
286,
1077,
4534,
284,
97265,
4526,
486,
33400,
2099,
10033,
45510,
8000,
340,
310,
659,
17119,
2099,
2243,
17223,
1454,
20913,
311,
24689,
13602,
45510,
8000,
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,
1... | 1 |
#[test]
fn test_publicationproperties_depth() {
let mut publication: Publication = Publication {
publication_type: PublicationType::Pdf,
depth_mm: Some(10.0),
..Default::default()
};
assert_eq!(
publication.dimension_error(),
Err(ThothError::DimensionDigitalEr... | rust_cleaned_test_functions.jsonl/46235 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
367,
13193,
19061,
368,
341,
262,
1077,
5206,
16599,
25,
56894,
284,
56894,
341,
286,
16599,
1819,
25,
56894,
929,
486,
67596,
345,
286,
7990,
35599,
25,
4329,
7,
16,
15,
13,
15,
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... | 1 |
#[test]
fn test_group_shares() {
let share1 = fake_share(1, vec![1]);
let share2 = fake_share(1, vec![2]);
let share3 = fake_share(2, vec![1]);
let grouped_shares = group_shares(Box::new(vec![share1, share2, share3].into_iter()));
assert_eq!(grouped_shares.get(&1).unwrap... | rust_cleaned_test_functions.jsonl/31393 | {
"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,
6288,
3712,
5403,
368,
341,
286,
1077,
4332,
16,
284,
12418,
38272,
7,
16,
11,
7486,
20703,
16,
2558,
286,
1077,
4332,
17,
284,
12418,
38272,
7,
16,
11,
7486,
20703,
17,
2558,
286,
1077,
4332,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vector_2() {
let address = "DdzFFzCqrht4it4GYgBp4J39FNnKBsPFejSppARXHCf2gGiTJcwXzpRvgDmxPvKQ8aZZmVqcLUz5L66a8Ja46pfKVtFRaKyn9eKdvpaC".parse().unwrap();
let public_key = XPub::from_bytes([
0xff, 0x7b, 0xf1, 0x29, 0x9d, 0xf3, 0xd7, 0x17, 0x98, 0xae, 0xfd, 0xc4, 0xae, 0x... | rust_cleaned_test_functions.jsonl/1894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
17,
368,
341,
286,
1077,
2621,
284,
330,
35,
37877,
1748,
89,
34,
23004,
426,
19,
275,
19,
41470,
70,
33,
79,
19,
41,
18,
24,
41604,
77,
29862,
82,
47,
6123,
73,
50,
602,
934,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_connect() {
let tmpdir = tempfile::tempdir().unwrap();
let path = format!("{}/socket", tmpdir.as_ref().to_str().unwrap());
let path1 = path.clone();
assert!(RemotePublisher::connect("a".repeat(16384)).is_err());
assert!(RemotePublisher::connect(&path).is_... | rust_cleaned_test_functions.jsonl/14259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 663
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
368,
341,
286,
1077,
4174,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
3561,
88928,
4472,
9556,
497,
4174,
3741,
5357,
7793,
1005,
983,
2895,
1005,
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... | 2 |
#[test]
fn test_get_device_name() {
if let Some(device) = test_get_default_device(Scope::Input) {
let name = get_device_name(device, DeviceType::INPUT).unwrap();
println!("input device name: {}", name.into_string());
} else {
println!("No input device.");
}
if let Some(d... | rust_cleaned_test_functions.jsonl/113812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9204,
1269,
368,
341,
262,
421,
1077,
4329,
17848,
8,
284,
1273,
3062,
9993,
9204,
3759,
2417,
486,
2505,
8,
341,
286,
1077,
829,
284,
633,
9204,
1269,
17848,
11,
13903,
929,
486,
29421,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_slice_2() {
let ss = "中华Việt Nam";
assert_eq!("华", ss.slice(3u, 6u));
assert_eq!("Việt Nam", ss.slice(6u, 16u));
assert_eq!("ab", "abc".slice(0u, 2u));
assert_eq!("bc", "abc".slice(1u, 3u));
assert_eq!("", "abc".slice(1u, 1u));
assert_eq... | rust_cleaned_test_functions.jsonl/2437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
62,
17,
368,
341,
286,
1077,
10870,
284,
330,
100849,
35544,
124382,
29974,
3302,
286,
2060,
10714,
17223,
85361,
497,
10870,
14530,
7,
18,
84,
11,
220,
21,
84,
1106,
286,
2060,
10714,
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_root_ns_meth_ret_nonpod() {
let hdr = indoc! {"
#include <cstdint>
#include <memory>
struct Bob {
uint32_t a;
};
namespace B {
struct C {
uint32_t a;
Bob daft() const { Bob bob; bob.a = 12; return... | rust_cleaned_test_functions.jsonl/9842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
34728,
717,
769,
21695,
21637,
39073,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
671,
997,
366,
96975,
397,
286,
671,
997,
366,
17269,
397,
286,
2036,
14261,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_0() {
let input = [].as_ref();
let count = 0usize;
assert_eq!(count, 0usize);
let offset = 0usize;
let result: crate::IResult<(&[u8], usize), usize> = take(count)((input, offset));
assert_eq!(result, Ok(((input, offset), 0)));
} | rust_cleaned_test_functions.jsonl/41245 | {
"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,
73261,
62,
15,
368,
341,
262,
1077,
1946,
284,
72375,
300,
7793,
543,
262,
1077,
1760,
284,
220,
15,
51878,
280,
262,
2060,
10714,
10297,
1830,
11,
220,
15,
51878,
317,
262,
1077,
4347,
284,
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_ln_pdf() {
let ln_pdf = |arg: DVector<_>| move |x: MultivariateNormal| x.ln_pdf(&arg);
test_case(vec![0., 0.], vec![1., 0., 0., 1.], (0.05854983152431917f64).ln(), ln_pdf(dvec![1., 1.]));
test_almost(vec![0., 0.], vec![1., 0., 0., 1.], (0.013064233284684921f64).ln(), 1e-1... | rust_cleaned_test_functions.jsonl/106558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 684
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60401,
39948,
368,
341,
286,
1077,
29390,
39948,
284,
760,
858,
25,
422,
3781,
32399,
69844,
3271,
760,
87,
25,
22162,
55422,
12206,
91,
856,
918,
77,
39948,
2099,
858,
317,
286,
1273,
19096,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bare_variant() {
// "TestUnit"
let bser_v2 = b"\x00\x02\x00\x00\x00\x00\x05\x0b\x00\x00\x00\x02\x03\x08TestUnit";
let decoded = from_slice::<BytestringVariant>(bser_v2).unwrap();
assert_eq!(decoded, BytestringVariant::TestUnit);
} | rust_cleaned_test_functions.jsonl/34066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
546,
46112,
368,
341,
262,
442,
330,
2271,
4562,
698,
262,
1077,
293,
799,
2273,
17,
284,
293,
11934,
87,
15,
15,
3462,
15,
17,
3462,
15,
15,
3462,
15,
15,
3462,
15,
15,
3462,
15,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_node_and_edges_undirected() {
let mut g = UnMatrix::new_undirected();
let a = g.add_node('a');
let b = g.add_node('b');
let c = g.add_node('c');
g.add_edge(a, b, ());
g.add_edge(b, c, ());
g.add_edge(c, a, ());
// removing a... | rust_cleaned_test_functions.jsonl/81967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
5084,
8378,
28026,
62,
1241,
74612,
368,
341,
286,
1077,
5206,
342,
284,
1230,
6689,
486,
931,
62,
1241,
74612,
543,
286,
1077,
264,
284,
342,
1364,
5084,
492,
64,
1157,
286,
1077,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_transaction_with_a_write_set_canonical_serialization_example() {
let input = RawTransaction::new_write_set(
AccountAddress::new([
0xc3, 0x39, 0x8a, 0x59, 0x9a, 0x6f, 0x3b, 0x9f, 0x30, 0xb6, 0x35, 0xaf, 0x29, 0xf2,
0xba, 0x04,
]),
32,
... | rust_cleaned_test_functions.jsonl/8054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 585
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
28884,
6615,
4306,
9165,
2602,
27421,
22391,
25602,
2022,
39304,
368,
341,
262,
1077,
1946,
284,
23022,
8070,
486,
931,
9165,
2602,
1006,
286,
8615,
4286,
486,
931,
8956,
310,
220,
15,
8148... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_range() {
let engine = TestEngineBuilder::new().build().unwrap();
for i in 1..7 {
// ts = 1: value = []
must_prewrite_put(&engine, &[i], &[], &[i], 1);
must_commit(&engine, &[i], 1, 1);
// ts = 7: value = [ts]
... | rust_cleaned_test_functions.jsonl/36639 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1742
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
1428,
1789,
286,
369,
600,
304,
220,
16,
496,
22,
341,
310,
442,
10591,
284,
220,
16,
25,
897,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pass_doesnt_produce_invalid_code1() {
test_same(concat!(
"function f(x = void 0) {",
" var z;",
" {",
" const y = {};",
" x && (y['x'] = x);",
" z = y;",
" }",
" return z;",
"}",
));
} | rust_cleaned_test_functions.jsonl/27592 | {
"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,
15464,
96374,
406,
2540,
13373,
31433,
4136,
16,
368,
341,
262,
1273,
33574,
96360,
33673,
286,
330,
1688,
282,
2075,
284,
737,
220,
15,
8,
314,
756,
286,
330,
220,
762,
1147,
64497,
286,
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_poc050_burn_from() {
let mut t = Token::deployed();
let amount = 5_000_000.into();
t.mint(t.bro, amount, Sender(t.futjin));
t.increase_allowance(t.futjin, 1.into(), Sender(t.bro));
t.burn_from(t.bro, 1.into(), Sender(t.futjin));
assert_eq!(t.balance_of(t.bro), 4_999_99... | rust_cleaned_test_functions.jsonl/39706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
509,
15,
20,
15,
880,
399,
5673,
368,
341,
262,
1077,
5206,
259,
284,
9660,
486,
35794,
291,
543,
262,
1077,
3311,
284,
220,
20,
62,
15,
15,
15,
62,
15,
15,
15,
39860,
1428,
262,
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_configure_system() {
let mut vmm = create_vmm_object(InstanceState::Uninitialized);
assert!(vmm.init_guest_memory().is_ok());
// test that we can do this any number of times we want.
assert!(vmm.init_guest_memory().is_ok());
assert!(vmm.vm.memory().is_s... | rust_cleaned_test_functions.jsonl/28158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75887,
17687,
368,
341,
286,
1077,
5206,
348,
3821,
284,
1855,
2273,
3821,
5314,
7,
8846,
486,
1806,
36161,
626,
286,
2060,
10297,
85,
3821,
8271,
62739,
19195,
1005,
285,
19817,
5231,
286,
442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concat_str() {
let a = "Hello";
let b = "World";
let c = format!("{} {}", a, b);
assert_eq!(c, "Hello World")
} | rust_cleaned_test_functions.jsonl/24893 | {
"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,
57478,
2895,
368,
341,
286,
1077,
264,
284,
330,
9707,
876,
286,
1077,
293,
284,
330,
10134,
876,
286,
1077,
272,
284,
3561,
17223,
6257,
24689,
264,
11,
293,
317,
286,
2060,
10714,
10297,
66,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_invert() {
assert!(Matrix4::<f64>::identity().invert().unwrap().is_identity());
assert!(C.invert().unwrap().approx_eq(&(
Matrix4::new( 5.0f64, -4.0f64, 1.0f64, 0.0f64,
-4.0f64, 8.0f64, -4.0f64, 0.0f64,
... | rust_cleaned_test_functions.jsonl/30172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
1621,
368,
341,
286,
2060,
10297,
6689,
19,
27638,
69,
21,
19,
6831,
16912,
1005,
83729,
1005,
15454,
1005,
285,
46244,
5231,
286,
2060,
10297,
34,
1858,
1621,
1005,
15454,
1005,
48053,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_root_grpc_to_oci() {
#[derive(Debug)]
struct TestData {
grpcroot: grpc::Root,
result: oci::Root,
}
let tests = &[
TestData {
// Default fields
grpcroot: grpc::Root {
..Default... | rust_cleaned_test_functions.jsonl/89912 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12993,
15682,
3992,
2346,
62,
2119,
368,
341,
286,
11506,
27098,
42618,
5563,
286,
2036,
93200,
341,
310,
47900,
2888,
25,
47900,
486,
8439,
345,
310,
1102,
25,
93975,
486,
8439,
345,
286,
555,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_put_u8() {
let mut buf = Vec::with_capacity(8);
buf.put_u8(33);
assert_eq!(b"\x21", &buf[..]);
} | rust_cleaned_test_functions.jsonl/51219 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15557,
7300,
23,
368,
341,
262,
1077,
5206,
6607,
284,
11312,
486,
4197,
35603,
7,
23,
317,
262,
6607,
3597,
7300,
23,
7,
18,
18,
317,
262,
2060,
10714,
10297,
65,
11934,
87,
17,
16,
497,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_failing_loader() {
let dir = create_dir_and_file("fake.fail");
let asset_server = setup(dir.path());
asset_server.add_loader(FailingLoader);
let path: AssetPath = "fake.fail".into();
let handle = asset_server.get_handle_untyped(path.get_id());
le... | rust_cleaned_test_functions.jsonl/3153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
14277,
22139,
368,
341,
286,
1077,
5419,
284,
1855,
4334,
8378,
2458,
445,
30570,
26738,
797,
286,
1077,
9329,
12015,
284,
6505,
14161,
3875,
1423,
286,
9329,
12015,
1364,
22139,
7832,
14277,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_augmentation_parse_just_signal_trampoline() {
let aug_str = &mut EndianSlice::new(b"S", LittleEndian);
let bases = Default::default();
let address_size = 8;
let section = EhFrame::new(&[], LittleEndian);
let input = &mut EndianSlice::new(&[], LittleEndian)... | rust_cleaned_test_functions.jsonl/9388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60411,
31099,
21039,
62,
4250,
21137,
92942,
368,
341,
286,
1077,
19303,
2895,
284,
609,
6984,
3972,
1103,
33236,
486,
931,
1883,
66310,
497,
14671,
43231,
317,
286,
1077,
23092,
284,
7899,
486,
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_virtio_write_config() {
let mut block = default_block();
let expected_config_space: [u8; CONFIG_SPACE_SIZE] =
[0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00];
block.write_config(0, &expected_config_space);
let mut actual_config_space = [0u8; CONFIG_... | rust_cleaned_test_functions.jsonl/73916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 526
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
9165,
5332,
368,
341,
286,
1077,
5206,
2504,
284,
1638,
7113,
1428,
286,
1077,
3601,
5332,
14663,
25,
508,
84,
23,
26,
13202,
38404,
4098,
60,
4035,
310,
508,
15,
87,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_insert_learner_that_is_voter() -> Result<()> {
let mut set = ProgressSet::new(default_logger());
let default_progress = Progress::new(0, 256);
let mut canary_progress = Progress::new(0, 256);
canary_progress.matched = CANARY;
set.insert_voter(1, default_pr... | rust_cleaned_test_functions.jsonl/48660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
62,
93595,
70197,
6892,
2273,
25392,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
738,
284,
16033,
1649,
486,
931,
18978,
27413,
1423,
286,
1077,
1638,
27200,
284,
16033,
486,
931,
7,
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_get_keyfile_name_succeeded() {
let mut path = dirs::home_dir().unwrap();
path.push(BLOCK_KEYPAIR_FILENAME);
assert_eq!(
path.into_os_string().into_string().unwrap(),
get_keyfile_name()
);
} | rust_cleaned_test_functions.jsonl/71225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
3097,
1192,
1269,
643,
43805,
368,
341,
286,
1077,
5206,
1815,
284,
42248,
486,
5117,
4334,
1005,
15454,
1428,
286,
1815,
2552,
5349,
8044,
6600,
82966,
45005,
317,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_init_sanity() {
let (init_result, deps) = init_helper(vec![InitialBalance {
address: HumanAddr("lebron".to_string()),
amount: Uint128(5000),
}]);
assert_eq!(init_result.unwrap(), InitResponse::default());
let config = ReadonlyConfig::from_... | rust_cleaned_test_functions.jsonl/69599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
643,
38270,
368,
341,
286,
1077,
320,
2327,
5287,
11,
48178,
8,
284,
2930,
10418,
25592,
20703,
6341,
21190,
341,
310,
2621,
25,
11097,
13986,
445,
273,
67457,
3263,
983,
3904,
14702,
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_should_panic_good_message() {
fn f() {
panic!("an error message");
}
let desc = TestDescAndFn {
desc: TestDesc {
name: StaticTestName("whatever"),
ignore: false,
should_panic: ShouldPanic::YesWithMess... | rust_cleaned_test_functions.jsonl/3485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43378,
620,
31270,
44781,
6462,
368,
341,
286,
5168,
282,
368,
341,
310,
21975,
17223,
276,
1465,
1943,
797,
286,
456,
286,
1077,
6560,
284,
3393,
11065,
3036,
24911,
341,
310,
6560,
25,
3393,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_op_parse_deref_type() {
// Doesn't matter for this test.
let encoding = encoding4();
check_op_parse(
|s| s.D8(constants::DW_OP_deref_type.0).D8(8).uleb(100),
&Operation::Deref {
base_type: UnitOffset(100),
size: 8,
... | rust_cleaned_test_functions.jsonl/45758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
21039,
814,
43970,
1819,
368,
341,
286,
442,
48832,
944,
4925,
369,
419,
1273,
624,
286,
1077,
11170,
284,
11170,
19,
1428,
286,
1779,
10287,
21039,
1006,
310,
760,
82,
91,
274,
909,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_complex() {
let mut list = List::new(FooAdaptor);
list.push_back(Rc::new(Foo::new(1)));
list.push_back(Rc::new(Foo::new(2)));
list.push_back(Rc::new(Foo::new(3)));
list.push_back(Rc::new(Foo::new(4)));
assert_eq!(list.pop_front().unwrap().value, 1... | rust_cleaned_test_functions.jsonl/68046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41522,
368,
341,
286,
1077,
5206,
1140,
284,
1759,
486,
931,
7832,
2624,
2589,
32657,
626,
286,
1140,
2552,
3895,
2785,
66,
486,
931,
7832,
2624,
486,
931,
7,
16,
4945,
286,
1140,
2552,
3895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_allow_invalid_timestamp() -> Result<()> {
let mut ctx = EvalContext::from(TimeEnv {
allow_invalid_date: true,
..TimeEnv::default()
});
let ok_cases = vec![
"2019-9-31 11:11:11",
"2019-0-1 11:11:11",
"2013-2-29 1... | rust_cleaned_test_functions.jsonl/40461 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 665
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55731,
31433,
23073,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
1499,
36968,
14359,
341,
310,
2138,
31433,
4164,
25,
830,
345,
310,
5241,
1462,
14359,
486,
2258,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_set_properties() {
let obj = Object::with_type(
SimpleObject::static_type(),
&[("construct-name", &"meh"), ("name", &"initial")],
)
.expect("Object::new failed");
assert_eq!(
obj.property::<String>("construct-name"),
... | rust_cleaned_test_functions.jsonl/9012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
25158,
368,
341,
286,
1077,
2839,
284,
3002,
486,
4197,
1819,
1006,
310,
8993,
1190,
486,
1978,
1819,
3148,
310,
44590,
445,
7596,
11494,
497,
609,
1,
76,
2636,
3975,
3489,
606,
497,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scope_variable_segment() {
let app = App::new()
.scope("/ab-{project}", |scope| {
scope.resource("/path1", |r| {
r.f(|r| {
HttpResponse::Ok()
.body(format!("project: {}", &r.match_info()["... | rust_cleaned_test_functions.jsonl/22444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23199,
14635,
28061,
368,
341,
286,
1077,
906,
284,
1845,
486,
931,
741,
310,
659,
4186,
4283,
370,
63347,
4987,
9545,
760,
4186,
91,
341,
394,
6891,
24013,
4283,
2343,
16,
497,
760,
81,
91,
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... | 2 |
#[test]
fn test_parsing_bitmasks_requiring_params_mem_access_no_param() {
let mut v = ZERO_BOUND_HEADER.to_vec();
v.append(&mut vec![0x3e, 0x00, 0x04, 0x00]); // OpStore
v.append(&mut vec![0x01, 0x00, 0x00, 0x00]); // pointer: 1
v.append(&mut vec![0x02, 0x00, 0x00, 0x00]); // obj... | rust_cleaned_test_functions.jsonl/85755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
13996,
76,
4604,
1288,
70094,
6745,
12976,
12759,
6536,
4090,
368,
341,
286,
1077,
5206,
348,
284,
54593,
73644,
20330,
2389,
13251,
543,
286,
348,
2057,
2099,
6984,
7486,
20703,
15,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multidim() {
let mut mat = ArcArray::zeros(2 * 3 * 4 * 5 * 6).reshape((2, 3, 4, 5, 6));
mat[(0, 0, 0, 0, 0)] = 22u8;
{
for (i, elt) in mat.iter_mut().enumerate() {
*elt = i as u8;
}
}
assert_eq!(mat.shape(), &[2, 3, 4, 5, 6]);
} | rust_cleaned_test_functions.jsonl/92612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
307,
318,
368,
341,
262,
1077,
5206,
5517,
284,
19689,
1857,
486,
35716,
7,
17,
353,
220,
18,
353,
220,
19,
353,
220,
20,
353,
220,
21,
568,
16137,
1188,
17,
11,
220,
18,
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... | 2 |
#[test]
fn test_payload_too_big() {
let p256dh = base64::decode_config(
"BLMaF9ffKBiWQLCKvTHb6LO8Nb6dcUh6TItC455vu2kElga6PQvUmaFyCdykxY2nOSSL3yKgfbmFLRTUaGv4yV8",
URL_SAFE,
)
.unwrap();
let auth = base64::decode_config("xS03Fj5ErfTNH_l9WHE9Ig", URL_SAFE).u... | rust_cleaned_test_functions.jsonl/94468 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32813,
2346,
78,
36386,
368,
341,
286,
1077,
281,
17,
20,
21,
30621,
284,
2331,
21,
19,
486,
18196,
5332,
1006,
310,
330,
9389,
29535,
37,
24,
542,
29862,
72,
54,
3588,
3021,
85,
3617,
65,
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_parse_concat_transform() {
let transform = match parse_concat_transform(FileSpan::new(Rc::new(String::from("ConcatTransform 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16")), Rc::new(String::from("input")))).unwrap().1 {
Transformation::ConcatTransform(t) => t,
_ => panic!()
};
... | rust_cleaned_test_functions.jsonl/68354 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
57478,
18449,
368,
341,
262,
1077,
5165,
284,
2432,
4715,
57478,
18449,
19821,
12485,
486,
931,
2785,
66,
486,
931,
2242,
486,
1499,
445,
78440,
8963,
220,
16,
220,
17,
220,
18,
220,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_nodes_to_subnet_succeeds() {
local_test_on_nns_subnet(|runtime| {
async move {
let num_nodes_in_subnet = 4 as usize;
let num_unassigned_nodes = 4 as usize;
let (init_mutate, subnet_id, unassigned_node_ids, _) =
common::prepare_r... | rust_cleaned_test_functions.jsonl/128506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1710
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
14896,
2346,
95681,
643,
29264,
82,
368,
341,
262,
2205,
4452,
4470,
1089,
4412,
95681,
22428,
22255,
91,
341,
286,
3312,
3271,
341,
310,
1077,
1629,
14896,
1243,
95681,
284,
220,
19,
438,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_vcx_credential_update_state() {
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE,"true");
let cxn = ::connection::build_connection("test_credential_update_state").unwrap();
let handle = credential::from_string(DEFAULT_SERIALIZ... | rust_cleaned_test_functions.jsonl/7551 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
25844,
666,
30320,
8882,
4387,
368,
341,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
1335,
1866,
797,
286,
1077,
20716,
77,
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_rotate_line_around_point() {
let line0 = Line::new(Point::new(0., 0.), Point::new(0., 2.));
let line1 = Line::new(Point::new(0., 0.), Point::new(-2., 0.));
assert_relative_eq!(line0.rotate_around_point(90., Point::new(0., 0.)), line1);
} | rust_cleaned_test_functions.jsonl/49666 | {
"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,
60834,
6528,
62,
19454,
6085,
368,
341,
286,
1077,
1555,
15,
284,
7083,
486,
931,
32737,
486,
931,
7,
15,
2572,
220,
15,
24389,
5126,
486,
931,
7,
15,
2572,
220,
17,
13,
1106,
286,
1077,
155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_adding_more_cycles_when_not_enough_balance() {
let cycles_amount = 1_000_000_000_000;
let max_num_instructions = NumInstructions::from(1 << 30);
let cycles_account_manager = CyclesAccountManagerBuilder::new()
.with_max_num_instructions(max_num_instruction... | rust_cleaned_test_functions.jsonl/109060 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 863
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
2891,
287,
36664,
68970,
47636,
7913,
6205,
1384,
29396,
368,
341,
286,
1077,
24484,
13471,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
280,
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_enum_node() {
assert_ne!(Node::Num(0).clone(), Node::Var.clone());
assert_eq!(format!("{:?}", Node::Var), String::from("Var"));
assert_eq!(format!("{:?}", Node::Num(0)), String::from("Num(0)"));
let mut n: Node;
n = Node::UnOp {
op: UnOp::Not... | rust_cleaned_test_functions.jsonl/95575 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
5084,
368,
341,
286,
2060,
13925,
10297,
1955,
486,
4651,
7,
15,
568,
19982,
1507,
6018,
486,
3962,
15997,
1423,
286,
2060,
10714,
10297,
2243,
88928,
25,
52652,
6018,
486,
3962,
701,
923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dns_name_parsing() {
// Make sure `dns::Name`'s validation isn't too strict. It is
// implemented in terms of `webpki::DNSName` which has many more tests
struct Case {
input: &'static str,
output: &'static str,
}
static V... | rust_cleaned_test_functions.jsonl/106474 | {
"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,
71125,
1269,
620,
28598,
368,
341,
286,
442,
7405,
2704,
1565,
45226,
486,
675,
63,
6,
82,
10519,
4436,
944,
2238,
7304,
13,
1084,
374,
198,
286,
442,
11537,
304,
3793,
315,
1565,
2911,
79,
66... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_layer_env_delta_fs_read_write() {
let mut original_delta = LayerEnvDelta::new();
original_delta.insert(ModificationBehavior::Default, "FOO", "BAR");
original_delta.insert(ModificationBehavior::Append, "APPEND_TO_ME", "NEW_VALUE");
let temp_dir = tempdir().unwrap(... | rust_cleaned_test_functions.jsonl/36432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12680,
15879,
26710,
34470,
6443,
9165,
368,
341,
286,
1077,
5206,
4024,
26710,
284,
22735,
14359,
20277,
486,
931,
543,
286,
4024,
26710,
7030,
71956,
2404,
22753,
486,
3675,
11,
330,
3788,
46,
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_add_derive() {
check_action(
"struct Foo { a: i32, <|>}",
"#[derive(<|>)]\nstruct Foo { a: i32, }",
|file, off| add_derive(file, off).map(|f| f()),
);
check_action(
"struct Foo { <|> a: i32, }",
"#[derive(<|>)]\n... | rust_cleaned_test_functions.jsonl/100435 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
35345,
533,
368,
341,
286,
1779,
7931,
1006,
310,
330,
1235,
33428,
314,
264,
25,
600,
18,
17,
11,
82639,
29,
24375,
310,
5869,
58,
27098,
22726,
91,
29,
7252,
59,
77,
1235,
33428,
314,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mac_ipv6_undersize() {
let event = DhcpEvent::LeaseAdded {
event_timestamp: DateTime::<FixedOffset>::from(Local::now()),
lease_info: full_lease_info_v6(),
};
let mut result_command = Command::new(namib_dnsmasq_hook_exe());
let (args... | rust_cleaned_test_functions.jsonl/48456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 470
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
22802,
49378,
21,
62,
31009,
551,
368,
341,
286,
1077,
1538,
284,
43227,
4672,
1556,
486,
2304,
519,
19337,
341,
310,
1538,
23073,
25,
6520,
27638,
13520,
6446,
6831,
1499,
42718,
486,
3328... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_str_input() {
let mut input = "test".as_input();
assert_eq!(input.head(), In('t'));
input.step();
assert_eq!(input.head(), In('e'));
input.step();
assert_eq!(input.head(), In('s'));
input.step();
assert_eq!(input.head(), In('t'));
... | rust_cleaned_test_functions.jsonl/32347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
5898,
368,
341,
286,
1077,
5206,
1946,
284,
330,
1944,
3263,
300,
5898,
543,
286,
2060,
10714,
10297,
1355,
16042,
1507,
758,
492,
83,
6336,
286,
1946,
21465,
543,
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_phi_values() {
let context = Context::create();
let builder = context.create_builder();
let module = context.create_module("my_mod");
let void_type = context.void_type();
let bool_type = context.bool_type();
let fn_type = void_type.fn_type(&[bool_type.into()], false);
... | rust_cleaned_test_functions.jsonl/122311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 734
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42009,
9146,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
7363,
284,
2266,
2520,
28532,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
2408,
7480,
797,
262,
1077,
737,
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_normalize_attr() {
// See comment on xml_doc::parser::DocumentParser::normalize_attr_value
let xml = "<?xml version=\"1.0\"?>
<root attr=\" \r\t
ab
 c
\" />";
let doc = Document::parse_str(xml).unwrap();
let root = doc.root_element().unwrap();
let val = root.attribu... | rust_cleaned_test_functions.jsonl/74415 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80807,
10422,
368,
341,
262,
442,
3496,
3980,
389,
8396,
18869,
486,
9657,
486,
7524,
6570,
486,
30590,
10422,
3142,
198,
262,
1077,
8396,
284,
40271,
6455,
2319,
4070,
16,
13,
15,
2105,
5993,
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_op_parse_regval_type() {
// Doesn't matter for this test.
let encoding = encoding4();
check_op_parse(
|s| s.D8(constants::DW_OP_regval_type.0).uleb(1).uleb(100),
&Operation::RegisterOffset {
register: Register(1),
o... | rust_cleaned_test_functions.jsonl/45757 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10287,
21039,
4920,
831,
1819,
368,
341,
286,
442,
48832,
944,
4925,
369,
419,
1273,
624,
286,
1077,
11170,
284,
11170,
19,
1428,
286,
1779,
10287,
21039,
1006,
310,
760,
82,
91,
274,
909,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cdc_write_rollback_when_no_lock() {
let mut suite = TestSuite::new(1);
let mut req = suite.new_changedata_request(1);
req.set_extra_op(ExtraOp::ReadOldValue);
let (mut req_tx, _, receive_event) = new_event_feed(suite.get_region_cdc_client(1));
let _req_tx = block_on(req_tx.se... | rust_cleaned_test_functions.jsonl/13020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
7628,
9165,
62,
33559,
47636,
6536,
9818,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
16,
317,
262,
1077,
5206,
4232,
284,
16182,
4618,
25213,
459,
7893,
7,
16,
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... | 9 |
#[test]
fn test_mutex_arc_nested() {
// Tests nested mutexes and access
// to underlying data.
let arc = Arc::new(Mutex::new(1));
let arc2 = Arc::new(Mutex::new(arc));
let (tx, rx) = channel();
let _t = thread::spawn(move || {
let lock = arc2.lock().un... | rust_cleaned_test_functions.jsonl/8920 | {
"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,
14204,
62914,
66279,
368,
341,
286,
442,
20150,
24034,
30863,
288,
323,
2615,
198,
286,
442,
311,
16533,
821,
624,
286,
1077,
15580,
284,
19689,
486,
931,
3189,
9371,
486,
931,
7,
16,
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,
1... | 2 |
#[test]
fn test_result_with_list() {
assert_eq!(format!("{:?}", result_with_list()), "Ok([1, 11, 1426, 3])");
} | rust_cleaned_test_functions.jsonl/3827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 67
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5287,
6615,
2019,
368,
341,
286,
2060,
10714,
10297,
2243,
88928,
25,
52652,
1102,
6615,
2019,
11858,
330,
11578,
2561,
16,
11,
220,
16,
16,
11,
220,
16,
19,
17,
21,
11,
220,
18,
2467,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_is_valid_number() {
let list = [35, 20, 15, 25, 47];
assert_eq!(is_valid_number(40, &list), true);
assert_eq!(is_valid_number(50, &list), true);
assert_eq!(is_valid_number(102, &list), false);
assert_eq!(is_valid_number(10, &list), false);
} | rust_cleaned_test_functions.jsonl/54490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8337,
5500,
368,
341,
262,
1077,
1140,
284,
508,
18,
20,
11,
220,
17,
15,
11,
220,
16,
20,
11,
220,
17,
20,
11,
220,
19,
22,
935,
262,
2060,
10714,
10297,
285,
8337,
5500,
7,
19,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bn128_mul_ethereum() {
let x = FromHex::from_hex(
"2bd3e6d0f3b142924f5ca7b49ce5b9d54c4703d7ae5648e61d02268b1a0a9fb7"
).unwrap();
let y = FromHex::from_hex(
"21611ce0a6af85915e2f1d70300909ce2e49dfad4a4619c8390cae66cefdb204"
... | rust_cleaned_test_functions.jsonl/103162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58112,
16,
17,
23,
24944,
57757,
23923,
368,
341,
286,
1077,
856,
284,
5542,
20335,
486,
1499,
32655,
1006,
394,
330,
17,
8940,
18,
68,
21,
67,
15,
69,
18,
65,
16,
19,
17,
24,
17,
19,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_ntp_time_offset() {
let s = r#"synchronised to NTP server (10.73.10.10) at stratum 12
time correct to within 949 ms
polling server every 64 s"#;
assert_eq!(parse_ntp_time_offset(s), Some("949 ms".to_string().into()));
} | rust_cleaned_test_functions.jsonl/14477 | {
"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,
3062,
38945,
79,
3009,
6917,
368,
341,
286,
1077,
274,
284,
435,
55543,
82,
14113,
4056,
311,
451,
4239,
3538,
320,
16,
15,
13,
22,
18,
13,
16,
15,
13,
16,
15,
8,
518,
607,
26253,
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_and3() {
let compiled = compile("SET A 255\nAND A A");
let out_cpu = test_program(compiled);
assert_eq!(out_cpu.a.value, 255);
assert_eq!(out_cpu.f.value, 0);
} | rust_cleaned_test_functions.jsonl/63158 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8378,
18,
368,
341,
262,
1077,
19697,
284,
19192,
445,
5884,
362,
220,
17,
20,
20,
1699,
3976,
362,
362,
797,
262,
1077,
700,
21795,
284,
1273,
25096,
30008,
2181,
626,
262,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_group_with_multichar_sep() {
check(
r#"
macro_rules! m {
(fn $name:ident { $($i:literal)* }) => ( fn $name() -> bool { $($i)&&* } );
}
m! (fn baz { true false } );
"#,
expect![[r#"
macro_rules! m {
(fn $name:ident { $($i:literal)* }) => ( fn $name() -> bool { $(... | rust_cleaned_test_functions.jsonl/85211 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 367
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
6288,
6615,
26290,
713,
277,
54775,
368,
341,
262,
1779,
1006,
286,
435,
2,
698,
32606,
21407,
0,
296,
341,
262,
320,
8822,
400,
606,
25,
1713,
314,
93977,
72,
25,
35785,
4806,
6413,
58... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delta_bit_packed_int32_repeat() {
let block_data = vec![
1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 1, 2,
3, 4, 5, 6, 7, 8,
];
test_delta_bit_packed_decode::<Int32Type>(vec![block_data]);
} | rust_cleaned_test_functions.jsonl/38519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26710,
13996,
620,
11191,
4042,
18,
17,
41975,
368,
341,
286,
1077,
2504,
1769,
284,
7486,
90515,
310,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
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_prf_know_plaintext_sound() {
let mut rng = rand::thread_rng();
let x = Scalar::random(&mut rng);
let pk = PublicKey::new(GENERATOR.scaled(&x));
let m = CurveElem::random(&mut rng);
let r = Scalar::random(&mut rng);
let enc = pk.encrypt(&m, &r);
... | rust_cleaned_test_functions.jsonl/84420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
69,
4698,
3328,
6317,
1641,
427,
37676,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
1428,
286,
1077,
856,
284,
35176,
486,
11463,
2099,
6984,
28422,
317,
286,
1077,
22458... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shift() {
let ca = Int32Chunked::new_from_slice("", &[1, 2, 3]);
let shifted = ca.shift(1, &Some(0)).unwrap();
assert_eq!(shifted.cont_slice().unwrap(), &[0, 1, 2]);
let shifted = ca.shift(1, &None).unwrap();
assert_eq!(Vec::from(&shifted), &[None, Some(1)... | rust_cleaned_test_functions.jsonl/57987 | {
"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,
22230,
368,
341,
286,
1077,
2162,
284,
1333,
18,
17,
28304,
291,
486,
931,
5673,
26488,
19814,
44590,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
1077,
28973,
284,
2162,
29154,
7,
16,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_actuals() {
let addresses = [
// Elements
("2dxmEBXc2qMYcLSKiDBxdEePY3Ytixmnh4E", false, AddressParams::ELEMENTS),
("CTEo6VKG8xbe7HnfVW9mQoWTgtgeRSPktwTLbELzGw5tV8Ngzu53EBiasFMQKVbWmKWWTAdN5AUf4M6Y", true, AddressParams::ELEMENTS),
... | rust_cleaned_test_functions.jsonl/64316 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 863
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40149,
82,
368,
341,
1789,
286,
1077,
14230,
284,
2278,
310,
442,
34157,
198,
310,
3489,
17,
12719,
76,
8264,
55,
66,
17,
80,
19159,
66,
7268,
72572,
3506,
9703,
36,
68,
37881,
18,
56,
83,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_stream_lookup() {
let spec = "output a: UInt8 := 3\n output b: UInt8 := a[0]";
assert_eq!(0, num_type_errors(spec));
assert_eq!(get_type(spec), ValueTy::UInt(UIntTy::U8));
} | rust_cleaned_test_functions.jsonl/110671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12673,
27464,
368,
341,
286,
1077,
1398,
284,
330,
3006,
264,
25,
22275,
23,
1669,
220,
18,
1699,
2550,
293,
25,
22275,
23,
1669,
264,
58,
15,
59757,
286,
2060,
10714,
10297,
15,
11,
1629,
181... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum() {
#[derive(Deserialize, PartialEq, Debug)]
enum E {
Unit,
Newtype(u32),
Tuple(u32, u32),
Struct { a: u32 },
}
let lua = Lua::new();
lua.context(|lua| {
let expected = E::Unit;
... | rust_cleaned_test_functions.jsonl/15900 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 909
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
368,
341,
286,
11506,
27098,
7,
64465,
11,
55039,
11,
11091,
5563,
286,
7618,
468,
341,
310,
7954,
345,
310,
1532,
1313,
8154,
18,
17,
1326,
310,
24622,
8154,
18,
17,
11,
575,
18,
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_obj_lit_with_trailing_comma() {
assert_json_snapshot!(parse_literal(r#"{ abc: "foo", }"#.into()).unwrap().1);
assert_json_snapshot!(
parse_literal(r#"{ abc: 123, def: { foo: "bar", }, }"#.into())
.unwrap()
.1
);
parse_li... | rust_cleaned_test_functions.jsonl/77773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7328,
98399,
6615,
3547,
14277,
2965,
1728,
368,
341,
286,
2060,
9455,
53265,
10297,
6400,
34100,
2601,
2,
14129,
39022,
25,
330,
7975,
497,
335,
57676,
13,
18122,
6011,
15454,
1005,
16,
317,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_array() {
let result = linear_search(
&vec![
String::from("test"),
String::from("this"),
String::from("array"),
],
String::from("this"),
);
assert_eq!(result, Some(1));
} | rust_cleaned_test_functions.jsonl/50283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
3858,
368,
341,
286,
1077,
1102,
284,
13482,
10716,
1006,
310,
609,
4083,
90515,
394,
923,
486,
1499,
445,
1944,
4461,
394,
923,
486,
1499,
445,
574,
4461,
394,
923,
486,
1499,
445,
1653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merkle_tree_insert() {
let mut tree = TestSMT::new(3);
assert_eq!(tree.capacity(), 8);
tree.insert(0, TestLeaf(1));
assert_eq!(tree.root_hash(), 697_516_875);
tree.insert(0, TestLeaf(2));
assert_eq!(tree.root_hash(), 741_131_083);
tree.... | rust_cleaned_test_functions.jsonl/35063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
16754,
273,
11663,
17678,
368,
341,
286,
1077,
5206,
4916,
284,
3393,
50,
8505,
486,
931,
7,
18,
626,
286,
2060,
10714,
10297,
9344,
59168,
1507,
220,
23,
626,
286,
4916,
7030,
7,
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_as_ref_reader() {
let buf = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let mut rd = ReadRefReader::new(&buf);
assert_eq!(rd.read_slice(1).unwrap(), Reference::Borrowed(&[0][..]));
assert_eq!(rd.read_slice(6).unwrap(), Reference::Borrowed(&[1, 2, 3, 4, 5, 6][..]));
assert!(rd.read_s... | rust_cleaned_test_functions.jsonl/106803 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
7793,
22306,
368,
341,
262,
1077,
6607,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
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_simple_enc() {
let sk_bob: SecretKey = random();
let sk_eve: SecretKey = random();
let pk_bob = sk_bob.public_key();
let msg = b"Muffins in the canteen today! Don't tell Eve!";
let ciphertext = pk_bob.encrypt(&msg[..]);
assert!(ciphertext.verify())... | rust_cleaned_test_functions.jsonl/30566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
13781,
368,
341,
286,
1077,
1901,
880,
674,
25,
8599,
1592,
284,
4194,
543,
286,
1077,
1901,
2204,
586,
25,
8599,
1592,
284,
4194,
543,
286,
1077,
22458,
880,
674,
284,
1901,
880,
674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_start() {
let mut u = Ukkonen::with_capacity(10, unit_cost);
let pattern = b"ACCGT";
// hit begins at 1st position
let text1 = b"ACCGTGGATGAGCGCCATAG";
// hit begins at 2nd position
let text2 = b"AACCGTGGATGAGCGCCATAG";
let occ: Vec<... | rust_cleaned_test_functions.jsonl/10298 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
4906,
368,
341,
286,
1077,
5206,
575,
284,
547,
19196,
41928,
486,
4197,
35603,
7,
16,
15,
11,
4982,
15890,
626,
286,
1077,
5383,
284,
293,
1,
1706,
8798,
51,
876,
286,
442,
4201,
12033... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_into_string() {
let words = vec!["hello", " ", "world"];
let capitalized_words: String = capitalize_words(words).join("");
assert_eq!(capitalized_words, "Hello World");
} | rust_cleaned_test_functions.jsonl/4276 | {
"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,
11723,
349,
45514,
3904,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
3670,
330,
14615,
6332,
286,
1077,
97321,
18981,
25,
923,
284,
52725,
18981,
36289,
568,
5987,
13056,
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 |
#[test]
fn test_merge_types_via_tvar()
{
let mut t = Inferator::new("burritos");
let intlist = Type::StrictList(Box::new(Type::Int));
let unknownlist = Type::StrictList(Box::new(Type::Unknown));
let tvar = Type::Var(Lstr::Sref("Taco"));
let mtype0 = t.merge_types(&un... | rust_cleaned_test_functions.jsonl/15071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
9763,
80710,
528,
947,
741,
262,
341,
286,
1077,
5206,
259,
284,
62658,
850,
486,
931,
445,
11240,
94012,
797,
286,
1077,
526,
1607,
284,
3990,
486,
41857,
852,
67758,
486,
931,
22498,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_path_ext_html_jinja_and_ext_txt() {
let t = PathHtmlJinjaAndExtTxt;
assert_eq!(t.render().unwrap(), "foo.html.jinja");
assert_eq!(PathHtmlJinjaAndExtTxt::EXTENSION, Some("txt"));
} | rust_cleaned_test_functions.jsonl/133246 | {
"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,
2638,
9927,
9564,
5374,
41420,
8378,
9927,
22436,
368,
341,
262,
1077,
259,
284,
7933,
13591,
41,
41420,
3036,
6756,
35629,
280,
262,
2060,
10714,
10297,
83,
8740,
1005,
15454,
1507,
330,
7975,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_day2_part1() {
let mut cpu = IntcodeEmulator::default();
let program = Program::from_file("../day02/input.txt").expect("Failed to read input");
cpu.load_program(&program);
cpu.mem_mut()[1] = 12;
cpu.mem_mut()[2] = 2;
assert!(cpu.run().is_ok());
... | rust_cleaned_test_functions.jsonl/119108 | {
"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,
16763,
17,
10495,
16,
368,
341,
286,
1077,
5206,
17319,
284,
1333,
1851,
2269,
10511,
486,
2258,
543,
286,
1077,
2025,
284,
6687,
486,
1499,
2458,
17409,
1292,
15,
17,
39990,
3909,
1827,
17119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bpf_loader_check_load_dw() {
let prog = &[
0x18, 0x00, 0x00, 0x00, 0x88, 0x77, 0x66, 0x55, // first half of lddw
];
verifier::check(prog, &Config::default()).unwrap();
} | rust_cleaned_test_functions.jsonl/3069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
15897,
22139,
7200,
12411,
79503,
368,
341,
286,
1077,
29271,
284,
609,
9640,
310,
220,
15,
87,
16,
23,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
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_primitive_by_itself() {
let bvc = ByValueChecker::new();
let t_id = QualifiedName::new_from_cpp_name("u32");
assert!(bvc.is_pod(&t_id));
} | rust_cleaned_test_functions.jsonl/93407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3710,
14631,
721,
368,
341,
286,
1077,
293,
7362,
284,
3216,
1130,
35188,
486,
931,
543,
286,
1077,
259,
842,
284,
60306,
675,
486,
931,
5673,
59686,
1269,
445,
84,
18,
17,
797,
286,
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 |
#[test]
fn test_query_state_hash() {
let sandbox = timestamping_sandbox();
let sandbox_state = SandboxState::new();
// We do not change the state hash in between blocks for TimestampingService for now
for _ in 0..2 {
let state_hash = sandbox.last_state_hash();
let configs_rh = sa... | rust_cleaned_test_functions.jsonl/83612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
4387,
8950,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
543,
262,
1077,
42754,
4387,
284,
96860,
1397,
486,
931,
543,
262,
442,
1205,
653,
537,
2297,
279,
1584,
5175,
304,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.