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_hlist_macros() {
use ::coprod::inject;
use ::test_structs::unitlike_copy::{A, B, C};
let falsum = || false;
// trailing comma support
let hlist_pat![]: HList![] = hlist![];
let hlist_pat![A]: HList![A] = hlist![A];
let hlist_pat![A,]: HList![A,] = hlist![A,];
le... | rust_cleaned_test_functions.jsonl/66690 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 686
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
1607,
85904,
368,
341,
262,
990,
3504,
37728,
23505,
486,
32133,
280,
262,
990,
3504,
1944,
15126,
82,
486,
3843,
4803,
16096,
22964,
32,
11,
425,
11,
356,
2315,
262,
1077,
31932,
372,
284... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 7 |
#[test]
fn test_binary_expressions() {
expect_printed("5 + 5", "5 + 5;\n");
expect_printed("5 - 5", "5 - 5;\n");
expect_printed("5 * 5", "5 * 5;\n");
expect_printed("5 / 5", "5 / 5;\n");
expect_printed("5 % 5", "5 % 5;\n");
expect_printed("5 ** 5", "5 ** 5;\n");
expect_printed("5 > 5... | rust_cleaned_test_functions.jsonl/93416 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 568
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
2702,
39873,
368,
341,
262,
1720,
10064,
291,
445,
20,
488,
220,
20,
497,
330,
20,
488,
220,
20,
17882,
77,
797,
262,
1720,
10064,
291,
445,
20,
481,
220,
20,
497,
330,
20,
481,
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_s_box_layer() {
let state = 0b0000000100100011010001010110011110001001101010111100110111101111u64;
let new_state = s_box_layer(state);
let expected = 0b1100010101101011100100001010110100111110111110000100011100010010u64;
assert_eq!(expected, new_state);
} | rust_cleaned_test_functions.jsonl/34944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 143
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
10194,
12680,
368,
341,
286,
1077,
1584,
284,
220,
15,
65,
15,
15,
15,
15,
15,
15,
15,
16,
15,
15,
16,
15,
15,
15,
16,
16,
15,
16,
15,
15,
15,
16,
15,
16,
15,
16,
16,
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_unclosed_bracket() {
// unclosed `[` should be treated literally
assert!(Pattern::new("abc[def").matches("abc[def"));
assert!(Pattern::new("abc[!def").matches("abc[!def"));
assert!(Pattern::new("abc[").matches("abc["));
assert!(Pattern::new("abc[!").matche... | rust_cleaned_test_functions.jsonl/13353 | {
"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,
76576,
9259,
17682,
5709,
368,
341,
286,
442,
20815,
9259,
77644,
63,
1265,
387,
11758,
15901,
198,
286,
2060,
10297,
15760,
486,
931,
445,
13683,
58,
750,
1827,
19914,
445,
13683,
58,
750,
4010,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_functions_serialize_json() {
let funcs = Functions::new(vec![]);
let expected_result = "{}";
let result = assert_ok!(serde_json::to_string(&funcs));
assert_eq!(result, expected_result);
} | rust_cleaned_test_functions.jsonl/29807 | {
"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,
15124,
31708,
88686,
9455,
368,
341,
286,
1077,
76871,
284,
23550,
486,
931,
25592,
0,
56703,
286,
1077,
3601,
5287,
284,
35503,
876,
286,
1077,
1102,
284,
2060,
19817,
10297,
47024,
9455,
486,
98... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_date_sub() {
fn check((y1,m1,d1): (i32, u32, u32), (y2,m2,d2): (i32, u32, u32), diff: Duration) {
let lhs = NaiveDate::from_ymd(y1, m1, d1);
let rhs = NaiveDate::from_ymd(y2, m2, d2);
assert_eq!(lhs.signed_duration_since(rhs), diff);
assert... | rust_cleaned_test_functions.jsonl/4769 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 494
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
5228,
368,
341,
286,
5168,
1779,
1188,
88,
16,
13086,
16,
11991,
16,
1648,
320,
72,
18,
17,
11,
575,
18,
17,
11,
575,
18,
17,
701,
320,
88,
17,
13086,
17,
11991,
17,
1648,
320,
72,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_take_the_last_week_of_month() {
let context = build_context(Moment(Paris.ymd(2017, 04, 25).and_hms(9, 10, 11)));
let take_last_of = Cycle::rc(Grain::Week).last_of(&rc!(Month(5)));
let walker = take_last_of.to_walker(&context.reference, &context);
assert_eq!(Some... | rust_cleaned_test_functions.jsonl/114656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 648
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
16068,
12195,
31277,
3575,
18933,
368,
341,
286,
1077,
2266,
284,
1936,
8467,
3189,
12913,
7,
59604,
13,
1600,
67,
7,
17,
15,
16,
22,
11,
220,
15,
19,
11,
220,
17,
20,
568,
437,
1523,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_sbt_version_thisbuild() -> io::Result<()> {
let config_name = "build.sbt";
let config_content = "\
name := \"starship\"
ThisBuild / version := \"1.2.3\"
scalaVersion := \"2.13.7\"
";
let project_dir = create_project_dir()?;
fill_config(&project_dir, config... | rust_cleaned_test_functions.jsonl/100141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
643,
12755,
9438,
24868,
5834,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
5834,
514,
12755,
876,
286,
1077,
2193,
7495,
284,
93317,
606,
1669,
7245,
11870,
527... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_error() {
let result = serde_json::from_str::<cm::Name>("foo").map_err(Error::from);
assert_matches!(result, Err(Error::Parse { .. }));
let result = Error::parse(format_err!("oops"), None, None);
assert_eq!(format!("{}", result), "oops");
let resul... | rust_cleaned_test_functions.jsonl/61653 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 460
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
4096,
368,
341,
286,
1077,
1102,
284,
61570,
9455,
486,
1499,
2895,
27638,
6226,
486,
675,
13211,
7975,
1827,
2186,
9266,
37396,
486,
1499,
317,
286,
2060,
38344,
10297,
1382,
11,
15495,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generate_hash_key() {
let _ = env_logger::Builder::new().is_test(true).try_init();
let f = TestFixture::new();
const FAKE_DIGEST: &str = "abcd1234";
// We'll just use empty files for each of these.
for s in ["foo.rs", "bar.rs", "bar.rlib", "libbaz.a"].iter... | rust_cleaned_test_functions.jsonl/8172 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
48851,
8950,
3097,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
3297,
486,
931,
1005,
285,
4452,
3715,
568,
1539,
6137,
543,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
733,
15008,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_config_serialization_params_fail_write() {
let toml_file: tempfile::NamedTempFile = tempfile::NamedTempFile::new().ok().unwrap();
let writer: Box<dyn Write> = Box::new(std::fs::File::open(toml_file.path()).unwrap());
// Try to write unexisting file
let cfg: UserCo... | rust_cleaned_test_functions.jsonl/16003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
25602,
2022,
6745,
22121,
9165,
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_count_is_zero_but_sig_data_exists() {
solana_logger::setup();
let mut instruction_data = vec![0u8; DATA_START];
let offsets = SecpSignatureOffsets::default();
instruction_data[0] = 0;
let writer = std::io::Cursor::new(&mut instruction_data[1..]);
... | rust_cleaned_test_functions.jsonl/36812 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3180,
6892,
19359,
86874,
29252,
1769,
9766,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
5206,
7600,
1769,
284,
7486,
20703,
15,
84,
23,
26,
14112,
13044,
935,
286,
1077,
35046,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_block_columns_slice() {
let values = vec![
Array::new(vec![1, 2, 3, 4, 5]),
Array::new(vec![6., 7., 8., 9., 10.]),
Array::new(vec![11, 12, 13, 14, 15]),
];
let b = DataFrame::from_vec(
values,
vec!["A", "BB", "CC... | rust_cleaned_test_functions.jsonl/33496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 587
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
22590,
26488,
368,
341,
286,
1077,
2750,
284,
7486,
90515,
310,
2910,
486,
931,
25592,
20703,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
17036,
310,
2910,
486,
931,
25592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_iterator_max() {
let v = &[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
assert_eq!(v.slice(0, 4).iter().map(|&x| x).max(), Some(3));
assert_eq!(v.iter().map(|&x| x).max(), Some(10));
assert_eq!(v.slice(0, 0).iter().map(|&x| x).max(), None);
} | rust_cleaned_test_functions.jsonl/1012 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
6345,
368,
341,
286,
1077,
348,
284,
44590,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
11,
220,
23,
11,
220,
24,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compiler_version_affects_hash() {
let f = TestFixture::new();
let creator = new_creator();
let pool = ThreadPool::sized(1);
let arguments = ovec!["-c", "foo.c", "-o", "foo.o"];
let cwd = f.tempdir.path();
let results: Vec<_> = [11, 12]
... | rust_cleaned_test_functions.jsonl/61646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 926
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80910,
9438,
4306,
39927,
8950,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
1077,
19919,
284,
501,
68532,
543,
286,
1077,
7314,
284,
72716,
486,
82,
1506,
7,
16,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_cast_range_u32_max() {
assert_eq!(u32::MAX.to_i8(), None);
assert_eq!(u32::MAX.to_i16(), None);
assert_eq!(u32::MAX.to_i32(), None);
assert_eq!(u32::MAX.to_i64(), Some(u32::MAX as i64));
assert_eq!(u32::MAX.to_uint(), Some(u32::MAX as uint));... | rust_cleaned_test_functions.jsonl/23661 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 476
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5303,
9698,
7300,
18,
17,
6345,
368,
341,
1789,
286,
2060,
10714,
10297,
84,
18,
17,
486,
10586,
2389,
5318,
23,
1507,
256,
2240,
317,
286,
2060,
10714,
10297,
84,
18,
17,
486,
10586,
2389,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_modify_file() {
let mut file = Builder::new().prefix("test_modify").tempfile().unwrap();
let mut cfg = SecurityConfig::default();
cfg.cert_path = file.path().to_str().unwrap().to_owned();
let mut last = None;
assert!(cfg.is_modified(&mut last).unwrap());
... | rust_cleaned_test_functions.jsonl/58002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57725,
2458,
368,
341,
286,
1077,
5206,
1034,
284,
20626,
486,
931,
1005,
11849,
445,
1944,
57725,
1827,
3888,
1192,
1005,
15454,
543,
286,
1077,
5206,
13286,
284,
8234,
2648,
486,
2258,
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_detection_of_rejected_wpa1_or_wpa2_credentials() {
let failure = ConnectFailure::EstablishRsnaFailure(EstablishRsnaFailure {
auth_method: Some(auth::MethodName::Psk),
reason: EstablishRsnaFailureReason::KeyFrameExchangeTimeout,
});
assert!(failure.... | rust_cleaned_test_functions.jsonl/33059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
57505,
3575,
1288,
28303,
1670,
6595,
16,
8734,
1670,
6595,
17,
47396,
368,
341,
286,
1077,
7901,
284,
13015,
17507,
486,
68220,
42327,
3376,
17507,
10722,
267,
5102,
42327,
3376,
17507,
341,
310,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_graph_construction_3() {
let g = super::Digraph::new(0);
let w: Vec<Option<f64>> = vec![];
assert_eq!(g.size(), 0);
assert_eq!(g.to_vec(), w);
} | rust_cleaned_test_functions.jsonl/42290 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14738,
3382,
3024,
62,
18,
368,
341,
286,
1077,
342,
284,
2256,
486,
37098,
1935,
486,
931,
7,
15,
317,
286,
1077,
289,
25,
11312,
94150,
63895,
21,
19,
2452,
284,
7486,
0,
15078,
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 |
#[test]
fn test_lifetimes() {
let value = 5;
assert_ser_tokens(
&Lifetimes::LifetimeSeq(&value),
&[
Token::NewtypeVariant {
name: "Lifetimes",
variant: "LifetimeSeq",
},
Token::I32(5),
],
);
assert_ser_... | rust_cleaned_test_functions.jsonl/56423 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 770
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
333,
6889,
368,
341,
262,
1077,
897,
284,
220,
20,
401,
262,
2060,
75861,
28838,
1006,
286,
609,
43,
333,
6889,
486,
74579,
20183,
2099,
957,
1326,
286,
609,
9640,
310,
9660,
486,
3564,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_shred() {
let blocktree_path = get_tmp_ledger_path!();
let blocktree = Arc::new(Blocktree::open(&blocktree_path).unwrap());
let num_entries = 10;
let original_entries = create_ticks(num_entries, 0, Hash::default());
let mut shreds = local_entries_t... | rust_cleaned_test_functions.jsonl/16020 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
3712,
1151,
368,
341,
286,
1077,
2504,
9344,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
1077,
2504,
9344,
284,
19689,
486,
931,
55243,
9344,
486,
2508,
2099,
4574,
9344,
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_pay_for_non_premium_credential() {
init!("true");
let cred: Credential = Credential::from_str(DEFAULT_SERIALIZED_CREDENTIAL).unwrap();
assert!(cred.payment_info.is_none());
assert_eq!(cred.submit_payment().unwrap_err().kind(), VcxErrorKind::NoPaymentInformation);
... | rust_cleaned_test_functions.jsonl/82314 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28925,
5478,
21637,
620,
84032,
666,
30320,
368,
341,
286,
2930,
17223,
1866,
797,
286,
1077,
4187,
25,
93379,
284,
93379,
486,
1499,
2895,
43175,
14844,
88727,
920,
81509,
568,
15454,
543,
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,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_untagged_a_ser() {
let v = EnumStructUntagged::VariantA {
foo: 1,
bar: 2,
different: 3,
};
let e = "(foo:1,bar:2,different:3,)";
test_ser(&v, e);
} | rust_cleaned_test_functions.jsonl/110473 | {
"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,
62,
3850,
96476,
4306,
75861,
368,
341,
262,
1077,
348,
284,
14086,
9422,
20250,
96476,
486,
20746,
32,
341,
286,
15229,
25,
220,
16,
345,
286,
3619,
25,
220,
17,
345,
286,
2155,
25,
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 |
#[test]
fn test_facet_collector_topk() {
let mut schema_builder = Schema::builder();
let facet_field = schema_builder.add_facet_field("facet", INDEXED);
let schema = schema_builder.build();
let index = Index::create_in_ram(schema);
let uniform = Uniform::new_inclusive(1,... | rust_cleaned_test_functions.jsonl/10756 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 959
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41589,
295,
10211,
27669,
10426,
74,
368,
341,
286,
1077,
5206,
10802,
28532,
284,
12539,
486,
17850,
543,
286,
1077,
44507,
5013,
284,
10802,
28532,
1364,
41589,
295,
5013,
445,
83523,
497,
39300,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_new_id() {
let cache = CacheTest::new(0);
let a = cache.cache.new_id();
let b = cache.cache.new_id();
let c = cache.cache.new_id();
assert_ne!(a, b);
assert_ne!(b, c);
} | rust_cleaned_test_functions.jsonl/82682 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
842,
368,
341,
286,
1077,
6500,
284,
19479,
2271,
486,
931,
7,
15,
317,
286,
1077,
264,
284,
6500,
20087,
4618,
842,
543,
286,
1077,
293,
284,
6500,
20087,
4618,
842,
543,
286,
1077,
272... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_prefix_len_ipv6() {
let ip1 = Ipv6Addr::from([0xFF, 0xFF, 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
let ip2 = Ipv6Addr::from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
let ip3 = Ipv6Addr::from([0xFF, 0xFF, 0x80, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0... | rust_cleaned_test_functions.jsonl/31871 | {
"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,
21107,
13974,
6043,
49378,
21,
368,
341,
286,
1077,
5997,
16,
284,
358,
30168,
21,
13986,
486,
1499,
2561,
15,
9264,
11,
220,
15,
9264,
11,
220,
15,
87,
23,
15,
11,
220,
15,
11,
220,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_legal_moves_banmen_with_ou_7_squares_sente() {
const OFFSETS:[(i32,i32); 8] = [
(-1,-1),(-1,0),(-1,1),(0,-1),(0,1),(1,-1),(1,0),(1,1)
];
let blank_banmen = Banmen([[Blank; 9]; 9]);
for y in 0..9 {
let mut answer:Vec<((u32,u32),(u32,u32,bool),Option<ObtainKind>)> = Vec::new();
... | rust_cleaned_test_functions.jsonl/81315 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 550
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82324,
45390,
880,
276,
5676,
6615,
62,
283,
62,
22,
643,
40856,
643,
6817,
368,
972,
4777,
48104,
50,
7259,
7,
72,
18,
17,
11286,
18,
17,
1215,
220,
23,
60,
284,
23637,
197,
197,
4080,
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... | 8 |
#[test]
fn test_bad_slice() {
assert_eq!(Signature::from_der(&[0; constants::MAX_SIGNATURE_SIZE + 1]),
Err(InvalidSignature));
assert_eq!(Signature::from_der(&[0; constants::MAX_SIGNATURE_SIZE]),
Err(InvalidSignature));
assert_eq!(Message::from_slic... | rust_cleaned_test_functions.jsonl/12677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 320
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34199,
26488,
368,
341,
286,
2060,
10714,
10297,
25088,
486,
1499,
35345,
2099,
58,
15,
26,
18021,
486,
10586,
73752,
4098,
488,
220,
16,
17036,
4293,
15495,
7,
7928,
25088,
1106,
286,
2060,
10714... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_withdraw_ix_only_nonce_acc_fail() {
assert_eq!(
process_instruction(
&Pubkey::default(),
vec![KeyedAccount::new(
&Pubkey::default(),
true,
&create_default_account()
... | rust_cleaned_test_functions.jsonl/73066 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
6615,
7633,
62686,
18410,
48508,
17737,
22121,
368,
341,
286,
2060,
10714,
33673,
310,
1882,
54923,
1006,
394,
609,
29162,
792,
486,
2258,
3148,
394,
7486,
20703,
1592,
291,
7365,
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_value_tx_context_type_change() {
let mut mock = Mock::default();
let mut ctx = mock.create_ctx();
let x = ctx.value::<u64>("module.TestKey").set(0);
*x = 42;
let tx = transaction::Transaction {
version: 1,
call: transaction::Call ... | rust_cleaned_test_functions.jsonl/105378 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 535
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3142,
17805,
8467,
1819,
15947,
368,
341,
286,
1077,
5206,
7860,
284,
14563,
486,
2258,
543,
286,
1077,
5206,
5635,
284,
7860,
2520,
15147,
1428,
286,
1077,
856,
284,
5635,
2824,
27638,
84,
21,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_with_some_real_data() {
let newmm_default_dict = NewmmCustom::new(None);
assert_eq!(
newmm_default_dict.segment_to_string(FIRST_TEXT, None, None),
["นิสสัน", "ผ่อน", "จน", "เพลีย", "นาวา", "ร่า", ".."]
);
assert_eq!(
newmm_default_dict.segment_to_string(SE... | rust_cleaned_test_functions.jsonl/101666 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 769
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6615,
61855,
15266,
1769,
368,
341,
262,
1077,
501,
3821,
9993,
5243,
284,
1532,
3821,
10268,
486,
931,
26717,
317,
262,
2060,
10714,
33673,
286,
501,
3821,
9993,
5243,
62012,
2346,
3904,
7832,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_block() -> io::Result<()> {
let mut reader = BGZF_EOF;
let mut cdata = Vec::new();
let mut block = Block::default();
let block_size = read_block(&mut reader, &mut cdata, &mut block)?;
assert_eq!(block_size, BGZF_EOF.len());
Ok(())
} | rust_cleaned_test_functions.jsonl/46145 | {
"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,
6443,
7113,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
5206,
6604,
284,
43011,
90814,
89287,
280,
286,
1077,
5206,
272,
691,
284,
11312,
486,
931,
543,
286,
1077,
5206,
2504,
284,
8362,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_all_in_check_directory_optimize() {
run_check_tests(OPT_IGNORE_LIST, CheckMode::Wasm, true, true);
run_check_tests(OPT_IGNORE_LIST, CheckMode::Interpreter, true, true);
} | rust_cleaned_test_functions.jsonl/21492 | {
"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,
5705,
1243,
7200,
14846,
15032,
11853,
368,
341,
262,
1598,
7200,
32509,
19238,
2828,
49974,
11899,
11,
4248,
3636,
486,
54,
10530,
11,
830,
11,
830,
317,
262,
1598,
7200,
32509,
19238,
2828,
4997... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_verify_bank_hash_bad_account_hash() {
use BankHashVerificationError::*;
solana_logger::setup();
let db = AccountsDb::new(Vec::new(), &ClusterType::Development);
let key = Pubkey::default();
let some_data_len = 0;
let some_slot: Slot = 0;
l... | rust_cleaned_test_functions.jsonl/1382 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 529
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
35733,
8950,
34199,
13500,
8950,
368,
341,
286,
990,
8547,
6370,
62339,
1454,
56162,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
2927,
284,
40655,
7994,
486,
931,
49923,
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... | 1 |
#[test]
fn test_is_associated() {
let mut variant_stream = VariantStream::ExtXStreamInf {
uri: "https://www.example.com/init.bin".into(),
frame_rate: None,
audio: Some("ag1".into()),
subtitles: Some("sg1".into()),
closed_captions: Some(ClosedCa... | rust_cleaned_test_functions.jsonl/80718 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
58665,
657,
368,
341,
286,
1077,
5206,
11424,
12673,
284,
39292,
3027,
486,
6756,
55,
3027,
19433,
341,
310,
13071,
25,
330,
2428,
1110,
2136,
7724,
905,
42948,
29394,
3263,
18122,
3148,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pathinfo_starts_with() {
let p = PathBuf::from("foo/bar");
assert_eq!(
<PathBuf as PathInfo>::starts_with(&p, Path::new("foo")),
true,
);
assert_eq!(
<PathBuf as PathInfo>::starts_with(&p, Path::new(... | rust_cleaned_test_functions.jsonl/14049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2638,
2733,
86552,
6615,
368,
341,
310,
1077,
281,
284,
7933,
15064,
486,
1499,
445,
7975,
49513,
3071,
310,
2060,
10714,
33673,
394,
366,
1820,
15064,
438,
7933,
1731,
6831,
65876,
6615,
2099,
79... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ico_00000_rle() {
let data = include_bytes!("../../../data/RLEs/Ico/ico00000.rle");
let rle = parse_rle(0, data).unwrap();
} | rust_cleaned_test_functions.jsonl/72393 | {
"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,
62,
3955,
62,
15,
15,
15,
15,
15,
1710,
273,
368,
972,
286,
1077,
821,
284,
2924,
12524,
17223,
26744,
691,
19382,
867,
82,
38151,
1015,
14,
3955,
15,
15,
15,
15,
15,
1746,
273,
2815,
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 |
#[test]
fn test_progress_handler() -> Result<()> {
let db = Connection::open_in_memory()?;
static CALLED: AtomicBool = AtomicBool::new(false);
db.progress_handler(
1,
Some(|| {
CALLED.store(true, Ordering::Relaxed);
false
... | rust_cleaned_test_functions.jsonl/34787 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27200,
10183,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
11032,
486,
2508,
1243,
19195,
368,
69493,
286,
1099,
32907,
13639,
25,
30316,
11233,
284,
30316,
11233,
486,
931,
3576,
317,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_select_query_with_alias() {
let query = query_builder::select("users")
.alias("users", "u")
.fields(&["id", "name"])
.build();
assert_eq!("SELECT id, name FROM users AS u;", query);
} | rust_cleaned_test_functions.jsonl/93976 | {
"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,
13051,
5738,
6615,
35947,
368,
341,
286,
1077,
3239,
284,
3239,
28532,
486,
1742,
445,
4218,
1138,
310,
659,
14956,
445,
4218,
497,
330,
84,
1138,
310,
659,
9007,
2099,
1183,
307,
497,
330,
606,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_import_file_use_other_anchor() {
check_assist(
add_import,
"
impl std::fmt::Debug<|> for Foo {
}
",
"
use std::fmt::Debug;
impl Debug<|> for Foo {
}
",
);
} | rust_cleaned_test_functions.jsonl/39949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 144
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27740,
18434,
2458,
15951,
30456,
56532,
368,
341,
286,
1779,
12083,
380,
1006,
310,
912,
18434,
345,
310,
6228,
6383,
1460,
486,
12501,
486,
7939,
27,
91,
29,
369,
33428,
341,
532,
262,
21796,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hex() {
assert_eq!(Solution::to_hex(26), "1a".to_owned());
assert_eq!(Solution::to_hex(-1), "ffffffff".to_owned());
} | rust_cleaned_test_functions.jsonl/104770 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
32655,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
983,
32655,
7,
17,
21,
701,
330,
16,
64,
3263,
983,
51973,
1423,
286,
2060,
10714,
10297,
36842,
486,
983,
32655,
4080,
16,
701,
330,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_expire_lru() {
let mut cache = LruCache::new(2);
cache.insert("foo1", "bar1");
cache.insert("foo2", "bar2");
cache.insert("foo3", "bar3");
assert!(cache.get_mut("foo1").is_none());
cache.insert("foo2", "bar2update");
cache.insert("foo4", "b... | rust_cleaned_test_functions.jsonl/36845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
83409,
907,
2672,
368,
341,
286,
1077,
5206,
6500,
284,
444,
2672,
8233,
486,
931,
7,
17,
317,
286,
6500,
7030,
445,
7975,
16,
497,
330,
2257,
16,
797,
286,
6500,
7030,
445,
7975,
17,
497,
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_load_bad_config()
{
let socket_addr = "127.0.0.1:8080";
let full_config = load_groups(
"tests/config.failure.yaml",
socket_addr,
"127.0.0.1:9088",
"127.0.0.1:9089",
None,
#[cfg(feature = "quic")]
... | rust_cleaned_test_functions.jsonl/109918 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 450
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12411,
34199,
5332,
741,
262,
341,
286,
1077,
7575,
7387,
284,
330,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
23,
15,
23,
15,
876,
286,
1077,
2480,
5332,
284,
2795,
21148,
1006,
310,
330,
23... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_decode_sdiv() {
assert_eq!(
decode_32(0xfb99f2fa),
Instruction::SDIV {
params: Reg3NoSetFlagsParams {
rd: Reg::R2,
rn: Reg::R9,
rm: Reg::R10,
}
}
);
} | rust_cleaned_test_functions.jsonl/64829 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
643,
611,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
46071,
24,
24,
69,
17,
3632,
1326,
286,
29051,
486,
5491,
3090,
341,
310,
3628,
25,
3184,
18,
2753,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bet_small_bet() {
new_test_ext().execute_with(|| {
assert_ok!(Pooler::deposit(Origin::signed(1), 100000000000000));
assert_ok!(Chance::bet(Origin::signed(2), 1000000000000));
let bet = [(2,990000000000,),];
println!("small bet{:#?}", Chance::scheduled_bet());
assert_eq!(Chance::schedu... | rust_cleaned_test_functions.jsonl/4199 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 140
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91745,
31966,
91745,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
6948,
19817,
10297,
10551,
261,
486,
60514,
7,
13298,
486,
2215,
7,
16,
701,
220,
16,
15,
15,
15,
15,
15,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_ipaddr() {
let want_ext = IpAddress(std::net::IpAddr::V4(std::net::Ipv4Addr::new(1, 2, 3, 4)));
let want_fidl = fidl::IpAddress::Ipv4(fidl::Ipv4Address { addr: [1, 2, 3, 4] });
let got_fidl: fidl::IpAddress = want_ext.into();
let got_ext = IpAddress::from(got_fidl... | rust_cleaned_test_functions.jsonl/56508 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 222
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10385,
6214,
368,
341,
286,
1077,
1366,
9927,
284,
35033,
4286,
5194,
486,
4711,
486,
23378,
13986,
486,
53,
19,
5194,
486,
4711,
486,
80656,
19,
13986,
486,
931,
7,
16,
11,
220,
17,
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_memcmp_encode_all() {
// Checks whether encoded result matches expectation.
let cases = vec![
(
vec![],
vec![0, 0, 0, 0, 0, 0, 0, 0, 247],
vec![255, 255, 255, 255, 255, 255, 255, 255, 8],
),
(
... | rust_cleaned_test_functions.jsonl/26695 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3923
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12976,
7293,
11224,
5705,
368,
341,
286,
442,
24843,
3425,
20498,
1102,
9071,
30193,
382,
286,
1077,
5048,
284,
7486,
90515,
310,
2399,
394,
7486,
20703,
1259,
394,
7486,
20703,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_verify_multisig() {
solana_logger::setup();
let tx = test_multisig_tx();
let mut packet = sigverify::make_packet_from_transaction(tx);
let n = 4;
let num_batches = 3;
let mut batches = generate_packet_batches(&packet, n, num_batches);
pa... | rust_cleaned_test_functions.jsonl/22088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35638,
26290,
285,
343,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
1428,
286,
1077,
9854,
284,
1273,
26290,
285,
343,
17805,
543,
286,
1077,
5206,
10151,
284,
8366,
12446,
486,
6927,
21078,
567... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_index() {
let mut A = ArcArray::<usize, _>::zeros((2, 3));
for (i, elt) in A.iter_mut().enumerate() {
*elt = i;
}
for ((i, j), a) in zip(indices((2, 3)), &A) {
assert_eq!(*a, A[[i, j]]);
}
let vi = A.slice(s![1.., ..;2]);
let mut it = vi.iter();
... | rust_cleaned_test_functions.jsonl/92609 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 240
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
262,
1077,
5206,
362,
284,
19689,
1857,
27638,
51878,
11,
716,
6831,
35716,
1188,
17,
11,
220,
18,
1106,
262,
369,
320,
72,
11,
54139,
8,
304,
362,
19471,
29523,
1005,
76569,
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... | 4 |
#[test]
fn test_config_set_cache_delete_callback() {
let mut config = Config::new();
unsafe extern "C" fn test(_data: *mut ::std::os::raw::c_void,
_key: *const ::std::os::raw::c_void,
_key_size: u64)
... | rust_cleaned_test_functions.jsonl/51693 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 270
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5332,
2602,
11529,
11353,
12519,
368,
341,
286,
1077,
5206,
2193,
284,
5532,
486,
931,
1428,
286,
19860,
15637,
330,
34,
1,
5168,
1273,
2490,
691,
25,
353,
6984,
3504,
1834,
486,
436,
486,
1041,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ecdsa_object_pool() {
let metrics_registry = MetricsRegistry::new();
let metrics = EcdsaPoolMetrics::new(metrics_registry, POOL_ECDSA, POOL_TYPE_VALIDATED);
let mut object_pool = EcdsaObjectPool::new(EcdsaMessageType::Dealing, metrics);
let key_1 = {
... | rust_cleaned_test_functions.jsonl/26782 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
5314,
15709,
368,
341,
286,
1077,
16734,
50650,
284,
54190,
15603,
486,
931,
543,
286,
1077,
16734,
284,
468,
4385,
9081,
10551,
27328,
486,
931,
89788,
50650,
11,
12932,
1930,
69510,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_epoch_panic() {
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(
1_000_000_000_000_000,
&Pubkey::new_unique(),
bootstrap_validator_stake_lamports(),
... | rust_cleaned_test_functions.jsonl/2677 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1279
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
20682,
620,
31270,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
6615,
79991,
1006,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_req_type() {
let engine = TestEngineBuilder::new().build().unwrap();
let read_pool = build_read_pool_for_test(engine.clone());
let cop = Endpoint::<RocksEngine>::new(&Config::default(), read_pool);
let mut req = coppb::Request::default();
req.set_... | rust_cleaned_test_functions.jsonl/40857 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
17644,
1819,
368,
341,
286,
1077,
4712,
284,
3393,
4571,
3297,
486,
931,
1005,
5834,
1005,
15454,
543,
286,
1077,
1349,
15709,
284,
1936,
6443,
15709,
5478,
4452,
48974,
15997,
1423,
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_from_cube() {
assert_eq!(I, Permutation::from_cube(Cube::default()).unwrap());
let mut rng = rand::thread_rng();
for _ in 0..1000 {
let p1: Permutation = rng.gen();
let c = Cube::default().apply(p1);
let p2 = Permutation::from_cube(c).u... | rust_cleaned_test_functions.jsonl/31488 | {
"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,
5673,
64065,
368,
341,
286,
2060,
10714,
10297,
40,
11,
3616,
30971,
486,
1499,
64065,
3025,
3760,
486,
2258,
6011,
15454,
1423,
286,
1077,
5206,
28422,
284,
10382,
486,
4528,
66849,
543,
286,
369... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_module_is_empty_with_no_segments() {
let name = "unit_test";
let desc = "This is a unit test";
let module = Module {
config: None,
name: name.to_string(),
description: desc.to_string(),
segments: Vec::new(),
dura... | rust_cleaned_test_functions.jsonl/11750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 198
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
6892,
15124,
6615,
6536,
55735,
368,
341,
286,
1077,
829,
284,
330,
3843,
4452,
876,
286,
1077,
6560,
284,
330,
1986,
374,
264,
4982,
1273,
876,
286,
1077,
4688,
284,
13711,
341,
310,
219... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seckey_from_bad_slice() {
// Bad sizes
assert_eq!(
SecretKey::from_slice(&[0; constants::SECRET_KEY_SIZE - 1]),
Err(InvalidSecretKey)
);
assert_eq!(
SecretKey::from_slice(&[0; constants::SECRET_KEY_SIZE + 1]),
Err(In... | rust_cleaned_test_functions.jsonl/32188 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 370
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
377,
1195,
5673,
34199,
26488,
368,
341,
286,
442,
11461,
12282,
198,
286,
2060,
10714,
33673,
310,
8599,
1592,
486,
1499,
26488,
2099,
58,
15,
26,
18021,
486,
65310,
6600,
4098,
481,
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_expected_full_config() {
let _ = env_logger::builder().is_test(true).try_init();
let json = r#"{
"instanceServiceSpec": {
"ports": [
{
"name": "http",
"port": 6052... | rust_cleaned_test_functions.jsonl/34771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1639
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32190,
16372,
5332,
368,
341,
286,
1077,
716,
284,
6105,
27413,
486,
17850,
1005,
285,
4452,
3715,
568,
1539,
6137,
1428,
286,
1077,
2951,
284,
435,
55543,
515,
394,
330,
4851,
1860,
8327,
788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_case_2() {
let key = "7afb217bd1eceeac1e133aaa9edb441fa88ea3ae0eaa06cb9911b6d218570f92";
let nonce = "4a70a7e992b43e0b18578e892e954c40";
let expected_output =
"41119e28a00a9d3f24b1910495f3058f9db83cbcf12889de84a2fcd7de8dc31b";
hchac... | rust_cleaned_test_functions.jsonl/44664 | {
"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,
19096,
62,
17,
368,
341,
310,
1077,
1376,
284,
330,
22,
96834,
17,
16,
22,
8940,
16,
68,
70596,
580,
16,
68,
16,
18,
18,
32646,
24,
93727,
19,
19,
16,
3632,
23,
23,
12508,
18,
5918,
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_read_array() {
assert_eq!(
read_array(&cbor_int!(123)),
Err(CTAP2_ERR_CBOR_UNEXPECTED_TYPE)
);
assert_eq!(
read_array(&cbor_bool!(true)),
Err(CTAP2_ERR_CBOR_UNEXPECTED_TYPE)
);
assert_eq!(
read_ar... | rust_cleaned_test_functions.jsonl/51439 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 755
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
3858,
368,
341,
286,
2060,
10714,
33673,
310,
1349,
3858,
2099,
7221,
269,
4042,
10297,
16,
17,
18,
6965,
310,
15495,
7,
1162,
2537,
17,
9875,
48933,
868,
6735,
80002,
4189,
340,
286,
1439... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_t06() {
// Property selection
let (r, sioe) = do_execute!(&["-s", "\"object\".{\"a\",\"c\"}"], super::IN_DAT_06);
assert_eq!(buff!(sioe, serr), "");
assert_eq!(buff!(sioe, sout), "{\"a\":1,\"c\":3}\n",);
assert_eq!(r.is_ok(), true);
} | rust_cleaned_test_functions.jsonl/118361 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 166
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
15,
21,
368,
341,
286,
442,
8655,
6589,
198,
286,
1077,
320,
81,
11,
274,
815,
68,
8,
284,
653,
44329,
0,
2099,
1183,
12,
82,
497,
15898,
1700,
2105,
18428,
2105,
64,
34333,
66,
2105,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_scan_accounts() {
run_test_scan_accounts(0);
run_test_scan_accounts(1);
run_test_scan_accounts(CFG.ITER_BATCH_SIZE * 10);
run_test_scan_accounts(CFG.ITER_BATCH_SIZE * 10 - 1);
run_test_scan_accounts(CFG.ITER_BATCH_SIZE * 10 + 1);
} | rust_cleaned_test_functions.jsonl/74743 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 157
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28857,
55665,
368,
341,
286,
1598,
4452,
28857,
55665,
7,
15,
317,
286,
1598,
4452,
28857,
55665,
7,
16,
317,
286,
1598,
4452,
28857,
55665,
3025,
12001,
13,
24733,
74009,
4098,
353,
220,
16,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slot_interrupt() {
// Setup
let num_shreds_per_slot = 2;
let (blockstore, genesis_config, cluster_info, bank0, leader_keypair, socket, bank_forks) =
setup(num_shreds_per_slot);
// Insert 1 less than the number of ticks needed to finish the slot
... | rust_cleaned_test_functions.jsonl/38303 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2353
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27563,
42606,
368,
341,
286,
442,
18626,
198,
286,
1077,
1629,
3712,
53369,
5678,
27563,
284,
220,
17,
280,
286,
1077,
320,
4574,
4314,
11,
59366,
5332,
11,
10652,
3109,
11,
6073,
15,
11,
7653,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extend_new_filter() {
let mut my_tera = Tera::default();
let mut framework_tera = Tera::default();
framework_tera.register_filter("hello", |_: &JsonValue, _: &HashMap<String, JsonValue>| {
Ok(JsonValue::Number(10.into()))
});
my_tera.extend(&fr... | rust_cleaned_test_functions.jsonl/87554 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70265,
5921,
8727,
368,
341,
286,
1077,
5206,
847,
62,
50037,
284,
350,
2416,
486,
2258,
543,
286,
1077,
5206,
12626,
62,
50037,
284,
350,
2416,
486,
2258,
543,
286,
12626,
62,
50037,
9929,
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_retry_success() {
let mut states = vec![];
let res = Retry::default()
.initial_backoff(Duration::from_millis(1))
.retry(|state| {
states.push(state);
if state.i == 2 {
Ok(())
} else {
... | rust_cleaned_test_functions.jsonl/114703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 624
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62745,
18632,
368,
341,
286,
1077,
5206,
5302,
284,
7486,
0,
15078,
286,
1077,
592,
284,
78870,
486,
2258,
741,
310,
659,
9426,
3895,
1847,
64114,
486,
1499,
717,
56212,
7,
16,
1171,
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... | 2 |
#[test]
fn test_vote_serialize() {
let mut buffer: Vec<u8> = vec![0; VoteState::size_of()];
let mut vote_state = VoteState::default();
vote_state
.votes
.resize(MAX_LOCKOUT_HISTORY, Lockout::default());
let versioned = VoteStateVersions::Current(Box::new(v... | rust_cleaned_test_functions.jsonl/66076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 282
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54360,
88686,
368,
341,
286,
1077,
5206,
4147,
25,
11312,
34837,
23,
29,
284,
7486,
20703,
15,
26,
34034,
1397,
486,
2141,
3575,
33800,
286,
1077,
5206,
6910,
4387,
284,
34034,
1397,
486,
2258,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_name_if_active() {
let inspector = finspect::Inspector::new();
let mut dynamic_index = DynamicIndex::new(inspector.root().create_child("index"));
dynamic_index.add_package(Hash::from([1; 32]), Package::Pending);
dynamic_index.add_package(
Hash::fro... | rust_cleaned_test_functions.jsonl/74632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 706
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1269,
11119,
12930,
368,
341,
286,
1077,
44725,
284,
64979,
987,
486,
46230,
486,
931,
543,
286,
1077,
5206,
8741,
3560,
284,
21886,
1552,
486,
931,
56337,
18997,
12576,
1005,
3182,
17268,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_file_discovery() {
let mut env = SmokeTestEnvironment::new(1);
let op_tool = OperationalTool::test();
let (private_key, peer_set) = generate_private_key_and_peer(&op_tool);
let discovery_file = create_discovery_file(peer_set);
// Add key to file based discovery
modify_ne... | rust_cleaned_test_functions.jsonl/127476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 638
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
9932,
7449,
368,
341,
262,
1077,
5206,
6105,
284,
53204,
2271,
12723,
486,
931,
7,
16,
317,
262,
1077,
1179,
22785,
284,
89296,
7740,
486,
1944,
543,
262,
1077,
320,
1996,
3097,
11,
14397,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_range() {
let mut storage = MockStorage::new();
let prefix = to_length_prefixed(b"foo");
let other_prefix = to_length_prefixed(b"food");
// set some values in this range
set_with_prefix(&mut storage, &prefix, b"bar", b"none");
set_with_prefix(&mut... | rust_cleaned_test_functions.jsonl/83833 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 547
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
368,
341,
286,
1077,
5206,
5819,
284,
14563,
5793,
486,
931,
543,
286,
1077,
9252,
284,
311,
5118,
43331,
3286,
1883,
1,
7975,
797,
286,
1077,
1008,
13974,
284,
311,
5118,
43331,
3286,
188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_response() {
let exposed_headers = vec![header::AUTHORIZATION, header::ACCEPT];
let mut cors = Cors::new()
.send_wildcard()
.disable_preflight()
.max_age(3600)
.allowed_methods(vec![Method::GET, Method::OPTIONS, Method::POST])
... | rust_cleaned_test_functions.jsonl/915 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1695
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9655,
368,
341,
286,
1077,
14900,
26719,
284,
7486,
20703,
2708,
486,
26694,
83278,
11,
4247,
486,
97356,
935,
286,
1077,
5206,
43911,
284,
52518,
486,
931,
741,
310,
659,
6681,
1670,
695,
4951,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hunk_header_style_colored_input_color_is_stripped_under_normal() {
let config = integration_test_utils::make_config_from_args(&[
"--hunk-header-style",
"line-number normal",
"--hunk-header-line-number-style",
"normal",
"--hunk-h... | rust_cleaned_test_functions.jsonl/70088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1523,
3122,
8757,
15117,
10211,
3018,
5898,
6714,
6892,
1261,
461,
6924,
58228,
13973,
368,
341,
286,
1077,
2193,
284,
17590,
4452,
17309,
486,
6927,
5332,
5673,
8384,
2099,
9640,
310,
14482,
71,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_shrink_reset_uncleaned_roots() {
let mut accounts = AccountsDb::new_single();
accounts.caching_enabled = false;
accounts.reset_uncleaned_roots_v1();
assert_eq!(
*accounts.shrink_candidate_slots_v1.lock().unwrap(),
vec![] as Vec<Slot>
... | rust_cleaned_test_functions.jsonl/1396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 603
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3712,
34365,
18983,
76576,
2675,
291,
26608,
2412,
368,
341,
286,
1077,
5206,
9618,
284,
40655,
7994,
486,
931,
19487,
543,
286,
9618,
520,
11829,
18220,
284,
895,
401,
286,
9618,
13857,
76576,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_ticks() {
let time = TimeStd::from(Arc::new(ContextData::new())).unwrap();
::std::thread::sleep(Duration::from_millis(10));
let ticks = time.get_ticks();
assert!(ticks >= 10.0 && ticks < 100.0);
} | rust_cleaned_test_functions.jsonl/52807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
49961,
368,
341,
286,
1077,
882,
284,
4120,
22748,
486,
1499,
4346,
1287,
486,
931,
14001,
1043,
486,
931,
34670,
15454,
543,
286,
3504,
1834,
486,
4528,
486,
25809,
64114,
486,
1499,
717,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_smoke() {
let p256 = EcPrivKey::<P256>::generate().unwrap();
let p384 = EcPrivKey::<P384>::generate().unwrap();
let p521 = EcPrivKey::<P521>::generate().unwrap();
test_signature_smoke(
&p256,
EcdsaSignature::<_, Sha... | rust_cleaned_test_functions.jsonl/51193 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 989
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15874,
4740,
368,
341,
310,
1077,
281,
17,
20,
21,
284,
36111,
32124,
1592,
27638,
47,
17,
20,
21,
6831,
19366,
1005,
15454,
543,
310,
1077,
281,
18,
23,
19,
284,
36111,
32124,
1592,
27638,
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_vm_version() {
let mut machine = SCRIPT_VERSION.init_core_machine_without_limit();
let vm_version = u64::from(SCRIPT_VERSION.vm_version());
machine.set_register(A0, 0);
machine.set_register(A1, 0);
machine.set_register(A2, 0);
machine.set_register(A3, 0);
machine.set... | rust_cleaned_test_functions.jsonl/25733 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 230
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39008,
9438,
368,
341,
262,
1077,
5206,
5662,
284,
53679,
10678,
8271,
15467,
38695,
39904,
14763,
543,
262,
1077,
10995,
9438,
284,
575,
21,
19,
486,
1499,
7,
24787,
10678,
38659,
9438,
5231,
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_empty_entry_ref() {
let mut m: HashMap<std::string::String, bool> = HashMap::new();
match m.entry_ref("poneyland") {
EntryRef::Occupied(_) => panic!(),
EntryRef::Vacant(_) => {}
}
assert!(*m.entry_ref("poneyland").or_insert(true));
... | rust_cleaned_test_functions.jsonl/26940 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 175
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
9078,
7793,
368,
341,
286,
1077,
5206,
296,
25,
10528,
8050,
486,
917,
486,
703,
11,
1807,
29,
284,
10528,
486,
931,
543,
286,
2432,
296,
24116,
7793,
445,
79,
2534,
1933,
899,
341,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_input_stream_read_raw_vaint_malformed() {
// varint cannot have length > 10
test_read_partial("ff ff ff ff ff ff ff ff ff ff 01", |reader| {
let result = reader.read_raw_varint64();
match result {
// TODO: make an enum variant
... | rust_cleaned_test_functions.jsonl/104499 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 384
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5898,
12673,
6443,
16067,
2273,
1641,
717,
278,
10155,
368,
341,
286,
442,
762,
396,
4157,
614,
3084,
861,
220,
16,
15,
198,
286,
1273,
6443,
52068,
445,
542,
25539,
25539,
25539,
25539,
25539,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_range_small() {
let size = 4;
let map: BTreeMap<_, _> = (1..=size).map(|i| (i, i)).collect();
let all: Vec<_> = (1..=size).collect();
let (first, last) = (vec![all[0]], vec![all[size as usize - 1]]);
assert_eq!(range_keys(&map, (Excluded(0), Excluded(size + 1))), all);
... | rust_cleaned_test_functions.jsonl/53936 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
31966,
368,
341,
262,
1077,
1379,
284,
220,
19,
401,
262,
1077,
2415,
25,
425,
6533,
2227,
27,
6878,
716,
29,
284,
320,
16,
496,
28,
2141,
568,
2186,
22428,
72,
91,
320,
72,
11,
600,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_construct_subtree_at_bottom_found_empty_node() {
// root root
// o o o o
// o placeholder => o new_key
let new_key = b"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa".test_only_hash();
let new_blob = AccountStateBlo... | rust_cleaned_test_functions.jsonl/15417 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 520
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
5228,
9344,
3752,
25473,
21480,
15124,
5084,
368,
341,
262,
442,
286,
3704,
1698,
3704,
7213,
262,
442,
414,
297,
414,
297,
1060,
297,
414,
297,
7213,
262,
442,
262,
297,
256,
5878,
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_tx_id_calc() {
let json = r#"
{
"id": "9148408c04c2e38a6402a7950d6157730fa7d49e9ab3b9cadec481d7769918e9",
"inputs": [
{
"boxId": "9126af0675056b80d1fda7af9bf658464dbfa0b128afca7bf7dae18c27fe8456",
"spendingProof": {
"proofBytes"... | rust_cleaned_test_functions.jsonl/10403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17805,
842,
38241,
368,
341,
286,
1077,
2951,
284,
435,
2,
698,
286,
341,
414,
330,
307,
788,
330,
24,
16,
19,
23,
19,
15,
23,
66,
15,
19,
66,
17,
68,
18,
23,
64,
21,
19,
15,
17,
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_create_stake_account_from_seed() {
let vote_keypair = Keypair::new();
let vote_pubkey = vote_keypair.pubkey();
let node_pubkey = Pubkey::new_rand();
let GenesisConfigInfo {
mut genesis_config,
mint_keypair,
..
} = create_genesis_config_with_leader(100... | rust_cleaned_test_functions.jsonl/113917 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 967
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
1261,
726,
13500,
5673,
33809,
368,
341,
262,
1077,
6910,
3097,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
262,
1077,
6910,
34014,
792,
284,
6910,
3097,
12670,
47773,
792,
543,
262,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_block_number() {
let host = TransientHost::new_with(get_default_context());
let host = Rc::new(RefCell::new(host));
let mut executor = Executor::new_with_tracing(host.clone());
let mut builder = Code::builder();
let code = builder
.append(OpCode::NUMBER)
.app... | rust_cleaned_test_functions.jsonl/73571 | {
"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,
7113,
5500,
368,
341,
262,
1077,
3468,
284,
4058,
1167,
9296,
486,
931,
6615,
5433,
9993,
8467,
1423,
262,
1077,
3468,
284,
81463,
486,
931,
7,
3945,
3599,
486,
931,
19973,
1106,
262,
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_non_zero_bytes() {
for _ in 0..10 {
let seed = SystemTime::now().duration_since(SystemTime::UNIX_EPOCH).unwrap();
let mut rng = StdRng::seed_from_u64(seed.as_secs());
let mut b = vec![0u8; 512];
non_zero_random_bytes(&mut rng, &mut b);
... | rust_cleaned_test_functions.jsonl/52104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
19359,
12524,
368,
341,
286,
369,
716,
304,
220,
15,
496,
16,
15,
341,
310,
1077,
10320,
284,
739,
1462,
486,
3328,
1005,
17021,
56262,
10407,
1462,
486,
99089,
2089,
69945,
568,
15454,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_scope_import_within_attr_set() {
let expr = "let a = { b = import ./foo.nix; }; in a.b.c";
let root = rnix::parse(expr).node();
let mut app = App {
files: HashMap::new(),
conn: Connection::memory().0,
};
let url = Url::parse("file:... | rust_cleaned_test_functions.jsonl/112284 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23199,
18434,
72385,
10422,
2602,
368,
341,
286,
1077,
15169,
284,
330,
1149,
264,
284,
314,
293,
284,
1159,
12991,
7975,
1253,
941,
26,
20066,
304,
264,
948,
520,
876,
286,
1077,
3704,
284,
558... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_doc_comment_starts_at_line_0() {
let _pool = ConstPool::new();
let text = r"/// signers: 0x1
script { fun main(_: &signer) { assert(false, 401); } }";
let res = execute_script(
MoveFile::with_content(script_path(), text),
vec![],
"dfinance",
"0x3",
... | rust_cleaned_test_functions.jsonl/43927 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 234
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18869,
17638,
86552,
3752,
6528,
62,
15,
368,
341,
262,
1077,
716,
10285,
284,
24522,
10551,
486,
931,
1428,
262,
1077,
1467,
284,
435,
1,
2575,
1841,
388,
25,
220,
15,
87,
16,
198,
2282,
314,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handler_migrate_bridge() {
// Instantiate the "anchor_handler"
let mut deps = instantiate_anchor_handler();
let new_bridge = "new-bridge";
// Try to "migrate bridge" from non-bridge address
let migrate_bridge_msg = ExecuteMsg::MigrateBridge {
new_bridge: new_bridge.... | rust_cleaned_test_functions.jsonl/73118 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 393
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10183,
717,
34479,
54944,
368,
341,
262,
442,
32288,
279,
330,
17109,
10183,
698,
262,
1077,
5206,
48178,
284,
40902,
56532,
10183,
1428,
262,
1077,
501,
54944,
284,
330,
931,
12,
13709,
3302,
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_rw_arc() {
let arc = Arc::new(RwLock::new(0));
let arc2 = arc.clone();
let (tx, rx) = channel();
thread::spawn(move || {
let mut lock = arc2.write();
for _ in 0..10 {
let tmp = *lock;
*lock = -1;
... | rust_cleaned_test_functions.jsonl/15750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49566,
62914,
368,
341,
286,
1077,
15580,
284,
19689,
486,
931,
2785,
86,
11989,
486,
931,
7,
15,
1106,
286,
1077,
15580,
17,
284,
15580,
15997,
543,
286,
1077,
320,
3998,
11,
19111,
8,
284,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_weighted_shuffle_iterator() {
let mut test_set = [0; 6];
let mut count = 0;
let shuffle = weighted_shuffle(vec![50, 10, 2, 1, 1, 1], ChaChaRng::from_seed([0x5a; 32]));
shuffle.into_iter().for_each(|x| {
assert_eq!(test_set[x], 0);
test_set[... | rust_cleaned_test_functions.jsonl/52097 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 220
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15876,
291,
73484,
13491,
368,
341,
286,
1077,
5206,
1273,
2602,
284,
508,
15,
26,
220,
21,
935,
286,
1077,
5206,
1760,
284,
220,
15,
280,
286,
1077,
25947,
284,
36824,
73484,
25592,
20703,
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_u512_from_fixed_array() {
let ary = [
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 123
];
let num : U512 = ary.into();
assert_eq!( n... | rust_cleaned_test_functions.jsonl/45781 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 253
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7300,
20,
16,
17,
5673,
37839,
3858,
368,
341,
10217,
72921,
284,
2278,
197,
197,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
345,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_array_mutate() {
compare_stderr_output(
r#"
package main
var q [2]int = [2]int{1, 2}
var w [3]bool = [3]bool{true, false, !false}
func main() {
q[0] = 5
q[0] = q[0] - 1
q[0]--
println(q, q[1], q[0])
w[0] = !true
w[2] = w[0]
println(w, w[1], w[0])
v... | rust_cleaned_test_functions.jsonl/32003 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 646
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
29523,
349,
368,
341,
262,
9429,
93033,
7645,
1006,
286,
435,
2,
698,
1722,
1887,
271,
947,
2804,
508,
17,
63025,
284,
508,
17,
63025,
90,
16,
11,
220,
17,
532,
947,
289,
508,
18,
9643... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lcg128xsl64_construction() {
// Test that various construction techniques produce a working RNG.
#[rustfmt::skip]
let seed = [1,2,3,4, 5,6,7,8, 9,10,11,12, 13,14,15,16,
17,18,19,20, 21,22,23,24, 25,26,27,28, 29,30,31,32];
let mut rng1 = Lcg128Xsl64::from_seed(seed);
... | rust_cleaned_test_functions.jsonl/94597 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 356
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
27446,
16,
17,
23,
87,
3226,
21,
19,
3382,
3024,
368,
341,
262,
442,
3393,
429,
5257,
8086,
12538,
8193,
264,
3238,
72606,
624,
262,
11506,
35788,
12501,
486,
20599,
921,
262,
1077,
10320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stop_sending_and_reset_other_error_with_events() {
let (mut client, mut server, request_stream_id) = connect_and_send_request(false);
// send response - 200 Content-Length: 3
// with content: 'abc'.
server_send_response_and_exchange_packet(
... | rust_cleaned_test_functions.jsonl/101905 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
643,
2459,
8378,
18983,
30456,
4096,
6615,
19691,
368,
341,
1789,
286,
1077,
320,
6984,
2943,
11,
5206,
3538,
11,
1681,
12673,
842,
8,
284,
4564,
8378,
13565,
7893,
3576,
626,
286,
442,
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... | 3 |
#[test]
fn test_non_terminate_capped() {
let prog = &[
0xb7, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb7, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb7, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb7, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xb7, 0x04, 0x00, 0x0... | rust_cleaned_test_functions.jsonl/15525 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 565
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21637,
62,
48061,
666,
5677,
368,
341,
262,
1077,
29271,
284,
609,
9640,
286,
220,
15,
7929,
22,
11,
220,
15,
87,
15,
21,
11,
220,
15,
87,
15,
15,
11,
220,
15,
87,
15,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rx_rate_limiter_handling() {
let mut event_manager = EventManager::new().unwrap();
let mut net = Net::default_net(TestMutators::default());
let mem_clone = net.mem.clone();
let (rxq, txq) = Net::virtqueues(&mem_clone);
net.assign_queues(rxq.create_queue(),... | rust_cleaned_test_functions.jsonl/63429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24330,
9246,
907,
17700,
75642,
368,
341,
286,
1077,
5206,
1538,
12144,
284,
3665,
2043,
486,
931,
1005,
15454,
543,
286,
1077,
5206,
4179,
284,
9374,
486,
2258,
19722,
31159,
51440,
2973,
486,
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_display() {
// this program is perfect for this test because it contains every
let source_code = "
>>>+[[-]>>[-]++>+>+++++++[<++++>>++<-]++>>+>+>+++++[>++>++++++<<-]+>>>,<++[[>[
->>]<[>>]<<-]<[<]<+>>[>]>[<+>-[[<+>-]>]<[[[-]<]++<-[<+++++++++>[<->-]>>]>>]]<<
]<]<[[<]>[[>]>>[>>]+[<<]<[... | rust_cleaned_test_functions.jsonl/46707 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 738
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14825,
368,
341,
262,
442,
419,
2025,
374,
4727,
369,
419,
1273,
1576,
432,
5610,
1449,
7213,
262,
1077,
2530,
4136,
284,
6228,
20154,
69735,
7609,
60,
2452,
7609,
60,
1027,
95326,
29,
14565,
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_isaac64_true_bytes() {
let seed = [1,0,0,0, 0,0,0,0, 23,0,0,0, 0,0,0,0,
200,1,0,0, 0,0,0,0, 210,30,0,0, 0,0,0,0];
let mut rng = Isaac64Rng::from_seed(seed);
let mut results = [0u8; 32];
rng.fill_bytes(&mut results);
// Same as first val... | rust_cleaned_test_functions.jsonl/5537 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 378
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
64705,
21,
19,
16082,
12524,
368,
341,
286,
1077,
10320,
284,
508,
16,
11,
15,
11,
15,
11,
15,
11,
220,
15,
11,
15,
11,
15,
11,
15,
11,
220,
17,
18,
11,
15,
11,
15,
11,
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_target_disconnect() {
let target = Target::new();
target.set_state(TargetConnectionState::Mdns(Instant::now()));
target.host_pipe.borrow_mut().replace(Task::local(future::pending()));
target.disconnect();
assert_eq!(TargetConnectionState::Disconnected, t... | rust_cleaned_test_functions.jsonl/115230 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11123,
67972,
368,
341,
286,
1077,
2169,
284,
13483,
486,
931,
543,
286,
2169,
980,
4387,
80613,
4526,
1397,
486,
44,
45226,
7,
30340,
486,
3328,
7392,
286,
2169,
17840,
41862,
83640,
29523,
1005,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mv_fail() {
let (at, mut ucmd) = at_and_ucmd!();
let dir1 = "test_mv_rename_dir";
at.mkdir(dir1);
ucmd.arg(dir1).fails();
} | rust_cleaned_test_functions.jsonl/41603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73187,
22121,
368,
341,
262,
1077,
320,
266,
11,
5206,
575,
8710,
8,
284,
518,
8378,
68887,
2277,
0,
543,
262,
1077,
5419,
16,
284,
330,
1944,
73187,
79399,
4334,
3302,
262,
518,
30163,
14161,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_1_conf_open() {
// tests that we properly send one in that case.
let mut alice_config = UserConfig::default();
alice_config.own_channel_config.minimum_depth = 1;
alice_config.channel_options.announced_channel = true;
alice_config.peer_channel_config_limits.force_announced_channel_preferen... | rust_cleaned_test_functions.jsonl/28280 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 749
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
16,
16059,
11311,
368,
341,
1572,
197,
322,
7032,
429,
582,
10277,
3624,
825,
304,
429,
1142,
624,
10217,
5206,
70433,
5332,
284,
2657,
2648,
486,
2258,
543,
197,
63195,
5332,
13,
779,
14571... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_is_subspecializer() {
let mut vm = PolarVirtualMachine::default();
// Test `is_subspecializer` case where:
// - arg: `ExternalInstance`
// - left: `InstanceLiteral`
// - right: `Dictionary`
let arg = term!(Value::ExternalInstance(ExternalInstance ... | rust_cleaned_test_functions.jsonl/18519 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 561
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
5228,
15144,
3135,
368,
341,
286,
1077,
5206,
10995,
284,
55896,
33026,
21605,
486,
2258,
1428,
286,
442,
3393,
1565,
285,
5228,
15144,
3135,
63,
1142,
1380,
510,
286,
442,
481,
1392,
25,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_read_empty_block() {
let source = [1, 0, 2, 255, 255, 255, 255, 0, 0, 0];
let mut cursor = Cursor::new(&source[..]);
match Block::<Simple>::load(&mut cursor, Tz::Zulu, false) {
Ok(block) => assert!(block.is_empty()),
Err(_) => unreachable!(),
... | rust_cleaned_test_functions.jsonl/52583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 164
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
15124,
7113,
368,
341,
286,
1077,
2530,
284,
508,
16,
11,
220,
15,
11,
220,
17,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.