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_clut_image() {
START.call_once(|| {
magick_wand_genesis();
});
let wand = MagickWand::new();
assert!(wand.read_image("tests/data/IMG_5745.JPG").is_ok());
let mut gradient = MagickWand::new();
assert!(gradient.set_size(128, 20).is_ok());
assert!(gradient.set_o... | rust_cleaned_test_functions.jsonl/57708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6794,
332,
4954,
368,
341,
262,
20998,
8524,
7630,
79453,
341,
286,
4878,
865,
1670,
437,
16322,
13774,
543,
262,
1625,
262,
1077,
28710,
284,
87154,
54,
437,
486,
931,
543,
262,
2060,
10297,
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... | 2 |
#[test]
fn test_ecdsa_p256_jwk() {
let k = KeyPair::from_pem(KEY_ECDSA_P256_PEM.as_bytes()).unwrap();
let jwk = k.jwk_public_key().unwrap();
assert!(jwk.is_object());
let jwk = jwk.as_object().unwrap();
assert_eq!(jwk.len(), 6);
assert!(jwk.contains_key("kty"));
assert!(jwk.contains_... | rust_cleaned_test_functions.jsonl/72348 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 482
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
620,
17,
20,
21,
5374,
50522,
368,
341,
262,
1077,
595,
284,
5309,
12443,
486,
1499,
620,
336,
37076,
69510,
72638,
1088,
17,
20,
21,
1088,
2716,
5357,
12524,
6011,
15454,
543,
262... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_run_check_duplicate() {
let blockstore_path = get_tmp_ledger_path!();
let blockstore = Arc::new(Blockstore::open(&blockstore_path).unwrap());
let (sender, receiver) = unbounded();
let (duplicate_slot_sender, duplicate_slot_receiver) = unbounded();
let (shr... | rust_cleaned_test_functions.jsonl/22326 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 634
} | [
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_seed() {
// Check that num_seeds different seeds are generated
let num_seeds = 1000;
let mut old_seeds = HashSet::new();
for i in 0..num_seeds {
let seed = LeaderScheduler::calculate_seed(i);
assert!(!old_seeds.contains(&seed));
... | rust_cleaned_test_functions.jsonl/18349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
33809,
368,
341,
286,
442,
4248,
429,
1629,
3453,
6767,
2155,
19056,
525,
7907,
198,
286,
1077,
1629,
3453,
6767,
284,
220,
16,
15,
15,
15,
280,
286,
1077,
5206,
2310,
3453,
6767,
284,
18931,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_wallet_new() {
Wallet::new("../tmp/tests/wallet1".to_string());
assert!(Path::new("../tmp/tests/wallet1").exists());
assert!(Path::new("../tmp/tests/wallet1/data").exists());
assert!(Path::new("../tmp/tests/wallet1/html").exists());
assert!(Path::new("../... | rust_cleaned_test_functions.jsonl/83765 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 158
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62308,
5921,
368,
341,
286,
36483,
486,
931,
17409,
5173,
62468,
6324,
7464,
16,
3263,
983,
3904,
5231,
286,
2060,
10297,
1820,
486,
931,
17409,
5173,
62468,
6324,
7464,
16,
1827,
16304,
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 |
#[test]
fn test_fvm_empty() {
let header_invalid_magic = FvmHeader {
magic: FVM_MAGIC,
version: FVM_VERSION,
pslice_count: 1,
slice_size: FVM_BLOCK_SIZE,
fvm_partition_size: FVM_BLOCK_SIZE,
vpartition_table_size: FVM_BLOCK_SIZE,
... | rust_cleaned_test_functions.jsonl/67408 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 413
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
7338,
15124,
368,
341,
286,
1077,
4247,
31433,
54612,
284,
434,
7338,
4047,
341,
310,
10963,
25,
434,
11187,
49194,
345,
310,
2319,
25,
434,
11187,
10678,
345,
310,
4726,
4754,
3180,
25,
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_pixel_to_point() {
assert_eq!(
pixel_to_point(
(100, 100),
(25, 75),
Complex { re: -1.0, im: 1.0 },
Complex { re: 1.0, im: -1.0 }
),
Complex { re: -0.5, im: -0.5 }
);
} | rust_cleaned_test_functions.jsonl/13246 | {
"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,
29760,
2346,
6085,
368,
341,
262,
2060,
10714,
33673,
286,
12955,
2346,
6085,
1006,
310,
320,
16,
15,
15,
11,
220,
16,
15,
15,
1326,
310,
320,
17,
20,
11,
220,
22,
20,
1326,
310,
22096,
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_call() {
fn foo(_ctx: &mut Ctx, a: i32, b: i32) -> (i32, i32) {
(a, b)
}
let _f = Func::new(foo);
} | rust_cleaned_test_functions.jsonl/61386 | {
"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,
13429,
368,
341,
286,
5168,
15229,
2490,
3773,
25,
609,
6984,
356,
3998,
11,
264,
25,
600,
18,
17,
11,
293,
25,
600,
18,
17,
8,
1464,
320,
72,
18,
17,
11,
600,
18,
17,
8,
341,
310,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_build() {
crate::with(|s| {
let a: Tensor<f32> = s.zeros(&[4, 2]);
let v: Tensor<f32> = s.zeros(&[2, 3]);
let b: Tensor<f32> = s.zeros(&[4, 3]);
let z = s.matmul(a, v) + b;
unsafe {
let mut vars = [a.inner(), v.inner(), b.inner(), z.inner()... | rust_cleaned_test_functions.jsonl/58431 | {
"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,
20801,
368,
341,
262,
17717,
486,
4197,
22428,
82,
91,
341,
286,
1077,
264,
25,
26036,
63895,
18,
17,
29,
284,
274,
12774,
2099,
58,
19,
11,
220,
17,
2558,
286,
1077,
348,
25,
26036,
63895,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delete_all_files_in_range() {
let path = TempDir::new("_raftstore_util_delete_all_files_in_range").expect("");
let path_str = path.path().to_str().unwrap();
let cfs_opts = ALL_CFS
.into_iter()
.map(|cf| {
let mut cf_opts = ColumnFa... | rust_cleaned_test_functions.jsonl/10729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 720
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11353,
5705,
10931,
1243,
9698,
368,
341,
286,
1077,
1815,
284,
19944,
6184,
486,
931,
16975,
2944,
4314,
18974,
11353,
5705,
10931,
1243,
9698,
1827,
17119,
13056,
286,
1077,
1815,
2895,
284,
1815,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_expression_plan_format() -> Result<()> {
use pretty_assertions::assert_eq;
let schema = DataSchemaRefExt::create(vec![DataField::new("a", Vu8::to_data_type())]);
let empty_plan = EmptyPlan::create_with_schema(schema.clone());
let expression = PlanNode::Expression(ExpressionPlan... | rust_cleaned_test_functions.jsonl/108478 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28068,
26564,
8955,
368,
1464,
5714,
71698,
341,
262,
990,
5020,
16553,
908,
486,
2207,
10714,
401,
262,
1077,
10802,
284,
2885,
8632,
3945,
6756,
486,
3182,
25592,
20703,
1043,
1877,
486,
931,
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... | 2 |
#[test]
fn test_smoke_basin() {
let input = utils::read_file_lines("input/day9_2.txt".to_string());
assert_eq!(Day9::smoke_basin(input), 554);
} | rust_cleaned_test_functions.jsonl/18888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 86
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15874,
4740,
880,
50310,
368,
341,
286,
1077,
1946,
284,
12439,
486,
878,
2458,
18323,
445,
1355,
44739,
24,
62,
17,
3909,
3263,
983,
3904,
1423,
286,
2060,
10714,
10297,
10159,
24,
486,
3563,
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 |
#[test]
fn test_init_mut() {
let mut a = vec![11i];
let b: &mut [int] = &mut [];
assert!(a.as_mut_slice().init_mut() == b);
a = vec![11i, 12];
let b: &mut [int] = &mut [11];
assert!(a.as_mut_slice().init_mut() == b);
} | rust_cleaned_test_functions.jsonl/108286 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 154
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6137,
29523,
368,
341,
286,
1077,
5206,
264,
284,
7486,
20703,
16,
16,
72,
935,
286,
1077,
293,
25,
609,
6984,
508,
396,
60,
284,
609,
6984,
5907,
286,
2060,
10297,
64,
5357,
29523,
26488,
100... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_complex_basic() {
let a = Complex::new(5_i32, 6);
let b = Complex::new(7, 3);
let plus = Complex::new(12, 9);
let minus = Complex::new(-2, 3);
let mul = Complex::new(17, 57);
assert_eq!(a + b, plus);
assert_eq!(a - b, minus);
asser... | rust_cleaned_test_functions.jsonl/54837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 199
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41522,
34729,
368,
341,
286,
1077,
264,
284,
22096,
486,
931,
7,
20,
5318,
18,
17,
11,
220,
21,
317,
286,
1077,
293,
284,
22096,
486,
931,
7,
22,
11,
220,
18,
317,
286,
1077,
5519,
284,
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_incompatible_type() {
make_helpers();
unsafe {
let lib = Library::new(LIBPATH).unwrap();
assert!(match lib.get::<()>(b"test_identity_u32\0") {
Err(libloading::Error::IncompatibleSize) => true,
_ => false,
})
}
} | rust_cleaned_test_functions.jsonl/8232 | {
"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,
1243,
34842,
1819,
368,
341,
262,
1281,
54473,
543,
262,
19860,
341,
286,
1077,
3051,
284,
11635,
486,
931,
4957,
3256,
13593,
568,
15454,
543,
286,
2060,
10297,
6347,
3051,
670,
27638,
368,
2235,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enable_pipelined_write() {
let path = tempdir_with_prefix("_rust_rocksdb_enable_pipelined_write");
let mut opts = DBOptions::new();
opts.create_if_missing(true);
opts.enable_pipelined_write(true);
let db = DB::open(opts, path.path().to_str().unwrap()).unwrap();
for i in 0... | rust_cleaned_test_functions.jsonl/34120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18988,
620,
81079,
1589,
9165,
368,
341,
262,
1077,
1815,
284,
2730,
3741,
6615,
13974,
16975,
35788,
26608,
14553,
1999,
18988,
620,
81079,
1589,
9165,
797,
262,
1077,
5206,
12185,
284,
5952,
3798,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_subtraction_point_vector() {
let p = Point2::new(6.741, 23.5724);
let v = Vector2::new(80.0, 43.569);
let expected = Point2::new(p.x - v.x, p.y - v.y);
let result = p - v;
assert_eq!(result, expected);
} | rust_cleaned_test_functions.jsonl/4538 | {
"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,
5228,
26425,
6085,
12247,
368,
341,
286,
1077,
281,
284,
5126,
17,
486,
931,
7,
21,
13,
22,
19,
16,
11,
220,
17,
18,
13,
20,
22,
17,
19,
317,
286,
1077,
348,
284,
4196,
17,
486,
931,
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_take_while_folds() {
let f = &|acc, x| i32::checked_add(2*acc, x);
assert_eq!((1..20).take_while(|&x| x != 10).try_fold(7, f), (1..10).try_fold(7, f));
let mut iter = (1..20).take_while(|&x| x != 10);
assert_eq!(iter.try_fold(0, |x, y| Some(x+y)), Some((1..10).sum()));
assert... | rust_cleaned_test_functions.jsonl/54194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73261,
86069,
761,
18431,
368,
341,
262,
1077,
282,
284,
609,
91,
4475,
11,
856,
91,
600,
18,
17,
486,
7549,
2891,
7,
17,
9,
4475,
11,
856,
317,
262,
2060,
10714,
0,
1188,
16,
496,
17,
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_gen_range_int() {
let mut r = rng(101);
for _ in 0..1000 {
let a = r.gen_range(-4711..17);
assert!(a >= -4711 && a < 17);
let a = r.gen_range(-3i8..42);
assert!(a >= -3i8 && a < 42i8);
let a: u16 = r.gen_range(10..99);
... | rust_cleaned_test_functions.jsonl/110797 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 448
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
9698,
4042,
368,
341,
286,
1077,
5206,
435,
284,
28422,
7,
16,
15,
16,
317,
286,
369,
716,
304,
220,
15,
496,
16,
15,
15,
15,
341,
310,
1077,
264,
284,
435,
22822,
9698,
4080,
19,
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... | 7 |
#[test]
fn test_receiving_router_advertisement_source_link_layer_option() {
let config = Ipv6::DUMMY_CONFIG;
let mut ctx = DummyEventDispatcherBuilder::from_config(config.clone())
.build::<DummyEventDispatcher>();
let device_id = DeviceId::new_ethernet(0);
let src_mac... | rust_cleaned_test_functions.jsonl/82807 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2250
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
46344,
55587,
10027,
44424,
10347,
7233,
12680,
9672,
368,
341,
286,
1077,
2193,
284,
358,
30168,
21,
486,
35,
58673,
12568,
280,
286,
1077,
5206,
5635,
284,
50567,
1556,
21839,
3297,
486,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_request_with_an_apns_id() {
let builder = PlainNotificationBuilder::new("test");
let payload = builder.build(
"a_test_id",
NotificationOptions {
apns_id: Some("a-test-apns-id"),
..Default::default()
},
)... | rust_cleaned_test_functions.jsonl/109653 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
6615,
12008,
21093,
4412,
842,
368,
341,
286,
1077,
7363,
284,
43199,
11196,
3297,
486,
931,
445,
1944,
3071,
286,
1077,
7729,
284,
7363,
13239,
1006,
310,
330,
64,
4452,
842,
756,
310,
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_quote_hash_simple_literal() {
let a = 20;
assert_eq!(quote!(#a).to_string(), "20");
let s: String = "hello".into();
assert_eq!(quote!(#s).to_string(), "\"hello\"");
} | rust_cleaned_test_functions.jsonl/29275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45236,
8950,
30015,
34100,
368,
341,
286,
1077,
264,
284,
220,
17,
15,
280,
286,
2060,
10714,
10297,
2949,
10297,
2,
64,
568,
983,
3904,
1507,
330,
17,
15,
797,
286,
1077,
274,
25,
923,
284,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parse_max_age_nan() {
let r: Raw = "max-age = derp".into();
let h: ::Result<StrictTransportSecurity> = Header::parse_header(&r);
assert!(h.is_err());
} | rust_cleaned_test_functions.jsonl/58566 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 97
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
6345,
32053,
73936,
368,
341,
286,
1077,
435,
25,
23022,
284,
330,
2810,
42941,
284,
66391,
3263,
18122,
543,
286,
1077,
305,
25,
3504,
2077,
27,
41857,
27560,
15352,
29,
284,
12104,
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 |
#[test]
fn test_parse_f64() {
assert_eq!(1.0, to_f64("1.0").unwrap());
assert!(to_f64("a").is_err());
} | rust_cleaned_test_functions.jsonl/75481 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 76
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
761,
21,
19,
368,
341,
286,
2060,
10714,
10297,
16,
13,
15,
11,
311,
761,
21,
19,
445,
16,
13,
15,
1827,
15454,
1423,
286,
2060,
10297,
983,
761,
21,
19,
445,
64,
1827,
285,
9266,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_store_with_additional_signers() {
solana_logger::setup();
let pubkey = Pubkey::new_rand();
let signer0_pubkey = Pubkey::new_rand();
let signer1_pubkey = Pubkey::new_rand();
let keys = vec![
(pubkey, false),
(signer0_pubkey, ... | rust_cleaned_test_functions.jsonl/70771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 688
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
14809,
6615,
81742,
11172,
388,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
95116,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
70039,
15,
34014,
792,
284,
22611,
792... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_valid() {
assert!(BYR.validate("2002"));
assert!(!BYR.validate("2003"));
assert!(HGT.validate("60in"));
assert!(HGT.validate("190cm"));
assert!(!HGT.validate("190in"));
assert!(!HGT.validate("190"));
assert!(HCL.validate("#123abc"));
... | rust_cleaned_test_functions.jsonl/113340 | {
"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,
8337,
368,
341,
286,
2060,
10297,
19912,
49,
19520,
445,
17,
15,
15,
17,
4010,
286,
2060,
0,
3471,
19912,
49,
19520,
445,
17,
15,
15,
18,
4010,
286,
2060,
10297,
39,
25388,
19520,
445,
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... | 1 |
#[test]
fn test_is_finite() {
use num_traits::Float;
assert!(!Vector4::from([0.0, Float::nan(), 1.0, 1.0]).is_finite());
assert!(!Vector4::from([1.0, 1.0, Float::neg_infinity(), 0.0]).is_finite());
assert!(Vector4::from([-1.0, 0.0, 1.0, 1.0]).is_finite());
... | rust_cleaned_test_functions.jsonl/39599 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
761,
15856,
368,
341,
310,
990,
1629,
39693,
486,
5442,
280,
310,
2060,
0,
3471,
3781,
19,
486,
1499,
2561,
15,
13,
15,
11,
13001,
486,
18759,
1507,
220,
16,
13,
15,
11,
220,
16,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rustc_server_from_str() {
use std::str::FromStr;
let subtree_paren_a = tt::TokenTree::Subtree(tt::Subtree {
delimiter: Some(tt::Delimiter {
id: tt::TokenId::unspecified(),
kind: tt::DelimiterKind::Parenthesis,
}),
... | rust_cleaned_test_functions.jsonl/20321 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 604
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
590,
66,
12015,
5673,
2895,
368,
341,
286,
990,
1460,
486,
495,
486,
3830,
2580,
280,
286,
1077,
53464,
620,
9151,
4306,
284,
17853,
486,
3323,
6533,
486,
3136,
9344,
47152,
486,
3136,
934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_match_missing_query() {
let _m = mock("GET", "/hello").match_query(Matcher::Missing).create();
let (status_line, _, _) = request("GET /hello?", "");
assert_eq!("HTTP/1.1 200 OK\r\n", status_line);
let (status_line, _, _) = request("GET /hello?number=one", "");
assert_eq!("H... | rust_cleaned_test_functions.jsonl/82454 | {
"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,
10708,
40447,
5738,
368,
341,
262,
1077,
716,
76,
284,
7860,
445,
3806,
497,
3521,
14990,
1827,
6347,
5738,
3189,
28058,
486,
25080,
568,
3182,
1428,
262,
1077,
320,
2829,
6528,
11,
8358,
27439,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_hardware_spec_success() {
let mut context_builder = ContextBuilder::new();
context_builder.log_in(&[RoleType::SpecCreator]);
let conn = context_builder.db_conn();
// We'll test collisions against this
HardwareSpecFactory::default().name("HW 1").insert(conn);
let ... | rust_cleaned_test_functions.jsonl/61182 | {
"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,
8657,
1523,
37750,
13594,
18632,
368,
341,
262,
1077,
5206,
2266,
28532,
284,
9608,
3297,
486,
931,
543,
262,
2266,
28532,
1665,
1243,
2099,
58,
9030,
929,
486,
8327,
31865,
2558,
262,
1077,
4534,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aligned_labelled_convert_from() {
let n_u = NormalUser {
first_name: "Moe",
last_name: "Ali",
age: 30,
};
// even less boilerplate than before
let j_u: JumbledUser = transform_from(n_u); // Done
assert_eq!(j_u.first_name, "Moe");
assert_eq!(j_u.la... | rust_cleaned_test_functions.jsonl/32222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66385,
6106,
832,
34910,
5673,
368,
341,
262,
1077,
308,
7300,
284,
18437,
1474,
341,
286,
1156,
1269,
25,
330,
44,
4644,
756,
286,
1537,
1269,
25,
330,
17662,
756,
286,
4231,
25,
220,
18,
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_file_reader_rows_nulls() {
let rows = test_file_reader_rows("nulls.snappy.parquet", None).unwrap();
let expected_rows = vec![
row![(
"b_struct".to_string(),
group![("b_c_int".to_string(), Field::Null)]
)],
row![(... | rust_cleaned_test_functions.jsonl/69585 | {
"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,
2458,
22306,
10949,
15162,
82,
368,
341,
286,
1077,
6978,
284,
1273,
2458,
22306,
10949,
445,
2921,
82,
37672,
11144,
33277,
23300,
497,
2240,
568,
15454,
543,
286,
1077,
3601,
10949,
284,
7486,
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_find_msg_range() {
let data: [u8; 64] = [
255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 45,
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, ... | rust_cleaned_test_functions.jsonl/119626 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 278
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21814,
6483,
9698,
368,
341,
286,
1077,
821,
25,
508,
84,
23,
26,
220,
21,
19,
60,
284,
2278,
310,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
11,
220,
17,
20,
20,
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_permutation() {
let p = Permutation::new((0..3).collect::<Vec<_>>());
let expected = HashSet::from([
vec![0, 1, 2],
vec![0, 2, 1],
vec![1, 0, 2],
vec![1, 2, 0],
vec![2, 0, 1],
vec![2, 1, 0],
]);
assert_eq... | rust_cleaned_test_functions.jsonl/116541 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 609
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31961,
22705,
368,
341,
286,
1077,
281,
284,
3616,
30971,
486,
931,
1188,
15,
496,
18,
568,
17384,
27638,
10050,
32399,
2452,
1423,
286,
1077,
3601,
284,
18931,
486,
1499,
8956,
688,
7486,
20703,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_poh_recorder_reset_clears_cache() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let (mut poh_recorder, _entry_receiver, _record_receiver... | rust_cleaned_test_functions.jsonl/39773 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 557
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
7080,
1358,
18983,
21811,
82,
11529,
368,
341,
286,
1077,
46933,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
341,
310,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
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... | 1 |
#[test]
fn test_cancel() {
let (temp, mut endpoint) = new_endpoint();
let engine = endpoint.engine.clone();
endpoint
.region_info
.set_regions(vec![(b"".to_vec(), b"5".to_vec(), 1)]);
let mut ts: TimeStamp = 1.into();
let mut alloc_ts = || *ts.in... | rust_cleaned_test_functions.jsonl/5640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 842
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28895,
368,
341,
286,
1077,
320,
3888,
11,
5206,
14887,
8,
284,
501,
36699,
543,
286,
1077,
4712,
284,
14887,
24417,
15997,
1428,
286,
14887,
198,
310,
659,
3943,
3109,
198,
310,
659,
746,
58035... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_count_and2_c00() {
let n = 20_000;
let seed = 112;
let mut sum = 0;
let mut bset1 = Bitset::zeros(n);
let mut bset2 = Bitset::zeros(n);
for i in 0..n {
let b1 = (((1123*i) % 3 + 51) % 3 + seed) % 3 == 1;
let b2 = (((8827*i)... | rust_cleaned_test_functions.jsonl/133205 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 539
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3180,
8378,
17,
666,
15,
15,
368,
341,
286,
1077,
308,
284,
220,
17,
15,
62,
15,
15,
15,
280,
286,
1077,
10320,
284,
220,
16,
16,
17,
280,
286,
1077,
5206,
2629,
284,
220,
15,
280,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_constructor() {
let v = Vec4::new(5.0, 3.0, 1.0, 2.0);
assert_eq!(v.x, 5.0);
assert_eq!(v.y, 3.0);
assert_eq!(v.z, 1.0);
assert_eq!(v.w, 2.0);
} | rust_cleaned_test_functions.jsonl/29322 | {
"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,
66210,
368,
341,
310,
1077,
348,
284,
11312,
19,
486,
931,
7,
20,
13,
15,
11,
220,
18,
13,
15,
11,
220,
16,
13,
15,
11,
220,
17,
13,
15,
317,
310,
2060,
10714,
10297,
85,
1993,
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_derive_key() {
let key = &[99; baokeshed::KEY_LEN];
let expected = baokeshed::derive_key_xof(key, b"context")
.to_hash()
.to_hex();
let output = cmd!(baokeshed_exe(), "--derive-key", hex::encode(key))
.stdin_bytes("context")
.read()
.unwrap();
... | rust_cleaned_test_functions.jsonl/40681 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 178
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
3097,
368,
341,
262,
1077,
1376,
284,
44590,
24,
24,
26,
12789,
562,
4288,
291,
486,
4784,
15536,
935,
262,
1077,
3601,
284,
12789,
562,
4288,
291,
486,
27098,
3097,
3212,
1055,
4857... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_args_maxn() {
let mut args = Args::new();
assert_eq!(6, args.maxn());
args.set_maxn(10);
assert_eq!(10, args.maxn());
} | rust_cleaned_test_functions.jsonl/118623 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8384,
6345,
77,
368,
341,
286,
1077,
5206,
2827,
284,
17693,
486,
931,
543,
286,
2060,
10714,
10297,
21,
11,
2827,
6678,
77,
5231,
286,
2827,
980,
6345,
77,
7,
16,
15,
317,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_parse_rustc_z_ls() {
let output = "=External Dependencies=
1 lucet_runtime
2 lucet_runtime_internals-1ff6232b6940e924
3 lucet_runtime_macros-c18e1952b835769e
";
let res = parse_rustc_z_ls(&output);
assert!(res.is_ok());
let res = res.unwrap();
assert_eq!... | rust_cleaned_test_functions.jsonl/8171 | {
"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,
21039,
1710,
590,
66,
6415,
53174,
368,
341,
286,
1077,
2550,
284,
37827,
25913,
80490,
14750,
16,
25927,
295,
33232,
198,
17,
25927,
295,
33232,
4042,
89320,
12,
16,
542,
21,
17,
18,
17,
65,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_single_wildcard_topic() {
assert!(topic!("+").matches(&Topic::from(vec![Level::SingleWildcard])));
assert!(topic!("+/tennis/#").matches(&Topic::from(vec![
Level::SingleWildcard,
Level::normal("tennis"),
Level::MultiWildcard
])));
... | rust_cleaned_test_functions.jsonl/77011 | {
"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,
19487,
1670,
695,
4951,
31414,
368,
341,
286,
2060,
10297,
16411,
17223,
10,
1827,
19914,
2099,
26406,
486,
1499,
25592,
20703,
4449,
486,
10888,
92988,
9365,
626,
286,
2060,
10297,
16411,
17223,
40... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cache_enforces_maximum_size() {
let keys: Vec<TestKey> =
(0..CACHE_SIZE).map(|key_num| build_test_key(&key_num.to_string(), "")).collect();
// Verify cache after forcing eviction queue flush by replacing every key.
let mut token_cache = TokenCache::new(CACHE_... | rust_cleaned_test_functions.jsonl/88815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 626
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11529,
6205,
48796,
93581,
2368,
368,
341,
286,
1077,
6894,
25,
11312,
71273,
1592,
29,
4035,
310,
320,
15,
496,
61736,
4098,
568,
2186,
22428,
792,
4273,
91,
1936,
4452,
3097,
2099,
792,
4273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_router_detect3() {
let router = Router::new().push(
Router::new().path("users").push(
Router::new()
.path(r"<id:/\d+/>")
.push(Router::new().push(Router::new().path("facebook/insights/<**rest>").handle(fake_handler))),
... | rust_cleaned_test_functions.jsonl/103072 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 588
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
55587,
56457,
18,
368,
341,
286,
1077,
9273,
284,
10554,
486,
931,
1005,
9077,
1006,
310,
10554,
486,
931,
1005,
2343,
445,
4218,
1827,
9077,
1006,
394,
10554,
486,
931,
741,
503,
659,
2343,
260... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_var_part_of_expr_stmt() {
check_assist(
extract_variable,
r"
fn foo() {
$01$0 + 1;
}",
r"
fn foo() {
let $0var_name = 1;
var_name + 1;
}",
);
} | rust_cleaned_test_functions.jsonl/133778 | {
"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,
39123,
4612,
10495,
3575,
21915,
21824,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
14635,
345,
310,
435,
698,
8822,
15229,
368,
341,
262,
400,
15,
16,
3,
15,
488,
220,
16,
280,
24375,
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_unsupported_operator() {
let op = datafusion::logical_plan::Operator::Like;
let res: Result<Op, _> = op.try_into();
assert_contains!(res.unwrap_err().to_string(), "unsupported operator:");
} | rust_cleaned_test_functions.jsonl/3685 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 105
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
18216,
40594,
368,
341,
286,
1077,
1179,
284,
821,
54565,
486,
30256,
26564,
486,
18461,
486,
12949,
280,
286,
1077,
592,
25,
5714,
27,
7125,
11,
716,
29,
284,
1179,
48779,
45514,
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 |
#[test]
fn test_stop_button() {
let elevator = ELEVATOR.lock().unwrap();
elevator.set_stop_button_light(true);
thread::sleep(Duration::new(0, 200000000));
elevator.set_stop_button_light(false);
thread::sleep(Duration::new(0, 200000000));
elevator.set_stop_button_... | rust_cleaned_test_functions.jsonl/42311 | {
"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,
19039,
8487,
368,
341,
286,
1077,
38636,
284,
468,
85411,
11857,
21003,
1005,
15454,
1428,
286,
38636,
980,
19039,
8487,
28663,
3715,
317,
286,
4516,
486,
25809,
64114,
486,
931,
7,
15,
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... | 2 |
#[test]
fn test_that_rust_code_compiles() {
let registry = get_diem_registry();
let abis = get_stdlib_script_abis();
let dir = tempdir().unwrap();
let installer = serdegen::rust::Installer::new(dir.path().to_path_buf());
let config = serdegen::CodeGeneratorConfig::new("diem-types".to_string... | rust_cleaned_test_functions.jsonl/3890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 874
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70197,
1710,
590,
4136,
18177,
3658,
368,
341,
262,
1077,
19424,
284,
633,
814,
26862,
50650,
543,
262,
1077,
668,
285,
284,
633,
15656,
2740,
14660,
62,
15367,
543,
262,
1077,
5419,
284,
2730,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_macos_tap_datalink_addr() {
let bytes = [20i8, 18, 7, 0, 6, 3, 6, 0, 101, 110, 48, 24, 101, -112, -35, 76, -80];
let ptr = bytes.as_ptr();
let sa = ptr as *const libc::sockaddr;
let _sock_addr = unsafe { SockAddr::from_raw_sockaddr(sa) };
assert!(_sock_ad... | rust_cleaned_test_functions.jsonl/92896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 343
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22802,
436,
528,
391,
814,
4212,
766,
7387,
368,
341,
286,
1077,
5820,
284,
508,
17,
15,
72,
23,
11,
220,
16,
23,
11,
220,
22,
11,
220,
15,
11,
220,
21,
11,
220,
18,
11,
220,
21,
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... | 2 |
#[test]
fn test_can_create_paginator_for_taxonomy() {
let (_, library) = create_library(false);
let taxonomy_def = TaxonomyConfig {
name: "tags".to_string(),
paginate_by: Some(2),
..TaxonomyConfig::default()
};
let taxonomy_item = TaxonomyItem ... | rust_cleaned_test_functions.jsonl/107068 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 607
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
8657,
620,
33128,
5478,
75794,
368,
341,
286,
1077,
39464,
6733,
8,
284,
1855,
39461,
3576,
317,
286,
1077,
71806,
7844,
284,
15190,
16974,
2648,
341,
310,
829,
25,
330,
14082,
3263,
983,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hash_streaming_chunks() {
let data: [u8; 10] = [1, 2, 3, 4, 5, 6, 7, 8, 9, 0];
let h1 = hash(&data);
let state = HashStream::new();
let h2 = state.update(&data[..5]).update(&data[5..]).hash();
assert_eq!(h1, h2);
} | rust_cleaned_test_functions.jsonl/5656 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
12673,
287,
65470,
368,
341,
286,
1077,
821,
25,
508,
84,
23,
26,
220,
16,
15,
60,
284,
508,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
11,
220,
21,
11,
220,
22,
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_jira_pull_request_opened_too_many_commits() {
let mut test = new_test_with_jira();
test.handler.event = "pull_request".into();
test.handler.action = "opened".into();
test.handler.data.pull_request = some_pr();
test.handler.data.sender = User::new("the-pr-owner");
test.gi... | rust_cleaned_test_functions.jsonl/89660 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 644
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5374,
8832,
65693,
7893,
11311,
291,
2346,
78,
22101,
25149,
1199,
368,
341,
262,
1077,
5206,
1273,
284,
501,
4452,
6615,
5374,
8832,
543,
262,
1273,
31171,
5773,
284,
330,
23441,
7893,
3263,
1812... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_compact_to_u256() {
assert_eq!(Compact::new(0x01003456).to_u256(), Ok(0.into()));
assert_eq!(Compact::new(0x01123456).to_u256(), Ok(0x12.into()));
assert_eq!(Compact::new(0x02008000).to_u256(), Ok(0x80.into()));
assert_eq!(Compact::new(0x05009234).to_u256(), Ok(0x... | rust_cleaned_test_functions.jsonl/89984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18177,
531,
2346,
7300,
17,
20,
21,
368,
341,
286,
2060,
10714,
10297,
98335,
486,
931,
7,
15,
87,
15,
16,
15,
15,
18,
19,
20,
21,
568,
983,
7300,
17,
20,
21,
1507,
7622,
7,
15,
39860,
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_program_bpf_c_noop() {
solana_logger::setup();
let mut file = File::open(create_bpf_path("noop")).expect("file open failed");
let mut elf = Vec::new();
file.read_to_end(&mut elf).unwrap();
let (genesis_block, alice_keypair) = create_g... | rust_cleaned_test_functions.jsonl/41459 | {
"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,
25096,
880,
15897,
666,
6536,
453,
368,
341,
310,
2048,
3362,
27413,
486,
15188,
1428,
310,
1077,
5206,
1034,
284,
2887,
486,
2508,
32602,
880,
15897,
2638,
445,
40162,
15197,
17119,
445,
1192,
17... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_command_id() {
let mut p = bluetherm::Packet::new();
p.set_command_id(bluetherm::message_type::RETRIEVE_INFO);
assert_eq!(bluetherm::message_type::RETRIEVE_INFO, p.get_command_id());
} | rust_cleaned_test_functions.jsonl/124759 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10811,
842,
368,
341,
262,
1077,
5206,
281,
284,
1501,
84,
2723,
76,
486,
16679,
486,
931,
543,
262,
281,
980,
10811,
842,
1883,
9835,
2723,
76,
486,
1994,
1819,
486,
787,
2378,
5371,
4491,
90... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timestamp() {
let mut m = TestFmtJsonWellKnownTypes::new();
let mut t = Timestamp::new();
t.seconds = 1;
t.nanos = 1;
m.set_timestamp(t);
test_json_print_parse_message("{\"timestamp\": \"1970-01-01T00:00:01.000000001Z\"}", &m);
} | rust_cleaned_test_functions.jsonl/49806 | {
"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,
23073,
368,
341,
262,
1077,
5206,
296,
284,
3393,
93322,
5014,
11395,
48206,
4173,
486,
931,
543,
262,
1077,
5206,
259,
284,
32758,
486,
931,
543,
262,
259,
56343,
284,
220,
16,
280,
262,
259,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rev_iterator() {
let s = "ศไทย中华Việt Nam";
let v = ['m', 'a', 'N', ' ', 't', 'ệ','i','V','华','中','ย','ท','ไ','ศ'];
let mut pos = 0;
let it = s.chars().rev();
for c in it {
assert_eq!(c, v[pos]);
pos += 1;
}
assert_eq!(pos, v.len());
} | rust_cleaned_test_functions.jsonl/11124 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38082,
13491,
368,
341,
262,
1077,
274,
284,
330,
123863,
125451,
100849,
35544,
124382,
29974,
876,
262,
1077,
348,
284,
2509,
76,
516,
364,
64,
516,
364,
45,
516,
364,
6614,
364,
83,
516,
364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_parse_uih_frame_with_mux_command() {
let role = Role::Responder;
let frame_type = FrameTypeMarker::UnnumberedInfoHeaderCheck;
let mut buf = vec![
0b00000011,
0b11111111, // Control Field - UIH command with P/F = 1.
0b00000111, // Lengt... | rust_cleaned_test_functions.jsonl/87869 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 669
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
22412,
71,
8929,
6615,
80363,
10811,
368,
341,
286,
1077,
3476,
284,
15404,
486,
30884,
280,
286,
1077,
4034,
1819,
284,
16321,
929,
20613,
486,
1806,
4082,
291,
1731,
4047,
3973,
280,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec3a_accessors() {
let mut a = Vec3A::zero();
a.set_x(1.0);
a.set_y(2.0);
a.set_z(3.0);
assert_eq!(1.0, a.x());
assert_eq!(2.0, a.y());
assert_eq!(3.0, a.z());
assert_eq!((1.0, 2.0, 3.0), a.into());
let mut a = Vec3A::zero();
*a.x_mut() = 1.0;
*a.y_m... | rust_cleaned_test_functions.jsonl/23482 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 423
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13251,
18,
64,
12759,
1087,
368,
341,
262,
1077,
5206,
264,
284,
11312,
18,
32,
486,
14154,
543,
262,
264,
980,
3212,
7,
16,
13,
15,
317,
262,
264,
980,
4178,
7,
17,
13,
15,
317,
262,
264,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_indices() {
dotenv().ok();
let api_key = env::var("AIRLY_API_KEY").expect("AIRLY_API_KEY must be set");
if api_key.len() == 0 {
panic!(API_KEY_INFO);
} else {
if let Ok(client) = super::AirlyClient::new(api_key) {
if let... | rust_cleaned_test_functions.jsonl/15666 | {
"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,
3062,
18333,
368,
341,
286,
91286,
1005,
562,
543,
286,
1077,
6330,
3097,
284,
6105,
486,
947,
445,
57161,
8932,
11415,
6600,
1827,
17119,
445,
57161,
8932,
11415,
6600,
1969,
387,
738,
797,
286,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_missing_colums_to_null() {
let schema = SchemaBuilder::new()
.tag("tag")
.field("str", DataType::Utf8)
.field("int", DataType::Int64)
.field("uint", DataType::UInt64)
.field("float", DataType::Float64)
.field("bool",... | rust_cleaned_test_functions.jsonl/74836 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1459
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
666,
1132,
82,
2346,
15162,
368,
341,
286,
1077,
10802,
284,
12539,
3297,
486,
931,
741,
310,
659,
4578,
445,
4578,
1138,
310,
659,
2566,
445,
495,
497,
33172,
486,
38980,
23,
340,
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_parse_err() {
let mi = MetaItem {
name: Symbol::intern("foo"),
node: MetaItemKind::NameValue(dummy_spanned(LitKind::Bool(false))),
span: DUMMY_SP,
};
assert!(Cfg::parse(&mi).is_err());
let mi = MetaItem {
name: Symb... | rust_cleaned_test_functions.jsonl/57876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1957
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
9266,
368,
341,
286,
1077,
9497,
284,
15819,
1234,
341,
310,
829,
25,
19612,
486,
55444,
445,
7975,
4461,
310,
2436,
25,
15819,
1234,
10629,
486,
675,
1130,
83671,
37382,
18694,
4957,
275,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_aps_no_ifaces() {
let mut exec = fuchsia_async::Executor::new().expect("failed to create an executor");
let mut test_values = test_setup(&mut exec);
// Create an empty PhyManager and IfaceManager.
let phy_manager = phy_manager::PhyManager::new(
... | rust_cleaned_test_functions.jsonl/71946 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 491
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19039,
5705,
62,
2625,
6536,
11119,
2434,
368,
341,
286,
1077,
5206,
3883,
284,
282,
73391,
28346,
486,
25255,
486,
931,
1005,
17119,
445,
16091,
311,
1855,
458,
31558,
797,
286,
1077,
5206,
1273,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_try_merge_assets_collision() -> Result<(), Error> {
let assets = vec![
Asset {
file_name: "FamilyA.ttf".to_string(),
typefaces: btreemap![
TypefaceInAssetIndex(0) => Typeface {
index: 0,
... | rust_cleaned_test_functions.jsonl/35631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
20888,
53299,
70375,
368,
1464,
5714,
68843,
4600,
29,
341,
286,
1077,
11770,
284,
7486,
90515,
310,
22605,
341,
394,
1034,
1269,
25,
330,
15192,
32,
45192,
3263,
983,
3904,
3148,
394,
943,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seal_lifecycle_4kib_sub_8_2() -> Result<()> {
seal_lifecycle::<SectorShape4KiB>(SECTOR_SIZE_4_KIB, &ARBITRARY_POREP_ID)
} | rust_cleaned_test_functions.jsonl/4365 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
278,
907,
19517,
62,
19,
74,
579,
5228,
62,
23,
62,
17,
368,
1464,
5714,
71698,
341,
262,
25349,
907,
19517,
27638,
68188,
12301,
19,
72572,
33,
2235,
925,
26275,
4098,
62,
19,
10102,
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 |
#[test]
fn test_lists_in_struct() {
let field_a = Field::new("A", DataType::Utf8, false);
let field_primitive_list = Field::new(
"primitive_list",
DataType::List(Box::new(Field::new("item", DataType::Int32, true))),
false,
);
// Define primiti... | rust_cleaned_test_functions.jsonl/48128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3824
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37288,
1243,
15126,
368,
341,
286,
1077,
2070,
4306,
284,
8601,
486,
931,
445,
32,
497,
33172,
486,
38980,
23,
11,
895,
317,
286,
1077,
2070,
84087,
2019,
284,
8601,
486,
931,
1006,
310,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_from_slice() {
let mut v: SmallVec<[u8; 8]> = SmallVec::new();
for x in 0..4 {
v.push(x);
}
assert_eq!(v.len(), 4);
v.insert_from_slice(1, &[5, 6]);
assert_eq!(
&v.iter().map(|v| *v).collect::<Vec<_>>(),
&... | rust_cleaned_test_functions.jsonl/88153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
5673,
26488,
368,
341,
286,
1077,
5206,
348,
25,
14994,
10050,
66746,
84,
23,
26,
220,
23,
25669,
284,
14994,
10050,
486,
931,
543,
286,
369,
856,
304,
220,
15,
496,
19,
341,
310,
348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_intersects() {
let bm = Bitmask::Flag4;
assert_eq!(bm.intersects(Bitmask::Flag4), true);
assert_eq!(bm.intersects(Bitmask::Flag4 | Bitmask::Flag1), true);
assert_eq!(bm.intersects(Bitmask::Flag1), false);
} | rust_cleaned_test_functions.jsonl/52485 | {
"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,
15318,
54429,
368,
341,
286,
1077,
34868,
284,
6495,
11258,
486,
12135,
19,
280,
286,
2060,
10714,
10297,
29307,
14139,
54429,
68653,
11258,
486,
12135,
19,
701,
830,
317,
286,
2060,
10714,
10297,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_with_init() {
let dir = tempfile::tempdir().unwrap();
let status = command(&dir).arg("init").status().unwrap();
assert!(status.success());
assert!(dir.path().join(".protovend.yml").exists());
let status = command(&dir)
.arg("add")
.arg("https://github.c... | rust_cleaned_test_functions.jsonl/79895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 488
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
6615,
6137,
368,
341,
262,
1077,
5419,
284,
54819,
486,
3888,
3741,
1005,
15454,
543,
262,
1077,
2639,
284,
3210,
2099,
3741,
568,
858,
445,
2327,
1827,
2829,
1005,
15454,
1428,
262,
2060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pop() {
let mut s = InlinableString::from("foo");
assert_eq!(StringExt::pop(&mut s), Some('o'));
assert_eq!(StringExt::pop(&mut s), Some('o'));
assert_eq!(StringExt::pop(&mut s), Some('f'));
assert_eq!(StringExt::pop(&mut s), None);
} | rust_cleaned_test_functions.jsonl/109722 | {
"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,
17061,
368,
341,
286,
1077,
5206,
274,
284,
758,
3732,
480,
703,
486,
1499,
445,
7975,
797,
286,
2060,
10714,
10297,
703,
6756,
486,
8374,
2099,
6984,
274,
701,
4329,
492,
78,
6336,
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_table_approximate_offset() {
let (src, size) = build_table(build_data());
let mut opt = options::for_test();
opt.block_size = 32;
let table = Table::new_raw(opt, wrap_buffer(src), size).unwrap();
let mut iter = table.iter();
let expected_offsets =... | rust_cleaned_test_functions.jsonl/43237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5237,
90425,
3426,
6917,
368,
341,
286,
1077,
320,
3548,
11,
1379,
8,
284,
1936,
5237,
43333,
1769,
1423,
286,
1077,
5206,
3387,
284,
2606,
486,
1958,
4452,
543,
286,
3387,
15697,
2368,
284,
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... | 2 |
#[test]
fn test_echo_construct() {
let mut bytes = vec![0xa5; 12];
let mut packet = Packet::new_unchecked(&mut bytes);
packet.set_msg_type(Message::EchoRequest);
packet.set_msg_code(0);
packet.set_echo_ident(0x1234);
packet.set_echo_seq_no(0xabcd);
packet.... | rust_cleaned_test_functions.jsonl/70647 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68628,
64803,
368,
341,
286,
1077,
5206,
5820,
284,
7486,
20703,
15,
9591,
20,
26,
220,
16,
17,
935,
286,
1077,
5206,
10151,
284,
28889,
486,
931,
4907,
7549,
2099,
6984,
5820,
317,
286,
10151,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_uint() {
let (a, b, c, d, e) = (
Uint256::from(8 as u8),
Uint256::from(8 as u16),
Uint256::from(8 as u32),
Uint256::from(8 as u64),
Uint256::from(8 as usize),
);
assert_eq!(a, b);
assert_eq!(b, c);
... | rust_cleaned_test_functions.jsonl/47723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
15807,
368,
341,
286,
1077,
320,
64,
11,
293,
11,
272,
11,
294,
11,
384,
8,
284,
2399,
310,
27883,
17,
20,
21,
486,
1499,
7,
23,
438,
575,
23,
1326,
310,
27883,
17,
20,
21,
486,
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_construct() {
let mut bytes = vec![0xa5; 30];
let mut packet = Packet::new(&mut bytes);
packet.set_version(4);
packet.set_header_len(20);
packet.clear_flags();
packet.set_dscp(0);
packet.set_ecn(0);
packet.set_total_len(30);
... | rust_cleaned_test_functions.jsonl/82358 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 437
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
368,
341,
286,
1077,
5206,
5820,
284,
7486,
20703,
15,
9591,
20,
26,
220,
18,
15,
935,
286,
1077,
5206,
10151,
284,
28889,
486,
931,
2099,
6984,
5820,
317,
286,
10151,
980,
9438,
7,
19,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait_table_add_and_remove() {
let mut wait_table = WaitTable::new(Arc::new(AtomicUsize::new(0)));
let mut waiter_info = Vec::new();
let mut rng = rand::thread_rng();
for _ in 0..20 {
let waiter_ts = rng.gen::<u64>().into();
let lock = Lock ... | rust_cleaned_test_functions.jsonl/32486 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 744
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
5237,
2891,
8378,
18193,
368,
341,
286,
1077,
5206,
3783,
5237,
284,
13824,
2556,
486,
931,
4346,
1287,
486,
931,
7,
65857,
52,
2141,
486,
931,
7,
15,
4945,
286,
1077,
5206,
67169,
3109,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_sort_attribute() {
let v = to_value(vec![
Foo { a: 3, b: 5 },
Foo { a: 2, b: 8 },
Foo { a: 4, b: 7 },
Foo { a: 1, b: 6 },
])
.unwrap();
let mut args = HashMap::new();
args.insert("attribute".to_string(), to_v... | rust_cleaned_test_functions.jsonl/62051 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 422
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18435,
16791,
368,
341,
286,
1077,
348,
284,
311,
3142,
25592,
90515,
310,
33428,
314,
264,
25,
220,
18,
11,
293,
25,
220,
20,
1153,
310,
33428,
314,
264,
25,
220,
17,
11,
293,
25,
220,
23,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_from_angle_x_inverse_rotate_point1() {
let rotation = Rotation3::from_angle_x(Degrees(90_f64));
let point = Point3::new(0_f64, 0_f64, 1_f64);
let expected = Point3::new(0_f64, 1_f64, 0_f64);
let result = rotation.inverse_rotate_point(&point);
assert!(... | rust_cleaned_test_functions.jsonl/70502 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
21727,
3212,
63333,
60834,
6085,
16,
368,
341,
286,
1077,
12695,
284,
47528,
18,
486,
1499,
21727,
3212,
5432,
791,
7858,
7,
24,
15,
761,
21,
19,
1106,
286,
1077,
1459,
284,
5126,
18,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ready_all() {
let readable = Ready::readable().as_usize();
let writable = Ready::writable().as_usize();
assert_eq!(
READY_ALL | readable | writable,
ERROR + HUP + AIO + LIO + PRI + readable + writable
);
// Issue #896.
#[cfg(any(target_os = "linux", targ... | rust_cleaned_test_functions.jsonl/26260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 179
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35456,
5705,
368,
341,
262,
1077,
33798,
284,
30982,
486,
878,
480,
1005,
300,
11306,
551,
543,
262,
1077,
45905,
284,
30982,
486,
86,
22533,
1005,
300,
11306,
551,
1428,
262,
2060,
10714,
33673,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_inbound_outbound_capacity_is_not_zero() {
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
let _ = create_announce... | rust_cleaned_test_functions.jsonl/16876 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 400
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
10891,
6068,
10891,
35603,
6892,
7913,
19359,
368,
341,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
10217,
2436,
18343,
82,
284,
1855,
5084,
18343,
82,
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_assert() {
let mut reader = Reader::init("header \"Location\" equals \"https://google.fr\"");
let assert0 = assert(&mut reader).unwrap();
assert_eq!(
assert0.query,
Query {
source_info: SourceInfo::init(1, 1, 1, 18),
... | rust_cleaned_test_functions.jsonl/17075 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 599
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16553,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
2327,
445,
2708,
7245,
4707,
2105,
16819,
7245,
2428,
1110,
17485,
18798,
88385,
286,
1077,
2060,
15,
284,
2060,
2099,
6984,
6604,
568,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_rust_reference_autodiscover() {
let hdr = indoc! {"
#include <cstdint>
struct RustType;
inline uint32_t take_rust_reference(const RustType&) {
return 4;
}
"};
let rs = quote! {
let foo = RustType(3);
let result = ffi::take_rust_reference(&foo)... | rust_cleaned_test_functions.jsonl/9932 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 329
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1710,
590,
25433,
32808,
347,
285,
3688,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
96975,
1339,
262,
2036,
33789,
929,
280,
262,
7381,
2622,
18,
17,
528,
189... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_aggregator() {
env_logger::init();
let (runtime, entry_handle) = oak_tests::run_single_module_default(MODULE_CONFIG_NAME)
.expect("Unable to configure runtime with test wasm!");
for i in 0..SAMPLE_THRESHOLD as u32 {
assert_matches!(
submit_sample(
... | rust_cleaned_test_functions.jsonl/36606 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 454
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20587,
58131,
368,
341,
262,
6105,
27413,
486,
2327,
1428,
262,
1077,
320,
22255,
11,
4343,
10630,
8,
284,
37871,
32509,
486,
6108,
19487,
10750,
9993,
3189,
9648,
12568,
4708,
340,
286,
659,
1711... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_is_valid_timestr() {
let valid_strs = vec!["01:01:00", "12:12:59", "23:59:28", "23:59:40"];
let invalid_strs = vec!["22:80:00", "21:21:80", "111:12:12", "10:10", "09:09", "09"];
for str in &valid_strs {
assert_eq!(is_valid_timestr(str), true);
}
... | rust_cleaned_test_functions.jsonl/10679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 235
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
8337,
528,
4255,
81,
368,
341,
286,
1077,
2697,
2895,
82,
284,
7486,
0,
1183,
15,
16,
25,
15,
16,
25,
15,
15,
497,
330,
16,
17,
25,
16,
17,
25,
20,
24,
497,
330,
17,
18,
25,
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... | 3 |
#[test]
fn test_iterator_on_found() {
assert_eq!(
Found::new(
b"You can use iterator".to_vec(),
vec![Match::new(0, 3), Match::new(4, 7)]
)
.into_iter()
.collect::<Vec<Vec<u8>>>(),
vec![b"You".to_vec(), b"can".to_... | rust_cleaned_test_functions.jsonl/98622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
4470,
21480,
368,
341,
286,
2060,
10714,
33673,
310,
12315,
486,
931,
1006,
394,
293,
21608,
646,
990,
15091,
3263,
983,
13251,
3148,
394,
7486,
20703,
8331,
486,
931,
7,
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 |
#[test]
fn test_nested_rule() -> TestResult {
let p = polar();
p.load_str(
r#"f(x) if g(x);
g(x) if h(x);
h(2);
g(x) if j(x);
j(4);"#,
)?;
qeval(&p, "f(2)");
qnull(&p, "f(3)");
qeval(&p, "f(4)");
qeval(&p, "j(4)");
Ok(())
} | rust_cleaned_test_functions.jsonl/68092 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 211
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
66279,
21124,
368,
1464,
3393,
2077,
341,
262,
1077,
281,
284,
24660,
543,
262,
281,
5104,
2895,
1006,
286,
435,
55543,
69,
2075,
8,
421,
342,
2075,
317,
1843,
342,
2075,
8,
421,
305,
2075,
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... | 2 |
#[test]
fn test_upconvert_kerning_unknown_prefixes() {
let groups: Groups = btreemap! {
"BGroup".into() => vec!["B".into()],
"CGroup".into() => vec!["C".into()],
"DGroup".into() => vec!["D".into()],
};
let kerning: Kerning = btreemap! {
"A"... | rust_cleaned_test_functions.jsonl/65553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1591
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8237,
14166,
4698,
932,
287,
57507,
13974,
288,
368,
341,
286,
1077,
5203,
25,
34580,
284,
293,
10157,
42040,
0,
341,
310,
330,
33,
2808,
3263,
18122,
368,
589,
7486,
0,
1183,
33,
3263,
18122,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_hex_serialize() {
assert_eq!("\"0x0\"", serde_json::to_string(&Hex(0)).unwrap());
assert_eq!("\"0x2a\"", serde_json::to_string(&Hex(42)).unwrap());
} | rust_cleaned_test_functions.jsonl/53234 | {
"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,
32655,
88686,
368,
341,
286,
2060,
10714,
17223,
2105,
15,
87,
15,
55853,
61570,
9455,
486,
983,
3904,
2099,
20335,
7,
15,
4579,
15454,
1423,
286,
2060,
10714,
17223,
2105,
15,
87,
17,
64,
55853... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_update_mnt_borrow_index() {
// TODO: check later
ExtBuilder::default()
.enable_minting_for_all_pools(10 * DOLLARS)
.pool_total_borrowed(DOT, 15_000 * DOLLARS)
.pool_total_borrowed(ETH, 30_000 * DOLLARS)
.pool_total_borrowed(KSM, 45_000 * DOLLARS)
.pool_total_borrowed(BTC, 60_000 * DO... | rust_cleaned_test_functions.jsonl/115703 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 493
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
717,
406,
880,
7768,
3560,
368,
341,
197,
322,
5343,
25,
1779,
2937,
198,
76605,
3297,
486,
2258,
741,
197,
197,
28697,
717,
396,
287,
5478,
5705,
620,
6178,
7,
16,
15,
353,
422,
21535,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_sbc_imm_w() {
assert_eq!(
decode_32(0xf1670700),
Instruction::SBC_imm {
params: Reg2ImmParams {
rd: Reg::R7,
rn: Reg::R7,
setflags: SetFlags::False,
imm32: 0
}
}
);... | rust_cleaned_test_functions.jsonl/64853 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 213
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
643,
8904,
71370,
1670,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
5848,
16,
21,
22,
15,
22,
15,
15,
1326,
286,
29051,
486,
50,
4897,
71370,
341,
310,
362... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_refracted_color_opaque() {
let mut world = World::default();
let ds = get_default_spheres();
world.objects = vec![Box::new(ds[0].clone()), Box::new(ds[1].clone())];
let shape = Box::new(ds[0].clone());
let ray = Ray {
origin: Tuple::point(0.0,... | rust_cleaned_test_functions.jsonl/45911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 300
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7793,
81,
22167,
6714,
10287,
19659,
368,
341,
286,
1077,
5206,
1879,
284,
4337,
486,
2258,
543,
286,
1077,
11472,
284,
633,
9993,
643,
64633,
543,
286,
1879,
8383,
284,
7486,
20703,
1611,
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... | 2 |
#[test]
fn test_serialize_info_pv() {
let attributes: Vec<UciInfoAttribute> = vec![
UciInfoAttribute::Depth(2),
UciInfoAttribute::from_centipawns(214),
UciInfoAttribute::Time(Duration::milliseconds(1242)),
UciInfoAttribute::Nodes(2124),
UciInfo... | rust_cleaned_test_functions.jsonl/19057 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 611
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
3109,
91139,
368,
341,
286,
1077,
8201,
25,
11312,
36397,
5855,
1731,
3907,
29,
284,
7486,
90515,
310,
547,
5855,
1731,
3907,
486,
19776,
7,
17,
1326,
310,
547,
5855,
1731,
3907,
486,
149... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_zero_reader() {
let mut s = ZeroReader;
let mut buf = vec![1, 2, 3];
assert_eq!(s.read(buf.as_mut_slice()), Ok(3));
assert_eq!(vec![0, 0, 0], buf);
} | rust_cleaned_test_functions.jsonl/3608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 114
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
19359,
22306,
368,
341,
286,
1077,
5206,
274,
284,
18306,
5062,
280,
286,
1077,
5206,
6607,
284,
7486,
20703,
16,
11,
220,
17,
11,
220,
18,
935,
286,
2060,
10714,
10297,
82,
4125,
10731,
5357,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_magnitude1() {
let v = Tuple::vector(1.0, 2.0, 3.0);
assert_eq!(v.magnitude(), 14f32.sqrt());
} | rust_cleaned_test_functions.jsonl/113520 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 79
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
34715,
16,
368,
341,
286,
1077,
348,
284,
24622,
486,
3215,
7,
16,
13,
15,
11,
220,
17,
13,
15,
11,
220,
18,
13,
15,
317,
286,
2060,
10714,
10297,
85,
82791,
1507,
220,
16,
19,
69,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_hash_single_column_circuit() {
let rng = &mut XorShiftRng::from_seed(crate::TEST_SEED);
for _ in 0..1 {
let mut cs = TestConstraintSystem::<Bls12>::new();
let vals = vec![Fr::random(rng); 11];
let vals_opt = vals
.iter()
... | rust_cleaned_test_functions.jsonl/125734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 601
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8950,
19487,
8744,
666,
37268,
368,
341,
286,
1077,
28422,
284,
609,
6984,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
54907,
486,
10033,
3620,
1479,
626,
286,
369,
716,
304,
220,
15,
496,
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... | 5 |
#[test]
fn test_master_fingerprint() {
assert_eq!(
DescriptorPublicKey::from_str(
"02a489e0ea42b56148d212d325b7c67c6460483ff931c303ea311edfef667c8f35",
)
.unwrap()
.master_fingerprint()
.as_bytes(),
b"\xb0\x59\x11\x6... | rust_cleaned_test_functions.jsonl/94211 | {
"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,
24582,
761,
47918,
368,
341,
286,
2060,
10714,
33673,
310,
55692,
61822,
486,
1499,
2895,
1006,
394,
330,
15,
17,
64,
19,
23,
24,
68,
15,
12508,
19,
17,
65,
20,
21,
16,
19,
23,
67,
17,
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_repr_bytes_size_vs_constant() {
assert_eq!(<X25519Public as ReprBytes>::Size::USIZE, X25519_LEN);
} | rust_cleaned_test_functions.jsonl/120795 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 68
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68535,
12524,
2368,
42434,
34967,
368,
341,
286,
2060,
10714,
10297,
27,
55,
17,
20,
20,
16,
24,
12676,
438,
1032,
649,
7078,
6831,
1695,
486,
2034,
3282,
11,
1599,
17,
20,
20,
16,
24,
15536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_match() {
do_check(
r"
fn quux() {
match () {
Some(x) => {
<|>
}
};
}",
&["x"],
);
} | rust_cleaned_test_functions.jsonl/12175 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 214
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10708,
368,
341,
286,
653,
7200,
1006,
310,
435,
698,
310,
5168,
922,
2200,
368,
341,
394,
2432,
1719,
341,
503,
4329,
2075,
8,
589,
341,
664,
82639,
397,
503,
456,
394,
2605,
310,
335,
756,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_move() {
let old = Path::new("old.txt");
let new = Path::new("new.txt");
let mut mock = MockFileBackend::new();
mock.expect_move()
.with(eq(old), eq(new))
.times(1)
.returning(|x, y| Ok(()));
let fs = FileSystem {
... | rust_cleaned_test_functions.jsonl/100443 | {
"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,
17134,
368,
341,
286,
1077,
2310,
284,
7933,
486,
931,
445,
813,
3909,
797,
286,
1077,
501,
284,
7933,
486,
931,
445,
931,
3909,
797,
286,
1077,
5206,
7860,
284,
14563,
1703,
29699,
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_color_only_output_is_in_one_to_one_correspondence_with_input() {
let user_suppliable_configs: &[&[&str]] = &[
&["--color-only", "--light"],
&["--color-only", "--dark"],
&["--color-only", "--line-numbers"],
&["--color-only", "--side-by-side"... | rust_cleaned_test_functions.jsonl/70082 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2194
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6714,
18410,
7645,
6892,
1243,
11667,
2346,
11667,
14734,
6818,
763,
6615,
5898,
368,
341,
286,
1077,
1196,
23723,
500,
2156,
59150,
25,
44590,
5,
58,
5,
495,
5053,
284,
609,
9640,
310,
609,
118... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_get_parent() {
let node_1 = Node::new(String::from("a"), Some("asd"), Color::Red, None, None, None);
let node_1_rc = Rc::new(RefCell::new(node_1));
let node_2 = Node::new(
String::from("a"),
Some("a"),
Color::Red,
None,
... | rust_cleaned_test_functions.jsonl/61995 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
15960,
368,
341,
286,
1077,
2436,
62,
16,
284,
6018,
486,
931,
2242,
486,
1499,
445,
64,
3975,
4329,
445,
79102,
3975,
3478,
486,
6033,
11,
2240,
11,
2240,
11,
2240,
317,
286,
1077,
2436... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.