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_system_path_timing() {
let mut cfg = KompactConfig::default();
println!("Configuring network");
cfg.system_components(DeadletterBox::new, NetworkConfig::default().build());
println!("Starting KompactSystem");
let system = cfg.build().expect("KompactSystem"... | rust_cleaned_test_functions.jsonl/28247 | {
"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,
17687,
2638,
70973,
368,
341,
286,
1077,
5206,
13286,
284,
730,
14435,
531,
2648,
486,
2258,
543,
286,
13751,
17223,
2648,
1677,
3922,
797,
286,
13286,
15936,
23258,
7,
28320,
9451,
1611,
486,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_epoch_slots_fill_range() {
let range: Vec<Slot> = (0..5000).collect();
let mut slots = EpochSlots::default();
assert_eq!(slots.fill(&range, 1), 5000);
assert_eq!(slots.wallclock, 1);
assert_eq!(slots.to_slots(0), range);
assert_eq!(slots.to_slots(4... | rust_cleaned_test_functions.jsonl/116101 | {
"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,
20682,
54161,
30728,
9698,
368,
341,
286,
1077,
2088,
25,
11312,
27,
19877,
29,
284,
320,
15,
496,
20,
15,
15,
15,
568,
17384,
543,
286,
1077,
5206,
15711,
284,
87379,
51647,
486,
2258,
543,
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_versions() {
let cmd = ChanCmd::VERSIONS;
assert_eq!(Into::<u8>::into(cmd), 7_u8);
vbody(
cmd,
"000300040005",
&msg::Versions::new(vec![3, 4, 5]).unwrap().into(),
);
} | rust_cleaned_test_functions.jsonl/6038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65148,
368,
341,
262,
1077,
5439,
284,
41302,
15613,
486,
17636,
50,
280,
262,
2060,
10714,
10297,
26591,
27638,
84,
23,
6831,
18122,
14160,
701,
220,
22,
7300,
23,
626,
262,
348,
2599,
1006,
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_asin() {
let a = Angle::asin(0.5).unwrap();
assert_approx_eq!(a.degrees(), 30.0);
let a = Angle::asin(-f32::sqrt(3.0)/2.0).unwrap();
assert_approx_eq!(a.degrees(), -60.0, "a.degrees() -> {} ({})", a.degrees(), crate::fp::EQ_THRESHOLD_F32);
} | rust_cleaned_test_functions.jsonl/109960 | {
"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,
11898,
258,
368,
341,
286,
1077,
264,
284,
36237,
486,
50310,
7,
15,
13,
20,
568,
15454,
543,
286,
2060,
90425,
10714,
10297,
64,
70417,
7858,
1507,
220,
18,
15,
13,
15,
626,
286,
1077,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse() {
let inputs = read_lines("data/day_14_sample.txt");
let (template, rules) = parse_inputs(&inputs);
assert_eq!(template, vec!["N", "N", "C", "B"]);
assert_eq!(rules.len(), 16)
} | rust_cleaned_test_functions.jsonl/105364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
368,
341,
262,
1077,
11127,
284,
1349,
18323,
445,
691,
44739,
62,
16,
19,
17491,
3909,
797,
262,
1077,
320,
4214,
11,
5601,
8,
284,
4715,
28557,
2099,
24941,
626,
262,
2060,
10714,
10297... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gitlab_error_detection() {
let endpoint = ExpectedUrl::builder()
.endpoint("dummy")
.status(StatusCode::NOT_FOUND)
.build()
.unwrap();
let client = SingleTestClient::new_json(
endpoint,
&json!({
... | rust_cleaned_test_functions.jsonl/4924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68801,
14380,
4096,
57505,
368,
341,
286,
1077,
14887,
284,
31021,
2864,
486,
17850,
741,
310,
659,
32540,
445,
31390,
1138,
310,
659,
2829,
7,
15872,
486,
14065,
24687,
340,
310,
659,
5834,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_for_each_in_method() {
check_assist(
convert_iter_for_each_to_for,
r#"
//- minicore: iterators
fn main() {
let it = core::iter::repeat(92);
it.$0for_each(|(x, y)| {
println!("x: {}, y: {}", x, y);
})
}
"#,
r#"
fn main() {
let it... | rust_cleaned_test_functions.jsonl/101850 | {
"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,
5478,
32046,
1243,
9032,
368,
341,
286,
1779,
12083,
380,
1006,
310,
5508,
11723,
5478,
32046,
2346,
5478,
345,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
90865,
198,
8822,
1887,
368,
341,
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_error_without_stack() {
let mut runtime = JsRuntime::new(RuntimeOptions::default());
// SyntaxError
let result = runtime.execute(
"error_without_stack.js",
r#"
function main() {
console.log("asdf);
}
main();
"#,
);
let expected_error = r#"Uncaught SyntaxError: ... | rust_cleaned_test_functions.jsonl/4865 | {
"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,
4096,
39904,
15528,
368,
341,
262,
1077,
5206,
15592,
284,
39122,
15123,
486,
931,
52610,
3798,
486,
2258,
1423,
262,
442,
32117,
1454,
198,
262,
1077,
1102,
284,
15592,
7769,
1006,
414,
330,
841,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_icns() {
assert_eq_ok!(
ImageInfo::from_file_path("images/valid/icns/sample.icns"),
ImageInfo {
format: ImageFormat::ICNS,
ext: "icns",
full_ext: "icns",
mimetype: "image/icns",
size: ImageSize { width: 128, height: ... | rust_cleaned_test_functions.jsonl/65161 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32747,
4412,
368,
341,
262,
2060,
10714,
19817,
33673,
286,
4654,
1731,
486,
1499,
2458,
2638,
445,
3642,
14,
1891,
76398,
4412,
69851,
27822,
4412,
4461,
286,
4654,
1731,
341,
310,
3561,
25,
4654... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_missing_comma_and_age() {
let p: Person = Person::from("Mark");
assert_eq!(p.name, "John");
assert_eq!(p.age, 30);
} | rust_cleaned_test_functions.jsonl/1613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
2965,
1728,
8378,
32053,
368,
341,
286,
1077,
281,
25,
7357,
284,
7357,
486,
1499,
445,
8949,
797,
286,
2060,
10714,
10297,
79,
2644,
11,
330,
13079,
797,
286,
2060,
10714,
10297,
79,
308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_move() {
let it = 1;
let that = 2;
let mut room = Room::new(vec![He, It, That]);
room.action(&He.moves(It, on(That))).unwrap();
assert!(room.objects[it].is_on(That));
assert!(!room.objects[that].is_on(It));
room.action(&He.moves(That, on(It... | rust_cleaned_test_functions.jsonl/38381 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 432
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17134,
368,
341,
286,
1077,
432,
284,
220,
16,
280,
286,
1077,
429,
284,
220,
17,
280,
286,
1077,
5206,
3054,
284,
10420,
486,
931,
25592,
20703,
1519,
11,
1084,
11,
2938,
2558,
286,
3054,
123... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_error_importexport_get_status() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"importexport-get-status.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
... | rust_cleaned_test_functions.jsonl/61953 | {
"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,
21039,
4096,
18434,
1533,
3062,
4773,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
41737,
756,
310,
330,
474,
1533,
22491,
34998,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_p1() {
let (max_x, max_y, map) = parse_input(sample);
assert_eq!(58, p1(max_x, max_y, &map));
} | rust_cleaned_test_functions.jsonl/77862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
16,
368,
341,
286,
1077,
320,
2810,
3212,
11,
1932,
4178,
11,
2415,
8,
284,
4715,
5898,
32968,
317,
286,
2060,
10714,
10297,
20,
23,
11,
281,
16,
8739,
3212,
11,
1932,
4178,
11,
609,
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 |
#[test]
fn test_draw_hollow_ellipse() {
use imageproc::drawing::draw_hollow_ellipse_mut;
let red = Rgb([255, 0, 0]);
let green = Rgb([0, 255, 0]);
let blue = Rgb([0, 0, 255]);
let mut image = RgbImage::from_pixel(200, 200, Rgb([255, 255, 255]));
// Circle
draw_hollow_ellipse_mut(&m... | rust_cleaned_test_functions.jsonl/81482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
1523,
1544,
62,
68004,
368,
341,
262,
990,
2168,
15782,
486,
80849,
486,
7633,
1523,
1544,
62,
68004,
29523,
401,
262,
1077,
2518,
284,
431,
9511,
2561,
17,
20,
20,
11,
220,
15,
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_node_size() {
let node = Node::default();
let node_size = node.meta.size() +
node.address.size() +
node.payload.size();
assert_eq!(node.size(), node_size)
} | rust_cleaned_test_functions.jsonl/56011 | {
"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,
5084,
2368,
368,
341,
262,
1077,
2436,
284,
6018,
486,
2258,
543,
262,
1077,
2436,
2368,
284,
2436,
24888,
2486,
368,
3610,
503,
2436,
13792,
2486,
368,
3610,
503,
2436,
17492,
2486,
543,
262,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_escape_unicode() {
fn string(c: char) -> String {
let iter: String = c.escape_unicode().collect();
let disp: String = c.escape_unicode().to_string();
assert_eq!(iter, disp);
iter
}
assert_eq!(string('\x00'), "\\u{0}");
assert_eq!(string('\n'), "\\... | rust_cleaned_test_functions.jsonl/109588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21832,
54662,
368,
341,
262,
5168,
914,
1337,
25,
1161,
8,
1464,
923,
341,
286,
1077,
5367,
25,
923,
284,
272,
57081,
54662,
1005,
17384,
543,
286,
1077,
12965,
25,
923,
284,
272,
57081,
54662,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_with_lock_no_ancestors() {
let key = Keypair::new();
let index = AccountsIndex::<bool>::default();
let slot = 0;
let account_info = true;
let new_entry = WriteAccountMapEntry::new_entry_after_update(slot, &account_info);
let mut w_account_m... | rust_cleaned_test_functions.jsonl/45166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 525
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
6615,
9818,
6536,
62,
681,
267,
1087,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1077,
9446,
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_unique_multiple_types() {
let v = to_value(vec![Value::Number(12.into()), Value::Array(vec![])]).unwrap();
let args = HashMap::new();
let result = unique(&v, &args);
assert!(result.is_err());
assert_eq!(result.unwrap_err().to_string(), "unique filter can'... | rust_cleaned_test_functions.jsonl/62061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21218,
45233,
9763,
368,
341,
286,
1077,
348,
284,
311,
3142,
25592,
20703,
1130,
486,
2833,
7,
16,
17,
39860,
11858,
5162,
486,
1857,
25592,
0,
1294,
7252,
568,
15454,
543,
286,
1077,
2827,
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_bridge_config_from_c8y_params() -> anyhow::Result<()> {
use std::convert::TryFrom;
let params = BridgeConfigC8yParams {
connect_url: ConnectUrl::try_from("test.test.io")?,
mqtt_tls_port: 8883,
config_file: "c8y-bridge.conf".into(),
remote_clientid: "alpha"... | rust_cleaned_test_functions.jsonl/52665 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54944,
5332,
5673,
666,
23,
88,
6745,
368,
1464,
88964,
486,
2077,
71698,
341,
262,
990,
1460,
486,
14166,
486,
21453,
3830,
280,
262,
1077,
3628,
284,
19874,
2648,
34,
23,
88,
4870,
341,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_error_s3_create_bucket() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/error",
"s3-create-bucket.xml",
);
let mock = MockRequestDispatcher::with_status(400).with_body(&mock_response);
let client = ... | rust_cleaned_test_functions.jsonl/29194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 244
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4096,
643,
18,
8657,
38749,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
41737,
756,
310,
330,
82,
18,
39679,
1455,
11152,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_limit_array() {
let a: ArrayRef = Arc::new(Int32Array::from(vec![5, 6, 7, 8, 9]));
let b = limit(&a, 3);
let c = b.as_ref().as_any().downcast_ref::<Int32Array>().unwrap();
assert_eq!(3, c.len());
assert_eq!(5, c.value(0));
assert_eq!(6, c.value(1))... | rust_cleaned_test_functions.jsonl/56707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14763,
3858,
368,
341,
286,
1077,
264,
25,
2910,
3945,
284,
19689,
486,
931,
24123,
18,
17,
1857,
486,
1499,
25592,
20703,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
14382,
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_df_compatible_si() {
let (_, mut ucmd) = at_and_ucmd!();
let result = ucmd.arg("-aH").run();
assert!(result.success);
} | rust_cleaned_test_functions.jsonl/3988 | {
"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,
10894,
2965,
37079,
40983,
368,
341,
262,
1077,
39464,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
1102,
284,
575,
8710,
21186,
13645,
64,
39,
1827,
6108,
543,
262,
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 |
#[test]
fn test_parse_non_csi_escape_codes() {
let mut map = HashMap::<_, _>::from_iter(IntoIter::new([
("OP", Event::Key(Key::new(KeyCode::F(1)))),
("OS", Event::Key(Key::new(KeyCode::F(4)))),
(
"O5P^",
Event::Key(Key::new_mod(KeyCode:... | rust_cleaned_test_functions.jsonl/122259 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 864
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
21637,
666,
6321,
21832,
38482,
368,
341,
286,
1077,
5206,
2415,
284,
10528,
27638,
6878,
716,
6831,
1499,
11723,
24123,
78,
8537,
486,
931,
8956,
310,
3489,
3067,
497,
3665,
486,
1592,
213... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_isbn_to_array() {
let a = "ISBN13 978-1-4920-6766-5";
let b = "ISBN13 9781492067665";
let c = "978-1-4920-6766-5";
let d = "9781492067665";
let expected = [9, 7, 8, 1, 4, 9, 2, 0, 6, 7, 6, 6, 5];
assert_eq!(isbn_to_array(a).unwrap(), expected);
... | rust_cleaned_test_functions.jsonl/92003 | {
"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,
6892,
11081,
2346,
3858,
368,
341,
286,
1077,
264,
284,
330,
45185,
16,
18,
220,
24,
22,
23,
12,
16,
12,
19,
24,
17,
15,
12,
21,
22,
21,
21,
12,
20,
876,
286,
1077,
293,
284,
330,
45185,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_arm_simple() {
match Capstone::new().arm().mode(arm::ArchMode::Arm).build() {
Ok(cs) => match cs.disasm_all(ARM_CODE, 0x1000) {
Ok(insns) => {
assert_eq!(insns.len(), 2);
let is: Vec<_> = insns.iter().collect();
assert_eq!(i... | rust_cleaned_test_functions.jsonl/127417 | {
"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,
34680,
30015,
368,
341,
262,
2432,
8012,
10812,
486,
931,
1005,
2178,
1005,
8516,
7,
2178,
486,
18727,
3636,
486,
32913,
568,
5834,
368,
341,
286,
7622,
41153,
8,
589,
2432,
10532,
7773,
10530,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_index_mut() {
let mut p = POINT2;
*&mut p[0] = 0;
assert_eq!(p, [0, 2].into());
} | rust_cleaned_test_functions.jsonl/45370 | {
"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,
3560,
29523,
368,
341,
310,
1077,
5206,
281,
284,
46595,
17,
280,
310,
77745,
6984,
281,
58,
15,
60,
284,
220,
15,
280,
310,
2060,
10714,
10297,
79,
11,
508,
15,
11,
220,
17,
936,
18122,
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 |
#[test]
fn test_de_too_large() {
assert_de_tokens_error::<ArrayString<[u8; 2]>>(&[
Token::Str("afd")
], "invalid length 3, expected a string no more than 2 bytes long");
} | rust_cleaned_test_functions.jsonl/67025 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
2346,
78,
45228,
368,
341,
286,
2060,
2259,
28838,
4096,
27638,
1857,
703,
66746,
84,
23,
26,
220,
17,
60,
2452,
2099,
9640,
310,
9660,
486,
2580,
445,
92139,
1138,
286,
10654,
330,
11808,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_call_hierarchy_on_ref() {
check_hierarchy(
r#"
//- /lib.rs
fn callee() {}
fn caller() {
call$0ee();
}
"#,
expect![["callee Function FileId(0) 0..14 3..9"]],
expect![["caller Function FileId(0) 15..44 18..24 : [33..39]"]],
expect![[]],
... | rust_cleaned_test_functions.jsonl/38284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
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_other() {
let req = TestRequest::get()
.insert_header(("Content-Type", "foo/bar"))
.to_http_request();
assert_eq!(
ContentType::Other,
ContentType::from_request_content_type(&req)
);
} | rust_cleaned_test_functions.jsonl/28364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30456,
368,
341,
286,
1077,
4232,
284,
3393,
1900,
486,
455,
741,
310,
659,
4208,
8757,
30873,
2762,
10804,
497,
330,
7975,
49513,
5455,
310,
659,
983,
25888,
7893,
1428,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_u64() {
test_parse_ok(&[
("<bla>0</bla>", 0),
("<bla>1234</bla>", 1234),
("<bla> 1234 </bla>", 1234),
]);
} | rust_cleaned_test_functions.jsonl/54622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
7300,
21,
19,
368,
341,
262,
1273,
21039,
19817,
2099,
9640,
286,
90276,
64726,
29,
15,
522,
64726,
21156,
220,
15,
1326,
286,
90276,
64726,
29,
16,
17,
18,
19,
522,
64726,
21156,
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_siyam() {
run_test(
&TEST_DATA,
"harfbuzz/good-siyam.bn",
"bengali/Siyamrupali_1_01.ttf",
&[JOINER_GLYPH_INDEX],
28,
);
} | rust_cleaned_test_functions.jsonl/91150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
16220,
309,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
1331,
16220,
309,
60862,
756,
503,
330,
65,
826,
7956,
11374,
16220,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_height_2() {
// more precisely `curl`ed from locally build docker image of:
// 606d0a89ccabbd3e59cff521f9f4d875cc366ac9
// via
let json_data = r#"
{
"version": {
"block": "10",
"app": "1"
},
"chain_id": "dockerchain",
... | rust_cleaned_test_functions.jsonl/14125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 798
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
9561,
62,
17,
368,
341,
1789,
286,
442,
803,
23638,
1565,
19925,
63,
291,
504,
23490,
1936,
26588,
2168,
315,
510,
1789,
286,
442,
220,
21,
15,
21,
67,
15,
64,
23,
24,
638,
370,
8940,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unshift() {
let mut x = vec![1i, 2, 3];
x.unshift(0);
assert_eq!(x, vec![0, 1, 2, 3]);
} | rust_cleaned_test_functions.jsonl/33150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
13418,
368,
341,
286,
1077,
5206,
856,
284,
7486,
20703,
16,
72,
11,
220,
17,
11,
220,
18,
935,
286,
856,
51161,
7,
15,
317,
286,
2060,
10714,
10297,
87,
11,
7486,
20703,
15,
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 |
#[test]
fn test_encode() {
let mut frame = Frame::new(0xFF, &[0x03, 0x00, 0x04, 0x00, 0x01]);
frame.transaction_id = 0x1501;
let frame = frame.encode().unwrap();
let expected_frame = vec![0x15, 0x01, 0x00, 0x00, 0x00, 0x06, 0xFF, 0x03, 0x00, 0x04, 0x00, 0x01];
assert_eq!(... | rust_cleaned_test_functions.jsonl/132688 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
368,
341,
286,
1077,
5206,
4034,
284,
16321,
486,
931,
7,
15,
9264,
11,
44590,
15,
87,
15,
18,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
19,
11,
220,
15,
87,
15,
15,
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_chunks() {
let first = Block::new().column("A", vec![1, 2]);
let second = Block::new().column("A", vec![3, 4]);
let third = Block::new().column("A", vec![5]);
let block = Block::<Simple>::new().column("A", vec![1, 2, 3, 4, 5]);
let mut iter = block.chunks... | rust_cleaned_test_functions.jsonl/52587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65470,
368,
341,
286,
1077,
1156,
284,
8362,
486,
931,
1005,
6229,
445,
32,
497,
7486,
20703,
16,
11,
220,
17,
2558,
286,
1077,
2086,
284,
8362,
486,
931,
1005,
6229,
445,
32,
497,
7486,
20703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dim_qualified() {
assert_eq!(
linter_ok("DIM A$"),
vec![TopLevelToken::Statement(Statement::Dim(
DimName::new_compact_local("A", TypeQualifier::DollarString).into_list_rc(1, 5)
))
.at_rc(1, 1)]
);
} | rust_cleaned_test_functions.jsonl/122468 | {
"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,
10791,
62,
36335,
368,
341,
262,
2060,
10714,
33673,
286,
326,
2245,
19817,
445,
75119,
362,
3,
4461,
286,
7486,
20703,
5366,
4449,
3323,
486,
8636,
7,
8636,
486,
10344,
1006,
310,
8126,
675,
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_depot() {
let mut depot = Depot::with_capacity(6);
assert!(depot.capacity() >= 6);
depot.insert("one", "ONE".to_owned());
assert!(depot.contains_key("one"));
assert_eq!(depot.get::<String>("one").unwrap(), &"ONE".to_owned());
assert_eq!(depot.get... | rust_cleaned_test_functions.jsonl/11375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
19099,
368,
341,
286,
1077,
5206,
44619,
284,
46970,
486,
4197,
35603,
7,
21,
317,
286,
2060,
10297,
14891,
354,
59168,
368,
2604,
220,
21,
626,
286,
44619,
7030,
445,
603,
497,
330,
5225,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_server_shutdown() {
let f = TestFixture::new();
let (port, _sender, _storage, child) = run_server_thread(&f.tempdir.path(), None);
// Connect to the server.
let conn = connect_to_server(port).unwrap();
// Ask it to shut down
request_shutdown(conn).unwrap();
// Ensure ... | rust_cleaned_test_functions.jsonl/82344 | {
"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,
12015,
54804,
368,
341,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
320,
403,
11,
716,
11644,
11,
716,
16172,
11,
1682,
8,
284,
1598,
12015,
10814,
2099,
69,
32669,
3741,
3875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fail_2() {
#[rpn_fn]
fn foo(v: &Option<Real>) -> Result<Option<Real>> {
Ok(v.map(|v| v * 2.0))
}
let exp = RpnExpressionBuilder::new()
.push_constant(3.0f64)
.push_constant(1.5f64)
.push_fn_ca... | rust_cleaned_test_functions.jsonl/65663 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
22121,
62,
17,
368,
341,
394,
11506,
81,
19958,
15246,
921,
286,
5168,
15229,
3747,
25,
609,
5341,
64829,
9231,
1464,
5714,
94150,
64829,
2452,
341,
310,
7622,
3747,
4770,
22428,
85,
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_full() {
let (tx, rx) = channel();
let read_pool = ReadPool::new(
"readpool",
&Config {
high_concurrency: 2,
max_tasks_high: 4,
..Config::default()
},
|| || Context {},
);
... | rust_cleaned_test_functions.jsonl/55321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1014
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
368,
341,
286,
1077,
320,
3998,
11,
19111,
8,
284,
5496,
1428,
286,
1077,
1349,
15709,
284,
4457,
10551,
486,
931,
1006,
310,
330,
878,
10285,
756,
310,
609,
2648,
341,
394,
1550,
3382,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_add_voter_peer_promotes_self_sets_is_learner() {
setup_for_test();
let mut n1 = new_test_raft(1, vec![1], 10, 1, new_storage());
// Node is already voter.
n1.add_learner(1);
assert_eq!(n1.is_learner, false);
assert!(n1.prs().voter_ids().contains(&1));
n1.remove_node(1... | rust_cleaned_test_functions.jsonl/107186 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
2273,
25392,
45159,
47877,
6295,
25637,
21289,
6892,
62,
93595,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5206,
308,
16,
284,
501,
4452,
62,
2944,
7,
16,
11,
7486,
20703,
16,
1125,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let hash = "$argon2id$v=19$m=4096,t=128,p=2$gt4I/z7gnC8Ao0ofCFvz+2LGxI3it1TnCnlxn0PWKko$v6V587B9qbKraulhK/6vFUq93BGWugdzgRhtyap9tDM";
let hash_raw = decode_rust(hash).unwrap();
assert_eq!(hash_raw.variant(), Variant::Argon2id);
assert_eq!(hash_raw.versi... | rust_cleaned_test_functions.jsonl/21730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 750
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
368,
341,
286,
1077,
5175,
284,
5201,
70821,
17,
307,
65020,
28,
16,
24,
53516,
28,
19,
15,
24,
21,
13960,
28,
16,
17,
23,
7237,
28,
17,
3,
5178,
19,
40,
31082,
22,
4905,
34,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_long() {
// Test random error locations.
let mut buf = [Hexbit::default(); 36];
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
.iter()
.map(|&b| Hexbit::new(b))
.collect_slice(&mut buf[..]);
long::encode(&m... | rust_cleaned_test_functions.jsonl/39698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
17799,
368,
341,
286,
442,
3393,
4194,
1465,
10468,
624,
286,
1077,
5206,
6607,
284,
508,
20335,
4489,
486,
2258,
2129,
220,
18,
21,
935,
286,
508,
16,
11,
220,
15,
11,
220,
15,
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... | 3 |
#[test]
fn test_check_and_open() {
let path = TempDir::new("_util_rocksdb_test_check_column_families").expect("");
let path_str = path.path().to_str().unwrap();
// create db when db not exist
let cfs_opts = vec![CFOptions::new(CF_DEFAULT, ColumnFamilyOptions::new())];
ch... | rust_cleaned_test_functions.jsonl/92330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
8378,
11311,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
1314,
26608,
14553,
1999,
4452,
7200,
8744,
761,
58904,
1827,
17119,
13056,
286,
1077,
1815,
2895,
284,
1815,
3875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cost_tracker_reach_vote_limit() {
let (mint_keypair, start_hash) = test_setup();
// build two mocking vote transactions with diff accounts
let second_account = Keypair::new();
let (_tx1, tx_cost1) = build_simple_vote_transaction(&mint_keypair, &start_hash);
... | rust_cleaned_test_functions.jsonl/23075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 600
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15890,
50264,
1288,
610,
54360,
14763,
368,
341,
286,
1077,
320,
67791,
3097,
12670,
11,
1191,
8950,
8,
284,
1273,
21363,
543,
286,
442,
1936,
1378,
66483,
6910,
14131,
448,
3638,
9618,
198,
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_extract_assignment_chained_if() {
mark::check!(test_extract_assigment_chained_if);
check_assist(
extract_assigment,
r#"
fn foo() {
let mut a = 1;
if true {
<|>a = 2;
} else if false {
a = 3;
} else {
a = 4;
}
}"... | rust_cleaned_test_functions.jsonl/113117 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
51891,
4138,
2627,
11119,
368,
341,
286,
1868,
486,
2028,
10297,
1944,
39123,
12083,
343,
478,
4138,
2627,
11119,
317,
286,
1779,
12083,
380,
1006,
310,
8649,
12083,
343,
478,
345,
310,
435... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_large_utf8_body() {
let mock_body: String = rand::thread_rng()
.sample_iter(&Alphanumeric)
.take(3 * 1024) // Must be larger than the request read buffer
.collect();
let _m = mock("GET", "/").with_body(&mock_body).create();
let (_, _, body) = request("GET /"... | rust_cleaned_test_functions.jsonl/82414 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45228,
39453,
23,
14114,
368,
341,
262,
1077,
7860,
14114,
25,
923,
284,
10382,
486,
4528,
66849,
741,
286,
659,
13611,
11723,
2099,
2101,
65788,
340,
286,
659,
22769,
7,
18,
353,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mut_slice_to() {
let mut values = Vec::from_slice([1u8,2,3,4,5]);
{
let slice = values.mut_slice_to(2);
assert!(slice == [1, 2]);
for p in slice.mut_iter() {
*p += 1;
}
}
assert!(values.as_slice() ==... | rust_cleaned_test_functions.jsonl/58450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
26488,
2346,
368,
341,
286,
1077,
5206,
2750,
284,
11312,
486,
1499,
26488,
2561,
16,
84,
23,
11,
17,
11,
18,
11,
19,
11,
20,
2558,
286,
341,
310,
1077,
15983,
284,
2750,
744,
332,
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... | 2 |
#[test]
fn test_process_rotate() {
if let Ok(r) = ProcessRotate::from_file("src/process_rotate.bin") {
assert_eq!(r.buf1, vec!([0x48, 0x65, 0x6c, 0x6c, 0x6f]));
assert_eq!(r.buf2, vec!([0x57, 0x6f, 0x72, 0x6c, 0x64]));
assert_eq!(r.buf3, vec!([0x54, 0x68, 0x65, 0x72, 0x65]));
}
} | rust_cleaned_test_functions.jsonl/73799 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
60834,
368,
341,
262,
421,
1077,
7622,
2601,
8,
284,
8603,
34540,
486,
1499,
2458,
445,
3548,
86780,
60834,
29394,
899,
341,
286,
2060,
10714,
10297,
81,
44485,
16,
11,
7486,
0,
2561,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_check_header() {
const INVALID_SHORT: &str = "ZCZC-ORG-EEE-+0000-0001122-NOCALL00-";
const VALID_ONE: &str = "ZCZC-ORG-EEE-012345+0000-0001122-NOCALL00-";
const VALID_TWO: &str = "ZCZC-ORG-EEE-012345-567890+0000-0001122-NOCALL00-garbage";
assert_eq!(
... | rust_cleaned_test_functions.jsonl/46733 | {
"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,
7200,
8757,
368,
341,
286,
733,
32269,
16456,
25,
609,
495,
284,
330,
57,
34,
57,
34,
12,
44927,
12,
32837,
12,
10,
15,
15,
15,
15,
12,
15,
15,
15,
16,
16,
17,
17,
11250,
7612,
3919,
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_bilinearity() {
use crate::Scalar;
let a = Scalar::from_raw([1, 2, 3, 4]).invert().unwrap().square();
let b = Scalar::from_raw([5, 6, 7, 8]).invert().unwrap().square();
let c = a * b;
let g = G1Affine::from(G1Affine::generator() * a);
let h = G2Affine::from(G2Affine::ge... | rust_cleaned_test_functions.jsonl/30786 | {
"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,
880,
26560,
10748,
368,
341,
262,
990,
17717,
486,
20639,
401,
262,
1077,
264,
284,
35176,
486,
1499,
16067,
2561,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
10697,
83729,
1005,
15454,
1005,
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_server_snapshot_on_resolve_failure() {
let _guard = crate::setup();
let mut cluster = new_server_cluster(1, 4);
configure_for_snapshot(&mut cluster);
let on_resolve_fp = "transport_snapshot_on_resolve";
let on_send_store_fp = "transport_on_send_store";
let pd_client = A... | rust_cleaned_test_functions.jsonl/77360 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 959
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12015,
53265,
4470,
77291,
43618,
368,
341,
262,
1077,
716,
26098,
284,
17717,
486,
15188,
543,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
16,
11,
220,
19,
317,
262,
14411,
5478,
53265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validate() {
assert!(validate(&[0x0, 0x61, 0x73, 0x6d, 0x1, 0x0, 0x0, 0x0]).is_ok());
assert!(validate(&[0x0, 0x61, 0x73, 0x6d, 0x2, 0x0, 0x0, 0x0]).is_err());
} | rust_cleaned_test_functions.jsonl/57542 | {
"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,
42681,
368,
341,
262,
2060,
10297,
7067,
2099,
58,
15,
87,
15,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
22,
18,
11,
220,
15,
87,
21,
67,
11,
220,
15,
87,
16,
11,
220,
15,
87,
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_file() {
let c = make();
// Deserialize the entire file as single struct
let s: Settings = c.try_deserialize().unwrap();
assert!(s.debug.approx_eq_ulps(&1.0, 2));
assert_eq!(s.production, Some("false".to_string()));
assert_eq!(s.code, AsciiCode(53));
assert_eq!(s.pl... | rust_cleaned_test_functions.jsonl/8236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 675
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
368,
341,
262,
1077,
272,
284,
1281,
1428,
262,
442,
48440,
279,
4453,
1034,
438,
3175,
2036,
198,
262,
1077,
274,
25,
11296,
284,
272,
48779,
15768,
9050,
1005,
15454,
1428,
262,
2060,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_set_block_at() {
let mut world = ChunkMap::new();
let mut chunk = Chunk::new(ChunkPosition::new(0, 0));
GridChunkGenerator {}.generate(&mut chunk);
world.insert(chunk);
println!("-----");
world.set_block_at(BlockPosition::new(1, 63, 1), Block::Ai... | rust_cleaned_test_functions.jsonl/128021 | {
"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,
2602,
7113,
3752,
368,
341,
286,
1077,
5206,
1879,
284,
45513,
2227,
486,
931,
1428,
286,
1077,
5206,
11879,
284,
45513,
486,
931,
7,
28304,
3812,
486,
931,
7,
15,
11,
220,
15,
1106,
286,
1058... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_jump_zero() {
let mut program = Program{
code: vec![1, 3, 42],
ip: 0,
move_ip: true,
rel_base: 0,
param_indices: vec![1, 2],
finish: false
};
// Don't jump
jump_zero(&mut program);
ass... | rust_cleaned_test_functions.jsonl/52447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65436,
19359,
368,
341,
286,
1077,
5206,
2025,
284,
6687,
515,
310,
2038,
25,
7486,
20703,
16,
11,
220,
18,
11,
220,
19,
17,
1259,
310,
5997,
25,
220,
15,
345,
310,
3271,
10385,
25,
830,
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_generic_f64() {
let t1 = Generic { data: 2f64 };
assert_eq!(
rune_n! {
make_native_module().expect("failed making native module"),
(t1, ),
f64 =>
pub fn main(v) { v.get_value() }
},
2.0
);
} | rust_cleaned_test_functions.jsonl/77916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41232,
761,
21,
19,
368,
341,
262,
1077,
259,
16,
284,
21281,
314,
821,
25,
220,
17,
69,
21,
19,
2605,
262,
2060,
10714,
33673,
286,
63499,
1089,
0,
341,
310,
1281,
44494,
10750,
1005,
17119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_matches_with_multiple_patterns_same_root() {
allocations::record(|| {
let language = get_language("javascript");
let query = Query::new(
language,
"
(pair
key: (property_identifier) @method-def
value:... | rust_cleaned_test_functions.jsonl/25149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 519
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
38344,
6615,
45233,
64923,
33574,
12993,
368,
341,
262,
69642,
486,
8548,
79453,
341,
286,
1077,
4128,
284,
633,
29021,
445,
14073,
797,
286,
1077,
3239,
284,
11361,
486,
931,
1006,
310,
412... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_generate_type_check_with_string() {
let provider = "provider";
let probe = "probe";
let types = &[DataType::Native(dtrace_parser::DataType::String)];
let use_statements = vec![];
let expected = quote! {
let __usdt_private_args_lambda = $args_la... | rust_cleaned_test_functions.jsonl/8788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
1819,
7200,
6615,
3904,
368,
341,
286,
1077,
9109,
284,
330,
19979,
876,
286,
1077,
21730,
284,
330,
52329,
876,
286,
1077,
4494,
284,
44590,
22653,
486,
20800,
1500,
15067,
18517,
486,
226... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_from_resource_table() {
let mut table = ResourceTable::default();
let rid1 = table.add("fake1", Box::new(FakeResource::new(1)));
let rid2 = table.add("fake2", Box::new(FakeResource::new(2)));
assert_eq!(table.map.len(), 2);
let res1 = table.remove::<FakeResource>(rid1);
... | rust_cleaned_test_functions.jsonl/133164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
5673,
17962,
5237,
368,
341,
262,
1077,
5206,
1965,
284,
11765,
2556,
486,
2258,
543,
262,
1077,
9279,
16,
284,
1965,
1364,
445,
30570,
16,
497,
8261,
486,
931,
7832,
726,
4783,
486,
931,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request() {
use helix::*;
let req = GetUserBlockListRequest::builder()
.broadcaster_id("23161357")
.build();
let data = br#"
{
"data": [
{
"user_id": "135093069",
"user_login": "bluelava",
"display_name": "BlueLava"
},... | rust_cleaned_test_functions.jsonl/4257 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
368,
341,
262,
990,
11338,
941,
56162,
262,
1077,
4232,
284,
85937,
4713,
852,
1900,
486,
17850,
741,
286,
659,
65,
8546,
32020,
842,
445,
17,
18,
16,
21,
16,
18,
20,
22,
1138,
286,
65... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shl_reg_cl() {
assert_emit!(0xD3, 0xE0; emit_shl_reg_cl(0, RAX));
assert_emit!(0x41, 0xD3, 0xE1; emit_shl_reg_cl(0, R9));
assert_emit!(0x48, 0xD3, 0xE0; emit_shl_reg_cl(1, RAX));
assert_emit!(0x49, 0xD3, 0xE1; emit_shl_reg_cl(1, R9));
} | rust_cleaned_test_functions.jsonl/85465 | {
"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,
3712,
75,
4920,
6794,
368,
341,
286,
2060,
69082,
10297,
15,
15764,
18,
11,
220,
15,
12606,
15,
26,
16691,
3712,
75,
4920,
6794,
7,
15,
11,
431,
2954,
1106,
286,
2060,
69082,
10297,
15,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rundown_flags_refcount() {
// Initialize an empty bit flags.
let mut flags = RundownFlags::empty();
assert_eq!(0, flags.get_ref());
assert_eq!(true, flags.is_ref_zero());
assert_eq!(false, flags.is_ref_active());
// Validate that add ref works.
... | rust_cleaned_test_functions.jsonl/52962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
1241,
779,
14130,
7793,
1830,
368,
341,
286,
442,
9008,
458,
4287,
2699,
8042,
624,
286,
1077,
5206,
8042,
284,
431,
1241,
779,
9195,
486,
3194,
543,
286,
2060,
10714,
10297,
15,
11,
8042,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_const() {
let input = vec![
vec!["abc".to_string(), "abc".to_string(), "666".to_string()],
vec!["1234".to_string(), "7777".to_string(), "DEFG".to_string()],
vec![
"12345".to_string(),
"12345".to_string(),
"12345".to_string(),
],
];
let result = vec![Some(... | rust_cleaned_test_functions.jsonl/92579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 210
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13610,
368,
341,
220,
1077,
1946,
284,
7486,
90515,
262,
7486,
0,
1183,
13683,
3263,
983,
3904,
1507,
330,
13683,
3263,
983,
3904,
1507,
330,
21,
21,
21,
3263,
983,
3904,
73845,
262,
7486,
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_is_anagram() {
assert!(is_anagram("anagram".to_string(), "nagaram".to_string()));
assert!(!is_anagram("rat".to_string(), "car".to_string()));
} | rust_cleaned_test_functions.jsonl/25338 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
12008,
5745,
368,
341,
262,
2060,
10297,
285,
12008,
5745,
445,
276,
5745,
3263,
983,
3904,
1507,
330,
77,
351,
637,
3263,
983,
3904,
7392,
262,
2060,
0,
3471,
285,
12008,
5745,
445,
17606... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_initial_value() {
// Given:
let mut actual = Counter::from(vec![UINT_MIN]);
// When:
actual.increment();
// Then:
let expected = Counter::from(vec![UINT_MIN + 1]);
assert_eq!(expected, actual);
... | rust_cleaned_test_functions.jsonl/79505 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51482,
15809,
3142,
368,
341,
310,
442,
16246,
510,
310,
1077,
5206,
5042,
284,
19735,
486,
1499,
25592,
20703,
25712,
11820,
10149,
310,
442,
3197,
510,
310,
5042,
56936,
1428,
310,
442,
5005,
51... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_runtime_create_invalid_lib_path_encoding() {
let invalid_encoding = ['�', '\0'];
let handle = unsafe {
mun_runtime_create(
invalid_encoding.as_ptr() as *const _,
RuntimeOptions::default(),
ptr::null_mut(),
)
};
assert_ne!(handl... | rust_cleaned_test_functions.jsonl/120550 | {
"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,
33232,
8657,
31433,
16142,
2638,
37613,
368,
341,
262,
1077,
8318,
37613,
284,
2509,
5691,
516,
5196,
15,
15538,
262,
1077,
3705,
284,
19860,
341,
286,
49979,
33232,
8657,
1006,
310,
8318,
37613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_element_attributes_response_encode() {
let b = GetElementAttributesResponse {
title: Some(String::from("Test")),
..GetElementAttributesResponse::default()
};
assert_eq!(b.pdu_id(), PduId::GetElementAttributes);
assert_eq!(b.encoded_len(... | rust_cleaned_test_functions.jsonl/93005 | {
"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,
3062,
7894,
18240,
9655,
11224,
368,
341,
286,
1077,
293,
284,
2126,
1691,
10516,
2582,
341,
310,
2265,
25,
4329,
2242,
486,
1499,
445,
2271,
30154,
310,
5241,
1949,
1691,
10516,
2582,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_authorize_lockup() {
let stake_pubkey = Pubkey::new_rand();
let stake_lamports = 42;
let stake_account = Account::new_ref_data_with_space(
stake_lamports,
&StakeState::Initialized(Meta::auto(&stake_pubkey)),
std::mem::size_of::<StakeSta... | rust_cleaned_test_functions.jsonl/39449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1735
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22938,
551,
9818,
454,
368,
341,
286,
1077,
18279,
34014,
792,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
18279,
907,
309,
3394,
284,
220,
19,
17,
280,
286,
1077,
18279,
13500,
284,
8615,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_instr() {
let cases: Vec<(&str, &str, i64)> = vec![
("a", "abcdefg", 1),
("0", "abcdefg", 0),
("c", "abcdefg", 3),
("F", "abcdefg", 6),
("cd", "abcdefg", 3),
(" ", "abcdefg", 0),
("", "", 1),
... | rust_cleaned_test_functions.jsonl/9129 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 889
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62574,
368,
341,
286,
1077,
5048,
25,
11312,
27,
2099,
495,
11,
609,
495,
11,
600,
21,
19,
16018,
284,
7486,
90515,
310,
3489,
64,
497,
330,
41202,
70,
497,
220,
16,
1326,
310,
3489,
15,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_split_files() {
let new_partitioned_file = |path: &str| PartitionedFile::new(path.to_owned(), 10);
let files = vec![
new_partitioned_file("a"),
new_partitioned_file("b"),
new_partitioned_file("c"),
new_partitioned_file("d"),
... | rust_cleaned_test_functions.jsonl/45583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 666
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
10931,
368,
341,
286,
1077,
501,
43840,
291,
2458,
284,
760,
2343,
25,
609,
495,
91,
54626,
291,
1703,
486,
931,
5581,
2389,
51973,
1507,
220,
16,
15,
317,
286,
1077,
3542,
284,
7486,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_asserts() {
let _: () = rune!(
pub fn main() {
assert!(true)
}
);
let _: () = rune!(
pub fn main() {
assert_eq!(1 + 1, 2)
}
);
} | rust_cleaned_test_functions.jsonl/2741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
82,
368,
341,
262,
1077,
58536,
1719,
284,
63499,
33673,
286,
6675,
5168,
1887,
368,
341,
310,
2060,
10297,
1866,
340,
286,
456,
262,
1439,
262,
1077,
58536,
1719,
284,
63499,
33673,
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 |
#[test]
fn test_set_memory_and_swap() {
let tmp =
create_temp_dir("test_set_memory_and_swap").expect("create temp directory for test");
set_fixture(&tmp, CGROUP_MEMORY_USAGE, "0").expect("Set fixure for memory usage");
set_fixture(&tmp, CGROUP_MEMORY_MAX_USAGE, "0").expect("S... | rust_cleaned_test_functions.jsonl/51330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
19195,
8378,
40991,
368,
341,
286,
1077,
4174,
4035,
310,
1855,
11771,
4334,
445,
1944,
2602,
19195,
8378,
40991,
1827,
17119,
445,
3182,
2730,
6220,
369,
1273,
797,
286,
738,
74409,
2099,
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_threshold_enc() {
let mut rng = rand::thread_rng();
let sk_set = SecretKeySet::random(3, &mut rng);
let pk_set = sk_set.public_keys();
let msg = b"Totally real news";
let ciphertext = pk_set.public_key().encrypt(&msg[..]);
let shares: BTr... | rust_cleaned_test_functions.jsonl/30568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21858,
13781,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
1901,
2602,
284,
8599,
1592,
1649,
486,
11463,
7,
18,
11,
609,
6984,
28422,
317,
286,
1077,
22458,
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_pushd_lock() {
setup();
let t1 = thread::spawn(|| {
let _p = pushd("cbench").unwrap();
sleep_ms(20);
});
sleep_ms(10);
let t2 = thread::spawn(|| {
let _p = pushd("cbench").unwrap();
sleep_ms(30);
});
t1.join().unwrap();
t2.join()... | rust_cleaned_test_functions.jsonl/52768 | {
"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,
14218,
67,
9818,
368,
341,
262,
6505,
1428,
262,
1077,
259,
16,
284,
4516,
486,
46087,
79453,
341,
286,
1077,
716,
79,
284,
4484,
67,
445,
7221,
19762,
1827,
15454,
543,
286,
6084,
21416,
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... | 3 |
#[test]
fn test_with_description() {
let json = r#"["test","x"]"#;
let remark = Remark::new(RemarkType::Removed, "test");
assert_eq_dbg!(remark, serde_json::from_str(json).unwrap());
assert_eq_str!(json, &serde_json::to_string(&remark).unwrap());
} | rust_cleaned_test_functions.jsonl/126372 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
11448,
368,
341,
286,
1077,
2951,
284,
435,
55543,
1183,
1944,
2198,
87,
1341,
57676,
280,
286,
1077,
13841,
284,
82733,
486,
931,
2785,
21115,
929,
486,
42642,
11,
330,
1944,
3071,
286,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_func_send() {
// create a FuncType
let result = FuncType::create(vec![ValType::I32; 2], vec![ValType::I32]);
assert!(result.is_ok());
let func_ty = result.unwrap();
// create a host function
let result = Function::create(&func_ty, Box::new(real_add... | rust_cleaned_test_functions.jsonl/100776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 523
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9596,
13565,
368,
341,
286,
442,
1855,
264,
18016,
929,
198,
286,
1077,
1102,
284,
18016,
929,
486,
3182,
25592,
20703,
2208,
929,
486,
40,
18,
17,
26,
220,
17,
1125,
7486,
20703,
2208,
929,
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_iterator() {
let zero = hex_script!("00");
let zeropush = hex_script!("0100");
let nonminimal = hex_script!("4c0169b2"); // PUSHDATA1 for no reason
let minimal = hex_script!("0169b2"); // minimal
let nonminimal_alt = hex_script!("026900b2")... | rust_cleaned_test_functions.jsonl/112393 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1007
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
368,
341,
286,
1077,
7168,
284,
12371,
14660,
17223,
15,
15,
797,
286,
1077,
76178,
453,
1116,
284,
12371,
14660,
17223,
15,
16,
15,
15,
3071,
286,
1077,
2477,
92607,
284,
12371,
14660,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_other() {
assert_eq!(
LocationId::from_str("not all or numeric").unwrap_err(),
LocationConversionError::InvalidLocation("not all or numeric".to_string())
)
} | rust_cleaned_test_functions.jsonl/50233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
30456,
368,
341,
286,
2060,
10714,
33673,
310,
9866,
764,
486,
1499,
2895,
445,
1921,
678,
476,
24064,
1827,
15454,
9266,
3148,
310,
9866,
48237,
1454,
486,
7928,
4707,
445,
1921,
678,
476,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_localize() {
// go for gold
let (_, layer_indices) = ClusterInfo::describe_data_plane(500_000, 200);
let mut me = 0;
let mut layer_ix = 0;
let locality = ClusterInfo::localize(&layer_indices, 200, me);
assert_eq!(locality.layer_ix, layer_ix);
... | rust_cleaned_test_functions.jsonl/12814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 899
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13564,
551,
368,
341,
286,
442,
728,
369,
6623,
198,
286,
1077,
39464,
6193,
18333,
8,
284,
35380,
1731,
486,
12332,
1769,
46023,
7,
20,
15,
15,
62,
15,
15,
15,
11,
220,
17,
15,
15,
317,
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_writer_roundtrip() {
let schema = Schema::from_str(SCHEMA).unwrap();
let make_record = |a: i64, b| {
let mut record = Record::new(schema.top_node()).unwrap();
record.put("a", a);
record.put("b", b);
record.avro()
};
... | rust_cleaned_test_functions.jsonl/43038 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 807
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
29896,
32981,
368,
341,
286,
1077,
10802,
284,
12539,
486,
1499,
2895,
59461,
35839,
568,
15454,
543,
286,
1077,
1281,
14192,
284,
760,
64,
25,
600,
21,
19,
11,
293,
91,
341,
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_virtio_device_features() {
let mut net = Net::default_net(TestMutators::default());
net.set_mac(MacAddr::parse_str("11:22:33:44:55:66").unwrap());
let features = 1 << VIRTIO_NET_F_GUEST_CSUM
| 1 << VIRTIO_NET_F_CSUM
| 1 << VIRTIO_NET_F_GU... | rust_cleaned_test_functions.jsonl/63420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 511
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
9204,
14965,
368,
341,
286,
1077,
5206,
4179,
284,
9374,
486,
2258,
19722,
31159,
51440,
2973,
486,
2258,
1423,
286,
4179,
980,
22802,
3189,
580,
13986,
486,
6400,
2895,
445,
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_insert_with_root() {
let key = Keypair::new();
let mut index = AccountsIndex::<bool>::default();
let mut gc = Vec::new();
index.insert(0, &key.pubkey(), true, &mut gc);
assert!(gc.is_empty());
let ancestors = vec![].into_iter().collect();
... | rust_cleaned_test_functions.jsonl/20397 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
6615,
12993,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1077,
5206,
22122,
284,
11312,
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_accounts_background_service_remove_dead_slots() {
let genesis = create_genesis_config(10);
let bank0 = Arc::new(Bank::new(&genesis.genesis_config));
let (pruned_banks_sender, pruned_banks_receiver) = unbounded();
let request_handler = ABSRequestHandler {
... | rust_cleaned_test_functions.jsonl/44873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
24103,
12267,
18193,
53427,
54161,
368,
341,
286,
1077,
59366,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
317,
286,
1077,
6073,
15,
284,
19689,
486,
931,
5349,
1180,
486,
931,
2099,
77894,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_endpoint_invalid_item() {
let ret = do_endpoint(
quote! {
method = GET,
path = "/a/b/c"
},
quote! {
const POTATO = "potato";
},
);
let msg = format!("{}", ret.err().unwrap());... | rust_cleaned_test_functions.jsonl/39856 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36699,
31433,
5634,
368,
341,
286,
1077,
2112,
284,
653,
36699,
1006,
310,
12641,
0,
341,
394,
1714,
284,
7890,
345,
394,
1815,
284,
3521,
64,
3470,
2899,
698,
310,
1153,
310,
12641,
0,
341,
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_parse_wallet_sync() {
let cli_args = vec!["bdk-cli", "--network", "testnet", "wallet",
"--descriptor", "wpkh(tpubDEnoLuPdBep9bzw5LoGYpsxUQYheRQ9gcgrJhJEcdKFB9cWQRyYmkCyRoTqeD4tJYiVVgt6A3rN6rWn9RYhR9sBsGxji29LYWHuKKbdb1ev/0/*)",
"syn... | rust_cleaned_test_functions.jsonl/53340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
62308,
23008,
368,
341,
286,
1077,
21348,
8384,
284,
7486,
0,
1183,
65,
7584,
54797,
497,
14482,
17511,
497,
330,
1944,
4711,
497,
330,
35735,
756,
999,
14482,
53132,
497,
330,
8421,
30664,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_offset() {
macro_rules! assert_coords {
($coords:expr, $result:expr) => {{
assert_partial_code!($coords, $result);
}};
}
let cf44 = CoordinateFormat::new(4, 4);
let cf55 = CoordinateFormat::new(5, 5);
let cf66 = Coor... | rust_cleaned_test_functions.jsonl/16463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6917,
368,
341,
286,
18072,
21407,
0,
2060,
32576,
341,
310,
1711,
35030,
96011,
11,
400,
1382,
96011,
8,
589,
80505,
394,
2060,
52068,
4136,
0,
699,
35030,
11,
400,
1382,
317,
310,
87037,
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_asserts_section() {
let mut reader =
Reader::init("[Asserts]\nheader \"Location\" equals \"https://google.fr\"\n");
assert_eq!(
response_section(&mut reader).unwrap(),
Section {
line_terminators: vec![],
space0:... | rust_cleaned_test_functions.jsonl/17065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2860
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
82,
16221,
368,
341,
286,
1077,
5206,
6604,
4035,
310,
25166,
486,
2327,
10937,
8534,
82,
17960,
77,
2708,
7245,
4707,
2105,
16819,
7245,
2428,
1110,
17485,
18798,
22245,
77,
3071,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_axis_mapping() {
let standard = GamepadMappingType::Standard;
let unmapped = GamepadMappingType::NoMapping;
assert_eq!(standard.axis_index(Axis::LeftStickX), Some(0));
assert_eq!(unmapped.axis_index(Axis::LeftStickX), None);
assert_eq!(standard.axis_index... | rust_cleaned_test_functions.jsonl/71842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23567,
26930,
368,
341,
286,
1077,
5297,
284,
4050,
13242,
6807,
929,
486,
19781,
280,
286,
1077,
37431,
5677,
284,
4050,
13242,
6807,
929,
486,
2753,
6807,
401,
286,
2060,
10714,
10297,
20270,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transact_does_not_collide_new_entids() {
let mut sqlite = db::new_connection("").unwrap();
let mut conn = Conn::connect(&mut sqlite).unwrap();
let next =
conn.metadata.lock().expect("metadata").partition_map[":db.part/user"].next_entid();
... | rust_cleaned_test_functions.jsonl/76418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 538
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7965,
531,
96374,
7913,
43597,
577,
5921,
27425,
3365,
368,
341,
286,
1077,
5206,
22003,
284,
2927,
486,
931,
15866,
80821,
15454,
543,
286,
1077,
5206,
4534,
284,
18213,
486,
6459,
2099,
6984,
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_memtable_fetch_rewrite() {
let region_id = 8;
let mut memtable = MemTable::new(region_id, Arc::new(GlobalStats::default()));
let (k1, v1) = (b"key1", b"value1");
let (k2, v2) = (b"key2", b"value2");
let (k3, v3) = (b"key3", b"value3");
// After ap... | rust_cleaned_test_functions.jsonl/18143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1872
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12976,
2005,
11803,
74052,
368,
341,
286,
1077,
5537,
842,
284,
220,
23,
280,
286,
1077,
5206,
1833,
2005,
284,
13550,
2556,
486,
931,
48059,
842,
11,
19689,
486,
931,
46744,
16635,
486,
2258,
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_software_add_to_invalid() -> Result<()> {
let mut m = Message::new();
let s = TextAttribute {
attr: ATTR_SOFTWARE,
text: String::from_utf8(vec![0; 1024]).unwrap(),
};
let result = s.add_to(&mut m);
if let Err(err) = result {
assert!(
is_att... | rust_cleaned_test_functions.jsonl/57155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 438
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39833,
2110,
2891,
2346,
31433,
368,
1464,
5714,
71698,
341,
262,
1077,
5206,
296,
284,
4856,
486,
931,
543,
262,
1077,
274,
284,
2918,
3907,
341,
286,
6376,
25,
37918,
45142,
8247,
345,
286,
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... | 3 |
#[test]
fn test_serialized_size() {
let array = GenericArray::<u8, typenum::U1>::default();
let size = bincode::serialized_size(&array).unwrap();
assert_eq!(size, 1);
} | rust_cleaned_test_functions.jsonl/66753 | {
"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,
25602,
1506,
2368,
368,
341,
286,
1077,
1334,
284,
21281,
1857,
27638,
84,
23,
11,
3582,
9018,
486,
52,
16,
6831,
2258,
543,
286,
1077,
1379,
284,
9544,
1851,
486,
75277,
2368,
2099,
1653,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_pcapng_reader() {
let path = "assets/test001-le.pcapng";
let file = File::open(path).unwrap();
let buffered = BufReader::new(file);
let mut num_blocks = 0;
let mut reader = PcapNGReader::new(65536, buffered).expect("PcapNGReader");
let expected_origlen = &[0, 0, 314, 342,... | rust_cleaned_test_functions.jsonl/132439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
11346,
968,
22306,
368,
341,
262,
1077,
1815,
284,
330,
5160,
12697,
15,
15,
16,
30207,
556,
11346,
968,
876,
262,
1077,
1034,
284,
2887,
486,
2508,
5581,
568,
15454,
543,
262,
1077,
53057,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_fail_recovery() {
let dir = TempDir::new("segment_dir").unwrap();
let vec1 = vec![1.0, 0.0, 1.0, 1.0];
let mut segment = empty_segment(dir.path());
segment.upsert_point(1, 1.into(), &vec1).unwrap();
segment.upsert_point(1, 2.into(), &vec1).unwrap... | rust_cleaned_test_functions.jsonl/108901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 812
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
22121,
91475,
368,
341,
286,
1077,
5419,
284,
19944,
6184,
486,
931,
445,
23169,
4334,
1827,
15454,
1428,
286,
1077,
7486,
16,
284,
7486,
20703,
16,
13,
15,
11,
220,
15,
13,
15,
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_private_api() {
let (mut testkit, api) = init_testkit();
inc_count(&api, 5);
inc_count(&api, 3);
testkit.create_block();
let counter: u64 = api.private(ApiKind::Service("counter"))
.get("count")
.unwrap();
assert_eq!(counter, 8);
let (pubkey, key) = ... | rust_cleaned_test_functions.jsonl/86868 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26249,
11697,
368,
341,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
543,
262,
3625,
3180,
2099,
2068,
11,
220,
20,
317,
262,
3625,
3180,
2099,
2068,
11,
220,
18,
626,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
test_parse_1("PT0S", 0);
test_parse_1("PT-0S", 0);
test_parse_1("pt0s", 0);
test_parse_1("PT0.0000000S", 0);
test_parse_1("PT0.000000000000000000S", 0);
// Test rounding digits beyond the precision actually stored
test_parse_1("PT0.00000005S", 0);
test_... | rust_cleaned_test_functions.jsonl/60410 | {
"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,
21039,
368,
341,
262,
1273,
21039,
62,
16,
445,
2828,
15,
50,
497,
220,
15,
317,
262,
1273,
21039,
62,
16,
445,
2828,
12,
15,
50,
497,
220,
15,
317,
262,
1273,
21039,
62,
16,
445,
417,
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_dive_forward() {
let dive_commands = get_commands();
let dive = Dive::new(dive_commands);
assert_eq!(dive.forward(), 15);
} | rust_cleaned_test_functions.jsonl/110101 | {
"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,
814,
533,
32121,
368,
341,
286,
1077,
29863,
44151,
284,
633,
44151,
543,
286,
1077,
29863,
284,
88517,
486,
931,
1500,
533,
44151,
317,
286,
2060,
10714,
10297,
67,
533,
26515,
1507,
220,
16,
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 |
#[test]
fn test_parse_with_duplicate_read_group_ids() {
let s = "\
@RG\tID:rg0
@RG\tID:rg0
";
assert_eq!(
parse(s),
Err(ParseError::DuplicateReadGroupId(String::from("rg0")))
);
} | rust_cleaned_test_functions.jsonl/8727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6615,
70434,
6443,
6288,
8077,
368,
341,
286,
1077,
274,
284,
93317,
31,
32360,
4955,
915,
25,
1984,
15,
198,
31,
32360,
4955,
915,
25,
1984,
15,
198,
3302,
286,
2060,
10714,
33673,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_collect_item_type_already_in() {
let mut inv = Inventory::new(InventoryType::Player, 46);
let item = ItemStack::new(Item::Cobblestone, 33);
inv.set_item_at(31, item.clone());
inv.collect_item(item.clone());
assert_eq!(inv.item_at(31).unwrap(), &ItemStack:... | rust_cleaned_test_functions.jsonl/59271 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68140,
5634,
1819,
80772,
1243,
368,
341,
286,
1077,
5206,
1529,
284,
28126,
486,
931,
7,
22319,
929,
486,
4476,
11,
220,
19,
21,
317,
286,
1077,
1509,
284,
38115,
486,
931,
29771,
486,
34,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.