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_is_latin() {
assert_eq!(is_latin('z'), true);
assert_eq!(is_latin('A'), true);
assert_eq!(is_latin('č'), true);
assert_eq!(is_latin('š'), true);
assert_eq!(is_latin('Ĵ'), true);
assert_eq!(is_latin('ж'), false);
} | rust_cleaned_test_functions.jsonl/123596 | {
"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,
6892,
907,
14768,
368,
341,
286,
2060,
10714,
10297,
285,
907,
14768,
492,
89,
4567,
830,
317,
286,
2060,
10714,
10297,
285,
907,
14768,
492,
32,
4567,
830,
317,
286,
2060,
10714,
10297,
285,
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_extract_package_version_with_null_version() -> io::Result<()> {
let config_name = "package.json";
let config_content = json::json!({
"name": "starship",
"version": null
})
.to_string();
let project_dir = create_project_dir()?;
... | rust_cleaned_test_functions.jsonl/19238 | {
"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,
39123,
26328,
9438,
6615,
15162,
9438,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
1722,
4323,
876,
286,
1077,
2193,
7495,
284,
2951,
486,
2236,
0,
2262,
310,
330,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_default() {
let po = Command::new(PROGNAME)
.output()
.unwrap_or_else(|err| panic!("{}", err));
let out = str::from_utf8(&po.stdout[..]).unwrap().trim_right();
let expected = env::current_dir().unwrap().into_os_string().into_string().unwrap();
assert_eq!(out, exp... | rust_cleaned_test_functions.jsonl/24480 | {
"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,
9993,
368,
341,
262,
1077,
3193,
284,
7348,
486,
931,
55681,
38,
7535,
340,
286,
659,
3006,
741,
286,
659,
15454,
8734,
62628,
22428,
615,
91,
21975,
79878,
1848,
3237,
262,
1077,
700,
284,
607,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_history_rejects_invalid_versions() {
for (api_level, abi_revision, err) in [
(
"some-version",
"1",
"invalid value: string \"some-version\", expected an unsigned integer at line 1 column 123",
),
(
... | rust_cleaned_test_functions.jsonl/30913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 896
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19802,
1288,
583,
82,
31433,
65148,
368,
341,
286,
369,
320,
2068,
8274,
11,
61050,
59856,
11,
1848,
8,
304,
2278,
310,
2399,
394,
330,
14689,
45367,
756,
394,
330,
16,
756,
394,
330,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_add_mul() {
let a = backprop(scalar(3.0));
let b = backprop(scalar(2.0));
let c = backprop(scalar(1.0));
let y = a.clone() * b.clone() + c.clone();
assert_eq!(*y, scalar(7.0));
let grads = gradients(&[y], &vec![a.clone(), b.clone()], false);
assert_eq!(&*grads[0], s... | rust_cleaned_test_functions.jsonl/35594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
24944,
368,
341,
262,
1077,
264,
284,
1182,
2674,
1141,
59153,
7,
18,
13,
15,
1106,
262,
1077,
293,
284,
1182,
2674,
1141,
59153,
7,
17,
13,
15,
1106,
262,
1077,
272,
284,
1182,
2674,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sources_get_length_utf16() {
let (sources, _) = setup();
let c = PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").unwrap());
let tests = c.join("tests");
let specifier = ModuleSpecifier::resolve_path(
&tests.join("001_hello.js").to_string_lossy(),
)
.unwrap();
le... | rust_cleaned_test_functions.jsonl/63553 | {
"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,
52896,
3062,
5118,
39453,
16,
21,
368,
341,
262,
1077,
320,
39651,
11,
27439,
284,
6505,
543,
262,
1077,
272,
284,
7933,
15064,
486,
1499,
16978,
486,
947,
29387,
445,
34,
7581,
46,
25143,
91120... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty0() {
assert_decompressed_input_matches_output(include_bytes!("../../testdata/empty.compressed.00"),
include_bytes!("../../testdata/empty"),
65536,
65536);
} | rust_cleaned_test_functions.jsonl/26432 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
15,
368,
341,
220,
2060,
2259,
45703,
5898,
38344,
7645,
77863,
12524,
17223,
2748,
92425,
14,
3194,
905,
14318,
13,
15,
15,
4461,
14265,
2924,
12524,
17223,
2748,
92425,
14,
3194,
4461,
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 |
#[test]
fn test_fq_sqrt() {
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06, 0xbc,
0xe5,
]);
assert_eq!(Fq::zero().sqrt().unwrap(), Fq::zero());
for _ in 0..1000 {
let a = Fq::random(&mut... | rust_cleaned_test_functions.jsonl/79194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 385
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
92199,
368,
341,
262,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
8956,
286,
220,
15,
87,
20,
24,
11,
220,
15,
87,
21,
17,
11,
220,
15,
42459,
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... | 5 |
#[test]
fn test_overlap() {
DelayPlusPoolProblem { input: vec![0.0, 1.0], pulse: 1, delay: 0, stride: 1, pool_window: 2 }
.run()
.unwrap()
} | rust_cleaned_test_functions.jsonl/125717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65794,
368,
341,
262,
39793,
21807,
10551,
31198,
314,
1946,
25,
7486,
20703,
15,
13,
15,
11,
220,
16,
13,
15,
1125,
27235,
25,
220,
16,
11,
7626,
25,
220,
15,
11,
19228,
25,
220,
16,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_issue486_multi_types() {
let hdr = indoc! {"
namespace a {
namespace spanner {
struct Key {};
}
} // namespace a
namespace b {
namespace spanner {
typedef int Key;
}
} // namespace... | rust_cleaned_test_functions.jsonl/9977 | {
"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,
53340,
19,
23,
21,
25133,
9763,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
286,
4473,
264,
341,
310,
4473,
9390,
1194,
341,
394,
2036,
5309,
9321,
310,
456,
286,
335,
442,
4473,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_overlap_cleanup() {
let mut cluster = new_node_cluster(0, 3);
// Disable raft log gc in this test case.
cluster.cfg.raft_store.raft_log_gc_tick_interval = ReadableDuration::secs(60);
let gen_snapshot_fp = "region_gen_snap";
let pd_client = Arc::clone(&cluster.pd_client);
... | rust_cleaned_test_functions.jsonl/68037 | {
"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,
65794,
42444,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
442,
28027,
52455,
1487,
22122,
304,
419,
1273,
1142,
624,
262,
10652,
30481,
13,
2944,
14809... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_big_endian_from_limbs_same_length() {
#[cfg(target_pointer_width = "32")]
let limbs = [
0xbccddeef, 0x89900aab, 0x45566778, 0x01122334, 0xddeeff00, 0x99aabbcc, 0x55667788,
0x11223344,
];
#[cfg(target_pointer_width = "64")]
let limb... | rust_cleaned_test_functions.jsonl/10666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 548
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36386,
87193,
5673,
58191,
1279,
33574,
5118,
368,
341,
286,
11506,
14072,
8637,
21425,
7927,
284,
330,
18,
17,
5422,
286,
1077,
48595,
284,
2278,
310,
220,
15,
7929,
638,
88089,
823,
11,
220,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_patch_machine_config_request() {
assert!(parse_patch_machine_config(&Body::new("invalid_payload")).is_err());
let body = r#"{}"#;
assert!(parse_patch_machine_config(&Body::new(body)).is_err());
let body = r#"{
"vcpu_count": 8,
... | rust_cleaned_test_functions.jsonl/33420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
39643,
38695,
5332,
7893,
368,
341,
286,
2060,
10297,
6400,
39643,
38695,
5332,
2099,
5444,
486,
931,
445,
11808,
32813,
15197,
285,
9266,
5231,
286,
1077,
2487,
284,
435,
55543,
6257,
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_checksum() {
assert_eq!(checksum(&[0x01, 0x86, 0x00, 0x00, 0x00, 0x00, 0x00]), 0x79);
} | rust_cleaned_test_functions.jsonl/86327 | {
"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,
64038,
368,
341,
286,
2060,
10714,
10297,
70740,
2099,
58,
15,
87,
15,
16,
11,
220,
15,
87,
23,
21,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
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_route_monitoring_to_another_slack_channel() -> Result<()> {
test_parse_and_merge(TestSet {
manifest_yml: r###"---
sentry:
silent: false"###
.into(),
env_yml: r###"---
sentry:
# it's not possible to turn sentry off if defined in the service mani... | rust_cleaned_test_functions.jsonl/90980 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28109,
40112,
287,
2346,
12008,
1575,
11886,
473,
14571,
368,
1464,
5714,
71698,
341,
286,
1273,
21039,
8378,
20888,
31159,
1649,
341,
310,
14455,
4178,
1014,
25,
435,
14374,
1,
10952,
82,
4085,
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_outer_line_comment() {
let tokens = quote! {
/// doc
};
let expected = "# [doc = r\" doc\"]";
assert_eq!(expected, tokens.to_string());
} | rust_cleaned_test_functions.jsonl/53418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67258,
6528,
17638,
368,
341,
262,
1077,
11211,
284,
12641,
0,
341,
286,
1048,
4629,
198,
262,
2605,
262,
1077,
3601,
284,
5869,
508,
5236,
284,
435,
2105,
4629,
75104,
876,
262,
2060,
10714,
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 |
#[test]
fn test_multi_union_schema() {
let schema = Schema::from_str(r#"["null", "int", "float", "string", "bytes"]"#);
assert!(schema.is_ok());
let schema = schema.unwrap();
let node = schema.top_node();
assert_eq!(SchemaKind::from(&schema), SchemaKind::Union);
l... | rust_cleaned_test_functions.jsonl/23005 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
51621,
25371,
368,
341,
286,
1077,
10802,
284,
12539,
486,
1499,
2895,
2601,
55543,
1183,
2921,
497,
330,
396,
497,
330,
3649,
497,
330,
917,
497,
330,
9651,
1341,
57676,
317,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_max_by() {
let xs: &[int] = &[-3, 0, 1, 5, -10];
assert_eq!(*xs.iter().max_by(|x| x.abs()).unwrap(), -10);
} | rust_cleaned_test_functions.jsonl/1018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6345,
3710,
368,
341,
286,
1077,
11943,
25,
44590,
396,
60,
284,
609,
7609,
18,
11,
220,
15,
11,
220,
16,
11,
220,
20,
11,
481,
16,
15,
935,
286,
2060,
10714,
0,
4071,
18561,
19471,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_from_angle_z_rotate_vector1() {
let rotation = Rotation3::from_angle_z(Degrees(90_f64));
let vector = Vector3::unit_x();
let expected = Vector3::unit_y();
let result = rotation.rotate_vector(&vector);
assert!(relative_eq!(result, expected, epsilon = 1e-8)... | rust_cleaned_test_functions.jsonl/70497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
6415,
60834,
12247,
16,
368,
341,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
6415,
5432,
791,
7858,
7,
24,
15,
761,
21,
19,
1106,
286,
1077,
4621,
284,
4196,
18,
486,
384... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_all_plains() {
// Check that the `ChunkBiomes` was overridden correctly.
let gen = DistortedVoronoiBiomeGenerator::default();
let chunk = ChunkPosition::new(5433, 132);
let biomes = gen.generate_for_chunk(chunk, 8344);
println!("{:?}", biomes);
... | rust_cleaned_test_functions.jsonl/43347 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 318
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
5705,
6317,
1735,
368,
341,
286,
442,
4248,
429,
279,
1565,
28304,
36096,
20347,
63,
572,
51456,
12440,
624,
286,
1077,
4081,
284,
27604,
13595,
53,
84850,
6728,
36096,
635,
12561,
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... | 4 |
#[test]
fn test_offline_pay_tx() {
let TestValidator {
server,
leader_data,
alice,
ledger_path,
..
} = TestValidator::run();
let bob_pubkey = Pubkey::new_rand();
let (sender, receiver) = channel();
run_local_faucet(alice, sender, None);
let faucet... | rust_cleaned_test_functions.jsonl/88224 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13651,
1056,
28925,
17805,
368,
341,
262,
1077,
3393,
14256,
341,
286,
3538,
345,
286,
7653,
1769,
345,
286,
70433,
345,
286,
46933,
2638,
345,
286,
54538,
262,
335,
284,
3393,
14256,
486,
6108,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_utf8() {
let bytes_name = Name::from_labels(vec![b"WWW" as &[u8], b"example", b"COM"]).unwrap();
let utf8_name = Name::from_utf8("WWW.example.COM.").unwrap();
let lower_name = Name::from_utf8("www.example.com.").unwrap();
assert!(!bytes_name.eq_case(&utf8_na... | rust_cleaned_test_functions.jsonl/38221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
39453,
23,
368,
341,
286,
1077,
5820,
1269,
284,
3988,
486,
1499,
14547,
25592,
20703,
65,
1,
45508,
1,
438,
44590,
84,
23,
1125,
293,
1,
8687,
497,
293,
1,
8696,
45014,
15454,
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_check_async_commit_txn_status() {
let do_test = |rollback_if_not_exist: bool| {
let engine = TestEngineBuilder::new().build().unwrap();
let r = rollback_if_not_exist;
must_prewrite_put_async_commit(&engine, b"k1", b"v", b"k1", &Some(vec![... | rust_cleaned_test_functions.jsonl/125139 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4858
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
28346,
36346,
92299,
4773,
368,
341,
286,
1077,
653,
4452,
284,
760,
33559,
11119,
7913,
35906,
25,
1807,
91,
341,
310,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_close_session_on_stream_opened() {
let rt = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async {
let (remote, local) = MockSocket::new();
let config = Config::default();
let mut session = Session::new_server(local, config);
... | rust_cleaned_test_functions.jsonl/74921 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12704,
12316,
4470,
12673,
11311,
291,
368,
341,
286,
1077,
16677,
284,
9628,
815,
486,
22255,
486,
15123,
486,
931,
1005,
15454,
1428,
286,
16677,
15697,
4470,
18285,
341,
310,
1077,
320,
18147,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_process_entrypoint_without_adopt_shred_version() {
let node_keypair = Arc::new(Keypair::new());
let cluster_info = Arc::new(ClusterInfo::new(
{
let mut contact_info =
ContactInfo::new_localhost(&node_keypair.pubkey(), timestamp());
... | rust_cleaned_test_functions.jsonl/11678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
9078,
2768,
39904,
62,
98238,
3712,
1151,
9438,
368,
341,
286,
1077,
2436,
3097,
12670,
284,
19689,
486,
931,
7,
6608,
1082,
1310,
486,
931,
1423,
286,
1077,
10652,
3109,
284,
19689,
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_serialize_with_parent() {
let item = SearchIndexItem {
index: vec!["superadmin".to_string(), "super_admin".to_string()],
name: "SUPER_ADMIN".to_string(),
kind: "enumitem".to_string(),
parent_name: Some("AccountType".to_string()),
... | rust_cleaned_test_functions.jsonl/95218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 379
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
6615,
15960,
368,
341,
286,
1077,
1509,
284,
7542,
1552,
1234,
341,
310,
1922,
25,
7486,
0,
1183,
9522,
2882,
3263,
983,
3904,
1507,
330,
9522,
12207,
3263,
983,
3904,
73845,
310,
829,
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_parse_multiline_comment() {
let arena = Arena::new();
assert_syntaxes(
&parse(&arena, "/* foo\nbar */", &lang()),
&[Syntax::new_atom(
&arena,
vec![
SingleLineSpan {
line: 0.into()... | rust_cleaned_test_functions.jsonl/52650 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 504
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
26290,
26560,
17638,
368,
341,
286,
1077,
24902,
284,
27047,
486,
931,
1428,
286,
2060,
78894,
288,
1006,
310,
609,
6400,
2099,
30527,
11,
330,
1057,
15229,
1699,
2257,
639,
497,
609,
5205,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multiple_indexes() {
let tmp_dir = tempfile::tempdir().unwrap();
let path = tmp_dir.path().join("test_fetch_multiple_indexes");
let name = path.to_str().unwrap();
let index1 = "index_one";
let index2 = "index_two";
let doc_store = DocumentSto... | rust_cleaned_test_functions.jsonl/110738 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
45233,
50161,
368,
341,
286,
1077,
4174,
4334,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
4174,
4334,
3875,
1005,
5987,
445,
1944,
11803,
45233,
50161,
797,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_n_leaves() {
// make sure we handle an empty MMR correctly
assert_eq!(pmmr::n_leaves(0), 0);
// and various sizes on non-empty MMRs
assert_eq!(pmmr::n_leaves(1), 1);
assert_eq!(pmmr::n_leaves(2), 2);
assert_eq!(pmmr::n_leaves(3), 2);
assert_eq!(pmmr::n_leaves(4), 3);
assert_eq!(pmmr::n_... | rust_cleaned_test_functions.jsonl/89897 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 265
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
11751,
4693,
368,
341,
197,
322,
1281,
2704,
582,
3705,
458,
4287,
386,
18446,
12440,
198,
6948,
10714,
10297,
79,
3821,
81,
486,
77,
11751,
4693,
7,
15,
701,
220,
15,
626,
197,
322,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tee_no_more_writeable_2() {
// should be equals to 'tee out1 out2 >/dev/full <multi_read' call
// but currently there is no way to redirect stdout to /dev/full
// so this test is disabled
let (_at, mut ucmd) = at_and_ucmd!();
let _content = (1..=10).map(|x| format!("{}\n", x)... | rust_cleaned_test_functions.jsonl/40788 | {
"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,
528,
2127,
6536,
36664,
9165,
480,
62,
17,
368,
341,
262,
442,
1265,
387,
16819,
311,
364,
6547,
700,
16,
700,
17,
61359,
3583,
62975,
366,
26268,
6443,
6,
1618,
198,
262,
442,
714,
5023,
1052... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nil_block() {
let genesis_block = Block::make_genesis_block();
let quorum_cert = QuorumCert::certificate_for_genesis();
let nil_block = Block::make_nil_block(&genesis_block, 1, quorum_cert);
assert_eq!(
nil_block.quorum_cert().certified_block_id(),
genesis_block.... | rust_cleaned_test_functions.jsonl/542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36175,
7113,
368,
341,
262,
1077,
59366,
7113,
284,
8362,
486,
6927,
16322,
13774,
7113,
543,
262,
1077,
922,
33006,
37097,
284,
3406,
33006,
36934,
486,
63586,
5478,
16322,
13774,
1428,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_submessage_variant_roundtrip() {
let variants = [
"InfoDestination",
"InfoReply",
"InfoSource",
"InfoTimestamp",
"AckNack",
"Data",
"DataFrag",
"Gap",
"Heartbeat",
"HeartbeatFrag",
"NackFrag",
"P... | rust_cleaned_test_functions.jsonl/73307 | {
"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,
5228,
1994,
46112,
29896,
32981,
368,
341,
262,
1077,
26012,
284,
2278,
286,
330,
1731,
33605,
756,
286,
330,
1731,
20841,
756,
286,
330,
1731,
3608,
756,
286,
330,
1731,
20812,
25897,
286,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_simple_operator_empty_json_parse() {
let json = "{}";
let query = parse_from_json(json).unwrap();
let expected = Operator::And(vec![]);
assert_eq!(query, expected);
} | rust_cleaned_test_functions.jsonl/11808 | {
"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,
30015,
40594,
15124,
9455,
21039,
368,
341,
286,
1077,
2951,
284,
35503,
3302,
286,
1077,
3239,
284,
4715,
5673,
9455,
9304,
568,
15454,
1428,
286,
1077,
3601,
284,
28498,
486,
3036,
25592,
0,
129... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_input() {
let actual = parse_input("The first floor contains a thulium generator, a thulium-compatible microchip, a plutonium generator, and a strontium generator.
The second floor contains a plutonium-compatible microchip and a strontium-compatible microchip.
The fourth floor contains no... | rust_cleaned_test_functions.jsonl/55905 | {
"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,
21039,
5898,
368,
341,
10217,
5042,
284,
4715,
5898,
445,
785,
1156,
6422,
5610,
264,
270,
360,
2356,
13823,
11,
264,
270,
360,
2356,
80215,
8003,
29662,
11,
264,
59487,
89244,
13823,
11,
323,
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_enforce() {
let epoch = test_epoch(10);
let mut cs = TestConstraintSystem::<Fr>::new();
let index = to_fr(&mut cs.ns(|| "index"), Some(9u32)).unwrap();
epoch
.constrain(&mut cs.ns(|| "constraint"), &index, false)
.unwrap();
assert!(... | rust_cleaned_test_functions.jsonl/78212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
8833,
368,
341,
286,
1077,
16342,
284,
1273,
20682,
7,
16,
15,
317,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
27638,
22560,
6831,
931,
543,
286,
1077,
1922,
284,
311,
41537,
2099,
69... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_first_ordinals_not_in_set_1() {
let schedule = "0 0/10 * * * * *".parse::<Schedule>().unwrap();
let start_time_1 = NaiveDate::from_ymd(2017, 10, 24).and_hms(0, 0, 59);
let start_time_1 = Utc.from_utc_datetime(&start_time_1);
let next_time_1 = schedule.after(&start... | rust_cleaned_test_functions.jsonl/50823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12978,
67324,
23695,
7913,
1243,
2602,
62,
16,
368,
341,
286,
1077,
9700,
284,
330,
15,
220,
15,
14,
16,
15,
353,
353,
353,
353,
353,
3263,
6400,
27638,
32210,
10483,
15454,
543,
286,
1077,
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_transport_worker_send_exists() {
let (_, stop_rx) = mpsc::channel();
let (_, worker_rx) = mpsc::channel();
let (worker_tx, rx) = mpsc::channel();
let worker = TransportWorker {
stop: stop_rx,
timeout: Duration::from_micros(0),
... | rust_cleaned_test_functions.jsonl/126111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46398,
40385,
13565,
9766,
368,
341,
286,
1077,
39464,
2936,
24330,
8,
284,
296,
81984,
486,
10119,
543,
286,
1077,
39464,
11864,
24330,
8,
284,
296,
81984,
486,
10119,
543,
286,
1077,
320,
21462,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_word_boundary_split_should_preserve_empty_lines() {
new_ucmd!()
.arg("-s")
.pipe_in("\n")
.succeeds()
.stdout_is("\n");
new_ucmd!()
.args(&["-w1", "-s"])
.pipe_in("0\n1\n\n2\n\n\n")
.succeeds()
.stdout_is("0\n1\n\n2\n\n\n")... | rust_cleaned_test_functions.jsonl/23268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13533,
54004,
17052,
43378,
32116,
5852,
15124,
18323,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
858,
13645,
82,
1138,
286,
659,
13768,
1243,
4921,
77,
1138,
286,
659,
82,
29264,
82,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sort_deglob_str() {
assert_eq!(sort_deglob_str(""), "");
assert_eq!(sort_deglob_str("foo"), "foo");
assert_eq!(sort_deglob_str("a, b"), "a, b");
assert_eq!(sort_deglob_str("b, a"), "a, b");
assert_eq!(sort_deglob_str("foo, bar, baz"), "bar, baz, foo");
... | rust_cleaned_test_functions.jsonl/118340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
46057,
1684,
2895,
368,
341,
286,
2060,
10714,
10297,
6860,
46057,
1684,
2895,
86076,
14498,
286,
2060,
10714,
10297,
6860,
46057,
1684,
2895,
445,
7975,
3975,
330,
7975,
797,
286,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_display_create_table() {
let stmt = Statement::CreateTable {
if_not_exists: true,
database: Some(Identifier {
name: "db".to_owned(),
quote: Some('`'),
}),
table: Identifier {
name: "table".to_owned(),
quote: Some... | rust_cleaned_test_functions.jsonl/94669 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 481
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
8657,
5237,
368,
341,
262,
1077,
20020,
284,
21756,
486,
4021,
2556,
341,
286,
421,
7913,
9766,
25,
830,
345,
286,
4625,
25,
4329,
7,
8714,
341,
310,
829,
25,
330,
1999,
3263,
983,
5197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pos_table() {
let mut writer = Cursor::new(vec![]);
DictionaryBuilder::convert_pos_table(
&mut writer,
&[String::from("a,b,c,d,e,f"), String::from("g,h,i,j,k,l")],
)
.unwrap();
assert_eq!(2 + 3 * 12, writer.get_ref().len());
} | rust_cleaned_test_functions.jsonl/134074 | {
"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,
34910,
6479,
5237,
368,
341,
262,
1077,
5206,
6916,
284,
28067,
486,
931,
25592,
0,
56703,
262,
10466,
3297,
486,
14166,
6479,
5237,
1006,
414,
609,
6984,
6916,
345,
414,
44590,
703,
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 |
#[test]
fn test_try_future() {
System::new().block_on(async {
let addr = MyStreamActor2 { counter: 0 }.start();
let res = addr.send(TryFutureMsg(5)).await.unwrap();
assert_eq!(res.err().unwrap(), 996u32);
})
} | rust_cleaned_test_functions.jsonl/82650 | {
"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,
53283,
59740,
368,
341,
262,
739,
486,
931,
1005,
4574,
4470,
18285,
341,
286,
1077,
10789,
284,
3017,
3027,
18870,
17,
314,
5546,
25,
220,
15,
16908,
2468,
543,
286,
1077,
592,
284,
10789,
5219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_proposal_id_candid_encoding() {
local_test_on_sns_subnet(|runtime| {
async move {
// Initialize the ledger with an account for a user.
let user = Sender::from_keypair(&TEST_USER1_KEYPAIR);
let alloc = Tokens::from_tokens(1000).unwrap();
... | rust_cleaned_test_functions.jsonl/93507 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
21663,
32556,
842,
666,
4551,
37613,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
341,
286,
3312,
3271,
341,
310,
442,
9008,
279,
46933,
448,
458,
2692,
369,
264,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_shortest_path_same_origin_and_destination() {
let res = 8;
let origin = H3Cell::from_coordinate(&Coordinate::from((23.3, 12.3)), res).unwrap();
let edge = origin.unidirectional_edges().first().unwrap();
let destination = edge.destination_index_unchecked();
... | rust_cleaned_test_functions.jsonl/10971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 722
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
477,
2638,
33574,
34043,
8378,
56344,
368,
341,
286,
1077,
592,
284,
220,
23,
280,
286,
1077,
6238,
284,
472,
18,
3599,
486,
1499,
68649,
2099,
28589,
486,
1499,
1188,
17,
18,
13,
18,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_check_txn_status_with_max_ts() {
let (_cluster, client, ctx) = must_new_cluster_and_kv_client();
let (k, v) = (b"key".to_vec(), b"value".to_vec());
let lock_ts = 10;
// Prewrite
let mut mutation = Mutation::default();
mutation.set_op(Op::Put);
mutation.set_key(k.clon... | rust_cleaned_test_functions.jsonl/61698 | {
"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,
7200,
92299,
4773,
6615,
6345,
25023,
368,
341,
262,
1077,
5453,
18855,
11,
2943,
11,
5635,
8,
284,
1969,
5921,
28441,
8378,
97066,
8179,
543,
262,
1077,
320,
74,
11,
348,
8,
284,
320,
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... | 1 |
#[test]
fn test_account_update() {
let accounts = AccountsDb::new_single();
let mut pubkeys: Vec<Pubkey> = vec![];
create_account(&accounts, &mut pubkeys, 0, 100, 0, 0);
update_accounts(&accounts, &pubkeys, 0, 99);
assert!(check_storage(&accounts, 0, 100));
} | rust_cleaned_test_functions.jsonl/1346 | {
"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,
13500,
8882,
368,
341,
286,
1077,
9618,
284,
40655,
7994,
486,
931,
19487,
543,
286,
1077,
5206,
6675,
10563,
25,
11312,
21604,
392,
792,
29,
284,
7486,
0,
15078,
286,
1855,
13500,
2099,
26206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_codebook_msb() {
let mut cb_desc: Vec<FullCodebookDesc<i8>> = vec![FullCodebookDesc {
code: 0b0,
bits: 1,
... | rust_cleaned_test_functions.jsonl/33953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16372,
4136,
2190,
717,
16892,
368,
341,
286,
1077,
5206,
9858,
10986,
25,
11312,
27,
9432,
2078,
2190,
11065,
21897,
23,
2452,
284,
7486,
20703,
9432,
2078,
2190,
11065,
341,
31979,
2038,
25,
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... | 2 |
#[test]
fn test_dotnet_framework_future_version() {
let mut runtime = RuntimeContext {
raw_description: ".NET Framework 200.0".to_string().into(),
build: LenientString("999999".to_string()).into(),
..RuntimeContext::default()
};
// Unmapped build number doesn't override vers... | rust_cleaned_test_functions.jsonl/68949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30941,
4711,
27565,
59740,
9438,
368,
341,
262,
1077,
5206,
15592,
284,
10954,
1972,
341,
286,
7112,
11448,
25,
5933,
15373,
23752,
220,
17,
15,
15,
13,
15,
3263,
983,
3904,
1005,
18122,
3148,
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_rstar_network_large_push() {
solana_logger::setup();
let mut network = rstar_network_create(4000);
network_simulator(&mut network, 0.9);
} | rust_cleaned_test_functions.jsonl/1104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 71
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
11870,
20966,
45228,
14218,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
543,
262,
1077,
5206,
3922,
284,
435,
11870,
20966,
8657,
7,
19,
15,
15,
15,
317,
262,
3922,
18314,
10511,
2099,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_msgpack_deserialize_body_with_args() {
let message = Message {
properties: MessageProperties {
correlation_id: "aaa".into(),
content_type: "application/x-msgpack".into(),
content_encoding: "utf-8".into(),
reply_to: None,
},
... | rust_cleaned_test_functions.jsonl/97962 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6483,
4748,
15768,
9050,
14114,
6615,
8384,
368,
341,
262,
1077,
1943,
284,
4856,
341,
286,
5888,
25,
4856,
7903,
341,
310,
25588,
842,
25,
330,
32646,
3263,
18122,
3148,
310,
2213,
1819,
25,
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_deserialize_ilint() {
let mut reader = ByteArrayReader::new(&ILINT_SAMPLE_BIN);
let v = match reader.deserialize_ilint() {
Ok(v) => v,
_ => panic!(),
};
assert_eq!(v, ILINT_SAMPLE);
let mut reader = ByteArrayReader::new(&ILINT_SAMPLE_BIN[..ILINT_SAMPLE_BIN.le... | rust_cleaned_test_functions.jsonl/25682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
26743,
396,
368,
341,
262,
1077,
5206,
6604,
284,
32920,
5062,
486,
931,
2099,
1715,
3221,
41439,
55720,
317,
262,
1077,
348,
284,
2432,
6604,
50755,
26743,
396,
368,
341,
286,
7622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_into_string_d() {
let d: String = DurationString::try_from(String::from("1d")).unwrap().into();
assert_eq!(d, "1d");
} | rust_cleaned_test_functions.jsonl/97556 | {
"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,
45514,
3904,
814,
368,
341,
286,
1077,
294,
25,
923,
284,
21045,
703,
486,
1539,
5673,
2242,
486,
1499,
445,
16,
67,
15197,
15454,
1005,
18122,
543,
286,
2060,
10714,
10297,
67,
11,
330,
16,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_align_up_to() {
// We are doing some sort of property testing here:
// The resulting `new_pos` must:
use rand::{thread_rng, Rng};
let mut rng = thread_rng();
for _ in 0..100_000 {
... | rust_cleaned_test_functions.jsonl/43497 | {
"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,
37015,
8237,
2346,
368,
341,
310,
442,
1205,
525,
3730,
1045,
3378,
315,
3343,
7497,
1588,
510,
3374,
310,
442,
576,
12942,
1565,
931,
6479,
63,
1969,
510,
34642,
3374,
310,
990,
10382,
22964,
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_function_selector_behavior() {
use crate::type_engine::IntegerBits;
let decl = TypedFunctionDeclaration {
purity: Default::default(),
name: Ident::new_with_override(
"foo",
Span {
span: pest::Span::new(" ".into(), 0, 0).unwrap(),
... | rust_cleaned_test_functions.jsonl/19428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1920
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
28890,
74540,
368,
341,
262,
990,
17717,
486,
1313,
24823,
486,
3486,
19920,
280,
262,
1077,
3963,
284,
50554,
5152,
24489,
341,
286,
52400,
25,
7899,
486,
2258,
3148,
286,
829,
25,
22507,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_symbolfile_from_crlf_file() {
test_symbolfile_from_file(
"testdata/symbols/test_app.pdb/6A9832E5287241C1838ED98914E9B7FF1/test_app.sym",
);
} | rust_cleaned_test_functions.jsonl/54413 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21179,
1192,
5673,
666,
2381,
69,
2458,
368,
341,
286,
1273,
21179,
1192,
5673,
2458,
1006,
310,
330,
92425,
2687,
11786,
12697,
8191,
556,
1999,
14,
21,
32,
24,
23,
18,
17,
36,
20,
17,
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_sighash_errors() {
let dumb_tx = Transaction {
version: 0,
lock_time: 0,
input: vec![TxIn::default()],
output: vec![],
};
let mut c = SighashCache::new(&dumb_tx);
// 1.29 fixes
let empty_vec = vec![];
... | rust_cleaned_test_functions.jsonl/115162 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1089
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
1090,
988,
20196,
368,
341,
286,
1077,
29255,
17805,
284,
17869,
341,
310,
2319,
25,
220,
15,
345,
310,
5296,
3009,
25,
220,
15,
345,
310,
1946,
25,
7486,
20703,
31584,
641,
486,
2258,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bpf_loader_upgradeable_set_upgrade_authority() {
let instruction = bincode::serialize(&UpgradeableLoaderInstruction::SetAuthority).unwrap();
let slot = 0;
let upgrade_authority_address = Pubkey::new_unique();
let upgrade_authority_account = AccountSharedData::new_... | rust_cleaned_test_functions.jsonl/35385 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3763
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
15897,
22139,
67794,
480,
2602,
67794,
22938,
487,
368,
341,
286,
1077,
7600,
284,
9544,
1851,
486,
24166,
2099,
43861,
480,
9181,
16664,
486,
1649,
45532,
568,
15454,
543,
286,
1077,
9446,
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_background_processor() {
// re-persistence and is successfully re-persisted.
let nodes = create_nodes(2, "test_background_processor".to_string());
// Go through the channel creation process so that each node has something to persist. Since
// avoid a race with processing events... | rust_cleaned_test_functions.jsonl/26263 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 893
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24103,
50127,
368,
341,
18363,
197,
197,
322,
312,
2268,
8026,
323,
374,
7790,
312,
2268,
4975,
291,
624,
197,
10217,
7798,
284,
1855,
14896,
7,
17,
11,
330,
1944,
24103,
50127,
3263,
983,
3904,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_terminated_ap() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
let test_values = test_setup(&mut exec);
let selector = Arc::new(NetworkSelector::new(
test_values.saved_networks.clone(),
create_mock_cobalt_se... | rust_cleaned_test_functions.jsonl/62739 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 704
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
68659,
21093,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
1273,
9146,
284,
1273,
21363,
2099,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dep_group() {
let tx1 = build_tx(vec![(&h256!("0x1").pack(), 0)], 1);
let tx1_out_point = OutPoint::new(tx1.hash(), 0);
// Dep group cell
let tx2_data = vec![tx1_out_point.clone()].pack().as_bytes();
let tx2 = TransactionBuilder::default()
.in... | rust_cleaned_test_functions.jsonl/50526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49258,
6288,
368,
341,
286,
1077,
9854,
16,
284,
1936,
17805,
25592,
20703,
2099,
71,
17,
20,
21,
17223,
15,
87,
16,
1827,
4748,
1507,
220,
15,
25035,
220,
16,
317,
286,
1077,
9854,
16,
6068,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse_client_final_success() {
let (gs2head, nonce, proof) = parse_client_final("c=abc,r=abcefg,p=783232").unwrap();
assert_eq!(gs2head, "abc");
assert_eq!(nonce, "abcefg");
assert_eq!(proof, "783232");
let (gs2head, nonce, proof) = parse_client_final("c=... | rust_cleaned_test_functions.jsonl/10294 | {
"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,
21039,
8179,
20676,
18632,
368,
341,
286,
1077,
320,
5857,
17,
1983,
11,
39676,
11,
11064,
8,
284,
4715,
8179,
20676,
445,
66,
28,
13683,
15883,
28,
370,
346,
4817,
7237,
28,
22,
23,
18,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_leader_transfer_second_transfer_to_same_node() {
let l = default_logger();
let mut nt = Network::new(vec![None, None, None], &l);
nt.send(vec![new_message(1, 1, MessageType::MsgHup, 0)]);
nt.isolate(3);
nt.send(vec![new_message(3, 1, MessageType::MsgTransferLeader, 0)]);
... | rust_cleaned_test_functions.jsonl/19171 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 375
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79991,
35403,
29644,
35403,
2346,
33574,
5084,
368,
341,
262,
1077,
326,
284,
1638,
27413,
543,
262,
1077,
5206,
31412,
284,
8141,
486,
931,
25592,
20703,
4064,
11,
2240,
11,
2240,
1125,
609,
75,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_constant_optimization() {
let code = compile_exec("1 + 2 + 3 + 4\n1.5 * 2.5");
assert_eq!(
code.instructions,
vec![
LoadConst {
value: Integer { value: 10.into() }
},
Pop,
... | rust_cleaned_test_functions.jsonl/85619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 337
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34967,
15032,
65964,
368,
341,
286,
1077,
2038,
284,
19192,
18430,
445,
16,
488,
220,
17,
488,
220,
18,
488,
220,
19,
1699,
16,
13,
20,
353,
220,
17,
13,
20,
797,
286,
2060,
10714,
33673,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_variant_unnamed_field() {
let variant = VariantDef::new("Hello", Fields::Unnamed);
assert_eq!(variant.name(), "Hello");
assert!(matches!(variant.fields(), Fields::Unnamed));
} | rust_cleaned_test_functions.jsonl/55830 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46112,
4907,
30245,
5013,
368,
341,
262,
1077,
11424,
284,
39292,
2620,
486,
931,
445,
9707,
497,
24580,
486,
78925,
626,
262,
2060,
10714,
10297,
15969,
2644,
1507,
330,
9707,
797,
262,
2060,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_iterator_flatten_fold() {
let xs = [0, 3, 6];
let ys = [1, 2, 3, 4, 5, 6, 7];
let mut it = xs.iter().map(|&x| x..x+3).flatten();
assert_eq!(it.next(), Some(0));
assert_eq!(it.next_back(), Some(8));
let i = it.fold(0, |i, x| {
assert_eq!(x, ys[i]);
i + 1
... | rust_cleaned_test_functions.jsonl/54105 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
5081,
14456,
61187,
368,
341,
262,
1077,
11943,
284,
508,
15,
11,
220,
18,
11,
220,
21,
935,
262,
1077,
31810,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_drain() {
let mut ooc = OffchainOverlayedChanges::default();
ooc.set(STORAGE_PREFIX, b"kkk", b"vvv");
let drained = ooc.drain().count();
assert_eq!(drained, 1);
let leftover = ooc.iter().count();
assert_eq!(leftover, 0);
ooc.set(STORAGE_PREFIX, b"a", b"v");
ooc.set(STORAGE_PREFI... | rust_cleaned_test_functions.jsonl/96081 | {
"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,
26680,
466,
368,
341,
197,
10217,
5206,
297,
509,
284,
4114,
8819,
32755,
291,
11317,
486,
2258,
543,
197,
22229,
509,
980,
40650,
27708,
18519,
11,
293,
1,
19196,
74,
497,
293,
1,
33075,
85,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool_array_and_sliced_same_offset() {
let a = BooleanArray::from_slice(vec![
false, false, false, false, false, false, false, false, false, false, true, true,
]);
let b = BooleanArray::from_slice(vec![
false, false, false, false, false, false, fals... | rust_cleaned_test_functions.jsonl/36448 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22159,
3858,
8378,
643,
74630,
33574,
6917,
368,
341,
286,
1077,
264,
284,
6992,
1857,
486,
1499,
26488,
25592,
90515,
310,
895,
11,
895,
11,
895,
11,
895,
11,
895,
11,
895,
11,
895,
11,
895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bad_requests() {
let bad_requests = [
"bad request\r\n\r\n", // 2 tokens
"yet another bad request\r\n\r\n", // 4 tokens
"CONNECT foo.bar.cøm:443 HTTP/1.1\r\n\r\n", // non-ascii
"CONNECT foo.bar.com:443... | rust_cleaned_test_functions.jsonl/8076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
34199,
37216,
368,
341,
286,
1077,
3873,
37216,
284,
2278,
310,
330,
13855,
1681,
12016,
1699,
12016,
1699,
497,
5180,
442,
220,
17,
11211,
198,
310,
330,
46392,
2441,
3873,
1681,
12016,
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_build_lookup() {
let morphs = vec![Morph {
surface: "す",
left_id: 1,
right_id: 1,
weight: 1,
contents: "contents 1",
... | rust_cleaned_test_functions.jsonl/97716 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
27464,
368,
341,
286,
1077,
26351,
82,
284,
7486,
20703,
44,
16347,
341,
4597,
7329,
25,
330,
17219,
756,
4597,
2115,
842,
25,
220,
16,
345,
4597,
1290,
842,
25,
220,
16,
345,
4597,
468... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_glx() {
let _ = unsafe { glx::GetProcAddress(std::mem::uninitialized()) };
unsafe { glx::SwapBuffers(std::mem::uninitialized(), std::mem::uninitialized()) };
} | rust_cleaned_test_functions.jsonl/70567 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
31447,
368,
341,
262,
1077,
716,
284,
19860,
314,
2770,
87,
486,
97558,
5194,
486,
10536,
486,
359,
36161,
2140,
2605,
262,
19860,
314,
2770,
87,
486,
46179,
36219,
5194,
486,
10536,
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 |
#[test]
fn test_build_upload_policy_with_callback_body_with_body_type() -> Result<(), Box<dyn Error>> {
let policy = UploadPolicyBuilder::new_policy_for_bucket("test_bucket", &Config::default())
.callback(
&["https://1.1.1.1", "https://2.2.2.2", "https://3.3.3.3"],
... | rust_cleaned_test_functions.jsonl/2359 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20801,
21691,
22773,
6615,
12519,
14114,
6615,
14114,
1819,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
4842,
284,
24996,
13825,
3297,
486,
931,
22773,
5478,
38749,
445,
1944,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_unicode_multiple_codepoints() {
let invalid = ["नी", "👨👨"];
for c in &invalid {
assert_invalid_str(c);
}
} | rust_cleaned_test_functions.jsonl/4162 | {
"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,
54662,
45233,
4136,
7706,
368,
341,
286,
1077,
8318,
284,
4383,
60096,
43647,
497,
330,
145367,
378,
235,
145367,
378,
235,
6332,
286,
369,
272,
304,
609,
11808,
341,
310,
2060,
31433,
2895,
1337,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_signer_t_different_shares() {
let data = "Hello world".as_bytes();
let signers = Signer::generate_signers(N, T);
let identifier = SignatureIdentifier { id: 0, index: 0 };
dbg!(signers.len());
let shares1 = signers
.iter()
.take(T)... | rust_cleaned_test_functions.jsonl/104901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 717
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
261,
528,
82741,
3712,
5403,
368,
341,
286,
1077,
821,
284,
330,
9707,
1879,
3263,
300,
12524,
543,
286,
1077,
1841,
388,
284,
7075,
261,
486,
19366,
11172,
388,
8204,
11,
350,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_run_interval() {
const MAX_WAIT: Duration = Duration::from_millis(10_000);
let (sender, receiver) = mpsc::channel();
std::thread::spawn(move || {
let sys = System::new();
sys.block_on(async move {
let _addr = IntervalActor::new(10, sender).start();
... | rust_cleaned_test_functions.jsonl/14480 | {
"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,
14007,
20541,
368,
341,
262,
733,
8334,
32091,
25,
21045,
284,
21045,
486,
1499,
717,
56212,
7,
16,
15,
62,
15,
15,
15,
626,
262,
1077,
320,
11644,
11,
13964,
8,
284,
296,
81984,
486,
10119,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_serialize_full_tcp() {
use crate::testdata::tls_client_hello_v4::*;
let mut buf = ETHERNET_FRAME.bytes;
let frame = buf.parse_with::<_, EthernetFrame<_>>(EthernetFrameLengthCheck::Check).unwrap();
verify_ethernet_frame(&frame, ETHERNET_FRAME);
let ... | rust_cleaned_test_functions.jsonl/31686 | {
"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,
21039,
88686,
16372,
45562,
368,
341,
286,
990,
17717,
486,
92425,
486,
34488,
8179,
96724,
2273,
19,
79304,
286,
1077,
5206,
6607,
284,
17768,
3012,
15373,
22260,
42697,
280,
286,
1077,
4034,
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_transport_type_tor() {
unsafe {
let mut error = 0;
let error_ptr = &mut error as *mut c_int;
let address_control = CString::new("/ip4/127.0.0.1/tcp/8080").unwrap();
let address_control_str: *const c_char = CString::into_raw(address_control)... | rust_cleaned_test_functions.jsonl/66626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46398,
1819,
528,
269,
368,
341,
286,
19860,
341,
310,
1077,
5206,
1465,
284,
220,
15,
280,
310,
1077,
1465,
4348,
284,
609,
6984,
1465,
438,
353,
6984,
272,
4042,
280,
310,
1077,
2621,
13436,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_remove_client_iface() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
// Create an IfaceManager with a client and an AP.
let test_values = test_setup(&mut exec);
let (mut iface_manager, _next_sme_req) =
create_i... | rust_cleaned_test_functions.jsonl/62721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 544
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
8179,
67666,
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,
458,
1416,
578,
2043,
448,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tokenizer_2numbers() {
let test_str = ".4 -2";
let tokens: Vec<Token> = Tokens::from_str(test_str).collect();
assert_eq!(tokens, vec![Token::Number(0.4), Token::Number(-2.0)]);
} | rust_cleaned_test_functions.jsonl/109318 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6458,
3135,
62,
17,
37378,
368,
341,
262,
1077,
1273,
2895,
284,
5933,
19,
481,
17,
876,
262,
1077,
11211,
25,
11312,
83416,
29,
284,
58166,
486,
1499,
2895,
8623,
2895,
568,
17384,
543,
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_fudge_dice() {
let s = "2dF";
let roll: Roll = s.parse().expect("Bad parse");
assert_eq!(roll.dice_count, 2);
assert_eq!(roll.sides, 6);
assert_eq!(roll.values, vec![1, 1, 0, 0, -1, -1]);
} | rust_cleaned_test_functions.jsonl/52854 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
19561,
97196,
368,
341,
286,
1077,
274,
284,
330,
17,
67,
37,
876,
286,
1077,
6502,
25,
14686,
284,
274,
4632,
1005,
17119,
445,
17082,
4715,
797,
286,
2060,
10714,
10297,
1100,
950,
558,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fr_add_assign() {
{
// Random number
let mut tmp = Fr([
0x437ce7616d580765,
0xd42d1ccb29d1235b,
0xed8f753821bd1423,
0x4eede1c9c89528ca,
]);
assert!(tmp.is_valid());
// Test that adding zero has no effect.... | rust_cleaned_test_functions.jsonl/100646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1952
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
2891,
20688,
368,
341,
262,
341,
286,
442,
10612,
1372,
198,
286,
1077,
5206,
4174,
284,
2869,
8956,
310,
220,
15,
87,
19,
18,
22,
346,
22,
21,
16,
21,
67,
20,
23,
15,
22,
21,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_unregister() {
let mut event_manager = EventManager::new().unwrap();
let dummy_subscriber = Arc::new(Mutex::new(DummySubscriber::new()));
event_manager
.add_subscriber(dummy_subscriber.clone())
.unwrap();
dummy_subscriber.lock().... | rust_cleaned_test_functions.jsonl/92053 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68992,
368,
341,
286,
1077,
5206,
1538,
12144,
284,
3665,
2043,
486,
931,
1005,
15454,
543,
286,
1077,
17292,
5228,
20351,
284,
19689,
486,
931,
3189,
9371,
486,
931,
5432,
8574,
40236,
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_can_print_warnings() {
let dep_graph = DepGraph::new(false);
{
let matches = getopts(&[
"-Awarnings".to_string()
], &optgroups()).unwrap();
let registry = errors::registry::Registry::new(&[]);
let (sessopts, _) = bui... | rust_cleaned_test_functions.jsonl/122240 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 854
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
10064,
87658,
368,
341,
286,
1077,
2170,
14738,
284,
4148,
11212,
486,
931,
3576,
317,
286,
341,
310,
1077,
9071,
284,
633,
10518,
2099,
9640,
394,
6523,
22600,
14857,
3263,
983,
3904,
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... | 1 |
#[test]
fn test_compaction_guard_should_partition_binary_search() {
let guard = CompactionGuardGenerator {
cf_name: CfNames::default,
boundaries: vec![
b"aaa00".to_vec(),
b"aaa01".to_vec(),
b"aaa02".to_vec(),
b"aaa03... | rust_cleaned_test_functions.jsonl/24456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 953
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
1311,
36796,
43378,
43840,
31761,
10716,
368,
341,
286,
1077,
7616,
284,
13317,
1311,
20806,
12561,
341,
310,
24111,
1269,
25,
89894,
7980,
486,
2258,
345,
310,
22711,
25,
7486,
90515,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vectors_snow() {
let file = OpenOptions::new().write(true).create_new(true).open("tests/vectors/snow.txt");
if let Ok(mut file) = file {
serde_json::to_writer_pretty(&mut file, &generate_vector_set()).unwrap();
}
let mut file = File::open("tests/vectors/snow.txt").unwrap(... | rust_cleaned_test_functions.jsonl/75130 | {
"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,
49158,
643,
3328,
368,
341,
262,
1077,
1034,
284,
5264,
3798,
486,
931,
1005,
4934,
3715,
568,
3182,
5921,
3715,
568,
2508,
445,
23841,
5457,
10605,
2687,
3328,
3909,
797,
262,
421,
1077,
7622,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_materialize_1() -> Result<()> {
let query = parse(
r#"
func count x -> s"count({x})"
from employees
aggregate [
count salary
]
"#,
)?;
let mat = resolve_and_materialize(query).unwrap();
assert_yaml... | rust_cleaned_test_functions.jsonl/90561 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 496
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33884,
551,
62,
16,
368,
1464,
5714,
71698,
341,
286,
1077,
3239,
284,
4715,
1006,
310,
435,
2,
698,
286,
2915,
1760,
856,
1464,
220,
274,
1,
1830,
2306,
87,
5410,
1837,
286,
504,
8256,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_do_work() {
assert_eq!(
"fd9528b920d6d3956e9e16114523e1889c751e8c1e040182116d4c906b43f558".to_string(),
do_work(&[0x99])
);
} | rust_cleaned_test_functions.jsonl/78267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26309,
11498,
368,
341,
286,
2060,
10714,
33673,
310,
330,
6902,
24,
20,
17,
23,
65,
24,
17,
15,
67,
21,
67,
18,
24,
20,
21,
68,
24,
68,
16,
21,
16,
16,
19,
20,
17,
18,
68,
16,
23,
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_invalid_argument() {
let mut runner = Runner::new();
let mut query = runner.proxy.start_logging(
"test",
&mut vec![&mut Metric::CpuLoad(CpuLoad { interval_ms: 0 })].into_iter(),
200,
false,
false,
);
// ... | rust_cleaned_test_functions.jsonl/66705 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 810
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
9025,
368,
341,
286,
1077,
5206,
22259,
284,
44946,
486,
931,
1428,
286,
1077,
5206,
3239,
284,
22259,
41103,
4962,
59982,
1006,
310,
330,
1944,
756,
310,
609,
6984,
7486,
20703,
5,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_interrupt() {
let code = String::from(SYSTEM_HEADER) + "\
(j RESET_HANDLER)
(nop)
(nop)
(nop)
(label TRAP_HANDLER)
; write to output
(lw t1 t3 0)
(sw t2 t1 0)
(lui t4 end_pc_target)
(addi t4 t4 end_pc_target)
(jalr zero t4 0)
(label RESET_HANDLER)
; enable global interrupt
(csrrsi zero 0... | rust_cleaned_test_functions.jsonl/134296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 532
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42606,
368,
341,
262,
1077,
2038,
284,
923,
486,
1499,
3759,
58761,
20330,
8,
488,
93317,
3325,
53215,
42472,
340,
1445,
453,
340,
1445,
453,
340,
1445,
453,
692,
13345,
4984,
2537,
42472,
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... | 3 |
#[test]
fn test_array_windows_infer() {
let v: &[i32] = &[0, 1, 0, 1];
assert_eq!(v.array_windows::<2>().count(), 3);
let c = v.array_windows();
for &[a, b] in c {
assert_eq!(a + b, 1);
}
let v2: &[i32] = &[0, 1, 2, 3, 4, 5, 6];
let total = v2.array_windows().map(|&[a, b, c]... | rust_cleaned_test_functions.jsonl/9656 | {
"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,
3858,
58220,
1243,
802,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
15,
11,
220,
16,
935,
262,
2060,
10714,
10297,
85,
7234,
58220,
27638,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_id() {
let method = test_method();
let mut new = method.clone();
*new.id_mut() = "did:diff:123".parse().unwrap();
let diff = method.diff(&new).unwrap();
assert!(diff.controller.is_none());
assert!(diff.key_data.is_none());
assert!(diff.key_type.is_none());
assert... | rust_cleaned_test_functions.jsonl/124419 | {
"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,
842,
368,
341,
262,
1077,
1714,
284,
1273,
9032,
543,
262,
1077,
5206,
501,
284,
1714,
15997,
543,
262,
353,
931,
1764,
29523,
368,
284,
330,
22920,
25,
13490,
25,
16,
17,
18,
3263,
6400,
1005... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_vote() {
let mut rng = rand::thread_rng();
let keys = Keypair::new();
let contact_info = ContactInfo::new_localhost(&keys.pubkey(), 0);
let cluster_info = ClusterInfo::new_with_invalid_keypair(contact_info);
// make sure empty crds is handled correct... | rust_cleaned_test_functions.jsonl/20368 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 835
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14218,
54360,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
6894,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
3645,
3109,
284,
9180,
1731,
486,
931,
62,
83... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clone() {
let mock_handle = Box::into_raw(Box::new(MockGarbageCollector::default()));
let count = Arc::new(AtomicUsize::new(1));
let value = RefCounter::new(count);
let shared1 = SharedGeneric::<RefCounter, MockGarbageCollector, MockNode<RefCounter>>::new(
... | rust_cleaned_test_functions.jsonl/48709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
368,
341,
286,
1077,
7860,
10630,
284,
8261,
486,
18122,
16067,
67758,
486,
931,
66436,
43930,
20652,
53694,
486,
2258,
7392,
286,
1077,
1760,
284,
19689,
486,
931,
7,
65857,
52,
2141,
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_no_inline_aliases5b() {
test_same("var x = this.foo(); this.bar(); var y; y = x; this.bing(); this.baz(y); x = 3;");
} | rust_cleaned_test_functions.jsonl/27686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
41871,
90233,
20,
65,
368,
341,
262,
1273,
33574,
445,
947,
856,
284,
419,
58432,
2129,
419,
22001,
2129,
762,
379,
26,
379,
284,
856,
26,
419,
948,
287,
2129,
419,
948,
1370,
7021,
1215... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fill_data() {
let mut builder = BooleanArrayBuilder::with_capacity(16);
builder.append_value(true);
builder.append_value(false);
builder.append_null();
builder.append_option(Some(false));
builder.append_option(None);
let data_array: DFBooleanArray = builder.finish();... | rust_cleaned_test_functions.jsonl/53498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 241
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30728,
1769,
368,
341,
262,
1077,
5206,
7363,
284,
6992,
1857,
3297,
486,
4197,
35603,
7,
16,
21,
317,
262,
7363,
2057,
3142,
3715,
317,
262,
7363,
2057,
3142,
3576,
317,
262,
7363,
2057,
15162,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mkfifoat_directory_none() {
let _m = ::CWD_LOCK.read().expect("Mutex got poisoned by another test");
// mkfifoat should fail if a directory is given
assert!(!mkfifoat(None, &env::temp_dir(), Mode::S_IRUSR).is_ok());
} | rust_cleaned_test_functions.jsonl/30592 | {
"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,
64861,
74031,
266,
14846,
31488,
368,
341,
262,
1077,
716,
76,
284,
3504,
34,
17563,
27661,
4125,
1005,
17119,
445,
38099,
2684,
70498,
553,
2441,
1273,
3071,
262,
442,
23789,
74031,
266,
1265,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_terms_query() {
let terms_query = Query::build_terms("field_name")
.with_values(vec!["a", "b", "c"])
.build();
assert_eq!("{\"terms\":{\"field_name\":[\"a\",\"b\",\"c\"]}}",
serde_json::to_string(&terms_query).unwrap());
let ter... | rust_cleaned_test_functions.jsonl/4270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37498,
5738,
368,
341,
286,
1077,
3793,
5738,
284,
11361,
486,
5834,
37498,
445,
2566,
1269,
1138,
310,
659,
4197,
9146,
25592,
0,
1183,
64,
497,
330,
65,
497,
330,
66,
14108,
310,
659,
5834,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lr0_automaton() {
let GrammarUtil { grammar, .. } = create_grammar();
let automaton = grammar.lr0_automaton();
assert_eq!(automaton.states.len(), 12);
} | rust_cleaned_test_functions.jsonl/24527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
46086,
15,
62,
27073,
23535,
368,
341,
286,
1077,
61977,
2742,
314,
31428,
11,
5241,
335,
284,
1855,
62,
41094,
543,
286,
1077,
5006,
23535,
284,
31428,
63349,
15,
62,
27073,
23535,
1428,
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 |
#[test]
fn test_traverse_subnet() {
let tmpdir = tempfile::Builder::new().prefix("test").tempdir().unwrap();
let mut state = ReplicatedState::new_rooted_at(
subnet_test_id(1),
SubnetType::Application,
tmpdir.path().into(),
);
state.metadata.ne... | rust_cleaned_test_functions.jsonl/98357 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2870
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
22439,
95681,
368,
341,
286,
1077,
4174,
3741,
284,
54819,
486,
3297,
486,
931,
1005,
11849,
445,
1944,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
5206,
1584,
284,
3321,
13724,
1397,
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_remove_branch_1_7_11() {
let mut block_tree = create_block_tree();
block_tree.remove_branch(id(1));
for i in 1..=11 {
let block = block_tree.get_block(id(i));
match i {
1 | 2 | 3 | 4 | 5 => assert!(block.is_none()),
_ => assert!(block.is_some(... | rust_cleaned_test_functions.jsonl/87729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 453
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
28031,
62,
16,
62,
22,
62,
16,
16,
368,
341,
262,
1077,
5206,
2504,
11663,
284,
1855,
7113,
11663,
1428,
262,
2504,
11663,
4850,
28031,
3724,
7,
16,
1106,
262,
369,
600,
304,
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... | 7 |
#[test]
fn test_construct() {
let mut bytes = vec![0xa5; 12];
let mut packet = Packet::new_unchecked(&mut bytes);
packet.set_src_port(48896);
packet.set_dst_port(53);
packet.set_len(12);
packet.set_checksum(0xffff);
packet.payload_mut().copy_from_slice(&PA... | rust_cleaned_test_functions.jsonl/36416 | {
"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,
64803,
368,
341,
286,
1077,
5206,
5820,
284,
7486,
20703,
15,
9591,
20,
26,
220,
16,
17,
935,
286,
1077,
5206,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
6984,
5820,
317,
286,
10151,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.