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_primitive_null_offset() {
let b = Primitive::<u8>::from(vec![Some(1), None, Some(3)]).to(DataType::UInt8);
let b = b.slice(1, 2);
let mut a = GrowablePrimitive::new(&[&b], false, 2);
a.extend(0, 0, 2);
let result: PrimitiveArray<u8> = a.into();
let... | rust_cleaned_test_functions.jsonl/80111 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
84087,
15162,
6917,
368,
341,
286,
1077,
293,
284,
51460,
27638,
84,
23,
6831,
1499,
25592,
20703,
8373,
7,
16,
701,
2240,
11,
4329,
7,
18,
7252,
568,
983,
63941,
486,
18777,
23,
317,
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_invalid() {
let name = Name::from_ascii("invalid.").unwrap();
let usage = USAGE.get(&name);
assert_eq!(usage.name(), INVALID.name());
let name = Name::from_ascii("something.invalid.").unwrap();
let usage = USAGE.get(&name);
assert_eq!(usage.name... | rust_cleaned_test_functions.jsonl/26318 | {
"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,
31433,
368,
341,
286,
1077,
829,
284,
3988,
486,
1499,
50238,
445,
11808,
98401,
15454,
1428,
286,
1077,
10431,
284,
89740,
670,
2099,
606,
317,
286,
2060,
10714,
10297,
17698,
2644,
1507,
32269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_branch_merge() {
let mut hdr: MapxOrdRawKeyVs<usize> = MapxOrdRawKeyVs::new();
let mvn = VersionName(b"manster0");
pnk!(hdr.version_create(mvn));
pnk!(hdr.insert(<usize as ValueEnDe>::encode(&1), 1));
let bn = BranchName(b"test");
let vn = VersionName(b"test0");
pnk... | rust_cleaned_test_functions.jsonl/53978 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28031,
20888,
368,
341,
262,
1077,
5206,
36615,
25,
5027,
87,
24621,
20015,
1592,
51737,
90244,
29,
284,
5027,
87,
24621,
20015,
1592,
51737,
486,
931,
543,
262,
1077,
23164,
77,
284,
6079,
675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_time_32_millisecond() {
let expected = vec![
"+--------------+",
"| f |",
"+--------------+",
"| 03:05:11.111 |",
"| |",
"+--------------+",
];
check_datetime!(
... | rust_cleaned_test_functions.jsonl/39721 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
3009,
62,
18,
17,
717,
65358,
368,
341,
286,
1077,
3601,
284,
7486,
90515,
310,
6630,
42091,
10,
756,
310,
25203,
282,
310,
760,
756,
310,
6630,
42091,
10,
756,
310,
25203,
220,
15,
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_error_stack() {
let mut runtime = JsRuntime::new(RuntimeOptions::default());
let result = runtime.execute(
"error_stack.js",
r#"
function assert(cond) {
if (!cond) {
throw Error("assert");
}
}
function main() {
assert(false);
}
main();
"#,
);
let e... | rust_cleaned_test_functions.jsonl/4866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 225
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
15528,
368,
341,
262,
1077,
5206,
15592,
284,
39122,
15123,
486,
931,
52610,
3798,
486,
2258,
1423,
262,
1077,
1102,
284,
15592,
7769,
1006,
414,
330,
841,
15528,
2857,
756,
414,
435,
2,
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_parse_timestamp_nanoseconds() {
assert_eq!(
parse_item::<TimestampNanosecondType>("1970-01-01T00:00:00Z").unwrap(),
0
);
let naive_datetime = NaiveDateTime::new(
NaiveDate::from_ymd(2018, 11, 13),
NaiveTime::from_hms_nano(17... | rust_cleaned_test_functions.jsonl/16422 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 740
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
23073,
73936,
75889,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
5634,
27638,
20812,
45,
276,
960,
1297,
929,
13211,
16,
24,
22,
15,
12,
15,
16,
12,
15,
16,
51,
15,
15,
25,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ground_rel() {
let schemaReplicant = prepopulated_schemaReplicant();
// Verify that we accept inline constants.
let causetq = r#"[:find ?x ?y :where [(ground [[1 "xxx"] [2 "yyy"]]) [[?x ?y]]]]"#;
let SQLCausetQ { allegrosql, args } = translate(&schemaReplicant, causetq);
ass... | rust_cleaned_test_functions.jsonl/90722 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 659
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72492,
13557,
368,
341,
262,
1077,
10802,
18327,
35237,
284,
855,
8374,
7757,
25371,
18327,
35237,
1428,
262,
442,
25429,
429,
582,
4193,
7381,
18021,
624,
262,
1077,
2162,
18187,
80,
284,
435,
55... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_newtype_struct() {
#[derive(Serialize, PartialEq, Debug)]
struct Newtype(BTreeMap<String, i32>);
let inner = Newtype(treemap!(String::from("inner") => 123));
let outer = treemap!(String::from("outer") => to_value(&inner).unwrap());
test_encode_ok(&[(inner, r#"{"inner"... | rust_cleaned_test_functions.jsonl/29825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
5921,
1313,
15126,
368,
341,
262,
11506,
27098,
3759,
9050,
11,
55039,
11,
11091,
5563,
262,
2036,
1532,
1313,
5349,
6533,
2227,
3464,
11,
600,
18,
17,
29,
626,
262,
1077,
9179,
284,
1532,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_search() {
assert_eq!(binary_search(&(0..127), "FBFBBFF", 'F', 'B'), 44);
assert_eq!(binary_search(&(0..7), "RLR", 'L', 'R'), 5);
} | rust_cleaned_test_functions.jsonl/114229 | {
"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,
31761,
10716,
368,
341,
262,
2060,
10714,
10297,
25891,
10716,
29089,
15,
496,
16,
17,
22,
701,
330,
16208,
37,
10098,
1748,
497,
364,
37,
516,
364,
33,
4567,
220,
19,
19,
317,
262,
2060,
1071... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_json_rpc_http_errors() {
let (_mock_db, _runtime, url, _) = create_db_and_runtime();
let client = reqwest::blocking::Client::new();
// check that only root path is accessible
let fake_path = format!("{}/fake_path", url);
let resp = client.get(&fake_path).send().unwrap();
... | rust_cleaned_test_functions.jsonl/46601 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 440
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
60799,
25888,
20196,
368,
341,
262,
1077,
5453,
16712,
8685,
11,
716,
22255,
11,
2515,
11,
27439,
284,
1855,
8685,
8378,
33232,
1428,
262,
1077,
2943,
284,
4232,
11039,
486,
70356,
486,
2959... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_to_msg_with_tag_rekey() {
let before_internal_key: [u8; 32] = [
23u8, 45u8, 143u8, 75u8, 14u8, 65u8, 110u8, 208u8, 6u8, 34u8, 38u8, 33u8, 64u8, 116u8,
179u8, 244u8, 8u8, 121u8, 32u8, 23u8, 87u8, 135u8, 147u8, 246u8, 88u8, 52u8, 219u8,
33u8, 44u8, 6... | rust_cleaned_test_functions.jsonl/75573 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
2346,
6483,
6615,
9372,
1288,
792,
368,
341,
286,
1077,
1573,
23472,
3097,
25,
508,
84,
23,
26,
220,
18,
17,
60,
284,
2278,
310,
220,
17,
18,
84,
23,
11,
220,
19,
20,
84,
23,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_statistics_debug() {
let stats = Statistics::int32(Some(1), Some(12), None, 12, true);
assert_eq!(
format!("{:?}", stats),
"Int32({min: Some(1), max: Some(12), distinct_count: None, null_count: 12, \
min_max_deprecated: true})"
);
... | rust_cleaned_test_functions.jsonl/15832 | {
"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,
49569,
15446,
368,
341,
286,
1077,
10472,
284,
24624,
486,
396,
18,
17,
65405,
7,
16,
701,
4329,
7,
16,
17,
701,
2240,
11,
220,
16,
17,
11,
830,
317,
286,
2060,
10714,
33673,
310,
3561,
8892... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_input1() {
let content = "939
7,13,x,x,59,x,31,19";
let input = input_generator(content);
let result = solve_part1(&input);
assert_eq!(result, 295);
} | rust_cleaned_test_functions.jsonl/103593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 88
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
16,
368,
341,
262,
1077,
2213,
284,
330,
24,
18,
24,
198,
22,
11,
16,
18,
12803,
12803,
11,
20,
24,
12803,
11,
18,
16,
11,
16,
24,
876,
262,
1077,
1946,
284,
1946,
25813,
15063,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sty_zero() {
let mut cpu = mock_cpu(&[0x84, 0x10]);
cpu.Y = 0xff;
let mut result = cpu.read_at(0x0010);
assert!(result == 0x00, "expected 0x00, got {:#x}", result);
cpu.step(None);
result = cpu.read_at(0x0010);
assert!(result == 0xff, "exp... | rust_cleaned_test_functions.jsonl/86661 | {
"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,
1261,
88,
19359,
368,
341,
286,
1077,
5206,
17319,
284,
7860,
21795,
2099,
58,
15,
87,
23,
19,
11,
220,
15,
87,
16,
15,
2558,
286,
17319,
7507,
284,
220,
15,
9020,
401,
286,
1077,
5206,
1102... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tile_restoration_write() {
let (fi, mut fs, mut fb, frame_rate) = setup(256, 256);
{
let ti = TilingInfo::from_target_tiles(
fi.sb_size_log2(),
fi.width,
fi.height,
frame_rate,
1,
1,
false,
);
let iter = ti.... | rust_cleaned_test_functions.jsonl/30659 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 779
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29844,
32231,
7614,
9165,
368,
341,
262,
1077,
320,
9983,
11,
5206,
8619,
11,
5206,
25469,
11,
4034,
9246,
8,
284,
6505,
7,
17,
20,
21,
11,
220,
17,
20,
21,
626,
262,
341,
310,
1077,
8988,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_validator_vargs_fn_with_min_args() {
// Correct signature
let node = ExprDefBuilder::scalar_func(ScalarFuncSig::CastIntAsJson, FieldTypeTp::LongLong)
.push_child(ExprDefBuilder::constant_real(3.0))
.push_child(ExprDefBuilder::constant_real(5.0))
... | rust_cleaned_test_functions.jsonl/103952 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 795
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64959,
2273,
2116,
15246,
6615,
7260,
8384,
368,
341,
286,
442,
39970,
11957,
198,
286,
1077,
2436,
284,
28819,
2620,
3297,
486,
35342,
9596,
7,
20639,
9626,
47246,
486,
18714,
1072,
2121,
5014,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_partition_template() {
use management::partition_template::part::{ColumnFormat, Part};
let protobuf = management::PartitionTemplate {
parts: vec![
management::partition_template::Part {
part: Some(Part::Time("time".to_string())),
... | rust_cleaned_test_functions.jsonl/65180 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 707
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43840,
8693,
368,
341,
286,
990,
6240,
486,
40998,
8693,
486,
4480,
22964,
2933,
4061,
11,
3660,
2315,
286,
1077,
69634,
284,
6240,
486,
49978,
7275,
341,
310,
5479,
25,
7486,
90515,
394,
6240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bad_form_submissions() {
run_test!(|client, _conn| {
let res = client.post("/todo")
.header(ContentType::Form)
.dispatch();
let mut cookies = res.headers().get("Set-Cookie");
assert_eq!(res.status(), Status::UnprocessableEntity);
... | rust_cleaned_test_functions.jsonl/32835 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 512
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
7915,
5228,
5176,
368,
341,
262,
1598,
4452,
10297,
91,
2972,
11,
716,
5148,
91,
341,
1789,
286,
1077,
592,
284,
2943,
6542,
4283,
17370,
1138,
310,
659,
2708,
7,
29504,
486,
1838,
340,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_run_check_duplicate() {
let blockstore_path = get_tmp_ledger_path!();
let blockstore = Arc::new(Blockstore::open(&blockstore_path).unwrap());
let (sender, receiver) = unbounded();
let (shreds, _) = make_many_slot_entries(5, 5, 10);
blockstore
.... | rust_cleaned_test_functions.jsonl/21527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14007,
7200,
70434,
368,
341,
286,
1077,
2504,
4314,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
1077,
2504,
4314,
284,
19689,
486,
931,
55243,
4314,
486,
2508,
2099,
4574,
4314,
2638,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stats() {
let mut balloon = Balloon::new(0, true, true, 1, false).unwrap();
let mem = default_mem();
let statsq = VirtQueue::new(GuestAddress(0), &mem, 16);
balloon.set_queue(STATS_INDEX, statsq.create_queue());
balloon.activate(mem.clone()).unwrap();
... | rust_cleaned_test_functions.jsonl/133176 | {
"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,
15381,
368,
341,
286,
1077,
5206,
46756,
284,
19420,
31335,
486,
931,
7,
15,
11,
830,
11,
830,
11,
220,
16,
11,
895,
568,
15454,
543,
286,
1077,
1833,
284,
1638,
12976,
543,
286,
1077,
10472,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_errors() {
let ns = parse_and_resolve(
"contract test {
function foo(uint bar) public {
bool is_nonzero = bar;
}
}",
Target::default_substrate(),
);
assert_eq!(
first_error(ns.diagnostics),
"convers... | rust_cleaned_test_functions.jsonl/86986 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
20196,
368,
341,
262,
1077,
12268,
284,
4715,
8378,
77291,
1006,
286,
330,
20257,
1273,
341,
310,
729,
15229,
8488,
3619,
8,
584,
341,
394,
1807,
374,
21637,
14154,
284,
3619,
280,
310,
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_recipient_valid() {
let expected_str: &str = r#"
{
"type": "operator",
"and": [
{
"type": "audience",
"audienceGroupId": 5614991017776
},
... | rust_cleaned_test_functions.jsonl/78166 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 937
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7080,
14117,
8337,
368,
341,
286,
1077,
3601,
2895,
25,
609,
495,
284,
435,
2,
698,
310,
341,
394,
330,
1313,
788,
330,
7884,
756,
394,
330,
437,
788,
2278,
503,
341,
664,
330,
1313,
788,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_initialization() {
const SAMPLE_SIZE: usize = 1_000_000;
let mut rng = rand::thread_rng();
let keys: Vec<u64> = (0..SAMPLE_SIZE).map(|_| rng.gen()).collect();
let filter = Fuse32::try_from(&keys).unwrap();
for key in keys {
assert!(filter.con... | rust_cleaned_test_functions.jsonl/32212 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15809,
2022,
368,
341,
286,
733,
62420,
4098,
25,
22301,
284,
220,
16,
62,
15,
15,
15,
62,
15,
15,
15,
280,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
6894,
25,
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_vote_round_trip() {
let mut rng = rand::thread_rng();
let vote = vote_state::Vote::new(
vec![1, 3, 7], // slots
safecoin_sdk::hash::new_rand(&mut rng),
);
let ix = vote_instruction::vote(
&Pubkey::new_unique(), // vote_pubkey
... | rust_cleaned_test_functions.jsonl/14894 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
29896,
63883,
368,
341,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
1077,
6910,
284,
6910,
4387,
486,
41412,
486,
931,
1006,
310,
7486,
20703,
16,
11,
220,
18,
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_latest_block() {
let mut light_chain = LightChain::default_with_length(1);
let first_block = light_chain.latest_block();
assert_eq!(1, first_block.height());
light_chain.advance_chain();
let second_block = light_chain.latest_block();
assert_eq!(2,... | rust_cleaned_test_functions.jsonl/10099 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 150
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64880,
7113,
368,
341,
286,
1077,
5206,
3100,
30583,
284,
8658,
18837,
486,
2258,
6615,
5118,
7,
16,
317,
286,
1077,
1156,
7113,
284,
3100,
30583,
84329,
7113,
543,
286,
2060,
10714,
10297,
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_clone_shared_does_not_drop_its_contents_when_1_ref_is_dropped() {
let mock_handle = Box::into_raw(Box::new(MockGarbageCollector::default()));
let count = Arc::new(AtomicUsize::new(1));
let value = RefCounter::new(count.clone());
let shared = SharedGeneric::<RefCou... | rust_cleaned_test_functions.jsonl/48710 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 394
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
20405,
96374,
7913,
29584,
62,
1199,
16682,
47636,
62,
16,
7793,
6892,
814,
41716,
368,
341,
286,
1077,
7860,
10630,
284,
8261,
486,
18122,
16067,
67758,
486,
931,
66436,
43930,
20652,
53694,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_read() {
let source = CodeSource::file("test.c");
let mut reader = SourceReader::new(source);
loop {
let c = reader.current();
println!("{:?} => {:?}", c as char, reader.span());
if c == 0 { break; }
reader.shift();
... | rust_cleaned_test_functions.jsonl/31198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 169
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
6443,
368,
341,
286,
1077,
2530,
284,
6119,
3608,
486,
1192,
445,
1944,
520,
3071,
286,
1077,
5206,
6604,
284,
8748,
5062,
486,
931,
12437,
626,
286,
6337,
341,
310,
1077,
272,
284,
6604,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_load_dirty_with_name_abort() {
for answer in NO_ANSWERS {
Tester::default()
.add_input_chars("modified named file\n")
.add_input_chars(answer)
.write_file("other.bas", "other file\n")
.set_program(Some("MEMORY:/n... | rust_cleaned_test_functions.jsonl/112746 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 490
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
63642,
6615,
1269,
70907,
368,
341,
286,
369,
4226,
304,
5664,
67752,
54,
4321,
341,
310,
76816,
486,
2258,
741,
394,
659,
718,
5898,
37418,
445,
27162,
6941,
1034,
1699,
1138,
394,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_numeric_invalid_object() {
let mut params = Map::new();
let mut items = Map::new();
items.assign("foo", Value::U64(1)).ok();
items.assign("bar", Value::U64(2)).ok();
items.assign("baz", Value::U64(3)).ok();
params.assign("numeric", Value::Map(items.clone())).ok();
le... | rust_cleaned_test_functions.jsonl/74445 | {
"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,
29418,
31433,
5314,
368,
341,
262,
1077,
5206,
3628,
284,
5027,
486,
931,
543,
262,
1077,
5206,
3589,
284,
5027,
486,
931,
543,
262,
3589,
17870,
445,
7975,
497,
5162,
486,
52,
21,
19,
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_pubkeys_sigs_of() {
let key1 = Pubkey::new_rand();
let key2 = Pubkey::new_rand();
let sig1 = Keypair::new().sign_message(&[0u8]);
let sig2 = Keypair::new().sign_message(&[1u8]);
let signer1 = format!("{}={}", key1, sig1);
let signer2 = format!("{}=... | rust_cleaned_test_functions.jsonl/43380 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 368
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34014,
10563,
643,
14462,
3575,
368,
341,
286,
1077,
1376,
16,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
1376,
17,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
8366,
16,
284,
6569,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_no_circular() {
let (at, mut ucmd) = at_and_ucmd!();
let link = "test_link_no_circular";
ucmd.args(&[link, link])
.fails()
.stderr_is("link: error: No such file or directory (os error 2)\n");
assert!(!at.file_exists(link));
} | rust_cleaned_test_functions.jsonl/64116 | {
"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,
7233,
6536,
666,
21472,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
2656,
284,
330,
1944,
7233,
6536,
666,
21472,
3302,
262,
575,
871... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_opalkelly_xem_6010_fir() {
let mut uut = OpalKellyFIRTest::new::<XEM6010>();
uut.hi.link_connect_dest();
uut.connect_all();
XEM6010::synth(uut, target_path!("xem_6010/fir"));
test_opalkelly_fir_runtime(target_path!("xem_6010/fir/top.bit")).unwrap();
} | rust_cleaned_test_functions.jsonl/32181 | {
"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,
10287,
1692,
11896,
3212,
336,
62,
21,
15,
16,
15,
761,
404,
368,
341,
262,
1077,
5206,
575,
332,
284,
10672,
278,
69072,
37,
2801,
2271,
486,
931,
27638,
55,
2716,
21,
15,
16,
15,
3913,
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_sifnis() {
// should return a Vector containing:
// "foo \"a | b\" "
// " bar \"c | d\" "
// " baz \"e | f\""
let ret = split_if_not_in_string("foo \"a | b\" | bar \"c | d\" | baz \"e | f\"", '|');
assert_eq!(ret.len(), 3);
assert_eq!(ret[0], "foo \"a | b\" ")... | rust_cleaned_test_functions.jsonl/62385 | {
"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,
643,
333,
25151,
368,
341,
262,
442,
1265,
470,
264,
4196,
8482,
510,
262,
442,
256,
330,
7975,
7245,
64,
760,
293,
2105,
6228,
262,
442,
256,
330,
3619,
7245,
66,
760,
294,
2105,
6228,
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_serde_roundtrip() {
::init().unwrap();
let s = Structure::builder("test")
.field("f1", &"abc")
.field("f2", &"bcd".to_owned())
.field("f3", &123i32)
.field("fraction", &Fraction::new(1, 2))
.field("date", &Date::new_dmy... | rust_cleaned_test_functions.jsonl/84743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 418
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
75861,
450,
29896,
32981,
368,
341,
286,
3504,
2327,
1005,
15454,
1428,
286,
1077,
274,
284,
28596,
486,
17850,
445,
1944,
1138,
310,
659,
2566,
445,
69,
16,
497,
609,
1,
13683,
1138,
310,
659,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proposal_v1_to_v2_serialisation_roundtrip() {
// Arrange
let proposal_v1_source = ProposalV1 {
account_type: GovernanceAccountType::ProposalV1,
governance: Pubkey::new_unique(),
governing_token_mint: Pubkey::new_unique(),
state: Pr... | rust_cleaned_test_functions.jsonl/75471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1060
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21663,
32556,
2273,
16,
2346,
2273,
17,
25602,
7923,
29896,
32981,
368,
341,
286,
442,
40580,
271,
286,
1077,
13734,
2273,
16,
10347,
284,
65890,
53,
16,
341,
310,
2692,
1819,
25,
80589,
7365,
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_string_index() -> anyhow::Result<()> {
fn test_str(str: &str) -> anyhow::Result<()> {
let chars = str.chars().collect::<Vec<char>>();
let heap = Heap::new();
let val = heap.alloc(str);
let len = chars.len() as i32;
assert_eq!(va... | rust_cleaned_test_functions.jsonl/8198 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 784
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3904,
3560,
368,
1464,
88964,
486,
2077,
71698,
341,
286,
5168,
1273,
2895,
4199,
25,
609,
495,
8,
1464,
88964,
486,
2077,
71698,
341,
310,
1077,
23000,
284,
607,
85062,
1005,
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... | 5 |
#[test]
fn test_dyn_value_from() {
assert_eq!(OwnedDynValue::from(-42i16), OwnedDynValue::new(-42i16));
let s = big_struct_2();
assert_eq!(OwnedDynValue::from(s.clone()), OwnedDynValue::new(s.clone()));
} | rust_cleaned_test_functions.jsonl/114235 | {
"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,
69213,
3142,
5673,
368,
341,
286,
2060,
10714,
10297,
57641,
95709,
1130,
486,
1499,
4080,
19,
17,
72,
16,
21,
701,
85093,
95709,
1130,
486,
931,
4080,
19,
17,
72,
16,
21,
1106,
286,
1077,
274... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_crc_error() {
let (cmd, _) = Command::SelfTest.as_tuple();
let expectations = [
Transaction::write(0x58, cmd.to_be_bytes().to_vec()),
Transaction::read(0x58, vec![0xD4, 0x00, 0x00]),
];
let mock = I2cMock::new(&expectations);
let mu... | rust_cleaned_test_functions.jsonl/113624 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
59084,
4096,
368,
341,
286,
1077,
320,
8710,
11,
27439,
284,
7348,
486,
12092,
2271,
5357,
21773,
543,
286,
1077,
16665,
284,
2278,
310,
17869,
486,
4934,
7,
15,
87,
20,
23,
11,
5439,
2389,
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... | 2 |
#[test]
fn test_db() {
for len in 0..=DB_TEST_DATA.len() {
let mut a = CodeAssembler::new(64).unwrap();
a.db(&DB_TEST_DATA[0..len]).unwrap();
let bytes = a.assemble(0x1234_5678_9ABC_DEF0).unwrap();
assert_eq!(bytes, &DB_TEST_DATA[0..len]);
}
} | rust_cleaned_test_functions.jsonl/71815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8685,
368,
341,
2023,
2422,
304,
220,
15,
496,
28,
3506,
11641,
7896,
19406,
368,
341,
197,
10217,
5206,
264,
284,
6119,
77858,
486,
931,
7,
21,
19,
568,
15454,
543,
197,
11323,
7076,
2099,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_persist_transaction_status() {
let ledger_path = get_tmp_ledger_path_auto_delete!();
let blockstore = Blockstore::open(ledger_path.path()).unwrap();
let transaction_status_cf = &blockstore.transaction_status_cf;
let pre_balances_vec = vec![1, 2, 3];
let ... | rust_cleaned_test_functions.jsonl/9557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
4975,
28884,
4773,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
27740,
11353,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
7,
50704,
2638,
3875,
6011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_logical_row_numbers() {
// NOTE: this corresponds to "A1".
let origin = HexAddress::from((0, 0));
let orig_row = origin.logical_row();
let orig_col = origin.logical_column();
assert_eq!(orig_row, 0);
assert_eq!(orig_col, 0);
let d... | rust_cleaned_test_functions.jsonl/84027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1348
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86484,
8530,
32964,
368,
341,
286,
442,
16743,
25,
419,
33210,
311,
330,
32,
16,
22956,
286,
1077,
6238,
284,
27228,
4286,
486,
1499,
1188,
15,
11,
220,
15,
1106,
286,
1077,
2713,
8530,
284,
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... | 8 |
#[test]
fn test_sign_function() -> Result<()> {
let tests = vec![
ScalarFunctionTest {
name: "positive int",
columns: vec![Series::from_data([11_i8])],
expect: Series::from_data([1_i8]),
error: "",
},
ScalarFunctionTest {
na... | rust_cleaned_test_functions.jsonl/55634 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1666
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
9174,
368,
1464,
5714,
71698,
341,
262,
1077,
7032,
284,
7486,
90515,
286,
35176,
5152,
2271,
341,
310,
829,
25,
330,
30487,
526,
756,
310,
8147,
25,
7486,
20703,
25544,
486,
1499,
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... | 2 |
#[test]
fn test_create_proposal_receiving_agent_does_not_exist() {
let mut transaction_context = MockTransactionContext::default();
let receiving_agent_key = "receiving_agent_key";
transaction_context.add_agent(PUBLIC_KEY);
let mut state = TrackAndTraceState::new(&mut transactio... | rust_cleaned_test_functions.jsonl/32557 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
21663,
32556,
1288,
46344,
25730,
96374,
7913,
35906,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
14563,
8070,
1972,
486,
2258,
543,
286,
1077,
12308,
25730,
3097,
284,
330,
265,
46344,
25730,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_codec_timestamp() -> Result<()> {
let tz_table = vec!["Etc/GMT+11", "Etc/GMT0", "Etc/GMT-5", "UTC", "Universal"];
let cases = vec![
("0000-00-00 00:00:00", 0),
("2010-10-10 10:11:11", 0),
("2017-01-01 00:00:00", 0),
("2004-01-01 00... | rust_cleaned_test_functions.jsonl/40465 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 718
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
51084,
23073,
368,
1464,
5714,
71698,
341,
286,
1077,
42528,
5237,
284,
7486,
0,
1183,
36,
10413,
15792,
8505,
10,
16,
16,
497,
330,
36,
10413,
15792,
8505,
15,
497,
330,
36,
10413,
15792,
8505,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_wrapper() {
let data = direct_idmap! {
ExampleWrapper(32) => "abc",
ExampleWrapper(42) => "life",
};
assert_eq!(data[ExampleWrapper(32)], "abc");
assert_eq!(data[ExampleWrapper(42)], "life");
assert_eq!(data.get(ExampleWrapper(76)), None)
} | rust_cleaned_test_functions.jsonl/38666 | {
"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,
23561,
368,
341,
262,
1077,
821,
284,
2118,
842,
2186,
0,
341,
286,
13383,
11542,
7,
18,
17,
8,
589,
330,
13683,
756,
286,
13383,
11542,
7,
19,
17,
8,
589,
330,
14450,
756,
262,
2605,
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_0005_example_1() {
let s = "babad".to_string();
assert_eq!(Solution::longest_palindrome(s), "bab".to_string());
} | rust_cleaned_test_functions.jsonl/5614 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 78
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
15,
15,
15,
20,
39304,
62,
16,
368,
341,
286,
1077,
274,
284,
330,
65,
27347,
3263,
983,
3904,
1428,
286,
2060,
10714,
10297,
36842,
486,
4825,
477,
73310,
36058,
1141,
701,
330,
47722,
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 |
#[test]
fn test_named_thread() {
Builder::new().name("ada lovelace".to_string()).scoped(move|| {
assert!(thread::current().name().unwrap() == "ada lovelace".to_string());
}).unwrap().join();
} | rust_cleaned_test_functions.jsonl/109001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71834,
10814,
368,
341,
286,
20626,
486,
931,
1005,
606,
445,
2584,
775,
889,
578,
3263,
983,
3904,
6011,
78740,
34081,
8484,
341,
310,
2060,
10297,
4528,
486,
3231,
1005,
606,
1005,
15454,
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
] | 2 |
#[test]
fn test_post_form() {
let server = server::http(move |req| {
async move {
assert_eq!(req.method(), "POST");
assert_eq!(req.headers()["content-length"], "24");
assert_eq!(
req.headers()["content-type"],
"application/x-www-for... | rust_cleaned_test_functions.jsonl/131406 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6333,
7915,
368,
341,
262,
1077,
3538,
284,
3538,
486,
1254,
34081,
760,
2958,
91,
341,
286,
3312,
3271,
341,
310,
2060,
10714,
10297,
2958,
12908,
1507,
330,
2946,
797,
310,
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_tiledinputpart_read_tiles_success() {
let input = MultiPartInputFile::new(&*SRC_IMAGE_PATH, 0, true).unwrap();
let mut tiled_input_part = super::TiledInputPart::new(&input, 0);
let frame_buffer = FrameBuffer::new();
tiled_input_part.set_frame_buffer(&frame_buffer)... | rust_cleaned_test_functions.jsonl/59315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
2181,
1355,
4480,
6443,
60857,
18632,
368,
341,
286,
1077,
1946,
284,
17439,
5800,
2505,
1703,
486,
931,
2099,
9,
56017,
19121,
7944,
11,
220,
15,
11,
830,
568,
15454,
543,
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_find_first_empty() {
let empty = Table {
headers: HashMap::new(),
data: Vec::new(),
};
assert_eq!(Some(empty), Table::find_first(TABLE_EMPTY));
} | rust_cleaned_test_functions.jsonl/47578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 113
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
12978,
15124,
368,
341,
286,
1077,
4287,
284,
6633,
341,
310,
7102,
25,
10528,
486,
931,
3148,
310,
821,
25,
11312,
486,
931,
3148,
286,
2605,
286,
2060,
10714,
10297,
8373,
24216,
701,
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 |
#[test]
fn test_parse_outputs() {
let res_one = outputs(to_input(b"3 -> #n:7"));
assert_full_result(
res_one,
vec![OutputMapping {
from: 3.into(),
to: Port::named_port(&"n", 7.into()),
}],
);
let res_many = outp... | rust_cleaned_test_functions.jsonl/41391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
35189,
368,
341,
286,
1077,
592,
11667,
284,
16275,
12186,
5898,
1883,
1,
18,
1464,
671,
77,
25,
22,
4010,
286,
2060,
16372,
5287,
1006,
310,
592,
11667,
345,
310,
7486,
20703,
5097,
6807... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_table_commutative() {
let groups: HashMap<u8, u8> = hashmap!{
b'F' => 0,
b'S' => 0,
b'B' => 0,
b'z' => 0,
b'U' => 1,
b'E' => 1,
b'D' => 1,
b'y' => 1,
b'L' => 2,
b'M' =>... | rust_cleaned_test_functions.jsonl/31486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 563
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
2965,
6984,
1388,
368,
341,
286,
1077,
5203,
25,
10528,
34837,
23,
11,
575,
23,
29,
284,
92148,
0,
515,
310,
293,
6,
37,
6,
589,
220,
15,
345,
310,
293,
13272,
6,
589,
220,
15,
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... | 4 |
#[test]
fn test_use_dense_data() {
let y = vec![0.0, 1.0, 0.0];
let x = vec![vec![1.1, 0.0, 8.4],
vec![0.9, 1.0, 9.1],
vec![1.2, 1.0, 9.0]];
let problem = dense_problem(y, x).unwrap();
let params = SvmParam::new(2);
let model = problem.train(¶ms).u... | rust_cleaned_test_functions.jsonl/42832 | {
"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,
15951,
72619,
1769,
368,
341,
1066,
262,
1077,
379,
284,
7486,
20703,
15,
13,
15,
11,
220,
16,
13,
15,
11,
220,
15,
13,
15,
935,
262,
1077,
856,
284,
7486,
20703,
4083,
20703,
16,
13,
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_DUP_duplicates_top_of_stack() {
let mut f = Context::new(333, 343);
f.eval("1 DUP".into()).unwrap();
assert_eq!(1, f.stack()[0]);
assert_eq!(1, f.stack()[1]);
} | rust_cleaned_test_functions.jsonl/62931 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1557,
3124,
75051,
10426,
3575,
15528,
368,
341,
286,
1077,
5206,
282,
284,
9608,
486,
931,
7,
18,
18,
18,
11,
220,
18,
19,
18,
317,
286,
282,
31710,
445,
16,
87524,
3263,
18122,
6011,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_flush() {
let leaves = create_leaves(1000..1020);
let mock_store = Arc::new(MockAccumulatorStore::new());
let accumulator = MerkleAccumulator::new(
*ACCUMULATOR_PLACEHOLDER_HASH,
vec![],
0,
0,
mock_store.clone(),
);
let _root_hash = acc... | rust_cleaned_test_functions.jsonl/51496 | {
"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,
39213,
368,
341,
262,
1077,
10901,
284,
1855,
11751,
4693,
7,
16,
15,
15,
15,
496,
16,
15,
17,
15,
317,
262,
1077,
7860,
14809,
284,
19689,
486,
931,
66436,
14603,
372,
10511,
6093,
486,
931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_verify_signed() {
let b = r#"{"signatures": {"Alice": {"ed25519:zxcvb": "hvA+XXFEkHk80pLMeIYjNkWy5Ds2ZckSrvj00NvbyFJQe3H9LuJNnu8JLZ/ffIzChs3HmhwPldO0MSmyJAYpCA"}}, "my_key": "my_data"}"#;
#[derive(Debug, Deserialize, PartialEq, Eq)]
struct Test {
my_key: Stri... | rust_cleaned_test_functions.jsonl/31932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 435
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
55617,
368,
341,
286,
1077,
293,
284,
435,
55543,
4913,
7752,
2789,
788,
5212,
61686,
788,
5212,
291,
17,
20,
20,
16,
24,
25,
89,
8148,
42405,
788,
330,
81979,
32,
10,
6148,
11419,
74,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rundown_flags_set_in_progress() {
// Initialize an empty bit flags.
let mut flags = RundownFlags::empty();
assert_eq!(0, flags.get_ref());
// Turn on rundown in progress flags
flags = to_flags(flags.set_rundown_in_progress());
// Reference count ... | rust_cleaned_test_functions.jsonl/52963 | {
"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,
1710,
1241,
779,
14130,
2602,
1243,
27200,
368,
341,
286,
442,
9008,
458,
4287,
2699,
8042,
624,
286,
1077,
5206,
8042,
284,
431,
1241,
779,
9195,
486,
3194,
543,
286,
2060,
10714,
10297,
15,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vmconfig_error_conversion() {
// Test `VmConfigError` conversion
assert_eq!(error_kind(VmConfigError::InvalidVcpuCount), ErrorKind::User);
assert_eq!(
error_kind(VmConfigError::InvalidMemorySize),
ErrorKind::User
);
assert_eq!(
... | rust_cleaned_test_functions.jsonl/93130 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39008,
1676,
4096,
64132,
368,
341,
286,
442,
3393,
1565,
88124,
2648,
1454,
63,
14409,
198,
286,
2060,
10714,
10297,
841,
33162,
12410,
76,
2648,
1454,
486,
7928,
53,
16475,
2507,
701,
4600,
1062... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_short_name_conversion() {
let common_name = Nid::COMMONNAME;
let organizational_unit_name = Nid::ORGANIZATIONALUNITNAME;
let aes256_cbc_hmac_sha1 = Nid::AES_256_CBC_HMAC_SHA1;
let id_cmc_lrapopwitness = Nid::ID_CMC_LRAPOPWITNESS;
let ms_ctl_sign = Nid::MS_... | rust_cleaned_test_functions.jsonl/74254 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 502
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16673,
1269,
64132,
368,
341,
286,
1077,
4185,
1269,
284,
451,
307,
486,
66864,
7535,
280,
286,
1077,
40195,
14832,
1269,
284,
451,
307,
486,
44927,
1093,
2843,
39585,
23040,
7535,
280,
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_sorted_iterator() {
use ark_std::vec::Vec;
let base = vec!["1", "2", "3", "4"];
let addresses = vec![2usize, 2, 2, 1, 0, 0, 0];
let expected = vec!["4", "3", "3", "3", "3", "2", "2", "1", "1", "1", "1"];
let sorted_iterator =
SortedIterator::new(base.iter().rev(), ad... | rust_cleaned_test_functions.jsonl/35441 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 445
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41277,
13491,
368,
341,
262,
990,
55217,
15656,
486,
4083,
486,
10050,
401,
262,
1077,
2331,
284,
7486,
0,
1183,
16,
497,
330,
17,
497,
330,
18,
497,
330,
19,
6332,
262,
1077,
14230,
284,
7486... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_when_then_schema() -> Result<()> {
let df = fruits_cars();
let schema = df
.lazy()
.select([when(col("A").gt(lit(1)))
.then(Null {}.lit())
.otherwise(col("A"))])
.schema();
assert_ne!(schema.get_index(0).unwrap().1, &DataType::Null);
... | rust_cleaned_test_functions.jsonl/13840 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
47636,
68367,
25371,
368,
1464,
5714,
71698,
341,
262,
1077,
6764,
284,
25322,
666,
1561,
1428,
262,
1077,
10802,
284,
6764,
198,
286,
659,
49013,
741,
286,
659,
1742,
2561,
9309,
19611,
445,
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_seek_for_prev() {
let path = TempDir::new("_rust_rocksdb_seek_for_prev").expect("");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
{
let db = DB::open(opts, path.path().to_str().unwrap()).unwrap();
let writeopts = WriteOptions::new();
db.p... | rust_cleaned_test_functions.jsonl/18880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 818
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
5478,
25566,
368,
341,
262,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
35788,
26608,
14553,
1999,
74473,
5478,
25566,
1827,
17119,
13056,
262,
1077,
5206,
12185,
284,
5952,
3798,
486,
931... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_register_histogram_vec_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()), So... | rust_cleaned_test_functions.jsonl/86378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 444
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14000,
68564,
13251,
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... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_simulate_shoot_with_assault_rifle_far_from_healthy_opponent() {
let world = with_my_unit_with_weapon(example_world(), WeaponType::Pistol);
let my_unit = world.get_unit(EXAMPLE_MY_UNIT_ID);
let opponent_unit = world.get_unit(EXAMPLE_OPPONENT_UNIT_ID);
let direction = (opponent_uni... | rust_cleaned_test_functions.jsonl/125073 | {
"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,
18314,
6334,
3712,
1905,
6615,
12083,
945,
1710,
19092,
67513,
5673,
62,
37028,
10287,
1146,
368,
341,
262,
1077,
1879,
284,
448,
35686,
14832,
6615,
69475,
66203,
31792,
1507,
27777,
929,
486,
47,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_copy_through_dangling_symlink() {
let (at, mut ucmd) = at_and_ucmd!();
at.touch("file");
at.symlink_file("nonexistent", "target");
ucmd.arg("file")
.arg("target")
.fails()
.stderr_only("cp: not writing through dangling symlink 'target'");
} | rust_cleaned_test_functions.jsonl/123169 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16096,
87399,
814,
90104,
58530,
44243,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
518,
42129,
445,
1192,
797,
262,
518,
77577,
44243,
2458,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_byte_array_new_with_zero_initialised() -> super::PyResult<()> {
Python::with_gil(|py| -> super::PyResult<()> {
let py_bytearray = PyByteArray::new_with(py, 10, |_b: &mut [u8]| Ok(()))?;
let bytearray: &[u8] = unsafe { py_bytearray.as_bytes() };
assert_... | rust_cleaned_test_functions.jsonl/47847 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19737,
3858,
5921,
6615,
19359,
15809,
4056,
368,
1464,
2256,
486,
13828,
2077,
71698,
341,
286,
13027,
486,
4197,
1889,
321,
22428,
3288,
91,
1464,
2256,
486,
13828,
2077,
71698,
341,
310,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_top_collector_not_at_capacity_with_offset() {
let index = make_index();
let field = index.schema().get_field("text").unwrap();
let query_parser = QueryParser::for_index(&index, vec![field]);
let text_query = query_parser.parse_query("droopy tax").unwrap();
... | rust_cleaned_test_functions.jsonl/31045 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 292
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
10211,
27669,
7913,
3752,
35603,
6615,
6917,
368,
341,
286,
1077,
1922,
284,
1281,
3560,
543,
286,
1077,
2070,
284,
1922,
30892,
1005,
455,
5013,
445,
1318,
1827,
15454,
543,
286,
1077,
323... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_too_large_footer() {
let mut buf = vec![];
assert!(FooterProxy::new(&mut buf).terminate().is_ok());
let mut long_len_buf = [0u8; 10];
let num_bytes = VInt(super::FOOTER_MAX_LEN as u64 + 1u64).serialize_into(&mut long_len_buf);
buf[0..num_bytes]... | rust_cleaned_test_functions.jsonl/49582 | {
"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,
15768,
9050,
2346,
78,
45228,
25966,
368,
341,
286,
1077,
5206,
6607,
284,
7486,
0,
15078,
286,
2060,
10297,
19445,
16219,
486,
931,
2099,
6984,
6607,
568,
48061,
1005,
285,
19817,
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... | 1 |
#[test]
fn test_remove_to() {
assert_eq!("aaa", remove_to("aaa", '.'));
assert_eq!("bbb", remove_to("aaa.bbb", '.'));
assert_eq!("ccc", remove_to("aaa.bbb.ccc", '.'));
} | rust_cleaned_test_functions.jsonl/38001 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
2346,
368,
341,
286,
2060,
10714,
17223,
32646,
497,
4057,
2346,
445,
32646,
497,
6256,
6336,
286,
2060,
10714,
17223,
53151,
497,
4057,
2346,
445,
32646,
948,
6066,
497,
6256,
6336,
286,
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 |
#[test]
fn test_parse_flags() {
let mut flags = AMQPFlags::default();
let mut names = Vec::new();
names.push("a");
flags.add_flag("a".to_string(), true);
names.push("b");
flags.add_flag("b".to_string(), false);
names.push("c");
flags.add_flag("c".t... | rust_cleaned_test_functions.jsonl/25466 | {
"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,
21039,
14130,
368,
341,
286,
1077,
5206,
8042,
284,
6769,
66520,
9195,
486,
2258,
543,
286,
1077,
5206,
5036,
284,
11312,
486,
931,
543,
286,
5036,
2552,
445,
64,
797,
286,
8042,
1364,
10933,
44... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_html() -> Result<(), strum::ParseError> {
assert_eq!("0", HTML::Plain.to_string());
assert_eq!(HTML::Plain, HTML::from_str("0")?);
assert_eq!("1", HTML::HTML.to_string());
assert_eq!(HTML::HTML, HTML::from_str("1")?);
Ok(())
} | rust_cleaned_test_functions.jsonl/92482 | {
"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,
9564,
368,
1464,
5714,
68843,
607,
372,
486,
14463,
1454,
29,
341,
286,
2060,
10714,
17223,
15,
497,
9308,
486,
26982,
2389,
3904,
1423,
286,
2060,
10714,
10297,
5835,
486,
26982,
11,
9308,
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... | 3 |
#[test]
fn test_parse_from_buffer() {
let context = Context::create();
let garbage_buffer = MemoryBuffer::create_from_memory_range("garbage ir data", "my_ir");
let module_result = Module::parse_bitcode_from_buffer(&garbage_buffer);
assert!(module_result.is_err());
let module = context.crea... | rust_cleaned_test_functions.jsonl/63542 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5673,
7776,
368,
341,
262,
1077,
2266,
284,
9608,
486,
3182,
543,
262,
1077,
25878,
7776,
284,
13850,
4095,
486,
3182,
5673,
19195,
9698,
445,
12164,
20652,
6216,
821,
497,
330,
2408,
51433... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_envelope() {
let env = br#"ENVELOPE ("Wed, 17 Jul 1996 02:23:25 -0700 (PDT)" "IMAP4rev1 WG mtg summary and minutes" (("Terry Gray" NIL "gray" "cac.washington.edu")) (("Terry Gray" NIL "gray" "cac.washington.edu")) (("Terry Gray" NIL "gray" "cac.washington.edu")) ((NIL NIL "imap" "cac.was... | rust_cleaned_test_functions.jsonl/8547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6205,
18853,
368,
341,
286,
1077,
6105,
284,
1411,
55543,
953,
47782,
1740,
3489,
26503,
11,
220,
16,
22,
10057,
220,
16,
24,
24,
21,
220,
15,
17,
25,
17,
18,
25,
17,
20,
481,
15,
22,
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_poly_foldl_consuming() {
trait Dummy {
fn dummy(&self) -> i32 {
1
}
}
impl<T: ?Sized> Dummy for T {}
struct Dummynator;
impl<T: Dummy, I: IntoIterator<Item = T>> Func<(i32, I)> for Dummynator {
type Outp... | rust_cleaned_test_functions.jsonl/41572 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 577
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36133,
61187,
75,
3382,
61117,
368,
341,
286,
17567,
50567,
341,
310,
5168,
17292,
2099,
721,
8,
1464,
600,
18,
17,
341,
394,
220,
16,
198,
310,
456,
286,
456,
286,
11605,
3125,
25,
937,
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_binary_search_elem() {
assert_eq!([1i,2,3,4,5].binary_search_elem(&5).found(), Some(4));
assert_eq!([1i,2,3,4,5].binary_search_elem(&4).found(), Some(3));
assert_eq!([1i,2,3,4,5].binary_search_elem(&3).found(), Some(2));
assert_eq!([1i,2,3,4,5].binary_search_elem(... | rust_cleaned_test_functions.jsonl/108303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
10716,
28179,
368,
341,
286,
2060,
10714,
0,
2561,
16,
72,
11,
17,
11,
18,
11,
19,
11,
20,
936,
25891,
10716,
28179,
2099,
20,
568,
15105,
1507,
4329,
7,
19,
1106,
286,
2060,
10714,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tuple_sum() {
assert_eq!(
Color::try_from((-1, 255, 255)),
Err(IntoColorError::IntConversion)
);
} | rust_cleaned_test_functions.jsonl/754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
10160,
368,
341,
286,
2060,
10714,
33673,
310,
3478,
486,
1539,
5673,
54934,
16,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
6965,
310,
15495,
24123,
78,
1636,
1454,
486,
1072,
48237,
340... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_name_collision_error() {
init();
let schema_str_1 = r#"{
"name": "foo.A",
"type": "record",
"fields": [
{"name": "field_one", "type": "double"}
]
}"#;
let schema_str_2 = r#"{
"name": "A",
"type": "record",
"names... | rust_cleaned_test_functions.jsonl/69030 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1269,
70375,
4096,
368,
341,
262,
2930,
543,
262,
1077,
10802,
2895,
62,
16,
284,
435,
55543,
515,
286,
330,
606,
788,
330,
7975,
875,
756,
286,
330,
1313,
788,
330,
8548,
756,
286,
330,
9007,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ord() {
let n: DList<int> = list_from(&[]);
let m = list_from(&[1,2,3]);
assert!(n < m);
assert!(m > n);
assert!(n <= n);
assert!(n >= n);
} | rust_cleaned_test_functions.jsonl/56743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67324,
368,
341,
286,
1077,
308,
25,
422,
852,
4159,
29,
284,
1140,
5673,
2099,
56703,
286,
1077,
296,
284,
1140,
5673,
2099,
58,
16,
11,
17,
11,
18,
2558,
286,
2060,
10297,
77,
366,
296,
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_sql_projection() {
let res = expression(Span::new(r"select a from t"));
assert!(res.is_ok());
assert!(matches!(res.clone().unwrap().1, Expr::Projection(e, _v) if e[0] == "a"));
} | rust_cleaned_test_functions.jsonl/32933 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 98
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18063,
72738,
368,
341,
262,
1077,
592,
284,
7493,
3759,
848,
486,
931,
2601,
1,
1742,
264,
504,
259,
14929,
262,
2060,
10297,
416,
2079,
19817,
1423,
262,
2060,
10297,
19914,
10297,
416,
15997,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fast_indexed() {
let mut schema_builder = Schema::builder();
let name = schema_builder.add_u64_field("name", FAST | INDEXED);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
{
let mut index_writer = index.writer_... | rust_cleaned_test_functions.jsonl/62188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 640
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35743,
3560,
291,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
829,
284,
10802,
28532,
1364,
7300,
21,
19,
5013,
445,
606,
497,
50733,
760,
39300,
1479,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_sized_cache() {
let last = fib1(20);
{
let cache = SIZED_FIB.lock().unwrap();
assert_eq!(3, cache.cache_size());
let items = cache.get_order().iter().collect::<Vec<_>>();
assert_eq!(3, items.len());
assert_eq!(&(20, last), items[0]);
}... | rust_cleaned_test_functions.jsonl/13125 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
1506,
11529,
368,
341,
262,
1077,
1537,
284,
15801,
16,
7,
17,
15,
317,
262,
341,
286,
1077,
6500,
284,
328,
51538,
1400,
3256,
21003,
1005,
15454,
543,
286,
2060,
10714,
10297,
18,
11,
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_query_all_items() {
let querier = new_valid_db("query_all_items.db");
let items = querier.query_items(None, None, None);
assert_eq!(6, items.len());
} | rust_cleaned_test_functions.jsonl/107671 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5738,
5705,
12134,
368,
341,
286,
1077,
29134,
1268,
284,
501,
8337,
8685,
445,
1631,
5705,
12134,
7076,
3071,
286,
1077,
3589,
284,
29134,
1268,
4786,
12134,
26717,
11,
2240,
11,
2240,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_encode_lossless() {
let mut encoder = Encoder::default();
encoder.lossless = Some(true);
encoder.basic_info.xsize = 3;
encoder.basic_info.ysize = 3;
let encoded = encoder.encode(&RGBA_DATA).expect("Failed to encode");
let result = decode_memory(&encoded).expect("Failed ... | rust_cleaned_test_functions.jsonl/115352 | {
"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,
11224,
11193,
1717,
368,
341,
262,
1077,
5206,
23668,
284,
55115,
486,
2258,
543,
262,
23668,
46043,
1717,
284,
4329,
3715,
317,
262,
23668,
33257,
3109,
1993,
2141,
284,
220,
18,
280,
262,
23668,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_proof_basic() {
let mut memdb = MemoryDB::new(true);
let mut trie = PatriciaTrieMut::new(&mut memdb);
trie.insert(b"doe", b"reindeer".to_vec()).unwrap();
trie.insert(b"dog", b"puppy".to_vec()).unwrap();
trie.insert(b"dogglesworth", b"cat".to_vec()).unwrap();
let root = tr... | rust_cleaned_test_functions.jsonl/37144 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86757,
34729,
368,
341,
262,
1077,
5206,
1833,
1999,
284,
13850,
3506,
486,
931,
3715,
317,
262,
1077,
5206,
59067,
284,
53934,
51,
7231,
51440,
486,
931,
2099,
6984,
1833,
1999,
317,
262,
59067,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bool_ord() {
assert!(true > false);
assert!(!(false > true));
assert!(false < true);
assert!(!(true < false));
assert!(false <= false);
assert!(false >= false);
assert!(true <= true);
assert!(true >= true);
assert!(false ... | rust_cleaned_test_functions.jsonl/83464 | {
"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,
22159,
67324,
368,
341,
286,
2060,
10297,
1866,
861,
895,
317,
286,
2060,
0,
33660,
3849,
861,
830,
3237,
286,
2060,
10297,
3849,
366,
830,
317,
286,
2060,
0,
33660,
1866,
366,
895,
3237,
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_attr_required() {
let xml = br#"<?xml version="1.0"?>
<x a="1" b="2"></x>"#;
with_parser(xml, |mut p| {
p.document(|p, _| {
p.element_with_name("x", |_, elem| {
assert!(elem.attr_required("a").is_ok());
... | rust_cleaned_test_functions.jsonl/39193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 365
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10422,
18743,
368,
341,
286,
1077,
8396,
284,
1411,
55543,
1316,
6455,
2319,
428,
16,
13,
15,
85990,
310,
366,
87,
264,
428,
16,
1,
293,
428,
17,
2000,
87,
9877,
2,
401,
286,
448,
18517,
299... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_writer_properties_panic_when_dictionary_is_enabled() {
WriterProperties::builder()
.set_dictionary_enabled(true)
.set_column_encoding(ColumnPath::from("col"), Encoding::RLE_DICTIONARY)
.build();
} | rust_cleaned_test_functions.jsonl/56726 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 124
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28908,
25158,
620,
31270,
47636,
42605,
6892,
18220,
368,
341,
286,
29404,
7903,
486,
17850,
741,
310,
659,
746,
42605,
18220,
3715,
340,
310,
659,
746,
8744,
37613,
95105,
1820,
486,
1499,
445,
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 |
#[test]
fn test_insert() {
let ddl = "\
CREATE TABLE clickhouse_test_insert (\
int8 Int8, \
int16 Int16, \
int32 Int32, \
int64 Int64, \
uint8 UInt8, \
uint16 UInt16, \
uint32 UInt32, \
... | rust_cleaned_test_functions.jsonl/30929 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1592
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
368,
341,
262,
1077,
55780,
284,
93317,
2290,
30776,
14363,
4205,
7675,
4452,
17678,
320,
5661,
2290,
526,
23,
220,
1333,
23,
11,
3044,
2290,
526,
16,
21,
1333,
16,
21,
11,
3044,
2290,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_fame_restrict_author() {
crate::grit_test::set_test_logging(LOG_LEVEL);
let td: TempDir = crate::grit_test::init_repo();
let path = td.path().to_str().unwrap();
let args = FameArgs::new(
path.to_string(),
Some("loc".to_string()),
... | rust_cleaned_test_functions.jsonl/5823 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 527
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
761,
373,
97684,
22938,
368,
341,
286,
17717,
486,
901,
275,
4452,
486,
746,
4452,
59982,
24850,
17415,
626,
286,
1077,
17941,
25,
19944,
6184,
284,
17717,
486,
901,
275,
4452,
486,
2327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_trait_method_completion() {
check(
r#"
struct A {}
trait Trait { fn the_method(&self); }
impl Trait for A {}
fn foo(a: A) { a.$0 }
"#,
expect![[r#"
me the_method() -> ()
"#]],
);
} | rust_cleaned_test_functions.jsonl/26252 | {
"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,
78491,
9032,
60164,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
1235,
362,
5613,
29432,
68301,
314,
5168,
279,
9032,
2099,
721,
1215,
456,
6383,
68301,
369,
362,
5613,
8822,
15229,
2877,
25,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compile_simple() {
let creator = new_creator();
let f = TestFixture::new();
let parsed_args = ParsedArguments {
input: "foo.c".into(),
language: Language::C,
depfile: None,
outputs: vec![("obj", "foo.o".into())].into_iter().... | rust_cleaned_test_functions.jsonl/15027 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 882
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74170,
30015,
368,
341,
286,
1077,
19919,
284,
501,
68532,
543,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
1077,
15676,
8384,
284,
393,
18112,
19139,
341,
310,
1946,
25,
330,
7975,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fop_stats() {
let aggr_test_data = {
let mut f = File::open("tests/fop_aggr_sample.json").unwrap();
let mut s = String::new();
f.read_to_string(&mut s).unwrap();
s
};
let inter_test_data = {
let mut f = File::open("tests/fop_inter_sample.j... | rust_cleaned_test_functions.jsonl/103588 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
761,
453,
15381,
368,
341,
262,
1077,
933,
901,
4452,
1769,
284,
341,
286,
1077,
5206,
282,
284,
2887,
486,
2508,
445,
23841,
6663,
453,
20587,
901,
17491,
4323,
1827,
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_chunks_within_distance_basic() {
let pos = position!(0.0, 0.0, 0.0);
let distance = vec3(16.0, 0.0, 16.0);
let chunks = chunks_within_distance(pos, distance);
dbg!(chunks.clone());
let set = chunks.into_iter().collect::<HashSet<_>>();
for x in ... | rust_cleaned_test_functions.jsonl/130414 | {
"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,
65470,
72385,
19464,
34729,
368,
341,
286,
1077,
1133,
284,
2309,
10297,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
15,
13,
15,
317,
286,
1077,
6010,
284,
7486,
18,
7,
16,
21,
13,
15,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_to_string_succeeds() {
init!("true");
let handle = create_cred_def_fake();
let credential_string = to_string(handle).unwrap();
let credential_values: serde_json::Value = serde_json::from_str(&credential_string).unwrap();
assert_eq!(credential_values["versi... | rust_cleaned_test_functions.jsonl/64627 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 151
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
3904,
643,
29264,
82,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
3705,
284,
1855,
73475,
7844,
56881,
543,
286,
1077,
40207,
3904,
284,
311,
3904,
26405,
568,
15454,
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_from_str() -> Result<(),Box<dyn std::error::Error>> {
let uid : UserId = "my-uid".parse()?;
assert_eq!(uid.value(), "my-uid");
Ok(())
} | rust_cleaned_test_functions.jsonl/70877 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
368,
1464,
5714,
68843,
1611,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
1077,
14617,
549,
40883,
284,
330,
2408,
12,
2423,
3263,
6400,
94136,
286,
2060,
10714,
10297,
2423,
282... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_average_field_length_json() {
let mut field_num_tokens = HashMap::new();
let next_id = 100f64;
field_num_tokens.insert(100, 18);
field_num_tokens.insert(101, 123);
let json = average_field_length_json(field_num_tokens, next_id);
assert_tokens(
... | rust_cleaned_test_functions.jsonl/112248 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 350
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38594,
5013,
5118,
9455,
368,
341,
286,
1077,
5206,
2070,
4273,
28838,
284,
10528,
486,
931,
543,
286,
1077,
1790,
842,
284,
220,
16,
15,
15,
69,
21,
19,
280,
286,
2070,
4273,
28838,
7030,
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_encoding_struct() {
// v1
let mut dest = vec![];
let record = TestRecord {
value: 20,
value2: 10,
};
record.encode(&mut dest, 0).expect("encode");
assert_eq!(dest.len(), 1);
assert_eq!(dest[0], 20);
assert_eq... | rust_cleaned_test_functions.jsonl/126955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
15126,
368,
341,
286,
442,
348,
16,
198,
286,
1077,
5206,
3201,
284,
7486,
0,
15078,
286,
1077,
3255,
284,
3393,
6471,
341,
310,
897,
25,
220,
17,
15,
345,
310,
897,
17,
25,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_net_unreachable() {
// Receive an IP packet for an unreachable destination address. Check to
// make sure that we respond with the appropriate ICMP message.
test_receive_ip_packet::<Ipv4, _, _, _, _>(
|sb| {
sb.ipv4_builder().forward(true);
... | rust_cleaned_test_functions.jsonl/65670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 814
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19722,
4907,
46550,
368,
341,
286,
442,
37422,
458,
6790,
10151,
369,
458,
69322,
9106,
2621,
13,
4248,
311,
198,
286,
442,
1281,
2704,
429,
582,
5889,
448,
279,
8311,
83988,
1943,
624,
286,
127... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_subtype() {
assert_eq!(Value::Char('n').subtype(), None);
assert_eq!(Value::Int32(0).subtype(), None);
assert_eq!(Value::Float(0.0).subtype(), None);
assert_eq!(Value::String(String::from("noodles")).subtype(), None);
assert_eq!(Value::Hex(String::from("CA... | rust_cleaned_test_functions.jsonl/93901 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
96228,
368,
341,
286,
2060,
10714,
10297,
1130,
486,
4768,
492,
77,
1823,
77241,
1507,
2240,
317,
286,
2060,
10714,
10297,
1130,
486,
1072,
18,
17,
7,
15,
568,
77241,
1507,
2240,
317,
286,
2060,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stereo_to_mono() {
let f2 = vec![1.0, 1.0, 2.0, 2.0, 3.0, 3.0];
let f1 = stereo_to_mono(f2);
assert_eq!(f1, vec![1.0, 2.0, 3.0]);
} | rust_cleaned_test_functions.jsonl/39989 | {
"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,
1261,
64853,
2346,
60080,
368,
341,
286,
1077,
282,
17,
284,
7486,
20703,
16,
13,
15,
11,
220,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
11,
220,
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... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.