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_no_activity() {
let clock = ChronoClock {};
let test_dir = tempdir().expect("error while creating tempdir");
let mut service = build_json_service(&test_dir);
assert!(service
.stop_ongoing_activity(clock.get_time(), 0, true)
.is_ok());
... | rust_cleaned_test_functions.jsonl/116408 | {
"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,
6536,
30026,
368,
341,
286,
1077,
8866,
284,
25481,
78,
26104,
9321,
286,
1077,
1273,
4334,
284,
2730,
3741,
1005,
17119,
445,
841,
1393,
6825,
2730,
3741,
797,
286,
1077,
5206,
2473,
284,
1936,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_f32x4_constructors() {
let a = F32x4::new(1.0, 2.0, 3.0, 4.0);
assert_eq!((a[0], a[1], a[2], a[3]), (1.0, 2.0, 3.0, 4.0));
let b = F32x4::splat(10.0);
assert_eq!(b, F32x4::new(10.0, 10.0, 10.0, 10.0));
} | rust_cleaned_test_functions.jsonl/66181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
18,
17,
87,
19,
64803,
1087,
368,
341,
262,
1077,
264,
284,
434,
18,
17,
87,
19,
486,
931,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
19,
13,
15,
317,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insufficient_degree() {
// Use a fixed seeded RNG to avoid false positives.
let mut rng = ChaChaRng::seed_from_u64(0);
let n = 30;
let degree = 2;
let mut graph = random_graph(n, degree, &mut rng);
assert!(distance_vector(&mut graph).is_none());
... | rust_cleaned_test_functions.jsonl/38913 | {
"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,
34386,
26683,
49524,
368,
341,
286,
442,
5443,
264,
8356,
89816,
72606,
311,
5648,
895,
63656,
624,
286,
1077,
5206,
28422,
284,
27721,
95971,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
15,
317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_ood() {
let quad = BoundedQuadratic::new(0., 3., 1., 1., 1.);
assert!(!quad.eval(-1.).is_finite());
} | rust_cleaned_test_functions.jsonl/19879 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
62,
1386,
368,
341,
286,
1077,
27082,
284,
425,
13082,
2183,
88678,
486,
931,
7,
15,
2572,
220,
18,
2572,
220,
16,
2572,
220,
16,
2572,
220,
16,
58957,
286,
2060,
0,
3471,
31610,
31710,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uds_backend() {
let ctx = TestContext::new();
let device_features = AVAIL_FEATURES;
let driver_features: u64 = AVAIL_FEATURES | 1 | (1 << 32);
let device_pages = [
(device_features & 0xffff_ffff) as u32,
(device_features >> 32) as u... | rust_cleaned_test_functions.jsonl/50268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1511
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
62,
27988,
40011,
368,
341,
286,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
286,
1077,
3671,
14965,
284,
12155,
5965,
30827,
50,
280,
286,
1077,
5579,
14965,
25,
575,
21,
19,
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_all() {
if cfg!(target_os = "macos") {
return;
}
for opt in vec!["-a", "--all"] {
new_ucmd!()
.arg(opt)
.succeeds()
.stdout_is(expected_result(&[opt]));
}
} | rust_cleaned_test_functions.jsonl/79404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
368,
341,
262,
421,
13286,
10297,
5657,
29387,
284,
330,
11948,
436,
899,
341,
1789,
286,
470,
280,
262,
555,
262,
369,
3387,
304,
7486,
0,
1183,
12,
64,
497,
14482,
541,
1341,
341,
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_unfold_refold(){
let mut t = new_sctable_internal();
let test_sc = vec!(M(3),R(id(101,0),14),M(9));
assert_eq!(unfold_test_sc(test_sc.clone(),EMPTY_CTXT,&mut t),4);
{
let table = t.table.borrow();
assert!(*table.get(2) == Mark(9,0));
... | rust_cleaned_test_functions.jsonl/105289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
19961,
7793,
813,
3032,
286,
1077,
5206,
259,
284,
501,
643,
302,
480,
23472,
1428,
286,
1077,
1273,
13171,
284,
7486,
10297,
44,
7,
18,
701,
49,
3724,
7,
16,
15,
16,
11,
15,
701,
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_create_float() {
assert_eq!(Value::Float("1797690000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000... | rust_cleaned_test_functions.jsonl/86199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 74
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
17586,
368,
341,
262,
2060,
10714,
10297,
1130,
486,
5442,
445,
16,
22,
24,
22,
21,
24,
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_nns1_520() {
let (driver, mut gov, neuron) = create_mature_neuron(true);
let id = neuron.id.unwrap();
let from = neuron.controller.unwrap();
let neuron_stake_e8s = neuron.cached_neuron_stake_e8s;
let neuron_fees_e8s = neuron.neuron_fees_e8s;
let neuron_maturity = neuron.... | rust_cleaned_test_functions.jsonl/1143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 631
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
4412,
16,
62,
20,
17,
15,
368,
341,
262,
1077,
320,
12521,
11,
5206,
47625,
11,
48284,
8,
284,
1855,
717,
1568,
13925,
36090,
3715,
626,
262,
1077,
877,
284,
48284,
1764,
55395,
543,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deserialize() {
let mut serialized = "MDAyMWxvY2F0aW9uIGh0dHA6Ly9leGFtcGxlLm9yZy8KMDAxNWlkZW50aWZpZXIga2V5aWQKMDAyZnNpZ25hdHVyZSB83ueSURxbxvUoSFgF3-myTnheKOKpkwH51xHGCeOO9wo";
let mut signature: MacaroonKey = [
124, 222, 231, 146, 81, 28, 91, 198, 245, 40, 72, 88, 5, ... | rust_cleaned_test_functions.jsonl/7 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 943
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
9050,
368,
341,
286,
1077,
5206,
32916,
284,
330,
6076,
73109,
54173,
87,
85,
56,
17,
37,
15,
64,
54,
24,
84,
1914,
71,
15,
67,
17020,
21,
47312,
24,
273,
36332,
10413,
38,
24310,
43,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_key() -> Result<()> {
// See the `structKey` test in cpp_compat_test
let mut h = std::collections::BTreeMap::new();
h.insert(
Small {
..Default::default()
},
1,
);
let sub = SubStruct {
key_map: Some(h),
// In rust w... | rust_cleaned_test_functions.jsonl/122574 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15126,
3097,
368,
1464,
5714,
71698,
341,
262,
442,
3496,
279,
1565,
1235,
1592,
63,
1273,
304,
46824,
89602,
4452,
271,
262,
1077,
5206,
305,
284,
1460,
486,
51137,
486,
33,
6533,
2227,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_c_major_scale() {
assert_eq!(
major_scale(Note::C),
["C", "D", "E", "F", "G", "A", "B"]
);
} | rust_cleaned_test_functions.jsonl/38487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
47916,
16727,
368,
341,
286,
2060,
10714,
33673,
310,
3598,
16727,
89389,
486,
34,
1326,
310,
4383,
34,
497,
330,
35,
497,
330,
36,
497,
330,
37,
497,
330,
38,
497,
330,
32,
497,
330,
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 |
#[test]
fn test_option_from_valid_buffer_with_fixed_length_returns_none() {
let buf = vec![255];
let mut buf = OptionBuffer { buf: &buf };
let result = buf.next();
match result {
Some(_) => assert!(false),
None => assert!(true),
}
} | rust_cleaned_test_functions.jsonl/93677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9672,
5673,
8337,
7776,
6615,
37839,
5118,
58900,
31488,
368,
341,
286,
1077,
6607,
284,
7486,
20703,
17,
20,
20,
935,
286,
1077,
5206,
6607,
284,
6959,
4095,
314,
6607,
25,
609,
5909,
2605,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_body_stream_concat() {
use futures::{Sink, Stream, Future};
let (tx, body) = Body::pair();
::std::thread::spawn(move || {
let tx = tx.send(Ok("hello ".into())).wait().unwrap();
tx.send(Ok("world".into())).wait().unwrap();
});
let total = body.concat2().wait(... | rust_cleaned_test_functions.jsonl/113105 | {
"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,
14114,
12673,
57478,
368,
341,
262,
990,
36823,
22964,
45094,
11,
9203,
11,
12498,
2440,
262,
1077,
320,
3998,
11,
2487,
8,
284,
13958,
486,
12670,
1428,
262,
3504,
1834,
486,
4528,
486,
46087,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_validate_minidump() {
let be_minidump = b"PMDMxxxxxx";
assert!(validate_minidump(be_minidump).is_ok());
let le_minidump = b"MDMPxxxxxx";
assert!(validate_minidump(le_minidump).is_ok());
let garbage = b"xxxxxx";
assert!(validate_minidump(garbage).... | rust_cleaned_test_functions.jsonl/18233 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42681,
7260,
307,
1510,
368,
341,
286,
1077,
387,
7260,
307,
1510,
284,
293,
67681,
6076,
44,
18516,
4146,
876,
286,
2060,
10297,
7067,
7260,
307,
1510,
66606,
7260,
307,
1510,
568,
285,
19817,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_highlighting_injected_javascript_in_html() {
let source = vec![
"<body>",
" <script>",
" const x = new Thing();",
" </script>",
"</body>",
]
.join("\n");
assert_eq!(
&to_token_vector(&source, get_language("html"), &HTML_SHEET)... | rust_cleaned_test_functions.jsonl/12256 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 913
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74546,
287,
1243,
28303,
5374,
6173,
1243,
9564,
368,
341,
262,
1077,
2530,
284,
7486,
90515,
286,
4055,
2599,
35452,
286,
330,
220,
366,
2282,
35452,
286,
330,
262,
733,
856,
284,
501,
37200,
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_only_cached_option_once_per_second() {
assert!(only_cached_option_once_per_second("z".to_string(), true).is_none());
let a = only_cached_option_once_per_second("a".to_string(), false).unwrap();
let b = only_cached_option_once_per_second("b".to_string(), false).unwrap();
assert_eq... | rust_cleaned_test_functions.jsonl/13142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 203
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18410,
64369,
9672,
7630,
5678,
29644,
368,
341,
262,
2060,
10297,
3243,
64369,
9672,
7630,
5678,
29644,
445,
89,
3263,
983,
3904,
1507,
830,
568,
285,
31488,
1423,
262,
1077,
264,
284,
1172,
6436... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ilrawtag_new() {
let t = ILRawTag::new(16);
assert_eq!(t.id(), 16);
assert_eq!(t.value().len(), 0);
} | rust_cleaned_test_functions.jsonl/25708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26743,
1041,
4578,
5921,
368,
341,
262,
1077,
259,
284,
11344,
20015,
5668,
486,
931,
7,
16,
21,
317,
262,
2060,
10714,
10297,
83,
1764,
1507,
220,
16,
21,
317,
262,
2060,
10714,
10297,
83,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_stake_authorize_with_fee_payer() {
panoptes_logger::setup();
const SIG_FEE: u64 = 42;
let mint_keypair = Keypair::new();
let mint_pubkey = mint_keypair.pubkey();
let faucet_addr = run_local_faucet(mint_keypair, None);
let test_validator = TestValidator::with_custom_fees(... | rust_cleaned_test_functions.jsonl/45365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2221
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
22938,
551,
6615,
34305,
620,
1135,
368,
341,
262,
7215,
2912,
288,
27413,
486,
15188,
543,
262,
733,
25038,
1400,
7099,
25,
575,
21,
19,
284,
220,
19,
17,
401,
262,
1077,
28337,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_program_bpf_invoke() {
solana_logger::setup();
const TEST_SUCCESS: u8 = 1;
const TEST_PRIVILEGE_ESCALATION_SIGNER: u8 = 2;
const TEST_PRIVILEGE_ESCALATION_WRITABLE: u8 = 3;
let mut programs = Vec::new();
#[cfg(feature = "bpf_c")]
{
programs.extend_from_slice... | rust_cleaned_test_functions.jsonl/36194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25096,
880,
15897,
79779,
368,
341,
262,
2048,
3362,
27413,
486,
15188,
1428,
262,
733,
13602,
8827,
25,
575,
23,
284,
220,
16,
280,
262,
733,
13602,
70625,
2942,
10777,
30275,
49533,
3495,
36727,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_normal() {
let (_, mut ucmd) = at_and_ucmd!();
let result = ucmd.run();
println!("result.stdout = {}", result.stdout);
println!("result.stderr = {}", result.stderr);
println!("env::var(CI).is_ok() = {}", env::var("CI").is_ok());
for (key, value) in env::vars() {
... | rust_cleaned_test_functions.jsonl/73145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13973,
368,
341,
262,
1077,
39464,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
1428,
262,
1077,
1102,
284,
575,
8710,
7634,
543,
262,
13751,
17223,
1382,
24839,
284,
24689,
1102,
24839,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mul_assign() {
let mut vec = Vec2::new(1.0, -4.0);
vec *= -5.0;
assert_approx_eq!(vec.x(), -5.0);
assert_approx_eq!(vec.y(), 20.0);
} | rust_cleaned_test_functions.jsonl/77723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24944,
20688,
368,
341,
286,
1077,
5206,
7486,
284,
11312,
17,
486,
931,
7,
16,
13,
15,
11,
481,
19,
13,
15,
626,
286,
7486,
11404,
481,
20,
13,
15,
401,
286,
2060,
90425,
10714,
10297,
4083... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bitpacked() {
let mut buffer = Vec::new();
let mut bitpack = BitPacker::new();
bitpack.write(321u64, 9, &mut buffer).unwrap();
assert_eq!(compute_num_bits(321u64), 9);
bitpack.write(2u64, 2, &mut buffer).unwrap();
assert_eq!(compute_num_bits(2u64),... | rust_cleaned_test_functions.jsonl/5212 | {
"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,
13996,
50321,
368,
341,
286,
1077,
5206,
4147,
284,
11312,
486,
931,
543,
286,
1077,
5206,
2699,
4748,
284,
6495,
47,
9683,
486,
931,
543,
286,
2699,
4748,
3836,
7,
18,
17,
16,
84,
21,
19,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_exclusive_eor() {
let code = vec![0x49, 0x3]; //push pull
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.A = 0x6;
nes.next(&mut memory).unwrap();
assert_eq!(0x5, nes.A);
} | rust_cleaned_test_functions.jsonl/38726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
8336,
2204,
269,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
87,
19,
24,
11,
220,
15,
87,
18,
5265,
442,
9077,
6815,
198,
286,
1077,
5206,
308,
288,
284,
356,
5584,
486,
931,
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_new_resource() {
let uri = PkgUri::new_resource(
"fuchsia.com".to_string(),
"/fonts/stable".to_string(),
Some("80e8721f4eba5437c8b6e1604f6ee384f42aed2b6dfbfd0b616a864839cd7b4a".to_string()),
"foo/bar".to_string(),
)
.unwrap(... | rust_cleaned_test_functions.jsonl/122322 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
17962,
368,
341,
286,
1077,
13071,
284,
393,
7351,
13899,
486,
931,
17962,
1006,
310,
330,
69,
73391,
905,
3263,
983,
3904,
3148,
310,
3521,
20203,
14272,
480,
3263,
983,
3904,
3148,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote() {
let valset1 = [
Validator::new("a"),
Validator::new("b"),
Validator::new("c"),
];
let valset2 = [
Validator::new("b"),
Validator::new("c"),
Validator::new("d"),
];
let now = ... | rust_cleaned_test_functions.jsonl/100075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 750
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
368,
341,
286,
1077,
1044,
746,
16,
284,
2278,
310,
32566,
486,
931,
445,
64,
4461,
310,
32566,
486,
931,
445,
65,
4461,
310,
32566,
486,
931,
445,
66,
4461,
286,
9747,
286,
1077,
1044,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_requires_orientation() {
START.call_once(|| {
magick_wand_genesis();
});
let wand = MagickWand::new();
assert!(wand.read_image("tests/data/IMG_5745.JPG").is_ok());
assert_eq!(false, wand.requires_orientation());
} | rust_cleaned_test_functions.jsonl/57698 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54949,
66269,
368,
341,
262,
20998,
8524,
7630,
79453,
341,
286,
4878,
865,
1670,
437,
16322,
13774,
543,
262,
1625,
262,
1077,
28710,
284,
87154,
54,
437,
486,
931,
543,
262,
2060,
10297,
79810,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_retrieve() {
let network = Network::LocalNet;
let (mut store, mut blocks, mut outputs, consensus_manager) = create_new_blockchain(network);
let mempool_validator = MempoolValidators::new(
TxInputAndMaturityValidator::new(store.clone()),
TxInputAndMaturityValidator::ne... | rust_cleaned_test_functions.jsonl/61210 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
34216,
368,
341,
262,
1077,
3922,
284,
8141,
486,
7319,
6954,
280,
262,
1077,
320,
6984,
3553,
11,
5206,
10010,
11,
5206,
16275,
11,
23869,
12144,
8,
284,
1855,
5921,
7113,
8819,
46542,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stake_state_calculate_rewards() {
let mut vote_state = VoteState::default();
// bootstrap means fully-vested stake at epoch 0
let mut stake = new_stake(
1,
&Pubkey::default(),
&vote_state,
std::u64::MAX,
... | rust_cleaned_test_functions.jsonl/104289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
4387,
24005,
11207,
77997,
368,
341,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
543,
1789,
286,
442,
26925,
3363,
7225,
12,
7019,
291,
18279,
518,
16342,
220,
15,
198,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_object_literal_initializer_computed() {
assert_parse_success!(
primary_expression(true, false),
"{ [yield]: true }",
Expression::ObjectExpression {
loc: Some(((1, 0), (1, 17)).into()),
properties: vec![ObjectExpressionProperty::Property(Propert... | rust_cleaned_test_functions.jsonl/66478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
34100,
36462,
2965,
19292,
368,
341,
262,
2060,
21039,
18632,
33673,
286,
6028,
28068,
3715,
11,
895,
1326,
286,
13868,
508,
29696,
5669,
830,
335,
756,
286,
16378,
486,
1190,
9595,
341,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_constructor_oob_panic() {
let mut c1 = Rgi::new(0.7, 0.4, 0.9);
c1.set_blue(0.0);
} | rust_cleaned_test_functions.jsonl/86783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66210,
14179,
674,
620,
31270,
368,
341,
286,
1077,
5206,
272,
16,
284,
431,
8212,
486,
931,
7,
15,
13,
22,
11,
220,
15,
13,
19,
11,
220,
15,
13,
24,
317,
286,
272,
16,
980,
34991,
7,
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 |
#[test]
fn test_next() {
let mut bb = BollingerBands::new(3, 2.0_f64).unwrap();
let a = bb.next(2.0);
let b = bb.next(5.0);
let c = bb.next(1.0);
let d = bb.next(6.25);
assert_eq!(round(a.average), 2.0);
assert_eq!(round(b.average), 3.5);
assert_... | rust_cleaned_test_functions.jsonl/15391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
368,
341,
286,
1077,
5206,
16520,
284,
425,
965,
5137,
33,
2844,
486,
931,
7,
18,
11,
220,
17,
13,
15,
761,
21,
19,
568,
15454,
1428,
286,
1077,
264,
284,
16520,
4529,
7,
17,
13,
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_parsing_inverse_serialising() {
let mut orig_pkt = mk_dhcp_request();
orig_pkt.pkt.options = orig_pkt
.pkt
.options
.set_option(&dhcppkt::OPTION_LEASETIME, &(321 as u32))
.set_option(&dhcppkt::OPTION_SERVERID, &SERVER_IP)
.set_option(&dhcppkt::OPTI... | rust_cleaned_test_functions.jsonl/67202 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 477
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
28598,
63333,
25602,
3791,
368,
341,
262,
1077,
5206,
2713,
42051,
284,
23789,
814,
62169,
7893,
543,
262,
2713,
42051,
556,
5840,
10912,
284,
2713,
42051,
198,
286,
659,
46775,
198,
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_replace_regex() {
let original = "This is a test";
let normalized = "This is a test";
let mut n = NormalizedString::from(original);
Replace::new(ReplacePattern::Regex(r"\s+".into()), ' ')
.unwrap()
.normalize(&mut n)
... | rust_cleaned_test_functions.jsonl/124628 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 196
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10633,
41832,
368,
341,
286,
1077,
4024,
284,
330,
1986,
257,
374,
256,
264,
260,
1273,
876,
286,
1077,
29410,
284,
330,
1986,
374,
264,
1273,
3302,
286,
1077,
5206,
308,
284,
18437,
1506,
703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aces_can_end_a_straight_low() {
test(&["4S 5H 4C 8D 4H", "4D AH 3S 2D 5C"], &["4D AH 3S 2D 5C"])
} | rust_cleaned_test_functions.jsonl/49909 | {
"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,
62,
2434,
27421,
6213,
4306,
2895,
7386,
23767,
368,
341,
1066,
262,
1273,
2099,
1183,
19,
50,
220,
20,
39,
220,
19,
34,
220,
23,
35,
220,
19,
39,
497,
330,
19,
35,
47288,
220,
18,
50,
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_is_null() {
let p: *const isize = null();
assert!(p.is_null());
let q = unsafe { p.offset(1) };
assert!(!q.is_null());
let mp: *mut isize = null_mut();
assert!(mp.is_null());
let mq = unsafe { mp.offset(1) };
assert!(!mq.is_null());
} | rust_cleaned_test_functions.jsonl/5891 | {
"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,
6892,
15162,
368,
341,
262,
1077,
281,
25,
353,
1024,
91373,
284,
845,
543,
262,
2060,
10297,
79,
2079,
15162,
5231,
262,
1077,
2804,
284,
19860,
314,
281,
14760,
7,
16,
8,
2605,
262,
2060,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_has_compact_permill() {
let data = WithCompact { data: Permill(1) };
let encoded = data.encode();
assert_eq!(data, WithCompact::<Permill>::decode(&mut &encoded[..]).unwrap());
} | rust_cleaned_test_functions.jsonl/34804 | {
"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,
21778,
18177,
531,
31961,
483,
368,
341,
197,
10217,
821,
284,
3085,
98335,
314,
821,
25,
3616,
25013,
7,
16,
8,
2605,
197,
10217,
20498,
284,
821,
17313,
543,
197,
6948,
10714,
10297,
691,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_shift_and_fill_window_function() -> Result<()> {
let df = fruits_cars();
// a ternary expression with a final list aggregation
let out1 = df
.clone()
.lazy()
.select(vec![
col("fruits"),
col("B")
.shift_and_fill(-1, lit... | rust_cleaned_test_functions.jsonl/22408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22230,
8378,
30728,
12571,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
25322,
666,
1561,
1428,
262,
442,
264,
71617,
658,
7493,
448,
264,
1590,
1140,
51629,
198,
262,
1077,
700,
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 |
#[test]
fn test_parse_sue() {
let sue: Sue = ("Sue 1:".to_string()
+ "children: 1,"
+ "cats: 1,"
+ "samoyeds: 1,"
+ "pomeranians: 1,"
+ "akitas: 1,"
+ "vizslas: 1,"
+ "goldfish: 1,"
+ "trees: 1,"
+ "cars: 1,"
+ "perfumes: 1")
... | rust_cleaned_test_functions.jsonl/58329 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
643,
361,
368,
341,
262,
1077,
33772,
25,
47649,
284,
3489,
50,
361,
220,
16,
95740,
983,
3904,
741,
286,
488,
330,
5864,
25,
220,
16,
42252,
286,
488,
330,
37452,
25,
220,
16,
42252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rename_struct_field_for_shorthand() {
covers!(test_rename_struct_field_for_shorthand);
test_rename(
r#"
struct Foo {
i<|>: i32,
}
impl Foo {
fn new(i: i32) -> Self {
Self { i }
}
}
"#,
"j",
... | rust_cleaned_test_functions.jsonl/16217 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79399,
15126,
5013,
5478,
3712,
61679,
368,
341,
286,
14521,
10297,
1944,
79399,
15126,
5013,
5478,
3712,
61679,
317,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
2036,
33428,
341,
286,
600,
27,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_with_empty_map() {
let data = vec![0x81, 0xA0];
let parsed: ParsedArray<super::ParsedArraySize1> =
ParsedArray::deserialize_data(&data).expect("Failed to parse");
assert_eq!(parsed.raw_values(), vec![vec![0xA0]]);
assert_eq!(
parsed.g... | rust_cleaned_test_functions.jsonl/10824 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
6615,
15124,
5376,
368,
341,
286,
1077,
821,
284,
7486,
20703,
15,
87,
23,
16,
11,
220,
15,
14673,
15,
935,
286,
1077,
15676,
25,
393,
18112,
1857,
27,
9522,
486,
82959,
1857,
1695,
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_multiple_database() {
struct TestRdbHandler {}
impl EventHandler for TestRdbHandler {
fn handle(&mut self, data: Event) {
match data {
Event::RDB(rdb) => match rdb {
Object::String(kv) => {
let key = String:... | rust_cleaned_test_functions.jsonl/93093 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 715
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
27341,
368,
341,
262,
2036,
3393,
49,
1999,
3050,
10086,
262,
11605,
31957,
369,
3393,
49,
1999,
3050,
341,
286,
5168,
3705,
2099,
6984,
656,
11,
821,
25,
3665,
8,
341,
310,
2432,
821,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_load_app() {
block_on(async {
let config = config_generator();
let app_set = AppSet::new(vec![App::new(
"{00000000-0000-0000-0000-000000000001}",
[1, 2, 3, 4],
Cohort::default(),
)]);
let mut ... | rust_cleaned_test_functions.jsonl/94234 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 823
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
8191,
368,
341,
286,
2504,
4470,
18285,
341,
310,
1077,
2193,
284,
2193,
25813,
543,
310,
1077,
906,
2602,
284,
1845,
1649,
486,
931,
25592,
20703,
2164,
486,
931,
1006,
394,
13868,
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_conn_close_1_0() {
let mut buf = BytesMut::from(
"GET /test HTTP/1.0\r\n\
connection: close\r\n\r\n",
);
let req = parse_ready!(&mut buf);
assert_eq!(req.head().connection_type(), ConnectionType::Close);
} | rust_cleaned_test_functions.jsonl/22268 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17241,
12704,
62,
16,
62,
15,
368,
341,
286,
1077,
5206,
6607,
284,
30024,
51440,
486,
1499,
1006,
310,
330,
3806,
608,
1944,
10130,
14,
16,
13,
15,
12016,
1699,
5661,
1797,
3633,
25,
3265,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_dec() {
let cases = vec![
("12-12-31 11:30:45", 0, "20121231113045", "20121231"),
("12-12-31 11:30:45", 6, "20121231113045.000000", "20121231"),
(
"12-12-31 11:30:45.123",
6,
"20121231113045.123000",
... | rust_cleaned_test_functions.jsonl/93955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
13783,
368,
341,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
16,
17,
12,
16,
17,
12,
18,
16,
220,
16,
16,
25,
18,
15,
25,
19,
20,
497,
220,
15,
11,
330,
17,
15,
16,
17,
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_get_empty_body() {
let req = Request::with_connector(
Get, Url::parse("http://example.dom").unwrap(), &mut MockConnector
).unwrap();
let req = req.start().unwrap();
let stream = *req.body.end().unwrap()
.into_inner().unwrap().downcast::<Moc... | rust_cleaned_test_functions.jsonl/74535 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 246
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
15124,
14114,
368,
341,
286,
1077,
4232,
284,
6145,
486,
4197,
76393,
1006,
310,
2126,
11,
22840,
486,
6400,
445,
1254,
1110,
8687,
21435,
1827,
15454,
1507,
609,
6984,
14563,
35954,
198,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_borrow_mut_with_err() {
let mut lazycell = LazyCell::<()>::new();
let result = lazycell.try_borrow_mut_with(|| Err(1));
assert_eq!(result, Err(1));
} | rust_cleaned_test_functions.jsonl/5804 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 101
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
880,
7768,
29523,
6615,
9266,
368,
341,
286,
1077,
5206,
64436,
3337,
613,
284,
44263,
3599,
27638,
368,
6831,
931,
543,
286,
1077,
1102,
284,
64436,
3337,
613,
48779,
880,
7768,
29523,
661... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_byte() {
// single quote
let all = r##"b'\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83... | rust_cleaned_test_functions.jsonl/53203 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
368,
341,
286,
442,
3175,
12641,
198,
286,
1077,
678,
284,
435,
565,
1,
65,
15777,
87,
15,
15,
3462,
15,
16,
3462,
15,
17,
3462,
15,
18,
3462,
15,
19,
3462,
15,
20,
3462,
15,
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_spot_channel_to_command() {
let channel = "symbol:BTC_USDT";
let subscribe_command = super::spot_channel_to_command(channel, true);
assert_eq!(
r#"42["sub.symbol",{"symbol":"BTC_USDT"}]"#.to_string(),
subscribe_command
);
let unsu... | rust_cleaned_test_functions.jsonl/39549 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84766,
14571,
2346,
10811,
368,
341,
286,
1077,
5496,
284,
330,
18785,
25,
59118,
13467,
10599,
3302,
286,
1077,
17963,
10811,
284,
2256,
486,
18648,
14571,
2346,
10811,
25923,
11,
830,
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_set_array_bit() {
let mut buffer = vec![0, 0, 0];
set_array_bit(&mut buffer[..], 1);
assert_eq!(buffer, vec![2, 0, 0]);
set_array_bit(&mut buffer[..], 4);
assert_eq!(buffer, vec![18, 0, 0]);
unset_array_bit(&mut buffer[..], 1);
assert_eq!(b... | rust_cleaned_test_functions.jsonl/115733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 364
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
3858,
13996,
368,
341,
286,
1077,
5206,
4147,
284,
7486,
20703,
15,
11,
220,
15,
11,
220,
15,
935,
286,
738,
3858,
13996,
2099,
6984,
4147,
95874,
1125,
220,
16,
317,
286,
2060,
10714,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_egui_e2e() {
let mut demo_windows = crate::demos::DemoWindows::default();
let mut ctx = crate::CtxRef::default();
let raw_input = crate::RawInput::default();
const NUM_FRAMES: usize = 5;
for _ in 0..NUM_FRAMES {
ctx.begin_frame(raw_input.clone());
demo_window... | rust_cleaned_test_functions.jsonl/79114 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
90209,
1963,
2204,
17,
68,
368,
341,
262,
1077,
5206,
16661,
58220,
284,
17717,
486,
67,
14946,
486,
37413,
13164,
486,
2258,
543,
262,
1077,
5206,
5635,
284,
17717,
486,
23684,
3945,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_scalar_mul2() {
let base_point = Secp256k1Point::generator();
let int: Secp256k1Scalar = ECScalar::from(&BigInt::from(2)).unwrap();
let test = (base_point * int).unwrap();
assert_eq!(
test.x_coor().to_hex(),
"c6047f9441ed7d6d3045406e95c07cd... | rust_cleaned_test_functions.jsonl/60390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41652,
24944,
17,
368,
341,
286,
1077,
2331,
6085,
284,
4520,
79,
17,
20,
21,
74,
16,
2609,
486,
35851,
543,
286,
1077,
526,
25,
4520,
79,
17,
20,
21,
74,
16,
20639,
284,
20633,
20639,
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_frozen_account_nonexistent() {
let frozen_pubkey =
Pubkey::from_str("My11111111111111111111111111111111111111111").unwrap();
let mut db = AccountsDB::new(Vec::new());
let ancestors = vec![(0, 0)].into_iter().collect();
db.freeze_accounts(&ancestors, &... | rust_cleaned_test_functions.jsonl/86958 | {
"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,
761,
42240,
13500,
21637,
64085,
368,
341,
286,
1077,
19690,
34014,
792,
4035,
310,
22611,
792,
486,
1499,
2895,
445,
5050,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_print() -> TestResult {
// TODO: If POLAR_LOG is on this test will fail.
let p = polar();
p.load_str("f(x,y,z) if print(x, y, z);")?;
let mut messages = vec![];
let message_handler = |output: &Message| {
messages.push(output.clone());
};
let q = p.new_query("f... | rust_cleaned_test_functions.jsonl/68134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10064,
368,
1464,
3393,
2077,
341,
262,
442,
5343,
25,
1416,
31640,
934,
8419,
374,
389,
419,
1273,
686,
3690,
624,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
445,
69,
2075,
7358,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_namespace_prevents_collisions() {
init();
let schema_str_1 = r#"{
"name": "A",
"type": "record",
"fields": [
{"name": "field_one", "type": "double"}
]
}"#;
let schema_str_2 = r#"{
"name": "A",
"type": "record",
"... | rust_cleaned_test_functions.jsonl/69031 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 361
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41571,
10442,
47664,
43597,
6805,
368,
341,
262,
2930,
543,
262,
1077,
10802,
2895,
62,
16,
284,
435,
55543,
515,
286,
330,
606,
788,
330,
32,
756,
286,
330,
1313,
788,
330,
8548,
756,
286,
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_invalid_start() {
check_raw_str(
r##"#~"abc"#"##,
UnvalidatedRawStr {
n_start_hashes: 1,
n_end_hashes: 0,
valid_start: false,
possible_terminator_offset: None,
},
Err(LexRawStr... | rust_cleaned_test_functions.jsonl/105526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
4906,
368,
341,
286,
1779,
16067,
2895,
1006,
310,
435,
565,
57676,
93,
1,
13683,
1,
55543,
565,
345,
310,
1230,
59590,
20015,
2580,
341,
394,
308,
4906,
91616,
25,
220,
16,
345,
394,
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_nested() {
macro_rules! test_nested {
($new:expr, $($input:ident => $output:expr,)*) => {
$(
assert_eq!($new(Address::$input), $output);
)*
};
}
// Unicast
tes... | rust_cleaned_test_functions.jsonl/33648 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1251
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
368,
341,
16885,
23459,
286,
18072,
21407,
0,
1273,
66279,
341,
310,
1711,
931,
96011,
11,
93977,
1355,
25,
1713,
589,
400,
3006,
96011,
46021,
3764,
589,
341,
394,
400,
1006,
503,
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_equality() {
let _context = crate::quick_init().unwrap();
let x = UnifiedBox::new(5u64).unwrap();
let y = UnifiedBox::new(5u64).unwrap();
let z = UnifiedBox::new(0u64).unwrap();
assert_eq!(x, y);
assert!(x != z);
} | rust_cleaned_test_functions.jsonl/47358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2204,
10473,
368,
341,
286,
1077,
716,
2147,
284,
17717,
486,
27763,
6137,
1005,
15454,
543,
286,
1077,
856,
284,
72434,
1611,
486,
931,
7,
20,
84,
21,
19,
568,
15454,
543,
286,
1077,
379,
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_single_uuid() {
let id = Uuid::new_v4();
let ctx = ReadIndexContext::parse(id.as_bytes()).unwrap();
assert_eq!(
ctx,
ReadIndexContext {
id,
request: None,
locked: None,
}
... | rust_cleaned_test_functions.jsonl/57412 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19487,
25540,
368,
341,
286,
1077,
877,
284,
547,
2423,
486,
931,
2273,
19,
543,
1789,
286,
1077,
5635,
284,
4457,
1552,
1972,
486,
6400,
3724,
5357,
12524,
6011,
15454,
543,
286,
2060,
10714,
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_upload_stream() {
let mut meta = SSTMeta::new();
meta.set_crc32(123);
meta.set_length(321);
let mut data = vec![0u8; UPLOAD_CHUNK_SIZE * 4];
rand::thread_rng().fill_bytes(&mut data);
let mut stream = UploadStream::new(meta.clone(), &data);
... | rust_cleaned_test_functions.jsonl/11267 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21691,
12673,
368,
341,
286,
1077,
5206,
8823,
284,
91416,
12175,
486,
931,
543,
286,
8823,
980,
59084,
18,
17,
7,
16,
17,
18,
317,
286,
8823,
980,
5118,
7,
18,
17,
16,
626,
286,
1077,
5206,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_fail_via_panic() {
let mut runner = TestRunner::new(Config {
failure_persistence: None,
.. Config::default()
});
let result = runner.run(&(0u32..10u32), |v| {
assert!(v < 5, "not less than 5");
Ok(())
});
ass... | rust_cleaned_test_functions.jsonl/38551 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
80710,
620,
31270,
368,
341,
286,
1077,
5206,
22259,
284,
3393,
19486,
486,
931,
33687,
341,
310,
7901,
620,
8026,
25,
2240,
345,
310,
5241,
5532,
486,
2258,
741,
286,
1625,
286,
1077,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_present() {
eval!(r#"let t = {}; present t"#, Value::from(true));
eval!(
r#"let t = {"a":{"b": {"c": ["d", "e"],}}}; present t.a"#,
Value::from(true)
);
eval!(
r#"let t = {"a":{"b": {"c": ["d", "e"]}}}; present t.a.b"#,
... | rust_cleaned_test_functions.jsonl/45673 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1071
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36976,
368,
341,
286,
5603,
10297,
81,
55543,
1149,
259,
284,
52166,
3042,
259,
57676,
11,
5162,
486,
1499,
3715,
1106,
286,
5603,
33673,
310,
435,
55543,
1149,
259,
284,
5212,
64,
22317,
65,
78... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_at_mutable() {
use super::PauseAt;
let mut count = 0;
let mut iter = (1..10).into_iter().peekable();
let mut iter = PauseAt::from_peekable(&mut iter, |_| {
count += 1;
count == 4
});
assert_eq!(iter.peek(), So... | rust_cleaned_test_functions.jsonl/61317 | {
"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,
21039,
3752,
717,
5922,
368,
341,
286,
990,
2256,
486,
28391,
1655,
280,
286,
1077,
5206,
1760,
284,
220,
15,
280,
286,
1077,
5206,
5367,
284,
320,
16,
496,
16,
15,
568,
18122,
11723,
1005,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_readable() {
test_readable(AccessRights::READ, true);
test_readable(AccessRights::READ_ADD, true);
test_readable(AccessRights::READ_WRITE, true);
test_readable(AccessRights::READ_ADD_WRITE, true);
test_readable(AccessRights::ADD, false);
test_re... | rust_cleaned_test_functions.jsonl/131284 | {
"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,
6892,
91232,
368,
341,
286,
1273,
91232,
4346,
1322,
81875,
486,
9560,
11,
830,
317,
286,
1273,
91232,
4346,
1322,
81875,
486,
9560,
8581,
11,
830,
317,
286,
1273,
91232,
4346,
1322,
81875,
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_owned_module_dropped_ee_and_context() {
Target::initialize_native(&InitializationConfig::default()).unwrap();
let _module = {
let context = Context::create();
let module = context.create_module("my_mod");
module.create_jit_execution_engine(OptimizationLevel::Non... | rust_cleaned_test_functions.jsonl/63541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51973,
10750,
814,
41716,
62,
2127,
8378,
8467,
368,
341,
262,
13483,
486,
21641,
44494,
2099,
61928,
2648,
486,
2258,
6011,
15454,
1428,
262,
1077,
716,
4352,
284,
341,
286,
1077,
2266,
284,
9608... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_input() -> std::result::Result<(), ExitError> {
let input: [u8; 0] = [];
let expected = b"\
\xa7\xff\xc6\xf8\xbf\x1e\xd7\x66\x51\xc1\x47\x56\xa0\x61\xd6\x62\
\xf5\x80\xff\x4d\xe4\x3b\x49\xfa\x82\xd8\x0a\x4b\x80\xf8\x43\x4a\
";
let cost: u64 = 1;
match <Sha3FIPS256 as Line... | rust_cleaned_test_functions.jsonl/79855 | {
"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,
15124,
5898,
368,
1464,
1460,
486,
1382,
486,
2077,
68843,
18995,
1454,
29,
341,
197,
10217,
1946,
25,
508,
84,
23,
26,
220,
15,
60,
284,
5907,
197,
10217,
3601,
284,
293,
83383,
298,
197,
463... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_revocable_cred_def_with_payments() {
let wallet_name = "test_create_revocable_cred_def";
init!("ledger");
let data = r#"["address1","address2","zip","city","state"]"#.to_string();
let (schema_id, _) = ::utils::libindy::anoncreds::tests::create_and_write_te... | rust_cleaned_test_functions.jsonl/64622 | {
"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,
8657,
38082,
509,
480,
73475,
7844,
6615,
91257,
368,
341,
286,
1077,
15085,
1269,
284,
330,
1944,
8657,
38082,
509,
480,
73475,
7844,
876,
286,
2930,
17223,
50704,
3071,
286,
1077,
821,
284,
435,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() -> Result<()> {
let ignore_file_path = Path::new(".gitignore");
let file_path = Path::new("foo.txt");
let (_td, repo) = repo_init()?;
let root = repo.path().parent().unwrap();
let repo_path = root.as_os_str().to_str().unwrap();
File::creat... | rust_cleaned_test_functions.jsonl/68777 | {
"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,
15124,
368,
1464,
5714,
71698,
341,
286,
1077,
10034,
2458,
2638,
284,
7933,
486,
931,
5680,
12882,
13130,
797,
286,
1077,
1034,
2638,
284,
7933,
486,
931,
445,
7975,
3909,
797,
286,
1077,
5453,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_with_miter_limit(){
let expected_limit = 3.0;
let stroke_options = StrokeOptions::default().with_miter_limit(expected_limit);
assert_eq!(expected_limit, stroke_options.miter_limit);
} | rust_cleaned_test_functions.jsonl/25093 | {
"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,
6615,
717,
2015,
14763,
3032,
262,
1077,
3601,
14763,
284,
220,
18,
13,
15,
280,
262,
1077,
12654,
8743,
284,
68934,
3798,
486,
2258,
1005,
4197,
717,
2015,
14763,
15253,
14763,
626,
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 |
#[test]
fn test_wrong_length_mixtures() {
let mix_weights = Vector::new(vec![0.1, 0.25, 0.75, 0.5]);
let gmm_res = GaussianMixtureModel::with_weights(3, mix_weights);
assert!(gmm_res.is_err());
} | rust_cleaned_test_functions.jsonl/88283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
5118,
67729,
18513,
368,
341,
286,
1077,
6514,
21114,
284,
4196,
486,
931,
25592,
20703,
15,
13,
16,
11,
220,
15,
13,
17,
20,
11,
220,
15,
13,
22,
20,
11,
220,
15,
13,
20,
2558,
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_non_existing_database() {
let repo = Repo::new("test.db");
let created = repo.assure_created();
let created2 = repo.assure_created();
assert!(created.is_ok());
assert!(created2.is_ok());
assert!(created.unwrap() == true);
assert!(created2.unwrap() == true);
std:... | rust_cleaned_test_functions.jsonl/48628 | {
"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,
21637,
62630,
27341,
368,
341,
262,
1077,
15867,
284,
71509,
486,
931,
445,
1944,
7076,
797,
262,
1077,
3465,
284,
15867,
13,
395,
552,
27288,
543,
262,
1077,
3465,
17,
284,
15867,
13,
395,
552,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_escape_multibyte_code_points() {
assert_eq!(escape_str_attribute("☃<"), "☃<");
assert_eq!(escape_str_pcdata("☃<"), "☃<");
} | rust_cleaned_test_functions.jsonl/125767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 92
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21832,
26290,
579,
78361,
4136,
12928,
368,
341,
286,
2060,
10714,
10297,
12998,
2895,
16791,
445,
146024,
27,
3975,
330,
146024,
5,
4832,
34649,
286,
2060,
10714,
10297,
12998,
2895,
35612,
691,
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 |
#[test]
fn test_transform_image_colorspace() {
START.call_once(|| {
magick_wand_genesis();
});
let wand = MagickWand::new();
assert!(wand.read_image("tests/data/IMG_5745.JPG").is_ok());
assert_eq!(
wand.get_image_colorspace(),
bindings::ColorspaceType_sRGBColorspace
... | rust_cleaned_test_functions.jsonl/57703 | {
"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,
18449,
4954,
6714,
8746,
368,
341,
262,
20998,
8524,
7630,
79453,
341,
286,
4878,
865,
1670,
437,
16322,
13774,
543,
262,
1625,
262,
1077,
28710,
284,
87154,
54,
437,
486,
931,
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,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_lnpbp1_vs_lnpbp2() {
let tag = sha256::Hash::hash(b"TEST_TAG2");
let msg = "test message";
gen_secp_pubkeys(9).into_iter().for_each(|pubkey| {
let lnpbp1_commitment =
LNPBP1Commitment::embed_commit(&LNPBP1Container { pubkey, tag }, &msg).unwrap... | rust_cleaned_test_functions.jsonl/117910 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 458
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
6199,
17808,
16,
42434,
907,
6199,
17808,
17,
368,
341,
286,
1077,
4772,
284,
15870,
17,
20,
21,
486,
6370,
486,
8296,
1883,
1,
10033,
16592,
17,
797,
286,
1077,
3750,
284,
330,
1944,
194... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_which_second() {
let f = TestFixture::new();
let b = f.mk_bin("b/another", env::consts::EXE_EXTENSION).unwrap();
assert_eq!(_which(&f, "another").unwrap(), b);
} | rust_cleaned_test_functions.jsonl/13400 | {
"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,
8206,
29644,
368,
341,
262,
1077,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
293,
284,
282,
35011,
21816,
445,
65,
14,
41963,
497,
6105,
486,
95773,
486,
3257,
36,
37012,
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,
1,
1,
1
] | 1 |
#[test]
fn test_classify_disk_layout() {
let root_a = mkdev("/dev/sda3", 123);
let root_b = mkdev("/dev/sda5", 123);
let root_c = mkdev("/dev/sda7", 123);
let root_b_small = mkdev("/dev/sda5", 11);
assert_eq!(classify_disk_layout(&[root_a.clone()]), DiskLayout::NotCros);... | rust_cleaned_test_functions.jsonl/83033 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 406
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4790,
1437,
41687,
14466,
368,
341,
286,
1077,
3704,
4306,
284,
23789,
3583,
4283,
3583,
2687,
3235,
18,
497,
220,
16,
17,
18,
317,
286,
1077,
3704,
880,
284,
23789,
3583,
4283,
3583,
2687,
3235... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fail_match_pattern_by_word_token() {
parse_macro(
r#"
macro_rules! foo {
($ i:ident) => (
mod $ i {}
);
(spam $ i:ident) => (
fn $ i() {}
);
(eggs $ i:ident) => (
struc... | rust_cleaned_test_functions.jsonl/28709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 316
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
10708,
21260,
3710,
13533,
6458,
368,
341,
262,
4715,
58810,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
600,
25,
1713,
8,
589,
2399,
394,
1463,
400,
600,
5613,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_minute() {
assert_eq!(Ok((&[][..], 0)), minute(b"00"));
assert_eq!(Ok((&[][..], 1)), minute(b"01"));
assert_eq!(Ok((&[][..], 30)), minute(b"30"));
assert_eq!(Ok((&[][..], 59)), minute(b"59"));
assert!(minute(b"60").is_err());
assert!(minute(b"61").is_err());
assert!(... | rust_cleaned_test_functions.jsonl/58590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 170
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76944,
368,
341,
262,
2060,
10714,
10297,
11578,
42902,
63449,
496,
1125,
220,
15,
5731,
9383,
1883,
1,
15,
15,
4010,
262,
2060,
10714,
10297,
11578,
42902,
63449,
496,
1125,
220,
16,
5731,
9383,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simple() {
let mut f = TestFixture::new();
let stack = Section::new();
stack.start().set_const(0x80000000);
// There should be no references to the stack in this walk: we don't
// context frame's caller should fail. So there's no need for us to
// provide stack conte... | rust_cleaned_test_functions.jsonl/79539 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
368,
341,
262,
1077,
5206,
282,
284,
3393,
18930,
486,
931,
543,
262,
1077,
5611,
284,
11113,
486,
931,
543,
262,
5611,
4962,
1005,
746,
13610,
7,
15,
87,
23,
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_units_rad() {
let vm = &mut VM::new();
vm.set_source("10.0E rad");
vm.evaluate_input();
assert_eq!(vm.last_error(), None);
assert_eq!(vm.f_stack().len(), 1);
let t = vm.f_stack().pop();
assert!(double_value_check(t, 10.0));
} | rust_cleaned_test_functions.jsonl/29589 | {
"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,
28345,
39764,
368,
341,
286,
1077,
10995,
284,
609,
6984,
17792,
486,
931,
543,
286,
10995,
980,
10347,
445,
16,
15,
13,
15,
36,
8862,
797,
286,
10995,
36036,
5898,
543,
286,
2060,
10714,
10297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_primary_nodes() {
let mut bytecode: Vec<u8> = BIND_HEADER.to_vec();
append_section_header(&mut bytecode, SYMB_MAGIC_NUM, 29);
let device_name: [u8; 5] = [0x4C, 0x4F, 0x4F, 0x4E, 0]; // "LOON"
bytecode.extend_from_slice(&[1, 0, 0, 0]);
bytecode.ex... | rust_cleaned_test_functions.jsonl/24047 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 863
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
45314,
14896,
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,
16079,
8412,
49194,
9631,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_city() {
let input = vec![
vec!["jiangsu, nanjing, nju".to_string()],
vec!["hubei, wuhan, hust".to_string()],
vec!["shandong, jinan, sdu".to_string()],
];
let result = vec![Some("nanjing".to_string()), None, None];
let result = run(input, result);
dbg!(&result);
... | rust_cleaned_test_functions.jsonl/92581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
24971,
368,
341,
220,
1077,
1946,
284,
7486,
90515,
262,
7486,
0,
1183,
63547,
27051,
11,
20021,
98168,
11,
308,
8613,
3263,
983,
3904,
73845,
262,
7486,
0,
1183,
71,
3760,
72,
11,
289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_malformed_key_value_data_handling() {
let data = [
&0_u32.to_le_bytes()[..],
// Regular key-value pair
&7_u32.to_le_bytes()[..],
b"xyz\0123 ",
// Malformed key-value pair with missing NUL byte
&11_u32.to_le_bytes()[..],
b"abcdefghi!! ",... | rust_cleaned_test_functions.jsonl/111699 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 382
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
278,
10155,
3097,
3142,
1769,
75642,
368,
341,
262,
1077,
821,
284,
2278,
286,
609,
15,
7300,
18,
17,
2389,
11751,
12524,
10116,
496,
1259,
286,
442,
28800,
1376,
19083,
6716,
198,
286,
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_dotp_one_unsorted() {
let lhs = Instance::parse("1 1:1 2:1 3:1").unwrap();
let rhs = Instance::parse("2 6:1 3:1").unwrap();
assert_eq!(1, dot_product(&lhs, &rhs) as i32)
} | rust_cleaned_test_functions.jsonl/63958 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30941,
79,
11667,
4907,
28298,
368,
341,
286,
1077,
22505,
284,
19283,
486,
6400,
445,
16,
220,
16,
25,
16,
220,
17,
25,
16,
220,
18,
25,
16,
1827,
15454,
543,
286,
1077,
12916,
284,
19283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vote_signature() {
let (vote_pubkey, mut vote_account) = create_test_account();
let vote = Vote::new(vec![1], Hash::default());
// unsigned
let res = process_vote(
&mut KeyedAccount::new(&vote_pubkey, false, &mut vote_account),
&[(*vote.s... | rust_cleaned_test_functions.jsonl/69964 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1840
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
39859,
368,
341,
286,
1077,
320,
29358,
34014,
792,
11,
5206,
6910,
13500,
8,
284,
1855,
4452,
13500,
1428,
286,
1077,
6910,
284,
34034,
486,
931,
25592,
20703,
16,
1125,
6531,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tan() {
assert!(close(_0_0i.tan(), _0_0i));
assert!(close(_1_0i.scale(f64::consts::PI / 4.0).tan(), _1_0i));
assert!(close(_1_0i.scale(f64::consts::PI).tan(), _0_0i));
for &c in all_consts.iter() {
assert!(close(c.c... | rust_cleaned_test_functions.jsonl/105693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 289
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
276,
368,
341,
310,
2060,
10297,
5552,
2490,
15,
62,
15,
72,
734,
276,
1507,
716,
15,
62,
15,
72,
1106,
310,
2060,
10297,
5552,
2490,
16,
62,
15,
72,
17266,
955,
21,
19,
486,
95773,
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_move_items_zero_sized() {
let vec = vec![(), (), ()];
let mut vec2 = vec![];
for i in vec {
vec2.push(i);
}
assert_eq!(vec2, [(), (), ()]);
} | rust_cleaned_test_functions.jsonl/24418 | {
"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,
17134,
12134,
19359,
643,
1506,
368,
341,
262,
1077,
7486,
284,
7486,
20703,
1507,
38104,
1719,
935,
262,
1077,
5206,
7486,
17,
284,
7486,
0,
15078,
262,
369,
600,
304,
7486,
341,
286,
7486,
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
] | 2 |
#[test]
fn test_builder() {
// Test a few invalid ones.
let flag = NumberFormat::builder().exponent_decimal(b'.').build();
assert_eq!(flag, None);
// Test a few valid ones.
let flag = NumberFormat::builder().decimal_point(b'.').build();
assert!(flag.is_some());
... | rust_cleaned_test_functions.jsonl/70030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 331
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28532,
368,
341,
286,
442,
3393,
264,
2421,
8318,
6174,
624,
286,
1077,
5181,
284,
5624,
4061,
486,
17850,
1005,
327,
1146,
74429,
1883,
4427,
1823,
5834,
543,
286,
2060,
10714,
10297,
9903,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hide_cursor() {
let mut test = SdlTest::new();
test.console().hide_cursor().unwrap();
test.console().hide_cursor().unwrap();
test.console().write(b"Cursor hidden").unwrap();
test.verify("sdl-hide-cursor");
} | rust_cleaned_test_functions.jsonl/15265 | {
"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,
49735,
28601,
368,
341,
286,
1077,
5206,
1273,
284,
328,
8736,
2271,
486,
931,
1428,
286,
1273,
47802,
1005,
8559,
28601,
1005,
15454,
543,
286,
1273,
47802,
1005,
8559,
28601,
1005,
15454,
543,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_optimize_switch_with_return() {
test(
concat!(
"function f() {",
" switch('x') {",
" case 'x': return 1;",
" case 'y': return 2;",
" }",
"}",
),
"function f() { return 1; }",
);
t... | rust_cleaned_test_functions.jsonl/398 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 468
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15032,
11853,
27652,
6615,
12511,
368,
341,
262,
1273,
1006,
286,
33720,
33673,
310,
330,
1688,
282,
368,
314,
756,
310,
330,
220,
3398,
492,
87,
863,
314,
756,
310,
330,
262,
1142,
364,
87,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_logger_fails() {
let result = Err(fidl::Error::ServerRequestRead(zx::Status::PEER_CLOSED));
result.log_fidl_response_error("");
} | rust_cleaned_test_functions.jsonl/81045 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
27413,
761,
6209,
368,
341,
286,
1077,
1102,
284,
15495,
40556,
75,
486,
1454,
486,
5475,
1900,
4418,
13174,
87,
486,
2522,
486,
1740,
640,
78140,
1106,
286,
1102,
1665,
761,
55464,
9655,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_state_synchronization() {
// - Kill one node and continue submitting transactions to the others.
// - Restart the node
// - Wait for all the nodes to catch up
// - Verify that the restarted node has synced up with the submitted transactions.
let (mut env, mut clien... | rust_cleaned_test_functions.jsonl/62878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
4387,
643,
67929,
368,
341,
1066,
262,
442,
481,
26835,
825,
2436,
323,
3060,
33094,
14131,
311,
279,
3800,
624,
262,
442,
481,
56801,
279,
2436,
198,
262,
442,
481,
13824,
369,
678,
279,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_round_up() {
assert_eq!(round_up_to_block_size(0), 0);
assert_eq!(round_up_to_block_size(1), BLOCK_SIZE);
assert_eq!(round_up_to_block_size(BLOCK_SIZE - 1), BLOCK_SIZE);
assert_eq!(round_up_to_block_size(BLOCK_SIZE), BLOCK_SIZE);
assert_eq!(round_up_to_blo... | rust_cleaned_test_functions.jsonl/29295 | {
"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,
29896,
8237,
368,
341,
286,
2060,
10714,
10297,
1049,
8237,
2346,
7113,
2368,
7,
15,
701,
220,
15,
317,
286,
2060,
10714,
10297,
1049,
8237,
2346,
7113,
2368,
7,
16,
701,
28677,
4098,
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_bool_params() {
test_type(
"BOOL",
&[(Some(true), "'t'"), (Some(false), "'f'"), (None, "NULL")],
);
} | rust_cleaned_test_functions.jsonl/120841 | {
"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,
22159,
6745,
368,
341,
262,
1273,
1819,
1006,
286,
330,
10395,
756,
286,
609,
9697,
8373,
3715,
701,
7178,
83,
6,
3975,
320,
8373,
3576,
701,
7178,
69,
6,
3975,
320,
4064,
11,
330,
4576,
899,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_repair_peers() {
let node_keypair = Arc::new(Keypair::new());
let mut cluster_info = ClusterInfo::new(
ContactInfo::new_localhost(&node_keypair.pubkey(), timestamp()),
node_keypair,
);
for i in 0..10 {
let mut peer_root = 5;
... | rust_cleaned_test_functions.jsonl/12825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 708
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
12670,
36367,
388,
368,
341,
286,
1077,
2436,
3097,
12670,
284,
19689,
486,
931,
7,
6608,
1082,
1310,
486,
931,
1423,
286,
1077,
5206,
10652,
3109,
284,
35380,
1731,
486,
931,
1006,
310,
9... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_entropy() {
let entropy = |x: Binomial| x.entropy().unwrap();
test_case(0.0, 4, 0.0, entropy);
test_almost(0.3, 3, 1.1404671643037712668976423399228972051669206536461, 1e-15, entropy);
test_case(1.0, 2, 0.0, entropy);
} | rust_cleaned_test_functions.jsonl/114727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
50374,
368,
341,
286,
1077,
47502,
284,
760,
87,
25,
29344,
20855,
91,
856,
13,
49150,
1005,
15454,
543,
286,
1273,
19096,
7,
15,
13,
15,
11,
220,
19,
11,
220,
15,
13,
15,
11,
47502,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bit_field_insert() {
assert_eq!(bit_field_insert(0x0000_0000, 0xFFFF_FFFF, 0, 0), 0x0000_0001);
assert_eq!(bit_field_insert(0x0000_0000, 0xFFFF_FFFF, 31, 31), 0x8000_0000);
assert_eq!(bit_field_insert(0x0000_0000, 0xFFFF_FFFF, 31, 0), 0xFFFF_FFFF);
assert_eq!(bit_... | rust_cleaned_test_functions.jsonl/50755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
5013,
17678,
368,
341,
286,
2060,
10714,
10297,
4489,
5013,
17678,
7,
15,
87,
15,
15,
15,
15,
62,
15,
15,
15,
15,
11,
220,
15,
14384,
1400,
31203,
11,
220,
15,
11,
220,
15,
701,
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_pubkey_serialize() {
let pubkey = X25519Public::try_from(&[0x55u8; 32] as &[u8]).expect("Could not load pubkey");
let serialized = serialize(&pubkey).expect("Could not serialize pubkey");
let deserialized: X25519Public =
deserialize(&serialized).expect("Could ... | rust_cleaned_test_functions.jsonl/120796 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
792,
88686,
368,
341,
286,
1077,
95116,
284,
1599,
17,
20,
20,
16,
24,
12676,
486,
1539,
5673,
2099,
58,
15,
87,
20,
20,
84,
23,
26,
220,
18,
17,
60,
438,
44590,
84,
23,
10697,
1711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_request_processor_new() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let genesis = create_genesis_config(100);
let bank = Arc::new(Bank::new_for_tests(&genesis.genesis_config));
bank.transfer(20, &genesis.mint_keypair, &bob_pubkey)
.unwrap();... | rust_cleaned_test_functions.jsonl/6289 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
7893,
50127,
5921,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
59366,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
15,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_many() {
const NUM_POINTS: usize = 1000;
let points = create_random_points(NUM_POINTS, SEED_1);
let mut tree = RTree::new();
for p in &points {
tree.insert(*p);
tree.root.sanity_check::<DefaultParams>();
}
assert_eq!(... | rust_cleaned_test_functions.jsonl/71302 | {
"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,
17678,
22101,
368,
341,
286,
733,
15943,
64163,
25,
22301,
284,
220,
16,
15,
15,
15,
280,
286,
1077,
3501,
284,
1855,
22644,
12928,
78928,
64163,
11,
5052,
1479,
62,
16,
317,
286,
1077,
5206,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.