text stringlengths 93 16.4k | id stringlengths 20 40 | metadata dict | input_ids listlengths 45 2.05k | attention_mask listlengths 45 2.05k | complexity int64 1 9 |
|---|---|---|---|---|---|
#[test]
fn test_from_bytes_empty() {
let data: Vec<u8> = vec![];
let err = HeaderIdentClass::from_bytes((&data, 0));
assert!(matches!(err, Err(_)));
} | rust_cleaned_test_functions.jsonl/38143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
12524,
15124,
368,
341,
286,
1077,
821,
25,
11312,
34837,
23,
29,
284,
7486,
0,
40901,
286,
1077,
1848,
284,
12104,
28301,
1957,
486,
1499,
12524,
42902,
691,
11,
220,
15,
1106,
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 |
#[test]
fn test_parse_resource_request() {
assert_eq!(
parse_resource_request("Abc=10_234").unwrap(),
("Abc".to_string(), 10234)
);
assert_eq!(
parse_resource_request("X = 1").unwrap(),
("X".to_string(), 1)
);
} | rust_cleaned_test_functions.jsonl/107802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
17962,
7893,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
17962,
7893,
445,
5830,
66,
28,
16,
15,
62,
17,
18,
19,
1827,
15454,
3148,
310,
3489,
5830,
66,
3263,
983,
3904,
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_new_should_have_correct_alphabet() {
let lsys: LSystem = LSystem::new("AB".to_string());
assert!(lsys.alphabet.contains(&'A'));
} | rust_cleaned_test_functions.jsonl/101638 | {
"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,
5921,
43378,
67301,
31550,
8418,
18485,
368,
341,
286,
1077,
326,
7791,
25,
444,
2320,
284,
444,
2320,
486,
931,
445,
1867,
3263,
983,
3904,
1423,
286,
2060,
10297,
4730,
1047,
12168,
18485,
8786,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_rust_reference_method() {
let hdr = indoc! {"
#include <cstdint>
struct RustType;
uint32_t take_rust_reference(const RustType& foo);
"};
let cxx = indoc! {"
#include \"cxxgen.h\"
uint32_t take_rust_reference(const RustType& foo) {
return foo.get();
}"... | rust_cleaned_test_functions.jsonl/9934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 513
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
590,
25433,
9032,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
1339,
262,
2036,
33789,
929,
280,
262,
2622,
18,
17,
528,
1896,
1710,
590,
25433,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_all_plugins_can_be_fetched() {
let mut plugins: Vec<Plugin> = get_managed_plugins(&get_test_config());
assert_eq!(plugins.len(), 2);
let first: Plugin = plugins.remove(0);
let second: Plugin = plugins.remove(0);
assert_eq!(first.package_name, "hello/world");
assert_eq!... | rust_cleaned_test_functions.jsonl/42835 | {
"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,
5705,
45658,
27421,
21263,
761,
36780,
368,
341,
262,
1077,
5206,
17215,
25,
11312,
27,
11546,
29,
284,
633,
79889,
45658,
2099,
455,
4452,
5332,
5231,
262,
2060,
10714,
10297,
18716,
19406,
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_create_demo_2() {
let network = create_cave_network(vec![
"dc-end",
"HN-start",
"start-kj",
"dc-start",
"dc-HN",
"LN-dc",
"HN-end",
"kj-sa",
"kj-HN",
"kj-dc"
])... | rust_cleaned_test_functions.jsonl/70742 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 326
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
47830,
62,
17,
368,
341,
286,
1077,
3922,
284,
1855,
666,
523,
20966,
25592,
90515,
310,
330,
7628,
13068,
756,
310,
330,
43165,
18935,
756,
310,
330,
2468,
12646,
73,
756,
310,
330,
7628,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_disable_reporting_and_drain_packets() {
// Interface that responds to reads with Report packets until reporting is disabled and an
// FakeZedmonInterface.
struct StillReportingInterface {
inner: fake_device::FakeZedmonInterface,
reporting_... | rust_cleaned_test_functions.jsonl/90579 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33842,
52376,
8378,
26680,
466,
63569,
368,
341,
286,
442,
20019,
429,
30580,
311,
15804,
448,
8259,
27035,
3080,
12827,
374,
8386,
323,
458,
8945,
286,
442,
36965,
57,
291,
1645,
5051,
624,
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_ttl_iterator() {
let dir = tempfile::TempDir::new().unwrap();
let engine = TestEngineBuilder::new()
.path(dir.path())
.ttl(true)
.build()
.unwrap();
let kvdb = engine.get_rocksdb();
let key1 = b"key1";
let m... | rust_cleaned_test_functions.jsonl/15118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1614
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87157,
13491,
368,
341,
286,
1077,
5419,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
741,
310,
659,
2343,
14161,
3875,
2398,
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_insert() {
let base_rope: Rope = vec![0, 1, 2, 3].into();
let mut delta_builder = DeltaBuilder::new(base_rope.len());
delta_builder.replace(1..1, Into::<Rope>::into(vec![5]).into_node());
let insertion = delta_builder.build();
let inversion = Action {
... | rust_cleaned_test_functions.jsonl/10022 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
368,
341,
286,
1077,
2331,
26608,
375,
25,
97896,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
936,
18122,
543,
286,
1077,
5206,
9477,
28532,
284,
24957,
3297,
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_sum_matrix() {
assert_eq!(A + B + C, [A, B, C].iter().sum());
assert_eq!(A + B + C, [A, B, C].iter().cloned().sum());
} | rust_cleaned_test_functions.jsonl/105428 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
10193,
368,
341,
286,
2060,
10714,
10297,
32,
488,
425,
488,
356,
11,
508,
32,
11,
425,
11,
356,
936,
2015,
1005,
1242,
1423,
286,
2060,
10714,
10297,
32,
488,
425,
488,
356,
11,
508,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_semantic_highlighting_information_serialization() {
test_serialization(
&SemanticHighlightingInformation {
line: 10,
tokens: Some(vec![
SemanticHighlightingToken {
character: 0x00000001,
... | rust_cleaned_test_functions.jsonl/73613 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 584
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30442,
8159,
74546,
287,
35212,
25602,
2022,
368,
341,
286,
1273,
25602,
2022,
1006,
310,
609,
97931,
29830,
287,
14873,
341,
394,
1555,
25,
220,
16,
15,
345,
394,
11211,
25,
4329,
25592,
90515,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_device_band_info() {
assert_eq!(
fidl_common::Band::WlanBand5Ghz,
get_device_band_info(&fake_device_info_ht(fidl_mlme::ChanWidthSet::TwentyForty), 36)
.unwrap()
.band_id
);
} | rust_cleaned_test_functions.jsonl/17786 | {
"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,
9204,
45344,
3109,
368,
341,
286,
2060,
10714,
33673,
310,
32104,
75,
21107,
486,
33744,
486,
54,
10715,
33744,
20,
38,
37259,
345,
310,
633,
9204,
45344,
3109,
2099,
30570,
9204,
3109,
4908... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_run() {
let (nodes, commit_rxs) = run_nodes(4, 16_300);
let timer = Timer::default();
let duration = Duration::from_secs(60);
for rx in commit_rxs {
let rx = timer.timeout(rx.map_err(drop), duration);
rx.wait().unwrap();
}
for handle in nodes {
... | rust_cleaned_test_functions.jsonl/113558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
14007,
368,
341,
262,
1077,
320,
20008,
11,
5266,
1710,
18561,
8,
284,
1598,
14896,
7,
19,
11,
220,
16,
21,
62,
18,
15,
15,
626,
262,
1077,
9021,
284,
17759,
486,
2258,
543,
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... | 3 |
#[test]
fn test_aead_nonce_sizes() {
let nonce_len = aead::NONCE_LEN;
let nonce = vec![0u8; nonce_len * 2];
assert!(aead::Nonce::try_assume_unique_for_key(&nonce[..nonce_len]).is_ok());
assert!(aead::Nonce::try_assume_unique_for_key(&nonce[..(nonce_len - 1)]).is_err());
assert!(aead::Nonce:... | rust_cleaned_test_functions.jsonl/26766 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 371
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
3149,
48508,
32159,
368,
341,
262,
1077,
39676,
6043,
284,
264,
3149,
486,
29563,
2104,
15536,
280,
262,
1077,
39676,
284,
7486,
20703,
15,
84,
23,
26,
39676,
6043,
353,
220,
17,
4821,
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_skiplist_get() {
let mut list = SkipList::new();
list.insert(7, 7);
list.insert(4, 4);
list.insert(1, 1);
list.insert(2, 2);
list.insert(3, 3);
list.insert(5, 5);
list.insert(8, 8);
list.insert(6, 6);
let maybe_1 = l... | rust_cleaned_test_functions.jsonl/65969 | {
"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,
643,
6642,
39934,
3062,
368,
341,
286,
1077,
5206,
1140,
284,
25784,
852,
486,
931,
543,
286,
1140,
7030,
7,
22,
11,
220,
22,
317,
286,
1140,
7030,
7,
19,
11,
220,
19,
317,
286,
1140,
7030,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_established_sliding_window_recv() {
let mut s = socket_established();
// Update our scaling parameters for a TCP with a scaled buffer.
assert_eq!(s.rx_buffer.len(), 0);
s.rx_buffer = SocketBuffer::new(vec![0; 262143]);
s.assembler = Assembler::new(s.rx_buf... | rust_cleaned_test_functions.jsonl/91837 | {
"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,
18583,
5102,
291,
11886,
6577,
12571,
36118,
368,
341,
286,
1077,
5206,
274,
284,
7575,
18583,
5102,
291,
543,
286,
442,
5549,
1039,
26943,
5029,
369,
264,
26656,
448,
264,
30690,
4147,
624,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_function_literal_one_param() {
let (parameters, _) = match statement_expression("fn(x) { return 1; }") {
Expression::FunctionLiteral {
parameters, body, ..
} => (parameters, body),
_ => panic!("not a function literal"),
};
... | rust_cleaned_test_functions.jsonl/64085 | {
"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,
9174,
34100,
11667,
4090,
368,
341,
286,
1077,
320,
13786,
11,
27439,
284,
2432,
5114,
28068,
445,
8822,
2075,
8,
314,
470,
220,
16,
26,
335,
899,
341,
310,
16378,
486,
5152,
17350,
341,
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... | 2 |
#[test]
fn test_default_features() {
let p = project()
.file(
"Cargo.toml",
r#"
[project]
name = "foo"
version = "0.0.1"
authors = []
[features]
default = ["a"]
a = []
[[test]]
... | rust_cleaned_test_functions.jsonl/73885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 738
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
14965,
368,
341,
262,
1077,
281,
284,
2390,
741,
286,
659,
1192,
1006,
310,
330,
98228,
73494,
75,
756,
310,
435,
2,
698,
310,
508,
4987,
921,
310,
829,
284,
330,
7975,
698,
310,
2319,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parses_mutiple_imports() {
parses_to! {
parser: AwsGoEventsParser,
input: "import (\n\"foo\"\n \"bar\"\n)",
rule: Rule::import_multiple,
tokens: [
import_multiple(0, 23, [
impo... | rust_cleaned_test_functions.jsonl/8187 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 424
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77113,
288,
29523,
3778,
18434,
82,
368,
341,
310,
70835,
2346,
0,
341,
394,
6729,
25,
40083,
10850,
7900,
6570,
345,
394,
1946,
25,
330,
474,
19788,
77,
2105,
7975,
22245,
77,
7245,
2257,
22245... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_backward() {
let mut masm = MacroAssembler::new();
let lbl = masm.create_label();
masm.bind_label(lbl);
masm.emit_label(lbl);
assert_eq!(vec![0xfc, 0xff, 0xff, 0xff], masm.data());
} | rust_cleaned_test_functions.jsonl/17048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70477,
368,
341,
286,
1077,
5206,
9243,
76,
284,
53317,
77858,
486,
931,
543,
286,
1077,
16421,
284,
9243,
76,
2520,
6106,
543,
286,
9243,
76,
6090,
6106,
70491,
317,
286,
9243,
76,
16812,
6106,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_snail_addition() {
let lhs = parse_line("[[[[4,3],4],4],[7,[[8,4],9]]]");
let rhs = parse_line("[1,1]");
assert_eq!("[[[[0,7],4],[[7,8],[6,0]]],[8,1]]", format!("{:?}", add(lhs, rhs).borrow()));
} | rust_cleaned_test_functions.jsonl/51419 | {
"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,
28022,
604,
2891,
680,
368,
341,
286,
1077,
22505,
284,
4715,
6528,
10937,
15505,
58,
19,
11,
18,
1125,
19,
1125,
19,
14955,
22,
11,
15505,
23,
11,
19,
1125,
24,
5053,
37389,
286,
1077,
12916,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_raw_view_from_shape_ptr_deny_neg_strides() {
let data = [0, 1, 2, 3, 4, 5];
let _view = unsafe {
RawArrayView::from_shape_ptr((2, 3).strides((-3isize as usize, 1)), data.as_ptr())
};
} | rust_cleaned_test_functions.jsonl/92630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
7122,
5673,
13597,
4348,
814,
32395,
28209,
2895,
3341,
368,
341,
262,
1077,
821,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
716,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_half_connect() {
let mut data: &[u8] = &[
0b00010000, 39, 0x00, 0x04, 'M' as u8, 'Q' as u8, 'T' as u8, 'T' as u8, 0x04,
0b11001110,
0x00,
0x0a, // 10 sec
];
asse... | rust_cleaned_test_functions.jsonl/77896 | {
"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,
40626,
15720,
368,
341,
262,
1077,
5206,
821,
25,
44590,
84,
23,
60,
284,
609,
9640,
286,
220,
15,
65,
15,
15,
15,
16,
15,
15,
15,
15,
11,
220,
18,
24,
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_diameter_of_binary_tree() {
assert_eq!(Solution::diameter_of_binary_tree(tree!(1, 2, 3, 4, 5)), 3);
assert_eq!(Solution::diameter_of_binary_tree(tree!(1, 2)), 1);
} | rust_cleaned_test_functions.jsonl/69694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
36044,
3575,
31761,
11663,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
67,
36044,
3575,
31761,
11663,
21298,
10297,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
5731,
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_broadcast_ack_single_account_single_peer() {
let batch_size = 3;
let (mut smp, validator, full_node) = SharedMempoolNetwork::bootstrap_vfn_network(3);
// add txns to FN
// txns from single account
let mut all_txns = vec![];
for i in 0..10 {
all_txns.push(TestTran... | rust_cleaned_test_functions.jsonl/31477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 678
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74923,
48447,
19487,
13500,
19487,
45159,
368,
341,
262,
1077,
7162,
2368,
284,
220,
18,
280,
262,
1077,
320,
6984,
274,
1307,
11,
22935,
11,
2480,
5084,
8,
284,
16990,
44,
3262,
1749,
12320,
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... | 5 |
#[test]
fn test_to_year() {
let a: PrimitiveArray<Date16Type> = vec![Some(1), None, Some(366)].into();
let b = date16_to_year(&a).unwrap();
assert_eq!(1970, b.value(0));
assert_eq!(false, b.is_valid(1));
assert_eq!(1971, b.value(2));
} | rust_cleaned_test_functions.jsonl/109393 | {
"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,
2346,
14645,
368,
341,
286,
1077,
264,
25,
51460,
1857,
98879,
16,
21,
929,
29,
284,
7486,
20703,
8373,
7,
16,
701,
2240,
11,
4329,
7,
18,
21,
21,
26169,
18122,
1428,
286,
1077,
293,
284,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_char_event_lowercase() {
assert_eq!(
parse_event(b"c", false).unwrap(),
Some(InternalEvent::Event(Event::Key(KeyEvent::new(
KeyCode::Char('c'),
KeyModifiers::empty()
)))),
);
} | rust_cleaned_test_functions.jsonl/21334 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9232,
6748,
93129,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
6748,
1883,
96946,
497,
895,
568,
15454,
3148,
310,
4329,
7,
11569,
1556,
486,
1556,
30469,
486,
1592,
67108,
486,
931,
1006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_alu_binary() {
disasm!(
"entrypoint:
add64 r1, r2
sub64 r1, r2
mul64 r1, r2
div64 r1, r2
or64 r1, r2
and64 r1, r2
lsh64 r1, r2
rsh64 r1, r2
mod64 r1, r2
xor64 r1, r2
mov64 r1, r2
arsh64 r1, r2
"
);
disasm!(
"entrypoint:... | rust_cleaned_test_functions.jsonl/68762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 650
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8418,
84,
31761,
368,
341,
262,
827,
10530,
33673,
286,
330,
4085,
2768,
510,
262,
912,
21,
19,
435,
16,
11,
435,
17,
198,
262,
1186,
21,
19,
435,
16,
11,
435,
17,
198,
262,
15602,
21,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_supplies_buy_ammo_success() {
let mut supplies = Supplies::new();
supplies.buy_ammo(200).unwrap();
assert_eq!(500, supplies.money);
assert_eq!(200, supplies.ammo);
} | rust_cleaned_test_functions.jsonl/28662 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23723,
7202,
46348,
22880,
6355,
18632,
368,
341,
286,
1077,
5206,
16720,
284,
50252,
486,
931,
543,
286,
16720,
63871,
22880,
6355,
7,
17,
15,
15,
568,
15454,
543,
1066,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_addr() {
assert!(parse_addr("2000").is_ok());
assert!(parse_addr("127.0.0.5:2000").is_ok());
assert!(parse_addr("[::1]:2000").is_ok());
assert_eq!(Err("Invalid port number".to_owned()), parse_addr("127.0.0.1"));
assert_eq!(Err("Invalid address".to_ow... | rust_cleaned_test_functions.jsonl/132865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 204
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
7387,
368,
341,
286,
2060,
10297,
6400,
7387,
445,
17,
15,
15,
15,
1827,
285,
19817,
1423,
286,
2060,
10297,
6400,
7387,
445,
16,
17,
22,
13,
15,
13,
15,
13,
20,
25,
17,
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_atomicrmw() {
let context = Context::create();
let module = context.create_module("rmw");
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let fn_value = module.add_function("", fn_type, None);
let entry = context.append_basic_block(fn_va... | rust_cleaned_test_functions.jsonl/125178 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 773
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51367,
8719,
86,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
8719,
86,
3071,
262,
1077,
737,
1819,
284,
2266,
13,
1004,
1819,
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_to_simple_string() {
let yyid = Yyid::new();
let ystr = yyid.to_simple_ref().to_string();
assert!(ystr.len() == 32);
assert!(ystr.chars().all(|c| c.is_digit(16)));
} | rust_cleaned_test_functions.jsonl/134733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
30015,
3904,
368,
341,
286,
1077,
13197,
307,
284,
809,
88,
307,
486,
931,
543,
286,
1077,
379,
495,
284,
13197,
307,
2389,
30015,
7793,
1005,
983,
3904,
1428,
286,
2060,
10297,
88,
495,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bsonc_as_json() {
let document = doc! { "key" : "value" };
let bsonc = super::Bsonc::from_document(&document).unwrap();
assert_eq!("{ \"key\" : \"value\" }".to_owned(), bsonc.as_json());
} | rust_cleaned_test_functions.jsonl/30633 | {
"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,
880,
930,
66,
11898,
9455,
368,
341,
286,
1077,
2197,
284,
4629,
0,
314,
330,
792,
1,
549,
330,
957,
1,
2605,
286,
1077,
50980,
66,
284,
2256,
486,
33,
930,
66,
486,
1499,
26231,
2099,
6062,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_uvarint() {
use super::ReadEx;
use std::io::Cursor;
let bytes = [194_u8, 10];
let mut cursor = Cursor::new(bytes);
let actual = cursor.read_uvarint().unwrap();
assert_eq!(actual, 1346)
} | rust_cleaned_test_functions.jsonl/39153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
7300,
947,
396,
368,
341,
262,
990,
2256,
486,
4418,
840,
280,
262,
990,
1460,
486,
815,
486,
14543,
401,
262,
1077,
5820,
284,
508,
16,
24,
19,
7300,
23,
11,
220,
16,
15,
935,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_checkout_add_tree_with_locally_deleted_blob() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
rm!(repo: "foo");
let target = commit! {
foo {
bar < "bar contents"
}
};
bit_checkout!(repo: &rev!(target))?;
a... | rust_cleaned_test_functions.jsonl/62970 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68186,
2891,
11663,
6615,
13400,
745,
39418,
45908,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
18998,
10297,
23476,
25,
330,
7975,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_method_this_binding_2() {
check_output_default(
"class Thing {\
getCallback() {\
fun localFunction() {\
print this;\
}\
\
return localFunction;\
}\
... | rust_cleaned_test_functions.jsonl/111853 | {
"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,
9032,
24868,
60815,
62,
17,
368,
341,
286,
1779,
7645,
9993,
1006,
310,
330,
1040,
37200,
95519,
2290,
633,
7494,
368,
95519,
338,
2464,
2205,
5152,
368,
95519,
4293,
1173,
419,
55783,
338,
335,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_variables_mutated_in_block() {
let block = {
let mut block = Block::new(0);
block.assign(variable("x"), expr_const(1)).unwrap();
block.load(variable("y"), variable("z").into()).unwrap();
block.assign(variable("x"), variable("y").into()).unw... | rust_cleaned_test_functions.jsonl/13490 | {
"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,
28182,
29523,
657,
1243,
7113,
368,
341,
286,
1077,
2504,
284,
341,
310,
1077,
5206,
2504,
284,
8362,
486,
931,
7,
15,
317,
310,
2504,
17870,
45029,
445,
87,
3975,
15169,
13610,
7,
16,
4579,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extend_truncate() {
let a = vec3a(1.0, 2.0, 3.0);
let b = a.extend(4.0);
assert_eq!((1.0, 2.0, 3.0, 4.0), b.into());
let c = Vec3A::from(b);
assert_eq!(a, c);
} | rust_cleaned_test_functions.jsonl/23490 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
3547,
26900,
368,
341,
262,
1077,
264,
284,
7486,
18,
64,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
262,
1077,
293,
284,
264,
15831,
7,
19,
13,
15,
317,
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_primitive_array_from_vec() {
let buf = Buffer::from_slice_ref(&[0, 1, 2, 3, 4]);
let arr = Int32Array::from(vec![0, 1, 2, 3, 4]);
assert_eq!(buf, arr.data.buffers()[0]);
assert_eq!(5, arr.len());
assert_eq!(0, arr.offset());
assert_eq!(0, arr.null_... | rust_cleaned_test_functions.jsonl/27274 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
3858,
5673,
13251,
368,
341,
286,
1077,
6607,
284,
10312,
486,
1499,
26488,
7793,
2099,
58,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
2558,
286,
1077,
2890,
284,
1333,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_multi_selector_match() {
let doc_text = br#"
<html>
<b>cool</b><a>rad</a>
</html>
"#;
let css_text = br#"
* {
color: black;
}
a,b {
color:red;
}
"#;
let (doc, stylesheet,stree,lbox, rbox) = standard_test_... | rust_cleaned_test_functions.jsonl/101341 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25133,
28890,
10708,
368,
341,
262,
1077,
4629,
4326,
284,
1411,
2,
698,
262,
366,
1551,
397,
286,
366,
65,
29,
42196,
522,
65,
1784,
64,
29,
13281,
522,
64,
397,
262,
690,
1551,
397,
262,
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_block_loot() {
for version_folder in std::fs::read_dir(MC_DATA_DIR).unwrap() {
let dir = version_folder.unwrap();
let mut path = dir.path();
path.push("blockLoot.json");
if path.exists() {
println!("{}", path.display());
... | rust_cleaned_test_functions.jsonl/21704 | {
"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,
7113,
5560,
354,
368,
341,
286,
369,
2319,
15268,
304,
1460,
486,
3848,
486,
878,
4334,
3189,
34,
7896,
8291,
568,
15454,
368,
341,
310,
1077,
5419,
284,
2319,
15268,
55395,
543,
310,
1077,
5206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_converter_arrow_source_target_different() {
let raw_data = vec![Some(1i16), None, Some(2i16), Some(3i16)];
// Construct record reader
let mut record_reader = {
// Construct column schema
let message_type = "
message test_schema {
... | rust_cleaned_test_functions.jsonl/34256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74073,
46566,
10347,
11123,
82741,
368,
341,
286,
1077,
7112,
1769,
284,
7486,
20703,
8373,
7,
16,
72,
16,
21,
701,
2240,
11,
4329,
7,
17,
72,
16,
21,
701,
4329,
7,
18,
72,
16,
21,
73663,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_filter_manager_or() {
let id_id = 1;
let age_id = 2;
let mut or_compare = message::LogicalCompare::new();
or_compare.set_compare(message::CompareType::OR_RELATION);
let mut age_compare = message::LogicalCompare::new();
age_compare.set_prop_id(age... | rust_cleaned_test_functions.jsonl/43853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 611
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
12144,
8734,
368,
341,
286,
1077,
877,
842,
284,
220,
16,
280,
286,
1077,
4231,
842,
284,
220,
17,
401,
286,
1077,
5206,
476,
32235,
284,
1943,
486,
64312,
27374,
486,
931,
543,
286,
476... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_charset_id_for_glyph_format1() {
let ranges = ReadArrayCow::Owned(vec![Range {
first: 34,
n_left: 5,
}]);
let charset = CustomCharset::Format1 { ranges };
// glpyh id 0 is .notdef and is implicitly encoded
assert_eq!(charset... | rust_cleaned_test_functions.jsonl/85347 | {
"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,
15875,
65883,
842,
5478,
88703,
8955,
16,
368,
341,
286,
1077,
21283,
284,
4457,
1857,
89915,
486,
57641,
25592,
20703,
6046,
341,
310,
1156,
25,
220,
18,
19,
345,
310,
308,
9579,
25,
220,
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... | 1 |
#[test]
fn test_remove() {
let mut m: TMap = Map::new();
let add_ctx = m.len().derive_add_ctx(1);
let mut inner_map: Map<TKey, TVal, TActor> = Map::new();
inner_map.apply(inner_map.update(110, add_ctx, |r, ctx| r.write(0, ctx)));
let add_ctx = m.len().derive_add_ctx(1);
m.apply(m.updat... | rust_cleaned_test_functions.jsonl/61623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
368,
341,
262,
1077,
5206,
296,
25,
350,
2227,
284,
5027,
486,
931,
1428,
262,
1077,
912,
15147,
284,
296,
19406,
1005,
27098,
2891,
15147,
7,
16,
317,
262,
1077,
5206,
9179,
5376,
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_from_box_slice() {
let s = vec![1, 2, 3].into_boxed_slice();
let r: Rc<[u32]> = Rc::from(s);
assert_eq!(&r[..], [1, 2, 3]);
} | rust_cleaned_test_functions.jsonl/4676 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
10194,
26488,
368,
341,
286,
1077,
274,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
936,
18122,
10194,
291,
26488,
543,
286,
1077,
435,
25,
81463,
66746,
84,
18,
17,
25669,
284,
8146... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_interval() {
let mut poller = Poller::new().unwrap();
let registrar = poller.get_registrar();
let timer_id = registrar.set_interval(TIMEOUT).unwrap();
let now = Instant::now();
for i in 1..5 {
let notifications = poller.wait(POLL_TIMEOUT).unwrap();
let ela... | rust_cleaned_test_functions.jsonl/13101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 354
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
20541,
368,
341,
262,
1077,
5206,
7085,
261,
284,
24385,
261,
486,
931,
1005,
15454,
543,
262,
1077,
61467,
284,
7085,
261,
670,
4920,
34765,
543,
262,
1077,
9021,
842,
284,
61467,
980,
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_sign_verify() {
for ciphersuite in Config::supported_ciphersuites() {
let keypair = ciphersuite.new_signature_keypair().unwrap();
let payload = &[1, 2, 3];
let signature = keypair.sign(payload).unwrap();
assert!(keypair.verify(&signature, payload));
}
} | rust_cleaned_test_functions.jsonl/34690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
35638,
368,
341,
262,
369,
272,
82077,
9302,
304,
5532,
486,
18216,
666,
82077,
3083,
288,
368,
341,
286,
1077,
1376,
12670,
284,
272,
82077,
9302,
4618,
39859,
3097,
12670,
1005,
15454,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_try_from_patch_netif() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
let body = "{ \
\"iface_id\": \"string\" \
}";
sender
.write_all(http_request("PATCH", "/network-... | rust_cleaned_test_functions.jsonl/106594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
39643,
19722,
333,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
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_summary_ranges() {
let mut sr = SummaryRanges::new();
sr.add_num(1);
assert_eq!(sr.get_intervals(), vec![vec![1, 1]]);
sr.add_num(3);
assert_eq!(sr.get_intervals(), vec![vec![1, 1], vec![3, 3]]);
sr.add_num(7);
assert_eq!(sr.get_intervals()... | rust_cleaned_test_functions.jsonl/57493 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27251,
58748,
368,
341,
286,
1077,
5206,
18962,
284,
21517,
74902,
486,
931,
543,
286,
18962,
1364,
4273,
7,
16,
317,
286,
2060,
10714,
10297,
15094,
670,
90807,
1507,
7486,
20703,
4083,
20703,
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_real_as_unsigned_real() {
let cs = vec![
// not in union
// TODO: add test case of negative real to unsigned real
(u64::MIN as f64, u64::MIN as f64, false),
(1.0, 1.0, false),
... | rust_cleaned_test_functions.jsonl/1961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 758
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
11898,
67830,
15266,
368,
341,
286,
1077,
10532,
284,
7486,
90515,
3374,
310,
442,
537,
304,
11300,
198,
310,
442,
5343,
25,
912,
1273,
1142,
315,
8225,
1931,
311,
3774,
1931,
18574,
34642,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_at_in_mem_empty() {
let key1 = HashValue::from_slice(&[0; 32]).unwrap();
let value1_hash = b"hello".test_only_hash();
let key2 = update_byte(&key1, 0, 0b01000000);
let value2_hash = b"world".test_only_hash();
let key3 = update_byte(&key1, 0, 0b10000000);
let value... | rust_cleaned_test_functions.jsonl/63253 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
3752,
1243,
12976,
15124,
368,
341,
262,
1077,
1376,
16,
284,
6531,
1130,
486,
1499,
26488,
2099,
58,
15,
26,
220,
18,
17,
10697,
15454,
543,
262,
1077,
897,
16,
8950,
284,
293,
1,
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_lookup1_values() {
assert_eq!(lookup1_values(1025, 10), 2);
assert_eq!(lookup1_values(1024, 10), 2);
assert_eq!(lookup1_values(1023, 10), 1);
assert_eq!(lookup1_values(3126, 5), 5);
assert_eq!(lookup1_values(3125, 5), 5);
assert_eq!(lookup1_values(3124, 5), 4);
assert_eq!(look... | rust_cleaned_test_functions.jsonl/8407 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
16,
9146,
368,
341,
11120,
6948,
10714,
10297,
21020,
16,
9146,
7,
16,
15,
17,
20,
11,
220,
16,
15,
701,
220,
17,
317,
6948,
10714,
10297,
21020,
16,
9146,
7,
16,
15,
17,
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... | 1 |
#[test]
fn test_create() {
let req = LeaseProtocolRequest::create(1000, "789", "bucket");
let json = serde_json::to_string(&req).unwrap();
let after: LeaseProtocolRequest = serde_json::from_str(json.as_str()).unwrap();
assert_eq!(after, req)
} | rust_cleaned_test_functions.jsonl/21173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
368,
341,
286,
1077,
4232,
284,
80651,
20689,
1900,
486,
3182,
7,
16,
15,
15,
15,
11,
330,
22,
23,
24,
497,
330,
30410,
797,
286,
1077,
2951,
284,
61570,
9455,
486,
983,
3904,
2099,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_has_no_sigs() {
let sig = Signature::default();
let blockhash = hash(Hash::default().as_ref());
let status_cache = BankStatusCache::default();
assert_eq!(
status_cache.get_signature_status(&sig, &blockhash, &HashMap::new()),
None
... | rust_cleaned_test_functions.jsonl/23938 | {
"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,
15124,
21778,
6536,
643,
14462,
368,
341,
286,
1077,
8366,
284,
32232,
486,
2258,
543,
286,
1077,
2504,
8296,
284,
5175,
7,
6370,
486,
2258,
1005,
300,
7793,
1423,
286,
1077,
2639,
11529,
284,
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_grades_when_several_students_have_the_same_grade() {
let mut s = school::School::new();
s.add(2, "Aimee");
s.add(2, "Logan");
s.add(2, "Blair");
assert_eq!(s.grades(), vec!(2));
} | rust_cleaned_test_functions.jsonl/127489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15682,
3452,
47636,
3453,
17539,
71644,
67301,
16068,
33574,
50515,
368,
341,
262,
1077,
5206,
274,
284,
2906,
486,
32749,
486,
931,
543,
262,
274,
1364,
7,
17,
11,
330,
32,
545,
68,
797,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_resource_block_with_undeclared_local_shorthand_rule_head() {
let p = Polar::new();
p.register_constant(sym!("Org"), term!("unimportant"))
.unwrap();
expect_error(
&p,
r#"resource Org{"member" if "owner";}"#,
r#"Undeclared te... | rust_cleaned_test_functions.jsonl/31741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17962,
7113,
6615,
62,
28865,
86251,
13564,
3712,
61679,
21124,
13138,
368,
341,
286,
1077,
281,
284,
55896,
486,
931,
543,
286,
281,
9929,
34967,
62512,
17223,
42437,
3975,
4647,
17223,
359,
15333,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rchunks_nth() {
let v: &[i32] = &[0, 1, 2, 3, 4, 5];
let mut c = v.rchunks(2);
assert_eq!(c.nth(1).unwrap(), &[2, 3]);
assert_eq!(c.next().unwrap(), &[0, 1]);
let v2: &[i32] = &[0, 1, 2, 3, 4];
let mut c2 = v2.rchunks(3);
assert_eq!(c2.nth(1).unwrap(), &[0, 1]);
... | rust_cleaned_test_functions.jsonl/9661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
84263,
78342,
368,
341,
262,
1077,
348,
25,
44590,
72,
18,
17,
60,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
5206,
272,
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_rect_size_truncation() {
for width in 256u16..300u16 {
for height in 256u16..300u16 {
let rect = Rect::new(0, 0, width, height);
rect.area(); // Should not panic.
assert!(rect.width < width || rect.height < height);
... | rust_cleaned_test_functions.jsonl/22806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 527
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16979,
2368,
3547,
1347,
367,
368,
341,
286,
369,
2374,
304,
220,
17,
20,
21,
84,
16,
21,
496,
18,
15,
15,
84,
16,
21,
341,
310,
369,
2608,
304,
220,
17,
20,
21,
84,
16,
21,
496,
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... | 5 |
#[test]
fn test_assign() {
let mut input = parse::parse_lua_source(
b"a = 4
b = {}
b.a = 4",
)
.unwrap();
let mut interpreter = Interpreter::new();
interpreter.visit_chunk(&mut input);
assert_eq!(interpreter.get_variable("a"... | rust_cleaned_test_functions.jsonl/118770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20688,
368,
341,
286,
1077,
5206,
1946,
284,
4715,
486,
6400,
76013,
10347,
1006,
310,
293,
56693,
284,
220,
19,
198,
1060,
293,
284,
5613,
1060,
293,
5849,
284,
220,
19,
756,
286,
1727,
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_cleanup_last() {
let mut index = AccountsIndex::<bool>::default();
index.add_root(0);
index.add_root(1);
index.cleanup_dead_slot(1);
assert!(!index.is_root(1));
assert!(index.is_root(0));
} | rust_cleaned_test_functions.jsonl/20402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42444,
12195,
368,
341,
1789,
286,
1077,
5206,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
543,
286,
1922,
1364,
12993,
7,
15,
317,
286,
1922,
1364,
12993,
7,
16,
317,
286,
1922,
87689,
534... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_xchacha20_basic() {
let key = [
0x1b, 0x27, 0x55, 0x64, 0x73, 0xe9, 0x85, 0xd4, 0x62, 0xcd, 0x51, 0x19, 0x7a, 0x9a,
0x46, 0xc7, 0x60, 0x09, 0x54, 0x9e, 0xac, 0x64, 0x74, 0xf2, 0x06, 0xc4, 0xee, 0x08,
0x44, 0xf6, 0x83, 0x89,
... | rust_cleaned_test_functions.jsonl/25216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3212,
331,
51576,
17,
15,
34729,
368,
341,
73363,
286,
1077,
1376,
284,
2278,
310,
220,
15,
87,
16,
65,
11,
220,
15,
87,
17,
22,
11,
220,
15,
87,
20,
20,
11,
220,
15,
87,
21,
19,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_plaintext_incorrect_file() {
let file = "!Name: My name\n.O\n..Owrong characters\nOOO";
assert!(parse_plaintext_file(&file).is_err())
} | rust_cleaned_test_functions.jsonl/43501 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 73
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6317,
1641,
427,
1243,
19928,
2458,
368,
341,
262,
1077,
1034,
284,
53074,
675,
25,
3017,
829,
1699,
8382,
1699,
496,
46,
34870,
5766,
1699,
19499,
46,
876,
262,
2060,
10297,
6400,
6317,
1641,
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 |
#[test]
fn test_create_zero_lamport_without_clean() {
with_create_zero_lamport(|_| {
// just do nothing; this should behave identically with test_create_zero_lamport_with_clean
});
} | rust_cleaned_test_functions.jsonl/73056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
19359,
907,
309,
403,
39904,
19573,
368,
341,
286,
448,
8657,
19359,
907,
309,
403,
22428,
35395,
341,
310,
442,
1101,
653,
4302,
26,
419,
1265,
35692,
3524,
2673,
448,
1273,
8657,
19359,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_tips() {
let client = TestClient::new();
let (abi, _tvc) = TestClient::package(EVENTS, Some(2));
let err = client.request::<_, DecodedMessageBody>(
"abi.decode_message",
ParamsOfDecodeMessage {
abi: abi.clone(),
message: "te6ccgEBAgEAlgAB4a3f2/... | rust_cleaned_test_functions.jsonl/4931 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 769
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
3077,
368,
341,
262,
1077,
2943,
284,
3393,
2959,
486,
931,
543,
262,
1077,
320,
25084,
11,
716,
83,
7362,
8,
284,
3393,
2959,
486,
1722,
72458,
50,
11,
4329,
7,
17,
1106,
262,
1077,
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 |
#[test]
fn test_parse_header_no_quality() {
let a: Accept = header::Header::parse_header([b"text/plain; charset=utf-8".to_vec()].as_slice()).unwrap();
let b = Accept(vec![
shared::QualityItem{item: mime::Mime(mime::TopLevel::Text, mime::SubLevel::Plain, vec![(mime::Attr::Charset, mime::Value::Ut... | rust_cleaned_test_functions.jsonl/51464 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8757,
6536,
55074,
368,
341,
262,
1077,
264,
25,
20829,
284,
4247,
486,
4047,
486,
6400,
8757,
2561,
65,
66251,
36971,
26,
11617,
22264,
12,
23,
3263,
983,
13251,
57590,
300,
26488,
6011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_non_terminate_early() {
test_interpreter_and_jit_asm!(
"
mov64 r6, 0x0
mov64 r1, 0x0
mov64 r2, 0x0
mov64 r3, 0x0
mov64 r4, 0x0
mov64 r5, r6
syscall Unresolved
add64 r6, 0x1
ja -0x8
exit",
[],
... | rust_cleaned_test_functions.jsonl/59063 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
62,
48061,
62,
22140,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
21,
19,
435,
21,
11,
220,
15,
87,
15,
198,
286,
1974,
21,
19,
435,
16,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_input_cursor() {
use super::super::Input;
let e: Event = Input::Cursor(false).into();
let x: Option<Event> = CursorEvent::from_cursor(true, &e);
let y: Option<Event> = x.clone()
.unwrap()
.cursor(|cursor| CursorEvent::from_cursor(cursor, x... | rust_cleaned_test_functions.jsonl/86814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
28601,
368,
341,
286,
990,
2256,
486,
9522,
486,
2505,
401,
286,
1077,
384,
25,
3665,
284,
5571,
486,
14543,
3576,
568,
18122,
543,
286,
1077,
856,
25,
6959,
51357,
29,
284,
28067,
1556,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_consumer_parse_header_error() {
let mut c = ParseHeaderErrorConsumer {};
let p = Parser::new(ZERO_BOUND_HEADER, &mut c);
let ret = p.parse();
assert_matches!(ret, Err(State::ConsumerError(_)));
if let Err(State::ConsumerError(err)) = ret {
asse... | rust_cleaned_test_functions.jsonl/85746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73969,
21039,
8757,
4096,
368,
341,
286,
1077,
5206,
272,
284,
14775,
4047,
1454,
29968,
9321,
286,
1077,
281,
284,
21102,
486,
931,
27855,
17297,
73644,
20330,
11,
609,
6984,
272,
317,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_incomplete_block_parsing() {
let magic = 0x0709110b;
let raw_blocks = hex_decode(fixture("incomplete_block.hex")).unwrap();
let blocks = parse_blocks(raw_blocks, magic).unwrap();
assert_eq!(blocks.len(), 2);
assert_eq!(
blocks[1].bitcoin_hash()... | rust_cleaned_test_functions.jsonl/89312 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
14737,
7113,
620,
28598,
368,
341,
286,
1077,
10963,
284,
220,
15,
87,
15,
22,
15,
24,
16,
16,
15,
65,
280,
286,
1077,
7112,
25201,
284,
12371,
15227,
94886,
445,
258,
14737,
7113,
45639... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_addv() {
let a = [1.2, 1.3, 1.4];
let b = [1.3, 1.5, 2.4];
let c = a.addv(&b);
let c_expected: [f64; 3] = [2.5, 2.8, 3.8];
for i in 0..c.len() {
assert_approx_eq!(c[i], c_expected[i]);
}
} | rust_cleaned_test_functions.jsonl/66744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
85,
368,
341,
286,
1077,
264,
284,
508,
16,
13,
17,
11,
220,
16,
13,
18,
11,
220,
16,
13,
19,
935,
286,
1077,
293,
284,
508,
16,
13,
18,
11,
220,
16,
13,
20,
11,
220,
17,
13,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_unrecognized_option() {
let long_args = vec!("--untest".to_string());
let opts = vec!(optmulti("t", "test", "testing", "TEST"));
let rs = getopts(&long_args, &opts);
match rs {
Err(UnrecognizedOption(_)) => {},
_ => panic!()
}
l... | rust_cleaned_test_functions.jsonl/64005 | {
"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,
4907,
46067,
9672,
368,
341,
286,
1077,
1293,
8384,
284,
7486,
17223,
313,
359,
1944,
3263,
983,
3904,
1423,
286,
1077,
12185,
284,
7486,
10297,
2912,
26268,
445,
83,
497,
330,
1944,
497,
330,
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... | 3 |
#[test]
fn test_vectors_hkdf() {
let tests = [
TestVector::new("0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b",
"000102030405060708090a0b0c",
"f0f1f2f3f4f5f6f7f8f9",
"077709362c2e32df0ddc3f0dc47bba6390b6c73bb5... | rust_cleaned_test_functions.jsonl/77546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1486
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49158,
1523,
74,
2940,
368,
341,
286,
1077,
7032,
284,
2278,
310,
3393,
3781,
486,
931,
445,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
15,
65,
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_zinc_parse_str_bad() {
let mut input = Cursor::new(r#"""#.as_bytes());
let mut scanner = super::Scanner::make(&mut input).expect("Scanner");
assert!(parse_str(&mut scanner).is_err());
let mut input = Cursor::new(r#""ala bala"#.as_bytes());
let mut scanne... | rust_cleaned_test_functions.jsonl/80278 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6415,
2840,
21039,
2895,
34199,
368,
341,
286,
1077,
5206,
1946,
284,
28067,
486,
931,
2601,
2,
12599,
87846,
300,
12524,
1423,
286,
1077,
5206,
20775,
284,
2256,
486,
31002,
486,
6927,
2099,
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_http_404_when_route_not_match() {
let rocket = rocket::ignite().mount("/", routes![get_index]);
let client = Client::new(rocket).unwrap();
let response = client.get("/abc").dispatch();
assert_eq!(response.status(), Status::NotFound);
} | rust_cleaned_test_functions.jsonl/110574 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25888,
62,
19,
15,
19,
47636,
28109,
7913,
10708,
368,
341,
286,
1077,
24306,
284,
24306,
486,
95408,
1005,
16557,
35460,
11291,
20703,
455,
3560,
10149,
286,
1077,
2943,
284,
8423,
486,
931,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scans_attribute_start() {
let mut scanner = Scanner::new(
"<?php
#[Sample([], [])]
function test() {}
",
);
scanner.scan().unwrap();
assert_eq!(
token_list!(scanner.tokens),
"<?php #[ Sample ( [... | rust_cleaned_test_functions.jsonl/52954 | {
"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,
13171,
596,
16791,
4906,
368,
341,
286,
1077,
5206,
20775,
284,
17170,
486,
931,
1006,
310,
40271,
1208,
198,
310,
11506,
17571,
40056,
42182,
921,
310,
729,
1273,
368,
5613,
286,
21796,
286,
3475... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_follower_append_entries() {
setup_for_test();
let mut tests = vec![
(
2,
2,
vec![empty_entry(3, 3)],
vec![empty_entry(1, 1), empty_entry(2, 2), empty_entry(3, 3)],
vec![empty_entry(3, 3)],
),
(
... | rust_cleaned_test_functions.jsonl/54479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
29034,
26041,
26092,
368,
341,
262,
6505,
5478,
4452,
543,
262,
1077,
5206,
7032,
284,
7486,
90515,
286,
2399,
310,
220,
17,
345,
310,
220,
17,
345,
310,
7486,
20703,
3194,
9078,
7,
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... | 5 |
#[test]
fn test_override_with_wrong_return_type() {
err(
"@open class A { @open fun f() {} }
class B extends A { @override fun f(): Int32 { return 1; } }",
pos(2, 44),
SemError::OverrideMismatch,
);
} | rust_cleaned_test_functions.jsonl/128699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48576,
6615,
75198,
12511,
1819,
368,
341,
286,
1848,
1006,
310,
8428,
2508,
536,
362,
314,
569,
2508,
2464,
282,
368,
4687,
456,
1797,
536,
425,
2239,
362,
314,
569,
9199,
2464,
282,
4555,
1333... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero() {
assert!(LogProb::zero().is_zero());
assert!(Prob::zero().is_zero());
assert!(PHREDProb::zero().is_zero());
} | rust_cleaned_test_functions.jsonl/128293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
368,
341,
286,
2060,
10297,
2201,
36980,
486,
14154,
1005,
285,
19359,
1423,
286,
2060,
10297,
36980,
486,
14154,
1005,
285,
19359,
1423,
286,
2060,
10297,
10842,
6504,
36980,
486,
14154,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_one_channel() {
let commands = super::channels_to_commands(&vec!["spot/trade:BTC-USDT".to_string()], true);
assert_eq!(1, commands.len());
assert_eq!(
r#"{"op":"subscribe","args":["spot/trade:BTC-USDT"]}"#,
commands[0]
);
} | rust_cleaned_test_functions.jsonl/9439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11667,
14571,
368,
341,
286,
1077,
11293,
284,
2256,
486,
32425,
2346,
44151,
2099,
4083,
0,
1183,
18648,
21485,
1021,
25,
59118,
32340,
10599,
3263,
983,
3904,
79558,
830,
317,
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_forwarding_entry_device() {
let ctx = FakeConversionContext::new();
let subnet_bytes = [192, 168, 0, 0];
let prefix = 24;
let (core, fidl) = create_forwarding_entry(
create_subnet(create_addr_v4(subnet_bytes), prefix),
create_local_dest_en... | rust_cleaned_test_functions.jsonl/42863 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32121,
287,
9078,
9204,
368,
341,
286,
1077,
5635,
284,
36965,
48237,
1972,
486,
931,
543,
286,
1077,
51457,
12524,
284,
508,
16,
24,
17,
11,
220,
16,
21,
23,
11,
220,
15,
11,
220,
15,
935,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_azure_time() {
let t = super::from_azure_time("Sun, 27 Sep 2009 17:26:40 GMT").unwrap();
assert_eq!(t.day(), 27);
assert_eq!(t.month(), 9);
assert_eq!(t.hour(), 17);
assert_eq!(t.second(), 40);
} | rust_cleaned_test_functions.jsonl/124954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 138
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
62,
39495,
3009,
368,
341,
286,
1077,
259,
284,
2256,
486,
1499,
62,
39495,
3009,
445,
30092,
11,
220,
17,
22,
17449,
220,
17,
15,
15,
24,
220,
16,
22,
25,
17,
21,
25,
19,
15,
24488,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_descending_into_non_descendable() {
let mut builder = ConfigurationBuilder::default();
builder.add(
InMemorySource::from_string_slice(TEST_JSON.trim()),
Json::default(),
);
let configuration = builder.build().unwrap().merge_owned().unwrap();
let result:... | rust_cleaned_test_functions.jsonl/20039 | {
"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,
5084,
10986,
2459,
45514,
21637,
10986,
408,
480,
368,
341,
262,
1077,
5206,
7363,
284,
12221,
3297,
486,
2258,
543,
262,
7363,
1364,
1006,
286,
758,
10642,
3608,
486,
1499,
3904,
26488,
50320,
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_branch_lowering() {
let name = ExternalName::testcase("test0");
let mut sig = Signature::new(CallConv::SystemV);
sig.params.push(AbiParam::new(I32));
sig.returns.push(AbiParam::new(I32));
let mut func = Function::with_name_signature(name, sig);
le... | rust_cleaned_test_functions.jsonl/119769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28031,
30425,
287,
368,
341,
286,
1077,
829,
284,
30936,
675,
486,
1944,
5638,
445,
1944,
15,
797,
286,
1077,
5206,
8366,
284,
32232,
486,
931,
55224,
34892,
486,
2320,
53,
317,
286,
8366,
9003,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_encryption() {
for _ in 0..10 {
let msg1 = Message::random().unwrap();
let sk1 = PrivateKey::new().unwrap();
let sk2 = PrivateKey::new().unwrap();
let pk2 = PublicKey::new(sk2);
let cyph = encrypt(msg1, pk2, sk1).unwrap();
let msg2 = decrypt(c... | rust_cleaned_test_functions.jsonl/42590 | {
"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,
13781,
15597,
368,
341,
262,
369,
716,
304,
220,
15,
496,
16,
15,
341,
286,
1077,
3750,
16,
284,
4856,
486,
11463,
1005,
15454,
543,
286,
1077,
1901,
16,
284,
9679,
1592,
486,
931,
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... | 2 |
#[test]
fn test_retain_setter_only_access() {
test_same(concat!(
"var a = {",
" set property(v) {}",
"};",
"a.property;",
));
} | rust_cleaned_test_functions.jsonl/494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21695,
466,
2602,
465,
18410,
12759,
368,
341,
262,
1273,
33574,
96360,
33673,
286,
330,
947,
264,
284,
314,
497,
715,
286,
330,
220,
738,
3343,
3747,
8,
4687,
756,
286,
330,
11061,
756,
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 |
#[test]
fn test_prod_float_negative() {
assert_eq!(
rune!(f32 => pub fn main() { [1.0, 0.5, 2.0, 0.0 - 3.0].iter().product() }),
-3.0
)
} | rust_cleaned_test_functions.jsonl/33617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 96
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34984,
17586,
53865,
368,
341,
262,
2060,
10714,
33673,
286,
63499,
10297,
69,
18,
17,
589,
6675,
5168,
1887,
368,
314,
508,
16,
13,
15,
11,
220,
15,
13,
20,
11,
220,
17,
13,
15,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_make_surface() {
let mut pixels: [u32; 4] = Default::default();
let mut canvas = Canvas::from_raster_direct_n32((2, 2), pixels.as_mut(), None).unwrap();
let ii = canvas.image_info();
let mut surface = canvas.new_surface(&ii, None).unwrap();
dbg!(&mut ... | rust_cleaned_test_functions.jsonl/125502 | {
"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,
28230,
31030,
368,
972,
286,
1077,
5206,
15751,
25,
508,
84,
18,
17,
26,
220,
19,
60,
284,
7899,
486,
2258,
1647,
286,
1077,
5206,
10041,
284,
25698,
486,
1499,
1710,
2300,
32871,
1089,
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_cmap_format_4() {
let font = parse(&FONT_DATA).unwrap();
let cmap = font.cmap.as_ref().unwrap();
assert!(cmap.get_encoding_record(cmap.get_num_tables()).is_none());
assert!(cmap.get_encoding(cmap.get_num_tables()).is_none());
assert_eq!(font.lookup_glyph_i... | rust_cleaned_test_functions.jsonl/32198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2186,
8955,
62,
19,
368,
341,
286,
1077,
3301,
284,
4715,
2099,
43382,
7896,
568,
15454,
543,
286,
1077,
40778,
284,
3301,
520,
2186,
5357,
7793,
1005,
15454,
543,
286,
2060,
10297,
66,
218... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_slot_to_key() {
assert_eq!(slot_to_key(0), "0000000000000000");
assert_eq!(slot_to_key(!0), "ffffffffffffffff");
} | rust_cleaned_test_functions.jsonl/28817 | {
"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,
27563,
2346,
3097,
368,
341,
286,
2060,
10714,
10297,
21537,
2346,
3097,
7,
15,
701,
330,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
797,
286,
2060,
10714,
10297,
2153... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_0169_example_1() {
let nums = vec![3, 2, 3];
let result = 3;
assert_eq!(Solution::majority_element(nums), result);
} | rust_cleaned_test_functions.jsonl/50319 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
16,
21,
24,
39304,
62,
16,
368,
341,
286,
1077,
10307,
284,
7486,
20703,
18,
11,
220,
17,
11,
220,
18,
935,
286,
1077,
1102,
284,
220,
18,
401,
286,
2060,
10714,
10297,
36842,
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_jsx() {
validate_src_jsx("<foo />").unwrap();
validate_src_jsx("<foo bar={1} />").unwrap();
validate_src_jsx("<foo bar='abc' />").unwrap();
validate_src_jsx("<foo><bar></bar></foo>").unwrap();
validate_src_jsx("<foo><bar>abc</bar></foo>").unwrap();
} | rust_cleaned_test_functions.jsonl/14176 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26250,
87,
368,
341,
262,
9593,
16274,
26250,
87,
9639,
7975,
6206,
1827,
15454,
543,
262,
9593,
16274,
26250,
87,
9639,
7975,
3619,
1165,
16,
92,
6206,
1827,
15454,
543,
262,
9593,
16274,
26250,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_of_bytes() {
let parent = &[1, 2, 3, 4][..];
let sub = &parent[1..2];
assert_eq!(Span::from(sub).of(parent).unwrap(), sub);
let non_span = Span::from(&[1, 2, 2, 4][..]);
assert_eq!(non_span.of(parent), None);
} | rust_cleaned_test_functions.jsonl/124292 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3575,
12524,
368,
341,
262,
1077,
2681,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
1457,
496,
935,
262,
1077,
1186,
284,
609,
3765,
58,
16,
496,
17,
935,
262,
2060,
10714,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reset() {
let mut stoch = SlowStochastic::new(3, 2).unwrap();
assert_eq!(stoch.next(10.0), 50.0);
assert_eq!(stoch.next(50.0).round(), 83.0);
assert_eq!(stoch.next(50.0).round(), 94.0);
stoch.reset();
assert_eq!(stoch.next(10.0), 50.0);
} | rust_cleaned_test_functions.jsonl/72386 | {
"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,
18983,
368,
341,
286,
1077,
5206,
357,
4953,
284,
38147,
623,
65954,
486,
931,
7,
18,
11,
220,
17,
568,
15454,
543,
286,
2060,
10714,
10297,
267,
4953,
4529,
7,
16,
15,
13,
15,
701,
220,
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... | 1 |
#[test]
fn test_create_program_spec_not_logged_in() {
let context_builder = ContextBuilder::new();
let conn = context_builder.db_conn();
let hw_spec = HardwareSpecFactory::default().name("HW 1").insert(conn);
let values_list: InputValue = InputValue::list(
[1, 2, 3].iter().map(|v| Input... | rust_cleaned_test_functions.jsonl/90809 | {
"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,
8657,
25096,
13594,
7913,
47333,
1243,
368,
341,
262,
1077,
2266,
28532,
284,
9608,
3297,
486,
931,
543,
262,
1077,
4534,
284,
2266,
28532,
7076,
17241,
1428,
262,
1077,
31256,
13594,
284,
36765,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_syscall_name_from_arch() {
let name = get_syscall_name_from_arch(ScmpArch::Arm, 5).unwrap();
println!(
"test_get_syscall_from_name: Got syscall name of 5 on ARM arch as {}",
name
);
} | rust_cleaned_test_functions.jsonl/66422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
20344,
6659,
1269,
5673,
34330,
368,
341,
286,
1077,
829,
284,
633,
20344,
6659,
1269,
5673,
34330,
7,
3326,
1307,
18727,
486,
32913,
11,
220,
20,
568,
15454,
1428,
286,
13751,
33673,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_valid_redshift_create_cluster() {
let mock_response = MockResponseReader::read_response(
"test_resources/generated/valid",
"redshift-create-cluster.xml",
);
let mock = MockRequestDispatcher::with_status(200).with_body(&mock_response);
... | rust_cleaned_test_functions.jsonl/12105 | {
"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,
21039,
8337,
26058,
13418,
8657,
28441,
368,
341,
286,
1077,
7860,
9655,
284,
14563,
2582,
5062,
486,
878,
9655,
1006,
310,
330,
1944,
35569,
79372,
14,
1891,
756,
310,
330,
1151,
13418,
39679,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sparse_mixed() {
let mut builder = UnionBuilder::new_sparse(5);
builder.append::<Int32Type>("a", 1).unwrap();
builder.append::<Float64Type>("c", 3.0).unwrap();
builder.append::<Int32Type>("a", 4).unwrap();
builder.append::<Float64Type>("c", 5.0).unwrap();
... | rust_cleaned_test_functions.jsonl/25636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
717,
3286,
368,
341,
286,
1077,
5206,
7363,
284,
9145,
3297,
486,
931,
71123,
7,
20,
317,
286,
7363,
2057,
27638,
1072,
18,
17,
929,
13211,
64,
497,
220,
16,
568,
15454,
543,
286,
7363,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_change_trust_with_source_account() {
let kp = keypair0();
let kp1 = keypair1();
let kp2 = keypair2();
let asset = Asset::new_credit("FOOBAR", kp1.public_key().clone()).unwrap();
let op = Operation::new_change_trust()
.with_source_account(kp2.... | rust_cleaned_test_functions.jsonl/8898 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 706
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
3547,
590,
6615,
10347,
13500,
368,
341,
286,
1077,
60319,
284,
1376,
12670,
15,
543,
286,
1077,
60319,
16,
284,
1376,
12670,
16,
543,
286,
1077,
60319,
17,
284,
1376,
12670,
17,
1428,
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_size() {
assert_eq!(std::mem::size_of::<Name<'_>>(), 16);
assert_eq!(std::mem::size_of::<Option<Name<'_>>>(), 16);
} | rust_cleaned_test_functions.jsonl/109230 | {
"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,
2368,
368,
341,
197,
6948,
10714,
10297,
1834,
486,
10536,
486,
2141,
3575,
27638,
675,
18291,
62,
2452,
1507,
220,
16,
21,
317,
197,
6948,
10714,
10297,
1834,
486,
10536,
486,
2141,
3575,
27638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.