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_vec3mask_any() {
assert_eq!(Vec3Mask::new(false, false, false).any(), false);
assert_eq!(Vec3Mask::new(true, false, false).any(), true);
assert_eq!(Vec3Mask::new(false, true, false).any(), true);
assert_eq!(Vec3Mask::new(false, false, true).any(), true);
} | rust_cleaned_test_functions.jsonl/48595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
11258,
37248,
368,
341,
262,
2060,
10714,
10297,
10050,
18,
12686,
486,
931,
3576,
11,
895,
11,
895,
568,
3767,
1507,
895,
317,
262,
2060,
10714,
10297,
10050,
18,
12686,
486,
931,
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... | 1 |
#[test]
fn test_find_all_at_start() {
let text = b"dhjalkjwqnnnannanaflkjdklfj";
let pattern = b"dhjalk";
let bndm = BNDM::new(pattern);
assert_eq!(bndm.find_all(text).collect_vec(), [0]);
} | rust_cleaned_test_functions.jsonl/37845 | {
"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,
21814,
5705,
3752,
4906,
368,
341,
286,
1077,
1467,
284,
293,
1,
30621,
73,
1692,
73,
86,
80,
7370,
77,
1020,
3362,
1489,
74,
88851,
11008,
73,
876,
286,
1077,
5383,
284,
293,
1,
30621,
73,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_slices() {
let mut ring: RingBuf<int> = RingBuf::with_capacity(127);
let cap = ring.capacity() as int;
let first = cap/2;
let last = cap - first;
for i in range(0, first) {
ring.push_back(i);
let (left, right) = ring.as_slices(... | rust_cleaned_test_functions.jsonl/39516 | {
"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,
11898,
87288,
368,
341,
286,
1077,
5206,
10058,
25,
21525,
15064,
4159,
29,
284,
21525,
15064,
486,
4197,
35603,
7,
16,
17,
22,
317,
286,
1077,
2062,
284,
10058,
59168,
368,
438,
526,
280,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_vcx_credential_create_with_offer_success() {
settings::set_defaults();
settings::set_config_value(settings::CONFIG_ENABLE_TEST_MODE,"true");
let cb = return_types_u32::Return_U32_U32::new().unwrap();
assert_eq!(vcx_credential_create_with_offer(cb.command_handle,
... | rust_cleaned_test_functions.jsonl/58632 | {
"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,
2273,
25844,
666,
30320,
8657,
6615,
67814,
18632,
368,
341,
286,
5003,
486,
746,
42290,
543,
286,
5003,
486,
746,
5332,
3142,
23369,
486,
24652,
14379,
11641,
8414,
1335,
1866,
797,
286,
1077,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scanning() {
let ctx = TestContext::new();
let mut con = ctx.connection();
let mut unseen = HashSet::new();
for x in 0..1000 {
redis::cmd("SADD").arg("foo").arg(x).execute(&mut con);
unseen.insert(x);
}
let iter = redis::cmd("SSCAN")
.arg("foo")
... | rust_cleaned_test_functions.jsonl/108949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
5947,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
5206,
390,
284,
5635,
20310,
543,
262,
1077,
5206,
63133,
284,
18931,
486,
931,
1428,
262,
369,
856,
304,
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... | 3 |
#[test]
fn test_is_locked_out_last_vote_expired() {
let mut locktower = Locktower::new(EpochStakes::new_for_tests(2), 0, 0.67);
let descendants = vec![(0, vec![1, 4].into_iter().collect()), (1, HashSet::new())]
.into_iter()
.collect();
locktower.record_vote(0);
... | rust_cleaned_test_functions.jsonl/25570 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 334
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
60271,
6068,
12195,
54360,
80221,
368,
341,
286,
1077,
5206,
5296,
77578,
284,
15701,
77578,
486,
931,
10722,
79,
4953,
623,
2050,
486,
931,
5478,
32509,
7,
17,
701,
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... | 1 |
#[test]
fn test_reader_small_input() {
let mut mgr = bookmark_manager();
let str = "a.b^c! #𤭢界んにち𤭢#𤭢";
let mut reader = Reader::new(str.as_bytes(), DecoderUTF8());
let mut result = String::from("");
while let Ok(char) = reader.next_char(&mut mgr) {
result.p... | rust_cleaned_test_functions.jsonl/17188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
31966,
5898,
368,
341,
286,
1077,
5206,
57897,
284,
35149,
12144,
543,
286,
1077,
607,
284,
330,
64,
948,
61,
66,
0,
671,
101877,
255,
95,
97120,
24791,
19655,
42414,
101877,
255,
95,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_single() {
let range = LineRange::from("40").expect("Shouldn't fail on test!");
assert_eq!(40, range.lower);
assert_eq!(40, range.upper);
} | rust_cleaned_test_functions.jsonl/35926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
19487,
368,
341,
262,
1077,
2088,
284,
7083,
6046,
486,
1499,
445,
19,
15,
1827,
17119,
445,
14996,
77,
944,
3690,
389,
1273,
11142,
262,
2060,
10714,
10297,
19,
15,
11,
2088,
18073,
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 |
#[test]
fn test_resume() {
let f = Resume::builder(0, Frame::FLAG_RESUME)
.set_last_received_server_position(123)
.set_first_available_client_position(22)
.set_token(Bytes::from("this is a token"))
.build();
try_codec(f);
} | rust_cleaned_test_functions.jsonl/41420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58132,
368,
341,
262,
1077,
282,
284,
33398,
486,
17850,
7,
15,
11,
16321,
486,
22542,
10983,
33893,
340,
286,
659,
746,
12195,
40783,
12015,
9661,
7,
16,
17,
18,
340,
286,
659,
746,
12978,
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_not_found_version() {
let config = FrumConfig {
base_dir: Some(tempdir().unwrap().path().to_path_buf()),
frum_path: Some(std::env::temp_dir().join(format!(
"frum_{}_{}",
std::process::id(),
chrono::Utc::now().timesta... | rust_cleaned_test_functions.jsonl/18006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 362
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
21480,
9438,
368,
341,
286,
1077,
2193,
284,
2869,
372,
2648,
341,
310,
2331,
4334,
25,
4329,
9758,
3741,
1005,
15454,
1005,
2343,
1005,
983,
2638,
10363,
14702,
310,
1422,
372,
2638,
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_coordinate_to_grid() {
let coord = Coordinate(100.0, 100.0);
let grid = coordinate_to_grid(coord);
assert!(grid.0 == GridDimension(3) && grid.1 == GridDimension(3));
} | rust_cleaned_test_functions.jsonl/81056 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68649,
2346,
15604,
368,
341,
286,
1077,
16489,
284,
41035,
7,
16,
15,
15,
13,
15,
11,
220,
16,
15,
15,
13,
15,
317,
286,
1077,
5827,
284,
16184,
2346,
15604,
65037,
317,
286,
2060,
10297,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_absolute_offset_am() {
let mut cpu = setup(0x00, true, 0x3D, Some(0x0210));
*cpu.regset_mut().y_index_mut() = 0xA;
cpu.writ_byte(0x0210 + 0xA, 0x10);
let result = absolute_y_am(&mut cpu);
assert_eq!(
result.ok(),
Some(Fetched {
... | rust_cleaned_test_functions.jsonl/26578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50874,
6917,
22880,
368,
341,
286,
1077,
5206,
17319,
284,
6505,
7,
15,
87,
15,
15,
11,
830,
11,
220,
15,
87,
18,
35,
11,
4329,
7,
15,
87,
15,
17,
16,
15,
1106,
286,
353,
16475,
7031,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_get_fee_calculator_for_blockhash() {
let rpc = RpcHandler::start();
let bank = rpc.working_bank();
let recent_blockhash = bank.confirmed_last_blockhash();
let RpcHandler { meta, io, .. } = rpc;
let lamports_per_signature = bank.get_lamports_per_signat... | rust_cleaned_test_functions.jsonl/6314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 953
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
34305,
24005,
20022,
5478,
7113,
8296,
368,
341,
286,
1077,
35596,
284,
79961,
3050,
486,
2468,
543,
286,
1077,
6073,
284,
35596,
18282,
287,
35733,
543,
286,
1077,
3213,
7113,
8296,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_timeout_cancel() {
System::run(|| {
let _addr = MyActor { op: Op::Cancel }.start();
actix_rt::spawn(async move {
delay_for(Duration::new(0, 1000)).await;
System::current().stop();
});
})
.unwrap();
} | rust_cleaned_test_functions.jsonl/94376 | {
"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,
2891,
20537,
28895,
368,
341,
262,
739,
486,
6108,
79453,
341,
286,
1077,
716,
6214,
284,
3017,
18870,
314,
1179,
25,
10672,
486,
9269,
16908,
2468,
1428,
286,
1160,
941,
40169,
486,
46087,
18285,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timed_faster() {
let spec = "output o1: Bool @20Hz := false\noutput o2: Bool @10Hz:= o1";
assert_eq!(0, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110700 | {
"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,
29087,
291,
761,
2300,
368,
341,
286,
1077,
1398,
284,
330,
3006,
297,
16,
25,
12608,
569,
17,
15,
11475,
1669,
895,
1699,
3006,
297,
17,
25,
12608,
569,
16,
15,
11475,
14209,
297,
16,
876,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_module_dunder_all() {
let gil = Python::acquire_gil();
let py = gil.python();
let module = pyo3::wrap_pymodule!(foobar_module)(py);
py_assert!(py, module, "module.__all__ == ['foobar']");
} | rust_cleaned_test_functions.jsonl/22687 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
814,
7995,
5705,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
543,
262,
1077,
4688,
284,
4510,
78,
18,
486,
10097,
62... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_palindrome() {
let mut list1 = LinkedList::<i32>::new();
list1.append(1);
list1.append(2);
list1.append(3);
list1.append(2);
list1.append(1);
assert_eq!(list1.is_palindrome(), true);
let mut list2 = LinkedList::<i32>::new();
... | rust_cleaned_test_functions.jsonl/73469 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
73310,
36058,
368,
341,
286,
1077,
5206,
1140,
16,
284,
22917,
27638,
72,
18,
17,
6831,
931,
543,
286,
1140,
16,
2057,
7,
16,
317,
286,
1140,
16,
2057,
7,
17,
317,
286,
1140,
16,
2057,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parameter_ref() -> Result<()> {
let file = VMWARE_SPEC;
let spec = &Spec::read_files(&[&file])?;
spec.resolve_parameter_ref(
&file,
Reference::parse("../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter").unwrap(),
... | rust_cleaned_test_functions.jsonl/45099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 146
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77291,
24899,
7793,
368,
1464,
5714,
71698,
341,
262,
1077,
1034,
284,
17792,
7663,
36436,
280,
262,
1077,
1398,
284,
609,
8327,
486,
878,
10931,
2099,
58,
5,
1192,
2467,
37445,
262,
1398,
14691,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_check_len() {
let bytes = [0u8];
// zero byte buffer
assert_eq!(Err(Error::Truncated),
Ipv6Option::new_unchecked(&bytes[..0]).check_len());
// pad1
assert_eq!(Ok(()),
Ipv6Option::new_unchecked(&IPV6OPTION_BYTES_PAD1).c... | rust_cleaned_test_functions.jsonl/130718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
6043,
368,
341,
286,
1077,
5820,
284,
508,
15,
84,
23,
935,
286,
442,
7168,
4922,
4147,
198,
286,
2060,
10714,
10297,
7747,
37396,
486,
1282,
38007,
1326,
4293,
358,
30168,
21,
5341,
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_parse_err() {
// the length byte is too short
let bytes = [2, 1];
assert_eq!(
Options::<_, DummyOptionImpl>::parse(&bytes[..]).unwrap_err(),
OptionParseErr::Internal
);
// explicitly testing... | rust_cleaned_test_functions.jsonl/15736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9266,
368,
341,
310,
442,
279,
3084,
4922,
374,
2238,
2805,
198,
310,
1077,
5820,
284,
508,
17,
11,
220,
16,
935,
310,
2060,
10714,
33673,
394,
14566,
27638,
6878,
50567,
5341,
9673,
6831... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slicebox_serialize() {
let slice = [1u32, 2, 3, 4, 5];
let serialized = serialize(&Cow::Borrowed(&slice[..])).unwrap();
println!("{:?}", serialized);
let deserialized: Cow<'static, Vec<u32>> = deserialize_from(&mut &serialized[..]).unwrap();
{
let sb: &[u32] = &deseri... | rust_cleaned_test_functions.jsonl/6272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
2011,
88686,
368,
341,
262,
1077,
15983,
284,
508,
16,
84,
18,
17,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
1077,
32916,
284,
24235,
2099,
89915,
486,
33,
7768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_chain_size_hint() {
struct Iter {
is_empty: bool,
}
impl Iterator for Iter {
type Item = ();
fn next(&mut self) -> Option<Self::Item> {
if self.is_empty {
self.is_empty = false;
None
}... | rust_cleaned_test_functions.jsonl/70136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
30583,
2368,
45825,
368,
341,
262,
2036,
13704,
341,
286,
374,
15124,
25,
1807,
345,
262,
555,
262,
11605,
23023,
369,
13704,
341,
286,
943,
5739,
284,
25162,
1789,
286,
5168,
1790,
2099,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_used_in_match_expr() {
check_assist(
inline_local_varialbe,
"
fn foo() {
let a<|> = 1 > 0;
match a {}
}",
"
fn foo() {
<|>match 1 > 0 {}
}",
);
} | rust_cleaned_test_functions.jsonl/128657 | {
"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,
27803,
1243,
10708,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
4612,
530,
1371,
345,
310,
6228,
8822,
15229,
368,
341,
262,
1077,
264,
27,
91,
29,
284,
220,
16,
861,
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_call_hierarchy_in_same_fn() {
check_hierarchy(
r#"
//- /lib.rs
fn callee() {}
fn caller() {
call$0ee();
callee();
}
"#,
expect![["callee Function FileId(0) 0..14 3..9"]],
expect![["caller Function FileId(0) 15..58 18..24 : [33..39, 47..53]"]],
... | rust_cleaned_test_functions.jsonl/38286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
95043,
1243,
33574,
15246,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
61463,
608,
2740,
25638,
198,
8822,
94800,
368,
5613,
8822,
19865,
368,
341,
262,
1618,
3,
15,
2127,
543,
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_jubjub_bn256() {
let params = JubjubBn256::new();
tests::test_suite::<Bn256>(¶ms);
} | rust_cleaned_test_functions.jsonl/112609 | {
"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,
5374,
392,
73,
392,
58112,
17,
20,
21,
368,
341,
262,
1077,
3628,
284,
79280,
73,
392,
33,
77,
17,
20,
21,
486,
931,
543,
262,
7032,
486,
1944,
57239,
27638,
33,
77,
17,
20,
21,
44784,
351... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_doc_to_opstamp_mapping_complex() {
{
let doc_to_opstamp_mapping = DocToOpstampMapping::from(&[][..]);
assert_eq!(doc_to_opstamp_mapping.compute_doc_limit(0u64), 0);
assert_eq!(doc_to_opstamp_mapping.compute_doc_limit(2u64), 0);
}
{
... | rust_cleaned_test_functions.jsonl/51358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 756
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
2346,
10287,
49113,
26930,
41522,
368,
341,
286,
341,
310,
1077,
4629,
2346,
10287,
49113,
26930,
284,
21709,
1249,
7125,
49113,
6807,
486,
1499,
2099,
63449,
496,
2558,
310,
2060,
10714,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_lohit() {
run_test(
&TEST_DATA,
"harfbuzz/good-lohit.bn",
"bengali/Lohit-Bengali.ttf",
&[JOINER_GLYPH_INDEX],
23,
);
} | rust_cleaned_test_functions.jsonl/91149 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5560,
22492,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
26480,
22492,
60862,
756,
503,
330,
65,
826,
7956,
7434,
2267,
275,
7671,
826,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_update_return_weight_transition() {
let destinations = vec![1, 2, 3, 4, 4, 4, 5, 6, 100];
let mut transitions = (0..destinations.len())
.map(|_| 1.0)
.collect::<Vec<WeightT>>();
update_return_weight_transition(&mut transitions, &destinations, 6, 2,... | rust_cleaned_test_functions.jsonl/131099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
12511,
15876,
53593,
368,
341,
286,
1077,
33105,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
19,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
16,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_behavior_withdrawal_then_redelegate_with_less_than_minimum_stake_delegation() {
let rent = Rent::default();
let rent_exempt_reserve = rent.minimum_balance(std::mem::size_of::<StakeState>());
let stake_pubkey = Pubkey::new_unique();
let signers = HashSet::from([sta... | rust_cleaned_test_functions.jsonl/87044 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74540,
6615,
7633,
278,
68367,
1288,
28227,
6615,
50747,
51613,
84855,
1261,
726,
2259,
87566,
368,
341,
286,
1077,
8016,
284,
29737,
486,
2258,
543,
286,
1077,
8016,
95736,
89591,
284,
8016,
57790,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_connect_with_srtp_ctx() {
let listener = TcpListener::bind("127.0.0.1:0").unwrap();
let addr = listener.local_addr().unwrap();
let guard = thread::spawn(move || {
let stream = listener.accept().unwrap().0;
let mut ctx = SslContext::builder(SslMethod::dtls()).unwrap()... | rust_cleaned_test_functions.jsonl/40290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 910
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15720,
6615,
61248,
790,
15147,
368,
341,
262,
1077,
11446,
284,
64876,
2743,
486,
7666,
445,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
15,
1827,
15454,
543,
262,
1077,
10789,
284,
11446,
11033,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_consecutive_fns() {
let context = Context::create();
let module = context.create_module("fns");
let void_type = context.void_type();
let fn_type = void_type.fn_type(&[], false);
let function = module.add_function("fn", fn_type, None);
assert!(function.get_previous_func... | rust_cleaned_test_functions.jsonl/122302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
85780,
761,
4412,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
4688,
284,
2266,
2520,
10750,
445,
69,
4412,
3071,
262,
1077,
737,
1819,
284,
2266,
13,
1004,
1819,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_small_hamming_distance_in_the_middle_somewhere() {
assert_eq!(hamming::hamming_distance("GGACG", "GGTCG").unwrap(), 1);
} | rust_cleaned_test_functions.jsonl/90392 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31966,
1523,
309,
5311,
19464,
1243,
16068,
62580,
643,
316,
60652,
368,
341,
262,
2060,
10714,
10297,
5604,
5311,
486,
5604,
5311,
19464,
445,
22254,
1706,
38,
497,
330,
22254,
7749,
38,
1827,
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 |
#[test]
fn test_from_state() {
let schema = Schema::from_string("
| |
| @ |
| @@@ |
------------
");
let (field, mut block) = schema.to_state(rotation_system::new("srs").unwrap());
block.shi... | rust_cleaned_test_functions.jsonl/10061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
4387,
368,
341,
286,
1077,
10802,
284,
12539,
486,
1499,
3904,
70576,
394,
760,
688,
9248,
394,
760,
220,
569,
981,
9248,
394,
760,
569,
19191,
414,
9248,
394,
32558,
198,
310,
39887,
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_batch_commands() {
let mut cluster = new_server_cluster(0, 1);
cluster.run();
let leader = cluster.get_region(b"").get_peers()[0].clone();
let addr = cluster.sim.rl().get_addr(leader.get_store_id()).to_owned();
let env = Arc::new(Environment::new(1));
let channel = Chan... | rust_cleaned_test_functions.jsonl/78664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 632
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
44151,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
16,
317,
262,
10652,
7634,
1428,
262,
1077,
7653,
284,
10652,
670,
20627,
1883,
1,
1827,
455,
36367,
388,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_no_aggr_fn() {
let group_by_exp = || {
RpnExpressionBuilder::new_for_test()
.push_column_ref_for_test(0)
.build_for_test()
};
let exec_fast = |src_exec| {
Box::new(BatchFastHashAggregationExecutor::new_for_test(
... | rust_cleaned_test_functions.jsonl/15839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1568
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
20587,
901,
15246,
368,
341,
286,
1077,
1874,
3710,
14214,
284,
1369,
341,
310,
431,
19958,
9595,
3297,
486,
931,
5478,
4452,
741,
394,
659,
9077,
8744,
7793,
5478,
4452,
7,
15,
340,
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... | 3 |
#[test]
fn test_not_enough_arguments() {
let event = DhcpEvent::LeaseAdded {
event_timestamp: DateTime::<FixedOffset>::from(Local::now()),
lease_info: full_lease_info_v4(),
};
let mut result_command = Command::new(namib_dnsmasq_hook_exe());
let (mut args, ... | rust_cleaned_test_functions.jsonl/48444 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 472
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
6205,
1384,
43433,
368,
341,
286,
1077,
1538,
284,
43227,
4672,
1556,
486,
2304,
519,
19337,
341,
310,
1538,
23073,
25,
6520,
27638,
13520,
6446,
6831,
1499,
42718,
486,
3328,
14702,
310,
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_str() {
assert_eq!("A".parse(), Ok(Type::Char));
assert_eq!("i".parse(), Ok(Type::Int));
assert_eq!("f".parse(), Ok(Type::Float));
assert_eq!("Z".parse(), Ok(Type::String));
assert_eq!("H".parse(), Ok(Type::Hex));
assert_eq!("B".parse(), Ok(Ty... | rust_cleaned_test_functions.jsonl/546 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
341,
286,
2060,
10714,
17223,
32,
3263,
6400,
1507,
7622,
22498,
486,
4768,
1106,
286,
2060,
10714,
17223,
72,
3263,
6400,
1507,
7622,
22498,
486,
1072,
1106,
286,
2060,
10714,
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_e2e_reconfiguration() {
let (env, mut client_proxy_1) = setup_swarm_and_client_proxy(3, 1);
// retrieving the 0-th validator private key
let config_path = env.validator_swarm.config.config_files.get(0).unwrap();
let config = NodeConfig::load(&config_path).unwrap();
let operat... | rust_cleaned_test_functions.jsonl/79700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
17,
68,
1288,
21138,
368,
341,
262,
1077,
320,
3160,
11,
5206,
2943,
29712,
62,
16,
8,
284,
6505,
32581,
2178,
8378,
8179,
29712,
7,
18,
11,
220,
16,
317,
262,
442,
48224,
279,
220,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_each_node_config_file_dependency_ordering() -> Result<(), anyhow::Error> {
fn to_string(v: &serde_json::Value) -> String {
v.as_str().unwrap().to_string()
}
// Flattens the provided JSON value to extract all child strings. This is used to extract
// n... | rust_cleaned_test_functions.jsonl/70780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1703
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32046,
5084,
5332,
2458,
62387,
7869,
287,
368,
1464,
5714,
68843,
88964,
486,
1454,
29,
341,
286,
5168,
311,
3904,
3747,
25,
609,
47024,
9455,
486,
1130,
8,
1464,
923,
341,
310,
348,
5357,
2895... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_int_div_no_panic() {
assert_eq!(Int256::from(6) / Int256::from(2), Int256::from(3));
} | rust_cleaned_test_functions.jsonl/47750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 63
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
16237,
6536,
620,
31270,
368,
341,
286,
2060,
10714,
10297,
1072,
17,
20,
21,
486,
1499,
7,
21,
8,
608,
1333,
17,
20,
21,
486,
1499,
7,
17,
701,
1333,
17,
20,
21,
486,
1499,
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 |
#[test]
fn test_compaction_filter_basic() {
let engine = TestEngineBuilder::new().build().unwrap();
let raw_engine = engine.get_rocksdb();
let value = vec![b'v'; 512];
let mut gc_runner = TestGCRunner::new(0);
// GC can't delete keys after the given safe point.
m... | rust_cleaned_test_functions.jsonl/120953 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
1311,
8727,
34729,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
7112,
24823,
284,
4712,
670,
26608,
14553,
1999,
543,
286,
1077,
897,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_months() -> Result<()> {
assert_eq!(true, Months(0).even_freq(&Frequency::Monthly));
assert_eq!(true, Months(0).even_freq(&Frequency::Quarterly));
assert_eq!(true, Months(0).even_freq(&Frequency::Yearly));
assert_eq!(true, Months(1).even_freq(&Frequency::Monthly)... | rust_cleaned_test_functions.jsonl/50948 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 402
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88462,
368,
1464,
5714,
71698,
341,
286,
2060,
10714,
10297,
1866,
11,
51346,
7,
15,
568,
16788,
21790,
2099,
38614,
486,
72007,
1106,
286,
2060,
10714,
10297,
1866,
11,
51346,
7,
15,
568,
16788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_safe_checkout_updated_blob_with_untracked_tree() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let target = commit! {
foo < "updated foo contents"
};
rm!(repo: "foo");
mkdir!(repo: "foo");
touch!(repo: "foo/bar");
bit_check... | rust_cleaned_test_functions.jsonl/62968 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34067,
68186,
33492,
45908,
6615,
4907,
58381,
11663,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
2169,
284,
5266,
0,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ss58hash() {
let msg = b"hello, world!";
let hash = ss58hash(msg).as_bytes().to_vec();
assert_eq!("656facfcf4f90cce9ec9b65c9185ea75346507c67e25133f5809b442487468a674973f9167193e86bee0c706f6766f7edf638ed3e21ad12c2908ea62924af4d7", hex::encode(hash));
} | rust_cleaned_test_functions.jsonl/42281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41848,
20,
23,
8296,
368,
341,
286,
1077,
3750,
284,
293,
1,
14990,
11,
1879,
26782,
286,
1077,
5175,
284,
10870,
20,
23,
8296,
8119,
568,
300,
12524,
1005,
983,
13251,
1428,
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_constrain_intervals() {
let constraint: Box<dyn SinglePartConstraint> = Box::new(ConstrainIntervals(vec![
ChromaticInterval(8, Quality::Perfect),
ChromaticInterval(3, Quality::Major),
]));
assert!(!constraint.is_active(&vec![], 10));
//TODO... | rust_cleaned_test_functions.jsonl/74365 | {
"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,
3382,
77626,
90807,
368,
341,
286,
1077,
21568,
25,
8261,
92846,
11327,
5800,
17890,
29,
284,
8261,
486,
931,
7,
1109,
77626,
1072,
42198,
25592,
90515,
310,
34218,
774,
10256,
7,
23,
11,
17927,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aliased_class_template_instantiated_in_header() -> Result<()> {
// This aliased class template specialization is instantiated due to the code
// that is present in the header. We should not corrupt the AST by
// instantiating again.
let ir = ir_from_cc(
r#" #pragma clang ... | rust_cleaned_test_functions.jsonl/37175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
7956,
1475,
4790,
8693,
1243,
4706,
10029,
1243,
8757,
368,
1464,
5714,
71698,
341,
262,
442,
1096,
18991,
1475,
536,
3811,
65879,
374,
54586,
4152,
311,
279,
2038,
198,
262,
442,
429,
374,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_wrap_alignment() {
// so we should make sure it works.
let includes: [PathBuf; 0] = [];
let defines: [(String, String); 0] = [];
let (comp, _) = compile(
None,
&Path::new(""),
"
#version 450
struct Vec3W... | rust_cleaned_test_functions.jsonl/23744 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38550,
51006,
368,
341,
1789,
286,
442,
773,
582,
1265,
1281,
2704,
432,
4278,
624,
286,
1077,
5646,
25,
508,
1820,
15064,
26,
220,
15,
60,
284,
5907,
286,
1077,
18653,
25,
17826,
703,
11,
923... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_transaction_refers_to_message() {
let id = Value::String("5b532e2ec17ac84b4efa92703192368dd4ed8a2729f2be2b0ee4e0665368f7c0".to_owned());
let json = json!({});
assert!(!is_transaction_refers_to_message(&json, &id));
let json = json!({
"in_msg": "aaa",
"out_msgs... | rust_cleaned_test_functions.jsonl/90618 | {
"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,
6892,
28884,
7793,
388,
2346,
6462,
368,
341,
262,
1077,
877,
284,
5162,
486,
703,
445,
20,
65,
20,
18,
17,
68,
17,
757,
16,
22,
580,
23,
19,
65,
19,
75631,
24,
17,
22,
15,
18,
16,
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_serde_deserialize() {
super::test_decodable_json(|input| self::serde_json::from_str(&input), |input| self::serde_json::from_str(&input),
|input| self::serde_json::from_str(&input));
} | rust_cleaned_test_functions.jsonl/17714 | {
"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,
75861,
450,
15768,
9050,
368,
341,
286,
2256,
486,
1944,
13783,
69129,
9455,
22428,
1355,
91,
656,
486,
47024,
9455,
486,
1499,
2895,
2099,
1355,
701,
760,
1355,
91,
656,
486,
47024,
9455,
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 |
#[test]
fn test_bootstrap_empty_storage_with_second_block_with_first_predecessor_should_fail_unknown_predecessor_context(
) {
init_test_runtime();
// init empty context for test
let (chain_id, ..) = init_test_protocol_context(
"bootstrap_test_storage_02",
test_data_protocol_v1::tezo... | rust_cleaned_test_functions.jsonl/8659 | {
"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,
88424,
15124,
23310,
6615,
29644,
7113,
6615,
12978,
10442,
26911,
269,
43378,
22121,
57507,
10442,
26911,
269,
8467,
1006,
8,
341,
262,
2930,
4452,
33232,
1428,
262,
442,
2930,
4287,
2266,
369,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_strb() {
assert_eq!(
decode_16(0x7008),
Instruction::STRB_imm {
params: Reg2FullParams {
rt: Reg::R0,
rn: Reg::R1,
imm32: 0,
index: true,
add: true,
wback: ... | rust_cleaned_test_functions.jsonl/64758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
2895,
65,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
16,
21,
7,
15,
87,
22,
15,
15,
23,
1326,
286,
29051,
486,
6666,
33,
71370,
341,
310,
3628,
25,
3184,
17,
9432,
4870,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sign_rfc6979_verify_hash_random() {
let mut rng = ThreadRng256 {};
for _ in 0..ITERATIONS {
let msg = rng.gen_uniform_u8x32();
let sk = SecKey::gensk(&mut rng);
let pk = sk.genpk();
let sign = sk.sign_rfc6979::<Sha256>(&msg);
... | rust_cleaned_test_functions.jsonl/81726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
1710,
8316,
21,
24,
22,
24,
35638,
8950,
22644,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
20375,
286,
369,
716,
304,
220,
15,
496,
24733,
21792,
341,
310,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_coherence() {
let c = Contact { name: "John".to_string(), city: "Paris".to_string() };
assert!(json::decode::<Contact>(json::encode(&c).as_slice()).unwrap() == c);
} | rust_cleaned_test_functions.jsonl/92810 | {
"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,
11393,
51361,
368,
341,
262,
1077,
272,
284,
9180,
314,
829,
25,
330,
13079,
3263,
983,
3904,
1507,
3283,
25,
330,
59604,
3263,
983,
3904,
368,
2605,
262,
2060,
10297,
2236,
486,
18196,
27638,
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 |
#[test]
fn test_nfc() {
test("\u{212b}".as_bytes(), "\u{c5}\n");
test("\u{c5}".as_bytes(), "\u{c5}\n");
test("\u{41}\u{30a}".as_bytes(), "\u{c5}\n");
} | rust_cleaned_test_functions.jsonl/36864 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
8316,
368,
341,
262,
1273,
4921,
84,
90,
17,
16,
17,
65,
21901,
300,
12524,
1507,
2917,
84,
90,
66,
20,
11035,
77,
797,
262,
1273,
4921,
84,
90,
66,
20,
21901,
300,
12524,
1507,
2917,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_i64() -> Result<()> {
let cases = vec![
("0000-00-00 00:00:00", 0),
("2000-01-01 00:00:00", 101),
("2045-00-00 00:00:00", 450_000),
("2059-12-31 00:00:00", 591_231),
("1970-01-01 00:00:00", 700_101),
("199... | rust_cleaned_test_functions.jsonl/40455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 783
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5673,
5318,
21,
19,
368,
1464,
5714,
71698,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
15,
15,
15,
15,
12,
15,
15,
12,
15,
15,
220,
15,
15,
25,
15,
15,
25,
15,
15,
497,
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... | 6 |
#[test]
fn test_debug() {
let backtrace = Backtrace {
inner: Inner::Captured(Mutex::new(Capture {
actual_start: 1,
resolved: true,
frames: vec![
BacktraceFrame {
frame: RawFrame::Fake,
symbols: vec![Backtrace... | rust_cleaned_test_functions.jsonl/23125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1224
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
368,
341,
262,
1077,
1182,
15067,
284,
6841,
15067,
341,
286,
9179,
25,
36356,
486,
40536,
3073,
3189,
9371,
486,
931,
3025,
11850,
341,
310,
5042,
4906,
25,
220,
16,
345,
310,
19673,
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_is_ltr() {
use super::is_ltr;
assert_eq!(is_ltr(10), true);
assert_eq!(is_ltr(11), false);
assert_eq!(is_ltr(20), true);
} | rust_cleaned_test_functions.jsonl/29776 | {
"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,
6892,
907,
376,
368,
341,
286,
990,
2256,
486,
285,
907,
376,
280,
286,
2060,
10714,
10297,
285,
907,
376,
7,
16,
15,
701,
830,
317,
286,
2060,
10714,
10297,
285,
907,
376,
7,
16,
16,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
const FORMAT_STR: &str = "(@$empty)";
let formatter = StringFormatter::new(FORMAT_STR)
.unwrap()
.map(|var| match var {
"empty" => Some(Ok("")),
_ => None,
});
let result = formatter.parse(None... | rust_cleaned_test_functions.jsonl/71888 | {
"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,
15124,
368,
341,
286,
733,
52225,
7159,
25,
609,
495,
284,
330,
5957,
3,
3194,
86197,
286,
1077,
24814,
284,
923,
14183,
486,
931,
7832,
98084,
7159,
340,
310,
659,
15454,
741,
310,
659,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_new_from_nodes_and_edges() {
let nodes = vec![
Node::from_name("n1"),
Node::from_name("n2"),
Node::<&str, &str, &f64>::from_name("n3"),
];
let edges = vec![
Edge::with_weight("n1", "n2", &1.0),
Edge::with_weight... | rust_cleaned_test_functions.jsonl/100475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 377
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
5673,
14896,
8378,
28026,
368,
341,
286,
1077,
7798,
284,
7486,
90515,
310,
6018,
486,
1499,
1269,
445,
77,
16,
4461,
310,
6018,
486,
1499,
1269,
445,
77,
17,
4461,
310,
6018,
27638,
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_from_angle_x_rotation_should_not_rotate_x_axis() {
let rotation = Rotation3::from_angle_x(Degrees(70_f64));
let vector = Vector3::unit_x();
let expected = vector;
let result = rotation.rotate_vector(&vector);
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/70481 | {
"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,
21727,
3212,
44813,
43378,
7913,
60834,
3212,
23567,
368,
341,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
3212,
5432,
791,
7858,
7,
22,
15,
761,
21,
19,
1106,
286,
1077,
4621,
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_update_departure_time() {
assert_eq!(
DepartureTime::new(1537308000).unwrap(),
DepartureTime::new(1537308000)
.unwrap()
.shift(&NaiveDateTime::from_timestamp(1536991111, 0))
);
assert_eq!(
DepartureTime:... | rust_cleaned_test_functions.jsonl/75486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
69865,
552,
3009,
368,
341,
286,
2060,
10714,
33673,
310,
39755,
552,
1462,
486,
931,
7,
16,
20,
18,
22,
18,
15,
23,
15,
15,
15,
568,
15454,
3148,
310,
39755,
552,
1462,
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_find_line_intersections() {
let line1 = vec![
Point2D::new(0.0, 0.0),
Point2D::new(10.0, 10.0),
Point2D::new(12.0, 6.0),
Point2D::new(6.0, 0.0),
];
let line2 = vec![
Point2D::new(-1.0, 5.0),
Point2D::... | rust_cleaned_test_functions.jsonl/6630 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 449
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
6528,
15318,
24661,
368,
341,
286,
1077,
1555,
16,
284,
7486,
90515,
310,
5126,
17,
35,
486,
931,
7,
15,
13,
15,
11,
220,
15,
13,
15,
1326,
310,
5126,
17,
35,
486,
931,
7,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_datetime() {
assert_eq!(datetime("1984-01-18T16:55+0200").unwrap().0,
DateTime {
date: Date { year: 1984, month: 1, day: 18},
time: Time { hour: 16, minute: 55, second: 0, tz_offset:7200 }
});
} | rust_cleaned_test_functions.jsonl/81578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28943,
368,
341,
262,
2060,
10714,
10297,
15450,
445,
16,
24,
23,
19,
12,
15,
16,
12,
16,
23,
51,
16,
21,
25,
20,
20,
10,
15,
17,
15,
15,
1827,
15454,
1005,
15,
345,
1060,
6520,
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... | 1 |
#[test]
fn test_exchange_round_two_works() {
assert_eq!(round_two(&BigDecimal::from_str("123.12").unwrap()), 123.12);
} | rust_cleaned_test_functions.jsonl/74673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 66
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59212,
29896,
23241,
11498,
82,
368,
341,
286,
2060,
10714,
10297,
1049,
23241,
2099,
76422,
486,
1499,
2895,
445,
16,
17,
18,
13,
16,
17,
1827,
15454,
11858,
220,
16,
17,
18,
13,
16,
17,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_invalid_pubkey_len() {
let tx = test_tx();
let mut packet = Packet::from_data(None, tx).unwrap();
let res = sigverify::do_get_packet_offsets(&packet, 0);
// make pubkey len huge
packet.buffer_mut()[res.unwrap().pubkey_start as usize - 1] = 0x7f;
... | rust_cleaned_test_functions.jsonl/39072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 205
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
34014,
792,
6043,
368,
341,
286,
1077,
9854,
284,
1273,
17805,
543,
286,
1077,
5206,
10151,
284,
28889,
486,
1499,
1769,
26717,
11,
9854,
568,
15454,
1428,
286,
1077,
592,
284,
8366,
12446,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_utimensat() {
let _dr = crate::DirRestore::new();
let tempdir = tempfile::tempdir().unwrap();
let filename = "foo.txt";
let fullpath = tempdir.path().join(filename);
drop(File::create(&fullpath).unwrap());
let dirfd = fcntl::open(tempdir.path(), fcntl::OFlag::empty(), st... | rust_cleaned_test_functions.jsonl/48646 | {
"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,
60363,
45597,
266,
368,
341,
262,
1077,
716,
3612,
284,
17717,
486,
6184,
56284,
486,
931,
543,
262,
1077,
2730,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
3899,
284,
330,
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_good_script_alpha_code() {
match lookup_by_alpha("Hluw") {
None => panic!("was expecting a script"),
Some(script) => {
assert_eq!(script.alphabetic_code.to_string(), "Hluw".to_string());
assert_eq!(script.numeric_code, 80);
... | rust_cleaned_test_functions.jsonl/29976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44781,
14660,
26633,
4136,
368,
341,
286,
2432,
18615,
3710,
26633,
445,
39,
9835,
86,
899,
341,
310,
2240,
589,
21975,
17223,
16123,
22331,
264,
5316,
4461,
310,
4329,
42795,
8,
589,
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_word_segmentation() {
let edit_distance_max = 2;
let mut sym_spell = SymSpell::<UnicodeStringStrategy>::default();
sym_spell.load_dictionary("./data/frequency_dictionary_en_82_765.txt", 0, 1, " ");
let typo = "thequickbrownfoxjumpsoverthelazydog";
let cor... | rust_cleaned_test_functions.jsonl/98945 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13533,
28061,
367,
368,
341,
286,
1077,
4499,
19464,
6345,
284,
220,
17,
280,
286,
1077,
5206,
7886,
64717,
284,
11375,
29028,
27638,
33920,
703,
19816,
6831,
2258,
543,
286,
7886,
64717,
5104,
42... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_split() {
assert_eq!(
eval_binary("<< 1:4, << 1,2,3,4 >>/binary >>"),
[16, 16, 32, 48, 4]
);
} | rust_cleaned_test_functions.jsonl/83848 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
17052,
368,
341,
286,
2060,
10714,
33673,
310,
5603,
31761,
445,
2442,
220,
16,
25,
19,
11,
1115,
220,
16,
11,
17,
11,
18,
11,
19,
3578,
14,
25891,
3578,
4461,
310,
508,
16,
21,
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 |
#[test]
fn test_incorrect_node_section_sz_oversize() {
let mut bytecode: Vec<u8> = BIND_HEADER.to_vec();
append_section_header(&mut bytecode, SYMB_MAGIC_NUM, 18);
let device_name: [u8; 5] = [0x49, 0x42, 0x49, 0x53, 0]; // "IBIS"
bytecode.extend_from_slice(&[1, 0, 0, 0]);
... | rust_cleaned_test_functions.jsonl/24051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
19928,
5084,
16221,
33945,
62,
8969,
551,
368,
341,
286,
1077,
5206,
75129,
25,
11312,
34837,
23,
29,
284,
91370,
20330,
2389,
13251,
543,
286,
8737,
16221,
8757,
2099,
6984,
75129,
11,
1607... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reference_vector_ILL4_ext_id1() {
let test_vector = include_bytes!("../vectors/ILL4_ext_id1.bit");
test_vs_minimp3(test_vector);
} | rust_cleaned_test_functions.jsonl/69814 | {
"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,
25433,
12247,
62,
9228,
19,
9927,
842,
16,
368,
341,
262,
1077,
1273,
12247,
284,
2924,
12524,
17223,
1244,
85,
10605,
14,
9228,
19,
9927,
842,
16,
30099,
797,
262,
1273,
42434,
7260,
6664,
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 |
#[test]
fn test_poh_cache_on_disconnect() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_genesis_co... | rust_cleaned_test_functions.jsonl/106268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1202
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
11529,
4470,
67972,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
50704,
2638,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_middle() {
let result = linear_search(&vec![9, 8, 7, 6, 5, 4, 3, 2, 1, 0], 4);
assert_eq!(result, Some(5));
} | rust_cleaned_test_functions.jsonl/50277 | {
"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,
62580,
368,
341,
286,
1077,
1102,
284,
13482,
10716,
2099,
4083,
20703,
24,
11,
220,
23,
11,
220,
22,
11,
220,
21,
11,
220,
20,
11,
220,
19,
11,
220,
18,
11,
220,
17,
11,
220,
16,
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 |
#[test]
fn test_all() {
assert_eq!(true, istor::istor("176.10.99.200", false)); //in the list
assert_eq!(false, istor::istor("176.10.99.300", false)); //not in the list
assert_eq!(false, istor::istor("176.10.99.200\n", false));
assert_eq!(true, istor::istor("95.143.193.125", fal... | rust_cleaned_test_functions.jsonl/122550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
368,
341,
286,
2060,
10714,
10297,
1866,
11,
220,
5323,
486,
5323,
445,
16,
22,
21,
13,
16,
15,
13,
24,
24,
13,
17,
15,
15,
497,
895,
5905,
442,
258,
279,
1140,
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_update_configuration() {
let tests = vec![
(
"Single channel",
chirpstack_api::gw::GatewayConfiguration{
channels: vec![
chirpstack_api::gw::ChannelConfiguration{
frequency... | rust_cleaned_test_functions.jsonl/125623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 5478
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
35726,
368,
341,
286,
1077,
7032,
284,
7486,
90515,
310,
2399,
394,
330,
10888,
5496,
756,
394,
70446,
79,
7693,
11697,
486,
54133,
486,
40709,
7688,
515,
503,
11744,
25,
7486,
90515,
664,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_cml_json5() {
let input = r##"{
"expose": [
// Here are some services to expose.
{ "service": "fuchsia.logger.Log", "from": "#logger", },
{ "directory": "blobfs", "from": "#logger", "rights": ["rw*"]},
],
... | rust_cleaned_test_functions.jsonl/97343 | {
"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,
666,
1014,
9455,
20,
368,
341,
286,
1077,
1946,
284,
435,
565,
1,
515,
310,
330,
327,
2900,
788,
2278,
394,
442,
5692,
525,
1045,
3516,
311,
28141,
624,
394,
314,
330,
7936,
788,
330,
69,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_links_field() {
check(
r#"
struct S {
/// [`S`]
field<|>: i32
}
"#,
expect![[r#"
*field*
```rust
test::S
```
```rust
field: i32
```
... | rust_cleaned_test_functions.jsonl/66152 | {
"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,
18869,
25258,
5013,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
1235,
328,
341,
262,
1048,
40518,
50,
63,
921,
262,
2070,
27,
91,
26818,
600,
18,
17,
198,
532,
57676,
345,
310,
1720,
0,
155... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize_envelope_empty() {
// Without terminating newline after header
let bytes = Bytes::from("{\"event_id\":\"9ec79c33ec9942ab8353589fcb2e04dc\",\"dsn\":\"https://e12d836b15bb49d7bbf99e64295d995b:@sentry.io/42\"}");
let envelope = Envelope::parse_bytes(bytes).unwrap... | rust_cleaned_test_functions.jsonl/103608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 239
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
6205,
18853,
15124,
368,
341,
286,
442,
17147,
70581,
39027,
1283,
4247,
198,
286,
1077,
5820,
284,
30024,
486,
1499,
99141,
3087,
842,
23488,
24,
757,
22,
24,
66,
18,
18,
757,
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_bpf_loader_finalize() {
let program_id = Pubkey::new_rand();
let program_key = Pubkey::new_rand();
let rent_key = rent::id();
let mut file = File::open("test_elfs/noop.so").expect("file open failed");
let mut elf = Vec::new();
let rent = rent::Rent... | rust_cleaned_test_functions.jsonl/113969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 936
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
15897,
22139,
70616,
368,
341,
286,
1077,
2025,
842,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
2025,
3097,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
8016,
3097,
284,
8016,
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_highest_pair_wins() {
test(
&vec!["4S 2H 6S 2D JH", "2S 4H 6C 4D JD"],
&vec!["2S 4H 6C 4D JD"],
)
} | rust_cleaned_test_functions.jsonl/121263 | {
"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,
1523,
7504,
14445,
1670,
1330,
368,
341,
262,
1273,
1006,
286,
609,
4083,
0,
1183,
19,
50,
220,
17,
39,
220,
21,
50,
220,
17,
35,
619,
39,
497,
330,
17,
50,
220,
19,
39,
220,
21,
34,
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_delete_between_unsorted_sorted() -> Result<(), IndexError> {
let mut x: MyVec<usize> = MyVec::new();
let res = x.delete_between_unsorted(&1, &2);
assert_eq!(res, vec![]);
for v in vec![7, 1, 9, 11, 2, 3, 1, 5, 7, 11, 1, 6].iter() {
let len = x.len();
List::insert(... | rust_cleaned_test_functions.jsonl/24012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
48302,
4907,
28298,
41277,
368,
1464,
5714,
68843,
60203,
29,
341,
262,
1077,
5206,
856,
25,
3017,
10050,
90244,
29,
284,
3017,
10050,
486,
931,
543,
262,
1077,
592,
284,
856,
7440,
48302,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read_btf_type_restrict() {
let endianness = Endianness::default();
let data: &[u8] = &[
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x04, 0x00, 0x00, 0x00,
];
match unsafe { BtfType::read(data, endianness) } {
Ok(BtfType::Restrict(_)) =... | rust_cleaned_test_functions.jsonl/98496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
880,
8935,
1819,
97684,
368,
341,
286,
1077,
835,
72,
82033,
284,
3972,
72,
82033,
486,
2258,
543,
286,
1077,
821,
25,
44590,
84,
23,
60,
284,
609,
9640,
310,
220,
15,
87,
15,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_create_account() {
let account = create_account(42, &EpochSchedule::default());
let epoch_schedule = EpochSchedule::from_account(&account).unwrap();
assert_eq!(epoch_schedule, EpochSchedule::default());
} | rust_cleaned_test_functions.jsonl/10013 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
13500,
368,
341,
286,
1077,
2692,
284,
1855,
13500,
7,
19,
17,
11,
609,
44338,
32210,
486,
2258,
1423,
286,
1077,
16342,
34530,
284,
87379,
32210,
486,
1499,
13500,
2099,
4608,
568,
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 |
#[test]
fn test_decoder_invalid_escape() {
let mut d = HZEncoding.decoder();
assert_feed_ok!(d, b"#A", b"", "#A");
assert_feed_err!(d, b"", b"~", b"xy", "");
assert_feed_ok!(d, b"#B", b"", "#B");
assert_feed_ok!(d, b"", b"~", "");
assert_feed_err!(d, b"", b"", b"x... | rust_cleaned_test_functions.jsonl/48124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
31433,
21832,
368,
341,
286,
1077,
5206,
294,
284,
472,
57,
14690,
74047,
543,
286,
2060,
42390,
19817,
10297,
67,
11,
293,
57676,
32,
497,
293,
56323,
5869,
32,
797,
286,
2060,
42390,
92... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_n_divergetd() {
let max_iter = 10;
assert_eq!(get_n_diverged(1.0, 0.0, max_iter), 3);
assert_eq!(get_n_diverged(0.0, 0.0, max_iter), max_iter as u8);
assert_eq!(get_n_diverged(0.0, 1.0, max_iter), max_iter as u8);
} | rust_cleaned_test_functions.jsonl/9442 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1089,
16237,
261,
455,
67,
368,
341,
197,
10217,
1932,
11723,
284,
220,
16,
15,
401,
197,
6948,
10714,
10297,
455,
1089,
16237,
51525,
7,
16,
13,
15,
11,
220,
15,
13,
15,
11,
1932,
117... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let cases = vec![
(
vec![Some(1), Some(2), Some(3)],
vec![Some(1), Some(2), Some(3)],
true,
),
(
vec![Some(1), Some(2), Some(3)],
vec![Some(1), Some(2), Some(... | rust_cleaned_test_functions.jsonl/46941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
7486,
20703,
8373,
7,
16,
701,
4329,
7,
17,
701,
4329,
7,
18,
30749,
394,
7486,
20703,
8373,
7,
16,
701,
4329,
7,
17,
701,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_extra_predicate() {
libcnb_newtype!(
CapitalizedName,
CapitalizedNameError,
r"^[A-Z][a-z]*$",
|value| value != "Manuel"
);
assert!("Jonas".parse::<CapitalizedName>().is_ok());
assert_eq!(
"manuel".parse... | rust_cleaned_test_functions.jsonl/10798 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 307
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31858,
97474,
368,
341,
286,
3051,
14271,
65,
5921,
1313,
33673,
310,
18374,
20167,
345,
310,
18374,
20167,
1454,
345,
310,
435,
1,
27736,
32,
11171,
1457,
64,
9141,
8465,
3,
756,
310,
760,
957,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concurrent_operations_auto_rebase() {
let test_env = TestEnvironment::default();
test_env.jj_cmd_success(test_env.env_root(), &["init", "repo", "--git"]);
let repo_path = test_env.env_root().join("repo");
std::fs::write(repo_path.join("file"), "contents").unwrap();
test_env.... | rust_cleaned_test_functions.jsonl/63550 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 484
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3382,
3231,
57345,
27740,
1288,
3152,
368,
341,
262,
1077,
1273,
15879,
284,
3393,
12723,
486,
2258,
543,
262,
1273,
15879,
1169,
73,
11684,
18632,
8623,
15879,
9265,
12993,
1507,
609,
1183,
2327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_real() {
let (sql, params) = Sqlite::build(Select::default().value(1.3f64.raw())).unwrap();
assert_eq!("SELECT 1.3", sql);
assert!(params.is_empty());
} | rust_cleaned_test_functions.jsonl/52924 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
15266,
368,
341,
286,
1077,
320,
3544,
11,
3628,
8,
284,
7224,
632,
486,
5834,
7,
3379,
486,
2258,
1005,
957,
7,
16,
13,
18,
69,
21,
19,
18152,
34670,
15454,
543,
286,
2060,
10714,
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 |
#[test]
fn test_chained_cname_lookup() {
let resp_query = Query::query(Name::from_str("www.example.com.").unwrap(), RecordType::A);
let cname_record = cname_record(
Name::from_str("www.example.com.").unwrap(),
Name::from_str("v4.example.com.").unwrap(),
);
let v4_record = v4_reco... | rust_cleaned_test_functions.jsonl/21990 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 517
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
2627,
666,
606,
27464,
368,
341,
262,
1077,
9039,
5738,
284,
11361,
486,
1631,
21182,
486,
1499,
2895,
445,
2136,
7724,
905,
98401,
15454,
1507,
13583,
929,
486,
32,
317,
262,
1077,
78514,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inputs_with_offset() {
assert_eq!(
CommandLineInputs::FileAndOffset(("-".to_string(), 8, None)),
parse_inputs(&MockOptions::new(vec!["+10"], vec![])).unwrap()
);
// offset must start with "+" if no input is specified.
assert... | rust_cleaned_test_functions.jsonl/58007 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1078
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
28557,
6615,
6917,
368,
341,
1789,
286,
2060,
10714,
33673,
310,
78218,
31946,
486,
1703,
3036,
6446,
7,
13645,
3263,
983,
3904,
1507,
220,
23,
11,
2240,
6965,
310,
4715,
28557,
2099,
11571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decoder_decode_header_too_many() {
let buffer = "RTSP/2.0 200 OK\r\n\
A: 1\r\n\
B: 2\r\n\
\r\n";
let config = ConfigBuilder::new().with_header_max_count(1).build();
let mut decoder = Decoder::with_config(co... | rust_cleaned_test_functions.jsonl/123058 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49843,
15227,
8757,
2346,
78,
22101,
368,
341,
286,
1077,
4147,
284,
330,
5350,
4592,
14,
17,
13,
15,
220,
17,
15,
15,
10402,
12016,
1699,
5661,
2549,
362,
25,
220,
16,
12016,
1699,
5661,
2549... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_2() {
let input = "mask = 000000000000000000000000000000X1001X
mem[42] = 100
mask = 00000000000000000000000000000000X0XX
mem[26] = 1";
let memory = apply_memory_address_decoder(input);
assert_eq!(10, memory.len());
(58..=59).for_each(|address| assert_eq!(&100... | rust_cleaned_test_functions.jsonl/90592 | {
"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,
19096,
62,
17,
368,
341,
286,
1077,
1946,
284,
330,
11258,
284,
220,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
15,
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_extract_tuple_to_vec() {
let gil = Python::acquire_gil();
let py = gil.python();
let v: Vec<i32> = py.eval("(1, 2)", None, None).unwrap().extract().unwrap();
assert!(v == [1, 2]);
} | rust_cleaned_test_functions.jsonl/47427 | {
"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,
39123,
21773,
2346,
13251,
368,
341,
286,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
286,
1077,
4510,
284,
342,
321,
43193,
543,
286,
1077,
348,
25,
11312,
21897,
18,
17,
29,
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_cast_range_u8_max() {
assert_eq!(u8::MAX.to_int(), Some(u8::MAX as int));
assert_eq!(u8::MAX.to_i8(), None);
assert_eq!(u8::MAX.to_i16(), Some(u8::MAX as i16));
assert_eq!(u8::MAX.to_i32(), Some(u8::MAX as i32));
assert_eq!(u8::MAX.to_i64(), Some(u8:... | rust_cleaned_test_functions.jsonl/23659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9698,
7300,
23,
6345,
368,
341,
286,
2060,
10714,
10297,
84,
23,
486,
10586,
2389,
4042,
1507,
220,
4329,
8154,
23,
486,
10586,
438,
526,
1106,
286,
2060,
10714,
10297,
84,
23,
486,
10586,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_allocations() {
let alice_pubkey = solana_sdk::pubkey::new_rand();
let allocation = Allocation {
recipient: alice_pubkey.to_string(),
amount: 42,
lockup_date: "".to_string(),
};
let file = NamedTempFile::new().unwrap();
... | rust_cleaned_test_functions.jsonl/18254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 639
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
14802,
804,
368,
341,
286,
1077,
70433,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
23757,
284,
72667,
341,
310,
21713,
25,
70433,
34014,
792,
2389,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_config_domain_serde() {
assert_eq!(serde_json::to_string(&ConfigDomain::General).unwrap(), "\"general\"");
let d = ConfigDomainExternal::UserOverride(ViewId(1));
assert_eq!(serde_json::to_string(&d).unwrap(), "{\"user_override\":\"view-id-1\"}");
let d = ConfigDom... | rust_cleaned_test_functions.jsonl/105406 | {
"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,
5332,
20111,
75861,
450,
368,
341,
286,
2060,
10714,
10297,
47024,
9455,
486,
983,
3904,
2099,
2648,
13636,
486,
15415,
568,
15454,
1507,
15898,
24595,
88385,
286,
1077,
294,
284,
5532,
13636,
25913... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tuple() {
let yaml = indoc! {"
---
[0, 0, 0]
"};
let expected = "invalid length 3, expected sequence of 2 elements at line 2 column 1";
test_error::<(u8, u8)>(yaml, expected);
} | rust_cleaned_test_functions.jsonl/45576 | {
"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,
17799,
21773,
368,
341,
262,
1077,
32246,
284,
1257,
509,
0,
314,
698,
286,
53923,
286,
508,
15,
11,
220,
15,
11,
220,
15,
921,
262,
330,
2440,
262,
1077,
3601,
284,
330,
11808,
3084,
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_str_non_collisions() {
assert!(!s_s_collide("/a", "/b"));
assert!(!s_s_collide("/a/b", "/a"));
assert!(!s_s_collide("/a/b", "/a/c"));
assert!(!s_s_collide("/a/hello", "/a/c"));
assert!(!s_s_collide("/hello", "/a/c"));
assert!(!s_s_collide("/hello/t... | rust_cleaned_test_functions.jsonl/62160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
21637,
43597,
6805,
368,
341,
286,
2060,
0,
3471,
82,
643,
43597,
577,
4283,
64,
497,
3521,
65,
4010,
286,
2060,
0,
3471,
82,
643,
43597,
577,
4283,
64,
3470,
497,
3521,
64,
4010,
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_hex_str_arg() {
let test_cases = vec![
(Some(b"abc".to_vec()), Some(b"616263".to_vec())),
(
Some("你好".as_bytes().to_vec()),
Some(b"E4BDA0E5A5BD".to_vec()),
),
(None, None),
];
for (arg, expec... | rust_cleaned_test_functions.jsonl/10172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 355
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32655,
2895,
6057,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
8373,
1883,
1,
13683,
3263,
983,
13251,
11858,
4329,
1883,
1,
21,
16,
21,
17,
21,
18,
3263,
983,
13251,
73727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.