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_from_int() {
let n = 42u8;
let element = Scalar::from(n);
assert_eq!(element, Scalar::from(n as u16));
assert_eq!(element, Scalar::from(n as u32));
assert_eq!(element, Scalar::from(n as u64));
assert_eq!(element, Scalar::from(n as u128));
} | rust_cleaned_test_functions.jsonl/14288 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
4042,
368,
341,
286,
1077,
308,
284,
220,
19,
17,
84,
23,
280,
286,
1077,
2392,
284,
35176,
486,
1499,
1445,
626,
286,
2060,
10714,
10297,
6101,
11,
35176,
486,
1499,
1445,
438,
575,
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_divss() {
assert_emit!(0xf3, 0x0f, 0x5e, 0xc1; divss(XMM0, XMM1));
assert_emit!(0xf3, 0x41, 0x0f, 0x5e, 0xdf; divss(XMM3, XMM15));
assert_emit!(0xf3, 0x44, 0x0f, 0x5e, 0xc4; divss(XMM8, XMM4));
} | rust_cleaned_test_functions.jsonl/85492 | {
"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,
16237,
778,
368,
341,
286,
2060,
69082,
10297,
15,
5848,
18,
11,
220,
15,
87,
15,
69,
11,
220,
15,
87,
20,
68,
11,
220,
15,
8148,
16,
26,
3429,
778,
7644,
8035,
15,
11,
1599,
8035,
16,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ws_trojan() {
let config1 = r#"
{
"inbounds": [
{
"protocol": "socks",
"address": "127.0.0.1",
"port": 1086
}
],
"outbounds": [
{
"protocol": "chain",
... | rust_cleaned_test_functions.jsonl/82092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50211,
528,
299,
22838,
368,
341,
262,
1077,
2193,
16,
284,
435,
2,
698,
262,
341,
286,
330,
258,
34019,
788,
2278,
310,
341,
394,
330,
17014,
788,
330,
13199,
82,
756,
394,
330,
4995,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_non_format_parameters() {
assert_eq!(
parse_format_flags_str(&["od", "-d", "-Ax"]).unwrap(),
vec![FORMAT_ITEM_DEC16U]
);
} | rust_cleaned_test_functions.jsonl/78692 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
21637,
8955,
18263,
368,
341,
262,
2060,
10714,
33673,
286,
4715,
8955,
14130,
2895,
2099,
1183,
347,
497,
6523,
67,
497,
6523,
37842,
45014,
15454,
3148,
286,
7486,
20703,
46559,
16461,
2377... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_debug_error() {
assert_eq!(
format!("{}", Error::BusError(devices::BusError::Overlap)),
format!(
"Failed to add legacy device to Bus: {}",
devices::BusError::Overlap
)
);
assert_eq!(
format!("... | rust_cleaned_test_functions.jsonl/50322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
4096,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
79878,
4600,
486,
15073,
1454,
17622,
1216,
486,
15073,
1454,
486,
82171,
6965,
310,
3561,
33673,
394,
330,
9408,
311,
912,
19588,
3671,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hits_stream() {
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = listener.local_addr().unwrap();
let guard = thread::spawn(move || {
let ctx = SslContext::builder(SslMethod::tls()).unwrap();
let stream = TcpStream::connect(addr).unwrap();
... | rust_cleaned_test_functions.jsonl/35515 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 447
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
63832,
12673,
368,
341,
262,
1077,
11446,
284,
64876,
2743,
486,
7666,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1827,
15454,
543,
262,
1077,
10789,
284,
11446,
11033,
7387,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_install_ancestors_mode_directories() {
let (at, mut ucmd) = at_and_ucmd!();
let ancestor1 = "ancestor1";
let ancestor2 = "ancestor1/ancestor2";
let target_dir = "ancestor1/ancestor2/target_dir";
let directories_arg = "-d";
let mode_arg = "--mode=700";
ucmd.args(&[mod... | rust_cleaned_test_functions.jsonl/47017 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34245,
62,
681,
267,
1087,
7302,
32871,
2433,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
45731,
16,
284,
330,
66878,
16,
876,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_failresolvechain_does_nothing() {
let frc = FailResolveChain {};
assert!(frc.resolve(ClientHello::new(None, &[], None)).is_none());
} | rust_cleaned_test_functions.jsonl/8737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
17325,
8819,
96374,
6536,
1596,
368,
341,
286,
1077,
282,
1287,
284,
39645,
56808,
18837,
9321,
286,
2060,
10297,
69,
1287,
14691,
46851,
9707,
486,
931,
26717,
11,
609,
12995,
2240,
4579,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_lcg() {
let mut gen = LCG::new(Some(1));
assert_eq!(gen.next_1(), LCG::A as u32);
let mean: f64 = gen.uniforms01(TRIALS).iter().sum::<f64>() / (TRIALS as f64);
assert!(mean > 0.49 && mean < 0.51);
} | rust_cleaned_test_functions.jsonl/20339 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
27446,
368,
341,
262,
1077,
5206,
4081,
284,
444,
8798,
486,
931,
65405,
7,
16,
1106,
262,
2060,
10714,
10297,
4370,
4529,
62,
16,
1507,
444,
8798,
486,
32,
438,
575,
18,
17,
626,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_owned_bytes_read_to_end() -> io::Result<()> {
let mut bytes = OwnedBytes::new(b"abcde".as_ref());
let mut buf = Vec::new();
bytes.read_to_end(&mut buf)?;
assert_eq!(buf.as_slice(), b"abcde".as_ref());
Ok(())
} | rust_cleaned_test_functions.jsonl/48684 | {
"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,
51973,
12524,
6443,
2346,
6213,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
5820,
284,
85093,
7078,
486,
931,
1883,
1,
13683,
450,
3263,
300,
7793,
1423,
286,
1077,
5206,
6607,
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_msg_app_flow_control_recv_heartbeat() {
let mut r = new_test_raft(1, vec![1, 2], 5, 1, new_storage());
r.become_candidate();
r.become_leader();
// force the progress to be in replicate state
r.prs.get_mut(&2).unwrap().become_replicate();
// fill in the inflights window
... | rust_cleaned_test_functions.jsonl/62680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 940
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6483,
8191,
27441,
13436,
36118,
62,
72471,
368,
341,
262,
1077,
5206,
435,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
11,
220,
17,
1125,
220,
20,
11,
220,
16,
11,
501,
23310,
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... | 9 |
#[test]
fn test_check_intersects_constraint_edge() {
let cdt = test_cdt();
let from = Point2::new(0.2, 0.2);
let to = Point2::new(0.6, 0.7);
assert!(cdt.intersects_constraint(&from, &to));
assert!(cdt.intersects_constraint(&to, &from));
let to = Point2::new(-0.5, ... | rust_cleaned_test_functions.jsonl/70760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
15318,
54429,
46973,
17932,
368,
341,
286,
1077,
272,
8047,
284,
1273,
666,
8047,
543,
286,
1077,
504,
284,
5126,
17,
486,
931,
7,
15,
13,
17,
11,
220,
15,
13,
17,
317,
286,
1077,
311,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_increment_string() {
assert_eq!(increment_string("foo"), "foo-2");
assert_eq!(increment_string("foo-2"), "foo-3");
assert_eq!(increment_string("foo-100"), "foo-101");
assert_eq!(increment_string("foo-2.txt"), "foo-3.txt");
assert_eq!(increment_string("Something (2)"), "Someth... | rust_cleaned_test_functions.jsonl/94208 | {
"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,
51482,
3904,
368,
341,
262,
2060,
10714,
10297,
35744,
3904,
445,
7975,
3975,
330,
7975,
12,
17,
797,
262,
2060,
10714,
10297,
35744,
3904,
445,
7975,
12,
17,
3975,
330,
7975,
12,
18,
797,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterate_string_vec() {
let words = vec!["hello", "world"];
let capitalized_words: Vec<String> = words.iter().map(|x| capitalize_first(x)).collect();
assert_eq!(capitalized_words, ["Hello", "World"]);
} | rust_cleaned_test_functions.jsonl/32068 | {
"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,
11723,
349,
3904,
13251,
368,
341,
286,
1077,
4244,
284,
7486,
0,
1183,
14990,
497,
330,
14615,
6332,
286,
1077,
97321,
18981,
25,
11312,
3464,
29,
284,
4244,
19471,
1005,
2186,
22428,
87,
91,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_vec4_round() {
assert_eq!(Vec4::new(1.35, 0.0, 0.0, 0.0).round().x, 1.0);
assert_eq!(Vec4::new(0.0, 1.5, 0.0, 0.0).round().y, 2.0);
assert_eq!(Vec4::new(0.0, 0.0, -15.5, 0.0).round().z, -16.0);
assert_eq!(Vec4::new(0.0, 0.0, 0.0, 0.0).round().z, 0.0);
assert_eq!(Vec4::new(0.0... | rust_cleaned_test_functions.jsonl/68883 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
19,
29896,
368,
341,
262,
2060,
10714,
10297,
10050,
19,
486,
931,
7,
16,
13,
18,
20,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
568,
1049,
1005,
87,
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_memory_sum_v1() {
let test_program_1_text = "mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X
mem[8] = 11
mem[7] = 101
mem[8] = 0";
let test_program_1 = parse_program(&test_program_1_text);
assert_eq!(find_memory_values_sum_v1(&test_program_1), 165);
} | rust_cleaned_test_functions.jsonl/133569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19195,
10160,
2273,
16,
368,
341,
286,
1077,
1273,
25096,
62,
16,
4326,
284,
330,
11258,
284,
19975,
61516,
61516,
61516,
6148,
16,
23830,
15,
55,
198,
10536,
58,
23,
60,
284,
220,
16,
16,
198... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_state_commission_split() {
let vote_state = VoteState::default();
assert_eq!(vote_state.commission_split(1), (0, 1, false));
let mut vote_state = VoteState::default();
vote_state.commission = std::u8::MAX;
assert_eq!(vote_state.commission_split(1), ... | rust_cleaned_test_functions.jsonl/66100 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
4387,
2965,
2728,
17052,
368,
341,
286,
1077,
6910,
4387,
284,
34034,
1397,
486,
2258,
1428,
286,
2060,
10714,
10297,
29358,
4387,
905,
2728,
17052,
7,
16,
701,
320,
15,
11,
220,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_contents() {
static CONTENTS: &str = r#"
declare_clippy_lint! {
#[clippy::version = "Hello Clippy!"]
pub PTR_ARG,
style,
"really long \
text"
}
declare_clippy_lint!{... | rust_cleaned_test_functions.jsonl/72166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
16682,
368,
341,
286,
1099,
35768,
50,
25,
609,
495,
284,
435,
2,
698,
310,
15913,
6794,
45749,
907,
396,
0,
341,
394,
11506,
564,
45749,
486,
4366,
284,
330,
9707,
2435,
45749,
0,
7026... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_kml_document_default() {
let kml_str ="<Point><coordinates>1,1,1</coordinates></Point><LineString><coordinates>1,1 2,1</coordinates></LineString>";
let d: Kml = kml_str.parse().unwrap();
assert!(matches!(d, Kml::KmlDocument(_)));
let doc: Option<KmlDocument... | rust_cleaned_test_functions.jsonl/94662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 896
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4698,
1014,
26231,
9993,
368,
341,
286,
1077,
595,
1014,
2895,
17244,
27,
2609,
1784,
34739,
29,
16,
11,
16,
11,
16,
522,
34739,
1472,
2609,
1784,
2460,
703,
1784,
34739,
29,
16,
11,
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... | 3 |
#[test]
fn test_four_of_a_kind_cascade() {
test(
&vec!["3S 3H 2S 3D 3C", "3S 3H 4S 3D 3C"],
&vec!["3S 3H 4S 3D 3C"],
)
} | rust_cleaned_test_functions.jsonl/121283 | {
"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,
56142,
3575,
4306,
33162,
666,
19977,
368,
341,
1066,
262,
1273,
1006,
286,
609,
4083,
0,
1183,
18,
50,
220,
18,
39,
220,
17,
50,
220,
18,
35,
220,
18,
34,
497,
330,
18,
50,
220,
18,
39,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_url_resolver_url() {
let resolver = UrlResolver::new("http://example.com", None).unwrap();
let url = resolver.url(&Coordinates::new("com.foo", "bar.baz"));
assert_eq!(
url,
Url::parse("http://example.com/com/foo/bar.baz/maven-metadata.xml").unwrap(... | rust_cleaned_test_functions.jsonl/25761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2903,
91578,
2903,
368,
341,
286,
1077,
36220,
284,
22840,
18190,
486,
931,
445,
1254,
1110,
8687,
905,
497,
2240,
568,
15454,
543,
286,
1077,
2515,
284,
36220,
7315,
2099,
43876,
486,
931,
445,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_managed_creds_with_valid_single_tenant() -> Result<()> {
let resource = "https://host-26.azurewebsites.net";
let managed_creds = ManagedIdentityCredentials::new(resource.to_string(), None)?;
assert_eq!(managed_creds.resource, resource);
Ok(())
} | rust_cleaned_test_functions.jsonl/75147 | {
"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,
79889,
666,
53369,
6615,
8337,
19487,
528,
25121,
368,
1464,
5714,
71698,
341,
286,
1077,
5101,
284,
330,
2428,
1110,
3790,
12,
17,
21,
70240,
896,
11712,
5071,
3302,
286,
1077,
8975,
666,
53369,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mukigen_normal2() {
let mut tokenizer = Tokenizer::new().unwrap();
let tokens: Vec<&str> = tokenizer.tokenize_str("—でも").unwrap();
assert_eq!(tokens, vec!["—", "でも"]);
} | rust_cleaned_test_functions.jsonl/61438 | {
"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,
717,
3101,
6433,
13973,
17,
368,
341,
286,
1077,
5206,
45958,
284,
9660,
3135,
486,
931,
1005,
15454,
543,
286,
1077,
11211,
25,
11312,
52244,
495,
29,
284,
45958,
96790,
2895,
445,
2293,
71561,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_proxy_scheme_parse_default_http_with_auth() {
// this should fail because `foo` is interpreted as the scheme and no host can be found
let ps = "foo:bar@localhost:1239".into_proxy_scheme().unwrap();
match ps {
ProxyScheme::Http { auth, host } => {
... | rust_cleaned_test_functions.jsonl/6810 | {
"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,
29712,
53293,
21039,
9993,
25888,
6615,
14014,
368,
341,
286,
442,
419,
1265,
3690,
1576,
1565,
7975,
63,
374,
32298,
438,
279,
12859,
323,
902,
3468,
646,
387,
1730,
198,
286,
1077,
4726,
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_partial_add_front_overlap() {
let mut assr = contigs![(4, 8), (4, 0)];
assert_eq!(assr.add(0, 8), Ok(()));
assert_eq!(assr, contigs![(0, 12), (4, 0)]);
} | rust_cleaned_test_functions.jsonl/52007 | {
"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,
52068,
2891,
22926,
65794,
368,
341,
286,
1077,
5206,
1071,
81,
284,
683,
14462,
0,
9697,
19,
11,
220,
23,
701,
320,
19,
11,
220,
15,
12587,
286,
2060,
10714,
10297,
395,
81,
1364,
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_from_arg_matches_relative() {
let argv = vec!["lsd", "--date", "relative"];
let matches = app::build().get_matches_from_safe(argv).unwrap();
assert_eq!(
Some(DateFlag::Relative),
DateFlag::from_arg_matches(&matches)
);
} | rust_cleaned_test_functions.jsonl/1301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
6057,
38344,
29286,
368,
341,
286,
1077,
10213,
284,
7486,
0,
1183,
4730,
67,
497,
14482,
1028,
497,
330,
20432,
6332,
286,
1077,
9071,
284,
906,
486,
5834,
1005,
455,
38344,
5673,
34067,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_to_response() {
// Empty Vmm data.
let mut buf: [u8; 66] = [0; 66];
let response = ParsedRequest::convert_to_response(Ok(VmmData::Empty));
assert!(response.write_all(&mut buf.as_mut()).is_ok());
let expected_response = "HTTP/1.1 204 \r\n\
... | rust_cleaned_test_functions.jsonl/47499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 942
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
2346,
9655,
368,
341,
286,
442,
22228,
647,
3821,
821,
624,
286,
1077,
5206,
6607,
25,
508,
84,
23,
26,
220,
21,
21,
60,
284,
508,
15,
26,
220,
21,
21,
935,
286,
1077,
2033,
284,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arena_reserve() {
for capacity in [0usize, 1, 5, 13, 47] {
let mut a = Arena::<usize>::new();
a.reserve(capacity);
assert!(a.is_empty());
assert_eq!(0, a.len());
assert!(a.capacity() >= capacity);
}
} | rust_cleaned_test_functions.jsonl/30753 | {
"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,
62,
30527,
89591,
368,
341,
286,
369,
8654,
304,
508,
15,
51878,
11,
220,
16,
11,
220,
20,
11,
220,
16,
18,
11,
220,
19,
22,
60,
341,
310,
1077,
5206,
264,
284,
27047,
27638,
51878,
6831,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_select_nfds() {
let (r1, w1) = pipe().unwrap();
write(w1, b"hi!").unwrap();
let (r2, _w2) = pipe().unwrap();
let mut fd_set = FdSet::new();
fd_set.insert(r1);
fd_set.insert(r2);
let mut timeout = TimeVal::seconds(10);
assert_eq!(1... | rust_cleaned_test_functions.jsonl/48745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
1089,
64834,
368,
341,
286,
1077,
320,
81,
16,
11,
289,
16,
8,
284,
13647,
1005,
15454,
543,
286,
3270,
3622,
16,
11,
293,
1,
6023,
0,
1827,
15454,
543,
286,
1077,
320,
81,
17,
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_follow_news_channel() {
let route = Route::FollowNewsChannel {
channel_id: CHANNEL_ID,
};
assert_eq!(
route.to_string(),
format!("channels/{channel_id}/followers", channel_id = CHANNEL_ID)
);
} | rust_cleaned_test_functions.jsonl/119918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43490,
32485,
14571,
368,
341,
286,
1077,
6021,
284,
9572,
486,
12480,
14373,
9629,
341,
310,
5496,
842,
25,
58756,
3450,
345,
286,
2605,
286,
2060,
10714,
33673,
310,
6021,
2389,
3904,
3148,
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 |
#[test]
fn test_read_consensus_state_failed_by_supply_error_client_id() {
let gp_client_id = ClientId::new(ClientType::Grandpa, 0).unwrap();
let gp_client_id_failed = ClientId::new(ClientType::Grandpa, 1).unwrap();
let height = Height::default();
let gp_consensus_state = GPConsensusState::new(CommitmentRoo... | rust_cleaned_test_functions.jsonl/60061 | {
"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,
6443,
31971,
13626,
4387,
35060,
3710,
65630,
4096,
8179,
842,
368,
341,
10217,
28705,
8179,
842,
284,
8423,
764,
486,
931,
46851,
929,
486,
40151,
6595,
11,
220,
15,
568,
15454,
543,
10217,
28705... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_call_hierarchy_on_ref() {
check_hierarchy(
r#"
//- /lib.rs
fn callee() {}
fn caller() {
call$0ee();
}
"#,
"callee Function FileId(0) 0..14 3..9",
&["caller Function FileId(0) 15..44 18..24 : [33..39]"],
&[],
);
} | rust_cleaned_test_functions.jsonl/731 | {
"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,
13429,
95043,
4470,
7793,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
8822,
94800,
368,
5613,
8822,
19865,
368,
341,
262,
1618,
3,
15,
2127,
543,
532,
57676... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_checker_xyz_to_rgb_avx_planes() {
use crate::colorchecker;
use crate::math::*;
use float_cmp::{ApproxEq, F32Margin};
use simdeez::avx2::*;
let xyz_to_rgb_mtx: M3f32 =
xyz_to_rgb_matrix(model_f64::SRGB.white, &model_f64::SRGB).into();
let xs = colorchecker::NAMES... | rust_cleaned_test_functions.jsonl/84265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 760
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62715,
64974,
2346,
37407,
26173,
87,
75340,
368,
341,
262,
990,
17717,
486,
3423,
69955,
280,
262,
990,
17717,
486,
10374,
56162,
262,
990,
2224,
35193,
22964,
28588,
12606,
80,
11,
434,
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... | 2 |
#[test]
fn test_register_gauge_with_registry_trailing_comma() {
use crate::Registry;
use std::collections::HashMap;
let mut labels = HashMap::new();
labels.insert("mykey".to_string(), "myvalue".to_string());
let custom_registry = Registry::new_custom(Some("myprefix".to_string()), Some(label... | rust_cleaned_test_functions.jsonl/86370 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
1889,
19392,
6615,
50650,
3547,
14277,
2965,
1728,
368,
341,
262,
990,
17717,
486,
15603,
280,
262,
990,
1460,
486,
51137,
486,
18497,
401,
262,
1077,
5206,
9201,
284,
10528,
486,
931,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_confirmations() {
// Build BlockCommitmentCache with votes at depths 0 and 1 for 2 slots
let mut cache0 = BlockCommitment::default();
cache0.increase_confirmation_stake(1, 5);
cache0.increase_confirmation_stake(2, 40);
let mut cache1 = BlockCommitment... | rust_cleaned_test_functions.jsonl/21584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 567
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
23800,
804,
368,
341,
286,
442,
7854,
8362,
33441,
478,
8233,
448,
12684,
518,
42857,
220,
15,
323,
220,
16,
369,
220,
17,
15711,
198,
286,
1077,
5206,
6500,
15,
284,
8362,
33441,
478,
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_json_format() {
let tag = "fruently".to_string();
let time = time::now();
let mut obj: HashMap<String, String> = HashMap::new();
obj.insert("name".to_string(), "fruently".to_string());
let record = Record::new(tag.clone(), time, obj.clone());
let f... | rust_cleaned_test_functions.jsonl/35373 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
8955,
368,
341,
286,
1077,
4772,
284,
330,
1626,
84,
4402,
3263,
983,
3904,
543,
286,
1077,
882,
284,
882,
486,
3328,
543,
286,
1077,
5206,
2839,
25,
10528,
3464,
11,
923,
29,
284,
10528... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parsed_module_get_dependencies() {
let source = r#"import * as bar from "./test.ts";
/** JSDoc */
import type { Foo } from "./foo.d.ts";
/// <reference foo="bar" />
export * as Buzz from "./buzz.ts";
// @some-pragma
/**
* Foo
*/
export type { Fizz } from "./fizz.d.ts";
const { join } =... | rust_cleaned_test_functions.jsonl/97832 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75788,
10750,
3062,
71841,
368,
341,
286,
1077,
2530,
284,
435,
55543,
474,
353,
438,
3619,
504,
5924,
1944,
21288,
876,
3663,
619,
5491,
509,
735,
474,
943,
314,
33428,
335,
504,
5924,
7975,
95... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_control_addrs() {
let mut rt = MockRuntime::default();
let h = util::ActorHarness::new(0);
h.construct_and_verify(&mut rt);
let (owner, worker, control_addrs) = h.get_control_addresses(&mut rt);
assert_eq!(h.owner, owner);
assert_eq!(h.worker, worker);
assert_eq!(h.... | rust_cleaned_test_functions.jsonl/124769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13436,
2891,
5428,
368,
341,
262,
1077,
5206,
16677,
284,
14563,
15123,
486,
2258,
543,
262,
1077,
305,
284,
4094,
486,
18870,
74248,
486,
931,
7,
15,
626,
262,
305,
84254,
8378,
35638,
2099,
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_eval_binary_function_scalar_vector() {
#[rpn_fn(nullable)]
fn foo(v1: Option<&Real>, v2: Option<&i64>) -> Result<Option<Real>> {
Ok(Some(*v1.unwrap() - *v2.unwrap() as f64))
}
let mut columns = LazyBatchColumnVec::from(vec![{
let m... | rust_cleaned_test_functions.jsonl/92667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
31761,
9174,
41652,
12247,
368,
341,
394,
11506,
81,
19958,
15246,
34885,
5563,
286,
5168,
15229,
3747,
16,
25,
6959,
52244,
12768,
8066,
348,
17,
25,
6959,
52244,
72,
21,
19,
9231,
1464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_date() -> Result<()> {
let mut ctx = EvalContext::default();
let cases = vec![
("2019-09-16", "20190916101112"),
("2019-09-16", "190916101112"),
("2019-09-16", "19091610111"),
("2019-09-16", "1909161011"),
("... | rust_cleaned_test_functions.jsonl/40456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1705
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
4164,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
24,
12,
15,
24,
12,
16,
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... | 6 |
#[test]
fn test_nodes_capacity_compute() {
let iteration_count = |mut leaf_count: usize| -> usize {
let mut capacity = 0;
while leaf_count > 0 {
capacity += leaf_count;
leaf_count = MerkleTree::next_level_len(leaf_count);
}
... | rust_cleaned_test_functions.jsonl/112987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14896,
35603,
57028,
368,
341,
286,
1077,
19569,
3180,
284,
760,
6984,
15933,
3180,
25,
22301,
91,
1464,
22301,
341,
310,
1077,
5206,
8654,
284,
220,
15,
280,
310,
1393,
15933,
3180,
861,
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... | 3 |
#[test]
fn test_write_keypair_succeeded() {
let file = String::from(TEST_KEYPAIR_FILENAME);
let data = [0u8; 64];
let result = std::panic::catch_unwind(|| write_keypair(&file, &data));
assert!(result.is_ok());
} | rust_cleaned_test_functions.jsonl/71226 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3097,
12670,
643,
43805,
368,
341,
286,
1077,
1034,
284,
923,
486,
1499,
50320,
6600,
82966,
45005,
317,
286,
1077,
821,
284,
508,
15,
84,
23,
26,
220,
21,
19,
935,
286,
1077,
1102,
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_single() {
assert_eq!(
Variant::VDouble(5.9).minus(Variant::VSingle(2.4)).unwrap(),
Variant::VDouble(3.5)
);
} | rust_cleaned_test_functions.jsonl/84558 | {
"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,
19487,
368,
341,
394,
2060,
10714,
33673,
503,
39292,
486,
53,
7378,
7,
20,
13,
24,
568,
38365,
12410,
15341,
486,
53,
10888,
7,
17,
13,
19,
4579,
15454,
3148,
503,
39292,
486,
53,
7378,
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 |
#[test]
fn test_invalid_struct_child_array_lengths() {
drop(StructArray::from(vec![
(
Field::new("b", DataType::Float32, false),
Arc::new(Float32Array::from(vec![1.1])) as Arc<dyn Array>,
),
(
Field::new("c", DataType::F... | rust_cleaned_test_functions.jsonl/45039 | {
"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,
31433,
15126,
17268,
3858,
54416,
368,
341,
286,
5943,
7,
9422,
1857,
486,
1499,
25592,
90515,
310,
2399,
394,
8601,
486,
931,
445,
65,
497,
33172,
486,
5442,
18,
17,
11,
895,
1326,
394,
19689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_css_color_31() {
assert_eq!(
parse_css_color("hsl(, 0%, 0%, )"),
Err(CssColorParseError::MissingColorComponent(
CssColorComponent::Hue
))
);
} | rust_cleaned_test_functions.jsonl/114047 | {
"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,
21039,
25924,
6714,
62,
18,
16,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
25924,
6714,
445,
71,
3226,
7,
11,
220,
15,
13384,
220,
15,
13384,
873,
4461,
310,
15495,
3025,
778,
1636,
14463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_android_clang_compiler_uses_target_arg_internally() {
for version in 16..21 {
assert!(android_clang_compiler_uses_target_arg_internally(
&PathBuf::from(format!("armv7a-linux-androideabi{}-clang", version))
));
assert!(android_clang_compiler_uses_target_arg... | rust_cleaned_test_functions.jsonl/7855 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56665,
6794,
524,
80910,
62,
4776,
11123,
6057,
4042,
932,
745,
368,
341,
262,
369,
2319,
304,
220,
16,
21,
496,
17,
16,
341,
286,
2060,
10297,
5954,
6794,
524,
80910,
62,
4776,
11123,
6057,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_codeforces_wa() {
let problem = std::fs::read_to_string(r".\test\1131A-WA.cpp").unwrap();
let result = submit(
"https://codeforces.com/contest/1131/problem/A",
problem.as_str(),
);
match result {
TestResult::NotAccepted => (),... | rust_cleaned_test_functions.jsonl/87418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
48796,
1670,
64,
368,
341,
286,
1077,
3491,
284,
1460,
486,
3848,
486,
878,
2346,
3904,
2601,
3263,
59,
1944,
59,
16,
16,
18,
16,
32,
13002,
32,
7208,
1827,
15454,
1428,
286,
1077,
1102,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_noto_sans() {
run_test(
&TEST_DATA,
"harfbuzz/good-noto-sans.ta",
"noto/NotoSansTamil-Regular.ttf",
&[JOINER_GLYPH_INDEX],
0,
);
} | rust_cleaned_test_functions.jsonl/91172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
2072,
643,
596,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
29169,
78,
1331,
596,
72160,
756,
503,
330,
1921,
78,
20290,
2072,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aho_corasick() {
let aho_corasick = TrieAhoCorasick::build(&["aba", "abb", "bbca"]);
let mut m = BTreeMap::new();
m.insert(0, vec![0]);
m.insert(1, vec![3]);
m.insert(2, vec![6]);
assert_eq!(m, aho_corasick.search("abaabbbbca"));
m = BTreeMap::new();
m.insert(0, ... | rust_cleaned_test_functions.jsonl/107292 | {
"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,
62,
28582,
14734,
300,
865,
368,
341,
262,
1077,
264,
6161,
14734,
300,
865,
284,
62783,
32,
6161,
10580,
300,
865,
486,
5834,
2099,
1183,
12004,
497,
330,
12523,
497,
330,
6066,
924,
15049,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_register_l2cap_channel() {
let mut exec = fasync::Executor::new().unwrap();
let (processing_fut, remote) = setup_session_task();
pin_mut!(processing_fut);
assert!(exec.run_until_stalled(&mut processing_fut).is_pending());
drop(remote);
assert!(ex... | rust_cleaned_test_functions.jsonl/14923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
907,
17,
11346,
14571,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
25255,
486,
931,
1005,
15454,
1428,
286,
1077,
320,
20660,
761,
332,
11,
8699,
8,
284,
6505,
12316,
12184,
543... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_target_comp_id() {
define_fixt_message!(TestMessage: b"9999" => {
NOT_REQUIRED, text: Text [FIX50..],
});
define_dictionary!(Logon, Reject, TestMessage,);
{
//Connect and logon.
let (mut test_server, mut client, connection) =
TestStream:... | rust_cleaned_test_functions.jsonl/27 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2703
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11123,
18177,
842,
368,
341,
262,
6979,
36060,
83,
6462,
10297,
2271,
2052,
25,
293,
1,
24,
24,
24,
24,
1,
589,
341,
286,
4183,
53912,
11,
1467,
25,
2918,
508,
39690,
20,
15,
496,
1259,
262,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_ack_reason() {
assert_eq!(ConnectAckReason::ConnectionAccepted.reason(), "Connection Accepted");
assert_eq!(
ConnectAckReason::UnacceptableProtocolVersion.reason(),
"Connection Refused, unacceptable protocol version"
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/13477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48447,
38229,
368,
341,
286,
2060,
10714,
10297,
14611,
55559,
25139,
486,
4526,
65906,
57703,
1507,
330,
4526,
63289,
797,
286,
2060,
10714,
33673,
310,
13015,
55559,
25139,
486,
1806,
37016,
20689,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ip_net_contains() {
crate::init().unwrap();
assert_eq!(
true,
net!("10.10.10.0/24").contains(ip!("10.10.10.123"), false)
);
assert_eq!(
false,
net!("10.10.10.0/24").contains(ip!("10.10.0.123"), false)
);
assert_eq!(
true,
n... | rust_cleaned_test_functions.jsonl/49228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10385,
19722,
63598,
368,
341,
262,
17717,
486,
2327,
1005,
15454,
1428,
262,
2060,
10714,
33673,
286,
830,
345,
286,
4179,
17223,
16,
15,
13,
16,
15,
13,
16,
15,
13,
15,
14,
17,
19,
1827,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encryption() {
use crate::{AlgorithmType, CryptoCtx};
let ctx = CryptoCtx::new();
let msg = b"test";
let nonce = [42u8; 12];
let key_handle = ctx.symmetric_key_generate("AES-256-GCM", None).unwrap();
let options_handle = ctx.options_open(AlgorithmType::Symmetric).unwra... | rust_cleaned_test_functions.jsonl/132174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 967
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13781,
15597,
368,
341,
262,
990,
17717,
22964,
27847,
929,
11,
32886,
23684,
2315,
262,
1077,
5635,
284,
32886,
23684,
486,
931,
1428,
262,
1077,
3750,
284,
293,
1,
1944,
876,
262,
1077,
39676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node_merge_with_slow_learner() {
let mut cluster = new_node_cluster(0, 2);
configure_for_merge(&mut cluster);
// Create a cluster with peer 1 as leader and peer 2 as learner.
let r1 = cluster.run_conf_change();
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.mu... | rust_cleaned_test_functions.jsonl/64605 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 803
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
20888,
6615,
82447,
62,
93595,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
17,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
626,
262,
442,
4230,
264,
10652... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_bitset() {
let delete_bitset = DeleteBitSet::for_test(&[1, 9], 10);
assert!(delete_bitset.is_alive(0));
assert!(delete_bitset.is_deleted(1));
assert!(delete_bitset.is_alive(2));
assert!(delete_bitset.is_alive(3));
assert!(delete_bitset.is_al... | rust_cleaned_test_functions.jsonl/38498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
13996,
746,
368,
341,
286,
1077,
3698,
13996,
746,
284,
10428,
8344,
1649,
486,
1958,
4452,
2099,
58,
16,
11,
220,
24,
1125,
220,
16,
15,
317,
286,
2060,
10297,
4542,
13996,
746,
2079,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_info_3_0() {
let platform_ids = get_platform_ids().unwrap();
// Choose the platform with the most compliant GPU
let platform_id = platform_ids[1];
let device_ids = get_device_ids(platform_id, CL_DEVICE_TYPE_GPU).unwrap();
println!("CL_DEVICE_T... | rust_cleaned_test_functions.jsonl/32018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2056
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
9204,
3109,
62,
18,
62,
15,
368,
341,
286,
1077,
5339,
8077,
284,
633,
34260,
8077,
1005,
15454,
1428,
286,
442,
22201,
279,
5339,
448,
279,
1429,
48698,
22670,
198,
286,
1077,
5339,
842,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optimization_omit_null_masks() {
// See https://github.com/influxdata/influxdb-pb-data-protocol#optimization-1b-omit-empty-null-masks
let table_batch = TableBatch {
table_name: "table".to_string(),
columns: vec![with_i64(
column("time", Sem... | rust_cleaned_test_functions.jsonl/36412 | {
"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,
15032,
65964,
62,
77968,
15162,
62935,
368,
341,
286,
442,
3496,
3703,
1110,
5204,
905,
17996,
36706,
691,
17996,
36706,
1999,
2268,
65,
13945,
12,
17014,
2,
19133,
2022,
12,
16,
65,
12,
77968,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_columns() {
let input = "
# Example
{{#columns}}
Column 1
{{#column}}
Column 2
{{/columns}}
";
let expected = "
<style>
.mdbook-shortcodes-columns-container {
display: flex;
margin: 0 -1em;
}
.mdbook-shortcodes-column {
flex: 50%;
... | rust_cleaned_test_functions.jsonl/125348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22590,
368,
341,
1789,
286,
1077,
1946,
284,
6228,
2,
13383,
198,
2979,
2,
16369,
47449,
2933,
220,
16,
271,
2979,
2,
6229,
47449,
2933,
220,
17,
271,
2979,
14,
16369,
11248,
876,
286,
1077,
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_variant_to_string() {
with_globals(|| {
let ident = ast::Ident::from_str("principal_skinner");
let var = codemap::respan(syntax_pos::DUMMY_SP, ast::Variant_ {
ident,
attrs: Vec::new(),
data: ast::Va... | rust_cleaned_test_functions.jsonl/45444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
2346,
3904,
368,
341,
286,
448,
58775,
79453,
341,
310,
1077,
3524,
284,
11763,
486,
28301,
486,
1499,
2895,
445,
66450,
33811,
4382,
3071,
310,
1077,
762,
284,
20329,
42040,
486,
416,
848,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bitpacking_reader_static() {
let test_arr = &[0b11111100, 0b01001000, 0b11001110, 0b00000110];
let mut cur = BitpackCursor::new(test_arr);
assert_eq!(cur.read_u4().unwrap(), 12);
assert_eq!(cur.read_u3().unwrap(), 7);
assert_eq!(cur.read_u7().unwrap(), 17);
assert_eq!(cur.read_u13().u... | rust_cleaned_test_functions.jsonl/33431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
95124,
22306,
25360,
368,
341,
1572,
10217,
1273,
11210,
284,
44590,
15,
65,
16,
16,
16,
16,
16,
16,
15,
15,
11,
220,
15,
65,
15,
16,
15,
15,
16,
15,
15,
15,
11,
220,
15,
65,
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_dir_type() {
let tmp_dir = tempdir().expect("failed to create temp dir");
let meta = Meta::from_path(&tmp_dir.path().to_path_buf(), false)
.expect("failed to get tempdir path");
let metadata = tmp_dir.path().metadata().expect("failed to get metas");
l... | rust_cleaned_test_functions.jsonl/60420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4334,
1819,
368,
341,
286,
1077,
4174,
4334,
284,
2730,
3741,
1005,
17119,
445,
16091,
311,
1855,
2730,
5419,
797,
286,
1077,
8823,
284,
15819,
486,
1499,
2638,
2099,
5173,
4334,
3875,
1005,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash() {
let mut set = HashSet::new();
let mut src1 = UpdateInfo::default();
src1.0.ucodeUpdate = 1;
src1.0.csmeFwUpdate = 2;
src1.0.pswUpdate = 3;
set.insert(src1);
let mut src2 = UpdateInfo::default();
src2.0.ucodeUpdate = 3;
... | rust_cleaned_test_functions.jsonl/67477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
368,
341,
286,
1077,
5206,
738,
284,
18931,
486,
931,
1428,
286,
1077,
5206,
2286,
16,
284,
5549,
1731,
486,
2258,
543,
286,
2286,
16,
13,
15,
56334,
534,
4289,
284,
220,
16,
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 |
#[test]
fn test_long_proposal_title_is_invalid() {
let mut long_title = String::new();
for _ in 0..300 {
long_title.push('Z');
}
let result = validate_proposal_title(&Some(long_title));
assert!(!result.is_ok());
} | rust_cleaned_test_functions.jsonl/42979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
21663,
32556,
6112,
6892,
31433,
368,
341,
262,
1077,
5206,
1293,
6112,
284,
923,
486,
931,
543,
262,
369,
716,
304,
220,
15,
496,
18,
15,
15,
341,
286,
1293,
6112,
2552,
492,
57,
1157,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_init() {
let allocator = PhysicalAllocator {
trees: Once::new(),
};
allocator.init_prelim(iter::once(&(0..(9 << 30) + 1)));
let trees = allocator.trees.wait().unwrap();
assert!(trees[8].lock().is_none());
assert!(trees[7].lock().is_s... | rust_cleaned_test_functions.jsonl/2704 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
368,
341,
286,
1077,
43655,
284,
27379,
42730,
341,
310,
12408,
25,
9646,
486,
931,
3148,
286,
3634,
286,
43655,
8271,
620,
3748,
318,
27070,
486,
13184,
29089,
15,
496,
7,
24,
1115,
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_socket_handle() {
let addr = InetAddr::new(IpAddr::new_v4(127, 0, 0, 1), 8123);
let addr = SockAddr::new_inet(addr);
let addr = unsafe {
let (c_sockaddr, _) = addr.as_ffi_pair();
from_libc_sockaddr(c_sockaddr).unwrap()
};
assert_eq... | rust_cleaned_test_functions.jsonl/52029 | {
"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,
19555,
10630,
368,
341,
286,
1077,
10789,
284,
758,
295,
13986,
486,
931,
8972,
79,
13986,
486,
931,
2273,
19,
7,
16,
17,
22,
11,
220,
15,
11,
220,
15,
11,
220,
16,
701,
220,
23,
16,
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_dom_sibling_1() {
struct TestLayout { }
impl Layout for TestLayout {
fn layout(&self) -> Dom<Self> {
Dom::new(NodeType::Div)
.with_child(
Dom::new(NodeType::Div)
.with_id("sibling-1")
... | rust_cleaned_test_functions.jsonl/2900 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1060
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35749,
96328,
62,
16,
368,
8022,
262,
2036,
3393,
2175,
314,
2553,
262,
11605,
13821,
369,
3393,
2175,
972,
286,
5168,
6789,
2099,
721,
8,
1464,
20751,
61748,
29,
972,
310,
20751,
486,
931,
2207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_from_two_touch_string_normal() {
let c = Converter::new();
let result = c
.convert_from_two_touch_string("48564940".to_string())
.unwrap();
assert_eq!(result, "RUST");
let result = c
.convert_from_two_touch_string("81225... | rust_cleaned_test_functions.jsonl/101150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
5673,
23241,
60840,
3904,
13973,
368,
341,
286,
1077,
272,
284,
39328,
486,
931,
543,
286,
1077,
1102,
284,
272,
198,
310,
659,
14166,
5673,
23241,
60840,
3904,
445,
19,
23,
20,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_queue_message_from_future_round() {
let sandbox = timestamping_sandbox();
let propose = Propose::new(
VALIDATOR_3,
HEIGHT_ONE,
ROUND_TWO,
&sandbox.last_hash(),
&[],
sandbox.s(VALIDATOR_3),
);
sandbox.recv(&propose);
sandbox.ad... | rust_cleaned_test_functions.jsonl/8868 | {
"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,
10841,
6462,
5673,
59740,
29896,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
1428,
262,
1077,
29614,
284,
3911,
960,
486,
931,
1006,
286,
43291,
11857,
62,
18,
345,
286,
41900,
34727,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min() {
let b1 = BigInt::new(1);
let b2 = BigInt::new(42);
let b3 = BigInt::from_vec(vec![0, 1]);
unimplemented!()
} | rust_cleaned_test_functions.jsonl/58471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 80
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
368,
341,
262,
1077,
293,
16,
284,
62608,
486,
931,
7,
16,
317,
262,
1077,
293,
17,
284,
62608,
486,
931,
7,
19,
17,
317,
262,
1077,
293,
18,
284,
62608,
486,
1499,
13251,
25592,
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 |
#[test]
fn test_string_codec() -> Result<()> {
let seed: OwnedValue = json!("snot badger");
let seed: BorrowedValue = seed.into();
let mut codec = String {};
let as_raw = codec.encode(&seed)?;
let as_json = codec.decode(as_raw, 0);
let _ = dbg!(as_json);
... | rust_cleaned_test_functions.jsonl/95179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
51084,
368,
1464,
5714,
71698,
341,
286,
1077,
10320,
25,
85093,
1130,
284,
2951,
17223,
82,
1921,
3873,
1389,
797,
286,
1077,
10320,
25,
77947,
291,
1130,
284,
10320,
39860,
1428,
286,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_key_check() {
let mut builder = MetadataBuilder::new();
// Non-byte key should not end with '-bin'.
assert!(builder.add_str("key-bin", "value").is_err());
// Byte key should end with '-bin'.
assert!(builder.add_bytes("key", b"value").is_err());
// ... | rust_cleaned_test_functions.jsonl/63646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
7200,
368,
341,
286,
1077,
5206,
7363,
284,
33589,
3297,
486,
931,
543,
286,
442,
11581,
53952,
1376,
1265,
537,
835,
448,
7788,
6863,
23569,
286,
2060,
10297,
17850,
1364,
2895,
445,
792,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_document_with_title() {
assert_markdown_eq(
common::parts::document_with_title,
r###"---
[_metadata_:title]:- "Test Document"
---
"###,
);
} | rust_cleaned_test_functions.jsonl/133507 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26231,
6615,
6112,
368,
341,
262,
2060,
18924,
2923,
10714,
1006,
286,
4185,
486,
18252,
486,
6062,
6615,
6112,
345,
286,
435,
14374,
1,
10952,
13496,
17637,
23211,
2102,
5669,
12,
330,
2271,
1178... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_last() {
unsafe {
*libc::__errno_location() = libc::EPERM;
}
assert_eq!(Error::last().code(), libc::EPERM);
unsafe {
*libc::__errno_location() = libc::ENOENT;
}
assert_eq!(Error::last().code(), libc::ENOENT);
} | rust_cleaned_test_functions.jsonl/99539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12195,
368,
341,
286,
19860,
341,
310,
353,
55576,
18606,
26379,
13126,
368,
284,
42142,
486,
9197,
38720,
280,
286,
456,
286,
2060,
10714,
10297,
1454,
486,
4259,
1005,
1851,
1507,
42142,
486,
91... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_key() {
let mut key = KeyPool::new(14, 2, 0);
let mut keys = key.split_key(2);
println!("{:?}", keys);
assert!(keys[0].dynamic_bytes[0] == 0);
assert!(keys[0].dynamic_ms_cap == 128);
assert!(keys[1].dynamic_bytes[0] == 128);
assert!(keys[1].dynamic_ms_cap == 0)... | rust_cleaned_test_functions.jsonl/4950 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
3097,
368,
341,
262,
1077,
5206,
1376,
284,
5309,
10551,
486,
931,
7,
16,
19,
11,
220,
17,
11,
220,
15,
317,
262,
1077,
5206,
6894,
284,
1376,
5289,
3097,
7,
17,
626,
262,
13751,
8892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_convert_i64() {
fn check(b1: BigUint, i: i64) {
let b2: BigUint = FromPrimitive::from_i64(i).unwrap();
assert!(b1 == b2);
assert!(b1.to_i64().unwrap() == i);
}
check(Zero::zero(), 0);
check(One::one(), 1);
check(i64::MA... | rust_cleaned_test_functions.jsonl/90121 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
5318,
21,
19,
368,
341,
286,
5168,
1779,
1883,
16,
25,
6164,
21570,
11,
600,
25,
600,
21,
19,
8,
341,
310,
1077,
293,
17,
25,
6164,
21570,
284,
5542,
33313,
486,
1499,
5318,
21,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_strh_imm() {
assert_eq!(
decode_16(0x8708),
Instruction::STRH_imm {
params: Reg2FullParams {
rt: Reg::R0,
rn: Reg::R1,
imm32: 0x38,
index: true,
add: true,
... | rust_cleaned_test_functions.jsonl/64767 | {
"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,
15227,
2895,
71,
71370,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
16,
21,
7,
15,
87,
23,
22,
15,
23,
1326,
286,
29051,
486,
6666,
39,
71370,
341,
310,
3628,
25,
3184,
17,
9432... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sha256_output_length() {
let max_hash_length: usize = 255 * 32;
let hkdf_extract = Hkdf::<Sha256>::extract(None, &[]).unwrap();
let hkdf_expand = Hkdf::<Sha256>::expand(&hkdf_extract, None, max_hash_length);
assert!(hkdf_expand.is_ok());
assert_eq!(hkdf_expa... | rust_cleaned_test_functions.jsonl/100791 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48836,
17,
20,
21,
7645,
5118,
368,
341,
1066,
262,
1077,
1932,
8950,
5118,
25,
22301,
284,
220,
17,
20,
20,
353,
220,
18,
17,
26,
4710,
1066,
262,
1077,
83381,
2940,
39123,
284,
472,
74,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_point_eq_pos() {
let p1 = Tuple::point(1.0, 2.0, 3.0);
let p2 = Tuple::point(1.0, 2.0, 3.0);
assert_eq!(p1, p2);
} | rust_cleaned_test_functions.jsonl/113502 | {
"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,
6085,
10714,
6479,
368,
341,
286,
1077,
281,
16,
284,
24622,
486,
2768,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
286,
1077,
281,
17,
284,
24622,
486,
2768,
7,
16,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_numbering() {
let b = Paragraph::new()
.add_run(Run::new().add_text("Hello"))
.numbering(NumberingId::new(0), IndentLevel::new(1))
.build();
assert_eq!(
str::from_utf8(&b).unwrap(),
r#"<w:p w14:paraId="12345678"><w:pPr><... | rust_cleaned_test_functions.jsonl/50378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5500,
287,
368,
341,
286,
1077,
293,
284,
49351,
486,
931,
741,
310,
659,
718,
14007,
2785,
359,
486,
931,
1005,
718,
4326,
445,
9707,
5455,
310,
659,
4082,
287,
42999,
287,
764,
486,
931,
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_calculate_t_stats() {
let data_1 = [0., 0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 5., 5., 5., 5., 5.];
let (idx, _) = calculate_t_stats(&data_1, 3, 0.05, 100).unwrap();
assert_eq!(idx, 10); // maybe 5
let data_1 = [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5];
... | rust_cleaned_test_functions.jsonl/57985 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
528,
15381,
368,
341,
286,
1077,
821,
62,
16,
284,
508,
15,
2572,
220,
15,
2572,
220,
15,
2572,
220,
15,
2572,
220,
15,
2572,
220,
15,
2572,
220,
16,
2572,
220,
16,
2572,
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_always_ready_macro() {
let waker = noop_waker();
let mut cx = task::Context::from_waker(&waker);
let svc = IdentityService;
assert!(svc.poll_ready(&mut cx).is_ready());
assert!(svc.poll_ready(&mut cx).is_ready());
assert!(svc.poll_ready(&mut cx).... | rust_cleaned_test_functions.jsonl/100450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8418,
2284,
35456,
58810,
368,
341,
286,
1077,
289,
4407,
284,
60829,
1670,
4407,
543,
286,
1077,
5206,
20716,
284,
3383,
486,
1972,
486,
1499,
1670,
4407,
2099,
86,
4407,
626,
286,
1077,
46154,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_batch_get() {
let storage = TestStorageBuilder::new().build().unwrap();
let (tx, rx) = channel();
storage
.async_prewrite(
Context::new(),
vec![
Mutation::Put((Key::from_raw(b"a"), b"aa".to_vec())),
... | rust_cleaned_test_functions.jsonl/22308 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
3062,
368,
341,
286,
1077,
5819,
284,
3393,
5793,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
320,
3998,
11,
19111,
8,
284,
5496,
543,
286,
5819,
198,
310,
659,
7692,
620,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_keyval_comment() {
let p = TOMLParser::new();
assert_eq!(p.keyval_comment(" \"Tôƭáℓℓ¥\" = true\t#λèřè ïƨ ₥¥ çô₥₥èñƭ\n").1,
Done("\n",
Expression::new(WSSep::new_str(" ", "\t"), Some(KeyVal::new_str(
"\"Tôƭáℓℓ¥\"", WSSep::new_str(" ", " "), Rc::new(RefCell::new(T... | rust_cleaned_test_functions.jsonl/95655 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
831,
17638,
368,
341,
262,
1077,
281,
284,
82465,
43,
6570,
486,
931,
543,
262,
2060,
10714,
10297,
79,
4735,
831,
17638,
445,
7245,
51,
9574,
130,
255,
1953,
145033,
145033,
81093,
2105,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_slots_are_valid_duplicate_vote() {
let mut vote_state = VoteState::default();
let vote = Vote::new(vec![0], Hash::default());
let slot_hashes: Vec<_> = vec![(*vote.slots.last().unwrap(), vote.hash)];
assert_eq!(vote_state.process_vote(&vote, &slot_hashes, 0... | rust_cleaned_test_functions.jsonl/43744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
54161,
56855,
8337,
70434,
54360,
368,
341,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
1428,
286,
1077,
6910,
284,
34034,
486,
931,
25592,
20703,
15,
1125,
6531,
486,
2258,
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_integer() {
// u8
let vec = to_vec(&24).unwrap();
assert_eq!(vec, b"\x18\x18");
// i8
let vec = to_vec(&-5).unwrap();
assert_eq!(vec, b"\x24");
// i16
let vec = to_vec(&-300).unwrap();
assert_eq!(vec, b"\x39\x01\x2b");
// i32
let vec = to_vec(&-2356799... | rust_cleaned_test_functions.jsonl/110270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31725,
368,
341,
262,
442,
575,
23,
198,
262,
1077,
7486,
284,
311,
13251,
2099,
17,
19,
568,
15454,
543,
262,
2060,
10714,
10297,
4083,
11,
293,
11934,
87,
16,
23,
3462,
16,
23,
797,
262,
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_tracker() {
let mut map = LruCache::with_capacity_sample_and_trace(10, 0, TestTracker(0));
for i in 0..10 {
map.insert(i, vec![b' ']);
assert_eq!(
SizePolicy::<usize, Vec<u8>>::current(&map.size_policy),
i + 1
)
... | rust_cleaned_test_functions.jsonl/98610 | {
"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,
50264,
368,
341,
286,
1077,
5206,
2415,
284,
444,
2672,
8233,
486,
4197,
35603,
17491,
8378,
23575,
7,
16,
15,
11,
220,
15,
11,
3393,
31133,
7,
15,
1106,
286,
369,
600,
304,
220,
15,
496,
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_reconcile_missing() {
let slot = 1;
let num_entries = 100;
let (data_shreds, _, leader_schedule_cache) =
setup_erasure_shreds(slot, 0, num_entries, 1.0);
let ledger_path = get_tmp_ledger_path!();
let ledger = Blockstore::open(&ledger_path).unw... | rust_cleaned_test_functions.jsonl/94053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
40446,
457,
40447,
368,
341,
286,
1077,
9446,
284,
220,
16,
280,
286,
1077,
1629,
26092,
284,
220,
16,
15,
15,
280,
286,
1077,
320,
691,
3712,
53369,
11,
8358,
7653,
34530,
11529,
8,
403... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ser_de() {
let rope = Rope::from("a\u{00A1}\u{4E00}\u{1F4A9}");
assert_tokens(&rope, &[Token::Str("a\u{00A1}\u{4E00}\u{1F4A9}")]);
assert_tokens(&rope, &[Token::String("a\u{00A1}\u{4E00}\u{1F4A9}")]);
assert_tokens(&rope, &[Token::BorrowedStr("a\u{00A1}\u{4E00}\u{... | rust_cleaned_test_functions.jsonl/21486 | {
"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,
75861,
2259,
368,
341,
286,
1077,
33420,
284,
97896,
486,
1499,
445,
64,
3770,
90,
15,
15,
32,
16,
11035,
84,
90,
19,
36,
15,
15,
11035,
84,
90,
16,
37,
19,
32,
24,
20305,
286,
2060,
28838... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_register_without_up() {
let application = [0x0A; 32];
let message = create_register_message(&application);
let mut rng = ThreadRng256 {};
let dummy_user_presence = |_| panic!("Unexpected user presence check in CTAP1");
let mut ctap_state = CtapSta... | rust_cleaned_test_functions.jsonl/55438 | {
"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,
11305,
14000,
39904,
8237,
368,
341,
286,
1077,
3766,
284,
508,
15,
87,
15,
32,
26,
220,
18,
17,
935,
286,
1077,
1943,
284,
1855,
14000,
6462,
2099,
5132,
626,
286,
1077,
5206,
28422,
284,
875... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arrow_record_batch_large() -> Result<()> {
let db = checked_memory_handle();
db.execute_batch("BEGIN TRANSACTION")?;
db.execute_batch("CREATE TABLE test(t INTEGER);")?;
for _ in 0..300 {
db.execute_batch("INSERT INTO test VALUES (1); INSERT INTO ... | rust_cleaned_test_functions.jsonl/113066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
46566,
14192,
14534,
45228,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
2927,
7769,
14534,
445,
37588,
93923,
899,
37445,
286,
2927,
7769,
14534,
445,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_walk_list() -> Result<()> {
test_walk(
r#"
let x = event.bla + 1;
fn add(x, y) with
recur(x + y, 1)
end;
let zero = 0;
[
-event.foo,
(patch event of
insert "snot" => 42,
... | rust_cleaned_test_functions.jsonl/105893 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
56131,
2019,
368,
1464,
5714,
71698,
341,
286,
1273,
56131,
1006,
310,
435,
2,
698,
286,
1077,
856,
284,
1538,
948,
4260,
488,
220,
16,
280,
286,
5168,
912,
2075,
11,
379,
8,
448,
198,
688,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_list_insertion_and_deletion_in_same_change() {
let actor: ActorID = "0723d2a1940744868ffd6b294ada813f".try_into().unwrap();
let local1 = UncompressedChange {
actor_id: actor.clone(),
seq: 1,
message: None,
hash: None,
time: 0,
deps: ... | rust_cleaned_test_functions.jsonl/22979 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2328
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
2019,
17678,
290,
8378,
2259,
52625,
1243,
33574,
15947,
368,
341,
262,
1077,
12089,
25,
24718,
915,
284,
330,
15,
22,
17,
18,
67,
17,
64,
16,
24,
19,
15,
22,
19,
19,
23,
21,
23,
72... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_token() {
use time;
let tg = TokenGenerator::new(time::Duration::hours(2).num_seconds(),
vec!(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16));
let (valid_from, valid_until, result) = tg.generate_token("a", 99999999);
... | rust_cleaned_test_functions.jsonl/21112 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
6458,
368,
341,
286,
990,
882,
280,
286,
1077,
53188,
284,
9660,
12561,
486,
931,
9730,
486,
12945,
486,
30382,
7,
17,
568,
2413,
34825,
3148,
10589,
7486,
10297,
16,
11,
220,
17,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mknod() {
use stat::{lstat, mknod, SFlag};
let file_name = "test_file";
let tempdir = tempfile::tempdir().unwrap();
let target = tempdir.path().join(file_name);
mknod(&target, SFlag::S_IFREG, Mode::S_IRWXU, 0).unwrap();
let mode = lstat(&target).unwrap().st_mode as mode_... | rust_cleaned_test_functions.jsonl/48650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
19095,
347,
368,
341,
262,
990,
2793,
22964,
75,
9878,
11,
296,
19095,
347,
11,
328,
12135,
2315,
262,
1077,
1034,
1269,
284,
330,
1944,
2458,
876,
262,
1077,
2730,
3741,
284,
54819,
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_function_regexp_with_auxilliary() {
let db = Connection::open_in_memory().unwrap();
db.execute_batch(
"BEGIN;
CREATE TABLE foo (x string);
INSERT INTO foo VALUES ('lisa');
INSERT INTO foo VALUES ('lXsi');
INSERT INTO... | rust_cleaned_test_functions.jsonl/41668 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
4920,
4580,
6615,
30468,
57168,
658,
368,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
1005,
15454,
543,
286,
2927,
7769,
14534,
1006,
310,
330,
37588,
280,
1797,
30776,
14363,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all_formats_exhaustive() {
let x = Format::ALPHA8;
match x {
Format::Unknown => {}
Format::RGBA8 => {}
Format::R8 => {}
Format::ALPHA8 => {}
Format::LUMINANCE8 => {}
Format::LUMINAN... | rust_cleaned_test_functions.jsonl/28582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
68351,
2702,
15074,
533,
368,
341,
286,
1077,
856,
284,
15042,
486,
969,
28222,
23,
280,
73363,
286,
2432,
856,
341,
310,
15042,
486,
13790,
589,
5613,
310,
15042,
486,
58927,
23,
589,
561... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_floor() {
assert_eq!(d("100.11").floor(), d("100.00"));
assert_eq!(d("99.0").floor(), d("99.0"));
assert_eq!(d("-40.1").floor(), d("-41.0"));
} | rust_cleaned_test_functions.jsonl/999 | {
"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,
60044,
368,
341,
286,
2060,
10714,
10297,
67,
445,
16,
15,
15,
13,
16,
16,
1827,
30449,
1507,
294,
445,
16,
15,
15,
13,
15,
15,
4010,
286,
2060,
10714,
10297,
67,
445,
24,
24,
13,
15,
1827... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_thread_ids() {
let ids: std::io::Result<Vec<_>> = thread_ids(process_id());
assert!(ids.is_ok());
assert!(!ids.unwrap().is_empty());
} | rust_cleaned_test_functions.jsonl/103634 | {
"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,
10814,
8077,
368,
341,
286,
1077,
14151,
25,
1460,
486,
815,
486,
2077,
50439,
32399,
2452,
284,
4516,
8077,
21929,
842,
1423,
286,
2060,
10297,
3365,
2079,
19817,
1423,
286,
2060,
0,
3471,
3365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filter_attributes() {
let data = r#"
{
"name": "John Doe",
"age": 43,
"metadata": {
"height": 50,
"width": 60
}
}"#;
let dir = TempDir::new("payload_dir").unwrap();
let d... | rust_cleaned_test_functions.jsonl/82023 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
8727,
18240,
368,
341,
286,
1077,
821,
284,
435,
2,
698,
286,
341,
310,
330,
606,
788,
330,
13079,
49628,
756,
310,
330,
424,
788,
220,
19,
18,
345,
310,
330,
17637,
788,
341,
394,
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... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.