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_split_off_tiny_left_height_2() {
let pairs = (0..MIN_INSERTS_HEIGHT_2).map(|i| (i, i));
let mut left: BTreeMap<_, _> = pairs.clone().collect();
let right = left.split_off(&1);
assert_eq!(left.len(), 1);
assert_eq!(right.len(), MIN_INSERTS_HEIGHT_2 - 1);
assert_eq!(*left.f... | rust_cleaned_test_functions.jsonl/56364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
13651,
528,
6441,
9579,
9561,
62,
17,
368,
341,
262,
1077,
13530,
284,
320,
15,
496,
16413,
47924,
50,
17355,
62,
17,
568,
2186,
22428,
72,
91,
320,
72,
11,
600,
1106,
262,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_atomic_update_api() -> Result<(), Box<dyn Error>> {
let p = create_temp_path("/dev/shm/elfshaker-test/test_atomic_update_api");
// Create an empty file with no lock on it.
// Should succeed later.
fs::create_dir_all(p.parent().unwrap())?;
fs::write(&p, ve... | rust_cleaned_test_functions.jsonl/126614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51367,
8882,
11697,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
281,
284,
1855,
11771,
2638,
4283,
3583,
14688,
76,
14,
490,
927,
4407,
16839,
12697,
51367,
8882,
11697,
3071,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_create_db() {
let dir = tempdir().unwrap();
let env = Environment::new().set_max_dbs(11).open(dir.path()).unwrap();
let txn = env.begin_rw_txn().unwrap();
assert!(txn.open_db(Some("testdb")).is_err());
assert!(txn
.create_db(Some("testdb"), ff... | rust_cleaned_test_functions.jsonl/81369 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
8685,
368,
341,
286,
1077,
5419,
284,
2730,
3741,
1005,
15454,
543,
286,
1077,
6105,
284,
11586,
486,
931,
1005,
746,
6345,
814,
1279,
7,
16,
16,
568,
2508,
14161,
3875,
6011,
15454,
1428,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_arguments_explicit_dep_target_needed() {
let args = stringvec!["-c", "foo.c", "-MT", "depfile", "-fabc", "-MF", "file", "-o", "foo.o", "-MD"];
let ParsedArguments {
input,
language,
depfile: _,
outputs,
preprocesso... | rust_cleaned_test_functions.jsonl/15019 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 530
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
43433,
14214,
6026,
49258,
11123,
57426,
368,
341,
286,
1077,
2827,
284,
914,
4083,
0,
1183,
12,
66,
497,
330,
7975,
520,
497,
6523,
8505,
497,
330,
14891,
1192,
497,
6523,
69,
13683,
497... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_accept_bad_id() {
let mut socket = socket(buffer(1), buffer(1));
assert_eq!(socket.bind(Endpoint::Ident(0x1234)), Ok(()));
let checksum = ChecksumCapabilities::default();
let mut bytes = [0xff; 20];
let mut packet = Icmpv4Packet::new_unchecked(&mut bytes)... | rust_cleaned_test_functions.jsonl/99232 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 341
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35728,
34199,
842,
368,
341,
286,
1077,
5206,
7575,
284,
7575,
12584,
7,
16,
701,
4147,
7,
16,
1106,
286,
2060,
10714,
10297,
9556,
6090,
7,
27380,
486,
28301,
7,
15,
87,
16,
17,
18,
19,
573... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_badpath4() {
#[endpoint {
method = PUT,
path = "I don't start with a slash"
}]
async fn test_badpath_handler(
_: Arc<RequestContext<()>>,
) -> Result<Response<Body>, HttpError> {
unimplemented!();
}
... | rust_cleaned_test_functions.jsonl/17569 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
2343,
19,
368,
341,
286,
11506,
32540,
341,
310,
1714,
284,
34380,
345,
310,
1815,
284,
330,
40,
1513,
944,
1191,
448,
264,
36626,
698,
286,
28394,
286,
3312,
5168,
1273,
34199,
2343,
101... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_open_hash_sync() {
use std::io::prelude::*;
let tmp = tempfile::tempdir().unwrap();
let dir = tmp.path().to_owned();
let sri = crate::write_sync(&dir, "my-key", b"hello world").unwrap();
let mut handle = crate::SyncReader::open_hash(&dir, sri).unwrap();
... | rust_cleaned_test_functions.jsonl/64594 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11311,
8950,
23008,
368,
341,
286,
990,
1460,
486,
815,
486,
1726,
52538,
56162,
286,
1077,
4174,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
286,
1077,
5419,
284,
4174,
3875,
1005,
983,
51973,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stop_sending_other_error_wo_reset() {
let (mut client, mut server, request_stream_id) = connect_and_send_request(false);
// Stop sending with RequestRejected.
assert_eq!(
Ok(()),
server
.conn
.stream_stop_s... | rust_cleaned_test_functions.jsonl/101904 | {
"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,
19039,
643,
2459,
30456,
4096,
96058,
18983,
368,
341,
1789,
286,
1077,
320,
6984,
2943,
11,
5206,
3538,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
3576,
626,
286,
442,
14215,
11628,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_1() {
let s = String::from("abcd");
let t = String::from("abcde");
assert_eq!(Solution::find_the_difference(s, t), 'e');
} | rust_cleaned_test_functions.jsonl/56114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 87
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
368,
341,
286,
1077,
274,
284,
923,
486,
1499,
445,
68644,
797,
286,
1077,
259,
284,
923,
486,
1499,
445,
13683,
450,
3071,
286,
2060,
10714,
10297,
36842,
486,
3903,
16068,
47525,
1141,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ambiguous_nullable_grammar() {
let g = examples::make_ambiguous_nullable();
let nullable_error = calculate_nullables(&g).unwrap_err();
assert!(matches!(nullable_error, NullableError::Ambiguity));
} | rust_cleaned_test_functions.jsonl/27893 | {
"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,
62,
90213,
69743,
62,
41094,
368,
341,
262,
1077,
342,
284,
10295,
486,
6927,
62,
90213,
69743,
543,
262,
1077,
13258,
4096,
284,
11047,
15162,
4788,
2099,
70,
568,
15454,
9266,
543,
262,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_encode_single_message() {
let _m = mock("GET", "/subjects/nl.openweb.data.Heartbeat/versions/latest")
.with_status(200)
.with_header("content-type", "application/vnd.schemaregistry.v1+json")
.with_body(&get_proto_body(get_proto_hb_schema(), 7))
... | rust_cleaned_test_functions.jsonl/100933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
19487,
6462,
368,
341,
286,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
64782,
9612,
75,
5826,
2911,
2196,
13,
45384,
22227,
14,
28290,
33149,
1138,
310,
659,
4197,
4773,
7,
17,
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_convert_call_multiple_object_arguments() {
let b = ast::BaseNode::default();
let pkg = ast::Package {
base: b.clone(),
path: "path".to_string(),
package: "main".to_string(),
files: vec![ast::File {
base: b.clone(),
... | rust_cleaned_test_functions.jsonl/131377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2401
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34910,
13429,
45233,
5314,
43433,
368,
341,
286,
1077,
293,
284,
11763,
486,
3978,
1955,
486,
2258,
543,
286,
1077,
24793,
284,
11763,
486,
13100,
341,
310,
2331,
25,
293,
15997,
3148,
310,
1815,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lazy_initialization_failure() {
let manager = NthConnectFailManager { n: Mutex::new(0) };
let pool = Pool::builder()
.connection_timeout(Duration::from_secs(1))
.build_unchecked(manager);
let err = pool.get().err().unwrap();
assert!(err.to_string().contains("blamm... | rust_cleaned_test_functions.jsonl/6405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49646,
15809,
2022,
43618,
368,
341,
262,
1077,
6645,
284,
451,
339,
14611,
19524,
2043,
314,
308,
25,
66215,
486,
931,
7,
15,
8,
2605,
262,
1077,
7314,
284,
22728,
486,
17850,
741,
286,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_split_gs_url() {
assert_eq!(
split_gs_url(&"gs://foo/bar/blah".to_string()).expect("bar/blah"),
("foo", "bar/blah")
);
assert_eq!(split_gs_url(&"gs://foo/".to_string()).expect("empty object"), ("foo", ""));
assert_eq!(split_gs_url(&"gs:///"... | rust_cleaned_test_functions.jsonl/79954 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
96930,
2903,
368,
341,
286,
2060,
10714,
33673,
310,
6718,
96930,
2903,
2099,
1,
5857,
1110,
7975,
49513,
14,
70614,
3263,
983,
3904,
6011,
17119,
445,
2257,
14,
70614,
4461,
310,
3489,
797... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parser_and() {
let mut input = Cursor::new("a and b".as_bytes());
let mut parser = Parser::make(&mut input).expect("Should create parser");
let and = parser.parse().expect("And");
assert_eq!(and.to_string(), "a and b");
} | rust_cleaned_test_functions.jsonl/125353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
18517,
8378,
368,
972,
286,
1077,
5206,
1946,
284,
28067,
486,
931,
445,
64,
323,
293,
3263,
300,
12524,
6201,
286,
1077,
5206,
6729,
284,
21102,
486,
6927,
2099,
6984,
1946,
568,
17119,
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... | 1 |
#[test]
fn test_quoted_node_selector() {
let selector_str = "\"unnamed\"";
assert_eq!(
Ok((
"",
NodeSelectorRaw {
node_kind: "unnamed".into(),
nth_child: None
}
)),
node_se... | rust_cleaned_test_functions.jsonl/56564 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
9253,
5084,
28890,
368,
341,
286,
1077,
9367,
2895,
284,
15898,
14931,
3606,
95349,
286,
2060,
10714,
33673,
310,
7622,
94702,
394,
8324,
394,
6018,
5877,
20015,
341,
503,
2436,
33162,
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_sqlite_functions() {
let db = checked_memory_handle();
let result: Result<time::Timespec> =
db.query_row("SELECT CURRENT_TIMESTAMP", NO_PARAMS, |r| r.get(0));
assert!(result.is_ok());
} | rust_cleaned_test_functions.jsonl/62323 | {
"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,
18063,
632,
31708,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
543,
286,
1077,
1102,
25,
5714,
27,
1678,
486,
18889,
992,
29,
4035,
310,
2927,
4786,
8530,
445,
4858,
43107,
47854,
497,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_fr_is_valid() {
let mut a = MODULUS_LIMBS;
assert!(!a.is_valid());
a.sub_noborrow(&Fr([1, 0, 0, 0]));
assert!(a.is_valid());
assert!(Fr::from(0).is_valid());
assert!(Fr([
0xffffffff00000000,
0x53bda402fffe5bfe,
0x3339d80809a1d805,
0x73eda75... | rust_cleaned_test_functions.jsonl/100645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41537,
6892,
8337,
368,
341,
262,
1077,
5206,
264,
284,
18669,
1094,
2034,
2351,
1791,
7347,
280,
262,
2060,
0,
3471,
64,
2079,
8337,
1423,
262,
264,
4309,
1089,
674,
7768,
2099,
22560,
2561,
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... | 2 |
#[test]
fn test_report_steady() {
let default = StrategyPeriodic::default();
let mut runtime = rt::Runtime::new().unwrap();
let steady = runtime.block_on(default.report_steady()).unwrap();
assert_eq!(steady, true);
} | rust_cleaned_test_functions.jsonl/37968 | {
"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,
14813,
1261,
3149,
88,
368,
341,
286,
1077,
1638,
284,
27745,
23750,
292,
486,
2258,
543,
286,
1077,
5206,
15592,
284,
16677,
486,
15123,
486,
931,
1005,
15454,
543,
286,
1077,
24020,
284,
15592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_default() {
env::set_var("A_B_C", "abc");
let environment = Environment::new();
assert!(environment.collect().unwrap().contains_key("a_b_c"));
env::remove_var("A_B_C");
} | rust_cleaned_test_functions.jsonl/22982 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 91
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9993,
368,
341,
262,
6105,
486,
746,
4612,
445,
32,
1668,
920,
497,
330,
13683,
3071,
262,
1077,
4573,
284,
11586,
486,
931,
1428,
262,
2060,
10297,
23294,
29124,
1005,
15454,
1005,
13372,
3097,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_resolve_2d_f32() {
let mass = Mass::<f32, f32>::new_with_inertia(0.5, 0.);
let material = Material::default();
let left_velocity = NextFrame {
value: Velocity::new(Vector2::<f32>::new(1., 0.), 0.),
};
let left_pose = BodyPose::new(Point2::origi... | rust_cleaned_test_functions.jsonl/28245 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1011
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
62,
17,
67,
761,
18,
17,
368,
341,
286,
1077,
3072,
284,
9167,
27638,
69,
18,
17,
11,
282,
18,
17,
6831,
931,
6615,
1243,
40122,
7,
15,
13,
20,
11,
220,
15,
58957,
286,
1077,
3684,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_limit_number_of_message_ids_inside_ihave() {
let config = GossipsubConfigBuilder::default()
.max_ihave_messages(10)
.max_ihave_length(100)
.build()
.unwrap();
//build gossipsub with full mesh
let (mut gs, peers, topics) = in... | rust_cleaned_test_functions.jsonl/66940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14763,
5500,
3575,
6462,
8077,
72860,
5318,
19016,
368,
341,
286,
1077,
2193,
284,
479,
41473,
1966,
2648,
3297,
486,
2258,
741,
310,
659,
2810,
5318,
19016,
23428,
7,
16,
15,
340,
310,
659,
281... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_help() {
let (r, sioe) = do_execute!(&["-H"]);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(buff!(sioe, sout), help_msg!());
assert_eq!(r.is_ok(), true);
} | rust_cleaned_test_functions.jsonl/62173 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26926,
368,
341,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
12,
39,
15049,
286,
2060,
10714,
10297,
25976,
10297,
82,
815,
68,
11,
61934,
701,
14498,
286,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hex_numbers_0() {
let s = to_chars("0x");
let cur = &mut 0;
expect_next_token(&s, cur, Token::Illegal);
} | rust_cleaned_test_functions.jsonl/21027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
32964,
62,
15,
368,
341,
286,
1077,
274,
284,
311,
37418,
445,
15,
87,
797,
286,
1077,
2847,
284,
609,
6984,
220,
15,
280,
286,
1720,
11257,
6458,
2099,
82,
11,
2847,
11,
9660,
486,
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 |
#[test]
fn test_from_ll_keymod_keydown_unknown_bits() {
let mut raw_event = Event::KeyDown {
timestamp: 0,
window_id: 1,
keycode: None,
scancode: Some(Scancode::Q),
keymod: Mod::empty(),
repeat: false,
}
.to_ll()
... | rust_cleaned_test_functions.jsonl/75290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 321
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
42995,
3097,
2593,
3097,
2923,
57507,
20034,
368,
341,
286,
1077,
5206,
7112,
6748,
284,
3665,
486,
24173,
341,
310,
11441,
25,
220,
15,
345,
310,
3241,
842,
25,
220,
16,
345,
310,
86991,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_quadratic_mean_of_sinusoidal() {
let data = InfiniteSinusoidal::default(64.0, 16.0, 2.0).take(128).collect::<Vec<f64>>();
assert_almost_eq!((&data).quadratic_mean(), 2.0 / consts::SQRT_2, 1e-15);
} | rust_cleaned_test_functions.jsonl/55251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11280,
88678,
16933,
3575,
643,
70856,
70816,
368,
341,
286,
1077,
821,
284,
54543,
48268,
355,
70816,
486,
2258,
7,
21,
19,
13,
15,
11,
220,
16,
21,
13,
15,
11,
220,
17,
13,
15,
568,
22769,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mirror_suite() {
enable_logging_for_test(true);
for (test_fn, can_setup) in MIRROR_TEST_FNS.iter() {
launch_mirror_test(*test_fn, *can_setup).unwrap();
}
} | rust_cleaned_test_functions.jsonl/59649 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88593,
57239,
368,
341,
262,
7283,
59982,
5478,
4452,
3715,
317,
262,
369,
320,
1944,
15246,
11,
646,
21363,
8,
304,
386,
87517,
11641,
1400,
2448,
19471,
368,
341,
286,
7050,
88593,
4452,
4071,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_public_key_1() {
let secret_key =
hex::decode("1ab1126ff2e37c6e6eddea943ccb3a48f83b380b856424ee552e113595525565")
.unwrap();
let expected = hex::decode(
"28fe26becbdc0384aa67bf734d08ec78ecc2330f0aa02ad9da00f56c37907f78\
2cd0... | rust_cleaned_test_functions.jsonl/65089 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 531
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
27074,
3097,
62,
16,
368,
341,
286,
1077,
6234,
3097,
4035,
310,
12371,
486,
18196,
445,
16,
370,
16,
16,
17,
21,
542,
17,
68,
18,
22,
66,
21,
68,
21,
291,
55088,
24,
19,
18,
81317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_receipt_from_txhash() {
let tx_hash = "0xb540248a9cca048c5861dec953d7a776bc1944319b9bd27a462469c8a437f4ff";
let endpoint = "https://mainnet.infura.io/v3/9c7178cede9f4a8a84a151d058bd609c";
let res = get_receipt_from_tx_hash(endpoint, tx_hash);
println!("{:?}", res);
let mu... | rust_cleaned_test_functions.jsonl/76363 | {
"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,
3062,
77974,
5673,
17805,
8296,
368,
341,
262,
1077,
9854,
8950,
284,
330,
15,
7929,
20,
19,
15,
17,
19,
23,
64,
24,
24441,
15,
19,
23,
66,
20,
23,
21,
16,
8169,
24,
20,
18,
67,
22,
64,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_commit_credits() {
let pubkey0 = Pubkey::new_rand();
let pubkey1 = Pubkey::new_rand();
let pubkey2 = Pubkey::new_rand();
let account0 = Account::new(1, 0, &Pubkey::default());
let account1 = Account::new(2, 0, &Pubkey::default());
let accounts = ... | rust_cleaned_test_functions.jsonl/104355 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36346,
666,
29502,
368,
341,
286,
1077,
95116,
15,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
95116,
16,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
95116,
17,
284,
22611,
792,
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_calculate_weight() {
let locktower = Locktower::new(EpochStakes::new_for_tests(2), 0, 0.67);
let stakes = vec![(
0,
StakeLockout {
stake: 1,
lockout: 8,
},
)]
.into_iter()
.collect();
... | rust_cleaned_test_functions.jsonl/25558 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24005,
11207,
15876,
368,
341,
286,
1077,
5296,
77578,
284,
15701,
77578,
486,
931,
10722,
79,
4953,
623,
2050,
486,
931,
5478,
32509,
7,
17,
701,
220,
15,
11,
220,
15,
13,
21,
22,
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... | 1 |
#[test]
fn test_with_valid_page_ranges() {
let test_file_path = "test_num_page.log";
let mut scenario = new_ucmd!();
scenario
.args(&["--pages=20:5", test_file_path])
.fails()
.stderr_is("pr: invalid --pages argument '20:5'")
.stdout_is("");
new_ucmd!()
.a... | rust_cleaned_test_functions.jsonl/103048 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
8337,
6129,
58748,
368,
341,
262,
1077,
1273,
2458,
2638,
284,
330,
1944,
4273,
6129,
1665,
876,
262,
1077,
5206,
15048,
284,
501,
68887,
2277,
0,
543,
262,
15048,
198,
286,
659,
2116,
209... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_checked_add() {
for elm in SUM_TRIPLES.iter() {
let (a_vec, b_vec, c_vec) = *elm;
let a = BigUint::from_slice(a_vec);
let b = BigUint::from_slice(b_vec);
let c = BigUint::from_slice(c_vec);
assert!(a.checked_add(&b).unwrap() ==... | rust_cleaned_test_functions.jsonl/90132 | {
"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,
56456,
2891,
368,
341,
286,
369,
42205,
304,
30735,
6410,
3298,
14017,
19471,
368,
341,
310,
1077,
320,
64,
13251,
11,
293,
13251,
11,
272,
13251,
8,
284,
353,
23162,
280,
310,
1077,
264,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_remove_account_before_initialization() {
let location = TempLocation::new();
request_stream_test(
location.to_persistent_lifetime(),
Arc::new(Inspector::new()),
|proxy, _| {
async move {
assert_eq!(
... | rust_cleaned_test_functions.jsonl/36824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
13500,
23708,
15809,
2022,
368,
341,
286,
1077,
3728,
284,
19944,
4707,
486,
931,
543,
286,
1681,
12673,
4452,
1006,
310,
3728,
2389,
620,
13931,
98827,
3148,
310,
19689,
486,
931,
7,
46230... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_arc_condvar_poison() {
let packet = Packet(Arc::new((Mutex::new(1), Condvar::new())));
let packet2 = Packet(packet.0.clone());
let (tx, rx) = channel();
let _t = thread::spawn(move || -> () {
rx.recv().unwrap();
let &(ref lock, ref cvar) =... | rust_cleaned_test_functions.jsonl/8918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 495
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62914,
24433,
947,
61814,
3335,
368,
341,
286,
1077,
10151,
284,
28889,
4346,
1287,
486,
931,
1188,
38099,
486,
931,
7,
16,
701,
44826,
947,
486,
931,
45722,
286,
1077,
10151,
17,
284,
28889,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_json() {
let id = UUID4::random();
let json = format!("\"{}\"", id.to_string());
let deserialized: UUID4 = serde_json::from_str(json.as_str()).expect("should read fine");
assert_eq!(deserialized, id);
} | rust_cleaned_test_functions.jsonl/7587 | {
"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,
5673,
9455,
368,
341,
286,
1077,
877,
284,
23698,
19,
486,
11463,
543,
286,
1077,
2951,
284,
3561,
17223,
2105,
6257,
55853,
877,
2389,
3904,
1423,
286,
1077,
939,
67577,
25,
23698,
19,
284,
615... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wpa_invalid_psk() {
let bss = fake_wpa1_bss_description(b"foo_bss".to_vec());
// PSK too short
let credential = fidl_sme::Credential::Psk(vec![0xAA; 31]);
get_legacy_wpa_association(&fake_device_info(CLIENT_ADDR), &credential, &bss)
.expect_err("ex... | rust_cleaned_test_functions.jsonl/23530 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1670,
6595,
31433,
620,
4886,
368,
341,
286,
1077,
293,
778,
284,
12418,
1670,
6595,
16,
880,
778,
11448,
1883,
1,
7975,
880,
778,
3263,
983,
13251,
1423,
286,
442,
11405,
42,
2238,
2805,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_range_key() {
let a = RangeKey::from_start_key(b"".to_vec());
let b = RangeKey::from_start_key(b"".to_vec());
let c = RangeKey::from_end_key(b"a".to_vec());
let d = RangeKey::from_start_key(b"a".to_vec());
let e = RangeKey::from_start_key(b"d".to_vec());
... | rust_cleaned_test_functions.jsonl/64324 | {
"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,
9698,
3097,
368,
341,
286,
1077,
264,
284,
16437,
1592,
486,
1499,
4906,
3097,
1883,
69355,
983,
13251,
1423,
286,
1077,
293,
284,
16437,
1592,
486,
1499,
4906,
3097,
1883,
69355,
983,
13251,
1423... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_basic_query_items() {
let querier = new_valid_db("query_items.db");
let items = querier.query_items(Some("apple"), None, None);
assert_eq!(3, items.len());
} | rust_cleaned_test_functions.jsonl/107668 | {
"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,
34729,
5738,
12134,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
1631,
12134,
7076,
3071,
286,
1077,
3589,
284,
29134,
1268,
4786,
12134,
65405,
445,
22377,
3975,
2240,
11,
2240,
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 |
#[test]
fn test_request_snapshot_after_propose_merge() {
let mut cluster = new_node_cluster(0, 3);
configure_for_merge(&mut cluster);
let pd_client = Arc::clone(&cluster.pd_client);
pd_client.disable_default_operator();
cluster.run();
let region = pd_client.get_region(b"k1").unwrap();
... | rust_cleaned_test_functions.jsonl/27255 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
53265,
19844,
21663,
960,
20888,
368,
341,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
220,
18,
317,
262,
14411,
5478,
20888,
2099,
6984,
10652,
317,
262,
1077,
7744,
8179,
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_parsing_error_in_invalid_included_ranges() {
let mut parser = Parser::new();
// Ranges are not ordered
let error = parser
.set_included_ranges(&[
Range {
start_byte: 23,
end_byte: 29,
start_point: Point::new(0, 23),... | rust_cleaned_test_functions.jsonl/15876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
4096,
1243,
31433,
1243,
10181,
58748,
368,
341,
262,
1077,
5206,
6729,
284,
21102,
486,
931,
1428,
262,
442,
431,
5520,
525,
537,
11457,
198,
262,
1077,
1465,
284,
6729,
198,
286,
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... | 1 |
#[test]
fn test_struct_empty_decl() {
use ast::Declaration;
use parser::declaration;
let env = &mut Env::with_core();
assert!(declaration("struct foo { } S;", env).is_err());
let env = &mut Env::with_gnu();
assert_eq!(
declaration("struct foo { } S;", env).unwrap(),
De... | rust_cleaned_test_functions.jsonl/107588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
15124,
35814,
368,
341,
262,
990,
11763,
486,
24489,
280,
262,
990,
6729,
486,
80383,
401,
262,
1077,
6105,
284,
609,
6984,
37039,
486,
4197,
15467,
543,
262,
2060,
10297,
80383,
445,
1235,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_loop_scope() {
do_check(
r"
fn quux() {
loop {
let x = ();
<|>
};
}",
&["x"],
);
} | rust_cleaned_test_functions.jsonl/12174 | {
"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,
17198,
23199,
368,
341,
286,
653,
7200,
1006,
310,
435,
698,
310,
5168,
922,
2200,
368,
341,
394,
6337,
341,
503,
1077,
856,
284,
9563,
503,
82639,
397,
394,
2605,
310,
335,
756,
310,
609,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_v32_1() {
let mut data : &[u8] = &[1, 2];
assert_eq!(Ok(0x01), data.read_v32());
assert_eq!(Ok(0x02), data.read_v32());
assert_eq!(Err(Error::Short), data.read_v32());
assert_eq!(0, data.len());
} | rust_cleaned_test_functions.jsonl/72920 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
2273,
18,
17,
62,
16,
368,
341,
286,
1077,
5206,
821,
549,
44590,
84,
23,
60,
284,
44590,
16,
11,
220,
17,
935,
286,
2060,
10714,
10297,
11578,
7,
15,
87,
15,
16,
701,
821,
4125,
227... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eq() {
let mut a: SmallVec<[u32; 2]> = SmallVec::new();
let mut b: SmallVec<[u32; 2]> = SmallVec::new();
let mut c: SmallVec<[u32; 2]> = SmallVec::new();
a.push(1);
a.push(2);
b.push(1);
b.push(2);
c.push(... | rust_cleaned_test_functions.jsonl/88156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
368,
341,
286,
1077,
5206,
264,
25,
14994,
10050,
66746,
84,
18,
17,
26,
220,
17,
25669,
284,
14994,
10050,
486,
931,
543,
286,
1077,
5206,
293,
25,
14994,
10050,
66746,
84,
18,
17,
26,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_long_input() {
#[cfg(not(windows))]
const TIMES: usize = 14000;
// On Windows the command line is limited to 8191 bytes.
// try something long.
#[cfg(windows)]
const TIMES: usize = 500;
let arg = "abcdef".repeat(TIMES) + "\n";
let expected_out = arg.repeat(30... | rust_cleaned_test_functions.jsonl/88241 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17799,
5898,
368,
341,
262,
11506,
14072,
24772,
3622,
1491,
22297,
262,
733,
86930,
25,
22301,
284,
220,
16,
19,
15,
15,
15,
280,
262,
442,
1913,
5515,
279,
3210,
1555,
374,
7199,
311,
220,
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_extract_gdb_version() {
macro_rules! test { ($($expectation:tt: $input:tt,)*) => {{$(
assert_eq!(extract_gdb_version($input), Some($expectation));
)*}}}
test! {
7000001: "GNU gdb (GDB) CentOS (7.0.1-45.el5.centos)",
7002000: "GNU gdb (GDB) Red Hat Enterprise... | rust_cleaned_test_functions.jsonl/41387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 858
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
1889,
1999,
9438,
368,
341,
262,
18072,
21407,
0,
1273,
314,
1711,
699,
17119,
367,
25,
5566,
25,
400,
1355,
25,
5566,
46021,
3764,
589,
30108,
1006,
286,
2060,
10714,
10297,
23493,
1889,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_der_int() {
let empty = &b""[..];
let bytes = hex!("02 03 01 00 01");
let expected = DerObject::from_obj(BerObjectContent::Integer(b"\x01\x00\x01"));
assert_eq!(parse_der_integer(&bytes), Ok((empty, expected)));
let res = parse_der_u64(&bytes);
assert_eq!(res.expect("inte... | rust_cleaned_test_functions.jsonl/45860 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
4042,
368,
341,
262,
1077,
4287,
284,
609,
65,
3014,
95874,
935,
262,
1077,
5820,
284,
12371,
17223,
15,
17,
220,
15,
18,
220,
15,
16,
220,
15,
15,
220,
15,
16,
797,
262,
1077,
3601,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_i32() {
let data: &[u8] = &[0x12, 0x34, 0x56, 0x78];
let result: i32 = from_bytes(data, PodType::TVM).unwrap();
dbg!(result);
assert_eq!(result, 0x78563412);
} | rust_cleaned_test_functions.jsonl/57362 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5318,
18,
17,
368,
341,
286,
1077,
821,
25,
44590,
84,
23,
60,
284,
44590,
15,
87,
16,
17,
11,
220,
15,
87,
18,
19,
11,
220,
15,
87,
20,
21,
11,
220,
15,
87,
22,
23,
935,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_comparisons() {
let zero = bf16::from_f64(0.0);
let one = bf16::from_f64(1.0);
let neg_zero = bf16::from_f64(-0.0);
let neg_one = bf16::from_f64(-1.0);
assert_eq!(zero.partial_cmp(&neg_zero), Some(Ordering::Equal));
assert_eq!(neg_zero.partial_cmp... | rust_cleaned_test_functions.jsonl/4213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 956
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2965,
1732,
19379,
368,
341,
286,
1077,
7168,
284,
39093,
16,
21,
486,
1499,
761,
21,
19,
7,
15,
13,
15,
317,
286,
1077,
825,
284,
39093,
16,
21,
486,
1499,
761,
21,
19,
7,
16,
13,
15,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_bytes() {
assert_eq!(false.as_bytes(), &[0]);
assert_eq!(true.as_bytes(), &[1]);
assert_eq!(7_i32.as_bytes(), &[7, 0, 0, 0]);
assert_eq!(555_i32.as_bytes(), &[43, 2, 0, 0]);
assert_eq!(555_u32.as_bytes(), &[43, 2, 0, 0]);
assert_eq!(i32::max_val... | rust_cleaned_test_functions.jsonl/8691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 977
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
12524,
368,
341,
286,
2060,
10714,
10297,
3849,
5357,
12524,
1507,
44590,
15,
2558,
286,
2060,
10714,
10297,
1866,
5357,
12524,
1507,
44590,
16,
2558,
286,
2060,
10714,
10297,
22,
5318,
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_regex_search_with_region_tree() {
let mut region = Region::new();
let mut syntax = Syntax::ruby().clone();
syntax.enable_operators(SyntaxOperator::SYNTAX_OPERATOR_ATMARK_CAPTURE_HISTORY);
let regex = Regex::with_options(
"(?@a+(?@b+))|(?@c+(?@d+))",
... | rust_cleaned_test_functions.jsonl/74700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 590
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41832,
10716,
6615,
20627,
11663,
368,
341,
286,
1077,
5206,
5537,
284,
17152,
486,
931,
543,
286,
1077,
5206,
19482,
284,
32117,
486,
46275,
1005,
19982,
543,
286,
19482,
28697,
25634,
2973,
93549,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parser() {
let circ = Circuit::parse("circuits/AES-non-expanded.txt").unwrap();
let key = vec![0u16; 128];
let pt = vec![0u16; 128];
let output = circ.eval_plain(&pt, &key).unwrap();
assert_eq!(output.iter().map(|i| i.to_string()).collect::<String>(),
... | rust_cleaned_test_functions.jsonl/101184 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 774
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
368,
341,
286,
1077,
4225,
284,
27218,
486,
6400,
445,
43298,
11797,
10360,
1570,
98700,
30036,
3909,
1827,
15454,
543,
286,
1077,
1376,
284,
7486,
20703,
15,
84,
16,
21,
26,
220,
16,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_insert_with_lock_no_ancestors() {
let key = Keypair::new();
let index = AccountsIndex::<bool>::default_for_tests();
let slot = 0;
let account_info = true;
let new_entry = WriteAccountMapEntry::new_entry_after_update(slot, account_info);
assert_eq!... | rust_cleaned_test_functions.jsonl/132254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1020
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
6615,
9818,
6536,
62,
681,
267,
1087,
368,
341,
286,
1077,
1376,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
1922,
284,
40655,
1552,
27638,
2641,
6831,
2258,
5478,
32509,
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... | 1 |
#[test]
fn test_virtio_blk() {
let mut focal = UbuntuDiskConfig::new(FOCAL_IMAGE_NAME.to_string());
let guest = Guest::new(&mut focal);
let mut workload_path = dirs::home_dir().unwrap();
workload_path.push("workloads");
let mut blk_file_path = worklo... | rust_cleaned_test_functions.jsonl/23967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
51969,
368,
341,
310,
1077,
5206,
41099,
284,
34960,
47583,
2648,
486,
931,
7,
3788,
49533,
19121,
4708,
2389,
3904,
1423,
310,
1077,
8640,
284,
26215,
486,
931,
2099,
6984,
41099... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shared_buffer_2_errors_after_read() {
paychains_logger::setup();
let (sender, receiver) = unbounded();
let file = SimpleReader::new(receiver);
let shared_buffer = SharedBuffer::new(file);
let mut reader = SharedBufferReader::new(&shared_buffer);
le... | rust_cleaned_test_functions.jsonl/84070 | {
"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,
20405,
7776,
62,
17,
20196,
19844,
6443,
368,
341,
286,
2291,
58358,
27413,
486,
15188,
543,
286,
1077,
320,
11644,
11,
13964,
8,
284,
650,
65686,
543,
286,
1077,
1034,
284,
8993,
5062,
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_proof_path_storage_key_leaf() {
let key = ProofPath::new(&[250; 32]);
let mut buf = vec![0; PROOF_PATH_SIZE];
key.write(&mut buf);
let key2 = ProofPath::read(&buf);
assert_eq!(buf[0], LEAF_KEY_PREFIX);
assert_eq!(buf[33], 0);
assert_eq!(&buf[1..33], &[250; 32]);
... | rust_cleaned_test_functions.jsonl/25534 | {
"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,
86757,
2638,
23310,
3097,
38909,
368,
341,
262,
1077,
1376,
284,
36991,
1820,
486,
931,
2099,
58,
17,
20,
15,
26,
220,
18,
17,
2558,
262,
1077,
5206,
6607,
284,
7486,
20703,
15,
26,
5308,
1248... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ip_packet() {
use crate::wire::testdata::icmp_redirect::IP_PACKET_BYTES;
let (body, src_ip, dst_ip, proto) = parse_ip_packet::<Ipv4>(IP_PACKET_BYTES).unwrap();
assert_eq!(body, &IP_PACKET_BYTES[20..]);
assert_eq!(src_ip, Ipv4Addr::new([10, 123, 0, 2]));
... | rust_cleaned_test_functions.jsonl/29510 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
10385,
21078,
368,
341,
286,
990,
17717,
486,
35531,
486,
92425,
486,
50774,
30043,
486,
3298,
40328,
40705,
280,
286,
1077,
320,
2599,
11,
2286,
10385,
11,
10648,
10385,
11,
18433,
8,
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_round_frac() {
let int_cases = vec![
(Some(23), Some(2), Some(23)),
(Some(23), Some(-1), Some(20)),
(Some(-27), Some(-1), Some(-30)),
(Some(-27), Some(-2), Some(0)),
(Some(-27), Some(-2), Some(0)),
(None, Some(-27), ... | rust_cleaned_test_functions.jsonl/9509 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1764
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
70358,
368,
341,
286,
1077,
526,
41427,
284,
7486,
90515,
310,
320,
8373,
7,
17,
18,
701,
4329,
7,
17,
701,
4329,
7,
17,
18,
6965,
310,
320,
8373,
7,
17,
18,
701,
4329,
4080,
16,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_changepeer_v2_to_confchange() {
let mut req = ChangePeerV2Request::default();
// Zore change for leave joint
assert_eq!(
(&req).to_confchange(vec![]).get_transition(),
eraftpb::ConfChangeTransition::Auto
);
// One change for simpl... | rust_cleaned_test_functions.jsonl/14628 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 461
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15947,
16537,
2273,
17,
2346,
16059,
3373,
368,
341,
286,
1077,
5206,
4232,
284,
10388,
30888,
53,
17,
1900,
486,
2258,
1428,
286,
442,
1863,
460,
2297,
369,
5274,
10284,
198,
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_normalized_lower_lay_string() {
let s = "Comunicações"; // assert_eq!(s.chars().count(), 14);
let s = normalized_lower_lay_string(s);
assert_eq!(s.chars().count(), 12);
assert_eq!(s, "comunicacoes");
} | rust_cleaned_test_functions.jsonl/34886 | {
"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,
80006,
30425,
907,
352,
3904,
368,
341,
286,
1077,
274,
284,
330,
1092,
359,
3001,
15249,
5123,
442,
981,
2060,
10714,
10297,
82,
85062,
1005,
1830,
1507,
220,
16,
19,
317,
286,
1077,
274,
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_from_str() {
let owned: Option<::std::string::String> = from_str("string");
assert_eq!(owned.as_ref().map(|s| s.as_slice()), Some("string"));
} | rust_cleaned_test_functions.jsonl/42 | {
"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,
5673,
2895,
368,
341,
414,
1077,
12938,
25,
6959,
87398,
1834,
486,
917,
486,
703,
29,
284,
504,
2895,
445,
917,
797,
414,
2060,
10714,
10297,
18332,
5357,
7793,
1005,
2186,
22428,
82,
91,
274,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_txn_heart_beat() {
let (_cluster, client, ctx) = must_new_cluster_and_kv_client();
let mut req = TxnHeartBeatRequest::default();
let k = b"k".to_vec();
let start_ts = 10;
req.set_context(ctx);
req.set_primary_lock(k.clone());
req.set_start_version(start_ts);
req.s... | rust_cleaned_test_functions.jsonl/61704 | {
"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,
92299,
62,
17735,
21263,
266,
368,
341,
262,
1077,
5453,
18855,
11,
2943,
11,
5635,
8,
284,
1969,
5921,
28441,
8378,
97066,
8179,
543,
262,
1077,
5206,
4232,
284,
39850,
77,
45384,
43658,
1900,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eth_transfer_success() {
// set up Aurora runner and accounts
let (mut runner, mut source_account, dest_address) = initialize_transfer();
let source_address = test_utils::address_from_secret_key(&source_account.secret_key);
// validate pre-state
test_utils::validate_address_... | rust_cleaned_test_functions.jsonl/131044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 475
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57757,
35403,
18632,
368,
341,
262,
442,
738,
705,
46792,
22259,
323,
9618,
198,
262,
1077,
320,
6984,
22259,
11,
5206,
2530,
13500,
11,
3201,
6744,
8,
284,
9468,
35403,
543,
262,
1077,
2530,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_find_conflict() {
let l = default_logger();
let previous_ents = vec![new_entry(1, 1), new_entry(2, 2), new_entry(3, 3)];
let tests = vec![
(vec![], 0),
(vec![], 0),
// no conflict
(vec![new_entry(1, 1), new_entr... | rust_cleaned_test_functions.jsonl/48405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
16059,
21242,
368,
341,
286,
1077,
326,
284,
1638,
27413,
543,
286,
1077,
3681,
62,
805,
284,
7486,
20703,
931,
9078,
7,
16,
11,
220,
16,
701,
501,
9078,
7,
17,
11,
220,
17,
701,
501,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vote_rountrip_with_sig() {
let dt = "2017-12-25T03:00:01.234Z".parse::<DateTime<Utc>>().unwrap();
let vote = Vote {
validator_address: AccountId::try_from(vec![
0xa3, 0xb2, 0xcc, 0xdd, 0x71, 0x86, 0xf1, 0x68, 0x5f, 0x21, 0xf2, 0x48, 0x2a, 0xf4,
... | rust_cleaned_test_functions.jsonl/113701 | {
"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,
54360,
62,
581,
77,
32981,
6615,
29252,
368,
341,
286,
1077,
7594,
284,
330,
17,
15,
16,
22,
12,
16,
17,
12,
17,
20,
51,
15,
18,
25,
15,
15,
25,
15,
16,
13,
17,
18,
19,
57,
3263,
6400,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timestamp_diff_serialize_bytes() {
let tmsp_diff_a = TimestampDiff::default();
let res = tmsp_diff_a.to_bytes();
assert!(res.is_ok());
let tmsp_diff_a_bytes = res.unwrap();
let res = TimestampDiff::from_bytes(&tmsp_diff_a_bytes);
assert!(res.is_ok());
let tmsp_diff_... | rust_cleaned_test_functions.jsonl/32124 | {
"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,
23073,
15850,
88686,
12524,
368,
341,
262,
1077,
259,
92545,
15850,
4306,
284,
32758,
21751,
486,
2258,
543,
262,
1077,
592,
284,
259,
92545,
15850,
4306,
2389,
12524,
543,
262,
2060,
10297,
416,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_facets_by_active_substance() {
let active_substances = vec![
"LOSARTAN POTASSIUM".to_string(),
"HYDROCHLOROTHIAZIDE".to_string(),
"L-TEST".to_string(),
];
let products = vec![
"LOSARTAN POTASSIUM / HYDROCHLOROTHIAZIDE... | rust_cleaned_test_functions.jsonl/6363 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
41589,
1415,
3710,
12930,
5228,
1309,
368,
341,
286,
1077,
4541,
5228,
9436,
284,
7486,
90515,
310,
330,
37558,
2992,
1093,
61502,
4939,
40,
2794,
3263,
983,
3904,
3148,
310,
330,
48852,
35,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tcp_stream() {
let (server_started_signal_tx, server_started_signal_rx) = mpsc::channel();
thread::spawn(move || {
let l = TcpListener::bind("127.0.0.1:8080").unwrap();
server_started_signal_tx.send(()).unwrap();
if let Some(Ok(mut stream)) = l... | rust_cleaned_test_functions.jsonl/103496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 757
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45562,
12673,
368,
341,
286,
1077,
320,
4030,
55679,
21137,
17805,
11,
3538,
55679,
21137,
24330,
8,
284,
296,
81984,
486,
10119,
543,
286,
4516,
486,
46087,
34081,
1369,
341,
310,
1077,
326,
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... | 6 |
#[test]
fn test_select_expensive_books() -> Result<()> {
let sql = SqlBuilder::select_from("books")
.field("title")
.field("price")
.and_where("price > 100")
.sql()?;
assert_eq!(&sql, "SELECT title, price FROM books WHERE price > 100;");
... | rust_cleaned_test_functions.jsonl/12589 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13051,
14214,
4025,
73084,
368,
1464,
5714,
71698,
341,
286,
1077,
5704,
284,
7224,
3297,
486,
1742,
5673,
445,
12110,
1138,
310,
659,
2566,
445,
2102,
1138,
310,
659,
2566,
445,
6555,
1138,
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... | 4 |
#[test]
fn test_specs() {
let global_config = resolve_global_config(HashMap::new()).config;
run_specs(
&PathBuf::from("./tests/specs"),
&ParseSpecOptions { default_file_name: "file.ts" },
&RunSpecsOptions { fix_failures: false, format_twice: true },
move |file_name,... | rust_cleaned_test_functions.jsonl/64632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71200,
368,
341,
1066,
262,
1077,
3644,
5332,
284,
8830,
19296,
5332,
7,
18497,
486,
931,
6011,
1676,
401,
262,
1598,
71200,
1006,
286,
609,
1820,
15064,
486,
1499,
13988,
23841,
45389,
82,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_food_left() {
let mut supplies = Supplies::new();
supplies.buy_food(200).unwrap();
assert_eq!(200, supplies.food_left());
} | rust_cleaned_test_functions.jsonl/28651 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 84
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23723,
7202,
58580,
9579,
368,
341,
286,
1077,
5206,
16720,
284,
50252,
486,
931,
543,
286,
16720,
63871,
58580,
7,
17,
15,
15,
568,
15454,
543,
286,
2060,
10714,
10297,
17,
15,
15,
11,
16720,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_persist_error() {
let nodes = create_nodes(2, "test_persist_error".to_string());
open_channel!(nodes[0], nodes[1], 100000);
let persister = |_: &_| Err(std::io::Error::new(std::io::ErrorKind::Other, "test"));
let event_handler = |_: &_| {};
let bg_processor = BackgroundProcessor::s... | rust_cleaned_test_functions.jsonl/26265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
4096,
368,
341,
2394,
197,
10217,
7798,
284,
1855,
14896,
7,
17,
11,
330,
1944,
620,
4975,
4096,
3263,
983,
3904,
1423,
197,
52199,
14571,
10297,
20008,
58,
15,
1125,
7798,
58,
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... | 2 |
#[test]
fn test_flag_capacity() {
let mut f1 = FlagVec::with_capacity(10);
assert_eq!(f1.capacity(), 16);
let mut f2 = f1.clone();
assert_eq!(f2.capacity(), 16);
f2 = f1.shrunk();
f1.shrink();
assert_eq!(f1.capacity(), 0);
assert_eq!(f1, f2);
... | rust_cleaned_test_functions.jsonl/24803 | {
"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,
10933,
35603,
368,
341,
286,
1077,
5206,
282,
16,
284,
22666,
10050,
486,
4197,
35603,
7,
16,
15,
317,
286,
2060,
10714,
10297,
69,
16,
59168,
1507,
220,
16,
21,
317,
286,
1077,
5206,
282,
17,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_persist_transaction_status() {
solana_logger::setup();
let GenesisConfigInfo {
mut genesis_config,
mint_keypair,
..
} = create_slow_genesis_config(solana_sdk::native_token::sol_to_lamports(1000.0));
genesis_config.rent.lam... | rust_cleaned_test_functions.jsonl/15494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
620,
4975,
28884,
4773,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
40788,
2648,
1731,
341,
310,
5206,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
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_combine_child_keys_empty_base() {
let kids = Children::Keys(RefCell::new(vec!["baz".to_string(), "qux".to_string(), "plugh".to_string(),
"thud".to_string()]));
assert_eq!(vec!["baz".to_string(), "qux".to_string(), "plugh".to_string(),
"thud".to_string()], kids.combine_child_k... | rust_cleaned_test_functions.jsonl/86193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 152
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72374,
17268,
12631,
15124,
7651,
368,
341,
262,
1077,
6837,
284,
15044,
486,
8850,
7,
3945,
3599,
486,
931,
25592,
0,
1183,
42573,
3263,
983,
3904,
1507,
330,
446,
87,
3263,
983,
3904,
1507,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_utctime() {
assert_parses::<UtcTime>(&[
(
Ok(UtcTime::new(
FixedOffset::west(7 * 60 * 60)
.ymd(1991, 5, 6)
.and_hms(16, 45, 40)
.into(),
)
... | rust_cleaned_test_functions.jsonl/40834 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
60363,
33600,
368,
341,
286,
2060,
77113,
288,
27638,
97768,
1462,
44784,
9640,
310,
2399,
394,
7622,
12317,
10413,
1462,
486,
931,
1006,
503,
20149,
6446,
486,
11039,
7,
22,
353,
220,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_datetime_check() {
let gil = Python::acquire_gil();
let py = gil.python();
let (obj, sub_obj, sub_sub_obj) =
_get_subclasses(&py, "datetime", "2018, 1, 1, 13, 30, 15").unwrap();
assert_check_only!(PyDate_Check, obj);
assert_check_exact!(PyDateTime_Check, obj);
as... | rust_cleaned_test_functions.jsonl/113013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 186
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
7200,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
543,
262,
1077,
320,
2295,
11,
1186,
7328,
11,
1186,
5228,
7328,
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_target_connection_state_will_not_drop_rcs_on_mdns_events() {
let t = Target::new_named("hello-kitty");
let rcs_state =
TargetConnectionState::Rcs(RcsConnection::new(&mut NodeId { id: 1234 }).unwrap());
t.set_state(rcs_state.clone());
// this ... | rust_cleaned_test_functions.jsonl/115223 | {
"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,
11123,
15866,
4387,
1670,
483,
7913,
29584,
30299,
82,
4470,
32994,
4412,
19691,
368,
341,
286,
1077,
259,
284,
13483,
486,
931,
71834,
445,
14990,
12646,
22814,
797,
286,
1077,
435,
4837,
4387,
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... | 1 |
#[test]
fn test_bitv_iterator() {
let bools = [true, false, true, true];
let bitv = from_bools(bools);
for (act, &ex) in bitv.iter().zip(bools.iter()) {
assert_eq!(ex, act);
}
} | rust_cleaned_test_functions.jsonl/12148 | {
"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,
13996,
85,
13491,
368,
341,
286,
1077,
1807,
82,
284,
508,
1866,
11,
895,
11,
830,
11,
830,
935,
286,
1077,
2699,
85,
284,
504,
22159,
82,
9764,
82,
626,
286,
369,
320,
531,
11,
609,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_vectors() {
let context = Context::create();
let builder = context.create_builder();
let module = context.create_module("my_mod");
let i32_type = context.i32_type();
let i32_zero = i32_type.const_int(0, false);
let i32_seven = i32_type.const_int(7, false);
let vec_typ... | rust_cleaned_test_functions.jsonl/122317 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49158,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
7363,
284,
2266,
2520,
28532,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
2408,
7480,
797,
262,
1077,
600,
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_sample_boundaries() {
let mut r = crate::test::rng(404);
assert_eq!(sample_inplace(&mut r, 0, 0).len(), 0);
assert_eq!(sample_inplace(&mut r, 1, 0).len(), 0);
assert_eq!(sample_inplace(&mut r, 1, 1).into_vec(), vec![0]);
assert_eq!(sample_rejection(&mut ... | rust_cleaned_test_functions.jsonl/11279 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17491,
19447,
5431,
368,
341,
286,
1077,
5206,
435,
284,
17717,
486,
1944,
486,
69890,
7,
19,
15,
19,
626,
286,
2060,
10714,
10297,
13611,
1243,
2007,
2099,
6984,
435,
11,
220,
15,
11,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_from_str() {
let desered = from_str(DOC).expect("Couldn't deserialize Data");
assert_eq!(
desered,
Data {
base: "https://example.com".into(),
client_id: "adbc01234".into(),
client_secret: "0987dcba".into(),
... | rust_cleaned_test_functions.jsonl/39217 | {
"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,
5673,
2895,
368,
341,
286,
1077,
939,
12336,
284,
504,
2895,
5432,
7612,
568,
17119,
445,
38987,
944,
35240,
2885,
797,
286,
2060,
10714,
33673,
310,
939,
12336,
345,
310,
2885,
341,
394,
2331,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expect_at_most_with_few_requests() {
let mock = mock("GET", "/hello").expect_at_most(3).create();
request("GET /hello", "");
request("GET /hello", "");
mock.assert();
} | rust_cleaned_test_functions.jsonl/82434 | {
"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,
68918,
3752,
81416,
6615,
761,
365,
37216,
368,
341,
262,
1077,
7860,
284,
7860,
445,
3806,
497,
3521,
14990,
1827,
17119,
3752,
81416,
7,
18,
568,
3182,
1428,
262,
1681,
445,
3806,
608,
14990,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_folder() {
let items = string_vec_to_status(&[
"a/file.txt",
]);
let res = FileTreeItems::new(&items, &BTreeSet::new())
.unwrap()
.items
.iter()
.map(|i| i.info.full_path.clone())
.collect::<Vec<_>>... | rust_cleaned_test_functions.jsonl/56871 | {
"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,
15268,
368,
341,
286,
1077,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
310,
330,
64,
23903,
3909,
497,
715,
286,
22712,
286,
1077,
592,
284,
2887,
6533,
4353,
486,
931,
2099,
3615,
11,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_f_layout() {
let shape = (2, 2).f();
let arr = Array::<i32, Ix2>::from_shape_vec(shape, vec![1, 2, 3, 4]).unwrap();
assert!(!arr.is_standard_layout());
test_as_standard_layout_for(arr);
} | rust_cleaned_test_functions.jsonl/92645 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
14466,
368,
341,
286,
1077,
6083,
284,
320,
17,
11,
220,
17,
568,
69,
543,
286,
1077,
2890,
284,
2910,
27638,
72,
18,
17,
11,
358,
87,
17,
6831,
1499,
13597,
13251,
25933,
11,
7486,
207... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_response() {
let response = Response::new();
assert_eq!(response.status, StatusCode::Ok);
assert_eq!(response.headers, Headers::new());
assert!(response.body.is_none());
} | rust_cleaned_test_functions.jsonl/4154 | {
"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,
8657,
9655,
368,
341,
286,
1077,
2033,
284,
5949,
486,
931,
1428,
286,
2060,
10714,
10297,
2322,
4299,
11,
53403,
486,
11578,
317,
286,
2060,
10714,
10297,
2322,
18022,
11,
21426,
486,
931,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_easy_full_freecells() {
let game_state = GameState::from_file("test-inputs/easy-full-freecells.txt").unwrap();
let actual = game_state.legal_moves();
let expected = vec![
(
GameState::from_file("test-inputs/move-results/easy-full-freecells/6h-from-freecell3-to-cas... | rust_cleaned_test_functions.jsonl/112993 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59091,
16372,
74179,
757,
6436,
368,
341,
262,
1077,
1809,
4387,
284,
47987,
486,
1499,
2458,
445,
1944,
13933,
82,
16546,
6405,
23642,
2220,
265,
757,
6436,
3909,
1827,
15454,
543,
262,
1077,
504... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_island() {
let flags = settings::Flags::new(settings::builder());
let mut buf = MachBuffer::new();
let mut state = Default::default();
buf.reserve_labels_for_blocks(4);
buf.bind_label(label(0));
let inst = Inst::CondBr {
kind: CondBrK... | rust_cleaned_test_functions.jsonl/16775 | {
"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,
6892,
1933,
368,
341,
286,
1077,
8042,
284,
5003,
486,
9195,
486,
931,
23369,
486,
17850,
1423,
286,
1077,
5206,
6607,
284,
18294,
4095,
486,
931,
543,
286,
1077,
5206,
1584,
284,
7899,
486,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_serde_bincode() {
// Bincode is relevant to test separately from JSON because
// it is not self-describing.
use bincode::{deserialize, serialize};
let d = NaiveDate::from_ymd(2014, 7, 24);
let encoded = serialize(&d).unwrap();
let decoded: NaiveDa... | rust_cleaned_test_functions.jsonl/29539 | {
"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,
75861,
450,
21816,
1851,
368,
341,
286,
442,
29344,
1851,
374,
9760,
311,
1273,
25156,
504,
4718,
1576,
198,
286,
442,
432,
374,
537,
656,
24506,
43531,
624,
286,
990,
9544,
1851,
22964,
66777,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_valid_block_invalid_blockhash_for_master() {
let block = Some(Block::new(hex::decode(BLOCK).unwrap()));
let state = Master::for_test().candidate_block(block.clone()).build();
let blockhash = SHA256Hash::from_slice(&hex::decode(INVALID_HASH).unwrap()[..]).unwrap();
... | rust_cleaned_test_functions.jsonl/75390 | {
"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,
8337,
7113,
31433,
7113,
8296,
5478,
24582,
368,
341,
286,
1077,
2504,
284,
4329,
55243,
486,
931,
44660,
486,
18196,
5349,
8044,
568,
15454,
7392,
286,
1077,
1584,
284,
10824,
486,
1958,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pvc() {
let pn: [u32; 22] = [
2, 3, 4, 6, 8, 9, 11, 12, 16, 18, 22, 24, 32, 36, 44, 48, 64, 72, 88, 96, 144, 176,
];
let pk_max: [u32; 22] = [
128, 128, 128, 88, 36, 26, 18, 16, 12, 11, 9, 9, 7, 7, 6, 6, 5, 5, 5, 5, 4, 4,
];
pn.it... | rust_cleaned_test_functions.jsonl/102498 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 909
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
7362,
368,
341,
286,
1077,
43050,
25,
508,
84,
18,
17,
26,
220,
17,
17,
60,
284,
2278,
310,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
21,
11,
220,
23,
11,
220,
24,
11,
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... | 4 |
#[test]
fn test_entry_take_doesnt_corrupt() {
#![allow(deprecated)] //rand
// Test for #19292
fn check(m: &HashMap<i32, ()>) {
for k in m.keys() {
assert!(m.contains_key(k), "{} is in keys() but not in the map?", k);
}
... | rust_cleaned_test_functions.jsonl/8526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9078,
73261,
96374,
406,
14734,
6585,
368,
341,
286,
671,
20703,
7183,
12797,
19889,
7252,
442,
11335,
198,
4597,
442,
3393,
369,
671,
16,
24,
17,
24,
17,
198,
286,
5168,
1779,
1255,
25,
609,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_disable_escapes() {
let input_str = "\\a \\\\ \\b \\r \\e \\f \\x41 \\n a\\cb \\u0100 \\t \\v";
new_ucmd!()
.arg("-E")
.arg(input_str)
.succeeds()
.stdout_only(format!("{}\n", input_str));
} | rust_cleaned_test_functions.jsonl/34823 | {
"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,
33842,
92196,
9337,
368,
341,
262,
1077,
1946,
2895,
284,
26468,
64,
1124,
81351,
24984,
65,
24984,
81,
24984,
68,
24984,
69,
24984,
87,
19,
16,
24984,
77,
264,
3422,
7221,
24984,
84,
15,
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_uploads() {
use std::fs;
let dir = tempfile::Builder::new()
.prefix("docs.rs-upload-test")
.tempdir()
.unwrap();
let files = ["Cargo.toml", "src/main.rs"];
for &file in &files {
let path = dir.path().join(file);
... | rust_cleaned_test_functions.jsonl/70549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
19374,
368,
341,
286,
990,
1460,
486,
3848,
280,
286,
1077,
5419,
284,
54819,
486,
3297,
486,
931,
741,
310,
659,
11849,
445,
14120,
25638,
47169,
16839,
1138,
310,
659,
3888,
3741,
741,
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... | 4 |
#[test]
fn test_operator() {
assert_eq!(apply(node, "node", ">"), build_token(b::op(">")));
// assert_leaf! {
// parsers [ operator ]
// assert_leaf! {
// parsers [ operator ]
// assert_leaf! {
// parsers ... | rust_cleaned_test_functions.jsonl/46718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40594,
368,
341,
286,
2060,
10714,
10297,
10280,
6958,
11,
330,
3509,
497,
28957,
3975,
1936,
6458,
1883,
486,
453,
63853,
74385,
286,
442,
2060,
38909,
0,
341,
286,
442,
257,
87073,
508,
5675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_euclidean_matrix_slice_metric() {
let m = matrix![
1.0, 1.0, 1.0;
1.0, 1.0, 1.0;
1.0, 1.0, 1.0
];
let m2 = matrix![
0.0, 0.0, 0.0;
0.0, 0.0, 0.0;
0.0, 0.0, 0.0
];
let m_slice = Matri... | rust_cleaned_test_functions.jsonl/6899 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
84,
50078,
10193,
26488,
41294,
368,
341,
286,
1077,
296,
284,
6172,
90515,
310,
220,
16,
13,
15,
11,
220,
16,
13,
15,
11,
220,
16,
13,
15,
280,
310,
220,
16,
13,
15,
11,
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_valset_sort() {
let correct: [GravitySignature; 8] = [
GravitySignature {
power: 685294939,
eth_address: "0x479FFc856Cdfa0f5D1AE6Fa61915b01351A7773D"
.parse()
.unwrap(),
v: 0u64.into(),
... | rust_cleaned_test_functions.jsonl/31197 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1929
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6189,
746,
18435,
368,
341,
286,
1077,
4396,
25,
508,
38409,
25088,
26,
220,
23,
60,
284,
2278,
310,
47490,
25088,
341,
394,
2355,
25,
220,
21,
23,
20,
17,
24,
19,
24,
18,
24,
345,
394,
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... | 1 |
#[test]
fn test_as_lsp_range() {
let fixture = deno_lint::diagnostic::Range {
start: deno_lint::diagnostic::Position {
line_index: 0,
column_index: 2,
byte_pos: 23,
},
end: deno_lint::diagnostic::Position {
line_index: 1,
column_index: 0,
byt... | rust_cleaned_test_functions.jsonl/3520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11898,
907,
2154,
9698,
368,
341,
262,
1077,
12507,
284,
3371,
78,
907,
396,
486,
8579,
11953,
486,
6046,
341,
414,
1191,
25,
3371,
78,
907,
396,
486,
8579,
11953,
486,
3812,
341,
286,
1555,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_plus_real() {
let test_cases = vec![
(
Real::new(1.01001).ok(),
Real::new(-0.01).ok(),
Real::new(1.00001).ok(),
false,
),
(Real::new(1e308).ok(), Real::new(1e308).ok(), None, true),
... | rust_cleaned_test_functions.jsonl/5281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28043,
15266,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
2399,
394,
8800,
486,
931,
7,
16,
13,
15,
16,
15,
15,
16,
568,
562,
3148,
394,
8800,
486,
931,
4080,
15,
13,
15,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.