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_json2_ct() {
let resp = Response::build(StatusCode::OK)
.header(CONTENT_TYPE, "text/json")
.json2(&vec!["v1", "v2", "v3"]);
let ct = resp.headers().get(CONTENT_TYPE).unwrap();
assert_eq!(ct, HeaderValue::from_static("text/json"));
assert_eq... | rust_cleaned_test_functions.jsonl/18841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 191
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
17,
26134,
368,
341,
286,
1077,
9039,
284,
5949,
486,
5834,
7,
15872,
486,
3925,
340,
310,
659,
2708,
98747,
1825,
4189,
11,
330,
1318,
8931,
1138,
310,
659,
2236,
17,
2099,
4083,
0,
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... | 1 |
#[test]
fn test_lower() {
let mut level = Level::rtl();
assert_eq!(level.number(), 1);
assert!(level.lower(1).is_ok());
assert_eq!(level.number(), 0);
assert!(level.lower(1).is_err()); // underflow!
assert!(level.lower(250).is_err()); // underflow!
assert_... | rust_cleaned_test_functions.jsonl/31776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 167
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30425,
368,
341,
286,
1077,
5206,
2188,
284,
9395,
486,
48468,
543,
286,
2060,
10714,
10297,
3294,
14341,
1507,
220,
16,
317,
286,
2060,
10297,
3294,
18073,
7,
16,
568,
285,
19817,
1423,
286,
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_parse_config() {
let f = File::open("testdata/sticker.conf").unwrap();
let config = Config::from_toml_read(f).unwrap();
assert_eq!(*BASIC_LABELER_CHECK, config);
} | rust_cleaned_test_functions.jsonl/77730 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 100
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5332,
368,
341,
286,
1077,
282,
284,
2887,
486,
2508,
445,
92425,
14272,
5215,
13937,
1827,
15454,
543,
286,
1077,
2193,
284,
5532,
486,
1499,
528,
316,
75,
6443,
955,
568,
15454,
543,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_custom_ops_invert() {
let ops = vec![
Operator {
repr: "invert",
bin_op: None,
unary_op: Some(|a: f32| 1.0 / a),
},
Operator {
repr: "sqrt",
bin_op: None,
u... | rust_cleaned_test_functions.jsonl/66723 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 323
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
21959,
1243,
1621,
368,
341,
286,
1077,
27132,
284,
7486,
90515,
310,
28498,
341,
394,
30636,
25,
330,
83729,
756,
394,
9544,
10287,
25,
2240,
345,
394,
75678,
10287,
25,
4329,
22428,
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_recv_timeout_dealyed() {
futures::executor::block_on(async move {
let (mut sender, mut receiver) = channel("data/recv-timeout-delayed").unwrap();
std::thread::spawn(move || {
futures::executor::block_on(async move {
Delay::new(... | rust_cleaned_test_functions.jsonl/95825 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 425
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36118,
20537,
2259,
5774,
291,
368,
341,
286,
36823,
486,
80787,
486,
4574,
4470,
18285,
3271,
341,
310,
1077,
320,
6984,
4646,
11,
5206,
13964,
8,
284,
5496,
445,
691,
14,
33977,
7246,
411,
451... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gaussian_viterbi_simple_example() {
let transition = array![[0.5, 0.5], [0.4, 0.6]];
let observation = vec![
Normal::new(0.0, 1.0).unwrap(),
Normal::new(2.0, 1.0).unwrap(),
];
let initial = array![0.5, 0.5];
let hmm = GaussianHMM::... | rust_cleaned_test_functions.jsonl/13088 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 489
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
46972,
2273,
2015,
8221,
30015,
39304,
368,
341,
286,
1077,
9142,
284,
1334,
0,
15505,
15,
13,
20,
11,
220,
15,
13,
20,
1125,
508,
15,
13,
19,
11,
220,
15,
13,
21,
13204,
286,
1077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insert_lines_error_cases()
{
let tmpdir = assert_memfs_setup!();
let dir = tmpdir.mash("dir");
let file = dir.mash("file");
// fail abs
assert_eq!(
file::insert_lines("", &["foo"], r"foo", 0).unwrap_err().to_string(),
PathError... | rust_cleaned_test_functions.jsonl/110967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 642
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
18323,
4096,
41427,
741,
262,
341,
286,
1077,
4174,
3741,
284,
2060,
12976,
3848,
21363,
0,
543,
286,
1077,
5419,
284,
4174,
3741,
744,
988,
445,
3741,
797,
286,
1077,
1034,
284,
5419,
74... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_store_flush_load_cached() {
let mut db = AccountsDb::new(Vec::new(), &ClusterType::Development);
db.caching_enabled = true;
let key = Pubkey::default();
let account0 = AccountSharedData::new(1, 0, &key);
let slot = 0;
db.store_cached(slot, &[(&key,... | rust_cleaned_test_functions.jsonl/1411 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 436
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14809,
39213,
12411,
64369,
368,
341,
286,
1077,
5206,
2927,
284,
40655,
7994,
486,
931,
49923,
486,
931,
1507,
609,
28678,
929,
486,
39419,
317,
286,
2927,
520,
11829,
18220,
284,
830,
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_safe_checkout_independently_modified_blob() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let target = commit! {
foo < "new content"
};
modify!(repo: "foo" < "new content");
bit_checkout!(repo: &rev!(target)).unwrap_err().try_into_checkout... | rust_cleaned_test_functions.jsonl/62963 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 177
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34067,
68186,
1243,
19510,
4402,
37749,
45908,
368,
1464,
6495,
2077,
71698,
341,
262,
6495,
25243,
486,
4197,
7260,
2861,
37784,
22428,
23476,
91,
341,
286,
1077,
2169,
284,
5266,
0,
341,
310,
15... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_intersect_line() {
//intersection
{
let a = TriPrism::init(&[0., 0., 0., 1., 0., 0., 1., 1., 0.], 1.);
let b = Line3::init(&[0.25, 0.25, 0.], &[1., 1., 0.]);
match a.get_intersect(&b) {
(true, Some(_loc)) => {}
_ => panic!("unexpected res... | rust_cleaned_test_functions.jsonl/104487 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1451
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
72747,
6528,
368,
341,
262,
442,
73648,
198,
262,
341,
286,
1077,
264,
284,
12359,
3533,
2142,
486,
2327,
2099,
58,
15,
2572,
220,
15,
2572,
220,
15,
2572,
220,
16,
2572,
220,
15,
2572,
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... | 9 |
#[test]
fn test_ed25519_pubkey_msg() {
// test-vector generated exactly as for test_empty_pubkey_msg
// but with the following modifications:
// var pubKey [32]byte
let encoded = vec![
... | rust_cleaned_test_functions.jsonl/80375 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 808
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32370,
17,
20,
20,
16,
24,
34014,
792,
6483,
368,
341,
286,
442,
1273,
65192,
7907,
6896,
438,
369,
1273,
15124,
34014,
792,
6483,
198,
286,
442,
714,
448,
279,
2701,
28782,
510,
73363,
286,
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... | 2 |
#[test]
fn test_json_read_list_of_structs() {
let schema = Schema::new(vec![Field::new(
"c1",
DataType::List(Box::new(Field::new(
"item",
DataType::Struct(vec![Field::new("a", DataType::Int64, true)]),
true,
))),
... | rust_cleaned_test_functions.jsonl/22619 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 767
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9455,
6443,
2019,
3575,
15126,
82,
368,
341,
286,
1077,
10802,
284,
12539,
486,
931,
25592,
20703,
1877,
486,
931,
1006,
310,
330,
66,
16,
756,
310,
33172,
486,
852,
67758,
486,
931,
57788,
486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vec_schemas_compare() {
let empty_vec = Vec::<i32>::new();
let non_empty_vec = vec![1];
assert_eq!(
vec_schemas_cmp(false, false, empty_vec.is_empty(), empty_vec.is_empty()).unwrap(),
Ordering::Equal
);
assert_eq!(
vec_schemas_cmp(true, false, empty_... | rust_cleaned_test_functions.jsonl/108817 | {
"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,
13251,
643,
31126,
32235,
368,
341,
262,
1077,
4287,
13251,
284,
11312,
27638,
72,
18,
17,
6831,
931,
543,
262,
1077,
2477,
15124,
13251,
284,
7486,
20703,
16,
4821,
262,
2060,
10714,
33673,
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_parse_query_to_ast_hyphen() {
test_parse_query_to_ast_helper("\"www-form-encoded\"", "\"www-form-encoded\"");
test_parse_query_to_ast_helper("www-form-encoded", "\"www-form-encoded\"");
test_parse_query_to_ast_helper("www-form-encoded", "\"www-form-encoded\"");
} | rust_cleaned_test_functions.jsonl/64404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 147
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5738,
2346,
48019,
1523,
88,
14769,
368,
341,
286,
1273,
21039,
5738,
2346,
48019,
10418,
38915,
2136,
8460,
92262,
55853,
15898,
2136,
8460,
92262,
88385,
286,
1273,
21039,
5738,
2346,
48019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fetch_module_meta_data() {
let (_temp_dir, deno_dir) = test_setup();
let cwd = std::env::current_dir().unwrap();
let cwd_string = String::from(cwd.to_str().unwrap()) + "/";
tokio_util::init(|| {
// Test failure case.
let specifier = "hello.ts";
let referrer = ... | rust_cleaned_test_functions.jsonl/83875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 309
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
10750,
13381,
1769,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
262,
1077,
46938,
284,
1460,
486,
3160,
486,
3231,
4334,
1005,
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... | 2 |
#[test]
fn test_serialize_move_type_tag() {
use TypeTag::*;
fn assert_serialize(t: TypeTag, expected: Value) {
let value = to_value(MoveType::from(t)).unwrap();
assert_json(value, expected)
}
assert_serialize(Bool, json!("bool"));
assert_serialize(... | rust_cleaned_test_functions.jsonl/66273 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 396
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
17134,
1819,
9372,
368,
341,
286,
990,
3990,
5668,
56162,
286,
5168,
2060,
88686,
1155,
25,
3990,
5668,
11,
3601,
25,
5162,
8,
341,
310,
1077,
897,
284,
311,
3142,
3189,
994,
929,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_guild_name() {
assert!(guild_name("aa"));
assert!(guild_name("a".repeat(100)));
assert!(!guild_name(""));
assert!(!guild_name("a"));
assert!(!guild_name("a".repeat(101)));
} | rust_cleaned_test_functions.jsonl/29955 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 130
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
1498,
1269,
368,
341,
286,
2060,
10297,
57877,
1269,
445,
5305,
4010,
286,
2060,
10297,
57877,
1269,
445,
64,
3263,
30624,
7,
16,
15,
15,
22525,
286,
2060,
0,
3471,
57877,
1269,
89744,
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_climax_near_the_middle() {
let constraint: Box<dyn SinglePartConstraint> = Box::new(ClimaxNearTheMiddle);
assert!(!constraint.is_active(&vec![], 10));
run_scale_free_test(&constraint, &[0, 1, 0], 3, true);
run_scale_free_test(&constraint, &[0, -1, 0], 3, false);
... | rust_cleaned_test_functions.jsonl/74363 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6794,
75109,
76340,
16068,
62580,
368,
341,
286,
1077,
21568,
25,
8261,
92846,
11327,
5800,
17890,
29,
284,
8261,
486,
931,
3025,
4659,
706,
51962,
785,
43935,
317,
286,
2060,
0,
3471,
48057,
2079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_typed() {
let len_function = len();
let mut niko_len = len_function.hide("Niko Matsakis".to_string());
assert_eq!(niko_len.call(), "Niko Matsakis".len());
// can be called twice
assert_eq!(niko_len.call(), "Niko Matsakis".len());
} | rust_cleaned_test_functions.jsonl/87494 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
528,
32501,
368,
341,
286,
1077,
2422,
9174,
284,
2422,
543,
286,
1077,
5206,
308,
23630,
6043,
284,
2422,
9174,
18242,
445,
45,
23630,
67179,
75777,
3263,
983,
3904,
5231,
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_parse_css_border_1() {
assert_eq!(
parse_css_border("5px solid red"),
Ok(StyleBorderSide {
border_width: PixelValue::px(5.0),
border_style: BorderStyle::Solid,
border_color: ColorU { r: 255, g: 0, b: 0, a: 255 },
... | rust_cleaned_test_functions.jsonl/37087 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
25924,
31940,
62,
16,
368,
341,
286,
2060,
10714,
33673,
310,
4715,
25924,
31940,
445,
20,
1767,
6437,
2518,
4461,
310,
7622,
7,
2323,
10691,
16384,
341,
394,
3886,
7927,
25,
27469,
1130,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ld_r_imm() {
let mut emu = MockEmulator::new().unwrap();
emu.cpu.pc = 0xC000;
emu.wram[0] = 0x06;
emu.wram[1] = 1;
emu.wram[2] = 0x3E;
emu.wram[3] = 255;
execute_n(&mut emu, 2);
assert_eq!(emu.cpu.b, 1);
assert_eq!(emu.c... | rust_cleaned_test_functions.jsonl/51426 | {
"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,
50573,
1710,
71370,
368,
341,
286,
1077,
5206,
976,
84,
284,
14563,
2269,
10511,
486,
931,
1005,
15454,
1428,
286,
976,
84,
42387,
53335,
284,
220,
15,
12125,
15,
15,
15,
280,
286,
976,
84,
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_group_type() {
let f1 = Type::primitive_type_builder("f1", PhysicalType::INT32)
.with_logical_type(LogicalType::INT_32)
.with_id(0)
.build();
assert!(f1.is_ok());
let f2 = Type::primitive_type_builder("f2", PhysicalType::BYTE_ARRAY)
... | rust_cleaned_test_functions.jsonl/30052 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6288,
1819,
368,
341,
286,
1077,
282,
16,
284,
3990,
486,
73448,
1819,
28532,
445,
69,
16,
497,
27379,
929,
486,
3221,
18,
17,
340,
310,
659,
4197,
86484,
1819,
33028,
938,
929,
486,
3221,
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_resize_down_gaussian() {
// 217x447px => 100x200
let img = setup_default_test_image();
let operation = ImgOp::Resize((100, 200));
let (xa, ya) = img.dimensions();
assert_eq!(xa, 217);
assert_eq!(ya, 447);
let mut operator = ImageEngine::... | rust_cleaned_test_functions.jsonl/21156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 319
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53370,
13998,
1889,
46972,
368,
341,
286,
442,
220,
17,
16,
22,
87,
19,
19,
22,
1767,
589,
220,
16,
15,
15,
87,
17,
15,
15,
198,
286,
1077,
4964,
284,
6505,
9993,
4452,
4954,
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_modified_ciphertext_err() {
let key = SecretKey::default();
let plaintext = "Secret message".as_bytes();
let mut dst_ciphertext = seal(&key, plaintext).unwrap();
// Modify ciphertext
dst_ciphertext[25] ^= 1;
assert!(open(&k... | rust_cleaned_test_functions.jsonl/104187 | {
"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,
37749,
666,
45043,
9266,
368,
341,
310,
1077,
1376,
284,
8599,
1592,
486,
2258,
543,
310,
1077,
60847,
284,
330,
19773,
1943,
3263,
300,
12524,
1428,
310,
1077,
5206,
10648,
666,
45043,
284,
25349... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_failing_sign_verify() {
let seckey_a: [u8; 32] = [169, 195, 92, 103, 2, 159, 75, 46, 158, 79, 249, 49, 208, 28, 48, 210, 5, 47, 136, 77, 21, 51, 224, 54, 213, 165, 90, 122, 233, 199, 0, 248];
let seckey = SecretKey::parse(&seckey_a).unwrap();
let pubkey = PublicKey::from_secret_key(&... | rust_cleaned_test_functions.jsonl/129815 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
14277,
11172,
35638,
368,
341,
262,
1077,
511,
377,
1195,
4306,
25,
508,
84,
23,
26,
220,
18,
17,
60,
284,
508,
16,
21,
24,
11,
220,
16,
24,
20,
11,
220,
24,
17,
11,
220,
16,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_c_try_return() {
assert_eq!((), ffi::c_try_return_void().unwrap());
assert_eq!(2020, ffi::c_try_return_primitive().unwrap());
assert_eq!(
"logic error",
ffi::c_fail_return_primitive().unwrap_err().what(),
);
assert_eq!(2020, ffi::c_try_return_box().unwrap().0)... | rust_cleaned_test_functions.jsonl/50896 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
53283,
12511,
368,
341,
262,
2060,
10714,
10297,
1507,
76956,
486,
66,
53283,
12511,
37775,
1005,
15454,
1423,
262,
2060,
10714,
10297,
17,
15,
17,
15,
11,
76956,
486,
66,
53283,
12511,
84087... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cp_one_file_system() {
use crate::common::util::AtPath;
use walkdir::WalkDir;
let scene = TestScenario::new(util_name!());
if scene.cmd("whoami").run().stdout_str() != "root\n" {
return;
}
let at = scene.fixtures.clone();
let at_src = AtPath::new(&at.p... | rust_cleaned_test_functions.jsonl/21275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 902
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39811,
11667,
2458,
17687,
368,
341,
262,
990,
17717,
486,
5464,
486,
1314,
486,
86422,
280,
262,
990,
4227,
3741,
486,
48849,
6184,
401,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_enum_fromvec() {
let v = vec![1, 3];
let span = Span::from_vec(v.clone()).unwrap();
if let Span::Discontinuous(span) = span {
for (target, test) in span.into_iter().zip(v) {
assert_eq!(target, test);
}
} else {
a... | rust_cleaned_test_functions.jsonl/4980 | {
"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,
31054,
5673,
4083,
368,
341,
286,
1077,
348,
284,
7486,
20703,
16,
11,
220,
18,
935,
286,
1077,
9390,
284,
11903,
486,
1499,
13251,
3747,
15997,
6011,
15454,
543,
286,
421,
1077,
11903,
486,
483... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_inherit_env() {
use env;
let result = env_cmd().output().unwrap();
let output = String::from_utf8(result.stdout).unwrap();
for (ref k, ref v) in env::vars() {
// Windows has hidden environment variables whose names start with
... | rust_cleaned_test_functions.jsonl/60712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 332
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
9263,
15879,
368,
341,
286,
990,
6105,
401,
286,
1077,
1102,
284,
6105,
11684,
1005,
3006,
1005,
15454,
543,
286,
1077,
2550,
284,
923,
486,
1499,
39453,
23,
4456,
24839,
568,
15454,
1428,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_blockinfo_encode() -> BaseRtResult<()> {
let mut blk: Block = Default::default();
let headers = vec![
new_block_header(b"a".to_vec(), BqlType::LowCardinalityString, false),
new_block_header(b"b".to_vec(), BqlType::UInt(64), true),
];
blk.nc... | rust_cleaned_test_functions.jsonl/23916 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7113,
2733,
11224,
368,
1464,
5351,
49,
83,
2077,
71698,
341,
286,
1077,
5206,
40643,
25,
8362,
284,
7899,
486,
2258,
543,
286,
1077,
7102,
284,
7486,
90515,
310,
501,
7113,
8757,
1883,
56693,
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_parse_section_xdp() {
let mut obj = fake_obj();
assert_matches!(
obj.parse_section(fake_section("xdp/foo", bytes_of(&fake_ins()))),
Ok(())
);
assert_matches!(
obj.programs.get("foo"),
Some(Program {
... | rust_cleaned_test_functions.jsonl/132933 | {
"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,
21039,
16221,
3212,
9796,
368,
341,
286,
1077,
5206,
2839,
284,
12418,
7328,
1428,
286,
2060,
38344,
33673,
310,
2839,
4632,
16221,
74138,
16221,
445,
9703,
79,
60555,
497,
5820,
3575,
2099,
30570,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_custom_enum_message_into_policy() {
let message = EnumMessage::Variant(1);
let policy = message.clone().into_policy();
match policy {
CachePolicy::Cacheable(value) => assert_eq!(value, message),
CachePolicy::NonCacheable(_) => assert!(false),
};
} | rust_cleaned_test_functions.jsonl/86729 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 118
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15875,
31054,
6462,
45514,
22773,
368,
341,
262,
1077,
1943,
284,
14086,
2052,
486,
20746,
7,
16,
317,
262,
1077,
4842,
284,
1943,
15997,
1005,
18122,
22773,
543,
262,
2432,
4842,
341,
286,
19479,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pos_macro() {
let a = posof!(1, 2);
let b = posof!([1, 2]);
assert_eq!(a, b);
} | rust_cleaned_test_functions.jsonl/20818 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 65
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6479,
58810,
368,
341,
262,
1077,
264,
284,
1133,
1055,
10297,
16,
11,
220,
17,
317,
262,
1077,
293,
284,
1133,
1055,
0,
2561,
16,
11,
220,
17,
2558,
262,
2060,
10714,
10297,
64,
11,
293,
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 |
#[test]
fn test_null() {
let mut list: ConcurrentList<()> = ConcurrentList::new();
assert_eq!(*list.head.get_mut(), ptr::null_mut());
assert_eq!(list.head(), None);
assert_eq!(list.head_mut(), None);
assert_eq!(list.iter().next(), None);
assert_eq!(list.iter_mut().next(), None);
asse... | rust_cleaned_test_functions.jsonl/99282 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 159
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15162,
368,
341,
262,
1077,
5206,
1140,
25,
42704,
852,
71698,
284,
42704,
852,
486,
931,
543,
262,
2060,
10714,
0,
4071,
1607,
16042,
670,
29523,
1507,
10087,
486,
2921,
29523,
1423,
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_merge_fruits_tree_1() {
let mut tree_left = get_test_tree(&[
("red".to_string(), 50, "1900".to_string(), 25),
("blue".to_string(), 30, "1900".to_string(), 30),
]);
let tree_right = get_test_tree(&[
("red".to_string(), 60, "1900".to_stri... | rust_cleaned_test_functions.jsonl/132447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 344
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
761,
67898,
11663,
62,
16,
368,
341,
286,
1077,
5206,
4916,
9579,
284,
633,
4452,
11663,
2099,
9640,
310,
3489,
1151,
3263,
983,
3904,
1507,
220,
20,
15,
11,
330,
16,
24,
15,
15,
3263,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_min_max_from_vec4() {
// checks that the 4th element is unused.
let v1 = Vec3A::from(Vec4::new(1.0, 2.0, 3.0, 4.0));
assert_eq!(v1.max_element(), 3.0);
let v2 = Vec3A::from(Vec4::new(4.0, 3.0, 2.0, 1.0));
assert_eq!(v2.min_element(), 2.0);
} | rust_cleaned_test_functions.jsonl/23408 | {
"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,
7260,
6345,
5673,
13251,
19,
368,
341,
286,
442,
12341,
429,
279,
220,
19,
339,
2392,
374,
20006,
624,
286,
1077,
348,
16,
284,
11312,
18,
32,
486,
1499,
49923,
19,
486,
931,
7,
16,
13,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_smul_bb() {
assert_eq!(
decode_32(0xfb1efe08),
Instruction::SMUL {
params: Reg3HighParams {
rd: Reg::LR,
rn: Reg::LR,
rm: Reg::R8,
n_high: false,
m_high: false
... | rust_cleaned_test_functions.jsonl/64863 | {
"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,
15227,
15874,
360,
50255,
368,
341,
1066,
262,
2060,
10714,
33673,
286,
16895,
62,
18,
17,
7,
15,
46071,
16,
44953,
15,
23,
1326,
286,
29051,
486,
9501,
1094,
341,
310,
3628,
25,
3184,
18,
119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_extract_struct_keep_comments_and_attrs_on_variant_tuple() {
check_assist(
extract_struct_from_enum_variant,
r#"
enum A {
/* comment */
// other
/// comment
#[attr]
$0One(u32, u32)
}"#,
r#"
/* comment */
// other
/// comment
#[attr]
... | rust_cleaned_test_functions.jsonl/36301 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 208
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39123,
15126,
50293,
30359,
8378,
39578,
4470,
46112,
21773,
368,
341,
286,
1779,
12083,
380,
1006,
310,
8649,
15126,
5673,
31054,
46112,
345,
310,
435,
2,
698,
9018,
362,
341,
262,
1391,
3980,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ofile_basic() {
let mut file = NamedTempFile::new().unwrap();
writeln!(file, "T").unwrap();
let p = file.path();
let ofile_pid = opath(p).unwrap().pop().unwrap();
assert_eq!(ofile_pid.0, std::process::id());
} | rust_cleaned_test_functions.jsonl/44577 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3575,
457,
34729,
368,
341,
286,
1077,
5206,
1034,
284,
40459,
12151,
1703,
486,
931,
1005,
15454,
543,
286,
80947,
10297,
1192,
11,
330,
51,
1827,
15454,
1428,
286,
1077,
281,
284,
1034,
3875,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_error_unpaired_brackets() {
let mut tree = Tree {
raw: "(2 + 3)) * 5".to_owned(),
..Default::default()
};
tree.parse_pos().unwrap();
assert_eq!(tree.parse_operators(), Err(Error::UnpairedBrackets));
} | rust_cleaned_test_functions.jsonl/28447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 142
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4096,
4907,
76167,
17682,
18382,
368,
341,
286,
1077,
5206,
4916,
284,
8942,
341,
310,
7112,
25,
11993,
17,
488,
220,
18,
593,
353,
220,
20,
3263,
983,
51973,
3148,
310,
5241,
3675,
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_bump_fee_low_abs() {
let (wallet, _, _) = get_funded_wallet(get_test_wpkh());
let addr = wallet.get_new_address().unwrap();
let (psbt, mut details) = wallet
.create_tx(
TxBuilder::with_recipients(vec![(addr.script_pubkey(), 25_000)]).enable_rbf... | rust_cleaned_test_functions.jsonl/11353 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1510,
34305,
23767,
31170,
368,
341,
286,
1077,
320,
35735,
11,
8358,
27439,
284,
633,
761,
36053,
62308,
5433,
4452,
1670,
20819,
71,
1423,
286,
1077,
10789,
284,
15085,
670,
5921,
6744,
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_disk_resolver_resolve_path() {
let test_folder = testutils::setup_test_folder("disk_resolver");
let base_path = test_folder.path().join("parts");
std::fs::create_dir(&base_path).unwrap_or_default();
// Create disk-based resolver
let resolver = DiskResolve... | rust_cleaned_test_functions.jsonl/32874 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 621
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41687,
91578,
77291,
2638,
368,
341,
286,
1077,
1273,
15268,
284,
1273,
6031,
486,
15188,
4452,
15268,
445,
30496,
91578,
797,
286,
1077,
2331,
2638,
284,
1273,
15268,
3875,
1005,
5987,
445,
18252,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unicode_encode_error() {
let gil = Python::acquire_gil();
let py = gil.python();
let take_str = wrap_pyfunction!(take_str)(py);
py_run!(
py,
take_str,
r#"
try:
take_str('\ud800')
except UnicodeEncodeError as e:
erro... | rust_cleaned_test_functions.jsonl/63664 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 236
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54662,
11224,
4096,
368,
341,
262,
1077,
342,
321,
284,
13027,
486,
580,
984,
1889,
321,
543,
262,
1077,
4510,
284,
342,
321,
43193,
1428,
262,
1077,
1896,
2895,
284,
15061,
40291,
1688,
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_conditioncode_try_from_usize() {
for value in ConditionCode::values() {
let converted = <ConditionCode as TryFrom<usize>>::try_from(value as usize).unwrap();
assert_eq!(converted, value);
}
assert!(<ConditionCode as TryFrom<usize>>::try_from(IcedConstants::CONDITION_CODE_ENUM_COUNT).is_er... | rust_cleaned_test_functions.jsonl/5967 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 156
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27656,
1851,
53283,
5673,
11306,
551,
368,
341,
2023,
897,
304,
15180,
2078,
486,
3661,
368,
341,
197,
10217,
16099,
284,
366,
10547,
2078,
438,
9735,
3830,
90244,
77595,
1539,
5673,
3679,
438,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_into_response() {
let resp: Response = "test".into();
assert_eq!(resp.status(), StatusCode::OK);
assert_eq!(
resp.headers().get(CONTENT_TYPE).unwrap(),
HeaderValue::from_static("text/plain; charset=utf-8")
);
assert_eq!(resp.status(... | rust_cleaned_test_functions.jsonl/18842 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1238
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
9655,
368,
341,
286,
1077,
9039,
25,
5949,
284,
330,
1944,
3263,
18122,
543,
286,
2060,
10714,
10297,
18243,
4299,
1507,
53403,
486,
3925,
317,
286,
2060,
10714,
33673,
310,
9039,
18022,
10... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eq_member() {
let joined_at = Timestamp::from_secs(1_632_072_645).expect("non zero");
let member = Member {
avatar: None,
deaf: false,
guild_id: GuildId::new(3).expect("non zero"),
joined_at,
mute: true,
nic... | rust_cleaned_test_functions.jsonl/115507 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 288
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
19388,
368,
341,
286,
1077,
10859,
3752,
284,
32758,
486,
1499,
68718,
7,
16,
62,
21,
18,
17,
62,
15,
22,
17,
62,
21,
19,
20,
568,
17119,
445,
6280,
7168,
3071,
286,
1077,
4462,
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_projective_scalar_multiplication() {
let g = G2Projective::generator();
let a = Scalar::from_raw([
0x2b56_8297_a56d_a71c,
0xd8c3_9ecb_0ef3_75d1,
0x435c_38da_67bf_bf96,
0x8088_a050_26b6_59b2,
]);
let b = Scalar::from_raw([
0x785f_dd9b_26ef_8... | rust_cleaned_test_functions.jsonl/47808 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16352,
533,
41652,
91802,
1693,
368,
341,
262,
1077,
342,
284,
479,
17,
7849,
533,
486,
35851,
543,
262,
1077,
264,
284,
35176,
486,
1499,
16067,
8956,
286,
220,
15,
87,
17,
65,
20,
21,
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_from_iterator() {
let logger = slog::Logger::root(slog::Discard, slog::o!());
let string_subsystem = Subsystem::new(64, &logger);
let s = Name::new("ศไทย中华Việt Nam", &string_subsystem);
let t = "ศไทย中华";
let u = "Việt Nam";
let mut a = t.to_string();
a.extend(u.chars());
assert... | rust_cleaned_test_functions.jsonl/109237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 242
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
13491,
368,
341,
197,
10217,
5925,
284,
34949,
486,
7395,
486,
2888,
1141,
839,
486,
23477,
567,
11,
34949,
486,
78,
0,
1423,
197,
10217,
914,
5228,
8948,
284,
3719,
8948,
486,
931,
7,
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_basic() {
let tmp = Builder::new().prefix("test_basic").tempdir().unwrap();
let path = tmp.path().to_str().unwrap();
let fake_engine = Arc::new(
engine_rocks::raw_util::new_engine_opt(
path,
DBOptions::new(),
vec... | rust_cleaned_test_functions.jsonl/2816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2667
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
368,
341,
286,
1077,
4174,
284,
20626,
486,
931,
1005,
11849,
445,
1944,
34729,
1827,
3888,
3741,
1005,
15454,
543,
286,
1077,
1815,
284,
4174,
3875,
1005,
983,
2895,
1005,
15454,
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... | 9 |
#[test]
fn test_decode_date() {
let buf = [0; 4];
let date: Date = Decode::<Postgres>::decode(PgValue::from_bytes(&buf)).unwrap();
assert_eq!(date, date!(2000 - 01 - 01));
let buf = 366i32.to_be_bytes();
let date: Date = Decode::<Postgres>::decode(PgValue::from_bytes(&buf)).unwrap();
as... | rust_cleaned_test_functions.jsonl/21441 | {
"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,
15227,
4164,
368,
341,
262,
1077,
6607,
284,
508,
15,
26,
220,
19,
935,
262,
1077,
2400,
25,
2631,
284,
50194,
27638,
4133,
17818,
6831,
18196,
5304,
70,
1130,
486,
1499,
12524,
2099,
5909,
4579... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_nbf() {
let key_set = KeyStore::new();
let jwk = key_set.decode(TOKEN).unwrap();
let time = SystemTime::UNIX_EPOCH + Duration::new(TIME_NBF - 1, 0);
assert!(jwk.early_time(time).unwrap());
} | rust_cleaned_test_functions.jsonl/124814 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 123
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
13233,
368,
341,
286,
1077,
1376,
2602,
284,
5309,
6093,
486,
931,
1428,
286,
1077,
502,
50522,
284,
1376,
2602,
15922,
4140,
12900,
568,
15454,
1428,
286,
1077,
882,
284,
739,
1462,
486,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_eval_ite() {
let e = Expr::list(&[
Expr::symbol("if"),
Expr::list(&[Expr::symbol("True")]),
Expr::list(&[Expr::symbol("x")]),
Expr::list(&[Expr::symbol("y")]),
]);
let mut env = Environment::default();
let result = ... | rust_cleaned_test_functions.jsonl/55388 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21296,
62,
632,
368,
341,
286,
1077,
384,
284,
28819,
486,
1607,
2099,
9640,
310,
28819,
486,
18785,
445,
333,
4461,
310,
28819,
486,
1607,
2099,
58,
16041,
486,
18785,
445,
2514,
899,
17036,
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_filter_array_high_density() {
// this test exercises the all 1's branch of the filter algorithm
let mut data_values = (1..=65).map(Some).collect::<Vec<_>>();
let mut filter_values = (1..=65)
.map(|i| !matches!(i % 65, 0))
.collect::<Vec<bool>>();
... | rust_cleaned_test_functions.jsonl/28227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8727,
3858,
22680,
53349,
368,
341,
286,
442,
419,
1273,
22932,
279,
678,
220,
16,
594,
8870,
315,
279,
4051,
12111,
198,
286,
1077,
5206,
821,
9146,
284,
320,
16,
496,
28,
21,
20,
568,
2186,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_insult_to_html() {
let insult = Insult::new("Rust, motherfucker, do you speak it?".to_string(), "UnitTest".to_string());
let insult = insult.render(ContentType::Html);
assert!(insult.contains("<h1 class=\"title\">Rust"));
assert!(insult.contains("<h2 class=\"subtitle\">UnitTest</... | rust_cleaned_test_functions.jsonl/102758 | {
"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,
34386,
494,
2346,
9564,
368,
341,
262,
1077,
26132,
284,
9726,
494,
486,
931,
445,
49,
590,
11,
6554,
69,
24370,
11,
653,
498,
6468,
432,
30,
3263,
983,
3904,
1507,
330,
97330,
3263,
983,
3904... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_record_literal_enum_variant() {
check(
r#"
enum E { A { a: u32 } }
fn foo() {
let _ = E::A { $0 }
}
"#,
expect![[r#"
fd a u32
"#]],
);
} | rust_cleaned_test_functions.jsonl/39748 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 155
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
34100,
31054,
46112,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9018,
468,
314,
362,
314,
264,
25,
575,
18,
17,
335,
456,
8822,
15229,
368,
341,
262,
1077,
716,
284,
468,
486,
32,
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_check_tx_durable_nonce_ok() {
let (bank, _mint_keypair, custodian_keypair, nonce_keypair) =
setup_nonce_with_bank(10_000_000, |_| {}, 5_000_000, 250_000, None).unwrap();
let custodian_pubkey = custodian_keypair.pubkey();
let nonce_pubkey = nonce_keypair.pubkey... | rust_cleaned_test_functions.jsonl/2617 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 503
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
17805,
814,
18329,
48508,
19817,
368,
341,
286,
1077,
320,
17033,
11,
716,
67791,
3097,
12670,
11,
16564,
63849,
3097,
12670,
11,
39676,
3097,
12670,
8,
4035,
310,
6505,
48508,
6615,
35733,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_next() {
let mut ema = ExponentialMovingAverage::new(3).unwrap();
assert_eq!(ema.next(2.0), 2.0);
assert_eq!(ema.next(5.0), 3.5);
assert_eq!(ema.next(1.0), 2.25);
assert_eq!(ema.next(6.25), 4.25);
let mut ema = ExponentialMovingAverage::new(3).un... | rust_cleaned_test_functions.jsonl/124094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 260
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11257,
368,
341,
286,
1077,
5206,
976,
64,
284,
1374,
59825,
39732,
26292,
486,
931,
7,
18,
568,
15454,
1428,
286,
2060,
10714,
10297,
9176,
4529,
7,
17,
13,
15,
701,
220,
17,
13,
15,
317,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_batch_matmul_trans_square_lhs() {
// blas is used
with(|g: &mut ag::Graph<f32>| {
let a_: ag::Tensor<f32> = g.constant(array![[[1., 2.], [3., 4.]], [[1., 2.], [3., 4.]]]);
let a: ag::Tensor<f32> = g.transpose(a_, &[0, 2, 1]);
let b: ag::Tensor<f32> = g.constant(ar... | rust_cleaned_test_functions.jsonl/22776 | {
"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,
14534,
16610,
24160,
7965,
39794,
84284,
368,
341,
262,
442,
48577,
374,
1483,
198,
262,
448,
22428,
70,
25,
609,
6984,
933,
486,
11212,
63895,
18,
17,
69844,
341,
286,
1077,
264,
23211,
933,
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_conflicting_ns_funcs() {
let cxx = indoc! {"
uint32_t A::get() { return 10; }
uint32_t B::get() { return 20; }
"};
let hdr = indoc! {"
#include <cstdint>
namespace A {
uint32_t get();
}
namespace B {
uint32_t get... | rust_cleaned_test_functions.jsonl/9810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 284
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16059,
78208,
34728,
64124,
368,
341,
262,
1077,
272,
4146,
284,
1257,
509,
0,
314,
698,
286,
2622,
18,
17,
528,
362,
486,
455,
368,
314,
470,
220,
16,
15,
26,
456,
286,
2622,
18,
17,
528,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_done() {
let subcommand = Subcommand::Modify {
filter: Filter {
conditions: vec![Condition::IdList(vec![TaskId::WorkingSetId(123)])],
},
modification: Modification {
status: Some(Status::Completed),
..Def... | rust_cleaned_test_functions.jsonl/84277 | {
"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,
24390,
368,
341,
286,
1077,
1186,
5631,
284,
3719,
5631,
486,
44427,
341,
310,
4051,
25,
12339,
341,
394,
4682,
25,
7486,
20703,
10547,
486,
764,
852,
25592,
20703,
6262,
764,
486,
33978,
1649,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ccw_iterator() {
let mut dcel = DCEL::new();
let mut vs = Vec::new();
let central = dcel.insert_vertex(());
assert_eq!(dcel.vertex(central).ccw_out_edges().next(), None);
for _ in 0..5 {
vs.push(dcel.insert_vertex(()));
}
let m... | rust_cleaned_test_functions.jsonl/7379 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 575
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28955,
86,
13491,
368,
341,
286,
1077,
5206,
294,
3672,
284,
422,
41664,
486,
931,
543,
286,
1077,
5206,
6165,
284,
11312,
486,
931,
543,
286,
1077,
8622,
284,
294,
3672,
7030,
26611,
7,
1423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_filter_bitmask() {
assert_eq!(filter_bitmask(0, 1), 0x1);
assert_eq!(filter_bitmask(1, 1), 0b10);
assert_eq!(filter_bitmask(0, 4), 0xf);
assert_eq!(filter_bitmask(1, 3), 0xe);
assert_eq!(filter_bitmask(8, 1), 0x100);
assert_eq!(filter_bitmask(8, 4)... | rust_cleaned_test_functions.jsonl/21598 | {
"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,
8727,
13996,
11258,
368,
341,
286,
2060,
10714,
10297,
5315,
13996,
11258,
7,
15,
11,
220,
16,
701,
220,
15,
87,
16,
317,
286,
2060,
10714,
10297,
5315,
13996,
11258,
7,
16,
11,
220,
16,
701,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pcr() {
let mut p = PacketInfo::null_packet();
let pcr: u64 = 23647;
p.set_pcr(pcr);
assert!(p.has_pcr());
assert_eq!(p.pcr(), pcr);
} | rust_cleaned_test_functions.jsonl/47194 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
5082,
368,
341,
286,
1077,
5206,
281,
284,
28889,
1731,
486,
2921,
21078,
543,
286,
1077,
281,
5082,
25,
575,
21,
19,
284,
220,
17,
18,
21,
19,
22,
280,
286,
281,
980,
620,
5082,
1295,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_enum_as_json() {
test_none_with_extra(cast_enum_as_json);
let mut jo1: BTreeMap<String, Json> = BTreeMap::new();
jo1.insert(
String::from("a"),
Json::from_string(String::from("b")).unwrap(),
);
// HasParseToJSONFlag
let cs... | rust_cleaned_test_functions.jsonl/103222 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2055
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31054,
11898,
9455,
368,
341,
286,
1273,
31488,
6615,
31858,
1337,
559,
31054,
11898,
9455,
626,
286,
1077,
5206,
7647,
16,
25,
425,
6533,
2227,
3464,
11,
8308,
29,
284,
425,
6533,
2227,
486,
93... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_gen_changelog_lint_list() {
let lints = vec![
Lint::new("should_assert_eq", "group1", "abc", None, "module_name"),
Lint::new("should_assert_eq2", "group2", "abc", None, "module_name"),
Lint::new("incorrect_internal", "internal_style", "abc", None, "module_name"),
... | rust_cleaned_test_functions.jsonl/1260 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16322,
4138,
61873,
907,
396,
2019,
368,
341,
262,
1077,
326,
21042,
284,
7486,
90515,
286,
444,
396,
486,
931,
445,
5445,
16553,
10714,
497,
330,
4074,
16,
497,
330,
13683,
497,
2240,
11,
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_clear() {
let mut cache = LruCache::new(2);
cache.put("apple", "red");
cache.put("banana", "yellow");
assert_eq!(cache.len(), 2);
assert_opt_eq(cache.get(&"apple"), "red");
assert_opt_eq(cache.get(&"banana"), "yellow");
cache.clear();
... | rust_cleaned_test_functions.jsonl/77944 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 176
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
368,
341,
286,
1077,
5206,
6500,
284,
444,
2672,
8233,
486,
931,
7,
17,
626,
286,
6500,
3597,
445,
22377,
497,
330,
1151,
797,
286,
6500,
3597,
445,
87747,
497,
330,
27869,
3071,
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_scrypt() {
let salt = botan::hex_decode("4E61436C").unwrap();
let n = 1024;
let r = 8;
let p = 16;
let passphrase = "password";
let expected_output = botan::hex_decode("fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622e").unwrap();
let output = botan... | rust_cleaned_test_functions.jsonl/95294 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13171,
3571,
368,
1476,
262,
1077,
12021,
284,
10924,
276,
486,
17308,
15227,
445,
19,
36,
21,
16,
19,
18,
21,
34,
1827,
15454,
543,
262,
1077,
308,
284,
220,
16,
15,
17,
19,
280,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_quick_error() {
let expanded = parse_macro(
r#"
macro_rules! quick_error {
(SORT [enum $name:ident $( #[$meta:meta] )*]
items [$($( #[$imeta:meta] )*
=> $iitem:ident: $imode:tt [$( $ivar:ident: $ityp:ty ),*]
{$( $ifuncs:tt )... | rust_cleaned_test_functions.jsonl/28771 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
82094,
4096,
368,
341,
262,
1077,
17183,
284,
4715,
58810,
1006,
286,
435,
2,
698,
32606,
21407,
0,
3974,
4096,
1476,
320,
80177,
508,
9018,
400,
606,
25,
1713,
4930,
671,
3442,
5490,
25,
5490,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_no_constructor_make_unique() {
let hdr = indoc! {"
#include <stdint.h>
struct A {
uint32_t a;
};
"};
let rs = quote! {
ffi::A::make_unique();
};
run_test("", hdr, rs, &["A"], &[]);
} | rust_cleaned_test_functions.jsonl/9960 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 135
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6536,
66210,
28230,
21218,
368,
341,
262,
1077,
36615,
284,
1257,
509,
0,
314,
698,
262,
671,
997,
366,
31435,
860,
397,
262,
2036,
362,
341,
286,
2622,
18,
17,
528,
264,
280,
262,
2605,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_issue_186() {
let img: RgbImage = ImageBuffer::new(100, 100);
let _ = resize(&img, 50, 50, FilterType::Lanczos3);
} | rust_cleaned_test_functions.jsonl/984 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 75
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53340,
62,
16,
23,
21,
368,
341,
286,
1077,
4964,
25,
431,
9511,
1906,
284,
4654,
4095,
486,
931,
7,
16,
15,
15,
11,
220,
16,
15,
15,
317,
286,
1077,
716,
284,
20925,
2099,
1892,
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 |
#[test]
fn test_insert_into_array() {
given(r#"
a = [1,2,3]
b = []"#
).running(|root| {
{
let a = root.entry("a");
let a = as_array!(a);
assert_eq!(a.len(), 3);
assert!(a.get(2).is_some());
assert!(a.push(4));
... | rust_cleaned_test_functions.jsonl/36885 | {
"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,
17678,
45514,
3858,
368,
341,
262,
2661,
2601,
2,
698,
286,
264,
284,
508,
16,
11,
17,
11,
18,
921,
286,
293,
284,
3056,
1,
4956,
262,
7457,
27173,
22428,
2888,
91,
341,
286,
341,
310,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_fq2_negation() {
use super::fq::FqRepr;
use ff::PrimeField;
let a = Fq2 {
c0: Fq::from_repr(FqRepr([
0x00, 0xf8, 0xd2, 0x95, 0xb2, 0xde, 0xd9, 0xdc, 0xcc, 0xc6, 0x49, 0xc4, 0xb9, 0x53,
0x2b, 0xf3, 0xb9, 0x66, 0xce, 0x3b, 0xc2, 0x10, 0x8b, 0x13, 0x8b, ... | rust_cleaned_test_functions.jsonl/45346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1357
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
80,
17,
28209,
367,
368,
341,
262,
990,
2256,
486,
63919,
486,
37,
80,
693,
649,
280,
262,
990,
25539,
486,
32306,
1877,
401,
262,
1077,
264,
284,
434,
80,
17,
341,
286,
272,
15,
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... | 1 |
#[test]
fn test_from_str_radix() {
let r = to_str_pairs();
for num_pair in r.iter() {
let &(ref n, ref rs) = num_pair;
for str_pair in rs.iter() {
let &(ref radix, ref str) = str_pair;
assert_eq!(n,
&BigUint::from... | rust_cleaned_test_functions.jsonl/90140 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 376
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
2895,
39764,
941,
368,
341,
286,
1077,
435,
284,
311,
2895,
36430,
543,
286,
369,
1629,
14445,
304,
435,
19471,
368,
341,
310,
1077,
22796,
1097,
308,
11,
2053,
10036,
8,
284,
1629,
14445,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_array_schema() {
check_schema(
r#"{"type": "array", "items": "string"}"#,
SchemaPiece::Array(Box::new(SchemaPieceOrNamed::Piece(SchemaPiece::String))),
);
} | rust_cleaned_test_functions.jsonl/23002 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3858,
25371,
368,
341,
286,
1779,
25371,
1006,
310,
435,
55543,
4913,
1313,
788,
330,
1653,
497,
330,
3615,
788,
330,
917,
9207,
57676,
345,
310,
12539,
31209,
486,
1857,
67758,
486,
931,
3759,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_encoding_function_input_as_fixed_array() {
use validators::functions;
let first = [0x11u8; 20];
let second = [0x22u8; 20];
let encoded_from_array = functions::add_two_validators::encode_input([first.clone(), second.clone()]);
let encoded_from_array_wrapped = functions::add_two_valida... | rust_cleaned_test_functions.jsonl/20150 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 338
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37613,
9174,
5898,
11898,
37839,
3858,
368,
341,
197,
41819,
38588,
486,
21409,
401,
197,
10217,
1156,
284,
508,
15,
87,
16,
16,
84,
23,
26,
220,
17,
15,
935,
197,
10217,
2086,
284,
508,
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_index() {
fn prop(v3: Vec3) -> bool {
v3[0] == v3.x &&
v3[1] == v3.y &&
v3[2] == v3.z
}
quickcheck(prop as fn(Vec3) -> bool);
} | rust_cleaned_test_functions.jsonl/114285 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 141
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3560,
368,
341,
286,
5168,
2004,
3747,
18,
25,
11312,
18,
8,
1464,
1807,
341,
310,
348,
18,
58,
15,
60,
621,
348,
18,
1993,
6561,
310,
348,
18,
58,
16,
60,
621,
348,
18,
2384,
6561,
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... | 3 |
#[test]
fn test_try_from_put_drives() {
let (mut sender, receiver) = UnixStream::pair().unwrap();
let mut connection = HttpConnection::new(receiver);
let body = "{ \
\"drive_id\": \"string\", \
\"path_on_host\": \"string\", \
\"is_root_device\": true, ... | rust_cleaned_test_functions.jsonl/106580 | {
"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,
53283,
5673,
15557,
26680,
1886,
368,
341,
286,
1077,
320,
6984,
4646,
11,
13964,
8,
284,
46995,
3027,
486,
12670,
1005,
15454,
543,
286,
1077,
5206,
3633,
284,
4823,
4526,
486,
931,
78126,
317,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_reorg_claims_x() -> Result<(), Error> {
// Test configuration
const NUM_BLOCKS_MAIN: u64 = 6; // Number of blocks to mine in main chain
const REORG_DEPTH: u64 = 5; // Number of blocks to be discarded from main chain after reorg
const DIR_NAME: &str = ".bmw_reorg2";
clean_output_dir(DIR_NAM... | rust_cleaned_test_functions.jsonl/90401 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2759
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1288,
1775,
6794,
25676,
3212,
368,
1464,
5714,
68843,
4600,
29,
341,
197,
322,
3393,
6546,
198,
4777,
15943,
86542,
32276,
25,
575,
21,
19,
284,
220,
21,
26,
442,
5624,
315,
10010,
311,
10485,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_submit_params_cmp() {
let submit_params_1 = SubmissionParameters {
account_id: 1337,
nonce: 12,
height: 112,
block: 0,
deadline_unadjusted: 7123,
deadline: 1193,
gen_sig: [0; 32],
};
let ... | rust_cleaned_test_functions.jsonl/89909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 467
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31674,
6745,
35193,
368,
341,
286,
1077,
9318,
6745,
62,
16,
284,
58734,
9706,
341,
310,
2692,
842,
25,
220,
16,
18,
18,
22,
345,
310,
39676,
25,
220,
16,
17,
345,
310,
2608,
25,
220,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_new() {
let pos = position!(1.0, 10.0, 3.0, 115.0, -3.0);
let vel = vec3(0.0, 1.0, 2.0);
let data = BaseEntityData::new(pos, vel);
assert_eq!(data.read_position(), Ok(pos));
assert_eq!(data.read_velocity(), Ok(vel));
} | rust_cleaned_test_functions.jsonl/50449 | {
"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,
5921,
368,
341,
286,
1077,
1133,
284,
2309,
10297,
16,
13,
15,
11,
220,
16,
15,
13,
15,
11,
220,
18,
13,
15,
11,
220,
16,
16,
20,
13,
15,
11,
481,
18,
13,
15,
317,
286,
1077,
9054,
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_basic_highlight_decl_no_write() {
check(
r#"
fn foo() {
let i<|>;
i = 1;
}
"#,
expect![[r#"
i Local FileId(0) 19..20 Other
FileId(0) 26..27 Other Write
"#]],
);
} | rust_cleaned_test_functions.jsonl/47783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 180
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34729,
74546,
35814,
6536,
9165,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
8822,
15229,
368,
341,
262,
1077,
600,
27,
91,
10133,
262,
600,
284,
220,
16,
280,
532,
57676,
345,
310,
1720,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lion() {
let key = randombytes(32);
let message = randombytes(1024);
let mut message_clone = message.clone();
lion_transform(&mut message_clone[..], &key[..], [1, 1, 1]);
assert!(&message_clone[..] != &message[..]);
lion_transform(&mut message_cl... | rust_cleaned_test_functions.jsonl/114622 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
290,
368,
341,
286,
1077,
1376,
284,
4194,
9651,
7,
18,
17,
317,
286,
1077,
1943,
284,
4194,
9651,
7,
16,
15,
17,
19,
626,
286,
1077,
5206,
1943,
54742,
284,
1943,
15997,
543,
286,
3903... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_describe_account_override() {
println!("Running test_describe_account_override");
verify_account_override(LoginOverride::AutologinGuest, "autologinguest");
verify_account_override(LoginOverride::None, "none");
verify_account_override(LoginOverride::AuthProvider, "... | rust_cleaned_test_functions.jsonl/60456 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15768,
3114,
13500,
48576,
368,
341,
286,
13751,
17223,
18990,
1273,
15768,
3114,
13500,
48576,
797,
286,
10146,
13500,
48576,
44862,
2177,
486,
19602,
1609,
258,
37804,
11,
330,
2717,
1609,
287,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wasi_get_wasi_version_snapshot0() {
(assert_c! {
#include "tests/wasmer.h"
int main() {
wasm_engine_t* engine = wasm_engine_new();
wasm_store_t* store = wasm_store_new(engine);
wasm_byte_vec_t wat;
... | rust_cleaned_test_functions.jsonl/86302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 570
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1670,
10215,
3062,
1670,
10215,
9438,
53265,
15,
368,
341,
286,
320,
2207,
666,
0,
341,
310,
671,
997,
330,
23841,
6324,
300,
1174,
860,
1837,
310,
526,
1887,
368,
341,
394,
98263,
24823,
528,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_send_support() {
ic_test_utilities::artifact_pool_config::with_test_pool_config(|pool_config| {
with_test_replica_logger(|logger| {
let (mut ecdsa_pool, pre_signer) =
create_pre_signer_dependencies(pool_config, logger);
... | rust_cleaned_test_functions.jsonl/86717 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 820
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36844,
96780,
13565,
25827,
368,
341,
286,
17902,
4452,
94044,
486,
63722,
15709,
5332,
486,
4197,
4452,
15709,
5332,
22428,
10285,
5332,
91,
341,
310,
448,
4452,
25533,
15317,
27413,
22428,
9786,
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_lookup3_xy() {
let mut rng = XorShiftRng::from_seed([0x3dbe6259, 0x8d313d76, 0x3237db17, 0xe5bc0656]);
for _ in 0..100 {
let mut cs = TestConstraintSystem::<Bls12>::new();
let a_val = rng.gen();
let a = Boolean::from(
Allocate... | rust_cleaned_test_functions.jsonl/66526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 691
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27464,
18,
40920,
368,
341,
286,
1077,
5206,
28422,
284,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
2561,
15,
87,
18,
83406,
21,
17,
20,
24,
11,
220,
15,
87,
23,
67,
18,
16,
18,
67,
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... | 8 |
#[test]
fn test_split_mix64() {
let mut rng = SplitMix64::new();
let l = rng.next_long();
let i = rng.next_int();
println!("SplitMix64 64 bit signed: {}", l);
println!("SplitMix64 32 bit signed: {}", i);
assert_ne!(l, i as i64);
} | rust_cleaned_test_functions.jsonl/54530 | {
"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,
17052,
67729,
21,
19,
368,
341,
286,
1077,
5206,
28422,
284,
27810,
58083,
21,
19,
486,
931,
543,
286,
1077,
326,
284,
28422,
4529,
17799,
543,
286,
1077,
600,
284,
28422,
4529,
4042,
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_process_transactions_returns_unprocessed_txs() {
solana_logger::setup();
let GenesisBlockInfo {
genesis_block,
mint_keypair,
..
} = create_genesis_block(10_000);
let bank = Arc::new(Bank::new(&genesis_block));
let pubke... | rust_cleaned_test_functions.jsonl/58838 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 849
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
68182,
58900,
4907,
34022,
17805,
82,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
40788,
4713,
1731,
341,
310,
59366,
7113,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_dyn_value_clone_drop() {
let val1 = OwnedDynValue::new(big_struct_1());
let val2 = OwnedDynValue::new(big_struct_2());
assert_eq!(val1, val1);
assert_eq!(val1.clone(), val1);
assert_eq!(val1.clone(), val1.clone().clone());
assert_eq!(val2, val2);... | rust_cleaned_test_functions.jsonl/114236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 249
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69213,
3142,
54742,
29584,
368,
341,
286,
1077,
1044,
16,
284,
85093,
95709,
1130,
486,
931,
75616,
15126,
62,
16,
1423,
286,
1077,
1044,
17,
284,
85093,
95709,
1130,
486,
931,
75616,
15126,
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_super_1() {
check_output_default(
"class A {\n\
method() {\n\
print \"A method\";\n\
}\n\
}\n\
\n\
class B < A {\n\
method() {\n\
print \"B method\";\n\
... | rust_cleaned_test_functions.jsonl/111859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 434
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
38886,
62,
16,
368,
341,
286,
1779,
7645,
9993,
1006,
310,
330,
1040,
362,
28152,
77,
5661,
2290,
1714,
368,
28152,
77,
5661,
338,
1173,
7245,
32,
1714,
2105,
17882,
77,
5661,
2290,
51300,
77,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_push_many() {
macro_rules! t(
(s: $path:expr, $push:expr, $exp:expr) => (
{
let mut p = Path::new($path);
p.push_many($push);
assert!(p.as_str() == Some($exp));
}
);
... | rust_cleaned_test_functions.jsonl/7684 | {
"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,
14218,
22101,
368,
341,
286,
18072,
21407,
0,
259,
1006,
310,
320,
82,
25,
400,
2343,
96011,
11,
400,
9077,
96011,
11,
400,
4580,
96011,
8,
589,
2399,
394,
341,
503,
1077,
5206,
281,
284,
7933... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_definition_with_assign_body() {
let input = "def hello do
a = true
end";
let result = parsers::definition::parse(input);
assert_eq!(
result,
Ok((
"",
parsers::definition::Definition {
... | rust_cleaned_test_functions.jsonl/41237 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31698,
6615,
20688,
14114,
368,
341,
286,
1077,
1946,
284,
330,
750,
23811,
653,
715,
310,
264,
284,
830,
198,
286,
835,
3302,
286,
1077,
1102,
284,
87073,
486,
18375,
486,
6400,
5384,
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... | 1 |
#[test]
fn test_file_reader_rows_projection_list() {
let schema = "
message spark_schema {
OPTIONAL group a (LIST) {
REPEATED group list {
OPTIONAL group element (LIST) {
REPEATED group list {
OPTIONAL group element (LIST) {
... | rust_cleaned_test_functions.jsonl/69591 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2458,
22306,
10949,
72738,
2019,
368,
341,
286,
1077,
10802,
284,
6228,
414,
1943,
15186,
25371,
341,
286,
76232,
1874,
264,
320,
22852,
8,
341,
688,
3596,
1740,
9005,
1874,
1140,
341,
310,
76232,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_check_and_slash_expired_rewards() {
let mut t = new_test_ext();
t.execute_with(|| {
// let purchased_submit_bn: u64 = 50;
// let current_bn: u64 = 50;
advance_session();
advance_session();
advance_session();
advance_session();
advance_session();
advance_session();
adva... | rust_cleaned_test_functions.jsonl/35128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1649
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7200,
8378,
11886,
988,
80221,
77997,
368,
341,
10217,
5206,
259,
284,
501,
4452,
9927,
543,
3244,
7769,
6615,
79453,
341,
197,
197,
322,
1077,
14733,
31674,
58112,
25,
575,
21,
19,
284,
220,
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_analysis_from_document() {
let it = doc! {
KEY_ID: "amenakaonsen",
KEY_POSITIVE_ION: {},
KEY_NEGATIVE_ION: {},
KEY_UNDISSOCIATED: {},
KEY_GAS: {},
KEY_MINOR: {},
KEY_TOTAL_POSITIVE_ION: {
... | rust_cleaned_test_functions.jsonl/16364 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1952
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
42682,
5673,
26231,
368,
341,
286,
1077,
432,
284,
4629,
0,
341,
310,
12013,
3450,
25,
330,
24774,
13334,
2382,
268,
756,
310,
12013,
18313,
44350,
62,
1271,
25,
14573,
310,
12013,
62368,
23215,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_rule_only() {
let json = r#"["@test","a"]"#;
let remark = Remark::new(RemarkType::Annotated, "@test");
assert_eq_dbg!(remark, serde_json::from_str(json).unwrap());
assert_eq_str!(json, &serde_json::to_string(&remark).unwrap());
} | rust_cleaned_test_functions.jsonl/126371 | {
"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,
21124,
18410,
368,
341,
286,
1077,
2951,
284,
435,
55543,
74528,
1944,
2198,
64,
1341,
57676,
280,
286,
1077,
13841,
284,
82733,
486,
931,
2785,
21115,
929,
486,
2082,
87029,
11,
8428,
1944,
3071,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_checking_memory_limit() {
let _guard = TEST_MUTEX.lock().unwrap();
defer!(GLOBAL_MEM_SIZE.set(0));
let mut locks = PeerPessimisticLocks::default();
let res = locks.insert(vec![(Key::from_raw(b"k1"), lock(&[0; 512000]))]);
assert!(res.is_ok());
... | rust_cleaned_test_functions.jsonl/83914 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
7200,
287,
19195,
14763,
368,
341,
286,
1077,
716,
26098,
284,
13602,
66994,
21003,
1005,
15454,
543,
286,
17956,
10297,
16492,
13209,
4098,
980,
7,
15,
3237,
286,
1077,
5206,
31676,
284,
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_bump_txn_sanitize_tracking_maps() {
// verify we clean then right after expiration of ANTI_REORG_DELAY.
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 = creat... | rust_cleaned_test_functions.jsonl/16949 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1025
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
1510,
92299,
643,
58652,
66105,
46512,
368,
341,
1572,
197,
322,
10146,
582,
4240,
1221,
1290,
1283,
31692,
315,
2100,
26614,
2192,
44927,
33410,
382,
10217,
26023,
1645,
18343,
82,
284,
1855,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_ipv6_display() {
// Test that `addr` is formatted the same by our `Display` impl as by
// the standard library's `Display` impl. Optionally test that it
// matches a particular expected string.
fn test_one(addr: Ipv6Addr, expect: Option<&str>) {
let fo... | rust_cleaned_test_functions.jsonl/31873 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1317
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
14825,
368,
341,
286,
442,
3393,
429,
1565,
6214,
63,
374,
23126,
279,
1852,
553,
1039,
1565,
7020,
63,
11605,
438,
553,
198,
286,
442,
279,
5297,
6733,
594,
1565,
7020,
63,
11605,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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() {
let num = super::get();
if let Some(n) = env_var("NUM_CPUS_TEST_GET") {
assert_eq!(num, n);
} else {
assert!(num > 0);
assert!(num < 236_451);
}
} | rust_cleaned_test_functions.jsonl/35691 | {
"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,
3062,
368,
341,
286,
1077,
1629,
284,
2256,
486,
455,
543,
286,
421,
1077,
4329,
1445,
8,
284,
6105,
4612,
445,
17488,
45976,
2034,
11641,
12702,
899,
341,
310,
2060,
10714,
10297,
2413,
11,
308... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.