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_shared() {
run_in_task(|| {
let (mut isolate, dispatch_count) = setup(Mode::AsyncImmediate);
js_check(isolate.execute(
"setup2.js",
r#"
let nrecv = 0;
Deno.core.setAsyncHandler((buf) => {
assert(buf.byteLength === 1);
assert(bu... | rust_cleaned_test_functions.jsonl/93570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20405,
368,
341,
262,
1598,
1243,
12184,
79453,
341,
414,
1077,
320,
6984,
42123,
11,
6845,
3180,
8,
284,
6505,
3189,
534,
486,
6525,
52734,
626,
414,
6994,
7200,
82669,
7769,
1006,
286,
330,
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_hexadecimal() {
assert_eq!(
hexadecimal("0x0123456789abcdef"),
Ok(("", 0x0123456789abcdef))
);
assert_eq!(
hexadecimal("0x01234567_89abcdef"),
Ok(("", 0x0123456789abcdef))
);
assert_eq!(
hexadecim... | rust_cleaned_test_functions.jsonl/116071 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
49326,
368,
341,
286,
2060,
10714,
33673,
310,
69722,
445,
15,
87,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
41202,
4461,
310,
7622,
7,
19814,
220,
15,
87,
15,
16,
17,
18,
19,
20,
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_bluesteins() {
for &len in &[3, 5, 7, 11, 13] {
test_bluesteins_with_length(len, false);
test_bluesteins_with_length(len, true);
}
} | rust_cleaned_test_functions.jsonl/65303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13141,
3045,
68,
1330,
368,
341,
286,
369,
609,
2892,
304,
44590,
18,
11,
220,
20,
11,
220,
22,
11,
220,
16,
16,
11,
220,
16,
18,
60,
341,
310,
1273,
13141,
3045,
68,
1330,
6615,
5118,
690... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_introduce_var_break() {
check_assist_range(
introduce_variable,
"
fn main() {
let result = loop {
<|>break 2 + 2<|>;
};
}
",
"
fn main() {
let result = loop {
let <|>var_name = 2 + 2;
break var_name;
};
}
",
... | rust_cleaned_test_functions.jsonl/5720 | {
"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,
4042,
47845,
4612,
39494,
368,
341,
286,
1779,
12083,
380,
9698,
1006,
310,
19131,
14635,
345,
310,
6228,
8822,
1887,
368,
341,
262,
1077,
1102,
284,
6337,
341,
286,
82639,
29,
8960,
220,
17,
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_scans_strings() {
let mut scanner = Scanner::new(
"<?php
$a = 'aaa';
$b = \"ddd\";
$c = <<< EOF
Some fancy value
EOF;
$d = `ls -al`;
$e = <<<\"EOF\"
LOL
EOF;
... | rust_cleaned_test_functions.jsonl/52948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
596,
33500,
368,
341,
286,
1077,
5206,
20775,
284,
17170,
486,
931,
1006,
310,
40271,
1208,
198,
310,
400,
64,
284,
364,
32646,
1010,
310,
400,
65,
284,
7245,
40360,
59,
876,
310,
400,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_route() {
let store_config = StoreConfig {
worker_id: 1,
alive_id: 0,
worker_num: 2,
zk_url: "".to_string(),
graph_name: "".to_string(),
partition_num: 4,
zk_timeout_ms: 0,
zk_auth_enable: false,
zk_auth_user: "test".to_... | rust_cleaned_test_functions.jsonl/91365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 873
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28109,
368,
341,
262,
1077,
3553,
5332,
284,
9129,
2648,
341,
286,
11864,
842,
25,
220,
16,
345,
286,
13675,
842,
25,
220,
15,
345,
286,
11864,
4273,
25,
220,
17,
345,
286,
94528,
2903,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize_milliseconds() {
#[derive(Deserialize)]
struct Test {
#[serde(deserialize_with = "deserialize_milliseconds")]
v: DateTime<Utc>,
}
let expected = Utc.ymd(2017, 10, 05).and_hms_nano(15, 33, 44, 0);
// Test parsing strings... | rust_cleaned_test_functions.jsonl/131356 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 452
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
717,
56194,
368,
341,
286,
11506,
27098,
7,
64465,
5563,
286,
2036,
3393,
341,
310,
11506,
47024,
34590,
9050,
6615,
284,
330,
66777,
717,
56194,
5422,
310,
348,
25,
6520,
36397,
1041... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_verify() {
decode_expect_invalid("f86b8085e8d4a510008227109413978aee95f38490e9769c39b2773ed763d9cd5f872386f26fc10000801ba0fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141a014a569d327dcda4b29f74f93c0e9729d2f49ad726e703f9cd90dbb0fbf6649f1", None);
... | rust_cleaned_test_functions.jsonl/110004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 568
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
35638,
368,
341,
1789,
286,
16895,
68918,
31433,
445,
69,
23,
21,
65,
23,
15,
23,
20,
68,
23,
67,
19,
64,
20,
16,
15,
15,
15,
23,
17,
17,
22,
16,
15,
24,
19,
16,
18,
24,
22,
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_recommendation_output_3() {
let text = "peter\nenter\n".to_string();
let output = parse_output_single(text, SuggestionType::SingleRecommendation).unwrap();
assert_eq!(output, "peter");
} | rust_cleaned_test_functions.jsonl/124460 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
99084,
367,
7645,
62,
18,
368,
341,
286,
1077,
1467,
284,
330,
79,
1404,
1699,
1950,
1699,
3263,
983,
3904,
543,
286,
1077,
2550,
284,
4715,
7645,
19487,
7235,
11,
328,
42116,
929,
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 |
#[test]
fn test_get_config_long_value_followed_by_default_value() {
let config = Config::get_config(
"report.test.filter",
"report.test.description test\nreport.test.filter filter and\n test\n Default value test",
);
assert_eq!(config.unwrap(), ... | rust_cleaned_test_functions.jsonl/77076 | {
"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,
3062,
5332,
17799,
3142,
43490,
291,
3710,
9993,
3142,
368,
341,
286,
1077,
2193,
284,
5532,
486,
455,
5332,
1006,
310,
330,
11736,
5958,
6936,
756,
310,
330,
11736,
5958,
13178,
1273,
1699,
11736... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assign_account_to_program() {
let new_program_owner = Pubkey::new(&[9; 32]);
let from = Pubkey::new_rand();
let mut from_account = Account::new(100, 0, &system_program::id());
assert_eq!(
assign_account_to_program(
&mut KeyedAccount::... | rust_cleaned_test_functions.jsonl/24260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
13500,
2346,
25096,
368,
341,
286,
1077,
501,
25096,
29027,
284,
22611,
792,
486,
931,
2099,
58,
24,
26,
220,
18,
17,
10149,
286,
1077,
504,
284,
22611,
792,
486,
931,
33864,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sub_ack() {
let ack = SubscribeAck {
packet_id: NonZeroU16::new(1).unwrap(),
properties: Vec::new(),
reason_string: Some("some reason".into()),
status: Vec::new(),
};
let size = ack.encoded_size(99999);
let mut buf ... | rust_cleaned_test_functions.jsonl/84800 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 940
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
48447,
368,
341,
286,
1077,
10725,
284,
27270,
55559,
341,
310,
10151,
842,
25,
11581,
17999,
52,
16,
21,
486,
931,
7,
16,
568,
15454,
3148,
310,
5888,
25,
11312,
486,
931,
3148,
310,
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_from_str_socket_addr() {
assert_eq!(Ok(SocketAddr::new(IpAddr::new_v4(77, 88, 21, 11), 80)),
"77.88.21.11:80".parse());
assert_eq!(Ok(SocketAddr::new(IpAddr::new_v6(0x2a02, 0x6b8, 0, 1, 0, 0, 0, 1), 53)),
"[2a02:6b8:0:1::1]:53".parse());
as... | rust_cleaned_test_functions.jsonl/58435 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
19555,
7387,
368,
341,
286,
2060,
10714,
10297,
11578,
73066,
13986,
486,
931,
8972,
79,
13986,
486,
931,
2273,
19,
7,
22,
22,
11,
220,
23,
23,
11,
220,
17,
16,
11,
220,
16,
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_part_a_example_2() {
let lines = vec![
"dc-end",
"HN-start",
"start-kj",
"dc-start",
"dc-HN",
"LN-dc",
"HN-end",
"kj-sa",
"kj-HN",
"kj-dc",
];
let grap... | rust_cleaned_test_functions.jsonl/57730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10495,
4306,
39304,
62,
17,
368,
341,
286,
1077,
5128,
284,
7486,
90515,
310,
330,
7628,
13068,
756,
310,
330,
43165,
18935,
756,
310,
330,
2468,
12646,
73,
756,
310,
330,
7628,
18935,
756,
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_executable_with_invalid_base_dir() {
let d = get_current_dir().ok();
d.and_then(|p| {
let new_env = process::Command::new("randomtemp")
.env("RANDOMTEMP_EXECUTABLE", ENV_COMMAND)
.env("RANDOMTEMP_BASEDIR", "randomtemp")
... | rust_cleaned_test_functions.jsonl/19002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18430,
5922,
6615,
31433,
7651,
4334,
368,
341,
286,
1077,
294,
284,
633,
11080,
4334,
1005,
562,
543,
286,
294,
34724,
68367,
22428,
79,
91,
341,
310,
1077,
501,
15879,
284,
1882,
486,
4062,
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_node_key_config_default() {
fn with_def_params<F>(f: F) -> error::Result<()>
where
F: Fn(NodeKeyParams) -> error::Result<()>,
{
NodeKeyType::variants().iter().try_for_each(|t| {
let node_key_type = NodeKeyType::from_str(t).unwrap();
f(NodeKeyParams {
node_key_type,
... | rust_cleaned_test_functions.jsonl/52680 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
3097,
5332,
9993,
368,
341,
197,
40095,
448,
7844,
6745,
30499,
2235,
69,
25,
434,
8,
1464,
1465,
486,
2077,
27,
98208,
197,
55742,
198,
298,
12727,
25,
50182,
22078,
1592,
4870,
8,
1464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_lazy_gc_fork() {
//This test is pedantic
//A fork is purged when a non root bank is cleaned up. If a fork is behind root but it is
let accounts = AccountsDB::new(None);
let pubkey = Pubkey::new_rand();
let account = Account::new(1, 0, &Account::d... | rust_cleaned_test_functions.jsonl/58301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
49423,
761,
669,
368,
341,
286,
442,
1986,
1273,
374,
10477,
8159,
198,
286,
442,
32,
22435,
374,
3999,
3556,
979,
264,
2477,
3704,
6073,
374,
27722,
705,
13,
220,
1416,
264,
22435,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_proof_request_data() {
let request = proof_request();
let proof_data = ProofRequestData {
nonce: String::new(),
name: String::new(),
data_version: String::new(),
requested_attributes: HashMap::new(),
requested_pre... | rust_cleaned_test_functions.jsonl/51588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
86757,
7893,
1769,
368,
341,
286,
1077,
1681,
284,
11064,
7893,
543,
286,
1077,
11064,
1769,
284,
36991,
1900,
1043,
341,
310,
39676,
25,
923,
486,
931,
3148,
310,
829,
25,
923,
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_increment_le_zero() {
for i in 1usize..256 {
let mut x = vec![0u8; i];
increment_le(&mut x);
assert!(!x.iter().all(|x| *x == 0));
let mut y = vec![0u8; i];
y[0] += 1;
assert_eq!(x, y);
}
} | rust_cleaned_test_functions.jsonl/20152 | {
"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,
51482,
11751,
19359,
368,
341,
286,
369,
600,
304,
220,
16,
51878,
496,
17,
20,
21,
341,
310,
1077,
5206,
856,
284,
7486,
20703,
15,
84,
23,
26,
600,
935,
310,
16252,
11751,
2099,
6984,
856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_date() {
let expected = FixedOffset::west(5 * 3600)
.ymd(2017, 11, 3)
.and_hms(6, 49, 45);
let actual = parse_date("03/Nov/2017:06:49:45 -0500").unwrap();
assert_eq!(expected.timestamp(), actual);
} | rust_cleaned_test_functions.jsonl/103179 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4164,
368,
341,
286,
1077,
3601,
284,
20149,
6446,
486,
11039,
7,
20,
353,
220,
18,
21,
15,
15,
340,
310,
659,
1600,
67,
7,
17,
15,
16,
22,
11,
220,
16,
16,
11,
220,
18,
340,
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_postconditions() {
let parsed = get_tree(EX1);
let mut walk = parsed.walk();
for order in [Order::Pre, Order::Post] {
let mut iter = traverse(&mut walk, order);
while iter.next().is_some() {}
// Make sure it's fused
assert!(... | rust_cleaned_test_functions.jsonl/126936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6333,
16495,
368,
341,
286,
1077,
15676,
284,
633,
11663,
25409,
16,
317,
286,
1077,
5206,
4227,
284,
15676,
51394,
543,
286,
369,
1973,
304,
508,
4431,
486,
4703,
11,
7217,
486,
4133,
60,
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... | 3 |
#[test]
fn test_field_name_re() {
let escaped_special_chars_re = Regex::new(ESCAPED_SPECIAL_CHARS_PATTERN).unwrap();
for special_char in SPECIAL_CHARS.iter() {
assert_eq!(
escaped_special_chars_re.replace_all(&format!("\\{}", special_char), "$1"),
spec... | rust_cleaned_test_functions.jsonl/64411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
1269,
1288,
368,
341,
286,
1077,
27783,
41629,
37418,
1288,
284,
26146,
486,
931,
7,
1570,
31400,
1479,
64240,
82319,
44227,
568,
15454,
543,
286,
369,
3281,
9232,
304,
23027,
82319,
19471,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vector_1() {
let m = &[
0x47, 0x61, 0x6c, 0x6c, 0x69, 0x61, 0x20, 0x65, 0x73, 0x74, 0x20, 0x6f, 0x6d, 0x6e,
0x69, 0x73, 0x20, 0x64, 0x69, 0x76, 0x69, 0x73, 0x61, 0x20, 0x69, 0x6e, 0x20, 0x70,
0x61, 0x72, 0x74, 0x65, 0x73, 0... | rust_cleaned_test_functions.jsonl/46770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
16,
368,
341,
3374,
310,
1077,
296,
284,
609,
9640,
394,
220,
15,
87,
19,
22,
11,
220,
15,
87,
21,
16,
11,
220,
15,
87,
21,
66,
11,
220,
15,
87,
21,
66,
11,
220,
15,
87,
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_compile_or_c() {
let compiled = bitwise::compile_or("C".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b01011001);
} | rust_cleaned_test_functions.jsonl/100587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
8734,
666,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
8734,
445,
34,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
10297,
5084... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_disconnect_nonexistent_config() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
// Create a ClientIfaceContainer with a valid client.
let test_values = test_setup(&mut exec);
let (mut iface_manager, _) = create_iface_manage... | rust_cleaned_test_functions.jsonl/62692 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 619
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67972,
21637,
64085,
5332,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
3071,
286,
442,
4230,
264,
8423,
40,
1564,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_u64() {
const VALUE: u64 = u64_from_bytes!("aaaabbbb");
assert_eq!(0x6262626261616161, VALUE);
} | rust_cleaned_test_functions.jsonl/114328 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
21,
19,
368,
341,
262,
733,
26827,
25,
575,
21,
19,
284,
575,
21,
19,
5673,
12524,
17223,
32646,
370,
53151,
797,
262,
2060,
10714,
10297,
15,
87,
21,
17,
21,
17,
21,
17,
21,
17,
21,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_empty_confirmation_string() {
let mock_storage = AsyncStorage::default();
let mut session = Session::default();
let mut arg_iter = [].iter().map(|s: &&str| s.to_string());
let res = confirm_login(mock_storage, &mut session, &mut arg_iter);
assert!(matches... | rust_cleaned_test_functions.jsonl/311 | {
"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,
15124,
37681,
3904,
368,
341,
286,
1077,
7860,
23310,
284,
71621,
486,
2258,
543,
286,
1077,
5206,
3797,
284,
9164,
486,
2258,
543,
286,
1077,
5206,
1392,
11723,
284,
72375,
2015,
1005,
2186,
2242... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wrap() {
let data = concat!(
"A simple line with several words, including some superobnoxiously ",
"big ones and some extra-confusingly-awkward hyphenated ones."
);
let data_wrapped_10 = vec![
"A simple ",
"line with ",
... | rust_cleaned_test_functions.jsonl/40404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 915
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38550,
368,
341,
286,
1077,
821,
284,
33720,
33673,
310,
330,
32,
4285,
1555,
448,
3807,
4244,
11,
2670,
1045,
2256,
674,
41403,
13307,
21796,
310,
330,
16154,
6174,
323,
1045,
4960,
50717,
970,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_source_lines() {
let src = "hi".to_owned();
let filename: Option<String> = None;
let source = Source { src, filename };
assert_eq!(source_lines(&source, 0, 0), "001: hi\n ^");
assert_eq!(source_lines(&source, 1, 0), "001: hi\n ^");
assert_... | rust_cleaned_test_functions.jsonl/106908 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1074
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10347,
18323,
368,
341,
286,
1077,
2286,
284,
330,
6023,
3263,
983,
51973,
543,
286,
1077,
3899,
25,
6959,
3464,
29,
284,
2240,
280,
286,
1077,
2530,
284,
8748,
314,
2286,
11,
3899,
2605,
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_delete_all_documents_rollback_correct_stamp() {
let mut schema_builder = schema::Schema::builder();
let text_field = schema_builder.add_text_field("text", schema::TEXT);
let index = Index::create_in_ram(schema_builder.build());
let mut index_writer = index.writer_... | rust_cleaned_test_functions.jsonl/21506 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 805
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
5705,
75927,
62,
33559,
31550,
52978,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1467,
5013,
284,
10802,
28532,
1364,
4326,
5013,
445,
1318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_transfer() {
solana_logger::setup();
let (bank, mint, genesis_keypair, mint_script_pubkey, payment_script_pubkey) =
create_bank(10_000);
let from_keypair = Keypair::new();
let to_keypair = Keypair::new();
let tx = create_accounts(
... | rust_cleaned_test_functions.jsonl/6389 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 887
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
320,
17033,
11,
28337,
11,
59366,
3097,
12670,
11,
28337,
14660,
34014,
792,
11,
8160,
14660,
34014,
792,
8,
4035,
310,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_client_http_codec() {
let response = "HTTP/1.1 404 Not Found\r\n\r\npssst extra data here";
let input = Cursor::new(response.as_bytes());
let output = Cursor::new(Vec::new());
let f = ReadWritePair(input, output)
.framed(HttpClientCodec)
.send(MessageHead {
version: Version::H... | rust_cleaned_test_functions.jsonl/78712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8179,
25888,
51084,
368,
341,
197,
10217,
2033,
284,
330,
9230,
14,
16,
13,
16,
220,
19,
15,
19,
2806,
12315,
12016,
1699,
12016,
1699,
79,
778,
267,
4960,
821,
1588,
876,
197,
10217,
1946,
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... | 3 |
#[test]
fn test_md5hash_function() -> Result<()> {
let tests = vec![ScalarFunctionTest {
name: "valid input",
columns: vec![Series::from_data(["testing"])],
expect: Series::from_data(["ae2b1fca515949e5d54fb22b8ed95575"]),
error: "",
}];
test_scalar_functions("md5", &... | rust_cleaned_test_functions.jsonl/130770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32994,
20,
8296,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
20703,
20639,
5152,
2271,
341,
286,
829,
25,
330,
1891,
1946,
756,
286,
8147,
25,
7486,
20703,
25544,
486,
1499,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_demo() {
let mut tokenizer = Tokenizer::new().unwrap();
let tokens: Vec<&str> = tokenizer.tokenize_str("――!!?").unwrap();
assert_eq!(tokens, vec!["――!!?"]);
} | rust_cleaned_test_functions.jsonl/61442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47830,
368,
341,
286,
1077,
5206,
45958,
284,
9660,
3135,
486,
931,
1005,
15454,
543,
286,
1077,
11211,
25,
11312,
52244,
495,
29,
284,
45958,
96790,
2895,
445,
142733,
2928,
30,
1827,
15454,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_array2_mut() {
// 5x3 image
let image = [00, 01, 02, 03, 04, 10, 11, 12, 13, 14, 20, 21, 22, 23, 24];
let mut image_array = Array2::zeros((3, 5));
{
let mut row_iter = image_array.axis_iter_mut(Axis(0));
let mut row1 = row_iter.next().unwrap();
row1[0] = ... | rust_cleaned_test_functions.jsonl/28790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
17,
29523,
368,
341,
262,
442,
220,
20,
87,
18,
2168,
198,
262,
1077,
2168,
284,
508,
15,
15,
11,
220,
15,
16,
11,
220,
15,
17,
11,
220,
15,
18,
11,
220,
15,
19,
11,
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_chunked() {
let mut dec = MultiResponseDecoder::<TO>::new();
{
let mut stream = dec.process_next_chunk(
br#"{
"type": "ADDED",
"ob"#,
);
assert!(stream.next().is_none());
}
... | rust_cleaned_test_functions.jsonl/14560 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30539,
291,
368,
341,
286,
1077,
5206,
1622,
284,
17439,
2582,
20732,
27638,
5207,
6831,
931,
1428,
286,
341,
310,
1077,
5206,
4269,
284,
1622,
16988,
11257,
30539,
1006,
394,
1411,
55543,
515,
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... | 1 |
#[test]
fn test_multiple_computation() {
let hw = RefCell::new(CpuHardware::new());
let g = RefCell::new(Graph::new());
let a = 1f32.into_node(&g, &hw);
let b = 2f32.into_node(&g, &hw);
let c = 3f32.into_node(&g, &hw);
let y = a + -b * c;
assert_eq!(a.shape(), Shape::new([]));
... | rust_cleaned_test_functions.jsonl/31065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
2965,
13320,
368,
341,
262,
1077,
31256,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
262,
1077,
342,
284,
8550,
3599,
486,
931,
63779,
486,
931,
5231,
262,
1077,
264,
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_underflow_relative_size() {
let (at, mut ucmd) = at_and_ucmd!();
ucmd.args(&["-s-1", FILE1])
.succeeds()
.no_stdout()
.no_stderr();
assert!(at.file_exists(FILE1));
assert!(at.read_bytes(FILE1).is_empty());
} | rust_cleaned_test_functions.jsonl/77104 | {
"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,
58228,
4965,
29286,
2368,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
575,
8710,
16365,
2099,
1183,
12,
82,
12,
16,
497,
11837,
16,
2546,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cache_aligned_read_at_and_write_at() {
let (_ramdisk, remote_block_device) = make_ramdisk();
let mut cache = Cache::new(remote_block_device).expect("Cache::new failed");
const OFFSET: u64 = 11;
const BLOCKS: usize = 3;
const DATA_LEN: usize = super::BLOCK_... | rust_cleaned_test_functions.jsonl/96355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 483
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11529,
66385,
6443,
3752,
8378,
9165,
3752,
368,
341,
286,
1077,
5453,
2396,
30496,
11,
8699,
7113,
9204,
8,
284,
1281,
62124,
30496,
543,
286,
1077,
5206,
6500,
284,
19479,
486,
931,
61381,
7113,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transfer() {
let context = get_context(carol());
testing_env!(context);
let total_supply = 1_000_000_000_000_000u128;
let mut contract = FunToken::new(carol(), total_supply.to_string()).unwrap();
let transfer_amount = total_supply / 3;
contract.tra... | rust_cleaned_test_functions.jsonl/74520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
368,
341,
286,
1077,
2266,
284,
633,
8467,
42078,
337,
1423,
286,
7497,
15879,
10297,
2147,
317,
286,
1077,
2790,
65630,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
62,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eq() {
let mut a = TreeMap::new();
let mut b = TreeMap::new();
assert!(a == b);
assert!(a.insert(0i, 5i).is_none());
assert!(a != b);
assert!(b.insert(0, 4).is_none());
assert!(a != b);
assert!(a.insert(5, 19).is_none());
a... | rust_cleaned_test_functions.jsonl/88295 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
368,
341,
286,
1077,
5206,
264,
284,
76883,
486,
931,
543,
286,
1077,
5206,
293,
284,
76883,
486,
931,
1428,
286,
2060,
10297,
64,
621,
293,
317,
286,
2060,
10297,
64,
7030,
7,
15,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_assignment() {
let p = polar();
qeval(&p, "x := 5 and x == 5");
qruntime!(
"x := 5 and x := 6",
TypeError { msg: s, .. },
s == "Can only assign to unbound variables, x is not unbound."
);
qnull(&p, "x := 5 and x > 6");
qeval(&p, "x := y and y = 6 a... | rust_cleaned_test_functions.jsonl/68155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51891,
368,
341,
262,
1077,
281,
284,
24660,
543,
262,
2804,
14170,
2099,
79,
11,
330,
87,
1669,
220,
20,
323,
856,
621,
220,
20,
797,
262,
2804,
22255,
33673,
286,
330,
87,
1669,
220,
20,
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_update_add_htlc_bolt2_receiver_sender_can_afford_amount_sent() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let mut nodes = create_network(2, &node_cfgs, &node_chanmg... | rust_cleaned_test_functions.jsonl/16926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 821
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
2891,
49086,
17257,
880,
6181,
17,
65691,
54356,
27421,
48914,
539,
13471,
24115,
368,
341,
1572,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_value_tuple() {
assert_eq!(
1i32.into_value_tuple(),
ValueTuple::One(Value::Int(Some(1)))
);
assert_eq!(
"b".into_value_tuple(),
ValueTuple::One(Value::String(Some(Box::new("b".to_owned()))))
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/12481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
21773,
368,
341,
286,
2060,
10714,
33673,
310,
220,
16,
72,
18,
17,
39860,
3142,
21773,
3148,
310,
5162,
28681,
486,
3966,
25346,
486,
1072,
65405,
7,
16,
5929,
286,
1439,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_json() {
use std::collections::{HashMap,BTreeMap};
use super::ToJson;
let array2 = Array(vec!(I64(1), I64(2)));
let array3 = Array(vec!(I64(1), I64(2), I64(3)));
let object = {
let mut tree_map = BTreeMap::new();
tree_map.insert... | rust_cleaned_test_functions.jsonl/22766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
9455,
368,
341,
286,
990,
1460,
486,
51137,
22964,
18497,
8161,
6533,
2227,
2440,
286,
990,
2256,
486,
78967,
401,
286,
1077,
1334,
17,
284,
2910,
25592,
10297,
40,
21,
19,
7,
16,
701,
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_decode_packet_with_payload() {
let buf = [
0x64, 0x45, 0x13, 0xFD, 0xD0, 0xE2, 0x4D, 0xAC, 0xFF, 0x48, 0x65,
0x6C, 0x6C, 0x6F,
];
let packet = PacketUdp::from_bytes(&buf);
assert!(packet.is_ok());
let packet = packet.unwrap();
... | rust_cleaned_test_functions.jsonl/92789 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
21078,
6615,
32813,
368,
341,
286,
1077,
6607,
284,
2278,
310,
220,
15,
87,
21,
19,
11,
220,
15,
87,
19,
20,
11,
220,
15,
87,
16,
18,
11,
220,
15,
63012,
11,
220,
15,
15764,
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... | 1 |
#[test]
fn test_symbol_unresolved() {
let prog = &mut [
0x85, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, // call -1
0xb7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // r0 = 0
0x95, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // exit
];
LittleEndian::write_u32(&mut prog[4..8],... | rust_cleaned_test_functions.jsonl/15536 | {
"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,
21179,
4907,
39747,
368,
341,
286,
1077,
29271,
284,
609,
6984,
2278,
286,
220,
15,
87,
23,
20,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
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_religious_or_cultural_facts() {
let person = Person::builder()
.fact(
Fact::builder(FactType::AdultChristening)
.date(Date::new(Some("..."), None))
.place(PlaceReference::builder().original("...").build())
.build(),
... | rust_cleaned_test_functions.jsonl/106992 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1919
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
7708,
1223,
8734,
666,
43447,
761,
11359,
368,
341,
262,
1077,
1697,
284,
7357,
486,
17850,
741,
286,
659,
33110,
1006,
310,
36712,
486,
17850,
7832,
531,
929,
486,
52030,
19315,
6019,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hover_no_links() {
check_hover_no_links(
r#"
/// Test cases:
/// case 1. bare URL: https://www.example.com/
/// case 2. inline URL with title: [example](https://www.example.com/)
/// case 3. code refrence: [`Result`]
/// case 4. code refrence but miss footnote: [`String`]... | rust_cleaned_test_functions.jsonl/66153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1044
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
6536,
25258,
368,
341,
286,
1779,
53445,
6536,
25258,
1006,
310,
435,
2,
698,
2575,
3393,
5048,
510,
2575,
1142,
220,
16,
13,
220,
12461,
5548,
25,
3703,
1110,
2136,
7724,
905,
5894,
2575... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_alpha_rgba() {
let rgba = Rgba([0, 0, 0, 0]).map_with_alpha(|s| s, |_| 0xFF);
assert_eq!(rgba, Rgba([0, 0, 0, 0xFF]));
} | rust_cleaned_test_functions.jsonl/46638 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5376,
6615,
26633,
95229,
368,
341,
286,
1077,
23524,
284,
431,
56380,
2561,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
10697,
2186,
6615,
26633,
22428,
82,
91,
274,
11,
66091,
220,
15,
9264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accountsdb_scan_snapshot_stores_binning() {
let mut stats = HashStats::default();
let (mut storages, raw_expected) = sample_storages_and_accounts();
// just the first bin of 2
let bins = 2;
let result = AccountsDb::scan_snapshot_stores(
&stora... | rust_cleaned_test_functions.jsonl/37736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1830
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55665,
1999,
28857,
53265,
1261,
4589,
880,
19770,
368,
341,
286,
1077,
5206,
10472,
284,
6531,
16635,
486,
2258,
543,
286,
1077,
320,
6984,
33689,
1134,
11,
7112,
32190,
8,
284,
6077,
1261,
269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersect_sphere_point_2() {
//sphere point no intersection
{
let a = Sphere::init(&[10f64, 0f64, 0f64], 5f64);
let b = Point::init(&[0f64, 5.1f64, 0f64]);
match a.get_intersect(&b) {
(false, None) => (),
_ => panic!("unexpected result for ... | rust_cleaned_test_functions.jsonl/33718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
86973,
6085,
62,
17,
368,
341,
262,
442,
87410,
1459,
902,
19246,
198,
262,
341,
286,
1077,
264,
284,
54499,
486,
2327,
2099,
58,
16,
15,
69,
21,
19,
11,
220,
15,
69,
21,
19,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_flags_from_vec_3() {
let (flags, subcommand, argv) = flags_from_vec(svec![
"deno",
"run",
"-r",
"-D",
"--allow-write",
"script.ts"
]);
assert_eq!(
flags,
DenoFlags {
reload: true,
log_debug: true,
allow_write: tr... | rust_cleaned_test_functions.jsonl/115779 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14130,
5673,
13251,
62,
18,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
284,
8042,
5673,
13251,
1141,
4083,
90515,
414,
330,
5183,
78,
756,
414,
330,
6108,
756,
414,
6523,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_bytes_i32() {
let mut b = BufferBuilder::<i32>::new(4);
let bytes = [8, 16, 32, 64].to_byte_slice();
b.write_bytes(bytes, 4).unwrap();
assert_eq!(4, b.len());
assert_eq!(16, b.capacity());
let buffer = b.finish();
assert_eq!(16, buffe... | rust_cleaned_test_functions.jsonl/127621 | {
"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,
9165,
12524,
5318,
18,
17,
368,
341,
286,
1077,
5206,
293,
284,
10312,
3297,
27638,
72,
18,
17,
6831,
931,
7,
19,
317,
286,
1077,
5820,
284,
508,
23,
11,
220,
16,
21,
11,
220,
18,
17,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fetch_trending_tags() {
dotenv::dotenv().ok();
let mut pixiv: PixivClient = PixivClient::new().unwrap();
let username = std::env::var("PIXIV_ID").expect("PIXIV_ID isn't set!");
let password = std::env::var("PIXIV_PW").expect("PIXIV_PW isn't set!");
pixiv
.login(&us... | rust_cleaned_test_functions.jsonl/30377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 267
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
528,
61994,
16333,
368,
341,
262,
91286,
486,
50893,
1005,
562,
1428,
262,
1077,
5206,
31574,
344,
25,
49466,
344,
2959,
284,
49466,
344,
2959,
486,
931,
1005,
15454,
1428,
262,
1077,
5934,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lookup() {
let resolver = Resolver::new(ResolverConfig::default(), ResolverOpts::default()).unwrap();
let response = resolver.lookup_ip("www.example.com.").unwrap();
println!("response records: {:?}", response);
assert_eq!(response.iter().count(), 1);
fo... | rust_cleaned_test_functions.jsonl/820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 431
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
368,
341,
286,
1077,
36220,
284,
81854,
486,
931,
7,
18190,
2648,
486,
2258,
1507,
81854,
43451,
486,
2258,
6011,
15454,
1428,
286,
1077,
2033,
284,
36220,
39937,
10385,
445,
2136,
7724,
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... | 3 |
#[test]
fn test_get() {
let mut file = NamedTempFile::new().unwrap();
let feed1 = "https://satylogin.medium.com/feed".to_string();
let feed2 = "https://motw.rs/rss.xml".to_string();
let now = chrono::Utc::now();
let content = format!(
r#"[
{{
... | rust_cleaned_test_functions.jsonl/16199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 572
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
368,
341,
286,
1077,
5206,
1034,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
5395,
16,
284,
330,
2428,
1110,
36468,
88,
3673,
84366,
905,
93730,
3263,
983,
3904,
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_find_message_to_handle_from_completed_state() {
let _setup = SetupIndyMocks::init();
let connection = inviter_sm().to_inviter_completed_state();
// Ping
{
let messages = map!(
"key_1".to... | rust_cleaned_test_functions.jsonl/29148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
6462,
2346,
10630,
5673,
49068,
4387,
368,
341,
394,
1077,
716,
15188,
284,
18626,
1425,
88,
72577,
486,
2327,
1428,
394,
1077,
3633,
284,
1529,
2015,
15874,
1005,
983,
19996,
2015,
49068,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tp() {
let cases = vec![
("2011-11-11 10:10:10.123456", "2011-11-11"),
(" 2011-11-11 23:59:59", "2011-11-11"),
];
for (s, exp) in cases {
let mut res = Time::parse_utc_datetime(s, UNSPECIFIED_FSP).unwrap();
res.set_tim... | rust_cleaned_test_functions.jsonl/93960 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
55191,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
16,
12,
16,
16,
12,
16,
16,
220,
16,
15,
25,
16,
15,
25,
16,
15,
13,
16,
17,
18,
19,
20,
21,
497,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pop_decrements_length() {
let mut list: SimpleLinkedList<u32> = SimpleLinkedList::new();
list.push(1);
list.push(2);
list.pop();
assert_eq!(list.len(), 1, "list's length must be 1");
list.pop();
assert_eq!(list.len(), 0, "list's length must be 0");
} | rust_cleaned_test_functions.jsonl/78171 | {
"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,
17061,
2259,
837,
1368,
5118,
368,
341,
262,
1077,
5206,
1140,
25,
8993,
33915,
34837,
18,
17,
29,
284,
8993,
33915,
486,
931,
543,
262,
1140,
2552,
7,
16,
317,
262,
1140,
2552,
7,
17,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mempool_success_response() {
// Create runtime and mempool notifier
let runtime = create_runtime();
let _enter = runtime.enter();
let (mempool_notifier, mut mempool_listener) = crate::new_mempool_notifier_listener_pair();
// Spawn a new thread to handle a... | rust_cleaned_test_functions.jsonl/121416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
3262,
1749,
18632,
9655,
368,
341,
286,
442,
4230,
15592,
323,
1833,
10285,
73169,
198,
286,
1077,
15592,
284,
1855,
33232,
543,
286,
1077,
716,
1950,
284,
15592,
35690,
543,
286,
1077,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_direct_kernel_boot() {
let focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(Box::new(focal));
let kernel_path = direct_kernel_boot_path();
let mut child = GuestCommand::new(&guest)
.args(&["--cpus", "boot=1"])
... | rust_cleaned_test_functions.jsonl/26110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 858
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32871,
26876,
52062,
368,
341,
286,
1077,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
286,
1077,
8640,
284,
26215,
486,
931,
67758,
486,
931,
955,
3683... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_quaternion_sub() {
let q1 = Quaternion::new(1.0, [2.0, 3.0, 4.0]);
let q2 = Quaternion::new(5.0, [6.0, 7.0, 8.0]);
let expected = Quaternion::new(-4.0, [-4.0, -4.0, -4.0]);
let q3 = q1 - q2;
assert!(q3 == expected);
} | rust_cleaned_test_functions.jsonl/113346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
16351,
5228,
368,
341,
197,
10217,
2804,
16,
284,
24801,
486,
931,
7,
16,
13,
15,
11,
508,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
2558,
197,
10217,
2804,
17,
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_substring_index() {
let tests = vec![
("www.pingcap.com", ".", 2, "www.pingcap"),
("www.pingcap.com", ".", -2, "pingcap.com"),
("www.pingcap.com", ".", -3, "www.pingcap.com"),
("www.pingcap.com", ".", 0, ""),
("www.pingcap.com",... | rust_cleaned_test_functions.jsonl/9115 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2064
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
917,
3560,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
3489,
2136,
98247,
11346,
905,
497,
68514,
220,
17,
11,
330,
2136,
98247,
11346,
4461,
310,
3489,
2136,
98247,
11346,
905,
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_serde_roundtrip() {
crate::init().unwrap();
let mut tags = TagList::new();
assert_eq!(tags.to_string(), "taglist;");
{
let tags = tags.get_mut().unwrap();
tags.set_scope(TagScope::Global);
tags.add::<Title>(&"a title", TagMerge... | rust_cleaned_test_functions.jsonl/61374 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1566
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
29896,
32981,
368,
341,
286,
17717,
486,
2327,
1005,
15454,
1428,
286,
1077,
5206,
9492,
284,
12353,
852,
486,
931,
543,
286,
2060,
10714,
10297,
14082,
2389,
3904,
1507,
330,
4578,
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_fold_literal_names() {
fold("NaN == NaN", "false");
fold("Infinity == Infinity", "true");
fold("Infinity == NaN", "false");
fold("undefined == NaN", "false");
fold("undefined == Infinity", "false");
fold("Infinity >= Infinity", "true");
fold("NaN >= NaN", "false");
} | rust_cleaned_test_functions.jsonl/122212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
34100,
9187,
368,
341,
262,
11555,
445,
22831,
621,
32178,
497,
330,
3849,
797,
262,
11555,
445,
45090,
621,
39889,
497,
330,
1866,
797,
262,
11555,
445,
45090,
621,
32178,
497,
330,
3849,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dead_fork_transaction_error() {
let keypair1 = Keypair::new();
let keypair2 = Keypair::new();
let missing_keypair = Keypair::new();
let missing_keypair2 = Keypair::new();
let res = check_dead_fork(|_keypair, bank| {
let blockhash = bank.last_b... | rust_cleaned_test_functions.jsonl/11046 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 690
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53427,
761,
669,
28884,
4096,
368,
341,
286,
1077,
1376,
12670,
16,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1376,
12670,
17,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
7402,
3097,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bracket_term() {
let mut ctx = EvalPtr::new("123");
assert!(!ctx.is_bracket_term());
ctx.set_bracket_term(true);
assert!(ctx.is_bracket_term());
} | rust_cleaned_test_functions.jsonl/58898 | {
"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,
17682,
5709,
17464,
368,
341,
286,
1077,
5206,
5635,
284,
58239,
5348,
486,
931,
445,
16,
17,
18,
3071,
286,
2060,
0,
3471,
3773,
2079,
17682,
5709,
17464,
1423,
286,
5635,
980,
17682,
5709,
174... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_waiting_canceled() {
let (tx, rx) = channel::<i32>();
let res = tx.waiting().join(::futures::lazy(move || {
let _rx = rx;
Ok(())
}));
assert_eq!(res.wait().unwrap_err(), super::Canceled);
} | rust_cleaned_test_functions.jsonl/26367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84683,
666,
38392,
368,
341,
286,
1077,
320,
3998,
11,
19111,
8,
284,
5496,
27638,
72,
18,
17,
10448,
286,
1077,
592,
284,
9854,
16294,
287,
1005,
5987,
38732,
69,
74606,
486,
49013,
34081,
1369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_submit_exceed_max_rate() {
let writer = Arc::new(MockMetricsWriter::new());
let agent = MetricsAgent::new(writer.clone(), Duration::from_secs(1), 100);
for i in 0..102 {
agent.submit(
DataPoint::new("measurement")
.add_fiel... | rust_cleaned_test_functions.jsonl/10331 | {
"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,
31674,
2702,
4635,
6345,
9246,
368,
341,
286,
1077,
6916,
284,
19689,
486,
931,
66436,
27328,
6492,
486,
931,
1423,
286,
1077,
8315,
284,
54190,
16810,
486,
931,
38356,
15997,
1507,
21045,
486,
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... | 2 |
#[test]
fn test_lazy_filter_and_rename() {
let df = load_df();
let lf = df
.clone()
.lazy()
.with_column_renamed("a", "x")
.filter(col("x").map(
|s: Series| Ok(s.gt(3).into_series()),
Some(DataType::Boolean),
... | rust_cleaned_test_functions.jsonl/14674 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 465
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
8727,
8378,
79399,
368,
341,
286,
1077,
6764,
284,
2795,
10894,
543,
286,
1077,
58080,
284,
6764,
198,
310,
659,
19982,
741,
310,
659,
49013,
741,
310,
659,
4197,
8744,
1288,
30245,
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_upsert() {
let mut registry = Registry::new();
let key = vec![1, 2, 3, 4];
// Upserting without the key existing should succeed.
let value = vec![5, 6, 7, 8];
let value2 = vec![9, 10, 11, 12];
assert_empty!(apply_mutations_skip_invariant_checks(
... | rust_cleaned_test_functions.jsonl/86101 | {
"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,
8237,
6047,
368,
341,
286,
1077,
5206,
19424,
284,
32112,
486,
931,
543,
286,
1077,
1376,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
935,
286,
442,
71316,
529,
287,
2041,
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_handle_geojson() {
let input_str = include_str!("../fixtures/input.geojson").to_string();
let outlines = handle_geojson(input_str.clone(), 0., false).unwrap();
let lines = outlines.iter().filter(|g| matches!(g, GridGeom::Line(_)));
let areas = handle_geojson(input... | rust_cleaned_test_functions.jsonl/132995 | {
"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,
10630,
60308,
2236,
368,
341,
286,
1077,
1946,
2895,
284,
2924,
2895,
17223,
1244,
45247,
39990,
61188,
2236,
1827,
983,
3904,
543,
286,
1077,
49629,
284,
3705,
60308,
2236,
5384,
2895,
15997,
1507,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rm_recursive() {
let (at, mut ucmd) = testing(UTIL_NAME);
let dir = "test_rm_recursive_directory";
let file_a = "test_rm_recursive_directory/test_rm_recursive_file_a";
let file_b = "test_rm_recursive_directory/test_rm_recursive_file_b";
at.mkdir(dir);
at.touch(file_a);
... | rust_cleaned_test_functions.jsonl/61416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 256
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58537,
66242,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
7497,
7,
36969,
4708,
317,
262,
1077,
5419,
284,
330,
1944,
58537,
66242,
14846,
876,
262,
1077,
1034,
4306,
284,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cowarc_clone_unique2() {
let mut cow0 = Arc::new(75);
let cow1 = cow0.clone();
let cow2 = cow1.clone();
assert!(75 == *cow0);
assert!(75 == *cow1);
assert!(75 == *cow2);
*Arc::make_mut(&mut cow0) += 1;
assert!(76 == *cow0);
... | rust_cleaned_test_functions.jsonl/35114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
363,
8198,
54742,
21218,
17,
368,
341,
286,
1077,
5206,
19362,
15,
284,
19689,
486,
931,
7,
22,
20,
317,
286,
1077,
19362,
16,
284,
19362,
15,
15997,
543,
286,
1077,
19362,
17,
284,
19362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compute_transaction_costs() {
solana_logger::setup();
// make a vec of txs
let keypair = Keypair::new();
let transfer_tx = SanitizedTransaction::from_transaction_for_tests(
system_transaction::transfer(&keypair, &keypair.pubkey(), 1, Hash::default()),... | rust_cleaned_test_functions.jsonl/116532 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 834
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57028,
28884,
85946,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
442,
1281,
264,
7486,
315,
9854,
82,
198,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new() {
let point = Point3::new(17.0, -4.0, 23.0);
assert_approx_eq!(point.x(), 17.0);
assert_approx_eq!(point.y(), -4.0);
assert_approx_eq!(point.z(), 23.0);
} | rust_cleaned_test_functions.jsonl/131699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
368,
341,
286,
1077,
1459,
284,
5126,
18,
486,
931,
7,
16,
22,
13,
15,
11,
481,
19,
13,
15,
11,
220,
17,
18,
13,
15,
626,
286,
2060,
90425,
10714,
10297,
2768,
1993,
1507,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_if_branches() {
let mut ctx = std::collections::BTreeMap::new();
ctx.insert("false", Value::from(false));
ctx.insert("nil", Value::from(()));
let mut c = Compiler::new();
c.add(Instruction::Lookup("false"));
c.start_if();
c.add(Instruction::EmitRaw("nope1"));
c.s... | rust_cleaned_test_functions.jsonl/72123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
28031,
288,
368,
341,
262,
1077,
5206,
5635,
284,
1460,
486,
51137,
486,
33,
6533,
2227,
486,
931,
543,
262,
5635,
7030,
445,
3849,
497,
5162,
486,
1499,
3576,
1106,
262,
5635,
7030,
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_array_fill() -> Result<()> {
// Test full for PrimitiveArray
let mut df_uint16_array = DFUInt16Array::full(5u16, 3);
let arrow_uint16_array = df_uint16_array.inner();
assert_eq!(&[5u16, 5u16, 5u16], &arrow_uint16_array.values().as_slice());
// Test full_null for PrimitiveArra... | rust_cleaned_test_functions.jsonl/33854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 728
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
30728,
368,
1464,
5714,
71698,
341,
262,
442,
3393,
2480,
369,
51460,
1857,
198,
262,
1077,
5206,
6764,
15807,
16,
21,
3858,
284,
43376,
18777,
16,
21,
1857,
486,
8878,
7,
20,
84,
16,
21... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic() {
let grams = vec![
Gram::from_str("A"),
Gram::from_str("D"),
Gram::from_str("B"),
];
let vocab = SimpleVocabulary::build(&grams).unwrap();
assert_eq!(vocab.get(Gram::from_str("A")), Some(0));
assert_eq!(vocab.g... | rust_cleaned_test_functions.jsonl/51051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
286,
1077,
33319,
284,
7486,
90515,
310,
28837,
486,
1499,
2895,
445,
32,
4461,
310,
28837,
486,
1499,
2895,
445,
35,
4461,
310,
28837,
486,
1499,
2895,
445,
33,
4461,
286,
1542... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_totient_prime_list() {
let results: Vec<usize> = [1, 100, 1000, 10000, 100000]
.windows(2)
.scan(0, |acc, window| {
let (lower, upper) = (window[0], window[1]);
*acc += (lower..=upper).filter(is_prime).count();
Some(... | rust_cleaned_test_functions.jsonl/59428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36138,
1167,
38217,
2019,
368,
341,
286,
1077,
3059,
25,
11312,
90244,
29,
284,
508,
16,
11,
220,
16,
15,
15,
11,
220,
16,
15,
15,
15,
11,
220,
16,
15,
15,
15,
15,
11,
220,
16,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq_legendre() {
assert_eq!(QuadraticResidue, Fq::one().legendre());
assert_eq!(Zero, Fq::zero().legendre());
let e = BigInteger([
0x2e8de1a676c03be8,
0x73350d34fe25a560,
0x7ea085919029688e,
0x1d0868cb993cf28,
]);
assert_eq!(QuadraticResidue, F... | rust_cleaned_test_functions.jsonl/124840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
76612,
265,
368,
341,
262,
2060,
10714,
10297,
2183,
88678,
1061,
60607,
11,
434,
80,
486,
603,
1005,
14505,
265,
1423,
262,
2060,
10714,
10297,
17999,
11,
434,
80,
486,
14154,
1005,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_transactions_subscribe_with_filter() {
let node_handler = run_node(6333, 8082);
// Create client with filter
let mut client = create_ws_client(
"ws://localhost:8082/api/explorer/v1/transactions/subscribe?service_id=0&message_id=0",
)
.expect("Cannot connect to node")... | rust_cleaned_test_functions.jsonl/85927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 826
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68182,
88935,
6615,
8727,
368,
341,
262,
1077,
2436,
10183,
284,
1598,
5084,
7,
21,
18,
18,
18,
11,
220,
23,
15,
23,
17,
626,
262,
442,
4230,
2943,
448,
4051,
198,
262,
1077,
5206,
2943,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_dict_with_duplicates() {
assert::fails("{40+2: 2, 6*7: 3}", &["key repeated", "42"]);
assert::fails("{42: 2, 42: 3}", &["key repeated", "42"]);
} | rust_cleaned_test_functions.jsonl/5308 | {
"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,
5243,
6615,
75051,
368,
341,
16885,
286,
2060,
486,
59631,
13976,
19,
15,
10,
17,
25,
220,
17,
11,
220,
21,
9,
22,
25,
220,
18,
9545,
609,
1183,
792,
11504,
497,
330,
19,
17,
15049,
1789,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_opcode_hlt() {
// tests if vm will halt when no instructions
let mut test_vm = VM::new();
let test_bytes = vec![0, 0, 0, 0];
test_vm.program = test_bytes;
test_vm.run();
assert_eq!(test_vm.program_counter, 1);
} | rust_cleaned_test_functions.jsonl/60338 | {
"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,
71319,
1523,
4832,
368,
341,
286,
442,
7032,
421,
10995,
686,
26269,
979,
902,
11221,
198,
286,
1077,
5206,
1273,
39008,
284,
17792,
486,
931,
543,
286,
1077,
1273,
12524,
284,
7486,
20703,
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_yclip_prefix_custom() {
let y = b"GGGGGGATG";
let x = b"ATG";
let score = |a: u8, b: u8| if a == b { 1i32 } else { -1i32 };
let scoring = Scoring::new(-5, -1, &score).yclip(-5);
let mut aligner = Aligner::with_scoring(scoring);
let alignment = al... | rust_cleaned_test_functions.jsonl/16851 | {
"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,
4178,
7974,
13974,
15875,
368,
341,
286,
1077,
379,
284,
293,
1,
22254,
22254,
22254,
828,
38,
876,
286,
1077,
856,
284,
293,
1,
828,
38,
3302,
286,
1077,
5456,
284,
760,
64,
25,
575,
23,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_into_iter_sorted_collect() {
let heap = BinaryHeap::from(vec![2, 4, 6, 2, 1, 8, 10, 3, 5, 7, 0, 9, 1]);
let it = heap.into_iter_sorted();
let sorted = it.collect::<Vec<_>>();
assert_eq!(sorted, vec![10, 9, 8, 7, 6, 5, 4, 3, 2, 2, 1, 1, 0]);
} | rust_cleaned_test_functions.jsonl/62353 | {
"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,
45514,
11723,
41277,
68140,
368,
341,
262,
1077,
17364,
284,
17718,
27909,
486,
1499,
25592,
20703,
17,
11,
220,
19,
11,
220,
21,
11,
220,
17,
11,
220,
16,
11,
220,
23,
11,
220,
16,
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_add() {
assert_eq!(
Vector3D::new(3, 4, 5) + Vector3D::new(5, 10, 15),
Vector3D::from([8, 14, 20])
);
assert_eq!(
Vector3D::new(3, 4, 5) + Vector3D::zero(),
Vector3D::from([3, 4, 5])
)... | rust_cleaned_test_functions.jsonl/21637 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
368,
341,
310,
2060,
10714,
33673,
394,
4196,
18,
35,
486,
931,
7,
18,
11,
220,
19,
11,
220,
20,
8,
488,
4196,
18,
35,
486,
931,
7,
20,
11,
220,
16,
15,
11,
220,
16,
20,
1326,
39... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_leader_transfer_to_learner() {
let l = default_logger();
let s = MemStorage::new_with_conf_state((vec![1], vec![2]));
let c = new_test_config(1, 10, 1);
let leader = new_test_raft_with_config(&c, s, &l);
let s = MemStorage::new_with_conf_state((vec![1], vec![2]));
let c ... | rust_cleaned_test_functions.jsonl/19164 | {
"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,
79991,
35403,
2346,
62,
93595,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
274,
284,
13550,
5793,
486,
931,
6615,
16059,
4387,
1188,
4083,
20703,
16,
1125,
7486,
20703,
17,
14382,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_text() {
let text = std::fs::read_to_string(WAR_AND_PEACE_PATH)
.expect("Failed to read war and peace from the disk.");
let text_with_owo = text.owoify(&OwoifyLevel::Owo);
let text_with_uwu = text.owoify(&OwoifyLevel::Uwu);
let text_with_uvu = tex... | rust_cleaned_test_functions.jsonl/60227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
4326,
368,
341,
286,
1077,
1467,
284,
1460,
486,
3848,
486,
878,
2346,
3904,
14031,
934,
21767,
45784,
5576,
7944,
340,
310,
659,
17119,
445,
9408,
311,
1349,
4116,
323,
8919,
504,
279,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_fame_include() {
crate::grit_test::set_test_logging(LOG_LEVEL);
let td: TempDir = crate::grit_test::init_repo();
let path = td.path().to_str().unwrap();
let args = FameArgs::new(
path.to_string(),
Some("loc".to_string()),
... | rust_cleaned_test_functions.jsonl/5822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
761,
373,
37878,
368,
341,
286,
17717,
486,
901,
275,
4452,
486,
746,
4452,
59982,
24850,
17415,
626,
286,
1077,
17941,
25,
19944,
6184,
284,
17717,
486,
901,
275,
4452,
486,
2327,
37784,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gcd() {
fn check(a: int, b: int, c: int) {
let big_a: BigInt = FromPrimitive::from_int(a).unwrap();
let big_b: BigInt = FromPrimitive::from_int(b).unwrap();
let big_c: BigInt = FromPrimitive::from_int(c).unwrap();
assert_eq!(big_a.gcd(&big... | rust_cleaned_test_functions.jsonl/96932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
4385,
368,
341,
286,
5168,
1779,
2877,
25,
526,
11,
293,
25,
526,
11,
272,
25,
526,
8,
341,
310,
1077,
2409,
4306,
25,
62608,
284,
5542,
33313,
486,
1499,
4042,
2877,
568,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice_out_of_range_negative() {
let arr = [-256, -1, -10];
assert_eq!(
Color::try_from(&arr[..]),
Err(IntoColorError::IntConversion)
);
} | rust_cleaned_test_functions.jsonl/761 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
6068,
3575,
9698,
53865,
368,
341,
286,
1077,
2890,
284,
10055,
17,
20,
21,
11,
481,
16,
11,
481,
16,
15,
935,
286,
2060,
10714,
33673,
310,
3478,
486,
1539,
5673,
2099,
1118,
95874,
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 |
#[test]
fn test_rules_standard() {
let standard_works = [false, true, false, false, true, false, false, false, false, true, false];
for (size, &expected) in standard_works.iter().enumerate().skip(1) {
assert_eq!(Rules::new_standard(size).is_ok(), expected);
}
} | rust_cleaned_test_functions.jsonl/98914 | {
"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,
21407,
48688,
368,
341,
286,
1077,
5297,
11498,
82,
284,
508,
3849,
11,
830,
11,
895,
11,
895,
11,
830,
11,
895,
11,
895,
11,
895,
11,
895,
11,
830,
11,
895,
935,
286,
369,
320,
2141,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_managed_addresses_try_from_fidl() {
let prefix_length = 24;
let start_addr = fidl_ip_v4!("192.168.0.2");
let stop_addr = fidl_ip_v4!("192.168.0.254");
let correct_pool = fidl_fuchsia_net_dhcp::AddressPool {
prefix_length: Some(prefix_length),
... | rust_cleaned_test_functions.jsonl/68086 | {
"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,
79889,
59471,
53283,
5673,
761,
55464,
368,
341,
286,
1077,
9252,
5118,
284,
220,
17,
19,
280,
286,
1077,
1191,
7387,
284,
32104,
75,
10385,
2273,
19,
17223,
16,
24,
17,
13,
16,
21,
23,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_json_binary_expression() {
let n = BinaryExpr {
base: BaseNode::default(),
operator: Operator::AdditionOperator,
left: Expression::StringLit(StringLit {
base: BaseNode::default(),
value: "hello".to_string(),
}),
right: Expressio... | rust_cleaned_test_functions.jsonl/40431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
31761,
28068,
368,
341,
262,
1077,
308,
284,
17718,
16041,
341,
286,
2331,
25,
5351,
1955,
486,
2258,
3148,
286,
5675,
25,
28498,
486,
2212,
680,
18461,
345,
286,
2115,
25,
16378,
486,
703... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merkle_root() {
let cases = vec![
(
vec![
h256_rev("c06fbab289f723c6261d3030ddb6be121f7d2508d77862bb1e484f5cd7f92b25"),
h256_rev("5a4ebf66822b0b2d56bd9dc64ece0bc38ee7844a23ff1d7320a88c5fdb2ad3e2"),
],
... | rust_cleaned_test_functions.jsonl/94613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
16754,
273,
12993,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
7486,
90515,
503,
305,
17,
20,
21,
38082,
445,
66,
15,
21,
10798,
370,
17,
23,
24,
69,
22,
17,
18,
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... | 2 |
#[test]
fn test_release_all() {
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE,"true");
let h1 = create_new_credentialdef("SourceId".to_string(), CREDENTIAL_DEF_NAME.to_string(), ISSUER_DID.to_string(), SCHEMA_ID.to_string(), "tag".to_string(), "{}... | rust_cleaned_test_functions.jsonl/67970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 627
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24577,
5705,
368,
341,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
1335,
1866,
797,
286,
1077,
305,
16,
284,
1855,
5921,
666,
30320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_csp_get_message_0() {
let json = r#"{
"csp-report": {
"document-uri": "http://example.com/foo",
"effective-directive": "img-src",
"blocked-uri": "http://google.com/foo"
}
}"#;
let mut event = Event::... | rust_cleaned_test_functions.jsonl/4027 | {
"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,
666,
2154,
3062,
6462,
62,
15,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
310,
330,
66,
2154,
47411,
788,
341,
394,
330,
6062,
87232,
788,
330,
1254,
1110,
8687,
905,
60555,
756,
394,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_date_range() {
assert_eq!(
parse_date_range(b"-19900201").ok(),
Some(DateRange {
start: None,
end: Some(NaiveDate::from_ymd(1990, 2, 1))
})
);
assert_eq!(
parse_date_range(b"-202002").ok... | rust_cleaned_test_functions.jsonl/22050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1048
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4164,
9698,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
4164,
9698,
1883,
34294,
16,
24,
24,
15,
15,
17,
15,
16,
1827,
562,
3148,
310,
4329,
19987,
6046,
341,
394,
1191,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.