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_json_array() {
let cases = vec![
(vec![], Some(r#"[]"#)),
(vec![Some(r#"1"#), None], Some(r#"[1, null]"#)),
(
vec![
Some(r#"1"#),
None,
Some(r#"2"#),
Some(r... | rust_cleaned_test_functions.jsonl/60595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 689
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
3858,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
320,
4083,
0,
12995,
4329,
2601,
55543,
33325,
2,
6965,
310,
320,
4083,
20703,
8373,
2601,
55543,
16,
57676,
701,
2240,
1125,
4329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arch_arm_detail() {
use arch::arm::ArmOperandType::*;
use arch::arm::*;
use capstone_sys::arm_op_mem;
let r0_op = ArmOperand {
op_type: Reg(RegId(ArmReg::ARM_REG_R0 as RegIdInt)),
..Default::default()
};
test_arch_mode_endian_insns_detail(
&mut C... | rust_cleaned_test_functions.jsonl/127431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3006
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34330,
34680,
14480,
368,
341,
262,
990,
5325,
486,
2178,
486,
32913,
29940,
929,
56162,
262,
990,
5325,
486,
2178,
56162,
262,
990,
2062,
10812,
20344,
486,
2178,
10287,
12976,
401,
262,
1077,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_image_parse_registry_port() {
assert_eq!(
ImageRef::parse("example.com:1234/foo"),
ImageRef {
registry: Some("example.com:1234".into()),
image: "foo".into(),
tag: None,
hash: None
}
);
assert_eq!(
ImageRef::parse("example.com:1... | rust_cleaned_test_functions.jsonl/17932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4954,
21039,
50650,
8716,
368,
341,
262,
2060,
10714,
33673,
414,
4654,
3945,
486,
6400,
445,
8687,
905,
25,
16,
17,
18,
19,
60555,
4461,
414,
4654,
3945,
341,
286,
19424,
25,
4329,
445,
8687,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stack_guard() {
let engine = TestEngineBuilder::new().build().unwrap();
let read_pool = build_read_pool_for_test(engine.clone());
let cop = Endpoint::<RocksEngine>::new(
&Config {
end_point_recursion_limit: 5,
..Config::default(... | rust_cleaned_test_functions.jsonl/40856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 629
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15528,
36796,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
1349,
15709,
284,
1936,
6443,
15709,
5478,
4452,
48974,
15997,
1423,
286,
1077,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dictionary_key() {
assert::pass(
r#"
x = {0: 123}
assert_eq(x[0], 123)
assert_eq(x[0.0], 123)
assert_eq(x[-0.0], 123)
assert_eq(1 in x, False)
"#,
);
} | rust_cleaned_test_functions.jsonl/114098 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42605,
3097,
368,
341,
286,
2060,
486,
6385,
1006,
310,
435,
2,
698,
87,
284,
314,
15,
25,
220,
16,
17,
18,
532,
2207,
10714,
2075,
58,
15,
1125,
220,
16,
17,
18,
340,
2207,
10714,
2075,
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... | 1 |
#[test]
fn test_supplies_buy_food_insufficient() {
let mut supplies = Supplies::new();
let reason = supplies.buy_food(1000).unwrap_err().reason;
assert_eq!(BuyErrorType::InsufficientFunds, reason);
assert_eq!(700, supplies.money);
assert_eq!(0, supplies.food);
} | rust_cleaned_test_functions.jsonl/28661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23723,
7202,
46348,
58580,
34386,
26683,
368,
341,
286,
1077,
5206,
16720,
284,
50252,
486,
931,
543,
286,
1077,
2874,
284,
16720,
63871,
58580,
7,
16,
15,
15,
15,
568,
15454,
9266,
1005,
19895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_host_off_no_viewer_count() {
let src = ":tmi.twitch.tv HOSTTARGET #randers :- -";
let irc_message = IRCMessage::parse(src).unwrap();
let msg = HostTargetMessage::try_from(irc_message.clone()).unwrap();
assert_eq!(
msg,
HostTargetMessage {
... | rust_cleaned_test_functions.jsonl/1052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12848,
13651,
6536,
80344,
3180,
368,
341,
286,
1077,
2286,
284,
13022,
83,
8155,
90179,
14485,
44578,
45583,
671,
11335,
388,
20955,
481,
876,
286,
1077,
79923,
6462,
284,
59328,
2052,
486,
6400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mode_order() {
assert!(Numeric < Alphanumeric);
assert!(Byte > Kanji);
assert!(!(Numeric < Kanji));
assert!(!(Numeric >= Kanji));
} | rust_cleaned_test_functions.jsonl/64977 | {
"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,
7302,
7869,
368,
341,
286,
2060,
10297,
36296,
366,
1674,
65788,
317,
286,
2060,
10297,
7153,
861,
30563,
7754,
317,
286,
2060,
0,
33660,
36296,
366,
30563,
7754,
1106,
286,
2060,
0,
33660,
36296,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pwm_circuit() {
let mut uut = PWMTest::default();
uut.clock.connect();
uut.connect_all();
yosys_validate("pwm", &generate_verilog(&uut)).unwrap();
let mut sim = Simulation::new();
sim.add_clock(5, |x: &mut Box<PWMTest>| x.clock.next = !x.clock.val());
sim.add_testbenc... | rust_cleaned_test_functions.jsonl/6231 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70985,
666,
37268,
368,
341,
262,
1077,
5206,
575,
332,
284,
36034,
2271,
486,
2258,
543,
262,
575,
332,
50546,
10800,
543,
262,
575,
332,
10800,
5705,
543,
262,
379,
436,
1047,
42681,
445,
79,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merge() -> Result<(), IndexError> {
let mut x: MyVec<usize> = MyVec::new();
for i in &[1, 3, 5, 6, 8, 10] {
x.push(*i)
}
let mut y: MyVec<usize> = MyVec::new();
for i in &[2, 4, 6, 7, 9, 11] {
y.push(*i)
}
let z = x.merge(y);
assert_eq!(*z, *vec![1... | rust_cleaned_test_functions.jsonl/24015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
368,
1464,
5714,
68843,
60203,
29,
341,
262,
1077,
5206,
856,
25,
3017,
10050,
90244,
29,
284,
3017,
10050,
486,
931,
543,
262,
369,
600,
304,
44590,
16,
11,
220,
18,
11,
220,
20,
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... | 3 |
#[test]
fn test_mcg128xsl64_serde() {
use bincode;
use std::io::{BufWriter, BufReader};
let mut rng = Mcg128Xsl64::seed_from_u64(0);
let buf: Vec<u8> = Vec::new();
let mut buf = BufWriter::new(buf);
bincode::serialize_into(&mut buf, &rng).expect("Could not serialize");
let buf = b... | rust_cleaned_test_functions.jsonl/52976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
27446,
16,
17,
23,
87,
3226,
21,
19,
75861,
450,
368,
341,
262,
990,
9544,
1851,
280,
262,
990,
1460,
486,
815,
22964,
15064,
6492,
11,
69013,
5062,
2315,
262,
1077,
5206,
28422,
284,
448... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uint_div_no_panic() {
assert_eq!(Uint256::from(6) / Uint256::from(2), Uint256::from(3));
} | rust_cleaned_test_functions.jsonl/47738 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15807,
16237,
6536,
620,
31270,
368,
341,
286,
2060,
10714,
10297,
21570,
17,
20,
21,
486,
1499,
7,
21,
8,
608,
27883,
17,
20,
21,
486,
1499,
7,
17,
701,
27883,
17,
20,
21,
486,
1499,
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 |
#[test]
fn test_map_ex_axis() {
let x = ndarray::array![[[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]].into_ndarray();
let y = map_ex_axis(&x, Axis(1), |x| x.mean().unwrap());
assert_eq!(y, ndarray::array![2.5, 3.5, 4.5]);
} | rust_cleaned_test_functions.jsonl/114645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
2702,
23567,
368,
341,
262,
1077,
856,
284,
66883,
486,
1653,
0,
15505,
58,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
1125,
508,
19,
13,
15,
11,
220,
20,
13,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_celestrak_omm() -> Result<()> {
let elements: Elements = serde_json::from_str(
r#"{
"OBJECT_NAME": "ISS (ZARYA)",
"OBJECT_ID": "1998-067A",
"EPOCH": "2020-07-12T01:19:07.402656",
"MEAN_MOTION": 15.49560532,
... | rust_cleaned_test_functions.jsonl/74830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1395
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
50727,
273,
495,
585,
62,
19786,
368,
1464,
5714,
71698,
341,
286,
1077,
5424,
25,
34157,
284,
61570,
9455,
486,
1499,
2895,
1006,
310,
435,
55543,
515,
394,
330,
43847,
4708,
788,
330,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_empty_string() {
assert_eq!(
apply(
r#"
"" +
"#
.trim()
),
Ok(vec![
Token::String(span(1, 1, "\"\"")),
Token::Symbol(span(1, 4, "+"))
])
)
} | rust_cleaned_test_functions.jsonl/27562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
3904,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
1006,
394,
435,
2,
698,
3014,
3610,
1,
4956,
503,
659,
10666,
741,
310,
2837,
310,
7622,
25592,
90515,
394,
9660,
486,
703,
66092,
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_errors() {
let mut errs = OptParseErrors::new();
assert_eq!(errs.is_empty(), true);
assert_eq!(errs.len(), 0);
errs.push(OptParseError::invalid_option("--abc"));
errs.push(OptParseError::missing_option("--abc"));
#[cfg(feature = "option_ar... | rust_cleaned_test_functions.jsonl/8282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20196,
368,
341,
286,
1077,
5206,
70817,
284,
16554,
14463,
13877,
486,
931,
543,
286,
2060,
10714,
10297,
84735,
2079,
15124,
1507,
830,
317,
286,
2060,
10714,
10297,
84735,
19406,
1507,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compiler_get_cached_or_compile_force_recache() {
drop(env_logger::try_init());
let creator = new_creator();
let f = TestFixture::new();
let pool = ThreadPool::sized(1);
let mut runtime = Runtime::new().unwrap();
let storage = DiskCache::new(&f.temp... | rust_cleaned_test_functions.jsonl/61650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2226
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80910,
3062,
64369,
8734,
74170,
40739,
7080,
1777,
368,
341,
286,
5943,
16978,
27413,
486,
1539,
6137,
1423,
286,
1077,
19919,
284,
501,
68532,
543,
286,
1077,
282,
284,
3393,
18930,
486,
931,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_LDA_immediate_no_flag() {
// Load accumulator. Immediate addressing
let code = vec![0xA9, 0x36];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
assert_eq!(0x8000, nes.PC);
nes.next(&mut memory).unwrap();
assert_eq!(0x8002, ... | rust_cleaned_test_functions.jsonl/38683 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2351,
6352,
17895,
14636,
6536,
10933,
368,
341,
286,
442,
8893,
56312,
13,
80310,
27020,
198,
286,
1077,
2038,
284,
7486,
20703,
15,
14673,
24,
11,
220,
15,
87,
18,
21,
4821,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_mark_creation_time() {
let mut crds = Crds::default();
let entry = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::new_rand(),
0,
)));
let node_pubkey = entry.label().pubkey();
let mut node = C... | rust_cleaned_test_functions.jsonl/45198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 713
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
18924,
46163,
3009,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
4343,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let mut a = vec![11];
assert_eq!(a.get(1), None);
a = vec![11, 12];
assert_eq!(a.get(1).unwrap(), &12);
a = vec![11, 12, 13];
assert_eq!(a.get(1).unwrap(), &12);
} | rust_cleaned_test_functions.jsonl/12847 | {
"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,
3062,
368,
341,
262,
1077,
5206,
264,
284,
7486,
20703,
16,
16,
935,
262,
2060,
10714,
10297,
64,
670,
7,
16,
701,
2240,
317,
262,
264,
284,
7486,
20703,
16,
16,
11,
220,
16,
17,
935,
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_gltexture() {
let s = std::env::var("ASSETS").expect("$env::ASSETS is not ref to a minecraft version.jar");
let ifile = std::fs::File::open(s).unwrap();
let zip = std::rc::Rc::new(std::cell::RefCell::new(AssetsArchive::new(ifile).unwrap()));
let pvd = TextureImageProvider::from(... | rust_cleaned_test_functions.jsonl/11280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34569,
27496,
368,
341,
262,
1077,
274,
284,
1460,
486,
3160,
486,
947,
445,
1911,
71793,
1827,
17119,
20912,
3160,
486,
1911,
71793,
374,
537,
2053,
311,
264,
73873,
2319,
27628,
797,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_subtraction() {
let subtractions = [
["10", "7", "3"],
[
"0",
"3618502788666131213697322783095070105623107215331596699973092056135872020480",
"1",
],
];
for item in subtractions.iter() {
... | rust_cleaned_test_functions.jsonl/128298 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
26425,
368,
341,
286,
1077,
1186,
376,
4020,
284,
2278,
310,
4383,
16,
15,
497,
330,
22,
497,
330,
18,
8097,
310,
2278,
394,
330,
15,
756,
394,
330,
18,
21,
16,
23,
20,
15,
17,
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... | 2 |
#[test]
fn test_readlink() {
let tempdir = tempfile::tempdir().unwrap();
let src = tempdir.path().join("a");
let dst = tempdir.path().join("b");
println!("a: {:?}, b: {:?}", &src, &dst);
fs::symlink(&src.as_path(), &dst.as_path()).unwrap();
let dirfd = open(tempdir.path(),
... | rust_cleaned_test_functions.jsonl/91356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2080,
368,
341,
262,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
2286,
284,
2730,
3741,
3875,
1005,
5987,
445,
64,
797,
262,
1077,
10648,
284,
2730,
3741,
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_look_at_rh_no_displacement_or_rotation() {
let eye = Point3::new(0.0, 0.0, 0.0);
let target = Point3::new(0.0, 0.0, 1.0);
let up = Vector3::unit_y();
let look_at = Matrix4x4::look_at_rh(&eye, &target, &up);
let expected = Vector4::new(0.0, 0.0, 0.0, 1.0);
... | rust_cleaned_test_functions.jsonl/129140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24271,
3752,
1710,
71,
6536,
9932,
16101,
8734,
44813,
368,
341,
286,
1077,
7912,
284,
5126,
18,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
317,
286,
1077,
2169,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concurrent_1() {
use std::thread::spawn;
let t: Vec<_> = (0..100)
.into_iter()
.map(|i| {
spawn(move || {
let a = STR_POOL.intern(i.to_string(), Arc::from);
let v: Vec<_> = (0..100)
... | rust_cleaned_test_functions.jsonl/38597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 480
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
62,
16,
368,
341,
286,
990,
1460,
486,
4528,
486,
46087,
401,
286,
1077,
259,
25,
11312,
32399,
29,
284,
320,
15,
496,
16,
15,
15,
340,
310,
659,
18122,
11723,
741,
310,
659,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_update_edge_potential() {
let left_image = [[1, 1, 1].to_vec(), [1, 0, 1].to_vec(), [1, 1, 1].to_vec()].to_vec();
let right_image = [[1, 1, 1].to_vec(), [1, 0, 1].to_vec(), [1, 1, 1].to_vec()].to_vec();
let mut diffusion_graph = DiffusionGraph::initialize(left_image, righ... | rust_cleaned_test_functions.jsonl/70582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
17932,
57952,
2283,
368,
341,
286,
1077,
2115,
4954,
284,
4318,
16,
11,
220,
16,
11,
220,
16,
936,
983,
13251,
1507,
508,
16,
11,
220,
15,
11,
220,
16,
936,
983,
13251,
1507,
508,
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_recognize_utf8_boundary_dangle_two() {
let buf: &[u8] = &[0x61, 0x61, 0x61, 0xE0, 0xA1, 0x98, 0x0d, 0x0a, 0x0d, 0x0a];
let mut full = buffer_from(buf);
let result = block_on(async { recognize(&mut full).await });
let complex = result.unwrap().find_header("Complex");
assert_eq!(complex,... | rust_cleaned_test_functions.jsonl/48187 | {
"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,
7080,
3934,
551,
39453,
23,
54004,
814,
4044,
23241,
368,
341,
220,
1077,
6607,
25,
44590,
84,
23,
60,
284,
44590,
15,
87,
21,
16,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
21,
16,
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_return_statements() {
let tests = vec![
("return 10;", 10),
("return 10; 9;", 10),
("return 2 * 5; 9;", 10),
("9; return 2 * 5; 9;", 10),
(
"
if (10 > 1) {
if (10 > 1) {
return 10;
... | rust_cleaned_test_functions.jsonl/84230 | {
"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,
12511,
16271,
3723,
368,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
3489,
689,
220,
16,
15,
32503,
220,
16,
15,
1326,
286,
3489,
689,
220,
16,
15,
26,
220,
24,
32503,
220,
16,
15,
1326,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_purge_old_pending_push_messages() {
let mut crds = Crds::default();
let mut push = CrdsGossipPush::default();
let peer = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::new_rand(),
0,
)));
assert_e... | rust_cleaned_test_functions.jsonl/79138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
21108,
37861,
14218,
23428,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
5206,
4484,
284,
4553,
5356,
38,
41473,
16644,
486,
2258,
543,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_from_alogithm_id() {
assert_eq!(
EncryptionMode::try_from(TPM2_ALG_CTR).unwrap(),
EncryptionMode::Ctr
);
assert_eq!(
EncryptionMode::try_from(TPM2_ALG_OFB).unwrap(),
EncryptionMode::Ofb
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/41512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 469
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
8418,
538,
410,
76,
842,
368,
341,
286,
2060,
10714,
33673,
310,
62055,
3636,
486,
1539,
5673,
4140,
8795,
17,
8912,
38,
920,
2378,
568,
15454,
3148,
310,
62055,
3636,
486,
77227,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_unprocessed_batch_limit() {
solana_logger::setup();
// Create `PacketBatch` with 2 unprocessed packets
let new_packet_batch = PacketBatch::new(vec![Packet::default(); 2]);
let mut unprocessed_packets: UnprocessedPacketBatches =
vec![(new_packet_ba... | rust_cleaned_test_functions.jsonl/44194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
4907,
34022,
14534,
14763,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
442,
4230,
1565,
16679,
21074,
63,
448,
220,
17,
650,
34022,
27035,
198,
286,
1077,
501,
21078,
14534,
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_parse_dependencies_section() {
let input = r#"
dependencies {
dep1 {
curl -L http://application.com
}
dep2 {
curl -L http://application2.com
}
}
"#
... | rust_cleaned_test_functions.jsonl/49997 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 640
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
71841,
16221,
368,
341,
286,
1077,
1946,
284,
435,
2,
698,
310,
19543,
341,
394,
2170,
16,
341,
503,
13957,
481,
43,
1758,
1110,
5132,
905,
198,
394,
456,
394,
2170,
17,
341,
503,
13957... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_options_add_macro_definition_no_value() {
let mut c = Compiler::new().unwrap();
let mut options = CompileOptions::new().unwrap();
options.add_macro_definition("E", None);
let result = c
.compile_into_spirv_assembly(
IFDEF_E,
... | rust_cleaned_test_functions.jsonl/41049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 298
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
8743,
2891,
58810,
31698,
6536,
3142,
368,
341,
286,
1077,
5206,
272,
284,
45631,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
2606,
284,
54467,
3798,
486,
931,
1005,
15454,
543,
286,
2606,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_str() {
let schedule = Schedule::from_str("cheesecake 0,30 0,6,12,18 1,15 Jan-March Thurs");
assert!(schedule.is_err());
} | rust_cleaned_test_functions.jsonl/125949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 72
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
5673,
2895,
368,
341,
262,
1077,
9700,
284,
23512,
486,
1499,
2895,
445,
1528,
288,
78256,
220,
15,
11,
18,
15,
220,
15,
11,
21,
11,
16,
17,
11,
16,
23,
220,
16,
11,
16,
20,
4350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_build_world() {
let _ = env_logger::try_init();
let options = DocBuilderOptions::from_prefix(PathBuf::from("../cratesfyi-prefix"));
let mut docbuilder = DocBuilder::new(options);
// This test is building WHOLE WORLD and may take forever
assert!(docbuilder.... | rust_cleaned_test_functions.jsonl/31378 | {
"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,
20801,
31792,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
1539,
6137,
543,
286,
1077,
2606,
284,
21709,
3297,
3798,
486,
1499,
13974,
33030,
15064,
486,
1499,
17409,
5082,
973,
30595,
72,
671... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fidl_socket_addr_v4() {
assert_eq!(
fidl::Ipv4SocketAddress {
address: fidl::Ipv4Address { addr: [192, 168, 0, 1] },
port: 8080
},
fidl_socket_addr_v4!("192.168.0.1:8080")
);
} | rust_cleaned_test_functions.jsonl/12532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
55464,
19555,
7387,
2273,
19,
368,
341,
286,
2060,
10714,
33673,
310,
32104,
75,
486,
80656,
19,
69455,
341,
394,
2621,
25,
32104,
75,
486,
80656,
19,
4286,
314,
10789,
25,
508,
16,
24,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_busy_loop() {
#[cfg(target_os="macos")]
{
// We need root permissions here to run this on OSX
if unsafe { libc::geteuid() } != 0 {
return;
}
}
let mut runner = TestRunner::new(Config::default(), "./tests/scripts/busyloop.py");
let traces = ... | rust_cleaned_test_functions.jsonl/11289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75959,
17198,
368,
341,
262,
11506,
14072,
8637,
29387,
428,
11948,
436,
5422,
262,
341,
286,
442,
1205,
1184,
3704,
8541,
1588,
311,
1598,
419,
389,
87746,
198,
286,
421,
19860,
314,
42142,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_inline_immutable_multiple_times() {
test("var x = null; var y = x, z = x;", "var x; var y, z;");
test("var x = 3; var y = x, z = x;", "var x; var y, z;");
} | rust_cleaned_test_functions.jsonl/27649 | {
"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,
41871,
71370,
5922,
45233,
22353,
368,
341,
262,
1273,
445,
947,
856,
284,
845,
26,
762,
379,
284,
856,
11,
1147,
284,
856,
32503,
330,
947,
856,
26,
762,
379,
11,
1147,
34649,
262,
1273,
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_module_and_function() {
err(
"fun Foo() {} module Foo",
pos(1, 14),
SemError::ShadowFunction("Foo".into()),
);
err(
"module Foo fun Foo() {}",
pos(1, 12),
SemError::ShadowModule("Foo".into()),
... | rust_cleaned_test_functions.jsonl/11803 | {
"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,
10750,
8378,
9174,
368,
341,
286,
1848,
1006,
310,
330,
11894,
33428,
368,
4687,
4688,
33428,
756,
310,
1133,
7,
16,
11,
220,
16,
19,
1326,
310,
14248,
1454,
486,
23667,
5152,
445,
40923,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_protocol_upgrade() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
let dkg_interval_length = 3;
let node_ids = [node_test_id(0)];
let Dependencies {
mut pool,
registry,
cr... | rust_cleaned_test_functions.jsonl/43721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34880,
67794,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
1077,
294,
7351,
20541,
5118,
284,
220,
18,
280,
310,
1077... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_with_progress() {
let tmpdir = setup("git_repo_update_with_progress");
let tarball = tmpdir.mash("../../alpine-base.tgz");
assert!(sys::remove_all(&tmpdir).is_ok());
assert_eq!(git::is_repo(&tmpdir), false);
assert!(
git::Repo::new(&tmp... | rust_cleaned_test_functions.jsonl/114255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
6615,
27200,
368,
341,
286,
1077,
4174,
3741,
284,
6505,
445,
12882,
37784,
8882,
6615,
27200,
797,
286,
1077,
12183,
3959,
284,
4174,
3741,
744,
988,
36800,
278,
38038,
30013,
734,
46589,
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_backup_and_import() {
let mut suite = TestSuite::new(3, 144 * 1024 * 1024);
// 3 version for each key.
let key_count = 60;
suite.must_kv_put(key_count, 3);
// Push down backup request.
let tmp = Builder::new().tempdir().unwrap();
let backup_ts = suite.alloc_ts();
... | rust_cleaned_test_functions.jsonl/92419 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44710,
8378,
18434,
368,
341,
262,
1077,
5206,
16182,
284,
3393,
28000,
486,
931,
7,
18,
11,
220,
16,
19,
19,
353,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
317,
262,
442,
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... | 4 |
#[test]
fn test_event() {
run_in_task(|mut cx| {
let mut isolate = setup();
isolate
.execute("event_test.js", include_str!("event_test.js"))
.unwrap();
if let Poll::Ready(Err(_)) = isolate.poll_event_loop(&mut cx) {
unreachable!();
}
});
} | rust_cleaned_test_functions.jsonl/12652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6748,
368,
341,
262,
1598,
1243,
12184,
22428,
6984,
20716,
91,
341,
414,
1077,
5206,
42123,
284,
6505,
543,
414,
42123,
198,
286,
659,
10257,
445,
3087,
4452,
2857,
497,
2924,
2895,
17223,
3087,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_top_collector_with_limit_and_offset() {
let collector = TopCollector::with_limit(2).and_offset(1);
let results = collector
.merge_fruits(vec![vec![
(0.9, DocAddress::new(0, 1)),
(0.8, DocAddress::new(0, 2)),
(0.7, DocAd... | rust_cleaned_test_functions.jsonl/17428 | {
"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,
10426,
10211,
27669,
6615,
14763,
8378,
6917,
368,
341,
286,
1077,
31953,
284,
6909,
53694,
486,
4197,
14763,
7,
17,
568,
437,
6917,
7,
16,
626,
286,
1077,
3059,
284,
31953,
198,
310,
659,
19052... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_primitive_array_iter_round_trip() {
let array = Int32Array::from(vec![Some(0), None, Some(2), None, Some(4)]);
let array = Arc::new(array) as ArrayRef;
let array = array.as_any().downcast_ref::<Int32Array>().unwrap();
let result: Int32Array = array.iter... | rust_cleaned_test_functions.jsonl/117559 | {
"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,
84087,
3858,
11723,
29896,
63883,
368,
341,
286,
1077,
1334,
284,
1333,
18,
17,
1857,
486,
1499,
25592,
20703,
8373,
7,
15,
701,
2240,
11,
4329,
7,
17,
701,
2240,
11,
4329,
7,
19,
41958,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_write() {
let evt = EventFd::new(EFD_NONBLOCK).unwrap();
evt.write(55).unwrap();
assert_eq!(evt.read().unwrap(), 55);
} | rust_cleaned_test_functions.jsonl/18670 | {
"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,
6443,
9165,
368,
341,
286,
1077,
12358,
284,
3665,
74476,
486,
931,
10722,
14596,
22128,
39964,
568,
15454,
543,
286,
12358,
3836,
7,
20,
20,
568,
15454,
543,
286,
2060,
10714,
10297,
28734,
4125,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_bytes_clone_drop() {
let vec = vec![33u8; 1024];
let b1 = Bytes::from(vec);
let _b2 = b1.clone();
} | rust_cleaned_test_functions.jsonl/32063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
54742,
29584,
368,
341,
262,
1077,
7486,
284,
7486,
20703,
18,
18,
84,
23,
26,
220,
16,
15,
17,
19,
935,
262,
1077,
293,
16,
284,
30024,
486,
1499,
25592,
317,
262,
1077,
716,
65,
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 |
#[test]
fn test_ensemble_get_aggregated_score() {
let name1 = "John Doe";
let name2 = "John Doe";
let jw = JaroWinklerMatcher::default();
let soundex = SoundexMatcher::default();
let matchers: Vec<Box<dyn Matcher>> = vec![Box::new(jw), Box::new(soundex)];
let m... | rust_cleaned_test_functions.jsonl/25044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
48475,
3062,
20587,
93040,
10405,
368,
341,
286,
1077,
829,
16,
284,
330,
13079,
49628,
876,
286,
1077,
829,
17,
284,
330,
13079,
49628,
3302,
286,
1077,
502,
86,
284,
619,
17165,
54,
766,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pok_multiple_sigs_with_same_msg() {
// Prove knowledge of multiple signatures and the equality of a specific message under both signatures.
// Knowledge of 2 signatures and their corresponding messages is being proven.
// 2nd message in the 1st signature and 5th message i... | rust_cleaned_test_functions.jsonl/82484 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
562,
45233,
643,
14462,
6615,
33574,
6483,
368,
341,
286,
442,
1298,
586,
6540,
315,
5248,
32628,
323,
279,
21777,
315,
264,
3151,
1943,
1212,
2176,
32628,
624,
286,
442,
31925,
315,
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_hover_through_expr_in_macro() {
let hover_on = check_hover_result(
"
//- /lib.rs
macro_rules! id {
($($tt:tt)*) => { $($tt)* }
}
fn foo(bar:u32) {
let a = id!(ba<|>r);
}
",... | rust_cleaned_test_functions.jsonl/33507 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
87399,
21915,
1243,
58810,
368,
341,
286,
1077,
19548,
4470,
284,
1779,
53445,
5287,
1006,
310,
6228,
310,
78406,
608,
2740,
25638,
198,
310,
18072,
21407,
0,
877,
341,
394,
1711,
699,
5566... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_riddle_create() {
let riddle = Riddle::new(
"title".to_string(),
"text".to_string(),
"hint".to_string(),
"answer".to_string(),
1,
);
assert_eq!(riddle.get_title(), "title");
assert_eq!(riddle.get_text(), ... | rust_cleaned_test_functions.jsonl/34251 | {
"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,
1710,
3310,
8657,
368,
341,
286,
1077,
435,
3310,
284,
431,
3310,
486,
931,
1006,
310,
330,
2102,
3263,
983,
3904,
3148,
310,
330,
1318,
3263,
983,
3904,
3148,
310,
330,
46125,
3263,
983,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_a_plus_b_less_than_c() {
assert_expression!(
"A + B < C",
Expression::BinaryExpression(
Operator::Less,
Box::new(
Expression::BinaryExpression(
Operator::Plus,
... | rust_cleaned_test_functions.jsonl/102651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
28043,
880,
50747,
51613,
666,
368,
341,
310,
2060,
28068,
33673,
394,
330,
32,
488,
425,
366,
356,
756,
394,
16378,
486,
21338,
9595,
1006,
503,
28498,
486,
27451,
345,
503,
8261,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_are_snapshots_compatible() {
solana_logger::setup();
let slot1: Slot = 1234;
let slot2: Slot = 5678;
let slot3: Slot = 999_999;
let full_snapshot_archive_info = FullSnapshotArchiveInfo::new_from_path(PathBuf::from(
format!("/dir/snapshot... | rust_cleaned_test_functions.jsonl/67603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 759
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
56855,
74175,
27634,
2965,
37079,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
9446,
16,
25,
31316,
284,
220,
16,
17,
18,
19,
280,
286,
1077,
9446,
17,
25,
31316,
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_parse_arguments_response_file() {
assert_eq!(
CompilerArguments::CannotCache("@", None),
parse_arguments_(stringvec!["-c", "foo.c", "@foo", "-o", "foo.o"], false)
);
assert_eq!(
CompilerArguments::CannotCache("@", None),
par... | rust_cleaned_test_functions.jsonl/17759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
9655,
2458,
368,
341,
286,
2060,
10714,
33673,
310,
45631,
19139,
486,
17444,
8233,
10662,
497,
2240,
1326,
310,
4715,
43433,
8361,
917,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consumer_initialize_error() {
let v = vec![];
let mut c = InitializeErrorConsumer {};
let p = Parser::new(&v, &mut c);
let ret = p.parse();
assert_matches!(ret, Err(State::ConsumerError(_)));
if let Err(State::ConsumerError(err)) = ret {
... | rust_cleaned_test_functions.jsonl/85744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73969,
40889,
4096,
368,
341,
286,
1077,
348,
284,
7486,
0,
15078,
286,
1077,
5206,
272,
284,
9008,
1454,
29968,
9321,
286,
1077,
281,
284,
21102,
486,
931,
2099,
85,
11,
609,
6984,
272,
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... | 2 |
#[test]
fn test_move_try_from() {
let input_and_expected:Vec<(&'static str,Result<Move, TypeConvertError<String>>)> = vec![
("",Err(TypeConvertError::SyntaxError(String::from(
"Invalid SFEN character string (number of characters of move expression is invalid)")))),
("Z*1a",Err(TypeConvertError::Synta... | rust_cleaned_test_functions.jsonl/46530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
53283,
5673,
368,
972,
10217,
1946,
8378,
32190,
25,
10050,
27,
2099,
6,
1978,
607,
11,
2077,
27,
9860,
11,
3990,
12012,
1454,
3464,
2452,
16018,
284,
7486,
20703,
319,
197,
197,
19814,
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_native_libs_tracking_hash_different_values() {
let mut v1 = super::basic_options();
let mut v2 = super::basic_options();
let mut v3 = super::basic_options();
// Reference
v1.libs = vec![(String::from("a"), cstore::NativeStatic),
(St... | rust_cleaned_test_functions.jsonl/122249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44494,
16142,
82,
66105,
8950,
82741,
9146,
368,
341,
286,
1077,
5206,
348,
16,
284,
2256,
486,
22342,
8743,
543,
286,
1077,
5206,
348,
17,
284,
2256,
486,
22342,
8743,
543,
286,
1077,
5206,
348... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unique_event() {
let trim_at = 5;
let trim_to = 2;
let mut events: Vec<String> = vec![];
assert!(check_unique_event(
"A".into(),
&mut events,
trim_at,
trim_to
));
assert_eq!(vec!["A"], events);... | rust_cleaned_test_functions.jsonl/32326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 845
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
21218,
6748,
368,
341,
286,
1077,
11013,
3752,
284,
220,
20,
280,
286,
1077,
11013,
2346,
284,
220,
17,
280,
286,
1077,
5206,
4357,
25,
11312,
3464,
29,
284,
7486,
0,
40901,
286,
2060,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_datetime_sub() {
let ymdhms = |y,m,d,h,n,s| NaiveDate::from_ymd(y,m,d).and_hms(h,n,s);
assert_eq!(ymdhms(2014, 5, 6, 7, 8, 9) - ymdhms(2014, 5, 6, 7, 8, 9), Duration::zero());
assert_eq!(ymdhms(2014, 5, 6, 7, 8, 10) - ymdhms(2014, 5, 6, 7, 8, 9),
Durati... | rust_cleaned_test_functions.jsonl/99633 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
5228,
368,
341,
286,
1077,
379,
2277,
71,
1011,
284,
760,
88,
13086,
11991,
19806,
10128,
10671,
91,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7021,
13086,
11991,
568,
437,
1523,
1011,
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_mul_checked() {
let a = Primitive::from(&vec![None, Some(6), None, Some(6)]).to(DataType::Int32);
let b = Primitive::from(&vec![Some(5), None, None, Some(6)]).to(DataType::Int32);
let result = checked_mul(&a, &b).unwrap();
let expected = Primitive::from(&vec![None... | rust_cleaned_test_functions.jsonl/12703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 359
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
56456,
368,
341,
286,
1077,
264,
284,
51460,
486,
1499,
2099,
4083,
20703,
4064,
11,
4329,
7,
21,
701,
2240,
11,
4329,
7,
21,
7252,
568,
983,
63941,
486,
1072,
18,
17,
317,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_send_first_not_connect() {
let main = "127.0.0.1:19500".parse().unwrap();
let other = "127.0.0.1:19501".parse().unwrap();
let mut connect_list = ConnectList::default();
let mut t1 = ConnectionParams::from_address(main);
let main_key = t1.connect_info.public_key;
connect_... | rust_cleaned_test_functions.jsonl/46396 | {
"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,
13565,
12978,
7913,
15720,
368,
341,
262,
1077,
1887,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
16,
24,
20,
15,
15,
3263,
6400,
1005,
15454,
543,
262,
1077,
1008,
284,
330,
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_merge_unmodified_blob_into_blob_into_tree() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let ours = commit! {
foo {
bar < "bar contents"
}
};
let theirs = commit! {
foo < "default foo contents"
};
... | rust_cleaned_test_functions.jsonl/94164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
4907,
27162,
45908,
45514,
45908,
45514,
11663,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
11350,
284,
5266,
0,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_key_derivation() {
let data = hex::decode("7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f7f").unwrap();
let mnemonic = Mnemonic::from("legal winner thank year wave sausage worth useful legal winner thank year wave sausage worth useful legal will").unwrap();
assert_eq!(
mnemon... | rust_cleaned_test_functions.jsonl/8534 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 862
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
35345,
39127,
368,
341,
262,
1077,
821,
284,
12371,
486,
18196,
445,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
22,
69,
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_introduce_var_for_cast() {
check_assist(
introduce_variable,
"
fn main() {
let v = <|>0f32 as u32<|>;
}
",
"
fn main() {
let <|>var_name = 0f32 as u32;
let v = var_name;
}
",
);
} | rust_cleaned_test_functions.jsonl/108765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
47845,
4612,
5478,
5303,
368,
341,
286,
1779,
12083,
380,
1006,
310,
19131,
14635,
345,
310,
6228,
8822,
1887,
368,
341,
262,
1077,
348,
284,
82639,
29,
15,
69,
18,
17,
438,
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_clone_from() {
let mut v = vec![];
let three: Vec<Box<_>> = vec![box 1, box 2, box 3];
let two: Vec<Box<_>> = vec![box 4, box 5];
v.clone_from(&three);
assert_eq!(v, three);
// equal
v.clone_from(&three);
assert_eq!(v, three);
v.clone_from(&two);
... | rust_cleaned_test_functions.jsonl/24398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
5673,
368,
341,
262,
1077,
5206,
348,
284,
7486,
0,
15078,
262,
1077,
2326,
25,
11312,
79852,
32399,
2452,
284,
7486,
20703,
2011,
220,
16,
11,
3745,
220,
17,
11,
3745,
220,
18,
935,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte_array_new_with() -> super::PyResult<()> {
Python::with_gil(|py| -> super::PyResult<()> {
let py_bytearray = PyByteArray::new_with(py, 10, |b: &mut [u8]| {
b.copy_from_slice(b"Hello Rust");
Ok(())
})?;
let bytearray:... | rust_cleaned_test_functions.jsonl/47846 | {
"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,
19737,
3858,
5921,
6615,
368,
1464,
2256,
486,
13828,
2077,
71698,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
1464,
2256,
486,
13828,
2077,
71698,
341,
310,
1077,
4510,
19737,
1653,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ns_rw() {
{
let e: Element = Element::parse(File::open("tests/data/ns1.xml").unwrap()).unwrap();
let mut buf = Vec::new();
e.write(&mut buf);
let e2 = Element::parse(Cursor::new(buf)).unwrap();
assert_eq!(e, e2);
}
{
let e: Element =... | rust_cleaned_test_functions.jsonl/15718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34728,
49566,
368,
341,
262,
341,
286,
1077,
384,
25,
8543,
284,
8543,
486,
6400,
19821,
486,
2508,
445,
23841,
13167,
82492,
16,
9028,
1827,
15454,
6011,
15454,
1428,
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... | 1 |
#[test]
fn test_set_root_object_properties() {
let mut doc = Frontend::new();
let change_request = doc
.change::<_, InvalidChangeRequest>(Some("set root object".into()), |doc| {
doc.add_change(LocalChange::set(
Path::root().key("bird"),
Value::Primitiv... | rust_cleaned_test_functions.jsonl/75976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
12993,
5314,
25158,
368,
341,
262,
1077,
5206,
4629,
284,
14902,
408,
486,
931,
543,
262,
1077,
2297,
7893,
284,
4629,
198,
286,
659,
3373,
27638,
6878,
13882,
4072,
1900,
2235,
8373,
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... | 2 |
#[test]
fn test_load_extension() {
let conn = connection_without_transaction();
// disable extension loading
conn.disable_load_extension().unwrap();
// try loading module without enabling extension loading
let result = sql_query("SELECT load_extension('/tmp/foo');")
.execute(&conn)... | rust_cleaned_test_functions.jsonl/79416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 262
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
31035,
368,
341,
262,
1077,
4534,
284,
3633,
39904,
28884,
1428,
262,
442,
11156,
8894,
8277,
198,
262,
4534,
42628,
12411,
31035,
1005,
15454,
1428,
262,
442,
1430,
8277,
4688,
2041,
27362,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_snapshots() {
let id = Id::random::<Provider>().expect(line_error!());
let key = Key::<Provider>::random().expect(line_error!());
let blobs = Blob::new();
let mut client = Client::new(id, blobs);
client.add_vault(&key);
let tx_id = client.create... | rust_cleaned_test_functions.jsonl/68827 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74175,
27634,
368,
341,
286,
1077,
877,
284,
5223,
486,
11463,
27638,
5179,
10483,
17119,
8797,
4096,
0,
1423,
286,
1077,
1376,
284,
5309,
27638,
5179,
6831,
11463,
1005,
17119,
8797,
4096,
0,
523... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hex_string_to_binary() {
assert_eq!(hex_string_to_binary("0123456789abcdef"), Ok(vec![0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef]));
assert!(hex_string_to_binary("0123456789abcde").is_err());
assert!(hex_string_to_binary("0123456789abcdefg").is_err());
} | rust_cleaned_test_functions.jsonl/115258 | {
"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,
32655,
3904,
2346,
31761,
368,
341,
286,
2060,
10714,
10297,
17308,
3904,
2346,
31761,
445,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
41202,
3975,
7622,
25592,
20703,
15,
87,
15,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_pod_class_by_value() {
let cxx = indoc! {"
uint32_t take_bob(Bob a) {
return a.a;
}
"};
let hdr = indoc! {"
#include <cstdint>
class Bob {
public:
uint32_t a;
uint32_t b;
};
uint32_t take... | rust_cleaned_test_functions.jsonl/9756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
85337,
4790,
3710,
3142,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
1896,
880,
674,
5349,
674,
264,
8,
341,
310,
470,
264,
5849,
280,
286,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_domain() {
let spec = ChainSpec::mainnet();
test_domain(Domain::BeaconProposer, spec.domain_beacon_proposer, &spec);
test_domain(Domain::BeaconAttester, spec.domain_beacon_attester, &spec);
test_domain(Domain::Randao, spec.domain_randao, &spec);
test_... | rust_cleaned_test_functions.jsonl/90750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
20111,
368,
341,
286,
1077,
1398,
284,
28525,
8327,
486,
3817,
4711,
1428,
286,
1273,
20111,
5432,
3121,
486,
3430,
22379,
2008,
23438,
11,
1398,
11003,
880,
12508,
443,
21663,
23438,
11,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_d01_p1_proper() {
let input = generate_input(&std::fs::read_to_string("./input/2018/day1.txt").unwrap());
let result = solve_part_1(&input);
assert_eq!(466, result);
} | rust_cleaned_test_functions.jsonl/71161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
15,
16,
620,
16,
2540,
712,
368,
341,
286,
1077,
1946,
284,
6923,
5898,
2099,
1834,
486,
3848,
486,
878,
2346,
3904,
13988,
1355,
14,
17,
15,
16,
23,
44739,
16,
3909,
1827,
15454,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3mask_not() {
assert_eq!((!Vec3Mask::new(false, false, false)).bitmask(), 0b111);
assert_eq!((!Vec3Mask::new(true, true, true)).bitmask(), 0b000);
assert_eq!((!Vec3Mask::new(true, false, true)).bitmask(), 0b010);
assert_eq!((!Vec3Mask::new(false, true, false)).bitmask(), 0b101... | rust_cleaned_test_functions.jsonl/48600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
11258,
7913,
368,
341,
262,
2060,
10714,
0,
1188,
0,
10050,
18,
12686,
486,
931,
3576,
11,
895,
11,
895,
4579,
4489,
11258,
1507,
220,
15,
65,
16,
16,
16,
317,
262,
2060,
10714,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_features() {
// Test all feature combinations.
for must_tell_host in vec![true, false].iter() {
for deflate_on_oom in vec![true, false].iter() {
for stats_interval in vec![0, 1].iter() {
let mut balloon =
... | rust_cleaned_test_functions.jsonl/133170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
14965,
368,
341,
286,
442,
3393,
678,
4565,
27459,
624,
286,
369,
1969,
528,
613,
12848,
304,
7486,
20703,
1866,
11,
895,
936,
2015,
368,
341,
310,
369,
92689,
4470,
62,
4191,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_what_do() {
assert_eq!(
SyncAction::PopulateRemote,
Syncer::what_do(RemoteDataState::Empty, LocalDataState::Unchanged)
);
assert_eq!(
SyncAction::PopulateRemote,
Syncer::what_do(RemoteDataState::Empty, LocalDataState::Change... | rust_cleaned_test_functions.jsonl/104885 | {
"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,
62,
12555,
26309,
368,
341,
286,
2060,
10714,
33673,
310,
28937,
2512,
486,
11598,
6334,
24703,
345,
310,
28937,
261,
486,
12555,
26309,
2785,
336,
1272,
1043,
1397,
486,
3522,
11,
8774,
1043,
139... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simd_load_set_invalid() {
let a = Int64Array::from(vec![None, Some(15), Some(5), Some(0)]);
let new_bitmap = &Some(Bitmap::from(Buffer::from([0b00001010])));
let simd_lanes = 8;
let result = unsafe {
simd_load_set_invalid::<Int64Type>(&a, &new_bitmap, ... | rust_cleaned_test_functions.jsonl/16034 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18314,
67,
12411,
2602,
31433,
368,
341,
286,
1077,
264,
284,
1333,
21,
19,
1857,
486,
1499,
25592,
20703,
4064,
11,
4329,
7,
16,
20,
701,
4329,
7,
20,
701,
4329,
7,
15,
41958,
286,
1077,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_scope() {
let mut compiler = Compiler::new();
compiler.declare_local(String::from("var1"));
compiler.declare_local(String::from("var2"));
compiler.push_scope();
compiler.declare_local(String::from("var3"));
assert_eq!(compiler.locals.len(), 3);
let push_ops = compiler... | rust_cleaned_test_functions.jsonl/55424 | {
"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,
23199,
368,
341,
262,
1077,
5206,
19415,
284,
45631,
486,
931,
543,
262,
19415,
2285,
67554,
13564,
2242,
486,
1499,
445,
947,
16,
4010,
262,
19415,
2285,
67554,
13564,
2242,
486,
1499,
445,
947,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_series_equal() {
let a = Series::new("a", &[1, 2, 3]);
let b = Series::new("a", &[1, 2, 3]);
assert!(a.series_equal(&b));
let s = Series::new("foo", &[None, Some(1i64)]);
assert!(s.series_equal_missing(&s));
} | rust_cleaned_test_functions.jsonl/22779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35015,
11478,
368,
341,
286,
1077,
264,
284,
11131,
486,
931,
445,
64,
497,
44590,
16,
11,
220,
17,
11,
220,
18,
2558,
286,
1077,
293,
284,
11131,
486,
931,
445,
64,
497,
44590,
16,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_gtk_element() {
let gtk = Gtk::new(1, GtkInfoTx::_OnlyRx, &vec![24; 16][..]);
assert_eq!(gtk.info.key_id(), 1);
assert_eq!(gtk.info.tx(), 0);
assert_eq!(>k.gtk[..], &vec![24; 16][..]);
} | rust_cleaned_test_functions.jsonl/52436 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1889,
6242,
7894,
368,
341,
286,
1077,
18692,
284,
27296,
486,
931,
7,
16,
11,
27296,
1731,
31584,
13541,
7308,
50639,
11,
609,
4083,
20703,
17,
19,
26,
220,
16,
21,
1457,
496,
2558,
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_make_count_l1() {
let transformation = make_count::<i64, u32>().unwrap_test();
let arg = vec![1, 2, 3, 4, 5];
let ret = transformation.invoke(&arg).unwrap_test();
let expected = 5;
assert_eq!(ret, expected);
} | rust_cleaned_test_functions.jsonl/109022 | {
"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,
28230,
3180,
907,
16,
368,
341,
286,
1077,
17991,
284,
1281,
3180,
27638,
72,
21,
19,
11,
575,
18,
17,
10483,
15454,
4452,
543,
286,
1077,
1392,
284,
7486,
20703,
16,
11,
220,
17,
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_match_on_a_slash() {
let string = "~a/24";
let option_test: Option<Mechanism<String>>;
option_test = helpers::capture_matches(&string, Kind::A);
let test = option_test.unwrap();
assert_eq!(test.is_softfail(), true);
assert_eq!(test.raw(), "/24");
assert_eq!(test.to_... | rust_cleaned_test_functions.jsonl/90568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
4470,
4306,
11886,
988,
368,
341,
262,
1077,
914,
284,
51269,
64,
14,
17,
19,
876,
262,
1077,
2999,
4452,
25,
6959,
33274,
4737,
67813,
3464,
2452,
401,
262,
2999,
4452,
284,
30187,
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_compile_shift_left_a() {
let compiled = bitwise::compile_shift_left("A".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b00011101);
} | rust_cleaned_test_functions.jsonl/100599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
22230,
9579,
4306,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
22230,
9579,
445,
32,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_quote() -> Result<()> {
let sql = quote("Hello, 'World'");
assert_eq!(&sql, "'Hello, ''World'''");
let sql = baquote("Hello, 'World'");
assert_eq!(&sql, "`Hello, 'World'`");
let sql = dquote("Hello, 'World'");
assert_eq!(&sql, "\"Hello, 'World'\"... | rust_cleaned_test_functions.jsonl/12584 | {
"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,
45236,
368,
1464,
5714,
71698,
341,
286,
1077,
5704,
284,
12641,
445,
9707,
11,
364,
10134,
28116,
286,
2060,
10714,
0,
2099,
3544,
11,
7178,
9707,
11,
3355,
10134,
18788,
3071,
286,
1077,
5704,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_radians() {
let pi: f64 = consts::PI;
let nan: f64 = NAN;
let inf: f64 = INFINITY;
let neg_inf: f64 = NEG_INFINITY;
assert_eq!(0.0f64.to_radians(), 0.0);
assert_approx_eq!(154.6f64.to_radians(), 2.698279);
assert_approx_eq!((-332.31f64).... | rust_cleaned_test_functions.jsonl/7846 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
1710,
20736,
368,
341,
286,
1077,
8938,
25,
282,
21,
19,
284,
95432,
486,
1893,
280,
286,
1077,
20021,
25,
282,
21,
19,
284,
92129,
280,
286,
1077,
4132,
25,
282,
21,
19,
284,
1964,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_public_data_conversions_deposit() {
let expected_op = {
let priority_op = Deposit {
from: Address::from_str("2a0a81e257a2f5d6ed4f07b81dbda09f107bd026").unwrap(),
to: Address::from_str("21abaed8712072e918632259780e587698ef58da").unwrap(),
... | rust_cleaned_test_functions.jsonl/130110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27074,
1769,
3382,
28290,
85798,
368,
341,
286,
1077,
3601,
10287,
284,
341,
310,
1077,
10619,
10287,
284,
48471,
341,
394,
504,
25,
9177,
486,
1499,
2895,
445,
17,
64,
15,
64,
23,
16,
68,
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_write_nonblocking() {
let (_s, stream) = Server::new();
stream.set_nonblocking(true).unwrap();
let cx = SslContext::builder(SslMethod::tls()).unwrap().build();
let mut stream = handshake(Ssl::new(&cx).unwrap().connect(stream));
let mut iterations = 0;
loop {
iter... | rust_cleaned_test_functions.jsonl/35530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
21637,
70356,
368,
341,
262,
1077,
5453,
82,
11,
4269,
8,
284,
8422,
486,
931,
543,
262,
4269,
980,
21637,
70356,
3715,
568,
15454,
543,
262,
1077,
20716,
284,
328,
3226,
1972,
486,
17850,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_method_call_on_partial() -> TestResult {
let p = Polar::new();
p.load_str("g(x) if x.foo();")?;
let mut q = p.new_query_from_term(term!(call!("g", [sym!("a")])), false);
let error = q.next_event().unwrap_err();
assert!(matches!(
error,
... | rust_cleaned_test_functions.jsonl/63017 | {
"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,
9032,
13429,
4470,
52068,
368,
1464,
3393,
2077,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
5104,
2895,
445,
70,
2075,
8,
421,
856,
58432,
2129,
899,
37445,
286,
1077,
5206,
2804,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_utf8_input() {
let mut input = "\0ÀÖØöø˿ͰͽͿ⁰Ⰰ、豈﷏ﷰ𐀀".as_input();
assert_eq!(input.head(), In('\u{0}'));
input.step();
assert_eq!(input.head(), In('\u{C0}'));
input.step();
assert_eq!(input.head(), In('\u{D6}'));
input.step();
... | rust_cleaned_test_functions.jsonl/32348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 974
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39453,
23,
5898,
368,
341,
286,
1077,
5206,
1946,
284,
2917,
15,
71953,
63361,
144050,
2956,
6151,
135,
123,
137,
108,
137,
121,
137,
123,
123955,
123,
52133,
108,
25928,
237,
124374,
222,
126185,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cookie_secure_string_is_added() {
let cookie = CookieOptions {
cookie_name: "".to_string(),
cookie_value: None,
max_age: None,
domain: None,
path: None,
secure: true,
http_only: false,
same_si... | rust_cleaned_test_functions.jsonl/101600 | {
"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,
38663,
73088,
3904,
6892,
37653,
368,
341,
286,
1077,
12544,
284,
24356,
3798,
341,
310,
12544,
1269,
25,
44907,
983,
3904,
3148,
310,
12544,
3142,
25,
2240,
345,
310,
1932,
32053,
25,
2240,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_repeat_with_take_collect() {
let mut curr = 1;
let v: Vec<_> = repeat_with(|| { let tmp = curr; curr *= 2; tmp })
.take(5).collect();
assert_eq!(v, vec![1, 2, 4, 8, 16]);
} | rust_cleaned_test_functions.jsonl/54171 | {
"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,
41975,
6615,
73261,
68140,
368,
341,
262,
1077,
5206,
9804,
284,
220,
16,
280,
262,
1077,
348,
25,
11312,
32399,
29,
284,
13153,
6615,
79453,
314,
1077,
4174,
284,
9804,
26,
9804,
11404,
220,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_sanity_on_in_flight_opens() {
do_test_sanity_on_in_flight_opens(0);
do_test_sanity_on_in_flight_opens(0 | 0b1000_0000);
do_test_sanity_on_in_flight_opens(1);
do_test_sanity_on_in_flight_opens(1 | 0b1000_0000);
do_test_sanity_on_in_flight_opens(2);
do_test_sanity_on_in_flight_opens(2 | 0b10... | rust_cleaned_test_functions.jsonl/16863 | {
"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,
643,
38270,
4470,
1243,
90370,
10287,
724,
368,
341,
19935,
4452,
643,
38270,
4470,
1243,
90370,
10287,
724,
7,
15,
317,
19935,
4452,
643,
38270,
4470,
1243,
90370,
10287,
724,
7,
15,
760,
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_io_memory_layout() {
use std::mem;
assert_eq!(mem::size_of::<Io>(), mem::size_of::<sys::ImGuiIO>());
assert_eq!(mem::align_of::<Io>(), mem::align_of::<sys::ImGuiIO>());
use memoffset::offset_of;
use sys::ImGuiIO;
macro_rules! assert_field_offset {
($l:ident, $r:id... | rust_cleaned_test_functions.jsonl/60544 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1988
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16939,
19195,
14466,
368,
341,
262,
990,
1460,
486,
10536,
280,
262,
2060,
10714,
10297,
10536,
486,
2141,
3575,
27638,
42799,
39019,
1833,
486,
2141,
3575,
27638,
7791,
486,
37950,
3810,
32872,
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_block_cache_capacity() {
let path = tempdir_with_prefix("_rust_rocksdb_set_and_get_block_cache_capacity");
let mut opts = DBOptions::new();
let mut cf_opts = ColumnFamilyOptions::new();
opts.create_if_missing(true);
let mut block_opts = BlockBasedOptions::new();
let mut ... | rust_cleaned_test_functions.jsonl/34108 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
11529,
35603,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
2602,
8378,
3062,
7113,
11529,
35603,
3071,
262,
1077,
5206,
12185,
284,
5952,
3798,
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_make_up() {
let cxx = indoc! {"
Bob::Bob() : a(3) {
}
uint32_t take_bob(const Bob& a) {
return a.a;
}
"};
let hdr = indoc! {"
#include <cstdint>
class Bob {
public:
Bob();
uint32_t a;
... | rust_cleaned_test_functions.jsonl/9751 | {
"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,
28230,
8237,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
14261,
486,
32388,
368,
549,
264,
7,
18,
8,
341,
286,
456,
286,
2622,
18,
17,
528,
1896,
880,
674,
2741,
14261,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pending_versions() {
let search = json!({
"issues": [
{
"key": "KEY-1",
"fields": {}
},
{
"key": "KEY-2",
"fields": {
... | rust_cleaned_test_functions.jsonl/112383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 762
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
37861,
65148,
368,
341,
286,
1077,
2711,
284,
2951,
0,
2262,
310,
330,
18427,
788,
2278,
394,
341,
503,
330,
792,
788,
330,
4784,
12,
16,
756,
503,
330,
9007,
788,
5613,
394,
1153,
394,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_input_error_display() {
assert_eq!(
format!("{}", AppError::InvalidInput("An error".to_owned())),
format!("{} An error", Red.bold().paint("[InvalidInputError]"))
);
} | rust_cleaned_test_functions.jsonl/63281 | {
"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,
31433,
5898,
4096,
14825,
368,
341,
286,
2060,
10714,
33673,
310,
3561,
79878,
1845,
1454,
486,
7928,
2505,
445,
2082,
1465,
3263,
983,
51973,
73727,
310,
3561,
17223,
6257,
1527,
1465,
497,
3731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_comment_select() {
let expected_sql = "SELECT \"users\".* FROM \"users\" /* trace_id='5bd66ef5095369c7b0d1f8f4bd33716a', parent_id='c532cb4098ac3dd2' */";
let query = Select::from_table("users")
.comment("trace_id='5bd66ef5095369c7b0d1f8f4bd33716a', parent_id='c532cb4... | rust_cleaned_test_functions.jsonl/6451 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17638,
13051,
368,
341,
286,
1077,
3601,
18063,
284,
330,
4858,
7245,
4218,
2105,
4908,
4295,
7245,
4218,
2105,
1391,
11655,
842,
1131,
20,
8940,
21,
21,
823,
20,
15,
24,
20,
18,
21,
24,
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... | 1 |
#[test]
fn test_dynamic_rmq() {
let mut arq = DynamicArq::<AssignMin>::new(false);
let view = arq.build_from_slice(&[0; 10]);
assert_eq!(arq.query(view, 0, 9), 0);
arq.update(view, 2, 4, &-5);
arq.update(view, 5, 7, &-3);
arq.update(view, 1, 6, &1);
ass... | rust_cleaned_test_functions.jsonl/44435 | {
"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,
45992,
1710,
27674,
368,
341,
286,
1077,
5206,
796,
80,
284,
21886,
6953,
80,
27638,
28933,
6217,
6831,
931,
3576,
317,
286,
1077,
1651,
284,
796,
80,
13239,
5673,
26488,
2099,
58,
15,
26,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.