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_insert_or_update_struct() {
let mutation = insert_or_update_struct(
"Guild",
TestStruct {
struct_field: "abc".to_string(),
},
);
match mutation.operation.unwrap() {
v1::mutation::Operation::InsertOrUpdate(w) ... | rust_cleaned_test_functions.jsonl/132335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
8734,
8882,
15126,
368,
341,
286,
1077,
26374,
284,
5656,
8734,
8882,
15126,
1006,
310,
330,
72574,
756,
310,
3393,
9422,
341,
394,
2036,
5013,
25,
330,
13683,
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... | 2 |
#[test]
fn test_34() {
assert_eq!(Solution::search_range(vec![5, 7, 7, 8, 8, 10], 8), vec![3, 4]);
assert_eq!(Solution::search_range(vec![5, 7, 7, 8, 8, 10], 6), vec![-1, -1]);
} | rust_cleaned_test_functions.jsonl/5502 | {
"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,
62,
18,
19,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
1836,
9698,
25592,
20703,
20,
11,
220,
22,
11,
220,
22,
11,
220,
23,
11,
220,
23,
11,
220,
16,
15,
1125,
220,
23,
701,
7486,
2070... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_peekable() {
let path = Builder::new().prefix("var").tempdir().unwrap();
let cf = "cf";
let engine = RocksEngine::from_db(Arc::new(
raw_util::new_engine(path.path().to_str().unwrap(), None, &[cf], None).unwrap(),
));
engine.put(b"k1", b"v1").u... | rust_cleaned_test_functions.jsonl/23216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 296
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29107,
480,
368,
341,
286,
1077,
1815,
284,
20626,
486,
931,
1005,
11849,
445,
947,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
24111,
284,
330,
9792,
876,
286,
1077,
4712,
284,
68031,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_offset_date_time() -> Result<()> {
let db = checked_memory_handle()?;
let mut ts_vec = vec![];
let make_datetime =
|secs, nanos| OffsetDateTime::from_unix_timestamp(secs) + Duration::from_nanos(nanos);
ts_vec.push(make_datetime(10_000, 0));
... | rust_cleaned_test_functions.jsonl/94394 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6917,
4164,
3009,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
368,
69493,
286,
1077,
5206,
10591,
13251,
284,
7486,
0,
40901,
286,
1077,
1281,
28943,
4035,
310,
760,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timer_correct() {
let (met_tx, met_rx) = mpsc::channel();
let mut rec = MetricsRecorder::new(met_tx, true);
// use Timer to make one timing
let _rv = {
let _t = Timer::new(&mut rec, "cmd");
sleep_secs(0.25);
()
};
// flush the metrics so we can s... | rust_cleaned_test_functions.jsonl/122143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16255,
31550,
368,
341,
262,
1077,
320,
4059,
17805,
11,
2270,
24330,
8,
284,
296,
81984,
486,
10119,
543,
262,
1077,
5206,
1395,
284,
54190,
47023,
486,
931,
1255,
295,
17805,
11,
830,
626,
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_create_date_from_int_fail() {
assert!(Value::date_from_int(0, 2, 20).is_err());
assert!(Value::date_from_int(2016, 0, 20).is_err());
assert!(Value::date_from_int(2016, 1, 0).is_err());
assert!(Value::date_from_int(2016, 1, 32).is_err());
assert!(Value::date_from_int(2016, 4, ... | rust_cleaned_test_functions.jsonl/86206 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
4164,
5673,
4042,
22121,
368,
341,
262,
2060,
10297,
1130,
486,
1028,
5673,
4042,
7,
15,
11,
220,
17,
11,
220,
17,
15,
568,
285,
9266,
1423,
262,
2060,
10297,
1130,
486,
1028,
5673,
4042... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_union() {
use self::int::dec;
use ast::ArraySize::VariableExpression;
use ast::Designator::Member;
use ast::Initializer::{Expression, List};
use ast::TypeSpecifier::{Double, Int, Long};
use parser::declaration;
assert_eq!(
declaration(
"union { lo... | rust_cleaned_test_functions.jsonl/107561 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1984
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51621,
368,
341,
262,
990,
656,
486,
396,
486,
8169,
280,
262,
990,
11763,
486,
1857,
1695,
486,
7827,
9595,
280,
262,
990,
11763,
486,
20470,
850,
486,
9366,
280,
262,
990,
11763,
486,
44251,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let rules = create_rules(
r#"
macro_rules! foo {
($ i:ident) => (
mod $ i {}
);
(spam $ i:ident) => (
fn $ i() {}
);
(eggs $ i:ident) => (
... | rust_cleaned_test_functions.jsonl/14693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 339
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22121,
10708,
21260,
3710,
13533,
6458,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
600,
25,
1713,
8,
589,
2399,
394,
1463,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scaled_represenation() {
assert_eq!(
ClientProxy::convert_to_scaled_representation("10", 1_000_000, 100).unwrap(),
10 * 1_000_000
);
assert_eq!(
ClientProxy::convert_to_scaled_representation("10.", 1_000_000, 100).unwrap(),
... | rust_cleaned_test_functions.jsonl/43122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61715,
1288,
23623,
268,
367,
368,
341,
286,
2060,
10714,
33673,
310,
8423,
16219,
486,
14166,
2346,
61715,
94263,
445,
16,
15,
497,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
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 |
#[test]
fn test_to_u8() {
let v1 = Vec3::new(0.5f64, -1.0f64, 0.75f64);
let u1 = [127, 0, 191];
assert_eq!(v1.to_u8(), u1);
} | rust_cleaned_test_functions.jsonl/120486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 108
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
7300,
23,
368,
972,
286,
1077,
348,
16,
284,
11312,
18,
486,
931,
7,
15,
13,
20,
69,
21,
19,
11,
481,
16,
13,
15,
69,
21,
19,
11,
220,
15,
13,
22,
20,
69,
21,
19,
736,
286,
107... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_force_at_point_3d() {
let mut forces = ForceAccumulator::<Vector3<f32>, Vector3<f32>>::new();
// add at origin -> no torque
forces.add_force_at_point(
Vector3::new(1., 1., 1.),
Point3::new(0., 0., 0.),
&BodyPose3::one(),
);
... | rust_cleaned_test_functions.jsonl/43128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
40739,
3752,
6085,
62,
18,
67,
368,
341,
286,
1077,
5206,
8437,
284,
11732,
14603,
372,
10511,
27638,
3781,
18,
63895,
18,
17,
8066,
4196,
18,
63895,
18,
17,
77595,
931,
543,
286,
442,
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... | 1 |
#[test]
fn test_register_histogram_with_registry_trailing_comma() {
use crate::Registry;
use std::collections::HashMap;
let mut labels = HashMap::new();
labels.insert("mykey".to_string(), "myvalue".to_string());
let custom_registry = Registry::new_custom(Some("myprefix".to_string()), Some(l... | rust_cleaned_test_functions.jsonl/86376 | {
"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,
14000,
68564,
6615,
50650,
3547,
14277,
2965,
1728,
368,
341,
262,
990,
17717,
486,
15603,
280,
262,
990,
1460,
486,
51137,
486,
18497,
401,
262,
1077,
5206,
9201,
284,
10528,
486,
931,
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_cmac_modification() {
let a = tink_mac::subtle::AesCmac::new(KEY_RFC4493, 16).unwrap();
for (l, e) in EXPECTED.iter() {
let exp = hex::decode(e).expect("Could not decode expected string");
for i in 0..exp.len() {
for j in 0..8u8 {
let mut not_e... | rust_cleaned_test_functions.jsonl/77134 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
11948,
7480,
2404,
368,
341,
262,
1077,
264,
284,
90584,
22802,
486,
1966,
11239,
486,
32,
288,
34,
11948,
486,
931,
37076,
2568,
6754,
19,
19,
24,
18,
11,
220,
16,
21,
568,
15454,
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... | 4 |
#[test]
fn test_is_interleave1() {
assert_eq!(
Solution::is_interleave(
"aabcc".to_owned(),
"dbbca".to_owned(),
"aadbbcbcac".to_owned(),
),
true
);
} | rust_cleaned_test_functions.jsonl/33487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 171
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
15318,
21510,
16,
368,
341,
286,
2060,
10714,
33673,
310,
12478,
486,
285,
15318,
21510,
1006,
394,
330,
88607,
638,
3263,
983,
51973,
3148,
394,
330,
1999,
65,
924,
3263,
983,
51973,
3148,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_id_not_broken() {
let mut last_id = get_next_id();
assert_ne!(last_id, 0);
for _ in 0..1000 {
let next_id = get_next_id();
assert_ne!(next_id, 0);
assert!(last_id < next_id);
last_id = next_id;
}
} | rust_cleaned_test_functions.jsonl/132414 | {
"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,
842,
7913,
880,
81709,
368,
341,
286,
1077,
5206,
1537,
842,
284,
633,
11257,
842,
543,
286,
2060,
13925,
10297,
4259,
842,
11,
220,
15,
626,
286,
369,
716,
304,
220,
15,
496,
16,
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... | 2 |
#[test]
fn test_drop() {
let mut db = checked_memory_handle();
{
let tx = db.transaction().unwrap();
tx.execute_batch("INSERT INTO foo VALUES(1)").unwrap();
// default: rollback
}
{
let mut tx = db.transaction().unwrap();
... | rust_cleaned_test_functions.jsonl/95387 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 397
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29584,
368,
341,
286,
1077,
5206,
2927,
284,
10067,
19195,
10630,
543,
286,
341,
310,
1077,
9854,
284,
2927,
25706,
1005,
15454,
543,
310,
9854,
7769,
14534,
445,
12698,
12496,
15229,
14710,
7,
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_pss_padding_encode() {
test::run(
test_file!("rsa_pss_padding_tests.txt"),
|section, test_case| {
assert_eq!(section, "");
let digest_name = test_case.consume_string("Digest");
let alg = match digest_name.as_ref() {... | rust_cleaned_test_functions.jsonl/955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 803
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
778,
40726,
11224,
368,
341,
286,
1273,
486,
6108,
1006,
310,
1273,
2458,
17223,
60869,
620,
778,
40726,
32509,
3909,
4461,
310,
760,
2809,
11,
1273,
19096,
91,
341,
394,
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... | 3 |
#[test]
fn test_s3_region_env() {
let config = ConfigBuilder::new()
.with_log()
.with_api()
.with_pet()
.with_mask()
.with_model()
.with_metrics()
.with_redis()
.with_restore()
.with_s3()
... | rust_cleaned_test_functions.jsonl/19536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 327
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
18,
20627,
15879,
368,
341,
286,
1077,
2193,
284,
5532,
3297,
486,
931,
741,
310,
659,
4197,
5224,
741,
310,
659,
4197,
11697,
741,
310,
659,
4197,
75963,
741,
310,
659,
4197,
9999,
741,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sets_incs_and_decs() {
let mut intkey_iterator =
IntKeyIterator::new(2, 0.0, &[2, 3, 45, 95, 18, 81, 222, 2, 252, 2, 45]);
let payload1 = intkey_iterator.next();
assert!(payload1.is_some());
assert!(payload1.unwrap().verb.as_str() == "set");
... | rust_cleaned_test_functions.jsonl/14383 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 554
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21289,
1243,
4837,
8378,
2259,
4837,
368,
341,
286,
1077,
5206,
526,
792,
13491,
4035,
310,
1333,
1592,
11951,
486,
931,
7,
17,
11,
220,
15,
13,
15,
11,
44590,
17,
11,
220,
18,
11,
220,
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... | 3 |
#[test]
fn test_deserialization2() {
let insert_points = CollectionUpdateOperations::PointOperation(PointOperations::UpsertPoints(
PointsList(vec![
PointStruct {
id: 0,
vector: vec![1.0, 0.0, 1.0, 1.0],
payload: None,
},
... | rust_cleaned_test_functions.jsonl/93774 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
50563,
17,
368,
341,
262,
1077,
5656,
12928,
284,
11101,
4289,
35120,
486,
2609,
8432,
32737,
35120,
486,
98778,
529,
11411,
1006,
286,
20725,
852,
25592,
90515,
310,
5126,
9422,
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_noto_sans() {
run_test(
&TEST_DATA,
"harfbuzz/good-noto-sans.or",
"noto/NotoSansOriya-Regular.ttf",
&[JOINER_GLYPH_INDEX],
39,
);
} | rust_cleaned_test_functions.jsonl/91167 | {
"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,
1089,
2072,
643,
596,
368,
341,
394,
1598,
4452,
1006,
503,
609,
10033,
7896,
345,
503,
330,
12982,
10798,
8889,
4846,
1386,
29169,
78,
1331,
596,
24282,
756,
503,
330,
1921,
78,
20290,
2072,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decompression_with_prefix() {
let compressed: [u8; 250] = [
0, 188, 0, 0, 255, 32, 116, 104, 105, 115, 32, 105, 115, 32, 97, 32, 116, 101, 115,
116, 32, 115, 116, 114, 105, 110, 103, 32, 99, 111, 109, 112, 114, 101, 115, 115, 101,
100, 32, 98, 121, 32,... | rust_cleaned_test_functions.jsonl/62390 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 838
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2259,
83192,
6615,
13974,
368,
341,
286,
1077,
30649,
25,
508,
84,
23,
26,
220,
17,
20,
15,
60,
284,
2278,
310,
220,
15,
11,
220,
16,
23,
23,
11,
220,
15,
11,
220,
15,
11,
220,
17,
20,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_trace_reward_serialize() {
let t = LocalizedTrace {
action: Action::Reward(Reward {
author: Address::from_low_u64_be(4),
value: 6.into(),
reward_type: RewardType::Block,
}),
result: Res::None,
trace_address: vec![10],
subtraces: 1,
transaction_position: None,
t... | rust_cleaned_test_functions.jsonl/39050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23575,
38260,
88686,
368,
341,
197,
10217,
259,
284,
8774,
1506,
6550,
341,
298,
38933,
25,
5586,
486,
59622,
2785,
24035,
341,
571,
197,
3094,
25,
9177,
486,
1499,
23767,
7300,
21,
19,
21263,
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_cast_i32_u32() -> Result<()> {
generic_test_cast!(
Int32Array,
DataType::Int32,
vec![1, 2, 3, 4, 5],
UInt32Array,
DataType::UInt32,
vec![1_u32, 2_u32, 3_u32, 4_u32, 5_u32]
);
Ok(())
} | rust_cleaned_test_functions.jsonl/22560 | {
"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,
5303,
5318,
18,
17,
7300,
18,
17,
368,
1464,
5714,
71698,
341,
286,
13954,
4452,
5303,
33673,
310,
1333,
18,
17,
1857,
345,
310,
33172,
486,
1072,
18,
17,
345,
310,
7486,
20703,
16,
11,
220,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flatbuffers_semantic() {
let mut builder = flatbuffers::FlatBufferBuilder::with_capacity(256);
// Testing out a unary expression using a float
let floatval = FloatLiteral::create(
&mut builder,
&FloatLiteralArgs {
value: 3.5,
... | rust_cleaned_test_functions.jsonl/71780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 956
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49556,
60433,
30442,
8159,
368,
341,
286,
1077,
5206,
7363,
284,
10063,
60433,
486,
31019,
4095,
3297,
486,
4197,
35603,
7,
17,
20,
21,
626,
286,
442,
26768,
700,
264,
75678,
7493,
1667,
264,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cnot_c0t1() {
let p = Default::default();
let a = Complex::new(1.0, 0.0);
let b = Complex::new(0.0, 1.0);
let mut v = StateVector::from_complex_bases(vec![p, a, p, b]);
v.cnot(0, 1);
assert_eq!(v, StateVector::from_complex_bases(vec!(p, b, p, a)));... | rust_cleaned_test_functions.jsonl/21348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
1921,
666,
15,
83,
16,
368,
341,
286,
1077,
281,
284,
7899,
486,
2258,
543,
286,
1077,
264,
284,
22096,
486,
931,
7,
16,
13,
15,
11,
220,
15,
13,
15,
317,
286,
1077,
293,
284,
22096,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pin() {
let counter = Counter { total: 20 };
pin_mut!(counter); // works with future that requires unpin
assert_eq!(counter.get_total(), 20);
} | rust_cleaned_test_functions.jsonl/59838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 85
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
26296,
368,
341,
286,
1077,
5546,
284,
19735,
314,
2790,
25,
220,
17,
15,
2605,
286,
8983,
29523,
10297,
8292,
1215,
442,
4278,
448,
3853,
429,
7460,
650,
13273,
198,
286,
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 |
#[test]
fn test_find_iter() {
let re = Regex::new(r"\d+").unwrap();
let ms = re.find_iter("a12b2").collect::<Vec<_>>();
assert_eq!(ms, vec![(1, 3), (4, 5)]);
} | rust_cleaned_test_functions.jsonl/123805 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
11723,
368,
341,
286,
1077,
312,
284,
26146,
486,
931,
2601,
11934,
67,
10,
1827,
15454,
543,
286,
1077,
9829,
284,
312,
2658,
11723,
445,
64,
16,
17,
65,
17,
1827,
17384,
27638,
10050,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seq_try_from_unchecked() {
let gil = Python::acquire_gil();
let py = gil.python();
let v = vec!["foo", "bar"];
let ob = v.to_object(py);
let seq = ob.cast_as::<PySequence>(py).unwrap();
let type_ptr = seq.as_ref();
let seq_from = unsafe { <... | rust_cleaned_test_functions.jsonl/47431 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14486,
53283,
5673,
4907,
7549,
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,
284,
7486,
0,
1183,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_write_info_field_value_with_float_array_value() -> io::Result<()> {
use vcf::record::info::field;
fn t(buf: &mut Vec<u8>, value: Option<&field::Value>, expected: &[u8]) -> io::Result<()> {
buf.clear();
write_info_field_value(buf, value)?;
asse... | rust_cleaned_test_functions.jsonl/6251 | {
"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,
9165,
3109,
5013,
3142,
6615,
17586,
3858,
3142,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
990,
348,
9792,
486,
8548,
486,
2733,
486,
2566,
401,
286,
5168,
259,
10731,
25,
609,
6984,
11312,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_draw_polygon() {
use imageproc::drawing::draw_polygon_mut;
use imageproc::point::Point;
let mut image = GrayImage::from_pixel(300, 300, Luma::black());
let white = Luma::white();
let star = vec![
Point::new(100, 20),
Point::new(120, 35),
Point::new(1... | rust_cleaned_test_functions.jsonl/81479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 927
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23021,
73542,
368,
341,
262,
990,
2168,
15782,
486,
80849,
486,
7633,
73542,
29523,
280,
262,
990,
2168,
15782,
486,
2768,
486,
2609,
401,
262,
1077,
5206,
2168,
284,
23366,
1906,
486,
1499,
29760... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_setting_later_timeout_then_earlier_one() {
let poll = Poll::new().unwrap();
let mut events = Events::with_capacity(1024);
let mut timer = Timer::default();
poll.register(&timer, Token(0), Ready::readable(), PollOpt::edge())
.unwrap();
timer.set_timeout(Duration::fro... | rust_cleaned_test_functions.jsonl/95272 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 507
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20313,
907,
962,
20537,
68367,
62,
682,
5623,
11667,
368,
341,
262,
1077,
7085,
284,
24385,
486,
931,
1005,
15454,
543,
262,
1077,
5206,
4357,
284,
17627,
486,
4197,
35603,
7,
16,
15,
17,
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... | 3 |
#[test]
fn test_gradient_of_multiple_variables() {
let hw = RefCell::new(CpuHardware::new());
let g = RefCell::new(Graph::new());
let a = 2f32.into_node(&g, &hw);
let b = 3f32.into_node(&g, &hw);
let y = a * a * b;
let y_a = grad(y, &[a])[0];
let y_b = grad(y, &[b])[0];
let y_... | rust_cleaned_test_functions.jsonl/83563 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 803
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49482,
3575,
45233,
28182,
368,
341,
262,
1077,
31256,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
262,
1077,
342,
284,
8550,
3599,
486,
931,
63779,
486,
931,
5231,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_https_url_domain() {
let url = "https://github.com/user/repo.git";
assert_eq!(Repo::parse(url).get_domain(), "github.com".to_string());
} | rust_cleaned_test_functions.jsonl/31148 | {
"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,
26817,
2903,
20111,
368,
341,
286,
1077,
2515,
284,
330,
2428,
1110,
5204,
905,
11739,
10758,
5368,
32799,
876,
286,
2060,
10714,
10297,
25243,
486,
6400,
6522,
568,
455,
20111,
1507,
330,
5204,
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 |
#[test]
fn test_csdv1() {
const EXAMPLE: CsdV1 = CsdV1 {
data: hex!("00 7F 00 32 5B 5A 83 AF 7F FF CF 80 16 80 00 6F"),
};
// CSD Structure: describes version of CSD structure
// 0b00 [Interpreted: Version 1.0]
assert_eq!(EXAMPLE.csd_ver(), 0x00);
// ... | rust_cleaned_test_functions.jsonl/130556 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2015
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
13446,
85,
16,
368,
341,
286,
733,
66246,
25,
356,
13446,
53,
16,
284,
356,
13446,
53,
16,
341,
310,
821,
25,
12371,
17223,
15,
15,
220,
22,
37,
220,
15,
15,
220,
18,
17,
220,
20,
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_interrupt() {
let db = checked_memory_handle();
let interrupt_handle = db.get_interrupt_handle();
db.create_scalar_function("interrupt", 0, false, move |_| {
interrupt_handle.interrupt();
Ok(0)
})
.unwrap();
let mut stmt ... | rust_cleaned_test_functions.jsonl/25521 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42606,
368,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
1428,
286,
1077,
12667,
10630,
284,
2927,
670,
42606,
10630,
1428,
286,
2927,
2520,
41652,
9174,
445,
54805,
497,
220,
15,
11,
895,
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_128() {
let nums = vec![100, 4, 200, 1, 3, 2];
let ans = Solution::longest_consecutive(nums);
assert_eq!(ans, 4);
let nums = vec![0, -2, 100, 4, -1, 200, 1, 3, 2];
let ans = Solution::longest_consecutive(nums);
assert_eq!(ans, 7);
let num... | rust_cleaned_test_functions.jsonl/61663 | {
"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,
62,
16,
17,
23,
368,
341,
286,
1077,
10307,
284,
7486,
20703,
16,
15,
15,
11,
220,
19,
11,
220,
17,
15,
15,
11,
220,
16,
11,
220,
18,
11,
220,
17,
935,
286,
1077,
8099,
284,
12478,
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_create_credential_def_and_store_in_wallet() {
set_default_and_enable_test_mode();
assert!(init_wallet("test_credential_def").unwrap() > 0);
let wallet_handle = get_wallet_handle();
let config = r#"{"support_revocation":false}"#;
let (id, _) = _create_and_s... | rust_cleaned_test_functions.jsonl/67965 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
666,
30320,
7844,
8378,
14809,
1243,
62308,
368,
341,
286,
738,
9993,
8378,
18988,
4452,
7302,
543,
286,
2060,
10297,
2327,
62308,
445,
1944,
666,
30320,
7844,
1827,
15454,
368,
861,
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_of_str() {
let parent = "1234";
let sub = &parent[1..2];
assert_eq!(Span::from(sub).of(parent).unwrap(), sub);
let non_span = Span::from("1224");
assert_eq!(non_span.of(parent), None);
} | rust_cleaned_test_functions.jsonl/124293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3575,
2895,
368,
341,
262,
1077,
2681,
284,
330,
16,
17,
18,
19,
3302,
262,
1077,
1186,
284,
609,
3765,
58,
16,
496,
17,
935,
262,
2060,
10714,
10297,
12485,
486,
1499,
10624,
568,
1055,
12489... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_linked_queue_iter() {
let mut queue = LinkedQueue::new();
queue.enqueue(10);
queue.enqueue(20);
queue.enqueue(30);
queue.enqueue(40);
queue.enqueue(50);
assert_eq!(queue.iter().count(), 5);
for (i, v) in queue.iter().enumerate() {
... | rust_cleaned_test_functions.jsonl/79479 | {
"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,
76145,
10841,
11723,
368,
341,
286,
1077,
5206,
7177,
284,
13114,
7554,
486,
931,
543,
286,
7177,
47468,
7,
16,
15,
317,
286,
7177,
47468,
7,
17,
15,
317,
286,
7177,
47468,
7,
18,
15,
317,
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_hashmap_conversion_fails_with_odd_length_array() {
let resp_object = Response::Array(vec![
Response::String(ByteString::from_static("KEY1")),
Response::String(ByteString::from_static("VALUE1")),
Response::String(ByteString::from_static("KEY2")),
... | rust_cleaned_test_functions.jsonl/78679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
2186,
64132,
761,
6209,
6615,
74668,
5118,
3858,
368,
341,
286,
1077,
9039,
5314,
284,
5949,
486,
1857,
25592,
90515,
310,
5949,
486,
703,
55823,
703,
486,
1499,
25360,
445,
4784,
16,
30154,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_stake_checked_instructions() {
let stake_address = Pubkey::new_unique();
let staker = Pubkey::new_unique();
let withdrawer = Pubkey::new_unique();
// Test InitializeChecked with non-signing withdrawer
let mut instruction =
initialize_checked(&... | rust_cleaned_test_functions.jsonl/66789 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 4906
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
726,
56456,
82427,
368,
341,
286,
1077,
18279,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
357,
4407,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
14798,
261,
284,
22611,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_method() {
let cls = test_utils::custom_class();
let sel = Sel::register("foo");
let method = cls.instance_method(sel).unwrap();
assert_eq!(method.name().name(), "foo");
assert_eq!(method.arguments_count(), 2);
#[cfg(feature = "malloc")]
{
... | rust_cleaned_test_functions.jsonl/7123 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9032,
368,
341,
286,
1077,
12790,
284,
1273,
17309,
486,
9163,
4790,
543,
286,
1077,
11806,
284,
23204,
486,
6343,
445,
7975,
797,
286,
1077,
1714,
284,
12790,
13066,
9032,
63453,
568,
15454,
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_call_hierarchy_incoming_outgoing() {
check_hierarchy(
r#"
//- /lib.rs
fn caller1() {
call<|>er2();
}
fn caller2() {
caller3();
}
fn caller3() {
}
... | rust_cleaned_test_functions.jsonl/35207 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 352
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13429,
95043,
1243,
4959,
6068,
9546,
368,
341,
286,
1779,
95043,
1006,
310,
435,
2,
698,
310,
78406,
608,
2740,
25638,
198,
310,
5168,
19865,
16,
368,
341,
394,
1618,
27,
91,
29,
261,
17,
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_parse_select_statement() {
let url = "person-><-users{name,age,class}?(age=gt.42&student=eq.true)|(gender=eq.`M`&is_active=true)&group_by=sum(age),grade,gender&having=min(age)=gte.42&order_by=age.desc,height.asc&page=2&page_size=10";
let url = utf8_percent_encode(url, NON_ALPHANU... | rust_cleaned_test_functions.jsonl/51518 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
13051,
37404,
368,
341,
286,
1077,
2515,
284,
330,
8987,
405,
45342,
4218,
47006,
11,
424,
84704,
92,
14437,
424,
28,
5178,
13,
19,
17,
5,
12038,
28,
11006,
54138,
55178,
12968,
28,
11006... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_width_height_depth() {
let b = Box3D::new(point3(-10.0, -10.0, -10.0), point3(10.0, 10.0, 10.0));
assert!(b.width() == 20.0);
assert!(b.height() == 20.0);
assert!(b.depth() == 20.0);
} | rust_cleaned_test_functions.jsonl/7475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7927,
9561,
19061,
368,
341,
286,
1077,
293,
284,
8261,
18,
35,
486,
931,
20235,
18,
4080,
16,
15,
13,
15,
11,
481,
16,
15,
13,
15,
11,
481,
16,
15,
13,
15,
701,
1459,
18,
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... | 1 |
#[test]
fn test_is_only_and() {
for case in CASES.iter() {
assert_eq!(
matches!(case.typ, CombinatorType::OnlyAnd),
case.combinator.is_only_and(),
"left value indicates whether {:?} should be only AND",
case.combinator
... | rust_cleaned_test_functions.jsonl/538 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
18410,
8378,
368,
341,
286,
369,
1142,
304,
38319,
50,
19471,
368,
341,
310,
2060,
10714,
33673,
394,
9071,
10297,
5638,
49286,
11,
1198,
6863,
850,
929,
486,
7308,
3036,
1326,
394,
1142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_spinel_device_client_step_by_step() {
const MAX_FRAME_SIZE: u32 = 2000;
let noop_waker = futures::task::noop_waker();
let mut noop_context = futures::task::Context::from_waker(&noop_waker);
let (
mut device_sink,
mut device_stream,
... | rust_cleaned_test_functions.jsonl/22974 | {
"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,
10123,
29708,
9204,
8179,
11946,
3710,
11946,
368,
341,
286,
733,
8334,
22260,
4098,
25,
575,
18,
17,
284,
220,
17,
15,
15,
15,
280,
286,
1077,
60829,
1670,
4407,
284,
36823,
486,
8202,
486,
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_workon_from_tags_missing_one_tag_graceful() {
let config = a_config();
let logger = a_logger();
let resolved = config.resolve_after_workon(&logger, config.projects.get("test2").unwrap());
assert_that(&resolved).is_equal_to(vec!["workon1".to_owned()]);
} | rust_cleaned_test_functions.jsonl/52625 | {
"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,
11498,
263,
5673,
16333,
40447,
11667,
9372,
15682,
578,
1262,
368,
341,
262,
1077,
2193,
284,
264,
5332,
543,
262,
1077,
5925,
284,
264,
27413,
543,
262,
1077,
19673,
284,
2193,
14691,
19844,
114... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delimited_square() {
assert_eq!(
apply(node, "node", "[abc]"),
build_token(b::square(vec![b::bare("abc")]))
);
assert_eq!(
apply(node, "node", "[ abc ]"),
build_token(b::square(vec![b::ws(" "), b::bare("abc"), b::ws(" "... | rust_cleaned_test_functions.jsonl/46726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18029,
31511,
39794,
368,
341,
286,
2060,
10714,
33673,
310,
3796,
6958,
11,
330,
3509,
497,
10545,
13683,
60,
4461,
310,
1936,
6458,
1883,
486,
37476,
25592,
20703,
65,
486,
54102,
445,
13683,
89... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_java_version_graalvm() {
let java_8 = "OpenJDK 64-Bit GraalVM CE 19.2.0.1 (25.222-b08-jvmci-19.2-b02) for linux-amd64 JRE (8u222), built on Jul 19 2019 17:37:13 by \"buildslave\" with gcc 7.3.0";
assert_eq!(parse_java_version(java_8), Some("8".to_string()));
} | rust_cleaned_test_functions.jsonl/36221 | {
"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,
21039,
77323,
9438,
15682,
54342,
7338,
368,
341,
286,
1077,
1642,
62,
23,
284,
330,
5002,
41,
18301,
220,
21,
19,
7671,
275,
39013,
278,
11187,
26711,
220,
16,
24,
13,
17,
13,
15,
13,
16,
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_link_id() {
assert_eq!(
GiDocgen::from_str("[id@gtk_widget_show]"),
Ok(GiDocgen::Id("gtk_widget_show".to_string()))
);
} | rust_cleaned_test_functions.jsonl/78466 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
842,
368,
341,
286,
2060,
10714,
33673,
310,
15392,
9550,
4370,
486,
1499,
2895,
10937,
307,
31,
40749,
13585,
15267,
60,
4461,
310,
7622,
6699,
72,
9550,
4370,
486,
764,
445,
40749,
13585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_can_print_warnings() {
syntax::with_default_globals(|| {
let matches = optgroups().parse(&["-Awarnings".to_string()]).unwrap();
let registry = registry::Registry::new(&[]);
let (sessopts, _) = build_session_options_and_crate_config(&matches);
let sess = build_... | rust_cleaned_test_functions.jsonl/133750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 526
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
10064,
87658,
368,
341,
262,
19482,
486,
4197,
9993,
58775,
79453,
341,
286,
1077,
9071,
284,
3387,
16753,
1005,
6400,
2099,
1183,
12,
22600,
14857,
3263,
983,
3904,
368,
10697,
15454,
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... | 4 |
#[test]
fn test_parse_dns_name_bottom() {
let input = b"\x00\xf2\x35";
let output = msg::parse_dns_name_bottom(&input[..]).unwrap().1;
assert_eq!(output, msg::NameUnit::End);
let input = b"\xf2\x35";
let output = msg::parse_dns_name_unit(&input[..]).unwrap().1;
assert_eq!(output, msg::Na... | rust_cleaned_test_functions.jsonl/83420 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
71125,
1269,
25473,
368,
341,
262,
1077,
1946,
284,
293,
11934,
87,
15,
15,
50612,
17,
3462,
18,
20,
876,
262,
1077,
2550,
284,
3750,
486,
6400,
71125,
1269,
25473,
2099,
1355,
95874,
106... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_num_devices() -> Result<(), Box<dyn Error>> {
test_init()?;
let num_devices = Device::num_devices()?;
assert!(num_devices > 0);
Ok(())
} | rust_cleaned_test_functions.jsonl/39767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4273,
41334,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1273,
6137,
94136,
286,
1077,
1629,
41334,
284,
13903,
486,
2413,
41334,
94136,
286,
2060,
10297,
2413,
41334,
861,
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
] | 3 |
#[test]
fn test_set_blkio_write_iops() {
let (tmp, throttle) = setup(
"test_set_blkio_write_iops",
CGROUP_BLKIO_THROTTLE_WRITE_IOPS,
);
let blkio = BlockIoBuilder::new()
.with_write_iops(vec![LinuxThrottleDevice {
major: 8,
... | rust_cleaned_test_functions.jsonl/112474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 372
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
51969,
815,
9165,
5318,
3721,
368,
341,
286,
1077,
320,
5173,
11,
42166,
8,
284,
6505,
1006,
310,
330,
1944,
2602,
51969,
815,
9165,
5318,
3721,
756,
310,
6159,
11838,
87634,
3810,
10625,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stmt() {
let rules = create_rules(
r#"
macro_rules! foo {
($ i:stmt) => (
fn bar() { $ i; }
)
}
"#,
);
assert_expansion(MacroKind::Items, &rules, "foo! { 2 }", "fn bar () {2 ;}");
assert_expansion(MacroKind::Items, &... | rust_cleaned_test_functions.jsonl/14717 | {
"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,
21824,
368,
341,
262,
1077,
5601,
284,
1855,
21407,
1006,
286,
435,
2,
698,
286,
18072,
21407,
0,
15229,
341,
310,
1711,
600,
25,
9215,
8,
589,
2399,
394,
5168,
3619,
368,
314,
400,
600,
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_sorted_search_no_size() {
let test_cases = [
((vec![1, 2, 3, 4, 5, 6, 7, 8, 9], 0), -1),
((vec![1, 2, 3, 4, 5, 6, 7, 8, 9], 1), 0),
((vec![1, 2, 3, 4, 5, 6, 7, 8, 9], 2), 1),
((vec![1, 2, 3, 4, 5, 6, 7, 8, 9], 3), 2),
((vec![1, 2, 3, 4, 5, 6, 7, 8, 9],... | rust_cleaned_test_functions.jsonl/8359 | {
"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,
41277,
10716,
6536,
2368,
368,
341,
262,
1077,
1273,
41427,
284,
2278,
286,
1781,
4083,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_cord() {
assert_eq!(String::from_noun(&Noun::from(0u32)), Ok("".to_string()));
assert!(String::from_noun(&Noun::from(190u32)).is_err());
assert_eq!(String::from_noun(&Noun::from(7303014u32)),
Ok("foo".to_string()));
assert_eq!(String::from_noun(... | rust_cleaned_test_functions.jsonl/29741 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
539,
368,
341,
286,
2060,
10714,
10297,
703,
486,
1499,
1089,
1624,
2099,
45,
1624,
486,
1499,
7,
15,
84,
18,
17,
5731,
7622,
445,
3263,
983,
3904,
7392,
286,
2060,
10297,
703,
486,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_recovery() {
let slot = 1;
let (data_shreds, coding_shreds, leader_schedule_cache) =
setup_erasure_shreds(slot, 0, 100);
let blockstore_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&blockstore_path).unwrap();
... | rust_cleaned_test_functions.jsonl/7627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 637
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91475,
368,
341,
286,
1077,
9446,
284,
220,
16,
280,
286,
1077,
320,
691,
3712,
53369,
11,
10822,
3712,
53369,
11,
7653,
34530,
11529,
8,
4035,
310,
6505,
80604,
3970,
3712,
53369,
43724,
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... | 2 |
#[test]
fn test_yaml_serialize_body() {
let body = MessageBody::<TestTask>::new(TestTaskParams { a: 4 });
let serialized = serde_yaml::to_string(&body).unwrap();
assert_eq!(serialized, YAML);
} | rust_cleaned_test_functions.jsonl/97957 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64380,
88686,
14114,
368,
341,
262,
1077,
2487,
284,
4856,
5444,
27638,
2271,
6262,
6831,
931,
31159,
6262,
4870,
314,
264,
25,
220,
19,
1625,
262,
1077,
32916,
284,
61570,
64380,
486,
983,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_command_line_arguments_help() {
let mut cmd = get_bin_command();
let output: Output = cmd.env_clear().arg("--help").unwrap();
assert!(output.status.success());
let stdout = from_utf8(&output.stdout).unwrap();
vec![
// Check the version is printed in the help
... | rust_cleaned_test_functions.jsonl/16977 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
6528,
43433,
26926,
368,
341,
262,
1077,
5206,
5439,
284,
633,
21816,
10811,
543,
262,
1077,
2550,
25,
9258,
284,
5439,
9265,
21811,
1005,
858,
21549,
8653,
1827,
15454,
543,
262,
2060,
102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ignore_message_with_incorrect_signature() {
let sandbox = timestamping_sandbox();
let propose = Propose::new(
VALIDATOR_0,
HEIGHT_ZERO,
ROUND_ONE,
&sandbox.last_hash(),
&[],
sandbox.s(VALIDATOR_1),
);
sandbox.recv(&propose);
} | rust_cleaned_test_functions.jsonl/8884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
58493,
6462,
6615,
1243,
19928,
39859,
368,
341,
262,
1077,
42754,
284,
11441,
287,
643,
31536,
1428,
262,
1077,
29614,
284,
3911,
960,
486,
931,
1006,
286,
43291,
11857,
62,
15,
345,
286,
41900,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gc() {
test_gc_imp(b"k1", b"v1", b"v2", b"v3", b"v4");
let v1 = gen_value(b'x', SHORT_VALUE_MAX_LEN + 1);
let v2 = gen_value(b'y', SHORT_VALUE_MAX_LEN + 1);
let v3 = gen_value(b'z', SHORT_VALUE_MAX_LEN + 1);
let v4 = gen_value(b'v', SHORT_VALUE_MAX_LEN + ... | rust_cleaned_test_functions.jsonl/23333 | {
"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,
49423,
368,
341,
286,
1273,
49423,
36788,
1883,
62911,
16,
497,
293,
1,
85,
16,
497,
293,
1,
85,
17,
497,
293,
1,
85,
18,
497,
293,
1,
85,
19,
3071,
286,
1077,
348,
16,
284,
4081,
3142,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_not_empty_with_space_only() {
let name = "unit_test";
let desc = "This is a unit test";
let module = Module {
config: None,
name: name.to_string(),
description: desc.to_string(),
segments: Segment::from_text(None, ... | rust_cleaned_test_functions.jsonl/11753 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
6892,
7913,
15124,
6615,
14663,
18410,
368,
341,
286,
1077,
829,
284,
330,
3843,
4452,
876,
286,
1077,
6560,
284,
330,
1986,
374,
264,
4982,
1273,
876,
286,
1077,
4688,
284,
13711,
341,
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_get_level_by_string() {
assert_eq!(Some(Level::Trace), get_level_by_string("TRACE"));
assert_eq!(Some(Level::Trace), get_level_by_string("Trace"));
assert_eq!(Some(Level::Trace), get_level_by_string("trace"));
// Due to legacy we need to ensure that `warn... | rust_cleaned_test_functions.jsonl/20807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8274,
3710,
3904,
368,
341,
1789,
286,
2060,
10714,
10297,
8373,
30263,
486,
6550,
701,
633,
8274,
3710,
3904,
445,
33361,
4010,
286,
2060,
10714,
10297,
8373,
30263,
486,
6550,
701,
633,
82... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_instance_info() {
let vmm_shared_info = Arc::new(RwLock::new(InstanceInfo {
started: false,
id: "test_get_instance_info".to_string(),
vmm_version: "version 0.1.0".to_string(),
app_name: "app name".to_string(),
}));
let ... | rust_cleaned_test_functions.jsonl/23174 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 443
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
11904,
3109,
368,
341,
286,
1077,
348,
3821,
20405,
3109,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
7,
2523,
1731,
341,
310,
3855,
25,
895,
345,
310,
877,
25,
330,
1944,
3062,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_llvm_functype() {
unsafe {
let ctx = mlirContextCreate();
let llvm = mlirGetDialectHandle__llvm__();
mlirDialectHandleRegisterDialect(llvm, ctx);
mlirDialectHandleLoadDialect(llvm, ctx);
let inttype = mlirIntegerTypeGet(ctx, 32)... | rust_cleaned_test_functions.jsonl/40533 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 237
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
29042,
28315,
17211,
368,
341,
286,
19860,
341,
310,
1077,
5635,
284,
15739,
404,
1972,
4021,
543,
310,
1077,
34664,
284,
15739,
404,
1949,
35,
55056,
6999,
563,
29042,
563,
543,
310,
15739,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_p_instant() {
let mut info = super::TokenomicInfo {
p_bench: fp!(100),
..Default::default()
};
// Normal
info.update_p_instant(100_000, 1000);
info.challenge_time_last = 90_000;
info.iteration_last = 1000;
as... | rust_cleaned_test_functions.jsonl/19720 | {
"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,
8882,
620,
1243,
4706,
368,
341,
286,
1077,
5206,
3546,
284,
2256,
486,
3323,
3075,
1731,
341,
310,
281,
880,
19762,
25,
12007,
10297,
16,
15,
15,
1326,
310,
5241,
3675,
486,
2258,
741,
286,
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_trim_visibility() {
assert_eq!(trim_visibility("pub fn"), "fn");
assert_eq!(trim_visibility("pub(crate) struct"), "struct");
assert_eq!(trim_visibility("pub (in super) const fn"), "const fn");
} | rust_cleaned_test_functions.jsonl/126177 | {
"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,
70025,
71256,
368,
341,
262,
2060,
10714,
10297,
10666,
71256,
445,
9585,
5168,
3975,
330,
8822,
797,
262,
2060,
10714,
10297,
10666,
71256,
445,
9585,
54907,
8,
256,
2036,
3975,
330,
1235,
797,
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 |
#[test]
fn test_pokcr() {
let witnesses = [Rsa2048::elem(2), Rsa2048::elem(3)];
let x = [int(2), int(2)];
let alphas = [Rsa2048::elem(4), Rsa2048::elem(9)];
let proof = Pokcr::<Rsa2048>::prove(&witnesses);
assert!(proof.w == Rsa2048::elem(6));
assert!(Pokcr::verify(&alphas, &x, &proof));... | rust_cleaned_test_functions.jsonl/99213 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
562,
5082,
368,
341,
262,
1077,
27723,
284,
508,
49,
9081,
17,
15,
19,
23,
486,
18871,
7,
17,
701,
431,
9081,
17,
15,
19,
23,
486,
18871,
7,
18,
12587,
262,
1077,
856,
284,
508,
396,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_duration() {
for pair in &[
(0.0000039, "3.9u"),
(0.0044, "4.4m"),
(0.3, "300m"),
(2040.0, "34.0M"),
(3456000.0, "40.0D"),
(59918400.0, "1.9Y"),
(59918401.1, "1.9Y_1s_100m"),
(59918401.1... | rust_cleaned_test_functions.jsonl/24730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25454,
368,
341,
286,
369,
6716,
304,
609,
9640,
310,
320,
15,
13,
15,
15,
15,
15,
15,
18,
24,
11,
330,
18,
13,
24,
84,
4461,
310,
320,
15,
13,
15,
15,
19,
19,
11,
330,
19,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_update_fulfill_htlc_bolt2_missing_badonion_bit_for_malformed_htlc_message() {
//BOLT 2 Requirement: A receiving node: if the BADONION bit in failure_code is not set for update_fail_malformed_htlc MUST fail the channel.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cf... | rust_cleaned_test_functions.jsonl/16936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1069
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
761,
86516,
49086,
17257,
880,
6181,
17,
40447,
34199,
263,
290,
13996,
5478,
717,
278,
10155,
49086,
17257,
6462,
368,
341,
197,
322,
33,
35320,
220,
17,
75938,
25,
362,
12308,
2436,
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... | 2 |
#[test]
fn test_consume_sequence_line() -> io::Result<()> {
let data = b"ACGT\nNNNN\n";
let mut indexer = Indexer::new(&data[..]);
let (bytes_read, base_count) = indexer.consume_sequence_line()?;
assert_eq!(bytes_read, 5);
assert_eq!(base_count, 4);
Ok(())
} | rust_cleaned_test_functions.jsonl/27390 | {
"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,
3382,
31323,
23735,
6528,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
821,
284,
293,
1,
1706,
25388,
1699,
9745,
9745,
1699,
876,
286,
1077,
5206,
87216,
284,
8008,
261,
486,
931,
2099,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_line_to_vec() {
let test_cases = vec![
("1 2 3", vec![1, 2, 3]),
("a 1 b 2 3 c", vec![1, 2, 3]),
("a b c", vec![]),
];
for test_case in test_cases {
let result = line_to_vec(test_case.0);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/14947 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 287
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
2346,
13251,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
3489,
16,
220,
17,
220,
18,
497,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
17036,
310,
3489,
64,
220,
16,
293,
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... | 2 |
#[test]
fn test_wrong_fast_field_type() -> crate::Result<()> {
let mut schema_builder = Schema::builder();
let fast_field_unsigned = schema_builder.add_u64_field("unsigned", FAST);
let fast_field_signed = schema_builder.add_i64_field("signed", FAST);
let fast_field_float = schema... | rust_cleaned_test_functions.jsonl/12727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75198,
35743,
5013,
1819,
368,
1464,
17717,
486,
2077,
71698,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
4937,
5013,
67830,
284,
10802,
28532,
1364,
7300,
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... | 4 |
#[test]
fn test_conn() {
let (mut conn1, mut conn2) = new_conns();
let (file_bytes, _) = read_file();
let nonce = box_::gen_nonce();
let (txd, txe) = connect_conns(&mut conn1, &mut conn2, &nonce);
let decrypted_bytes = encrypt_and_decrypt_with_conns(&mut conn1, &mut co... | rust_cleaned_test_functions.jsonl/108998 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17241,
368,
1476,
286,
1077,
320,
6984,
4534,
16,
11,
5206,
4534,
17,
8,
284,
501,
3382,
4412,
543,
286,
1077,
320,
1192,
12524,
11,
27439,
284,
1349,
2458,
543,
286,
1077,
39676,
284,
3745,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scalar_mul3() {
let base_point = Secp256k1Point::generator();
let int: Secp256k1Scalar = ECScalar::from(
&BigInt::from_hex("7CF27B188D034F7E8A52380304B51AC3C08969E277F21B35A60B48FC47669978")
.unwrap(),
)
.unwrap();
let test = (b... | rust_cleaned_test_functions.jsonl/60391 | {
"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,
41652,
24944,
18,
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_into_call() {
struct WhatInto<T>(T);
impl_call! {
fn into_call[T,U](self: WhatInto<T>, _a: PhantomData<U>)->U
where [ T:Into<U> ]
{
self.0.into()
}
}
#[cfg(feature = "alloc")]
assert_eq!(WhatInto("what").into_call(PhantomData::<St... | rust_cleaned_test_functions.jsonl/32160 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
13429,
368,
341,
262,
2036,
3555,
26591,
3125,
2235,
51,
626,
262,
11605,
13429,
0,
341,
286,
5168,
1119,
13429,
20340,
50481,
9533,
721,
25,
3555,
26591,
3125,
8066,
716,
64,
25,
46197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_bounce() {
test_interpreter_and_jit_asm!(
"
mov r0, 1
mov r6, r0
mov r7, r6
mov r8, r7
mov r9, r8
mov r0, r9
exit",
[],
(),
{ |_vm, res: Result| { res.unwrap() == 0x1 } },
7
);
} | rust_cleaned_test_functions.jsonl/58926 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
9734,
368,
341,
262,
1273,
15318,
28637,
8378,
5374,
275,
67529,
33673,
286,
6228,
286,
1974,
435,
15,
11,
220,
16,
198,
286,
1974,
435,
21,
11,
435,
15,
198,
286,
1974,
435,
22,
11,
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... | 1 |
#[test]
fn test_deserialize_discovery_details_detailed() {
// Test standard discovery
let yaml = r#"
opcuaDiscoveryMethod:
standard:
discoveryUrls:
- opc.tcp://127.0.0.1:4855/
applicationNames:
action: Include
... | rust_cleaned_test_functions.jsonl/66111 | {
"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,
15768,
9050,
9932,
7449,
13260,
814,
10111,
368,
341,
286,
442,
3393,
5297,
18335,
198,
286,
1077,
32246,
284,
435,
2,
698,
310,
37027,
4284,
67400,
3523,
25,
715,
1060,
5297,
510,
394,
18335,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nil() {
let text = " {% if var != nil %} true {% else %} false {% endif %} ";
assert_template_result!(" true ", text, v!({"var": 1}));
let text = " {% if var != null %} true {% else %} false {% endif %} ";
assert_template_result!(" true ", text, v!({"var": 1}));
} | rust_cleaned_test_functions.jsonl/28138 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
36175,
368,
341,
262,
1077,
1467,
284,
330,
52261,
421,
762,
961,
2092,
1018,
92,
830,
52261,
770,
1018,
92,
895,
52261,
12330,
1018,
92,
7620,
262,
2060,
8693,
5287,
17223,
220,
830,
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_sum_return_data_type() -> Result<()> {
let data_type = DataType::Decimal(10, 5);
let result_type = sum_return_type(&data_type)?;
assert_eq!(DataType::Decimal(20, 5), result_type);
let data_type = DataType::Decimal(36, 10);
let result_type = sum_return_typ... | rust_cleaned_test_functions.jsonl/43118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
12511,
1769,
1819,
368,
1464,
5714,
71698,
341,
286,
1077,
821,
1819,
284,
33172,
486,
11269,
7,
16,
15,
11,
220,
20,
317,
286,
1077,
1102,
1819,
284,
2629,
12511,
1819,
2099,
691,
1819,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_retrieve_record_success() {
let _setup = SetupLibraryWallet::init();
let (record_type, id, record) = _record();
let options = json!({
"retrieveType": true,
"retrieveValue": true,
"retrieveTags": false
}).to_string();
l... | rust_cleaned_test_functions.jsonl/118722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
34216,
14192,
18632,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16915,
38259,
486,
2327,
1428,
286,
1077,
320,
8548,
1819,
11,
877,
11,
3255,
8,
284,
716,
8548,
1428,
286,
1077,
2606,
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_inverse_diagonal_matrix() {
let matrix: Matrix2x2<f64> = 4_f64 * Matrix2x2::identity();
let expected: Matrix2x2<f64> = (1_f64 / 4_f64) * Matrix2x2::identity();
let result = matrix.inverse().unwrap();
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/128974 | {
"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,
63333,
29477,
23450,
10193,
368,
341,
286,
1077,
6172,
25,
11631,
17,
87,
17,
63895,
21,
19,
29,
284,
220,
19,
761,
21,
19,
353,
11631,
17,
87,
17,
486,
16912,
543,
286,
1077,
3601,
25,
1163... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_cstring() {
let cstring = CString::new("tacos").unwrap();
let lua_string = String::try_from(cstring.clone()).unwrap();
assert_eq!(lua_string.size, 5);
assert_eq!(cstring.as_c_str().to_bytes().len(), 5);
assert_eq!(lua_string.size, cstring.as_c_st... | rust_cleaned_test_functions.jsonl/101285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
666,
917,
368,
341,
286,
1077,
272,
917,
284,
56956,
486,
931,
445,
83,
41647,
1827,
15454,
543,
286,
1077,
20357,
3904,
284,
923,
486,
1539,
5673,
1337,
917,
15997,
6011,
15454,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lockfile_stops_duplicates() {
let schema_builder = schema::Schema::builder();
let index = Index::create_in_ram(schema_builder.build());
let _index_writer = index.writer(3_000_000).unwrap();
match index.writer(3_000_000) {
Err(TantivyError::LockFailure(... | rust_cleaned_test_functions.jsonl/21497 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 192
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
1192,
1261,
3721,
75051,
368,
341,
286,
1077,
10802,
28532,
284,
10802,
486,
8632,
486,
17850,
543,
286,
1077,
1922,
284,
8008,
486,
3182,
1243,
62124,
42735,
28532,
13239,
1423,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_time_cert() {
let count = 100;
let (sender_name, sender_key) = get_key_pair();
let transfer = Transfer {
sender: sender_name,
recipient: Address::Primary(dbg_addr(0)),
amount: Amount::from(5),
sequence_number: SequenceNumber::new(),
user_data: ... | rust_cleaned_test_functions.jsonl/99652 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3009,
37097,
368,
341,
262,
1077,
1760,
284,
220,
16,
15,
15,
280,
262,
1077,
320,
11644,
1269,
11,
4646,
3097,
8,
284,
633,
3097,
14445,
543,
262,
1077,
8317,
284,
23200,
341,
286,
4646,
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... | 5 |
#[test]
fn test_compile_and_e() {
let compiled = bitwise::compile_and("E".to_string());
assert_eq!(compiled.len(), 1);
assert_eq!(compiled[0], 0b10011000);
} | rust_cleaned_test_functions.jsonl/100582 | {
"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,
74170,
8378,
2204,
368,
341,
262,
1077,
19697,
284,
97970,
486,
20433,
8378,
445,
36,
3263,
983,
3904,
5231,
262,
2060,
10714,
10297,
50845,
19406,
1507,
220,
16,
317,
262,
2060,
10714,
10297,
508... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_list_array() {
// Construct a value array
let value_data = ArrayData::builder(DataType::Int32)
.len(8)
.add_buffer(Buffer::from_slice_ref(&[0, 1, 2, 3, 4, 5, 6, 7]))
.build();
let value_offsets = Buffer::from_slice_re... | rust_cleaned_test_functions.jsonl/3839 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1566
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
3858,
368,
341,
286,
442,
18678,
264,
897,
1334,
198,
286,
1077,
897,
1769,
284,
2910,
1043,
486,
17850,
63941,
486,
1072,
18,
17,
340,
310,
659,
2892,
7,
23,
340,
310,
659,
718,
7776,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_clear() {
let cache = InMemoryCache::new();
cache.cache_emoji(GuildId(1), emoji(EmojiId(3), None));
cache.cache_member(GuildId(2), member(UserId(4), GuildId(2)));
cache.clear();
assert!(cache.0.emojis.is_empty());
assert!(cache.0.members.is_empty()... | rust_cleaned_test_functions.jsonl/86446 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 160
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
543,
286,
6500,
20087,
62,
37523,
6699,
1498,
764,
7,
16,
701,
42365,
7,
92731,
764,
7,
18,
701,
2240,
1106,
286,
6500,
20087... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_last_line_offsetted() {
let lines = "one\n two";
assert_eq!(last_line_offsetted(2, lines), true);
assert_eq!(last_line_offsetted(4, lines), false);
assert_eq!(last_line_offsetted(6, lines), false);
let lines = "one two";
assert_eq!(last_line... | rust_cleaned_test_functions.jsonl/84240 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 363
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12195,
6528,
6917,
6565,
368,
341,
286,
1077,
5128,
284,
330,
603,
1699,
262,
1378,
876,
286,
2060,
10714,
10297,
4259,
6528,
6917,
6565,
7,
17,
11,
5128,
701,
830,
317,
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_file_last_component() {
assert_eq!("ab.proto", file_last_component("ab.proto"));
assert_eq!("ab.proto", file_last_component("xx/ab.proto"));
assert_eq!("ab.proto", file_last_component("xx\\ab.proto"));
assert_eq!("ab.proto", file_last_component("yy\\xx\\ab.proto"));
} | rust_cleaned_test_functions.jsonl/19008 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
12195,
23406,
368,
341,
262,
2060,
10714,
17223,
370,
57322,
497,
1034,
12195,
23406,
445,
370,
57322,
4010,
262,
2060,
10714,
17223,
370,
57322,
497,
1034,
12195,
23406,
445,
4146,
14,
370,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prune_errors() {
let mut crds_gossip = CrdsGossip {
id: Pubkey::new(&[0; 32]),
..CrdsGossip::default()
};
let id = crds_gossip.id;
let ci = ContactInfo::new_localhost(&Pubkey::new(&[1; 32]), 0);
let prune_pubkey = Pubkey::new(&[2; 32]);
crds_gossip
... | rust_cleaned_test_functions.jsonl/2405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 566
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5294,
2886,
20196,
368,
341,
262,
1077,
5206,
1560,
5356,
1889,
41473,
284,
4553,
5356,
38,
41473,
341,
286,
877,
25,
22611,
792,
486,
931,
2099,
58,
15,
26,
220,
18,
17,
17036,
286,
5241,
160... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_btreemap() {
let mut map = BTreeMap::new();
map.insert(0u64, Dummy);
map.insert(5u64, Dummy);
test_serialize(map);
let mut map = BTreeMap::new();
map.insert(10u64, vec![1u8, 2u8, 3u8]);
map.insert(50u64, vec![4u8, 5u8, 6u8]);
test_s... | rust_cleaned_test_functions.jsonl/88751 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
10157,
42040,
368,
341,
286,
1077,
5206,
2415,
284,
425,
6533,
2227,
486,
931,
543,
286,
2415,
7030,
7,
15,
84,
21,
19,
11,
50567,
317,
286,
2415,
7030,
7,
20,
84,
21,
19,
11,
50567,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_claim_neuron_fails_when_max_number_of_neurons_is_reached() {
local_test_on_sns_subnet(|runtime| async move {
// Set up an SNS with a ledger account for two users
let user1 = UserInfo::new(Sender::from_keypair(&TEST_USER1_KEYPAIR));
let user2 = UserInfo::new(Sender::fr... | rust_cleaned_test_functions.jsonl/107248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2029
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84969,
13925,
36090,
761,
6209,
47636,
6345,
5500,
3575,
96156,
6892,
1288,
3854,
368,
341,
262,
2205,
4452,
4470,
643,
4412,
95681,
22428,
22255,
91,
3312,
3271,
341,
286,
442,
2573,
705,
458,
32... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_banking_stage_shutdown1() {
let genesis_config = create_genesis_config(2).genesis_config;
let bank = Arc::new(Bank::new_no_wallclock_throttle_for_tests(&genesis_config));
let (verified_sender, verified_receiver) = unbounded();
let (gossip_verified_vote_sender, gos... | rust_cleaned_test_functions.jsonl/4981 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 851
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
32334,
35238,
54804,
16,
368,
341,
286,
1077,
59366,
5332,
284,
1855,
16322,
13774,
5332,
7,
17,
568,
77894,
5332,
280,
286,
1077,
6073,
284,
19689,
486,
931,
5349,
1180,
486,
931,
6536,
50... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_retrier_idempotent() -> Result<(), Box<dyn Error>> {
let uri = HttpUri::try_from("http://localhost/abc")?;
let retrier = ErrorRetrier;
let (mut parts, _) = HttpRequest::builder()
.url(uri.to_owned())
.method(HttpMethod::GET)
.bod... | rust_cleaned_test_functions.jsonl/105301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
1288,
376,
1268,
842,
3262,
63532,
368,
1464,
5714,
68843,
8261,
92846,
4600,
2452,
341,
286,
1077,
13071,
284,
4823,
13899,
486,
1539,
5673,
445,
1254,
1110,
8301,
14,
13683,
899,
69493,
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... | 2 |
#[test]
fn test_ias_response_from_client_response() {
let mut header_map = HeaderMap::new();
header_map.insert(
HeaderName::from_static("content-type"),
HeaderValue::from_static("plain/text"),
);
let client_response = Ok(ClientResponse {
body: ... | rust_cleaned_test_functions.jsonl/31037 | {
"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,
62,
3473,
9655,
5673,
8179,
9655,
368,
341,
286,
1077,
5206,
4247,
5376,
284,
12104,
2227,
486,
931,
543,
286,
4247,
5376,
7030,
1006,
310,
12104,
675,
486,
1499,
25360,
445,
1796,
10604,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_but_doesnt_have_three_elements_joined_by_tab() -> Result<(), String> {
let input = ["just two", "things separated by tab"];
let input_joined = input.join(MONITORING_DELIM);
let parsed = parse_log(input_joined.as_str());
match parsed {
Err(e) => {... | rust_cleaned_test_functions.jsonl/132011 | {
"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,
21039,
86874,
96374,
406,
67301,
50016,
22801,
5374,
73506,
3710,
17344,
368,
1464,
5714,
68843,
923,
29,
341,
286,
1077,
1946,
284,
4383,
4250,
1378,
497,
330,
57074,
18663,
553,
5651,
6332,
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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.