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_gpio_setup_ok() {
for mode in &["in", "IN"] {
do_mock_test(format!(r#"GPIO_SETUP 5, "{}""#, mode), &[501]);
}
for mode in &["in-pull-down", "IN-PULL-DOWN"] {
do_mock_test(format!(r#"GPIO_SETUP 6, "{}""#, mode), &[602]);
}
for mode i... | rust_cleaned_test_functions.jsonl/82623 | {
"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,
32001,
21363,
19817,
368,
341,
286,
369,
3856,
304,
609,
1183,
258,
497,
330,
687,
1341,
341,
310,
653,
34134,
4452,
20698,
10297,
81,
55543,
26337,
61178,
220,
20,
11,
35503,
3014,
60778,
3856,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_insert_file() {
let f = TestFixture::new();
let p1 = f.create_file("file1", 10);
let p2 = f.create_file("file2", 10);
let p3 = f.create_file("file3", 10);
let mut c = LruDiskCache::new(f.tmp().join("cache"), 25).unwrap();
c.insert_file("file1", &p1... | rust_cleaned_test_functions.jsonl/6723 | {
"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,
17678,
2458,
368,
341,
286,
1077,
282,
284,
3393,
18930,
486,
931,
543,
286,
1077,
281,
16,
284,
282,
2520,
2458,
445,
1192,
16,
497,
220,
16,
15,
317,
286,
1077,
281,
17,
284,
282,
2520,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mach_files() -> Result<(), Error> {
let view = ByteView::open(fixture("macos/crash.dSYM/Contents/Resources/DWARF/crash"))?;
let object = Object::parse(&view)?;
let session = object.debug_session()?;
let files = session.files().collect::<Result<Vec<_>, _>>()?;
assert_eq!(file... | rust_cleaned_test_functions.jsonl/82880 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
610,
10931,
368,
1464,
5714,
68843,
4600,
29,
341,
262,
1077,
1651,
284,
10906,
851,
486,
2508,
94886,
445,
11948,
436,
2899,
81,
988,
950,
79234,
14,
14803,
76099,
14953,
45458,
37,
2899,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_recv_window() {
let stream_start = Wrapping(u32::MAX - 29);
let recv_data = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31,
];
let mut read_data = [0; 32];
let ... | rust_cleaned_test_functions.jsonl/36076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3024
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
36118,
12571,
368,
341,
286,
1077,
4269,
4906,
284,
31630,
3629,
8154,
18,
17,
486,
10586,
481,
220,
17,
24,
317,
286,
1077,
27006,
1769,
284,
2278,
310,
220,
15,
11,
220,
16,
11,
220,
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... | 7 |
#[test]
fn test_tuple_access_faulty_type() {
let spec = "input in: (Int8, Bool)\noutput out: Bool := in[0].0";
assert_eq!(1, num_type_errors(spec));
} | rust_cleaned_test_functions.jsonl/110686 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 89
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21773,
12759,
70097,
88,
1819,
368,
341,
286,
1077,
1398,
284,
330,
1355,
304,
25,
320,
1072,
23,
11,
12608,
10699,
77,
3006,
700,
25,
12608,
1669,
304,
58,
15,
936,
15,
876,
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_overrides() {
let user_config = table_from_toml_str(r#"tab_size = 42"#).unwrap();
let rust_config = table_from_toml_str(r#"tab_size = 31"#).unwrap();
let mut manager = ConfigManager::default();
manager.set_user_config(ConfigDomain::Syntax(SyntaxDefinition::Rust),... | rust_cleaned_test_functions.jsonl/40015 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 785
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15431,
18245,
368,
341,
286,
1077,
1196,
5332,
284,
1965,
5673,
528,
316,
75,
2895,
2601,
55543,
6192,
2368,
284,
220,
19,
17,
57676,
568,
15454,
543,
286,
1077,
23071,
5332,
284,
1965,
5673,
52... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_roundtrip_stream_dict_of_list_of_dict() {
// list
let list_data_type = DataType::List(Box::new(Field::new_dict(
"item",
DataType::Dictionary(Box::new(DataType::Int8), Box::new(DataType::Utf8)),
true,
1,
false,
))... | rust_cleaned_test_functions.jsonl/48764 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 541
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29896,
32981,
12673,
5243,
3575,
2019,
3575,
5243,
368,
341,
286,
442,
1140,
198,
286,
1077,
1140,
1769,
1819,
284,
33172,
486,
852,
67758,
486,
931,
57788,
486,
931,
5243,
1006,
310,
330,
1203,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ipv6_to_int() {
let a = Ipv6Addr::new(0x1122, 0x3344, 0x5566, 0x7788, 0x99aa, 0xbbcc, 0xddee, 0xff11);
assert_eq!(u128::from(a), 0x112233445566778899aabbccddeeff11u128);
} | rust_cleaned_test_functions.jsonl/8037 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 116
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
49378,
21,
2346,
4042,
368,
341,
262,
1077,
264,
284,
358,
30168,
21,
13986,
486,
931,
7,
15,
87,
16,
16,
17,
17,
11,
220,
15,
87,
18,
18,
19,
19,
11,
220,
15,
87,
20,
20,
21,
21,
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_cached_timed_sized_refresh_prime() {
assert!(cached_timed_sized_refresh_prime("true"));
{
let cache = CACHED_TIMED_SIZED_REFRESH_PRIME.lock().unwrap();
assert_eq!(cache.cache_hits(), Some(0));
assert_eq!(cache.cache_misses(), Some(1));
}
assert!(cached_tim... | rust_cleaned_test_functions.jsonl/13148 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 533
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64369,
29087,
291,
643,
1506,
42076,
38217,
368,
341,
262,
2060,
10297,
32918,
29087,
291,
643,
1506,
42076,
38217,
445,
1866,
4010,
262,
341,
286,
1077,
6500,
284,
356,
52645,
16746,
1479,
1098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_tick_sent_after_min() {
let ledger_path = get_tmp_ledger_path!();
{
let blockstore = Blockstore::open(&ledger_path)
.expect("Expected to be able to open database ledger");
let GenesisConfigInfo { genesis_config, .. } = create_g... | rust_cleaned_test_functions.jsonl/106262 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1386
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
2267,
7080,
1358,
43612,
24115,
19844,
7260,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_into_from_raw_unsized() {
use std::fmt::Display;
use std::string::ToString;
let arc: Arc<str> = Arc::from("foo");
let ptr = Arc::into_raw(arc.clone());
let arc2 = unsafe { Arc::from_raw(ptr) };
assert_eq!(unsafe { &*ptr }, "foo");
assert_eq!(arc, arc2);
let ar... | rust_cleaned_test_functions.jsonl/42712 | {
"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,
45514,
5673,
16067,
4907,
82,
1506,
368,
341,
262,
990,
1460,
486,
12501,
486,
7020,
280,
262,
990,
1460,
486,
917,
486,
5870,
401,
262,
1077,
15580,
25,
19689,
27,
495,
29,
284,
19689,
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_decrypt_oaep_invalid_hash() {
let mut rng = thread_rng();
let priv_key = get_private_key();
let pub_key: RSAPublicKey = priv_key.clone().into();
let mut digest = Sha1::default();
let ciphertext = encrypt(
&mut rng,
&pub_key,
... | rust_cleaned_test_functions.jsonl/80041 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 427
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
80764,
14179,
64,
747,
31433,
8950,
368,
341,
286,
1077,
5206,
28422,
284,
4516,
66849,
543,
286,
1077,
6095,
3097,
284,
633,
26249,
3097,
543,
286,
1077,
6675,
3097,
25,
23229,
2537,
475,
1592,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_node_not_found() {
let pool = create_connection_pool_and_migrate();
let registry = DieselRegistry::new(pool);
registry
.add_node(get_node_1())
.expect("Unable to insert node");
registry
.add_node(get_node_2())
.... | rust_cleaned_test_functions.jsonl/106762 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 277
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
5084,
7913,
21480,
368,
341,
286,
1077,
7314,
284,
1855,
15866,
15709,
8378,
717,
34479,
543,
286,
1077,
19424,
284,
53794,
15603,
486,
931,
41838,
626,
286,
19424,
198,
310,
659,
718,
5084,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_or_init_default_initializer() {
lazy_static::lazy_static!(
static ref ONCE: Once<bool> = Once::default();
);
static COUNTER: AtomicUsize = AtomicUsize::new(0);
let val = block_on(ONCE.get_or_init(async {
COUNTER.fetch_add(1, Ordering:... | rust_cleaned_test_functions.jsonl/1293 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 360
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
8734,
6137,
9993,
36462,
368,
341,
286,
15678,
25360,
486,
49013,
25360,
33673,
310,
1099,
2053,
6197,
2104,
25,
9646,
17028,
29,
284,
9646,
486,
2258,
543,
286,
3475,
286,
1099,
356,
35019,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_cbrt_real() {
for n in (0..100).map(f64::from) {
let n3 = n * n * n;
assert!(close(
Complex64::new(n3, 0.0).cbrt(),
Complex64::new(n, 0.0)
));
// assert!(cl... | rust_cleaned_test_functions.jsonl/105689 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 473
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
1323,
83,
15266,
368,
341,
310,
369,
308,
304,
320,
15,
496,
16,
15,
15,
568,
2186,
955,
21,
19,
486,
1499,
8,
341,
4597,
1077,
308,
18,
284,
308,
353,
308,
353,
308,
280,
394,
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... | 2 |
#[test]
fn test_elementsd_with_validatepegin() {
let bitcoind_exe = bitcoind::exe_path().unwrap();
let bitcoind_conf = bitcoind::Conf::default();
let bitcoind = BitcoinD::with_conf(&bitcoind_exe, &bitcoind_conf).unwrap();
let conf = Conf::new(Some(&bitcoind));
let exe = i... | rust_cleaned_test_functions.jsonl/107291 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 276
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7894,
13446,
6615,
42681,
375,
8163,
368,
341,
286,
1077,
2699,
1015,
484,
76074,
284,
2699,
1015,
484,
486,
46184,
2638,
1005,
15454,
543,
286,
1077,
2699,
1015,
484,
16059,
284,
2699,
1015,
484,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_parser_on_all_inputs() {
use crate::parser::ast_from_file;
use std::path::Path;
let mut rv32i_str = String::new();
use std::io::prelude::*;
std::fs::File::open("./cfg/rv32i.toml")
.unwrap()
.read_to_string(&mut rv32i_str)
.unwrap();
let mut rv = c... | rust_cleaned_test_functions.jsonl/22543 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 509
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
4470,
5705,
28557,
368,
341,
262,
990,
17717,
486,
9657,
486,
559,
5673,
2458,
280,
262,
990,
1460,
486,
2343,
486,
1820,
401,
262,
1077,
5206,
17570,
18,
17,
72,
2895,
284,
923,
486,
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... | 5 |
#[test]
fn test_encode_hashmap_with_numeric_key() {
use std::str::from_utf8;
use std::io::Writer;
use std::io::MemWriter;
use collections::HashMap;
let mut hm: HashMap<uint, bool> = HashMap::new();
hm.insert(1, true);
let mut mem_buf = MemWriter::new();
... | rust_cleaned_test_functions.jsonl/111054 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 366
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
8950,
2186,
6615,
29418,
3097,
368,
341,
286,
990,
1460,
486,
495,
486,
1499,
39453,
23,
280,
286,
990,
1460,
486,
815,
486,
6492,
280,
286,
990,
1460,
486,
815,
486,
18816,
6492,
280,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_http_cache_location() {
let (file_fetcher, temp_dir) = setup(CacheSetting::Use, None);
let expected = temp_dir.path().join("deps");
let actual = file_fetcher.get_http_cache_location();
assert_eq!(actual, expected);
} | rust_cleaned_test_functions.jsonl/32458 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 102
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
25888,
11529,
13126,
368,
341,
262,
1077,
320,
1192,
11803,
261,
11,
2730,
4334,
8,
284,
6505,
3025,
1777,
15400,
486,
10253,
11,
2240,
317,
262,
1077,
3601,
284,
2730,
4334,
3875,
1005,
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_slow_score() {
let mut slow_score = SlowScore::new(Duration::from_millis(500));
slow_score.timeout_requests = 5;
slow_score.total_requests = 100;
assert_eq!(
OrderedFloat(1.5),
slow_score.update_impl(Duration::from_secs(10))
);
... | rust_cleaned_test_functions.jsonl/3880 | {
"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,
82447,
10405,
368,
341,
286,
1077,
5206,
6301,
10405,
284,
38147,
10570,
486,
931,
64114,
486,
1499,
717,
56212,
7,
20,
15,
15,
1106,
286,
6301,
10405,
36110,
37216,
284,
220,
20,
280,
286,
6301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_concat_grapheme_clusters_no_boundary() {
let s = Sentence::from_tokenized("\u{200d}").unwrap();
let filter = ConcatGraphemeClustersFilter::new();
let s = filter.filter(s);
assert_eq!("\u{200d}", s.to_tokenized_string().unwrap());
} | rust_cleaned_test_functions.jsonl/115429 | {
"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,
57478,
14738,
3894,
46243,
6536,
54004,
368,
341,
286,
1077,
274,
284,
79542,
486,
1499,
6458,
1506,
4921,
84,
90,
17,
15,
15,
67,
92,
1827,
15454,
543,
286,
1077,
4051,
284,
78195,
11212,
3894,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_pull_request_reopened() {
let mut test = new_test();
test.handler.event = "pull_request".into();
test.handler.action = "reopened".into();
test.handler.data.pull_request = some_pr();
test.handler.data.sender = User::new("the-pr-closer");
test.github.mock_get_pull_request_c... | rust_cleaned_test_functions.jsonl/89640 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 441
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
65693,
7893,
1288,
56128,
368,
341,
262,
1077,
5206,
1273,
284,
501,
4452,
543,
262,
1273,
31171,
5773,
284,
330,
23441,
7893,
3263,
18122,
543,
262,
1273,
31171,
12395,
284,
330,
265,
56128,
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_top() {
let runc_id = format!("{}", Uuid::new_v4());
let runc_path = env::temp_dir().join(&runc_id).join("runc.amd64");
let runc_root =
PathBuf::from(env::var_os("XDG_RUNTIME_DIR").expect("expected temporary path"))
.join("rust-runc")
... | rust_cleaned_test_functions.jsonl/24476 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1066
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10426,
368,
341,
286,
1077,
435,
1347,
842,
284,
3561,
79878,
547,
2423,
486,
931,
2273,
19,
1423,
286,
1077,
435,
1347,
2638,
284,
6105,
486,
3888,
4334,
1005,
5987,
2099,
81,
1347,
842,
568,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fetch_db_name_with_postgres_scheme() {
let url: url::Url = "postgres://postgres:prisma@127.0.0.1:5432/pgres?schema=test_schema"
.parse()
.unwrap();
let db_name = super::fetch_db_name(&url, "postgres");
assert_eq!(db_name, "pgres");
} | rust_cleaned_test_functions.jsonl/6667 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 162
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
8685,
1269,
6615,
6333,
17818,
53293,
368,
341,
286,
1077,
2515,
25,
2515,
486,
2864,
284,
330,
43070,
1110,
43070,
25,
649,
38152,
31,
16,
17,
22,
13,
15,
13,
15,
13,
16,
25,
20,
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_write_char() {
let tests = &[
('n', "\"n\""),
('"', "\"\\\"\""),
('\\', "\"\\\\\""),
('/', "\"/\""),
('\x08', "\"\\b\""),
('\x0C', "\"\\f\""),
('\n', "\"\\n\""),
('\r', "\"\\r\""),
('\t', "\"\\t\""),
('\x0B', "\"... | rust_cleaned_test_functions.jsonl/29819 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 271
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
9232,
368,
341,
262,
1077,
7032,
284,
609,
9640,
286,
4319,
77,
516,
15898,
77,
2105,
4461,
286,
4319,
48199,
15898,
3422,
2105,
2105,
4461,
286,
4319,
3422,
516,
15898,
51007,
2105,
4461,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_used_in_return_expr() {
check_assist(
inline_local_variable,
"
fn foo() {
let a<|> = 1 > 0;
return a;
}",
"
fn foo() {
<|>return 1 > 0;
}",
);
} | rust_cleaned_test_functions.jsonl/60333 | {
"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,
27803,
1243,
12511,
21915,
368,
341,
286,
1779,
12083,
380,
1006,
310,
7381,
13564,
14635,
345,
310,
6228,
8822,
15229,
368,
341,
262,
1077,
264,
27,
91,
29,
284,
220,
16,
861,
220,
15,
280,
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_bank_capitalization() {
let bank0 = Arc::new(Bank::new(&GenesisConfig {
accounts: (0..42)
.map(|_| {
(
solana_sdk::pubkey::new_rand(),
Account::new(42, 0, &Pubkey::default()),
... | rust_cleaned_test_functions.jsonl/2526 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 536
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
16388,
2174,
2022,
368,
341,
286,
1077,
6073,
15,
284,
19689,
486,
931,
5349,
1180,
486,
931,
2099,
84652,
2648,
341,
310,
9618,
25,
320,
15,
496,
19,
17,
340,
394,
659,
2186,
22428,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_nonce_account() {
let from_pubkey = Pubkey::new_unique();
let nonce_pubkey = Pubkey::new_unique();
let authorized = nonce_pubkey;
let ixs = create_nonce_account(&from_pubkey, &nonce_pubkey, &authorized, 42);
assert_eq!(ixs.len(), 2);
let ix ... | rust_cleaned_test_functions.jsonl/35039 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 268
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
48508,
13500,
368,
341,
286,
1077,
504,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
39676,
34014,
792,
284,
22611,
792,
486,
931,
21218,
543,
286,
1077,
18630,
284,
39676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_component_deserialize() {
let data = Component::from_str(
r#"{
"workloadType": "core.oam.dev/v1.Singleton",
"osType": "linux",
"arch": "amd64",
"parameters": [],
"containers": [],
"workloadSettings": []
}... | rust_cleaned_test_functions.jsonl/98679 | {
"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,
23406,
15768,
9050,
368,
341,
262,
1077,
821,
284,
5578,
486,
1499,
2895,
1006,
286,
435,
55543,
515,
310,
330,
1778,
1078,
929,
788,
330,
2153,
14439,
309,
21523,
5457,
16,
76323,
756,
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_purge_slots() {
let blockstore_path = get_tmp_ledger_path!();
let blockstore = Blockstore::open(&blockstore_path).unwrap();
let (shreds, _) = make_many_slot_entries(0, 50, 5);
blockstore.insert_shreds(shreds, None, false).unwrap();
blockstore.purge_and_co... | rust_cleaned_test_functions.jsonl/38760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 407
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
620,
39823,
54161,
368,
341,
286,
1077,
2504,
4314,
2638,
284,
633,
16125,
38367,
1389,
2638,
0,
543,
286,
1077,
2504,
4314,
284,
8362,
4314,
486,
2508,
2099,
4574,
4314,
2638,
568,
15454,
543,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_valid_snapshot_accounts() {
solana_logger::setup();
assert!(is_valid_snapshot_archive_entry(
&["accounts", "0.0"],
tar::EntryType::Regular
));
assert!(is_valid_snapshot_archive_entry(
&["accounts", "01829.077"],
tar:... | rust_cleaned_test_functions.jsonl/18324 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 617
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8337,
53265,
55665,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
2060,
10297,
285,
8337,
53265,
42873,
9078,
1006,
310,
609,
1183,
26206,
497,
330,
15,
13,
15,
8097,
310,
12183,
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_encode_frame_invalid_buf() {
let frame = Frame {
role: Role::Unassigned,
dlci: DLCI::try_from(0).unwrap(),
data: FrameData::SetAsynchronousBalancedMode,
poll_final: false,
command_response: CommandResponse::Command,
... | rust_cleaned_test_functions.jsonl/87871 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11224,
8929,
31433,
10363,
368,
341,
286,
1077,
4034,
284,
16321,
341,
310,
3476,
25,
15404,
486,
1806,
39021,
345,
310,
27513,
5855,
25,
42919,
40,
486,
1539,
5673,
7,
15,
568,
15454,
3148,
310... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_minimize_linear_infinite_lower() {
let quad = BoundedQuadratic::new(f64::NEG_INFINITY, f64::INFINITY, 0., 1., 0.);
let (x1, x2) = quad.minimize();
assert!(x1.is_nan());
assert_eq!(x2, f64::NEG_INFINITY);
} | rust_cleaned_test_functions.jsonl/19888 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7260,
11853,
40674,
1243,
25722,
30425,
368,
341,
286,
1077,
27082,
284,
425,
13082,
2183,
88678,
486,
931,
955,
21,
19,
486,
97127,
91110,
11,
282,
21,
19,
486,
687,
55990,
11,
220,
15,
2572,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_module_defined_memories_limit() {
let limits = ModuleLimits {
memories: 0,
..Default::default()
};
let mut module = Module::default();
assert!(limits.validate(&module).is_ok());
module.memory_plans.push(MemoryPlan {
st... | rust_cleaned_test_functions.jsonl/48866 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 408
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10750,
52870,
12976,
2433,
14763,
368,
341,
286,
1077,
13388,
284,
13711,
94588,
341,
310,
18923,
25,
220,
15,
345,
310,
5241,
3675,
486,
2258,
741,
286,
3634,
286,
1077,
5206,
4688,
284,
13711,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signature_rsa_pkcs1_verify() {
let sha1_params = &[
(
&signature::RSA_PKCS1_1024_8192_SHA1_FOR_LEGACY_USE_ONLY,
1024,
),
(
&signature::RSA_PKCS1_2048_8192_SHA1_FOR_LEGACY_USE_ONLY,
2048,
),
];
let sha256_... | rust_cleaned_test_functions.jsonl/17913 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1641
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
82522,
33321,
4837,
16,
35638,
368,
341,
262,
1077,
15870,
16,
6745,
284,
609,
9640,
286,
2399,
310,
609,
34140,
486,
73564,
63898,
6412,
16,
62,
16,
15,
17,
19,
62,
23,
16,
24,
17,
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... | 6 |
#[test]
fn test_parse_create_keys_v2_response() {
let _setup = SetupMocks::init();
let mut builder = CreateKeyBuilder::create();
let (for_did, for_verkey) = builder.parse_response(&constants::CREATE_KEYS_V2_RESPONSE.to_vec()).unwrap();
assert_eq!(for_did, "MNepeSWtGfhnv8jLB1sF... | rust_cleaned_test_functions.jsonl/90060 | {
"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,
21039,
8657,
12631,
2273,
17,
9655,
368,
341,
286,
1077,
716,
15188,
284,
18626,
72577,
486,
2327,
1428,
286,
1077,
5206,
7363,
284,
4230,
1592,
3297,
486,
3182,
1428,
286,
1077,
320,
1958,
814,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_func_variadic() {
compare_stderr_output(
r#"
package main
func main() {
var x int = 45
var res_v1_1 = v1(1)
println(res_v1_1)
var res_v1_2 = v1(1, x)
println(res_v1_2)
var res_v1_3 = v1(1, 2, x, 4, 5)
println(res_v1_3)
var res_v1_4 = v1()
print... | rust_cleaned_test_functions.jsonl/83242 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 670
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9596,
4612,
72,
36214,
368,
341,
262,
9429,
93033,
7645,
1006,
286,
435,
2,
698,
1722,
1887,
271,
2830,
1887,
368,
341,
262,
762,
856,
526,
284,
220,
19,
20,
198,
262,
762,
592,
2273,
16,
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_to_from_bytes() {
let one = Scalar::one();
let curve_scalar = CurveScalar::from_bytes_mod_order(*one.as_bytes());
assert_eq!(curve_scalar.scalar, one);
assert_eq!(curve_scalar.as_bytes(), one.as_bytes());
} | rust_cleaned_test_functions.jsonl/65701 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 132
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
5673,
12524,
368,
341,
286,
1077,
825,
284,
35176,
486,
603,
543,
286,
1077,
15655,
41652,
284,
53677,
20639,
486,
1499,
12524,
7480,
7869,
4071,
603,
5357,
12524,
1423,
286,
2060,
10714,
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 |
#[test]
fn test_process_make_credential_cancelled() {
let mut rng = ThreadRng256 {};
let user_presence_always_cancel = |_| Err(Ctap2StatusCode::CTAP2_ERR_KEEPALIVE_CANCEL);
let mut ctap_state = CtapState::new(&mut rng, user_presence_always_cancel);
let make_credential_params = c... | rust_cleaned_test_functions.jsonl/35313 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 301
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
28230,
666,
30320,
28895,
832,
368,
341,
286,
1077,
5206,
28422,
284,
8752,
49,
968,
17,
20,
21,
9321,
286,
1077,
1196,
56403,
8418,
2284,
28895,
284,
66091,
15495,
3025,
30047,
17,
15872,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_to_primitive() {
let value = Value { x: 5 };
assert_eq!(value.to_int(), Some(5));
assert_eq!(value.to_i8(), Some(5));
assert_eq!(value.to_i16(), Some(5));
assert_eq!(value.to_i32(), Some(5));
assert_eq!(value.to_i64(), Some(5));
asser... | rust_cleaned_test_functions.jsonl/12472 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 345
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
84087,
368,
341,
286,
1077,
897,
284,
5162,
314,
856,
25,
220,
20,
2605,
286,
2060,
10714,
10297,
957,
2389,
4042,
1507,
220,
4329,
7,
20,
1106,
286,
2060,
10714,
10297,
957,
2389,
5318,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_matrix_plus_zero_equals_matrix() {
let zero = Matrix2x2::zero();
let matrix = Matrix2x2::new(
36.84, 427.46,
7.47, 61.89
);
assert_eq!(matrix + zero, matrix);
} | rust_cleaned_test_functions.jsonl/128966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10193,
28043,
19359,
61664,
10193,
368,
341,
286,
1077,
7168,
284,
11631,
17,
87,
17,
486,
14154,
543,
286,
1077,
6172,
284,
11631,
17,
87,
17,
486,
931,
1006,
310,
220,
18,
21,
13,
23,
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_received_frag_cur_messages_timeout() {
let mut fsm = FragStateMachine::new();
let orig_message = b"This is some message to be split";
let frags = split_message(orig_message,
b"nonce123", 22).unwrap();
let b = (frags.len() + 1) ... | rust_cleaned_test_functions.jsonl/24553 | {
"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,
40783,
80817,
18956,
23428,
20537,
368,
341,
286,
1077,
5206,
83138,
284,
58089,
94666,
486,
931,
1428,
286,
1077,
2713,
6462,
284,
293,
21520,
374,
1045,
1943,
311,
387,
6718,
876,
286,
1077,
972... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_object_decl() {
let source: &str = "const a = b::c::d.e().await;";
let diag: RefCell<DiagContext> = RefCell::new(DiagContext::new());
let mut parser: Parser = Parser::new(
0, source, &diag
);
let kwd_token: Token = parser.consume_token(... | rust_cleaned_test_functions.jsonl/56270 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
5314,
35814,
368,
341,
286,
1077,
2530,
25,
609,
495,
284,
330,
1024,
264,
284,
293,
486,
66,
486,
67,
1734,
1005,
11421,
26,
3302,
286,
1077,
39717,
25,
8550,
3599,
27,
21685,
351,
197... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_node() {
assert_eq!(
node("node"),
Ok((
"",
Some(KdlNode {
name: "node".into(),
values: Vec::new(),
properties: HashMap::new(),
children: Vec::new(),
... | rust_cleaned_test_functions.jsonl/118110 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
368,
341,
286,
2060,
10714,
33673,
310,
2436,
445,
3509,
4461,
310,
7622,
94702,
394,
8324,
394,
4329,
16738,
8736,
1955,
341,
503,
829,
25,
330,
3509,
3263,
18122,
3148,
503,
2750,
25,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_at_signs_file() {
let td = tempfile::Builder::new()
.prefix("sccache")
.tempdir()
.unwrap();
File::create(td.path().join("foo"))
.unwrap()
.write_all(b"-c foo.c -o foo.o")
.unwrap();
let arg = format!... | rust_cleaned_test_functions.jsonl/18540 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 545
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3752,
11172,
82,
2458,
368,
341,
286,
1077,
17941,
284,
54819,
486,
3297,
486,
931,
741,
310,
659,
11849,
445,
82,
638,
1777,
1138,
310,
659,
3888,
3741,
741,
310,
659,
15454,
543,
286,
2887,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_construct_twitter_profile_url() {
let fake_profile = "jsjoeio";
assert_eq!(
construct_twitter_profile_url(fake_profile),
"https://twitter.com/jsjoeio"
);
} | rust_cleaned_test_functions.jsonl/125790 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
64803,
83338,
13789,
2903,
368,
341,
286,
1077,
12418,
13789,
284,
330,
2519,
73,
4644,
815,
876,
286,
2060,
10714,
33673,
310,
9245,
83338,
13789,
2903,
74138,
13789,
1326,
310,
330,
2428,
1110,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_ip() -> Result<()> {
test_opt(
DhcpOption::ServerIdentifier("192.168.0.1".parse::<Ipv4Addr>().unwrap()),
vec![54, 4, 192, 168, 0, 1],
)?;
Ok(())
} | rust_cleaned_test_functions.jsonl/41164 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 131
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10385,
368,
1464,
5714,
71698,
341,
286,
1273,
15032,
1006,
310,
43227,
4672,
5341,
486,
5475,
8714,
445,
16,
24,
17,
13,
16,
21,
23,
13,
15,
13,
16,
3263,
6400,
27638,
80656,
19,
13986,
10483... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_process_store_fail_account0_not_signer() {
solana_logger::setup();
let keys = vec![];
let (config_keypair, config_account) = create_config_account(keys);
let config_pubkey = config_keypair.pubkey();
let my_config = MyConfig::new(42);
let mut instr... | rust_cleaned_test_functions.jsonl/36694 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 303
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
14809,
22121,
13500,
15,
7913,
11172,
261,
368,
341,
286,
2048,
3362,
27413,
486,
15188,
543,
286,
1077,
6894,
284,
7486,
0,
15078,
286,
1077,
320,
1676,
3097,
12670,
11,
2193,
13500,
8,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_schnorr_recover() {
let gen = Generator::new();
let (privkey, pubkey) = gen.random_keypair().unwrap();
let message = Message::default();
let signature = privkey.sign_schnorr(&message).unwrap();
assert_eq!(pubkey, signature.recover_schnorr(&message).unwrap(... | rust_cleaned_test_functions.jsonl/100079 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 139
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
643,
2125,
17391,
1288,
3688,
368,
341,
286,
1077,
4081,
284,
28358,
486,
931,
543,
286,
1077,
320,
11887,
792,
11,
95116,
8,
284,
4081,
7829,
3097,
12670,
1005,
15454,
543,
286,
1077,
1943,
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_hover_intra_link_namespaced() {
check(
r#"
pub struct Foo;
fn Foo() {}
/// [Foo()]
pub struct B<|>ar
"#,
expect![[r#"
*Bar*
```rust
test
```
```rust
pub struct Bar
... | rust_cleaned_test_functions.jsonl/66145 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 310
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
1243,
2172,
7233,
9187,
68552,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
9585,
2036,
33428,
280,
8822,
33428,
368,
5613,
2575,
508,
40923,
27766,
9585,
2036,
425,
27,
91,
29,
277,
198,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_handle_new_root() {
let genesis_config = create_genesis_config(10_000).genesis_config;
let bank0 = Bank::new_for_tests(&genesis_config);
let bank_forks = Arc::new(RwLock::new(BankForks::new(bank0)));
let root = 3;
let root_bank = Bank::new_from_parent(
... | rust_cleaned_test_functions.jsonl/25802 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1754
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10630,
5921,
12993,
368,
341,
286,
1077,
59366,
5332,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
568,
77894,
5332,
280,
286,
1077,
6073,
15,
284,
8547,
486,
931,
5478,
32509,
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... | 2 |
#[test]
fn test_ls_oneline() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch(&at.plus_as_string("test-oneline-1"));
at.touch(&at.plus_as_string("test-oneline-2"));
// except on Windows.
for option in &["-1", "--format=single-column"] {
scen... | rust_cleaned_test_functions.jsonl/71201 | {
"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,
53174,
4470,
4834,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
280,
262,
518,
42129,
2099,
266,
60540,
11898,
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... | 2 |
#[test]
fn test_fold_object_literal_ref1() {
// Leave extra side-effects in place
fold_same("var x = ({a:foo(),b:bar()}).a");
fold_same("var x = ({a:1,b:bar()}).a");
fold_same("function f() { return {b:foo(), a:2}.a; }");
// on the LHS the object act as a temporary leave it in place.
fo... | rust_cleaned_test_functions.jsonl/122225 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1411
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
61187,
5314,
34100,
7793,
16,
368,
341,
262,
442,
25193,
4960,
3108,
74788,
304,
1992,
198,
262,
11555,
33574,
445,
947,
856,
284,
9469,
64,
25,
7975,
1507,
65,
25,
2257,
368,
16630,
64,
797,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_adjust_max() {
assert_eq!(100.0, adjust_max(0.0, 100.0));
assert_eq!(100.0, adjust_max(100.0, 5.0));
assert_eq!(100.0, adjust_max(0.0, 100.0));
} | rust_cleaned_test_functions.jsonl/80584 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44153,
6345,
368,
341,
286,
2060,
10714,
10297,
16,
15,
15,
13,
15,
11,
7500,
6345,
7,
15,
13,
15,
11,
220,
16,
15,
15,
13,
15,
1106,
286,
2060,
10714,
10297,
16,
15,
15,
13,
15,
11,
750... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_chrono_value() {
let timestamp = chrono::NaiveDate::from_ymd(2020, 1, 1).and_hms(2, 2, 2);
let value: Value = timestamp.into();
let out: NaiveDateTime = value.unwrap();
assert_eq!(out, timestamp);
} | rust_cleaned_test_functions.jsonl/12485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 120
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4138,
2248,
78,
3142,
368,
341,
286,
1077,
11441,
284,
80372,
486,
16193,
533,
1916,
486,
1499,
62,
1600,
67,
7,
17,
15,
17,
15,
11,
220,
16,
11,
220,
16,
568,
437,
1523,
1011,
7,
17,
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_language_id() {
assert_eq!(
"javascript".parse::<LanguageId>().unwrap(),
LanguageId::JavaScript
);
assert_eq!(
"javascriptreact".parse::<LanguageId>().unwrap(),
LanguageId::Jsx
);
assert_eq!("jsx".parse::<LanguageId>().unwrap(), LanguageId::Jsx);
a... | rust_cleaned_test_functions.jsonl/89758 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 387
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
29021,
842,
368,
341,
262,
2060,
10714,
33673,
414,
330,
14073,
3263,
6400,
27638,
13806,
764,
10483,
15454,
3148,
414,
11434,
764,
486,
29475,
198,
262,
1439,
262,
2060,
10714,
33673,
414,
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... | 1 |
#[test]
fn test_fun_to_string() {
with_globals(|| {
let abba_ident = ast::Ident::from_str("abba");
let decl = ast::FnDecl {
inputs: Vec::new(),
output: ast::FunctionRetTy::Default(syntax_pos::DUMMY_SP),
variadic: false
... | rust_cleaned_test_functions.jsonl/45443 | {
"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,
28315,
2346,
3904,
368,
341,
286,
448,
58775,
79453,
341,
310,
1077,
668,
4645,
38399,
284,
11763,
486,
28301,
486,
1499,
2895,
445,
370,
4645,
3071,
310,
1077,
3963,
284,
11763,
486,
24911,
21629... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_record_literal_field_default() {
let test_code = r#"
struct S { foo: u32, bar: usize }
impl core::default::Default for S {
fn default() -> Self {
S {
foo: 0,
bar: 0,
}
}
}
fn process(f: S) {
let other = S {
foo: 5,
.<|... | rust_cleaned_test_functions.jsonl/60475 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 414
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
14192,
34100,
5013,
9993,
368,
341,
286,
1077,
1273,
4136,
284,
435,
2,
698,
1235,
328,
314,
15229,
25,
575,
18,
17,
11,
3619,
25,
22301,
555,
6383,
6200,
486,
2258,
486,
3675,
369,
328,
341,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_debug_value_range_builder() {
use super::ValueLabelRangesBuilder;
use crate::debug::ModuleMemoryOffset;
use cranelift_codegen::ir::StackSlots;
use wasmtime_environ::{DefinedFuncIndex, EntityRef};
let addr_tr = create_mock_address_transform();
let ... | rust_cleaned_test_functions.jsonl/7227 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 886
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15446,
3142,
9698,
28532,
368,
341,
286,
990,
2256,
486,
1130,
2476,
74902,
3297,
280,
286,
990,
17717,
486,
8349,
486,
3332,
10642,
6446,
280,
286,
990,
1560,
2387,
2085,
32018,
486,
404,
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_checkout_blob_to_tree() -> BitResult<()> {
BitRepo::with_minimal_repo(|repo| {
let target = commit! {
foo {
bar < "bar contents"
}
};
bit_checkout!(repo: &rev!(target))?;
assert_eq!(cat!(repo: "foo/bar"), "bar contents")... | rust_cleaned_test_functions.jsonl/62971 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 195
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
68186,
45908,
2346,
11663,
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,
15229,
341,
394,
3619,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_eq() {
let a = DerefGc::new(1);
let b = DerefGc::new(1);
assert_eq!(a, a);
assert_eq!(b, b);
assert_eq!(a, b);
assert_eq!(b, a);
assert!(a.ptr_eq(&a));
assert!(b.ptr_eq(&b));
assert!(!a.ptr_eq(&b));
assert!(!b.ptr_e... | rust_cleaned_test_functions.jsonl/35065 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 232
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10714,
368,
341,
286,
1077,
264,
284,
422,
43970,
38,
66,
486,
931,
7,
16,
317,
286,
1077,
293,
284,
422,
43970,
38,
66,
486,
931,
7,
16,
317,
286,
2060,
10714,
10297,
64,
11,
264,
317,
28... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_requesting_bin_summary() {
run_with_server(|mut test_env| {
let new_bin = test_env.create_bin().unwrap();
let bin_id = new_bin.id;
let requests = vec![
ServerRequest {
method: Method::Get,
headers: Headers::new(),
... | rust_cleaned_test_functions.jsonl/56479 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
7893,
287,
21816,
27251,
368,
341,
262,
1598,
6615,
12015,
22428,
6984,
1273,
15879,
91,
341,
286,
1077,
501,
21816,
284,
1273,
15879,
2520,
21816,
1005,
15454,
543,
286,
1077,
9544,
842,
284,
501... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_one() {
let one = Complex64::one();
assert!(one.is_one());
let mut c = Complex::new(1.23, 4.56);
assert!(!c.is_one());
assert_eq!(c * one, c);
c.set_one();
assert!(c.is_one());
} | rust_cleaned_test_functions.jsonl/105675 | {
"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,
11667,
368,
341,
286,
1077,
825,
284,
22096,
21,
19,
486,
603,
543,
286,
2060,
10297,
603,
2079,
11667,
5231,
286,
1077,
5206,
272,
284,
22096,
486,
931,
7,
16,
13,
17,
18,
11,
220,
19,
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_dim_compact_single_bare_duplicate_definition() {
// single is the default type
let program = r#"
DIM A!
DIM A
"#;
assert_linter_err!(program, QError::DuplicateDefinition, 3, 17);
} | rust_cleaned_test_functions.jsonl/122459 | {
"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,
10791,
18177,
531,
19487,
880,
546,
70434,
31698,
368,
341,
262,
442,
3175,
374,
279,
1638,
943,
198,
262,
1077,
2025,
284,
435,
2,
698,
310,
50859,
362,
4894,
310,
50859,
362,
198,
310,
5869,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_signature_serde() {
use serde_test::{Configure, Token, assert_tokens};
let s = Secp256k1::new();
let msg = Message::from_slice(&[1; 32]).unwrap();
let sk = SecretKey::from_slice(&[2; 32]).unwrap();
let sig = s.sign(&msg, &sk);
static SIG_BYTES: [... | rust_cleaned_test_functions.jsonl/12679 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 582
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39859,
75861,
450,
368,
341,
286,
990,
61570,
4452,
22964,
28560,
11,
9660,
11,
2060,
28838,
2315,
286,
1077,
274,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
1428,
286,
1077,
3750,
284,
4856... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_mention_type() {
assert_eq!(
MentionType::Channel(ChannelId::new(123).expect("non zero")),
MentionType::parse("<#123>").unwrap()
);
assert_eq!(
MentionType::Emoji(EmojiId::new(123).expect("non zero")),
MentionType::par... | rust_cleaned_test_functions.jsonl/3590 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 500
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
26985,
290,
1819,
368,
341,
286,
2060,
10714,
33673,
310,
85148,
929,
486,
9629,
68420,
764,
486,
931,
7,
16,
17,
18,
568,
17119,
445,
6280,
7168,
30154,
310,
85148,
929,
486,
6400,
9639,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_missing_traffic_model() {
let inp = CsvRecord {
id: "1".to_string(),
origin_lat: "-37.820189".to_string(),
origin_lon: "145.149954".to_string(),
destination_lat: "-37.819681".to_string(),
destination_lon: "144.952302".to_string(... | rust_cleaned_test_functions.jsonl/75496 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 324
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
40447,
90012,
5047,
368,
341,
286,
1077,
32344,
284,
91671,
6471,
341,
310,
877,
25,
330,
16,
3263,
983,
3904,
3148,
310,
6238,
26174,
25,
6523,
18,
22,
13,
23,
17,
15,
16,
23,
24,
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_split_off_empty_right() {
let mut data = rand_data(173);
let mut map = BTreeMap::from_iter(data.clone());
let right = map.split_off(&(data.iter().max().unwrap().0 + 1));
data.sort();
assert!(map.into_iter().eq(data));
assert!(right.into_iter().eq(None));
} | rust_cleaned_test_functions.jsonl/49403 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 128
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
13651,
15124,
10539,
368,
341,
262,
1077,
5206,
821,
284,
10382,
1769,
7,
16,
22,
18,
626,
262,
1077,
5206,
2415,
284,
425,
6533,
2227,
486,
1499,
11723,
2592,
15997,
1423,
262,
1077,
129... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_process_withdraw_ix_no_acc_data_fail() {
let nonce_address = Pubkey::new_unique();
process_nonce_instruction(
system_instruction::withdraw_nonce_account(
&nonce_address,
&Pubkey::new_unique(),
&nonce_address,
... | rust_cleaned_test_functions.jsonl/95895 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 227
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
6615,
7633,
62686,
6536,
17737,
1769,
22121,
368,
341,
286,
1077,
39676,
6744,
284,
22611,
792,
486,
931,
21218,
543,
286,
1882,
48508,
54923,
1006,
310,
1849,
54923,
486,
62446,
48508,
13500... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_static_method() {
let c_str = unsafe { bindings::Test::name() };
let name = unsafe { CStr::from_ptr(c_str).to_string_lossy().into_owned() };
assert_eq!(name, "Test", "Calling a static C++ method works!");
} | rust_cleaned_test_functions.jsonl/27994 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
9032,
368,
341,
262,
1077,
272,
2895,
284,
19860,
314,
35700,
486,
2271,
486,
606,
368,
2605,
262,
1077,
829,
284,
19860,
314,
356,
2580,
486,
1499,
4348,
1337,
2895,
568,
983,
3904,
1119... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unk_token() {
// 1. Should add `unk_token` as first special token
let trainer = UnigramTrainerBuilder::default()
.show_progress(false)
.special_tokens(vec![
AddedToken::from("[SEP]", true),
AddedToken::from("[CLS]", true),
... | rust_cleaned_test_functions.jsonl/18987 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1187
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3122,
6458,
368,
341,
286,
442,
220,
16,
13,
12260,
912,
1565,
3122,
6458,
63,
438,
1156,
3281,
3950,
198,
286,
1077,
28894,
284,
1230,
49127,
1282,
1743,
3297,
486,
2258,
741,
310,
659,
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_invalid_accounts_len() {
let pubkey = Pubkey::new_rand();
let mut accounts = [Account::default()];
let ix =
storage_instruction::mining_proof(&pubkey, Hash::default(), 0, Signature::default());
assert!(test_instruction(&ix, &mut accounts).is_err());
... | rust_cleaned_test_functions.jsonl/127032 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 189
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
55665,
6043,
368,
341,
286,
1077,
95116,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
5206,
9618,
284,
508,
7365,
486,
2258,
368,
4821,
286,
1077,
26864,
4035,
310,
5819,
54923,
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_crystal_shard_version() -> io::Result<()> {
let config_name = "shard.yml";
let config_content = "name: starship\nversion: 1.2.3\n".to_string();
let project_dir = create_project_dir()?;
fill_config(&project_dir, config_name, Some(&config_content))?;
expec... | rust_cleaned_test_functions.jsonl/100110 | {
"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,
32331,
13946,
3712,
567,
9438,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
2193,
1269,
284,
330,
927,
567,
33936,
876,
286,
1077,
2193,
7495,
284,
330,
606,
25,
6774,
5270,
1699,
4366,
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... | 3 |
#[test]
fn test_ls_sort_name() {
let scene = TestScenario::new(util_name!());
let at = &scene.fixtures;
at.touch("test-3");
at.touch("test-1");
at.touch("test-2");
let sep = if cfg!(unix) { "\n" } else { " " };
scene
.ucmd()
.arg("--sort=name")
.succeeds()... | rust_cleaned_test_functions.jsonl/71204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 388
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53174,
18435,
1269,
368,
341,
262,
1077,
6109,
284,
3393,
54031,
486,
931,
67811,
1269,
0,
1423,
262,
1077,
518,
284,
609,
22483,
67785,
18513,
401,
262,
518,
42129,
445,
1944,
12,
18,
797,
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... | 2 |
#[test]
fn test_automatic_refund_works_for_multiple_payments() {
new_test_ext().execute_with(|| {
const CANCEL_PERIOD: u64 = 600;
assert_ok!(Payment::pay(
Origin::signed(PAYMENT_CREATOR),
PAYMENT_RECIPENT,
CURRENCY_ID,
20,
None
));
assert_ok!(Payment::pay(
Origin::signed(PAYMENT_CRE... | rust_cleaned_test_functions.jsonl/112006 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 771
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
32808,
13487,
7793,
1241,
11498,
82,
5478,
45233,
91257,
368,
341,
8638,
4452,
9927,
1005,
10257,
6615,
79453,
341,
197,
4777,
356,
29999,
43166,
25,
575,
21,
19,
284,
220,
21,
15,
15,
401,
197,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_clone() {
let mut a = TrieMap::new();
a.insert(1, 'a');
a.insert(2, 'b');
a.insert(3, 'c');
assert!(a.clone() == a);
} | rust_cleaned_test_functions.jsonl/7302 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
368,
341,
286,
1077,
5206,
264,
284,
62783,
2227,
486,
931,
1428,
286,
264,
7030,
7,
16,
11,
364,
64,
1157,
286,
264,
7030,
7,
17,
11,
364,
65,
1157,
286,
264,
7030,
7,
18,
11,
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 |
#[test]
fn test_example_4() {
let launch = Vector::new(Position::origin(), 17, -4);
let target = Rectangle::new(20, 30, -10, -5);
let arc = hit_arc(&launch, &target);
assert_eq!(false, arc.is_some());
} | rust_cleaned_test_functions.jsonl/124104 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 115
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
39304,
62,
19,
368,
341,
286,
1077,
7050,
284,
4196,
486,
931,
61843,
486,
8611,
1507,
220,
16,
22,
11,
481,
19,
626,
286,
1077,
2169,
284,
19280,
486,
931,
7,
17,
15,
11,
220,
18,
15,
11,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_snapshot1_create_dir() {
assert_wasi_output!(
"../../wasitests/snapshot1/create_dir.wasm",
"snapshot1_create_dir",
vec![std::path::PathBuf::from("."),],
vec![],
vec![],
"../../wasitests/create_dir.out"
);
} | rust_cleaned_test_functions.jsonl/66529 | {
"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,
53265,
16,
8657,
4334,
368,
341,
262,
2060,
1670,
10215,
7645,
33673,
286,
10208,
16123,
275,
17966,
2687,
9601,
16,
25577,
4334,
1418,
10530,
756,
286,
330,
35501,
16,
8657,
4334,
756,
286,
7486,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_panic_packet_length() {
// Test that a packet whose payload is longer than 2^16 - 1 bytes is
// rejected.
let _: Buf<&mut [u8]> = Buf::new(&mut [0; 1 << 16][..], ..)
.encapsulate(new_builder())
.serialize_vec_outer()
.unwrap()... | rust_cleaned_test_functions.jsonl/85894 | {
"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,
88686,
620,
31270,
21078,
5118,
368,
341,
286,
442,
3393,
429,
264,
10151,
6693,
7729,
374,
5021,
1091,
220,
17,
61,
16,
21,
481,
220,
16,
5820,
374,
198,
286,
442,
17551,
624,
286,
1077,
5853... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lifetimes() {
// Explicit 'static OCTET_STRING
let result = crate::parse(b"\x04\x01\x00", |p| p.read_element::<&'static [u8]>()).unwrap();
assert_eq!(result, b"\x00");
// Explicit 'static SEQUENCE containing an explicit 'static OCTET_STRING
let result = c... | rust_cleaned_test_functions.jsonl/40816 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 668
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
907,
333,
6889,
368,
341,
286,
442,
31330,
364,
1978,
66177,
1348,
12283,
198,
286,
1077,
1102,
284,
17717,
486,
6400,
1883,
11934,
87,
15,
19,
3462,
15,
16,
3462,
15,
15,
497,
760,
79,
91,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_nv_index_attributes_builder_missing_write_attribute_failure() {
// Test missing write error
// Building with only PP read set this should result in an error
single_attribute_error!(with_pp_read);
// Building with only owner read set this should result in an error... | rust_cleaned_test_functions.jsonl/57725 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 429
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
79430,
3560,
18240,
28532,
40447,
9165,
16791,
43618,
368,
341,
286,
442,
3393,
7402,
3270,
1465,
271,
286,
442,
16858,
448,
1172,
29850,
1349,
738,
419,
1265,
1102,
304,
458,
1465,
198,
286,
3175... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_vector_2() {
let secp = Secp256k1::new();
let seed = from_hex("fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542").unwrap();
// m
test_path(&secp, &seed, &[],
"xprv9s21ZrQH143K31xYSDQpPDxsXR... | rust_cleaned_test_functions.jsonl/85727 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1760
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12247,
62,
17,
368,
341,
197,
10217,
511,
4672,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
543,
197,
10217,
10320,
284,
504,
32655,
445,
542,
8316,
69,
24,
69,
21,
69,
18,
69,
15,
15326,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_deposit_pausability() {
let (master_account, contract) = init(CUSTODIAN_ADDRESS);
let user_account = create_user_account(&master_account);
// 1st deposit call - should succeed
let promises = call_deposit_with_proof(&user_account, CONTRACT_ACC, PROOF_DATA_NEAR);
for p in prom... | rust_cleaned_test_functions.jsonl/112878 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 580
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
85798,
620,
11855,
2897,
368,
341,
262,
1077,
320,
13629,
13500,
11,
5116,
8,
284,
2930,
3025,
8553,
2069,
22002,
20135,
317,
262,
1077,
1196,
13500,
284,
1855,
3317,
13500,
2099,
13629,
13500,
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... | 3 |
#[test]
fn test_rigid_decomposition() {
let translation = Vector3D::new(12.1, 17.8, -5.5);
let rotation = Rotation3D::unit_quaternion(0.5, -7.8, 2.2, 4.3);
let rigid = RigidTransform3D::new(rotation, translation);
let (t2, r2) = rigid.decompose_reversed();
assert!(rigid
... | rust_cleaned_test_functions.jsonl/43229 | {
"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,
1710,
20926,
2259,
76807,
368,
341,
286,
1077,
14468,
284,
4196,
18,
35,
486,
931,
7,
16,
17,
13,
16,
11,
220,
16,
22,
13,
23,
11,
481,
20,
13,
20,
317,
286,
1077,
12695,
284,
47528,
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_bitwise_lmd_ghost() {
// set up logging
test_yaml_vectors(
ForkChoiceAlgorithm::BitwiseLMDGhost,
"tests/bitwise_lmd_ghost_test_vectors.yaml",
100,
);
} | rust_cleaned_test_functions.jsonl/13881 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 111
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13996,
4482,
907,
2277,
98784,
368,
341,
262,
442,
738,
705,
8392,
87079,
262,
1273,
64380,
49158,
1006,
286,
47850,
24728,
27847,
486,
8344,
4482,
43,
6076,
64686,
345,
286,
330,
23841,
86644,
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 |
#[test]
fn test_print0() {
let te = TestEnv::new(DEFAULT_DIRS, DEFAULT_FILES);
te.assert_output(
&["--print0", "foo"],
"a.fooNULL
one/b.fooNULL
one/two/C.Foo2NULL
one/two/c.fooNULL
one/two/three/d.fooNULL
one/two/three/directory_fooNULL",
);
} | rust_cleaned_test_functions.jsonl/10873 | {
"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,
10064,
15,
368,
341,
262,
1077,
1013,
284,
3393,
14359,
486,
931,
43175,
90560,
11,
11955,
48010,
626,
262,
1013,
3713,
7645,
1006,
286,
609,
1183,
313,
1350,
15,
497,
330,
7975,
8097,
286,
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_sth() {
disasm!("entrypoint:\n sth [r1+0x2], 3\n");
disasm!("entrypoint:\n sth [r1-0x2], 3\n");
} | rust_cleaned_test_functions.jsonl/68760 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 77
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1261,
71,
368,
341,
262,
827,
10530,
17223,
4085,
2768,
7190,
77,
262,
357,
71,
508,
81,
16,
10,
15,
87,
17,
1125,
220,
18,
1699,
797,
262,
827,
10530,
17223,
4085,
2768,
7190,
77,
262,
357,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_list_notifications() {
block_on(async {
let (client, mut session) = test_helpers::authenticated_client("notificationsuserid").await;
client
.rpc(&mut session, "echo", Some("Hello World!"))
.await
.expect("Failed to call echo rpc");
... | rust_cleaned_test_functions.jsonl/50265 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 403
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
67546,
368,
341,
262,
2504,
4470,
18285,
341,
286,
1077,
320,
2972,
11,
5206,
3797,
8,
284,
1273,
54473,
486,
57707,
8179,
445,
38188,
20085,
1827,
11421,
280,
286,
2943,
198,
310,
659,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_create_reaction() {
let emoji = emoji();
let route = Route::CreateReaction {
channel_id: CHANNEL_ID,
emoji: &emoji,
message_id: MESSAGE_ID,
};
assert_eq!(
route.to_string(),
format!(
"cha... | rust_cleaned_test_functions.jsonl/119865 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 313
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
96631,
368,
341,
286,
1077,
42365,
284,
42365,
1428,
286,
1077,
6021,
284,
9572,
486,
4021,
87236,
341,
310,
5496,
842,
25,
58756,
3450,
345,
310,
42365,
25,
609,
37523,
345,
310,
1943,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stateless_seperation() {
let params: NoiseParams = "Noise_NN_25519_AESGCM_SHA256".parse().unwrap();
let mut h_i = Builder::new(params.clone()).build_initiator().unwrap();
let mut h_r = Builder::new(params).build_responder().unwrap();
let mut buffer_msg = [0u8; 200];
let mut ... | rust_cleaned_test_functions.jsonl/27120 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 474
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4387,
1717,
3453,
91774,
368,
341,
262,
1077,
3628,
25,
50523,
4870,
284,
330,
61819,
1604,
45,
62,
17,
20,
20,
16,
24,
69381,
38,
9985,
38096,
17,
20,
21,
3263,
6400,
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... | 3 |
#[test]
fn test_bytes_to_int() {
assert_eq!(bytes_to_int(&[0x7F]), 127);
assert_eq!(bytes_to_int(&[0xFE]), -2);
assert_eq!(bytes_to_int(&[0x00, 0x05]), 5);
} | rust_cleaned_test_functions.jsonl/32841 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 110
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12524,
2346,
4042,
368,
341,
286,
2060,
10714,
10297,
9651,
2346,
4042,
2099,
58,
15,
87,
22,
37,
9719,
220,
16,
17,
22,
317,
286,
2060,
10714,
10297,
9651,
2346,
4042,
2099,
58,
15,
41381,
97... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_usage_description_wrapping() {
// indentation should be 24 spaces
// lines wrap after 78: or rather descriptions wrap after 54
let mut opts = Options::new();
opts.optflag(
"k",
"kiwi",
"This is a long description which won't be wrapped..+..",
);
... | rust_cleaned_test_functions.jsonl/52391 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 455
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31507,
11448,
44074,
3629,
368,
341,
262,
442,
69592,
1265,
387,
220,
17,
19,
12621,
198,
262,
442,
5128,
15061,
1283,
220,
22,
23,
25,
476,
4751,
27787,
15061,
1283,
220,
20,
19,
271,
262,
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_hints_has_only_highest_inbound_capacity_channel() {
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 _cha... | rust_cleaned_test_functions.jsonl/65872 | {
"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,
1523,
21042,
21778,
18410,
1523,
7504,
1243,
10891,
35603,
14571,
368,
341,
197,
10217,
26023,
1645,
18343,
82,
284,
1855,
45552,
1645,
18343,
82,
7,
17,
317,
197,
10217,
2436,
18343,
82,
284,
185... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_empty_private_dict() {
// no non-default values to be stored.
let dict = ReadScope::new(&[]).read::<PrivateDict>();
assert!(dict.is_ok());
} | rust_cleaned_test_functions.jsonl/85334 | {
"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,
6443,
15124,
26249,
5243,
368,
341,
1789,
286,
442,
902,
2477,
13672,
2750,
311,
387,
9768,
624,
286,
1077,
6451,
284,
4457,
10803,
486,
931,
2099,
1294,
568,
878,
27638,
16787,
13448,
3913,
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 |
#[test]
fn test_find_duplicate() {
let a1 = &[1, 2, 3, 1];
assert_eq!(find_duplicate(a1), Some((0, 3)));
let a2 = &[1, 2, 2, 1];
assert_eq!(find_duplicate(a2), Some((0, 3)));
let a3 = &[1, 1, 1, 1];
assert_eq!(find_duplicate(a3), Some((0, 1)));
let a4 =... | rust_cleaned_test_functions.jsonl/10952 | {
"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,
21814,
70434,
368,
341,
286,
1077,
264,
16,
284,
44590,
16,
11,
220,
17,
11,
220,
18,
11,
220,
16,
935,
286,
2060,
10714,
10297,
3903,
70434,
2877,
16,
701,
4329,
1188,
15,
11,
220,
18,
2252... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_tailn() {
let mut a = vec![11i, 12, 13];
assert_eq!(a.tailn(0), &[11, 12, 13]);
a = vec![11i, 12, 13];
assert_eq!(a.tailn(2), &[13]);
} | rust_cleaned_test_functions.jsonl/33128 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 117
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35471,
77,
368,
341,
286,
1077,
5206,
264,
284,
7486,
20703,
16,
16,
72,
11,
220,
16,
17,
11,
220,
16,
18,
935,
286,
2060,
10714,
10297,
64,
38711,
77,
7,
15,
701,
44590,
16,
16,
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_dat_unicode_japanese() {
let strs: Vec<&str> = vec!["アルゴリズム", "データ", "構造"];
let da = DoubleArrayTrieBuilder::new().build(&strs);
let input1 = "データ構造とアルゴリズム";
let result1: Vec<&str> = da
.common_prefix_iter(input1)
.map(|(end_idx, _)| &inpu... | rust_cleaned_test_functions.jsonl/6383 | {
"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,
15353,
54662,
5374,
28689,
368,
341,
286,
1077,
57584,
25,
11312,
52244,
495,
29,
284,
7486,
0,
1183,
125760,
125619,
36723,
77425,
89962,
497,
330,
131552,
497,
330,
101831,
66078,
6332,
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_iterator_skip_nth() {
let xs = [0, 1, 2, 3, 5, 13, 15, 16, 17, 19, 20, 30];
let mut it = xs.iter().skip(0);
assert_eq!(it.nth(0), Some(&0));
assert_eq!(it.nth(1), Some(&2));
let mut it = xs.iter().skip(5);
assert_eq!(it.nth(0), Some(&13));
assert_eq!(it.nth(1), Some... | rust_cleaned_test_functions.jsonl/25909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 207
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
13491,
44830,
78342,
368,
341,
262,
1077,
11943,
284,
508,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
20,
11,
220,
16,
18,
11,
220,
16,
20,
11,
220,
16,
21,
11,
220,
16,
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... | 1 |
#[test]
fn test_subexpression() {
let mut hbs = Handlebars::new();
hbs.register_helper("gt", Box::new(GtHelper));
hbs.register_helper("not", Box::new(NotHelper));
let data = json!({"a": 1, "b": 0, "c": 2});
assert_eq!(
hbs.render_template("{{#if (gt a b)}}Success{{else}}Failed{{/i... | rust_cleaned_test_functions.jsonl/47010 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 676
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5228,
28099,
368,
341,
262,
1077,
5206,
305,
1279,
284,
13760,
24950,
486,
931,
1428,
262,
305,
1279,
9929,
10418,
445,
5178,
497,
8261,
486,
931,
6699,
83,
5511,
1106,
262,
305,
1279,
9929,
104... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_current_user_retrieval() {
let cache = InMemoryCache::new();
assert!(cache.current_user().is_none());
cache.cache_current_user(current_user(1));
assert!(cache.current_user().is_some());
} | rust_cleaned_test_functions.jsonl/86437 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 109
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11080,
3317,
1288,
8927,
831,
368,
341,
286,
1077,
6500,
284,
758,
10642,
8233,
486,
931,
543,
286,
2060,
10297,
9360,
4952,
3317,
1005,
285,
31488,
1423,
286,
6500,
20087,
11080,
3317,
8762,
3317... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.