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_create_label() {
let mut cs = TestConstraintSystem::<Bls12>::new();
let rng = &mut XorShiftRng::from_seed(crate::TEST_SEED);
let size = 64;
let porep_id = [32; 32];
let graph = StackedBucketGraph::<Sha256Hasher>::new_stacked(
size,
... | rust_cleaned_test_functions.jsonl/51320 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1667
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
6106,
368,
341,
286,
1077,
5206,
10532,
284,
3393,
17890,
2320,
27638,
33,
4730,
16,
17,
6831,
931,
543,
286,
1077,
28422,
284,
609,
6984,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
5490... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_parse() {
macro_rules! assert_pns_eq_sub {
($in_:expr, $kind:ident($arg:expr, $pos:expr)) => {
assert_eq!(pns(concat!($in_, "!")), Some((S::$kind($arg.into(), $pos), "!")))
};
}
assert_pns_eq_sub!("$0", Ordi... | rust_cleaned_test_functions.jsonl/88184 | {
"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,
21039,
368,
341,
310,
18072,
21407,
0,
2060,
620,
4412,
10714,
5228,
341,
394,
1711,
258,
23211,
9413,
11,
400,
15314,
25,
1713,
699,
858,
96011,
11,
400,
966,
96011,
593,
589,
341,
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_path_from_parser() {
let hex = hex::decode(TEST_PATH_BUFFER).expect("");
let mut parser = BinaryParser::from(hex.clone());
let pathset = Path::from_parser(&mut parser, None).unwrap();
assert_eq!(pathset.as_ref(), hex);
} | rust_cleaned_test_functions.jsonl/77242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
5673,
18517,
368,
341,
286,
1077,
12371,
284,
12371,
486,
18196,
50320,
7944,
14394,
568,
17119,
13056,
286,
1077,
5206,
6729,
284,
17718,
6570,
486,
1499,
44660,
15997,
1423,
286,
1077,
1815,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tag_attribute_iterator() {
let html_attribute = TagAttribute::HtmlAttribute(HtmlAttribute {
name: "class".to_string(),
value: Some("main".to_string()),
});
let nested_html_attribute = TagAttribute::HtmlAttribute(HtmlAttribute {
name: "s... | rust_cleaned_test_functions.jsonl/62788 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 941
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9372,
16791,
13491,
368,
341,
286,
1077,
5272,
16791,
284,
12353,
3907,
486,
13591,
3907,
94620,
3907,
341,
310,
829,
25,
330,
1040,
3263,
983,
3904,
3148,
310,
897,
25,
4329,
445,
3817,
3263,
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_substitute_param_no_qualify() {
check_assist(
add_missing_impl_members,
"
mod foo {
trait Foo<T> { fn foo(&self, bar: T); }
pub struct Param;
}
struct Param;
struct S;
impl foo::Foo<Param> for S { <|> }",
"
mod foo {
trait Foo<T> {... | rust_cleaned_test_functions.jsonl/106819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 247
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
7660,
4090,
6536,
64391,
1437,
368,
341,
1789,
286,
1779,
12083,
380,
1006,
310,
912,
40447,
21007,
30397,
345,
310,
6228,
2593,
15229,
341,
262,
17567,
33428,
3125,
29,
314,
5168,
15229,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mut() {
let mut e: Element = Element::parse(File::open("tests/data/rw.xml").unwrap()).unwrap();
{
let name = e.get_mut_child("name").unwrap();
name.attributes.insert("suffix".to_owned(), "mr".to_owned());
}
} | rust_cleaned_test_functions.jsonl/15712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29523,
368,
1476,
262,
1077,
5206,
384,
25,
8543,
284,
8543,
486,
6400,
19821,
486,
2508,
445,
23841,
13167,
7382,
86,
9028,
1827,
15454,
6011,
15454,
543,
262,
341,
286,
1077,
829,
284,
384,
67... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_txn_store_scan_key_only() {
let store = AssertionStorage::default();
store.put_ok(b"A", b"A", 5, 10);
store.put_ok(b"B", b"B", 5, 10);
store.put_ok(b"C", b"C", 5, 10);
store.scan_key_only_ok(b"AA", 2, 10, vec![Some(b"B"), Some(b"C")]);
} | rust_cleaned_test_functions.jsonl/63395 | {
"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,
92299,
14809,
28857,
3097,
18410,
368,
341,
262,
1077,
3553,
284,
46730,
5793,
486,
2258,
543,
262,
3553,
3597,
19817,
1883,
29133,
497,
293,
29133,
497,
220,
20,
11,
220,
16,
15,
317,
262,
3553... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_point() {
let mut subject = point!(x: 4760096.421921f64, y: 3744293.729449f64);
subject
.transform_crs_to_crs("EPSG:2230", "EPSG:26946")
.unwrap();
let expected = point!(x: 1450880.29f64, y: 1141263.01f64);
assert_relative_eq!(subject, expe... | rust_cleaned_test_functions.jsonl/35283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6085,
368,
341,
286,
1077,
5206,
3832,
284,
1459,
10297,
87,
25,
220,
19,
22,
21,
15,
15,
24,
21,
13,
19,
17,
16,
24,
17,
16,
69,
21,
19,
11,
379,
25,
220,
18,
22,
19,
19,
17,
24,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_region_sibling() {
let r1 = metapb::Region::new();
check_sibling(&r1, &r1, false);
let (r1, r2) = split(r1, b"k1");
check_sibling(&r1, &r2, true);
let (r2, r3) = split(r2, b"k2");
check_sibling(&r2, &r3, true);
let (r3, r4) = split(r3, b... | rust_cleaned_test_functions.jsonl/10732 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20627,
96328,
368,
341,
286,
1077,
435,
16,
284,
2270,
391,
65,
486,
14091,
486,
931,
543,
286,
1779,
96328,
2099,
81,
16,
11,
609,
81,
16,
11,
895,
626,
286,
1077,
320,
81,
16,
11,
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... | 1 |
#[test]
fn test_row_display() {
// Primitive types
assert_eq!(format!("{}", Field::Null), "null");
assert_eq!(format!("{}", Field::Bool(true)), "true");
assert_eq!(format!("{}", Field::Bool(false)), "false");
assert_eq!(format!("{}", Field::Byte(1)), "1");
assert_eq!(format!("{}", Field:... | rust_cleaned_test_functions.jsonl/43807 | {
"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,
8530,
14825,
368,
341,
262,
442,
51460,
4494,
198,
262,
2060,
10714,
10297,
2243,
79878,
8601,
486,
3280,
701,
330,
2921,
797,
262,
2060,
10714,
10297,
2243,
79878,
8601,
486,
11233,
3715,
5731,
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_global_dispatcher_register_actor() {
let bastion_id = BastionId::new();
let (sender, _) = mpsc::unbounded();
let path = Arc::new(BastionPath::root());
let name = "test_name".to_string();
let child_ref = ChildRef::new(bastion_id, sender, name, path);
... | rust_cleaned_test_functions.jsonl/21762 | {
"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,
19296,
92189,
14000,
54818,
368,
341,
286,
1077,
31977,
290,
842,
284,
45068,
290,
764,
486,
931,
543,
286,
1077,
320,
11644,
11,
27439,
284,
296,
81984,
486,
359,
65686,
543,
286,
1077,
1815,
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_title_error() {
assert!(matches!(
EmbedBuilder::new().title("").build().unwrap_err().kind(),
EmbedErrorType::TitleEmpty { title }
if title.is_empty()
));
let title_too_long = EmbedBuilder::TITLE_LENGTH_LIMIT + 1;
assert!(matches... | rust_cleaned_test_functions.jsonl/50086 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 259
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6112,
4096,
368,
341,
286,
2060,
10297,
19914,
33673,
310,
37068,
3297,
486,
931,
1005,
2102,
80821,
5834,
1005,
15454,
9266,
1005,
15314,
3148,
310,
37068,
1454,
929,
486,
3851,
3522,
314,
2265,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_20() {
assert_eq!(
parse_column_type(&mut Parser::new(
"set('Trailers','Commentaries','Deleted Scenes','Behind the Scenes')"
)),
ColumnType::Set(SetDef {
members: vec![
"Trailers".to_owned(),
... | rust_cleaned_test_functions.jsonl/73849 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 415
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
15,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
8744,
1819,
2099,
6984,
21102,
486,
931,
1006,
394,
330,
746,
492,
74096,
388,
1844,
10677,
5431,
1844,
26039,
83183,
1844,
73642,
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... | 1 |
#[test]
fn test_serialize_info_currline() {
#[cfg(not(feature = "chess"))]
let attributes: Vec<UciInfoAttribute> = vec![
UciInfoAttribute::CurrLine {
cpu_nr: Some(1),
line: vec![
UciMove::from_to(
UciSqua... | rust_cleaned_test_functions.jsonl/19069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
3109,
40515,
1056,
368,
341,
286,
11506,
14072,
24772,
27062,
284,
330,
331,
433,
2761,
921,
310,
1077,
8201,
25,
11312,
36397,
5855,
1731,
3907,
29,
284,
7486,
90515,
310,
547,
5855,
1731,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rw_arc_no_poison_rw() {
let arc = Arc::new(RwLock::new(1));
let arc2 = arc.clone();
let _: Result<(), _> = thread::spawn(move || {
let _lock = arc2.read().unwrap();
panic!()
}).join();
let lock = arc.write().unwrap();
assert... | rust_cleaned_test_functions.jsonl/5881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49566,
62914,
6536,
61814,
3335,
49566,
368,
341,
286,
1077,
15580,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
7,
16,
1106,
286,
1077,
15580,
17,
284,
15580,
15997,
543,
286,
1077,
58536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_header_type_with_invalid_header() {
let header = [0x62, 0x6C, 0x6F, 0x62, 0x0];
let _ = get_header_type(&header);
} | rust_cleaned_test_functions.jsonl/108330 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8757,
1819,
6615,
31433,
8757,
368,
341,
286,
1077,
4247,
284,
508,
15,
87,
21,
17,
11,
220,
15,
87,
21,
34,
11,
220,
15,
87,
21,
37,
11,
220,
15,
87,
21,
17,
11,
220,
15,
87,
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 |
#[test]
fn test_set() {
let settings = Settings::new();
let v1: u32 = 1;
let v2: f32 = 1.0;
let vt1 = TypeId::of::<u32>();
let vt2 = TypeId::of::<f32>();
let v3: u32 = 2;
settings.set(&v1);
let values = settings.settings.read();
let r1 = ... | rust_cleaned_test_functions.jsonl/29875 | {
"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,
2602,
368,
341,
286,
1077,
5003,
284,
11296,
486,
931,
1428,
286,
1077,
348,
16,
25,
575,
18,
17,
284,
220,
16,
280,
286,
1077,
348,
17,
25,
282,
18,
17,
284,
220,
16,
13,
15,
280,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_psty_payload() {
let set_size_sx: usize = 1 << 6;
let set_size_rx: usize = 1 << 6;
let weight_max: u64 = 100000;
let payload_max: u64 = 100000;
let payload_size: usize = 64;
let mut rng = AesRng::new();
let (sender, receiver) = UnixStre... | rust_cleaned_test_functions.jsonl/12051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 932
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
78755,
32813,
368,
341,
286,
1077,
738,
2368,
643,
87,
25,
22301,
284,
220,
16,
1115,
220,
21,
280,
286,
1077,
738,
2368,
24330,
25,
22301,
284,
220,
16,
1115,
220,
21,
401,
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_find_all_methods() {
let (analysis, pos) = fixture::position(
r#"
fn private_fn() {$0}
pub fn pub_fn() {}
pub fn generic_fn<T>(arg: T) {}
"#,
);
let refs = analysis.find_all_methods(pos.file_id).unwrap();
... | rust_cleaned_test_functions.jsonl/73291 | {
"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,
21814,
5705,
36084,
368,
341,
286,
1077,
320,
34484,
11,
1133,
8,
284,
12507,
486,
3487,
1006,
310,
435,
2,
698,
310,
5168,
869,
15246,
368,
13924,
15,
630,
310,
6675,
5168,
6675,
15246,
368,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_setup_sregs() {
let hv = hypervisor::new().unwrap();
let vm = hv.create_vm().expect("new VM fd creation failed");
let vcpu = vm.create_vcpu(0).unwrap();
let mut expected_sregs: SpecialRegisters = vcpu.get_sregs().unwrap();
let gm = GuestMemoryMmap::from_r... | rust_cleaned_test_functions.jsonl/21463 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 322
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
643,
30886,
368,
341,
286,
1077,
22747,
284,
9751,
31396,
486,
931,
1005,
15454,
543,
286,
1077,
10995,
284,
22747,
2520,
39008,
1005,
17119,
445,
931,
17792,
12414,
9688,
4641,
797,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_field() {
assert_eq!(field(&[3], &[1]), arr2(&[[0], [1], [2]]));
assert_eq!(field(&[3], &[2]), arr2(&[[0], [2], [4]]));
assert_eq!(
field(&[2, 2], &[1, 1]),
arr2(&[[0, 0], [0, 1], [1, 0], [1, 1]])
);
assert_eq!(
field(&[... | rust_cleaned_test_functions.jsonl/32078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
368,
341,
286,
2060,
10714,
10297,
2566,
2099,
58,
18,
1125,
44590,
16,
9719,
2890,
17,
2099,
15505,
15,
1125,
508,
16,
1125,
508,
17,
5053,
1106,
286,
2060,
10714,
10297,
2566,
2099,
58,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_precise_time() {
let s0 = precise_time_s();
debug!("s0={} sec", s0);
assert!(s0 > 0.);
let ns0 = precise_time_ns();
let ns1 = precise_time_ns();
debug!("ns0={} ns", ns0);
debug!("ns1={} ns", ns1);
assert!(ns1 >= ns0);
let ... | rust_cleaned_test_functions.jsonl/7335 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59179,
1064,
3009,
368,
341,
286,
1077,
274,
15,
284,
23560,
3009,
643,
543,
286,
7390,
17223,
82,
15,
68085,
5701,
497,
274,
15,
317,
286,
2060,
10297,
82,
15,
861,
220,
15,
13,
626,
286,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_detailed_files_rot_timestamp() {
let handle = Logger::try_with_str("info")
.unwrap()
.format(detailed_format)
.log_to_file(FileSpec::default().use_timestamp(true))
.rotate(Criterion::Size(2000), Naming::Numbers, Cleanup::Never)
.start()
.unwrap... | rust_cleaned_test_functions.jsonl/23402 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 340
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
10111,
10931,
38256,
23073,
368,
341,
262,
1077,
3705,
284,
9514,
486,
1539,
6615,
2895,
445,
2733,
1138,
286,
659,
15454,
741,
286,
659,
2243,
1500,
10111,
8955,
340,
286,
659,
839,
2346,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_symbol() {
let mut r = BufReader::new(b"core::cmp::min");
assert_eq!(r.read(),Some(Token::DocStart("")));
assert_eq!(r.read(), Some(Token::Symbol("core::cmp::min")));
assert_eq!(r.read(),Some(Token::DocEnd("")));
assert_eq!(r.read(), None);
} | rust_cleaned_test_functions.jsonl/95947 | {
"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,
21179,
368,
341,
286,
1077,
5206,
435,
284,
69013,
5062,
486,
931,
1883,
1,
2153,
486,
7293,
486,
1065,
797,
286,
2060,
10714,
10297,
81,
4125,
1507,
8373,
38584,
486,
9550,
3479,
445,
17621,
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_serialize_vrq_f2_00_02() {
#[cfg(feature = "v3")]
init_psa_crypto();
let vrq = Voucher::try_from(VRQ_F2_00_02).unwrap();
assert_eq!(vrq.get_cose_content().unwrap(), hex_literal::hex!("
A1 # map(1)
19 09C5 # un... | rust_cleaned_test_functions.jsonl/81745 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
2273,
52189,
761,
17,
62,
15,
15,
62,
15,
17,
368,
341,
262,
11506,
14072,
27062,
284,
330,
85,
18,
5422,
262,
2930,
620,
9081,
78298,
1428,
262,
1077,
36100,
80,
284,
647,
23937,
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_to_cmp_f() {
assert_eq!(
Label::from_ascii("ABC")
.unwrap()
.cmp_with_f::<CaseInsensitive>(&Label::from_ascii("abc").unwrap()),
Ordering::Equal
);
assert_eq!(
Label::from_ascii("abcDEF")
.... | rust_cleaned_test_functions.jsonl/5051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 524
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
35193,
761,
368,
341,
286,
2060,
10714,
33673,
310,
9402,
486,
1499,
50238,
445,
25411,
1138,
394,
659,
15454,
741,
394,
659,
7293,
6615,
761,
27638,
4207,
75293,
44784,
2476,
486,
1499,
502... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_power_of_two() {
assert!((next_power_of_two(0u) == 0u));
assert!((next_power_of_two(1u) == 1u));
assert!((next_power_of_two(2u) == 2u));
assert!((next_power_of_two(3u) == 4u));
assert!((next_power_of_two(4u) == 4u));
assert!((next_power_of_two(5u) == 8u));
assert... | rust_cleaned_test_functions.jsonl/35453 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 905
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
20421,
3575,
23241,
368,
341,
262,
2060,
0,
1188,
3600,
20421,
3575,
23241,
7,
15,
84,
8,
621,
220,
15,
84,
1106,
262,
2060,
0,
1188,
3600,
20421,
3575,
23241,
7,
16,
84,
8,
621,
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_build_string_attribute_value() {
let value = Value::String("String Value".to_string());
let expected = AttributeValue {
s: Some("String Value".to_string()),
..Default::default()
};
assert_eq!(build_attribute_value(&value), expected);
} | rust_cleaned_test_functions.jsonl/87598 | {
"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,
20801,
3904,
16791,
3142,
368,
341,
286,
1077,
897,
284,
5162,
486,
703,
445,
703,
5162,
3263,
983,
3904,
1423,
286,
1077,
3601,
284,
16752,
1130,
341,
310,
274,
25,
4329,
445,
703,
5162,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_get_fees() {
let rpc = RpcHandler::start();
let bank = rpc.working_bank();
let recent_blockhash = bank.confirmed_last_blockhash();
let RpcHandler { meta, io, .. } = rpc;
let req = r#"{"jsonrpc":"2.0","id":1,"method":"getFees"}"#;
let res = io.... | rust_cleaned_test_functions.jsonl/6313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
761,
5516,
368,
341,
286,
1077,
35596,
284,
79961,
3050,
486,
2468,
543,
286,
1077,
6073,
284,
35596,
18282,
287,
35733,
543,
286,
1077,
3213,
7113,
8296,
284,
6073,
13937,
8434,
1219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_execute_jump_if_true() {
let mut machine1 = Machine::new(vec![1105,0,4,99,104,1,99]);
machine1.execute().unwrap();
assert_eq!(machine1.output, vec![]);
let mut machine2 = Machine::new(vec![1105,1,4,99,4,1,99]);
machine2.execute().unwrap();
assert_eq!(machine2.output, vec![1]);
} | rust_cleaned_test_functions.jsonl/43085 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44329,
65436,
11119,
16082,
368,
341,
10217,
5206,
5662,
16,
284,
12960,
486,
931,
25592,
20703,
16,
16,
15,
20,
11,
15,
11,
19,
11,
24,
24,
11,
16,
15,
19,
11,
16,
11,
24,
24,
2558,
2109,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_not_found() {
let haystack = "111 a 111b".to_string();
search_test!(&haystack, &"xxx".to_string(), None);
search_test!(&haystack, &"12b".to_string(), None);
search_test!(&haystack, &"a31".to_string(), None);
} | rust_cleaned_test_functions.jsonl/19406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 129
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7913,
21480,
368,
341,
286,
1077,
88447,
284,
330,
16,
16,
16,
264,
220,
16,
16,
16,
65,
3263,
983,
3904,
543,
286,
2711,
4452,
0,
2099,
67312,
7693,
11,
609,
1,
24048,
3263,
983,
3904,
1507... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reference() {
let expected = 5 * 1000;
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
let mut file = at.make_file(TFILE2);
scene.ucmd().arg("-s").arg("+5KB").arg(TFILE1).run();
scene
.ucmd()
.arg("--reference")
.arg(TFILE1... | rust_cleaned_test_functions.jsonl/50492 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 283
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25433,
368,
341,
262,
1077,
3601,
284,
220,
20,
353,
220,
16,
15,
15,
15,
280,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pcr_read_all() {
let mut context = create_ctx_without_session();
let pcr_selection_list = PcrSelectionListBuilder::new()
.with_selection(
HashingAlgorithm::Sha256,
&[
PcrSlot::Slot0,
PcrSlot::Slot1,
PcrSlot:... | rust_cleaned_test_functions.jsonl/47441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2840
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
5082,
6443,
5705,
368,
341,
262,
1077,
5206,
2266,
284,
1855,
15147,
39904,
12316,
1428,
262,
1077,
281,
5082,
23672,
2019,
284,
393,
5082,
11177,
852,
3297,
486,
931,
741,
286,
659,
4197,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pull_request_time() {
const NUM_REPS: usize = 2 * CRDS_UNIQUE_PUBKEY_CAPACITY;
let mut rng = rand::thread_rng();
let pubkeys: Vec<_> = repeat_with(Pubkey::new_unique).take(NUM_REPS).collect();
let mut node = CrdsGossipPull::default();
let mut requests = Ha... | rust_cleaned_test_functions.jsonl/112074 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 700
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65693,
7893,
3009,
368,
341,
286,
733,
15943,
2192,
5012,
25,
22301,
284,
220,
17,
353,
12617,
5936,
90330,
1088,
4493,
4784,
92153,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
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... | 3 |
#[test]
fn test_from_string_d() {
let d: Duration = DurationString::try_from(String::from("1d")).unwrap().into();
assert_eq!(d, Duration::from_secs(86_400));
} | rust_cleaned_test_functions.jsonl/97549 | {
"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,
5673,
3904,
814,
368,
341,
286,
1077,
294,
25,
21045,
284,
21045,
703,
486,
1539,
5673,
2242,
486,
1499,
445,
16,
67,
15197,
15454,
1005,
18122,
543,
286,
2060,
10714,
10297,
67,
11,
21045,
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 |
#[test]
fn test_bitv_set_difference() {
let mut a = BitvSet::new();
let mut b = BitvSet::new();
assert!(a.insert(1));
assert!(a.insert(3));
assert!(a.insert(5));
assert!(a.insert(200));
assert!(a.insert(500));
assert!(b.insert(3));
assert... | rust_cleaned_test_functions.jsonl/119308 | {
"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,
13996,
85,
2602,
47525,
368,
341,
286,
1077,
5206,
264,
284,
6495,
85,
1649,
486,
931,
543,
286,
1077,
5206,
293,
284,
6495,
85,
1649,
486,
931,
1428,
286,
2060,
10297,
64,
7030,
7,
16,
1106,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mint() {
let mut context = get_context(accounts(0));
testing_env!(context.build());
let mut contract = Contract::new_default_meta(accounts(0).into());
testing_env!(context
.storage_usage(env::storage_usage())
.attached_deposit(MINT_STORAGE_COST)
... | rust_cleaned_test_functions.jsonl/36146 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
396,
368,
341,
414,
1077,
5206,
2266,
284,
633,
8467,
91868,
7,
15,
1106,
414,
7497,
15879,
10297,
2147,
13239,
1423,
414,
1077,
5206,
5116,
284,
19185,
486,
931,
9993,
13381,
91868,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_incomplete_competition() {
let input = "Allegoric Alaskians;Blithering Badgers;win\n".to_string() +
"Devastating Donkeys;Allegoric Alaskians;win\n" +
"Courageous Californians;Blithering Badgers;loss\n" +
"Allegoric Alaskians;Courageous Californ... | rust_cleaned_test_functions.jsonl/21170 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
14737,
2965,
55767,
368,
341,
262,
1077,
1946,
284,
330,
2101,
1937,
26359,
1674,
1073,
5380,
26,
4923,
2485,
287,
11461,
10637,
26,
7526,
1699,
3263,
983,
3904,
368,
3610,
394,
330,
14592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pattern_in_declaration_removed_1() {
test("var [] = [];", "");
test("let [] = [];", "");
test("const [] = [];", "");
test("var {} = [];", "");
} | rust_cleaned_test_functions.jsonl/473 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 83
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
21260,
1243,
77926,
68248,
62,
16,
368,
341,
262,
1273,
445,
947,
3056,
284,
3056,
32503,
14498,
262,
1273,
445,
1149,
3056,
284,
3056,
32503,
14498,
262,
1273,
445,
1024,
3056,
284,
3056,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_phys() {
let mut exec = fasync::TestExecutor::new().expect("failed to create an executor");
let test_values = test_setup();
let service_fut = serve_monitor_requests(
test_values.monitor_req_stream,
test_values.phys.clone(),
test_va... | rust_cleaned_test_functions.jsonl/20585 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1083
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
69319,
368,
341,
286,
1077,
5206,
3883,
284,
282,
7692,
486,
2271,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
1273,
9146,
284,
1273,
21363,
543,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new_file() {
let (at, mut ucmd) = at_and_ucmd!();
let filename = "new_file_that_does_not_exist_yet";
ucmd.args(&["-s", "8", filename])
.succeeds()
.no_stdout()
.no_stderr();
assert!(at.file_exists(filename));
assert_eq!(at.read_bytes(filename), vec![b'... | rust_cleaned_test_functions.jsonl/77099 | {
"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,
5921,
2458,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
3899,
284,
330,
931,
2458,
70197,
96374,
7913,
35906,
4178,
295,
876,
262,
57... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fin_wait_1_fin_fin() {
let mut s = socket_fin_wait_1();
recv!(s, [TcpRepr {
control: TcpControl::Fin,
seq_number: LOCAL_SEQ + 1,
ack_number: Some(REMOTE_SEQ + 1),
..RECV_TEMPL
}]);
send!(s, TcpRepr {
cont... | rust_cleaned_test_functions.jsonl/1736 | {
"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,
39737,
18760,
62,
16,
39737,
39737,
368,
341,
286,
1077,
5206,
274,
284,
7575,
39737,
18760,
62,
16,
543,
286,
27006,
10297,
82,
11,
508,
77536,
693,
649,
341,
310,
2524,
25,
64876,
3273,
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_box_filter_handles_empty_images() {
let _ = box_filter(&GrayImage::new(0, 0), 3, 3);
let _ = box_filter(&GrayImage::new(1, 0), 3, 3);
let _ = box_filter(&GrayImage::new(0, 1), 3, 3);
} | rust_cleaned_test_functions.jsonl/35600 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10194,
8727,
68017,
15124,
13283,
368,
341,
286,
1077,
716,
284,
3745,
8727,
2099,
28174,
1906,
486,
931,
7,
15,
11,
220,
15,
701,
220,
18,
11,
220,
18,
317,
286,
1077,
716,
284,
3745,
8727,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reader_prefix_seek() {
let dir = tempfile::TempDir::new().unwrap();
let builder = TestEngineBuilder::new().path(dir.path());
let db = builder.build().unwrap().kv_engine().get_sync_db();
let cf = engine_rocks::util::get_cf_handle(&db, CF_WRITE).unwrap();
l... | rust_cleaned_test_functions.jsonl/125636 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 713
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22306,
13974,
74473,
368,
341,
286,
1077,
5419,
284,
54819,
486,
12151,
6184,
486,
931,
1005,
15454,
543,
286,
1077,
7363,
284,
3393,
4571,
3297,
486,
931,
1005,
2343,
14161,
3875,
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... | 3 |
#[test]
fn test_group_angle_brackets() {
let tokens = TokenStream::from_iter(vec![
TokenTree::Ident(Ident::new("Option", Span::call_site())),
TokenTree::Punct(Punct::new('<', Spacing::Alone)),
TokenTree::Group(Group::new(Delimiter::None, quote! { Vec<u8> })),
TokenTree::... | rust_cleaned_test_functions.jsonl/45552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
21727,
17682,
18382,
368,
341,
1066,
262,
1077,
11211,
284,
9660,
3027,
486,
1499,
11723,
25592,
90515,
286,
9660,
6533,
486,
28301,
7,
28301,
486,
931,
445,
5341,
497,
11903,
486,
6659,
245... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duplicate_last_index() {
let num_shreds = 2;
let num_entries = max_ticks_per_n_shreds(num_shreds, None);
let slot = 1;
let (mut shreds, _) = make_slot_entries(slot, 0, num_entries);
// Mark both as last shred
shreds[0].set_last_in_slot();
... | rust_cleaned_test_functions.jsonl/9584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
12195,
3560,
368,
341,
286,
1077,
1629,
3712,
53369,
284,
220,
17,
280,
286,
1077,
1629,
26092,
284,
1932,
49961,
5678,
1089,
3712,
53369,
8068,
3712,
53369,
11,
2240,
317,
286,
1077,
9446,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flags_from_vec_11() {
let (flags, subcommand, argv) =
flags_from_vec(svec!["deno", "fmt", "script_1.ts", "script_2.ts"]);
assert_eq!(
flags,
DenoFlags {
allow_write: true,
allow_read: true,
..DenoFlags::default()
}
);
assert_eq!(sub... | rust_cleaned_test_functions.jsonl/112840 | {
"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,
14130,
5673,
13251,
62,
16,
16,
368,
341,
262,
1077,
320,
11161,
11,
1186,
5631,
11,
10213,
8,
4035,
414,
8042,
5673,
13251,
1141,
4083,
0,
1183,
5183,
78,
497,
330,
12501,
497,
330,
2282,
62,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_example_10() {
let input: &str = "b";
let valid: usize = count_common_chars(&input);
assert_eq!(valid, 1);
} | rust_cleaned_test_functions.jsonl/120252 | {
"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,
39304,
62,
16,
15,
368,
341,
286,
1077,
1946,
25,
609,
495,
284,
330,
65,
876,
286,
1077,
2697,
25,
22301,
284,
1760,
21107,
37418,
2099,
1355,
317,
286,
2060,
10714,
10297,
1891,
11,
220,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_initialize_coin_price_before_run() {
let _pool = ConstPool::new();
let text = r"
/// price: btc_usdt 100
script {
use 0x1::Coins;
use 0x1::Coins::{BTC, USDT};
fun main() {
let price = Coins::get_price<BTC, USDT>();
assert(price == 100, 1);
}
}
";
... | rust_cleaned_test_functions.jsonl/43929 | {
"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,
40889,
75718,
9040,
23708,
14007,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
698,
2575,
3349,
25,
86037,
11306,
8047,
220,
16,
15,
15,
198,
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_log_append_multiple() {
let l = Log::<Operation>::default();
let o = [Operation::Read, Operation::Write(119)];
l.append(&o, 1, |_o: Operation, _i: usize| {});
assert_eq!(l.head.load(Ordering::Relaxed), 0);
assert_eq!(l.tail.load(Ordering::Relaxed), 2);
... | rust_cleaned_test_functions.jsonl/101050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5224,
26041,
45233,
368,
341,
286,
1077,
326,
284,
2835,
27638,
8432,
6831,
2258,
543,
286,
1077,
297,
284,
508,
8432,
486,
4418,
11,
16730,
486,
7985,
7,
16,
16,
24,
12587,
286,
326,
2057,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_coset_zero() {
assert_eq!(coset_hash(FieldElement::zero(), 1), FieldElement::zero());
assert_eq!(coset_hash(FieldElement::zero(), 2), FieldElement::zero());
assert_eq!(coset_hash(FieldElement::zero(), 512), FieldElement::zero());
assert_eq!(coset_has... | rust_cleaned_test_functions.jsonl/127881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
61192,
295,
19359,
368,
341,
1789,
286,
2060,
10714,
10297,
9407,
295,
8950,
57788,
1691,
486,
14154,
1507,
220,
16,
701,
8601,
1691,
486,
14154,
1423,
286,
2060,
10714,
10297,
9407,
295,
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_common_field_shapes() {
use self::Shape::*;
use crate::util::string_hashmap;
{
let f1 = string_hashmap! {
"a" => Integer,
"b" => Bool,
"c" => Integer,
"d" => StringT,
};
let f2 = string_hashmap! {
"a"... | rust_cleaned_test_functions.jsonl/28787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 461
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21107,
5013,
71315,
368,
341,
262,
990,
656,
486,
12301,
56162,
262,
990,
17717,
486,
1314,
486,
917,
8950,
2186,
280,
262,
341,
286,
1077,
282,
16,
284,
914,
8950,
2186,
0,
341,
310,
330,
64,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_string_null_offset_nulls() {
let array =
StringArray::from(vec![Some("a"), Some("bc"), None, Some("defh")]).data();
let array = array.slice(1, 3);
let arrays = vec![&array];
let mut mutable = MutableArrayData::new(arrays, true, 0);
mutable.e... | rust_cleaned_test_functions.jsonl/102343 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
15162,
6917,
15162,
82,
368,
341,
286,
1077,
1334,
4035,
310,
923,
1857,
486,
1499,
25592,
20703,
8373,
445,
64,
3975,
4329,
445,
8904,
3975,
2240,
11,
4329,
445,
750,
71,
899,
10697,
691,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_timeout() {
let addr = next_test_ip4();
let listener = t!(TcpListener::bind(&addr));
let mut stream = t!(TcpStream::connect(&("localhost", addr.port())));
t!(stream.set_read_timeout(Some(Duration::from_millis(1000))));
let mut buf = [0; 10];
... | rust_cleaned_test_functions.jsonl/7078 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 252
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
20537,
368,
341,
286,
1077,
10789,
284,
1790,
4452,
10385,
19,
543,
286,
1077,
11446,
284,
259,
10297,
77536,
2743,
486,
7666,
2099,
6214,
3237,
286,
1077,
5206,
4269,
284,
259,
10297,
77536... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_merge_moving_order_independent() {
let mut left = Planet {
position: Vector::new(-9., 2.),
velocity: Vector::new(-7.,-2.),
mass: 24.,
};
let right = Planet {
position: Vector::new(1., -5.),
... | rust_cleaned_test_functions.jsonl/70364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
717,
9130,
7869,
1243,
37555,
368,
341,
310,
1077,
5206,
2115,
284,
28835,
341,
394,
2309,
25,
4196,
486,
931,
4080,
24,
2572,
220,
17,
13,
1326,
394,
15435,
25,
4196,
486,
931,
4080,
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_lookup_hosts() {
let authority = create_example();
let mut catalog = Catalog::new();
catalog.upsert(authority.origin().clone().into(), authority);
let mut io_loop = Core::new().unwrap();
let (stream, sender) = TestClientStream::new(Arc::new(catalog));
let client = DnsFut... | rust_cleaned_test_functions.jsonl/84128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 446
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
61129,
368,
341,
262,
1077,
11198,
284,
1855,
39304,
543,
262,
1077,
5206,
16403,
284,
31221,
486,
931,
543,
262,
16403,
17652,
6047,
48269,
487,
20248,
1005,
19982,
1005,
18122,
1507,
11198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expand_home_windows() {
let path = "~/.aws/config";
let environment = Env::from_slice(&[]);
assert_eq!(
expand_home(&path, &Some("C:\\Users\\name".to_string()), &environment)
.to_str()
.unwrap(),
"C:\\Users\\name\\.a... | rust_cleaned_test_functions.jsonl/5183 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67875,
21653,
58220,
368,
341,
286,
1077,
1815,
284,
51269,
11930,
8635,
14730,
876,
286,
1077,
4573,
284,
37039,
486,
1499,
26488,
2099,
56703,
286,
2060,
10714,
33673,
310,
9225,
21653,
2099,
2343... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crypto_auth_primitive() {
unsafe {
let s = crypto_auth_primitive();
let s = std::ffi::CStr::from_ptr(s).to_bytes();
assert!(s == crypto_auth_PRIMITIVE.as_bytes());
}
} | rust_cleaned_test_functions.jsonl/69761 | {
"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,
78298,
14014,
84087,
368,
341,
262,
19860,
341,
286,
1077,
274,
284,
19028,
14014,
84087,
543,
286,
1077,
274,
284,
1460,
486,
53799,
486,
34,
2580,
486,
1499,
4348,
1141,
568,
983,
12524,
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 |
#[test]
fn test_of_input_string() {
let parent = dangerous::input("1234");
let sub = &parent.as_dangerous()[1..2];
assert_eq!(Span::from(sub).of(parent.clone()).unwrap(), sub);
let non_span = Span::from("1224");
assert_eq!(non_span.of(parent), None);
} | rust_cleaned_test_functions.jsonl/124296 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3575,
5898,
3904,
368,
341,
262,
1077,
2681,
284,
11406,
486,
1355,
445,
16,
17,
18,
19,
3071,
262,
1077,
1186,
284,
609,
3765,
5357,
814,
4003,
782,
10116,
16,
496,
17,
935,
262,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_bpf_upgradeable_loader_upgrade_ix() {
let program_address = Pubkey::new_unique();
let buffer_address = Pubkey::new_unique();
let authority_address = Pubkey::new_unique();
let spill_address = Pubkey::new_unique();
let programdata_address = Pubkey::fin... | rust_cleaned_test_functions.jsonl/23418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1016
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
880,
15897,
67794,
480,
22139,
67794,
62686,
368,
341,
286,
1077,
2025,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
4147,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_prog() {
let prog = Prog { name: "util", vers: "0.1.0", yr: "2015" };
assert_eq!(prog.name, "util");
assert_eq!(prog.vers, "0.1.0");
assert_eq!(prog.yr, "2015");
} | rust_cleaned_test_functions.jsonl/1076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60390,
368,
341,
262,
1077,
29271,
284,
1298,
70,
314,
829,
25,
330,
1314,
497,
5436,
25,
330,
15,
13,
16,
13,
15,
497,
42338,
25,
330,
17,
15,
16,
20,
1,
2605,
262,
2060,
10714,
10297,
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... | 1 |
#[test]
fn test_sparse_update_eval() {
let projector = TileCoding::new(SHBuilder::default(), 4, 100);
let mut evaluator = VectorFunction::zeros(projector.dim(), 2);
assert_eq!(evaluator.n_outputs(), 2);
assert_eq!(evaluator.weights.len(), 200);
let features = projector.... | rust_cleaned_test_functions.jsonl/26872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71123,
8882,
21296,
368,
341,
286,
1077,
67985,
284,
20744,
77513,
486,
931,
3759,
39,
3297,
486,
2258,
1507,
220,
19,
11,
220,
16,
15,
15,
317,
286,
1077,
5206,
69810,
284,
4196,
5152,
486,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_run_func_does_not_exist() {
let map = HashMap::new();
let func = HashMap::<String, Box<EvalFunc>>::new();
match Query::parse("Hello $hi()".to_owned())
.unwrap()
.eval(&map, &func) {
Ok(_) => unreachable!(),
Err(e) => {
... | rust_cleaned_test_functions.jsonl/19218 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
9596,
96374,
7913,
35906,
368,
1476,
286,
1077,
2415,
284,
10528,
486,
931,
1428,
286,
1077,
2915,
284,
10528,
27638,
703,
11,
8261,
23835,
831,
9626,
77595,
931,
1428,
286,
2432,
11361,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_check_unnecessary_braces_in_use_statement() {
check_not_applicable(
"
use a;
use a::{c, d::e};
",
check_unnecessary_braces_in_use_statement,
);
check_apply("use {b};", "use b;", check_unnecessary_braces_in_use_statem... | rust_cleaned_test_functions.jsonl/71657 | {
"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,
7200,
4907,
94217,
17682,
2434,
1243,
15951,
37404,
368,
341,
286,
1779,
7913,
8191,
46114,
1006,
310,
6228,
310,
990,
264,
280,
310,
990,
264,
22964,
66,
11,
294,
486,
68,
2440,
286,
21796,
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_intersect() {
let segment1 = Segment {
point: (1., 1.),
vector: Vector2D { x: 2., y: 2. },
};
let segment2 = Segment {
point: (0., 2.),
vector: Vector2D { x: 3., y: 0. },
};
let intersect_point = segment1.in... | rust_cleaned_test_functions.jsonl/110313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
368,
341,
286,
1077,
10238,
16,
284,
37103,
341,
310,
1459,
25,
320,
16,
2572,
220,
16,
13,
1326,
310,
4621,
25,
4196,
17,
35,
314,
856,
25,
220,
17,
2572,
379,
25,
220,
17,
13,
115... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_zero_opmask_reg() {
for info in decoder_tests(false, false) {
if (info.decoder_options() & DecoderOptions::NO_INVALID_CHECK) != 0 {
continue;
}
let op_code = info.code().op_code();
if !op_code.require_op_mask_register() {
continue;
}
let mut bytes = to_vec_u8(info.hex... | rust_cleaned_test_functions.jsonl/82768 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 497
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
19359,
10287,
11258,
4920,
368,
341,
2023,
3546,
304,
24551,
32509,
3576,
11,
895,
8,
341,
197,
743,
320,
2733,
74047,
8743,
368,
609,
50472,
3798,
486,
8996,
15167,
11780,
8,
961,
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... | 4 |
#[test]
fn test_parse_valid_datetime() -> Result<()> {
let mut ctx = EvalContext::default();
let cases = vec![
("2019-09-16 10:11:12", "20190916101112", 0, false),
("2019-09-16 10:11:12", "190916101112", 0, false),
("2019-09-16 10:11:01", "19091610111", 0, fal... | rust_cleaned_test_functions.jsonl/40457 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2559
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
8337,
28943,
368,
1464,
5714,
71698,
341,
286,
1077,
5206,
5635,
284,
58239,
1972,
486,
2258,
543,
286,
1077,
5048,
284,
7486,
90515,
310,
3489,
17,
15,
16,
24,
12,
15,
24,
12,
16,
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... | 6 |
#[test]
fn test_enum_untagged() {
#[derive(Serialize)]
#[serde(untagged)]
enum E {
Unit,
Newtype(u32),
Tuple(u32, u32),
Array(Vec<u32>),
Struct { a: u32 },
Table(std::collections::HashMap<String, u32>),
}
... | rust_cleaned_test_functions.jsonl/4216 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
62,
3850,
96476,
368,
341,
286,
11506,
27098,
3759,
9050,
5563,
286,
11506,
47024,
7,
3850,
96476,
5563,
286,
7618,
468,
341,
310,
7954,
345,
310,
1532,
1313,
8154,
18,
17,
1326,
310,
246... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_map() {
let mut hash_map: TermHashMap = TermHashMap::new(18);
{
hash_map.mutate_or_create("abc", |opt_val: Option<u32>| {
assert_eq!(opt_val, None);
3u32
});
}
{
hash_map.mutate_or_create("ab... | rust_cleaned_test_functions.jsonl/750 | {
"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,
8950,
5376,
368,
341,
286,
1077,
5206,
5175,
5376,
25,
17519,
18497,
284,
17519,
18497,
486,
931,
7,
16,
23,
317,
286,
341,
310,
5175,
5376,
744,
332,
349,
8734,
8657,
445,
13683,
497,
760,
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... | 2 |
#[test]
fn test_bytewise_fold_at_word_boundary_only_whitespace() {
new_ucmd!()
.args(&["-w2", "-s", "-b"])
.pipe_in(" ")
.succeeds()
.stdout_is(" \n ");
} | rust_cleaned_test_functions.jsonl/23311 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 122
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3710,
83,
24350,
61187,
3752,
13533,
54004,
18410,
86175,
368,
341,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
2099,
1183,
12,
86,
17,
497,
6523,
82,
497,
6523,
65,
14108,
286,
659,
13768,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_list_indexes_into_element_ids() {
let actor: ActorID = "8f389df8fecb4ddc989102321af3578e".try_into().unwrap();
let remote_actor: ActorID = "9ba21574dc44411b8ce37bc6037a9687".try_into().unwrap();
let remote1: Change = UncompressedChange {
actor_id: remote_actor.clone... | rust_cleaned_test_functions.jsonl/22978 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3233
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18449,
2019,
50161,
45514,
7894,
8077,
368,
341,
262,
1077,
12089,
25,
24718,
915,
284,
330,
23,
69,
18,
23,
24,
2940,
23,
76526,
65,
19,
631,
66,
24,
23,
24,
16,
15,
17,
18,
17,
16,
2577,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rpc_get_signature_statuses() {
let bob_pubkey = solana_sdk::pubkey::new_rand();
let RpcHandler {
io,
mut meta,
blockhash,
alice,
confirmed_block_signatures,
..
} = start_rpc_handler_with_tx(&bob_pubke... | rust_cleaned_test_functions.jsonl/3036 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1410
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
3062,
39859,
83702,
368,
341,
286,
1077,
35192,
34014,
792,
284,
2048,
3362,
61783,
486,
9585,
792,
486,
931,
33864,
543,
286,
1077,
79961,
3050,
341,
310,
6399,
345,
310,
5206,
8823,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_once_or_up_to_none_large() {
let occurence: Occurrences = Occurrences::OnceOrMore;
occurence.check(core::u16::MAX).unwrap();
} | rust_cleaned_test_functions.jsonl/45928 | {
"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,
7630,
8734,
8237,
2346,
31488,
45228,
368,
341,
286,
1077,
2983,
86937,
25,
19927,
33246,
284,
19927,
33246,
486,
12522,
2195,
7661,
280,
286,
2983,
86937,
9093,
47867,
486,
84,
16,
21,
486,
10586... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_batch_normalize() {
let mut p = ExtendedPoint::from(AffinePoint {
u: Fq([
0xc0115cb656ae4839,
0x623dc3ff81d64c26,
0x5868e739b5794f2c,
0x23bd4fbb18d39c9c,
]),
v: Fq([
0x7588ee6d6dd40deb,
0x9d6d7a23... | rust_cleaned_test_functions.jsonl/103799 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 663
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14534,
80807,
368,
341,
262,
1077,
5206,
281,
284,
40565,
2609,
486,
1499,
4346,
542,
482,
2609,
341,
286,
575,
25,
434,
80,
8956,
310,
220,
15,
8148,
15,
16,
16,
20,
7221,
21,
20,
21,
5918,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_challenge_token() {
let mut user_data = [0; NETCODE_USER_DATA_BYTES];
for i in 0..user_data.len() {
user_data[i] = i as u8;
}
let client_id = 5;
let challenge_sequence = 0xFED;
let mut challenge_key = crypto::generate_key();
let challenge_packet =
... | rust_cleaned_test_functions.jsonl/18959 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 799
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
87406,
6458,
368,
341,
262,
1077,
5206,
1196,
1769,
284,
508,
15,
26,
24977,
14866,
9107,
7896,
40705,
935,
262,
369,
600,
304,
220,
15,
496,
872,
1769,
19406,
368,
341,
286,
1196,
1769,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_aggregation_non_mem_star() {
let rng = &mut ChaChaRng::from_seed([0u8; 32]);
for _ in 0..10 {
let int_size_bits = 256;
let mut acc = Accumulator::setup::<RSAGroup, _>(rng, int_size_bits);
// regular add
let xs = (0..5)
... | rust_cleaned_test_functions.jsonl/96052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 391
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
34442,
21637,
12976,
31681,
368,
341,
286,
1077,
28422,
284,
609,
6984,
27721,
95971,
49,
968,
486,
1499,
33809,
2561,
15,
84,
23,
26,
220,
18,
17,
10149,
286,
369,
716,
304,
220,
15,
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... | 3 |
#[test]
fn test_g1_projective_group() {
let mut rng = ark_std::test_rng();
let a: G1Projective = rng.gen();
let b: G1Projective = rng.gen();
group_test(a, b);
} | rust_cleaned_test_functions.jsonl/65018 | {
"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,
1889,
16,
16352,
533,
6288,
368,
341,
262,
1077,
5206,
28422,
284,
55217,
15656,
486,
1944,
66849,
543,
262,
1077,
264,
25,
479,
16,
7849,
533,
284,
28422,
22822,
543,
262,
1077,
293,
25,
479,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_allocating_memory_reduces_subnet_available_memory() {
with_setup(
SubnetType::Application,
|exec_env, _, _, routing_table, subnet_records| {
let wasm_binary = wabt::wat2wasm(MEMORY_ALLOCATION_WAT).unwrap();
let tmpdir = tempfile::Builder::new().prefix(... | rust_cleaned_test_functions.jsonl/56221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1209
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14802,
1095,
19195,
1288,
1054,
1603,
95681,
26962,
19195,
368,
341,
262,
448,
21363,
1006,
286,
3719,
4711,
929,
486,
4988,
345,
286,
760,
11748,
15879,
11,
8358,
8358,
29058,
5237,
11,
51457,
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_buffer_bitand_different_sizes() {
let buf1 = Buffer::from([1_u8, 1_u8]);
let buf2 = Buffer::from([0b01001110]);
let _buf3 = (&buf1 | &buf2).unwrap();
} | rust_cleaned_test_functions.jsonl/20571 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7776,
13996,
437,
82741,
32159,
368,
341,
286,
1077,
6607,
16,
284,
10312,
486,
1499,
2561,
16,
7300,
23,
11,
220,
16,
7300,
23,
2558,
286,
1077,
6607,
17,
284,
10312,
486,
1499,
2561,
15,
65,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq2_get_b() {
use ff::Field;
let mut a = Fq2::one();
a.mul_by_nonresidue();
let mut b = a.inverse().unwrap();
let c = b;
b.double();
b.add_assign(&c);
print!("B coeff in Fq2 = {}\n", b);
} | rust_cleaned_test_functions.jsonl/100940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
17,
3062,
880,
368,
341,
262,
990,
25539,
486,
1877,
401,
262,
1077,
5206,
264,
284,
434,
80,
17,
486,
603,
543,
262,
264,
53141,
3710,
21637,
416,
60607,
543,
262,
1077,
5206,
293,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ctor() {
assert_eq!(
GiDocgen::from_str("[ctor@Gtk.Box.new]"),
Ok(GiDocgen::Constructor {
namespace: Some("Gtk".to_string()),
type_: "Box".to_string(),
name: "new".to_string(),
})
);
... | rust_cleaned_test_functions.jsonl/78477 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7233,
54185,
368,
341,
286,
2060,
10714,
33673,
310,
15392,
9550,
4370,
486,
1499,
2895,
10937,
4904,
31,
45103,
54484,
4618,
60,
4461,
310,
7622,
6699,
72,
9550,
4370,
486,
13288,
341,
394,
4473,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cleanup() {
let tmpdir = tempfile::tempdir().unwrap();
{
let mut tmpfile = tempfile::tempfile_in(&tmpdir).unwrap();
write!(tmpfile, "abcde").unwrap();
}
let num_files = fs::read_dir(&tmpdir).unwrap().count();
assert!(num_files == 0);
} | rust_cleaned_test_functions.jsonl/100759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42444,
368,
341,
262,
1077,
4174,
3741,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
341,
286,
1077,
5206,
4174,
1192,
284,
54819,
486,
3888,
1192,
1243,
2099,
5173,
3741,
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_field_df_example() {
// df -B1 | numfmt --header --field 2-4 --to=si
new_ucmd!()
.args(&["--header", "--field", "2-4", "--to=si"])
.pipe_in_fixture("df_input.txt")
.succeeds()
.stdout_is_fixture("df_expected.txt");
} | rust_cleaned_test_functions.jsonl/46022 | {
"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,
5013,
10894,
39304,
368,
341,
262,
442,
6764,
481,
33,
16,
760,
1629,
12501,
1177,
2708,
1177,
2566,
220,
17,
12,
19,
1177,
983,
28,
6321,
198,
262,
501,
68887,
2277,
0,
741,
286,
659,
2116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stdin_number_non_blank() {
for same_param in vec!["-b", "--number-nonblank"] {
new_ucmd!()
.arg(same_param)
.arg("-")
.pipe_in("\na\nb\n\n\nc")
.succeeds()
.stdout_only("\n 1\ta\n 2\tb\n\n\n 3\tc");
}
} | rust_cleaned_test_functions.jsonl/90939 | {
"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,
15656,
258,
5500,
21637,
56103,
368,
341,
262,
369,
1852,
4090,
304,
7486,
0,
1183,
12,
65,
497,
14482,
4082,
98700,
10189,
1341,
341,
286,
501,
68887,
2277,
0,
741,
310,
659,
858,
1141,
373,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_compare_version() {
assert_eq!(compare_version("0.0.1", "0.0.2"), 1);
assert_eq!(compare_version("0.0.3", "0.0.1"), -1);
assert_eq!(compare_version("1.2.3", "1.2.3"), 0);
assert_eq!(compare_version("0.2.1", "0.1.1"), -1);
assert_eq!(compare_version("0.2.1"... | rust_cleaned_test_functions.jsonl/49961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 417
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32235,
9438,
368,
341,
286,
2060,
10714,
10297,
18948,
9438,
445,
15,
13,
15,
13,
16,
497,
330,
15,
13,
15,
13,
17,
3975,
220,
16,
317,
286,
2060,
10714,
10297,
18948,
9438,
445,
15,
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_module_imported_memories_limit() {
let limits = ModuleLimits {
imported_memories: 0,
..Default::default()
};
let mut module = Module::default();
module.memory_plans.push(MemoryPlan {
style: MemoryStyle::Static { bound: 0 },
... | rust_cleaned_test_functions.jsonl/48861 | {
"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,
10750,
18434,
291,
12976,
2433,
14763,
368,
341,
286,
1077,
13388,
284,
13711,
94588,
341,
310,
24928,
12976,
2433,
25,
220,
15,
345,
310,
5241,
3675,
486,
2258,
741,
286,
3634,
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... | 1 |
#[test]
fn test_introduce_var_last_expr() {
covers!(test_introduce_var_last_expr);
check_assist(
introduce_variable,
"
fn foo() {
bar(<|>1 + 1<|>)
}",
"
fn foo() {
let <|>var_name = 1 + 1;
bar(var_name)
}",
);
check_assist(
... | rust_cleaned_test_functions.jsonl/108755 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 293
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4042,
47845,
4612,
12195,
21915,
368,
341,
286,
14521,
10297,
1944,
4042,
47845,
4612,
12195,
21915,
317,
286,
1779,
12083,
380,
1006,
310,
19131,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
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_config_serialization_params_fail_read() {
let toml_file: tempfile::NamedTempFile = tempfile::NamedTempFile::new().ok().unwrap();
let reader: Box<dyn Read> = Box::new(std::fs::File::open(toml_file.path()).unwrap());
// Try to write unexisting file
assert!(deseriali... | rust_cleaned_test_functions.jsonl/16004 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 149
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
25602,
2022,
6745,
22121,
6443,
368,
341,
286,
1077,
311,
1014,
2458,
25,
54819,
486,
15810,
12151,
1703,
284,
54819,
486,
15810,
12151,
1703,
486,
931,
1005,
562,
1005,
15454,
543,
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_huge_request() {
let env = init_cluster(1);
let mut s = String::new();
for _ in 0..100000 {
s.push('a');
}
let r = Client::to(0, env.clone()).set_rep("k1", &s, 1);
assert!(r.is_ok());
let r = Client::to(0, env.clone()).set_rep("k2", &s, 2);
assert!(... | rust_cleaned_test_functions.jsonl/62221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
4733,
7893,
368,
341,
262,
1077,
6105,
284,
2930,
28441,
7,
16,
317,
1066,
262,
1077,
5206,
274,
284,
923,
486,
931,
543,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
15,
15,
34... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_onchain_to_onchain_claim() {
// on downstream peer's remote commitment tx.
// channel.
// gets broadcast.
let chanmon_cfgs = create_chanmon_cfgs(3);
let node_cfgs = create_node_cfgs(3, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(3, &node_cfgs, &[None, None, None]);
l... | rust_cleaned_test_functions.jsonl/16907 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4470,
8819,
2346,
4470,
8819,
84969,
368,
341,
1572,
197,
322,
389,
51352,
14397,
594,
8699,
15155,
9854,
624,
11120,
197,
322,
5496,
624,
1572,
197,
322,
5221,
12899,
382,
10217,
26023,
1645,
183... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_update_default_vote_policy() {
let council = vec![accounts(0), accounts(1)];
let mut policy = default_policy(council);
assert_eq!(
WeightKind::RoleWeight,
policy.default_vote_policy.weight_kind
);
assert_eq!(U128(0), policy.default... | rust_cleaned_test_functions.jsonl/132767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 558
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
9993,
54360,
22773,
368,
341,
286,
1077,
14833,
284,
7486,
20703,
26206,
7,
15,
701,
9618,
7,
16,
12587,
286,
1077,
5206,
4842,
284,
1638,
22773,
1337,
6690,
626,
286,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sort() {
let a = Int32Chunked::new_from_slice("a", &[1, 9, 3, 2]);
let b = a
.sort(false)
.into_iter()
.map(|opt| opt.unwrap())
.collect::<Vec<_>>();
assert_eq!(b, [1, 2, 3, 9]);
let a = Utf8Chunked::new_from_slice("... | rust_cleaned_test_functions.jsonl/22180 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 281
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
368,
341,
286,
1077,
264,
284,
1333,
18,
17,
28304,
291,
486,
931,
5673,
26488,
445,
64,
497,
44590,
16,
11,
220,
24,
11,
220,
18,
11,
220,
17,
2558,
286,
1077,
293,
284,
264,
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_all_parameters_blake2sp() {
let mut params = blake2sp::Params::new();
params
.hash_length(18)
// Make sure a shorter key properly overwrites a longer one.
.key(b"not the real key")
.key(b"bar");
// Check the State API.
assert_eq!(
"947d4c6... | rust_cleaned_test_functions.jsonl/10644 | {
"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,
5705,
18263,
13141,
726,
17,
2154,
368,
341,
262,
1077,
5206,
3628,
284,
1501,
726,
17,
2154,
486,
4870,
486,
931,
543,
262,
3628,
198,
286,
659,
8296,
5118,
7,
16,
23,
340,
286,
442,
7405,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_query_conversion_no_metadata() {
let sr = meta_search::SearchRequest {
key: Some("key".to_string()),
resource_type: Some(meta_search::ResourceType::Dataset as i32),
conditions: vec![],
pagination: None,
};
let spec: SearchS... | rust_cleaned_test_functions.jsonl/113862 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 336
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
64132,
6536,
22220,
368,
341,
286,
1077,
18962,
284,
8823,
10716,
486,
5890,
1900,
341,
310,
1376,
25,
4329,
445,
792,
3263,
983,
3904,
14702,
310,
5101,
1819,
25,
4329,
45119,
10716,
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_set_b() {
let mut cpu: CPU = CPU::new();
let pc = cpu.pc;
cpu = cpu.set_b(Register { value: 0 });
cpu.memory.write_64bit(1, 10);
cpu = execute_set(cpu, pc, 0b001);
assert_eq!(cpu.pc.value, 9);
assert_eq!(cpu.f.value, 0);
assert_e... | rust_cleaned_test_functions.jsonl/123553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
880,
368,
341,
286,
1077,
5206,
17319,
25,
13940,
284,
13940,
486,
931,
543,
286,
1077,
13312,
284,
17319,
53335,
401,
286,
17319,
284,
17319,
980,
880,
79203,
314,
897,
25,
220,
15,
1625,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_auto_gc_a_round_without_rewind() {
// First region starts with empty and last region ends with empty.
let regions = vec![
(b"".to_vec(), b"1".to_vec(), 1),
(b"1".to_vec(), b"2".to_vec(), 2),
(b"3".to_vec(), b"4".to_vec(), 3),
(b"7".... | rust_cleaned_test_functions.jsonl/4820 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 551
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27740,
49423,
4306,
29896,
39904,
1288,
19154,
368,
341,
286,
442,
5512,
5537,
8471,
448,
4287,
323,
1537,
5537,
10335,
448,
4287,
624,
286,
1077,
13604,
284,
7486,
90515,
310,
320,
65,
69355,
983... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_smoke() {
use rand::Rng;
let mut rng = rand::thread_rng();
let learning_rate = 0.01;
let (image_depth, image_rows, image_cols) = (3, 9, 9);
let image_dimensions = vec![image_depth, image_rows, image_cols];
let output_dimensions = vec![1, 2, 2];
... | rust_cleaned_test_functions.jsonl/106562 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 990
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15874,
4740,
368,
341,
286,
990,
10382,
486,
49,
968,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
1428,
286,
1077,
6832,
9246,
284,
220,
15,
13,
15,
16,
401,
286,
1077,
320,
180... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_query() {
let perms1 = Permissions {
read: UnaryPermission {
global_state: PermissionState::Granted,
..Default::default()
},
write: UnaryPermission {
global_state: PermissionState::Granted,
..Default::default()
},
net: UnaryPermis... | rust_cleaned_test_functions.jsonl/121180 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1305
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
368,
341,
262,
1077,
82282,
16,
284,
53357,
341,
414,
1349,
25,
86951,
14966,
341,
286,
3644,
4387,
25,
18135,
1397,
486,
55481,
345,
286,
5241,
3675,
486,
2258,
741,
414,
1153,
414,
3270,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterate_all_controllers() {
let mut controllers = Default::default();
let h: *const c_void = std::ptr::null();
unsafe {
cgroup_init();
let mut ret = cgroup_get_all_controller_begin(&h as *const *const c_void, &mut controllers);
assert!(ret == 0);
wh... | rust_cleaned_test_functions.jsonl/131015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 528
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11723,
349,
5705,
10260,
7273,
368,
341,
262,
1077,
5206,
26225,
284,
7899,
486,
2258,
543,
262,
1077,
305,
25,
353,
1024,
272,
37775,
284,
1460,
486,
3505,
486,
2921,
1428,
262,
19860,
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... | 4 |
#[test]
fn test_find() {
let v: &[isize] = &[1, 3, 9, 27, 103, 14, 11];
assert_eq!(*v.iter().find(|&&x| x & 1 == 0).unwrap(), 14);
assert_eq!(*v.iter().find(|&&x| x % 3 == 0).unwrap(), 3);
assert!(v.iter().find(|&&x| x % 12 == 0).is_none());
} | rust_cleaned_test_functions.jsonl/25932 | {
"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,
21814,
368,
341,
262,
1077,
348,
25,
44590,
285,
551,
60,
284,
44590,
16,
11,
220,
18,
11,
220,
24,
11,
220,
17,
22,
11,
220,
16,
15,
18,
11,
220,
16,
19,
11,
220,
16,
16,
935,
262,
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... | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.