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_207() {
assert_eq!(Solution::can_finish(2, vec![vec![1, 0]]), true);
assert_eq!(Solution::can_finish(2, vec![vec![1, 0], vec![0, 1]]), false);
} | rust_cleaned_test_functions.jsonl/79214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 99
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
17,
15,
22,
368,
341,
286,
2060,
10714,
10297,
36842,
486,
4814,
42980,
7,
17,
11,
7486,
20703,
4083,
20703,
16,
11,
220,
15,
5053,
701,
830,
626,
286,
2060,
10714,
10297,
36842,
486,
4814... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_async_fetch() {
let count = 3;
let mut cluster = new_node_cluster(0, count);
cluster.cfg.raft_store.raft_log_gc_count_limit = Some(100000);
cluster.cfg.raft_store.raft_log_gc_threshold = 50;
cluster.cfg.raft_store.raft_log_gc_size_limit = Some(ReadableSize::mb(20));
... | rust_cleaned_test_functions.jsonl/117672 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1479
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5084,
28346,
11803,
368,
341,
262,
1077,
1760,
284,
220,
18,
280,
262,
1077,
5206,
10652,
284,
501,
5084,
28441,
7,
15,
11,
1760,
626,
262,
10652,
30481,
13,
2944,
14809,
13,
2944,
5224,
49423,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_txn_store_gc() {
let key = "k";
let store = AssertionStorage::default();
let (_cluster, violetabft_store) = AssertionStorage::new_violetabft_causet_storage_with_store_count(3, key);
store.test_txn_store_gc(key);
violetabft_store.test_txn_store_gc(key);
} | rust_cleaned_test_functions.jsonl/120731 | {
"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,
92299,
14809,
49423,
368,
341,
262,
1077,
1376,
284,
330,
74,
876,
262,
1077,
3553,
284,
46730,
5793,
486,
2258,
543,
262,
1077,
5453,
18855,
11,
79736,
370,
723,
14809,
8,
284,
46730,
5793,
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_strict_mode_func_decl_in_block() {
// Checks that a function declaration in a block is an error in
let scenario = r#"
'use strict';
let a = 4;
let b = 5;
if (a < b) { function f() {} }
"#;
check_output(&[TestAction::TestStartsWith(
scenario,
... | rust_cleaned_test_functions.jsonl/42875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 161
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2895,
849,
7302,
9596,
35814,
1243,
7113,
368,
341,
262,
442,
24843,
429,
264,
729,
18004,
304,
264,
2504,
374,
458,
1465,
304,
87079,
262,
1077,
15048,
284,
435,
2,
698,
262,
364,
810,
7304,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_trim_all_handles_spaces_correctly() {
// Can't compare a byte array to a Cow so we convert both to slices before comparing
let expected = &b"Some example text"[..];
let actual = &trim_all(b" Some example text ")[..];
assert_eq!(expected, actual);
} | rust_cleaned_test_functions.jsonl/83746 | {
"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,
70025,
5705,
68017,
67883,
31550,
398,
368,
341,
286,
442,
2980,
944,
9429,
264,
4922,
1334,
311,
264,
21851,
773,
582,
5508,
2176,
311,
34254,
1573,
26297,
198,
286,
1077,
3601,
284,
609,
65,
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_decode_glyf() {
let buffer = read_fixture("tests/fonts/opentype/test-font.ttf");
let file = ReadScope::new(&buffer).read::<OpenTypeFont>().unwrap();
let glyph = Glyph {
number_of_contours: 1,
bounding_box: BoundingBox {
x_min: 1761,
y_min: 565,... | rust_cleaned_test_functions.jsonl/31763 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1308
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
1889,
398,
69,
368,
341,
262,
1077,
4147,
284,
1349,
74409,
445,
23841,
60667,
52000,
306,
499,
12697,
30671,
45192,
797,
262,
1077,
1034,
284,
4457,
10803,
486,
931,
2099,
7573,
568,
878,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_old_value() {
struct Case {
expected: OldValue,
// all data to write to the engine
// current write_cursor will be on the last record in `written`
// which also means prev_write is `Write` in the record
written... | rust_cleaned_test_functions.jsonl/125635 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 3660
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
21108,
3142,
368,
341,
286,
2036,
11538,
341,
310,
3601,
25,
10621,
1130,
3554,
3374,
310,
442,
678,
821,
311,
3270,
311,
279,
4712,
198,
310,
442,
1482,
3270,
28601,
686,
387,
389,
279,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_date_pred() {
let ymd = |y,m,d| NaiveDate::from_ymd(y, m, d);
assert_eq!(ymd(2016, 3, 1).pred_opt(), Some(ymd(2016, 2, 29)));
assert_eq!(ymd(2015, 1, 1).pred_opt(), Some(ymd(2014, 12, 31)));
assert_eq!(ymd(2014, 6, 1).pred_opt(), Some(ymd(2014, 5, 31)));
a... | rust_cleaned_test_functions.jsonl/4767 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4164,
12830,
368,
341,
286,
1077,
379,
2277,
284,
760,
88,
13086,
11991,
91,
12812,
533,
1916,
486,
1499,
62,
1600,
67,
7021,
11,
296,
11,
294,
317,
286,
2060,
10714,
10297,
1600,
67,
7,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_num_flotante() {
assert_eq!(num_flotante("1.1"), Ok(("", ("1.1", "flotante"))));
assert_eq!(num_flotante("11.23"), Ok(("", ("11.23", "flotante"))));
assert_eq!(num_flotante("112.3131"), Ok(("", ("112.3131", "flotante"))));
assert_eq!(num_flotante("0.3131"), Ok(("", ... | rust_cleaned_test_functions.jsonl/46885 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4273,
5081,
354,
4942,
368,
341,
262,
2060,
10714,
10297,
2413,
5081,
354,
4942,
445,
16,
13,
16,
3975,
981,
7622,
7,
19814,
3489,
16,
13,
16,
497,
330,
1489,
354,
4942,
2761,
1106,
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_deregister_conn_then_delegate() {
let (mut ep, raft_router, _task_rx) = mock_endpoint(&CdcConfig::default());
let _raft_rx = raft_router.add_region(1 /* region id */, 100 /* cap */);
let quota = crate::channel::MemoryQuota::new(usize::MAX);
// Open conn a
... | rust_cleaned_test_functions.jsonl/111884 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1629
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
52633,
1571,
17241,
68367,
55312,
368,
341,
286,
1077,
320,
6984,
4155,
11,
52455,
55587,
11,
716,
8202,
24330,
8,
284,
7860,
36699,
2099,
34,
7628,
2648,
486,
2258,
1423,
286,
1077,
716,
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_read_extensions() {
let sample = vec![0, 1, 0, 1, 9, 9, 12];
let mut reader = sample.as_slice();
assert_eq!(reader.read_u32().unwrap(), 65537);
assert_eq!(reader.read_n(2).unwrap(), vec![9, 9]);
assert_eq!(reader.read_u8().unwrap(), 12);
} | rust_cleaned_test_functions.jsonl/133018 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 153
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
60498,
368,
341,
286,
1077,
6077,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
15,
11,
220,
16,
11,
220,
24,
11,
220,
24,
11,
220,
16,
17,
935,
286,
1077,
5206,
6604,
284,
6077,
5357,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiple_chain() {
let leaves = create_leaves(50..52);
let mock_store = Arc::new(MockAccumulatorStore::new());
let accumulator = MerkleAccumulator::new(
*ACCUMULATOR_PLACEHOLDER_HASH,
vec![],
0,
0,
mock_store.clone(),
);
let root_hash =... | rust_cleaned_test_functions.jsonl/51489 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 807
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45233,
30583,
368,
341,
262,
1077,
10901,
284,
1855,
11751,
4693,
7,
20,
15,
496,
20,
17,
317,
262,
1077,
7860,
14809,
284,
19689,
486,
931,
66436,
14603,
372,
10511,
6093,
486,
931,
1423,
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... | 4 |
#[test]
fn test_client_async() {
println!("Async Client test: Starting runtime");
let mut rt = ::tokio::runtime::Runtime::new().unwrap();
println!("Creating client");
let client = test_client();
println!("Getting summary");
let summary = rt.block_on(client.summa... | rust_cleaned_test_functions.jsonl/101822 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 405
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8179,
28346,
368,
341,
286,
13751,
17223,
6525,
8423,
1273,
25,
27657,
15592,
797,
286,
1077,
5206,
16677,
284,
3504,
29594,
815,
486,
22255,
486,
15123,
486,
931,
1005,
15454,
1428,
286,
13751,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_download_sst_then_ingest() {
for cf in &[CF_DEFAULT, CF_WRITE] {
// creates a sample SST file.
let (_ext_sst_dir, backend, mut meta) = create_sample_external_sst_file().unwrap();
meta.set_cf_name((*cf).to_string());
// performs the downloa... | rust_cleaned_test_functions.jsonl/4966 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1442
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35939,
643,
267,
68367,
59112,
477,
368,
341,
286,
369,
24111,
304,
44590,
9650,
13811,
11,
20795,
17475,
60,
341,
310,
442,
11450,
264,
6077,
91416,
1034,
624,
310,
1077,
5453,
427,
643,
267,
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... | 3 |
#[test]
fn test_real_transaction() {
let ctx = TestContext::new();
let mut con = ctx.connection();
let key = "the_key";
let _: () = redis::cmd("SET").arg(key).arg(42).query(&mut con).unwrap();
loop {
let _: () = redis::cmd("WATCH").arg(key).query(&mut con).unwrap();
let val... | rust_cleaned_test_functions.jsonl/108956 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 485
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15266,
28884,
368,
341,
262,
1077,
5635,
284,
3393,
1972,
486,
931,
543,
262,
1077,
5206,
390,
284,
5635,
20310,
1428,
262,
1077,
1376,
284,
330,
1782,
3097,
876,
262,
1077,
58536,
1719,
284,
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_dereference_document() {
let document = generate_document();
// Dereference methods
match dereference_document(document.clone(), "auth-key").unwrap().unwrap() {
SecondaryResource::VerificationKey(actual) => assert_eq!(actual, document.methods().find(|method| method.id().fragme... | rust_cleaned_test_functions.jsonl/92049 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 546
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
814,
485,
2202,
26231,
368,
341,
262,
1077,
2197,
284,
6923,
26231,
1428,
262,
442,
89678,
2202,
5413,
198,
262,
2432,
25277,
2202,
26231,
15290,
15997,
1507,
330,
3242,
16173,
1827,
15454,
1005,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 6 |
#[test]
fn test_switch_module_priv() {
let mut buf = Vec::new();
switch_module_priv::<(), _>(&[], &mut buf);
assert_eq!(
buf.as_slice(),
&b"switch expects a path to module argument\n"[..]
);
buf.clear();
switch_module_priv::<(), _>(&["foo"... | rust_cleaned_test_functions.jsonl/99214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 330
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27652,
10750,
24726,
368,
341,
286,
1077,
5206,
6607,
284,
11312,
486,
931,
543,
286,
3398,
10750,
24726,
27638,
1507,
716,
44784,
12995,
609,
6984,
6607,
317,
286,
2060,
10714,
33673,
310,
6607,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multiplication() {
let s = Secp256k1::new();
let (mut sk1, mut pk1) = s.generate_keypair(&mut thread_rng()).unwrap();
let (mut sk2, mut pk2) = s.generate_keypair(&mut thread_rng()).unwrap();
assert_eq!(PublicKey::from_secret_key(&s, &sk1).unwrap(), pk1);
... | rust_cleaned_test_functions.jsonl/41405 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 374
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
91802,
1693,
368,
341,
286,
1077,
274,
284,
4520,
79,
17,
20,
21,
74,
16,
486,
931,
1428,
286,
1077,
320,
6984,
1901,
16,
11,
5206,
22458,
16,
8,
284,
274,
22019,
3097,
12670,
2099,
6984,
45... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_lock_combinations() {
let l = RwLock::<usize>::default();
{
let _g = l.write(2);
}
{
let _g = l.write(2);
}
{
let _f = l.read(0);
let _s = l.read(1);
}
{
let _g = l.wri... | rust_cleaned_test_functions.jsonl/77527 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9818,
34454,
12634,
368,
341,
286,
1077,
326,
284,
55294,
11989,
27638,
51878,
6831,
2258,
1428,
286,
341,
310,
1077,
716,
70,
284,
326,
3836,
7,
17,
317,
286,
555,
286,
341,
310,
1077,
716,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_choose_more_words() {
let more_words: Vec<Vec<String>> =
vec![vecstrings("purple yellow"), vecstrings("sausages")];
let expected2 = vecstrings("purple-sausages yellow-sausages");
let expected3: Vec<String> = vec![
"purple-sausages-purple",
... | rust_cleaned_test_functions.jsonl/132786 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 416
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
77433,
36664,
18981,
368,
341,
286,
1077,
803,
18981,
25,
11312,
50439,
3464,
2452,
4035,
310,
7486,
20703,
4083,
18594,
445,
56507,
13753,
3975,
7486,
18594,
445,
9081,
355,
1134,
899,
4821,
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... | 3 |
#[test]
fn test_seek_for_prev_by_existing_key() {
let db = TestDB::new();
let mut iter = db.iter();
iter.seek_for_prev(&TestKey(1, 1, 0)).unwrap();
assert_eq!(collect_values(iter), [110, 112, 114, 200, 202]);
} | rust_cleaned_test_functions.jsonl/3513 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
5478,
25566,
3710,
62630,
3097,
368,
341,
262,
1077,
2927,
284,
3393,
3506,
486,
931,
543,
262,
1077,
5206,
5367,
284,
2927,
19471,
543,
262,
5367,
38179,
5478,
25566,
2099,
2271,
1592,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_polygon() {
let p = polygon!(
exterior: [(x: 0., y: 0.), (x: 0., y: 10.), (x: 10., y: 10.), (x: 10., y: 0.)],
interiors: [
[(x: 1., y: 1.), (x: 1., y: 2.), (x: 2., y: 2.), (x: 2., y: 1.)],
[(x: 3., y: 3.), (x: 5., y: 3.), (x: 5., y:... | rust_cleaned_test_functions.jsonl/83536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 825
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
73542,
368,
341,
286,
1077,
281,
284,
29372,
33673,
310,
27263,
25,
17826,
87,
25,
220,
15,
2572,
379,
25,
220,
15,
24389,
320,
87,
25,
220,
15,
2572,
379,
25,
220,
16,
15,
24389,
320,
87,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_timeout_invoked() {
let mut executor =
fasync::TestExecutor::new_with_fake_time().expect("creating executor failed");
let start_time = executor.now();
let mut stalled_future =
futures::future::pending().on_timeout_named(&DEADLINE_ID, ONE_HOUR, || ... | rust_cleaned_test_functions.jsonl/132103 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 272
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20537,
19996,
10823,
368,
341,
286,
1077,
5206,
31558,
4035,
310,
282,
7692,
486,
2271,
25255,
486,
931,
6615,
56881,
3009,
1005,
17119,
445,
44902,
31558,
4641,
3071,
286,
1077,
1191,
3009,
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... | 2 |
#[test]
fn test_remove_proposal() {
let store = setup_admin_service_store();
let event_store = store.clone_boxed();
let (mesh, cm, pm, peer_connector) = setup_peer_connector(None);
let orchestrator = setup_orchestrator();
let context = Secp256k1Context::new();
le... | rust_cleaned_test_functions.jsonl/47911 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1185
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18193,
21663,
32556,
368,
341,
286,
1077,
3553,
284,
6505,
12207,
12267,
14809,
543,
286,
1077,
1538,
14809,
284,
3553,
15997,
10194,
291,
543,
286,
1077,
320,
23506,
11,
9961,
11,
8836,
11,
14397... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_transfer_with_seed() {
let mut transaction_context = TransactionContext::new(Vec::new(), 1);
let invoke_context = InvokeContext::new_mock(&mut transaction_context, &[]);
let base = Pubkey::new_unique();
let base_account = RefCell::new(AccountSharedData::new(100, 0... | rust_cleaned_test_functions.jsonl/106204 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1243
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
6615,
33809,
368,
341,
286,
1077,
5206,
7745,
8467,
284,
17869,
1972,
486,
931,
49923,
486,
931,
1507,
220,
16,
317,
286,
1077,
19873,
8467,
284,
39667,
1972,
486,
931,
34134,
2099,
6984,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_iterator() {
let cfg = get_test_cfg();
let store = get_test_store(cfg.clone()).clone();
let mut itrs = Vec::new();
let partition_name = String::from("temppartition");
create_segment(1, partition_name.clone(), cfg.clone(), 1, store.clone());
c... | rust_cleaned_test_functions.jsonl/61455 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 786
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20888,
13491,
368,
341,
286,
1077,
13286,
284,
633,
4452,
18343,
543,
286,
1077,
3553,
284,
633,
4452,
14809,
28272,
15997,
6011,
19982,
543,
286,
1077,
5206,
432,
5428,
284,
11312,
486,
931,
543,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 3 |
#[test]
fn test_into_iter_collect() {
let data = vec![5, 9, 3];
let iterout = vec![9, 5, 3];
let pq = BinaryHeap::from(data);
let v: Vec<_> = pq.into_iter().collect();
assert_eq!(v, iterout);
} | rust_cleaned_test_functions.jsonl/62350 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
11723,
68140,
368,
341,
262,
1077,
821,
284,
7486,
20703,
20,
11,
220,
24,
11,
220,
18,
935,
262,
1077,
5367,
411,
284,
7486,
20703,
24,
11,
220,
20,
11,
220,
18,
935,
262,
1077,
3963... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_classes() {
test_roundtrip("class C {}");
test_roundtrip("class C extends D {}");
test_roundtrip(
"class C extends D {
prop1;
#prop2;
constructor() {}
a() {}
#b() {}
c(x, y) {}
static d() {}
... | rust_cleaned_test_functions.jsonl/102603 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 399
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16833,
368,
341,
262,
1273,
29896,
32981,
445,
1040,
356,
4687,
797,
262,
1273,
29896,
32981,
445,
1040,
356,
2239,
422,
4687,
797,
262,
1273,
29896,
32981,
1006,
286,
330,
1040,
356,
2239,
422,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_empty_segment_postings() {
let mut postings = SegmentPostings::empty();
assert!(!postings.advance());
assert!(!postings.advance());
assert_eq!(postings.len(), 0);
} | rust_cleaned_test_functions.jsonl/275 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 103
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
28061,
6333,
819,
368,
341,
286,
1077,
5206,
74481,
284,
37103,
4133,
819,
486,
3194,
543,
286,
2060,
0,
3471,
2203,
819,
80889,
1423,
286,
2060,
0,
3471,
2203,
819,
80889,
1423,
286,
206... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_octopus_flash_simulator_iter_10() {
let input: Vec<String> = TEST_LARGE_DATA.iter().map(|s| s.to_string()).collect();
let simulator = OctopusFlashSimulator::new(&input);
let expected = 204;
let result: u32 = simulator.take(10).sum();
assert_eq... | rust_cleaned_test_functions.jsonl/85577 | {
"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,
70135,
45870,
30225,
18314,
10511,
11723,
62,
16,
15,
368,
972,
286,
1077,
1946,
25,
11312,
3464,
29,
284,
13602,
83861,
7896,
19471,
1005,
2186,
22428,
82,
91,
274,
2389,
3904,
6011,
17384,
7317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_igmp_integration_fallback_from_idle() {
let mut ctx = setup_simple_test_environment();
ctx.igmp_join_group(DummyLinkDeviceId, GROUP_ADDR);
assert_eq!(ctx.frames().len(), 1);
assert!(ctx.trigger_next_timer());
assert_eq!(ctx.frames().len(), 2);
re... | rust_cleaned_test_functions.jsonl/128909 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 380
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
343,
1307,
90250,
761,
3420,
5673,
47810,
368,
341,
286,
1077,
5206,
5635,
284,
6505,
30015,
4452,
51774,
543,
286,
5635,
13,
343,
1307,
31017,
6288,
5432,
8574,
3939,
6985,
764,
11,
26870,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_make_gaussian_mechanism_analytic() -> Fallible<()> {
let d_in = 1.;
let d_out = (1., 1e-5);
let scale = 3.730632;
let measurement = make_base_analytic_gaussian::<AllDomain<_>>(scale)?;
let arg = 0.0;
let _ret = measurement.invoke(&arg)?;
... | rust_cleaned_test_functions.jsonl/55700 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 291
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28230,
1889,
46972,
717,
4737,
67813,
12008,
5774,
28050,
368,
1464,
14785,
1238,
71698,
341,
286,
1077,
294,
1243,
284,
220,
16,
37403,
286,
1077,
294,
6068,
284,
320,
16,
2572,
220,
16,
68,
12... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_unify_externals() {
let mut test = OsoTest::new();
#[derive(PartialEq, Clone, Debug)]
struct Foo {
x: i64,
}
impl PolarClass for Foo {}
impl Foo {
fn new(x: i64) -> Self {
Self { x }
}
}
let foo_class = ClassBuilder::with_con... | rust_cleaned_test_functions.jsonl/30395 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 853
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
1437,
62,
4301,
1127,
368,
341,
262,
1077,
5206,
1273,
284,
506,
704,
2271,
486,
931,
1428,
262,
11506,
27098,
5304,
20894,
27312,
11,
27913,
11,
11091,
5563,
262,
2036,
33428,
341,
286,
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_inverse_projection() {
let stereo70 = Proj::new(
"+proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000
+ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs",
)
.unwrap();
let t = stereo... | rust_cleaned_test_functions.jsonl/133383 | {
"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,
63333,
72738,
368,
341,
286,
1077,
37952,
22,
15,
284,
42952,
486,
931,
1006,
310,
6630,
30386,
28,
267,
67109,
488,
5524,
62,
15,
28,
19,
21,
488,
12212,
62,
15,
28,
17,
20,
488,
74,
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_key_register_rotate() {
let mut key_register = KeyRegister { a: 0b1100, b: 0 };
key_register.rotate();
let a: u64 = 1 << 63;
let b: u64 = 1 << 48;
assert_eq!(a, key_register.a);
assert_eq!(b, key_register.b);
} | rust_cleaned_test_functions.jsonl/23065 | {
"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,
3097,
14000,
60834,
368,
341,
286,
1077,
5206,
1376,
14000,
284,
5309,
8690,
314,
264,
25,
220,
15,
65,
16,
16,
15,
15,
11,
293,
25,
220,
15,
2605,
286,
1376,
14000,
35944,
1428,
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_prim_list () {
use test_capnp::test_prim_list;
// Make the first segment small to force allocation of a second segment.
let mut message = message::Builder::new(message::HeapAllocator::new().first_segment_words(50));
let mut test_prim_list = message.init_root::<... | rust_cleaned_test_functions.jsonl/55845 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1618
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
87419,
2019,
1719,
1476,
286,
990,
1273,
16388,
6199,
486,
1944,
87419,
2019,
401,
286,
442,
7405,
279,
1156,
10238,
2613,
311,
5344,
23757,
315,
264,
2086,
10238,
624,
286,
1077,
5206,
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... | 5 |
#[test]
fn test_try_from_proto_sig_tx_for_json_full_tx() {
let (_keypair, sig_ptx) = new_dummy_signed_ptx();
let json_tx = FullTransaction::try_from_proto(sig_ptx.clone()).unwrap();
let hash = sig_ptx.get_tx_hash();
let content = sig_ptx.get_transaction_with_sig().try_into().unw... | rust_cleaned_test_functions.jsonl/122969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 212
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53283,
5673,
37689,
29252,
17805,
5478,
9455,
16372,
17805,
368,
341,
286,
1077,
5453,
792,
12670,
11,
8366,
20124,
87,
8,
284,
501,
60321,
55617,
20124,
87,
543,
286,
1077,
2951,
17805,
284,
8627... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_struct_doc_comment() {
check(
r#"
/// bar docs
struct Bar;
fn foo() { let bar = Ba<|>r; }
"#,
expect![[r#"
*Bar*
```rust
test
```
```rust
struct Bar
... | rust_cleaned_test_functions.jsonl/66135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
53445,
15126,
18869,
17638,
368,
341,
286,
1779,
1006,
310,
435,
2,
698,
2575,
3619,
26340,
198,
1235,
4716,
401,
8822,
15229,
368,
314,
1077,
3619,
284,
14322,
27,
91,
29,
81,
26,
456,
57676,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_update_metadata() {
let cycles_limit = 1024 * 1024 * 1024;
let caller = Address::from_hex("0x755cdba6ae4f479f7164792b318b2a06c759833b").unwrap();
let context = mock_context(cycles_limit, caller);
let init_metadata = mock_metadata_1();
let mut service = new_metadata_service(... | rust_cleaned_test_functions.jsonl/117934 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
22220,
368,
341,
262,
1077,
24484,
14763,
284,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
353,
220,
16,
15,
17,
19,
26,
715,
262,
1077,
19865,
284,
9177,
486,
1499,
32655,
445,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_add_member_role() {
let route = Route::AddMemberRole {
guild_id: GUILD_ID,
role_id: ROLE_ID,
user_id: USER_ID,
};
assert_eq!(
route.to_string(),
format!(
"guilds/{guild_id}/members/{user_id}/roles... | rust_cleaned_test_functions.jsonl/119837 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 302
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
19388,
19792,
368,
341,
286,
1077,
6021,
284,
9572,
486,
2212,
9366,
9030,
341,
310,
26411,
842,
25,
479,
18023,
3450,
345,
310,
3476,
842,
25,
69676,
3450,
345,
310,
1196,
842,
25,
13872,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_is_utf8_latin1_success() {
let len = if cfg!(miri) { 64 } else { 256 }; // Miri is too slow
let mut src: Vec<u16> = Vec::with_capacity(len);
src.resize(len, 0);
for i in 0..src.len() {
src[i] = i as u16;
}
for i in 0..src.len() {
... | rust_cleaned_test_functions.jsonl/27304 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 335
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6892,
39453,
23,
907,
14768,
16,
18632,
368,
341,
286,
1077,
2422,
284,
421,
13286,
10297,
19936,
72,
8,
314,
220,
21,
19,
335,
770,
314,
220,
17,
20,
21,
20066,
442,
14268,
72,
374,
2238,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 4 |
#[test]
fn test_types_repeated() {
let mut message = TestTypesRepeated::new();
message.set_double_field([19f64, 20f64].to_vec());
message.set_float_field([20f32].to_vec());
message.set_int32_field([21i32, -22, 23].to_vec());
message.set_int64_field([22i64].to_vec());
message.set_uint32_f... | rust_cleaned_test_functions.jsonl/2712 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 515
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9763,
1288,
41954,
368,
341,
262,
1077,
5206,
1943,
284,
3393,
4173,
90989,
486,
931,
543,
262,
1943,
980,
24598,
5013,
2561,
16,
24,
69,
21,
19,
11,
220,
17,
15,
69,
21,
19,
936,
983,
13251... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_equiv() {
let s0 = Atom::from_slice("div");
assert!(s0.equiv(&atom::Div));
let s1 = Atom::from_slice("Div");
assert!(!s1.equiv(&atom::Div));
} | rust_cleaned_test_functions.jsonl/15252 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 106
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
71849,
368,
341,
286,
1077,
274,
15,
284,
39516,
486,
1499,
26488,
445,
611,
797,
286,
2060,
10297,
82,
15,
1734,
15418,
2099,
21855,
486,
12509,
3237,
286,
1077,
274,
16,
284,
39516,
486,
1499,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_list_with_cross_deps_and_namespaces() {
init();
let schema_a_str = r#"{
"name": "A",
"type": "record",
"namespace": "namespace",
"fields": [
{"name": "field_one", "type": "float"}
]
}"#;
let schema_b_str = r#"{
"na... | rust_cleaned_test_functions.jsonl/69028 | {
"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,
21039,
2019,
6615,
35284,
76489,
8378,
9187,
27338,
368,
341,
262,
2930,
543,
262,
1077,
10802,
4306,
2895,
284,
435,
55543,
515,
286,
330,
606,
788,
330,
32,
756,
286,
330,
1313,
788,
330,
8548... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_param() -> Result<()> {
let db = checked_memory_handle()?;
let result: Result<bool> = db.query_row("SELECT 1 WHERE ? BETWEEN datetime('now', '-1 minute') AND datetime('now', '+1 minute')", [OffsetDateTime::now_utc()], |r| r.get(0));
assert!(result.is_ok());
Ok(())... | rust_cleaned_test_functions.jsonl/94396 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 145
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4090,
368,
1464,
5714,
71698,
341,
286,
1077,
2927,
284,
10067,
19195,
10630,
94136,
286,
1077,
1102,
25,
5714,
17028,
29,
284,
2927,
4786,
8530,
445,
4858,
220,
16,
5288,
937,
56639,
8874,
492,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_relu_activation() {
fn f(x: f32, alpha: Option<f32>, max_value: Option<f32>, threshold: Option<f32>) -> f32 {
let t = match threshold {
None => 0.0,
Some(v) => v,
};
let a = match alpha {
None => 0.0,
... | rust_cleaned_test_functions.jsonl/65371 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2137
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
76282,
52404,
368,
341,
286,
5168,
282,
2075,
25,
282,
18,
17,
11,
8287,
25,
6959,
63895,
18,
17,
8066,
1932,
3142,
25,
6959,
63895,
18,
17,
8066,
12171,
25,
6959,
63895,
18,
17,
9231,
1464,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_get_index_0() {
let h = Histogram::configure()
.max_value(32)
.precision(3)
.build()
.unwrap();
// all values should index directly to value
// no estimated buckets are needed given the precision and max
for i in 0.... | rust_cleaned_test_functions.jsonl/82151 | {
"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,
3062,
3560,
62,
15,
368,
341,
286,
1077,
305,
284,
82138,
486,
21002,
741,
310,
659,
2810,
3142,
7,
18,
17,
340,
310,
659,
27182,
7,
18,
340,
310,
659,
5834,
741,
310,
659,
15454,
1428,
286,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_update_timestamp() {
let mut crds = Crds::default();
let val = CrdsValue::new_unsigned(CrdsData::ContactInfo(ContactInfo::new_localhost(
&Pubkey::default(),
0,
)));
assert_eq!(crds.insert(val.clone(), 0), Ok(()));
assert_eq!(crds.ta... | rust_cleaned_test_functions.jsonl/10450 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 724
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
23073,
368,
341,
286,
1077,
5206,
1560,
5356,
284,
4553,
5356,
486,
2258,
543,
286,
1077,
1044,
284,
4553,
5356,
1130,
486,
931,
67830,
3025,
81,
5356,
1043,
486,
8732,
1731,
99102,
1731,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_field_length_json() {
let field_length_src = HashMap::<_, _>::from_iter(IntoIter::new([
(1, HashMap::<_, _>::from_iter(IntoIter::new([(1, 4)]))),
(
3,
HashMap::<_, _>::from_iter(IntoIter::new([(1, 5), (2, 6)])),
),
... | rust_cleaned_test_functions.jsonl/112249 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 613
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5013,
5118,
9455,
368,
341,
286,
1077,
2070,
5118,
16274,
284,
10528,
27638,
6878,
716,
6831,
1499,
11723,
24123,
78,
8537,
486,
931,
8956,
310,
320,
16,
11,
10528,
27638,
6878,
716,
6831,
1499,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_balance_many() {
let rng = &Rc::new(RefCell::new(StdRng::seed_from_u64(56789)));
let mut presets = Vec::new();
for _ in 0..200 {
if rng.borrow_mut().gen_bool(0.2) {
presets.push(rand(rng.borrow_mut().gen_range(1, 10), 1..20, rng));
} else {
... | rust_cleaned_test_functions.jsonl/111069 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 255
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25360,
29396,
22101,
368,
341,
262,
1077,
28422,
284,
609,
49,
66,
486,
931,
7,
3945,
3599,
486,
931,
7,
22748,
49,
968,
486,
22602,
5673,
7300,
21,
19,
7,
20,
21,
22,
23,
24,
22525,
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_two_pairs_beats_one_pair() {
test(
&vec!["2S 8H 6S 8D JH", "4S 5H 4C 8C 5C"],
&vec!["4S 5H 4C 8C 5C"],
)
} | rust_cleaned_test_functions.jsonl/121264 | {
"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,
23241,
36430,
21263,
1862,
11667,
14445,
368,
341,
262,
1273,
1006,
286,
609,
4083,
0,
1183,
17,
50,
220,
23,
39,
220,
21,
50,
220,
23,
35,
619,
39,
497,
330,
19,
50,
220,
20,
39,
220,
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_from_static_std() {
let a = HeaderName {
inner: Repr::Standard(Vary),
};
let b = HeaderName::from_static("vary");
assert_eq!(a, b);
let b = HeaderName::from_static("vaary");
assert_ne!(a, b);
} | rust_cleaned_test_functions.jsonl/3407 | {
"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,
5673,
25360,
15656,
368,
341,
286,
1077,
264,
284,
12104,
675,
341,
310,
9179,
25,
1032,
649,
486,
19781,
12410,
658,
1326,
286,
3634,
286,
1077,
293,
284,
12104,
675,
486,
1499,
25360,
445,
829... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unchanged_ranges_non_unique_added() {
assert_eq!(
unchanged_ranges(
b"a b a c",
b"a a a a",
&[0..1, 2..3, 4..5, 6..7],
&[0..1, 2..3, 4..5, 6..7],
),
vec![(0..1, 0..1), (4..5, 2..3)]
... | rust_cleaned_test_functions.jsonl/89251 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 231
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
3185,
3726,
58748,
21637,
21218,
37653,
368,
341,
286,
2060,
10714,
33673,
310,
34857,
58748,
1006,
394,
293,
56693,
293,
264,
272,
756,
394,
293,
56693,
264,
264,
264,
756,
394,
44590,
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_list_tests() -> Result<()> {
set_rustflags();
let test_filter = TestFilterBuilder::any(RunIgnored::Default);
let test_list = FIXTURE_TARGETS.make_test_list(&test_filter, &TargetRunner::empty());
let mut summary = test_list.to_summary();
for (name, expected) in &*EXPECTED_TE... | rust_cleaned_test_functions.jsonl/118813 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 618
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2019,
32509,
368,
1464,
5714,
71698,
341,
262,
738,
1710,
590,
11161,
1428,
262,
1077,
1273,
8727,
284,
3393,
5632,
3297,
486,
3767,
2785,
359,
43337,
3018,
486,
3675,
317,
262,
1077,
1273,
2019,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_all_sequentially() {
if std::env::var("CI").is_ok() {
} else {
test_feel_grammar();
test_lalr_c_tables();
test_lalr_rust_tables();
}
} | rust_cleaned_test_functions.jsonl/31377 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 107
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5705,
3453,
15838,
398,
368,
341,
262,
421,
1460,
486,
3160,
486,
947,
445,
11237,
1827,
285,
19817,
368,
341,
6926,
262,
335,
770,
341,
414,
1273,
7642,
301,
62,
41094,
543,
414,
1273,
907,
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
] | 2 |
#[test]
fn test_parser_get() {
test_parser(
b"GET /path?p1=v1&p2=v2#fragment HTTP/1.1\r\nHost: localhost\r\n\r\n",
&make_request(
"GET",
"/path",
"p1=v1&p2=v2",
"fragment",
&[("host", "localhost")],
... | rust_cleaned_test_functions.jsonl/100923 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 261
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18517,
3062,
368,
341,
286,
1273,
18517,
1006,
310,
293,
1,
3806,
608,
2343,
90142,
16,
39254,
16,
96774,
17,
39254,
17,
2,
42202,
10130,
14,
16,
13,
16,
12016,
1699,
9296,
25,
47422,
12016,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_access() {
let obj = json!({
"_": "underscore",
"-": "hyphen",
"*": "asterisk",
"'": "single_quote",
"\"": "double_quote",
"✈": "plane"
});
// Bracket notation
let expr = jsonpath::parse("$['-']").unwrap();
assert_eq!(expr.... | rust_cleaned_test_functions.jsonl/54615 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 843
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3097,
12759,
368,
341,
262,
1077,
2839,
284,
2951,
0,
2262,
286,
9000,
788,
330,
53933,
756,
286,
6523,
788,
330,
8503,
14769,
756,
286,
15630,
788,
330,
2300,
3187,
756,
286,
7178,
788,
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_pow_mod() {
let q = Scalar::new_modulus(11);
let c = Scalar::new(4);
let a = Scalar::pow_mod(&c, &c, &q);
assert_eq!(a.rep, 3);
} | rust_cleaned_test_functions.jsonl/1931 | {
"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,
56183,
7480,
368,
341,
286,
1077,
2804,
284,
35176,
486,
931,
7480,
19425,
7,
16,
16,
317,
286,
1077,
272,
284,
35176,
486,
931,
7,
19,
317,
286,
1077,
264,
284,
35176,
486,
21743,
7480,
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 |
#[test]
fn test_raw_string_hello() {
let mut reader = Reader::init("```Hello World!```");
assert_eq!(
raw_string(&mut reader).unwrap(),
RawString {
newline: Whitespace {
value: String::from(""),
source_info: SourceIn... | rust_cleaned_test_functions.jsonl/119582 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 874
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
16067,
3904,
96724,
368,
341,
286,
1077,
5206,
6604,
284,
25166,
486,
2327,
445,
73594,
9707,
4337,
0,
73594,
797,
286,
2060,
10714,
33673,
310,
7112,
3904,
2099,
6984,
6604,
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_precedence() {
use Expr::*;
let syntax = Syntax::default();
assert_eq!(
super::parse("{{ a + b == c }}", &syntax).unwrap(),
vec![Node::Expr(
Ws(false, false),
BinOp(
"==",
BinO... | rust_cleaned_test_functions.jsonl/50228 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1430
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10442,
1998,
763,
368,
341,
286,
990,
28819,
56162,
286,
1077,
19482,
284,
32117,
486,
2258,
543,
286,
2060,
10714,
33673,
310,
2256,
486,
6400,
445,
2979,
264,
488,
293,
621,
272,
3869,
497,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_random_domain_element() {
let rng = &mut XorShiftRng::from_seed(TEST_SEED);
for _ in 0..100 {
let random_el: DefaultTreeDomain = Fr::random(rng).into();
let mut randomness = [0u8; 32];
randomness.copy_from_slice(AsRef::<[u8]>::as_ref(&random_el));
let bac... | rust_cleaned_test_functions.jsonl/58646 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 216
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22644,
20111,
7894,
368,
341,
262,
1077,
28422,
284,
609,
6984,
1599,
269,
24841,
49,
968,
486,
1499,
33809,
50320,
3620,
1479,
626,
262,
369,
716,
304,
220,
15,
496,
16,
15,
15,
341,
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... | 2 |
#[test]
fn test_new_clears_program_and_variables() {
Tester::default()
.set_program(Some("previous.bas"), "some stuff")
.run("a = 3: NEW")
.expect_clear()
.check();
} | rust_cleaned_test_functions.jsonl/112750 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 127
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5921,
21811,
82,
25096,
8378,
28182,
368,
341,
286,
76816,
486,
2258,
741,
310,
659,
746,
25096,
65405,
445,
19702,
948,
300,
3975,
330,
14689,
6259,
1138,
310,
659,
6108,
445,
64,
284,
220,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_categorize() {
let config = create_test_config();
let categorizer = FileCategorizer::from_config(&config);
assert_eq!(
categorizer
.categorize(&PathBuf::from("src/js/a.js"))
.unwrap(),
FileGroup::Source {
... | rust_cleaned_test_functions.jsonl/118300 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1555
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
7593,
551,
368,
341,
286,
1077,
2193,
284,
1855,
4452,
5332,
543,
286,
1077,
22049,
3135,
284,
2887,
34,
7593,
3135,
486,
1499,
5332,
2099,
1676,
626,
286,
2060,
10714,
33673,
310,
22049,
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_set_account_type() {
// account with buffer big enough for AccountType and Extension
let mut buffer = TEST_ACCOUNT_SLICE.to_vec();
let needed_len =
ExtensionType::get_account_len::<Account>(&[ExtensionType::ImmutableOwner])
- buffer.len();
... | rust_cleaned_test_functions.jsonl/90547 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1983
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2602,
13500,
1819,
368,
341,
286,
442,
2692,
448,
4147,
2409,
3322,
369,
8615,
929,
323,
26473,
198,
286,
1077,
5206,
4147,
284,
13602,
38831,
25622,
5487,
2389,
13251,
543,
286,
1077,
4362,
6043,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_generator_correctness() {
let mut output = [0; 100];
let expected = [ 82, 254, 233, 139, 254, 85, 6, 222, 222, 149,
120, 35, 173, 71, 89, 232, 51, 182, 252, 139,
153, 153, 111, 30, 16, 7, 124, 185, 159, 24,
... | rust_cleaned_test_functions.jsonl/19708 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1673
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25813,
31550,
2090,
368,
341,
286,
1077,
5206,
2550,
284,
508,
15,
26,
220,
16,
15,
15,
935,
1789,
286,
1077,
3601,
284,
508,
220,
23,
17,
11,
220,
17,
20,
19,
11,
220,
17,
18,
18,
11,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_code_cache() {
let (_temp_dir, deno_dir) = test_setup();
let filename = "hello.js";
let source_code = "1+2";
let output_code = "1+2 // output code";
let source_map = "{}";
let (cache_path, source_map_path) =
deno_dir.cache_path(filename, source_code);
assert!(
... | rust_cleaned_test_functions.jsonl/72740 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 347
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4136,
11529,
368,
341,
262,
1077,
5453,
3888,
4334,
11,
3371,
78,
4334,
8,
284,
1273,
21363,
1428,
262,
1077,
3899,
284,
330,
14990,
2857,
876,
262,
1077,
2530,
4136,
284,
330,
16,
10,
17,
876... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_indentation_equality() {
let four_spaces = YamlLoader::load_from_str(
r#"
hash:
with:
indentations
"#,
)
.unwrap()
.into_iter()
.next()
.unwrap();
let two_spaces = YamlLoader::load_from_str(
r#"
hash:
... | rust_cleaned_test_functions.jsonl/1214 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 562
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69045,
367,
2204,
10473,
368,
341,
286,
1077,
3040,
67883,
284,
809,
9467,
9181,
486,
1078,
5673,
2895,
1006,
310,
435,
2,
698,
8296,
510,
262,
448,
510,
286,
17504,
804,
198,
57676,
345,
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_add_client_multiple_times() {
let mut client_map: Map = Default::default();
assert!(add_client(&mut client_map, addr(1)).is_ok());
let result = add_client(&mut client_map, addr(1));
assert!(result.is_err());
assert_eq!(format!("{}", result.unwrap_err()), "... | rust_cleaned_test_functions.jsonl/90495 | {
"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,
2891,
8179,
45233,
22353,
368,
341,
286,
1077,
5206,
2943,
5376,
25,
5027,
284,
7899,
486,
2258,
543,
286,
2060,
10297,
718,
8179,
2099,
6984,
2943,
5376,
11,
10789,
7,
16,
4579,
285,
19817,
142... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duplicate_tx() {
let (mut testkit, api) = init_testkit();
let tx = inc_count(&api, 5);
testkit.create_block();
let _: TransactionResponse = api.public(ApiKind::Service("counter"))
.query(&tx)
.post("count")
.unwrap();
let _: TransactionResponse = api.... | rust_cleaned_test_functions.jsonl/86870 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 258
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70434,
17805,
368,
341,
262,
1077,
320,
6984,
1273,
8226,
11,
6330,
8,
284,
2930,
4452,
8226,
1428,
262,
1077,
9854,
284,
3625,
3180,
2099,
2068,
11,
220,
20,
317,
262,
1273,
8226,
2520,
7113,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_finalize_block_with_justification() {
use client::blockchain::{Backend as BlockChainBackend};
let backend = Backend::<Block>::new_test(10, 10);
let block0 = insert_header(&backend, 0, Default::default(), Default::default(), Default::default());
let _ = insert_header(&backend, 1, block0... | rust_cleaned_test_functions.jsonl/94587 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 206
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
70616,
7113,
6615,
62,
4250,
2404,
368,
341,
197,
41819,
2943,
486,
4574,
8819,
22964,
29699,
438,
8362,
18837,
29699,
2315,
197,
10217,
19163,
284,
55260,
27638,
4713,
6831,
931,
4452,
7,
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_create_duplicate_fails_no_fees() {
let _setup = SetupLibraryWalletPoolZeroFees::init();
let (did, schema_name, schema_version, data) = prepare_schema_data();
create_and_publish_schema("id", did.clone(), schema_name.clone(), schema_version.clone(), data.clone()).unwrap()... | rust_cleaned_test_functions.jsonl/33236 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 201
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8657,
70434,
761,
6209,
6536,
761,
5516,
368,
341,
286,
1077,
716,
15188,
284,
18626,
16915,
38259,
10551,
17999,
37,
5516,
486,
2327,
1428,
286,
1077,
320,
22920,
11,
10802,
1269,
11,
10802,
9438... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_logger() {
let mut logger = Logger::new("%% %{User-Agent}i %{X-Test}o %{HOME}e %D test");
let mut headers = HeaderMap::new();
headers.insert(
header::USER_AGENT,
header::HeaderValue::from_static("ACTIX-WEB"),
);
let mut req = HttpR... | rust_cleaned_test_functions.jsonl/109976 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 645
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27413,
368,
341,
286,
1077,
5206,
5925,
284,
9514,
486,
931,
445,
2769,
63737,
1474,
45118,
92,
72,
63737,
55,
12,
2271,
92,
78,
63737,
27546,
92,
68,
1018,
35,
1273,
3071,
286,
1077,
5206,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_compute_commit() {
assert_eq!(compute_commit(None), None);
assert_eq!(compute_commit(Some("1234567890")), Some(0x1234_5678));
assert_eq!(compute_commit(Some("HEAD")), None);
assert_eq!(compute_commit(Some("garbagein")), None);
} | rust_cleaned_test_functions.jsonl/4096 | {
"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,
57028,
36346,
368,
341,
286,
2060,
10714,
10297,
27706,
36346,
26717,
701,
2240,
317,
286,
2060,
10714,
10297,
27706,
36346,
65405,
445,
16,
17,
18,
19,
20,
21,
22,
23,
24,
15,
35674,
4329,
7,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_retain_roots_within_one_epoch_range() {
let mut roots = vec![0, 1, 2];
let slots_per_epoch = 2;
AccountsDb::retain_roots_within_one_epoch_range(&mut roots, slots_per_epoch);
assert_eq!(&vec![1, 2], &roots);
} | rust_cleaned_test_functions.jsonl/6934 | {
"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,
21695,
466,
26608,
2412,
72385,
11667,
20682,
9698,
368,
341,
286,
1077,
5206,
19703,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
935,
286,
1077,
15711,
5678,
20682,
284,
220,
17,
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_write_ptty_pair() {
let (mut master, mut slave) = open_ptty_pair();
make_raw(slave.as_raw_fd());
let mut buf = [0u8; 5];
master.write_all(b"adios").unwrap();
slave.read_exact(&mut buf).unwrap();
assert_eq!(&buf, b"adios");
let mut master = &master;
master.write_... | rust_cleaned_test_functions.jsonl/72581 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 188
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9165,
20124,
1881,
14445,
368,
341,
262,
1077,
320,
6984,
7341,
11,
5206,
20362,
8,
284,
1787,
20124,
1881,
14445,
543,
262,
1281,
16067,
55691,
523,
5357,
16067,
17676,
5231,
262,
1077,
5206,
660... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_forks_ancestors() {
let GenesisConfigInfo { genesis_config, .. } = create_genesis_config(10_000);
let bank = Bank::new(&genesis_config);
let mut bank_forks = BankForks::new(bank);
let bank0 = bank_forks[0].clone();
let bank = Bank::new_from_parent(&ba... | rust_cleaned_test_functions.jsonl/30578 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 358
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35733,
761,
73302,
62,
681,
267,
1087,
368,
341,
286,
1077,
40788,
2648,
1731,
314,
59366,
5332,
11,
5241,
335,
284,
1855,
16322,
13774,
5332,
7,
16,
15,
62,
15,
15,
15,
317,
286,
1077,
6073,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_key_values_get_coerce() {
use super::Record;
let kvs: &[(&str, &str)] = &[("a", "1"), ("b", "2")];
let record = Record::builder().key_values(&kvs).build();
assert_eq!(
"2",
record
.key_values()
.get(... | rust_cleaned_test_functions.jsonl/71743 | {
"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,
14192,
3097,
9146,
3062,
11393,
25641,
368,
341,
286,
990,
2256,
486,
6471,
401,
286,
1077,
595,
11562,
25,
44590,
2099,
495,
11,
609,
495,
7252,
284,
44590,
445,
64,
497,
330,
16,
3975,
3489,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_traverse_symlinks() {
use std::os::unix::prelude::MetadataExt;
let groups = nix::unistd::getgroups().unwrap();
if groups.len() < 2 {
return;
}
let (first_group, second_group) = (groups[0], groups[1]);
for (args, traverse_first, traverse_second) in [
(&[][... | rust_cleaned_test_functions.jsonl/49281 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1013
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3547,
22439,
58530,
1014,
15504,
368,
341,
262,
990,
1460,
486,
436,
486,
56646,
486,
1726,
52538,
486,
14610,
6756,
280,
262,
1077,
5203,
284,
308,
941,
486,
27483,
486,
455,
16753,
1005,
15454,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_repo_branch_only() {
// chained
assert_eq!(git::Repo::new("foo").unwrap().branch_only(true).branch_only_val(), true);
// unchained
let mut repo = git::Repo::new("foo").unwrap();
assert_eq!(repo.branch_only_val(), false);
repo = repo.branch_only(tr... | rust_cleaned_test_functions.jsonl/114243 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 183
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37784,
28031,
18410,
368,
341,
286,
442,
66969,
198,
286,
2060,
10714,
10297,
12882,
486,
25243,
486,
931,
445,
7975,
1827,
15454,
1005,
17940,
18410,
3715,
568,
17940,
18410,
6189,
1507,
830,
626,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_intersection_zero() {
let left = VecDocSet::from(vec![0]);
let right = VecDocSet::from(vec![0]);
let mut intersection = Intersection::new(vec![left, right]);
assert!(intersection.advance());
assert_eq!(intersection.doc(), 0);
} | rust_cleaned_test_functions.jsonl/57495 | {
"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,
82558,
19359,
368,
341,
286,
1077,
2115,
284,
11312,
9550,
1649,
486,
1499,
25592,
20703,
15,
2558,
286,
1077,
1290,
284,
11312,
9550,
1649,
486,
1499,
25592,
20703,
15,
2558,
286,
1077,
5206,
192... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_duration_seconds() {
use std::time::Duration;
let zero = Duration::new(0, 0);
let one_second = Duration::new(1, 0);
let half_second = Duration::new(0, 500_000_000);
#[serde_as]
#[derive(Debug, Serialize, Deserialize, PartialEq)]
struct StructIntStrict {
#[ser... | rust_cleaned_test_functions.jsonl/23050 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2569
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
25454,
34825,
368,
341,
262,
990,
1460,
486,
1678,
486,
12945,
280,
262,
1077,
7168,
284,
21045,
486,
931,
7,
15,
11,
220,
15,
317,
262,
1077,
825,
29644,
284,
21045,
486,
931,
7,
16,
11,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_invalid_boundary() {
let mut body: &[u8] = b"--boundary\x00\x00";
let mut reader = BoundaryReader::from_reader(&mut body, "boundary");
reader.consume_boundary().unwrap_err();
} | rust_cleaned_test_functions.jsonl/80595 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31433,
54004,
368,
341,
286,
1077,
5206,
2487,
25,
44590,
84,
23,
60,
284,
293,
74757,
65180,
3462,
15,
15,
3462,
15,
15,
876,
286,
1077,
5206,
6604,
284,
76416,
5062,
486,
1499,
22306,
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 |
#[test]
fn test_scope_gen() {
// now we can even deduce the input para type
let mut g = Gn::new_scoped(|mut s| {
let i = s.yield_(0).unwrap();
i * 2
});
assert_eq!(g.raw_send(None), Some(0));
assert_eq!(g.raw_send(Some(3)), Some(6));
assert_eq!(g.raw_se... | rust_cleaned_test_functions.jsonl/91429 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 174
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23199,
16322,
368,
341,
262,
442,
1431,
582,
646,
1496,
7681,
10521,
279,
1946,
3348,
943,
198,
262,
1077,
5206,
342,
284,
95151,
486,
931,
13171,
16367,
22428,
6984,
274,
91,
341,
286,
1077,
60... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_param_invalid() {
let uuid_str = "c1aa1e3b-9614-4895-9ebd-705255fa5bc2p";
assert!(Uuid::from_param(uuid_str).is_err());
} | rust_cleaned_test_functions.jsonl/1536 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 95
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5673,
4090,
31433,
368,
341,
286,
1077,
16040,
2895,
284,
330,
66,
16,
5305,
16,
68,
18,
65,
12,
24,
21,
16,
19,
12,
19,
23,
24,
20,
12,
24,
3065,
67,
12,
22,
15,
20,
17,
20,
20,
3632,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_unignored_files() {
let seed_names = vec!["simple_file.txt", "foo/.gitignore"];
let temp_dir = TempDir::default();
let files = seed_names.iter().map(|n| Path::new(n)).collect();
let index = test_repo(&temp_dir, &files);
for name in &[
"foo/ign... | rust_cleaned_test_functions.jsonl/36178 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 751
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4907,
58471,
10931,
368,
341,
286,
1077,
10320,
9187,
284,
7486,
0,
1183,
22944,
2458,
3909,
497,
330,
7975,
11930,
12882,
13130,
6332,
286,
1077,
2730,
4334,
284,
19944,
6184,
486,
2258,
543,
286... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_pbkdf2_verify() {
let password = Password::from_slice(&[0u8; 64]).unwrap();
let pbkdf2_dk = hash_password(&password, 100).unwrap();
assert_eq!(
hash_password_verify(&pbkdf2_dk, &password, 100).unwrap(),
true
);
} | rust_cleaned_test_functions.jsonl/101678 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 121
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31409,
74,
2940,
17,
35638,
368,
341,
298,
10217,
3552,
284,
12362,
486,
1499,
26488,
2099,
58,
15,
84,
23,
26,
220,
21,
19,
10697,
15454,
1428,
298,
10217,
17310,
74,
2940,
17,
814,
74,
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_transfer_correctness() {
let source_keypair = ElGamalKeypair::new_rand();
let dest_pk = ElGamalKeypair::new_rand().public;
let auditor_pk = ElGamalKeypair::new_rand().public;
// Case 1: transfer 0 amount
// create source account spendable cipher... | rust_cleaned_test_functions.jsonl/52095 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1783
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
31550,
2090,
368,
341,
1789,
286,
1077,
2530,
3097,
12670,
284,
3984,
78884,
278,
6608,
1082,
1310,
486,
931,
33864,
543,
286,
1077,
3201,
33321,
284,
3984,
78884,
278,
6608,
1082,
1310,
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_if() {
let result = Command::new("cargo")
.args(&["run", "-q", "--release", "--", "tests/resources/if/if.lox"])
.output()
.expect("Error while running if/test_if()");
assert_eq!(
str::from_utf8(&result.stdout).unwrap(),
"good\nblock\ntrue\n"
)... | rust_cleaned_test_functions.jsonl/133810 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 172
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11119,
368,
341,
262,
1077,
1102,
284,
7348,
486,
931,
445,
66715,
1138,
286,
659,
2116,
2099,
1183,
6108,
497,
6523,
80,
497,
14482,
22998,
497,
14482,
497,
330,
23841,
38900,
91183,
91183,
43749... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_keys() {
let mut map: HashMap<Key, Value> = HashMap::new();
let key1 = Key {
key: "a".to_owned(),
key_version: 0,
};
let data = serialize(&"value".to_owned()).expect("serialize");
let value1 = Value {
type_id: "St... | rust_cleaned_test_functions.jsonl/90780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 439
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17678,
12631,
368,
341,
286,
1077,
5206,
2415,
25,
10528,
42003,
11,
5162,
29,
284,
10528,
486,
931,
543,
286,
1077,
1376,
16,
284,
5309,
341,
310,
1376,
25,
330,
64,
3263,
983,
51973,
3148,
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_process_ledger_options_entry_callback() {
let GenesisConfigInfo {
genesis_config,
mint_keypair,
..
} = create_genesis_config(100);
let (ledger_path, last_entry_hash) = create_new_tmp_ledger_auto_delete!(&genesis_config);
let blo... | rust_cleaned_test_functions.jsonl/46806 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1136
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11305,
38367,
1389,
8743,
9078,
12519,
368,
341,
286,
1077,
40788,
2648,
1731,
341,
310,
59366,
5332,
345,
310,
28337,
3097,
12670,
345,
310,
54538,
286,
335,
284,
1855,
16322,
13774,
5332,
7,
16,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_range_inclusive_nth() {
assert_eq!((10..=15).nth(0), Some(10));
assert_eq!((10..=15).nth(1), Some(11));
assert_eq!((10..=15).nth(5), Some(15));
assert_eq!((10..=15).nth(6), None);
let mut r = 10_u8..=20;
assert_eq!(r.nth(2), Some(12));
assert_eq!(r, 13..=20);
ass... | rust_cleaned_test_functions.jsonl/54155 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 299
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9698,
1243,
8336,
78342,
368,
341,
262,
2060,
10714,
0,
1188,
16,
15,
496,
28,
16,
20,
568,
51738,
7,
15,
701,
4329,
7,
16,
15,
1106,
262,
2060,
10714,
0,
1188,
16,
15,
496,
28,
16,
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_struct() {
let mut buf = vec![];
let mut ser = Serializer { write: &mut buf };
#[derive(Serialize, Debug, PartialEq)]
struct Test {
name: String,
num: u64,
}
Test {
name: String::from("hello"),
num: 42,
}
.serialize(&mut ser)
.u... | rust_cleaned_test_functions.jsonl/79247 | {
"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,
15126,
368,
341,
262,
1077,
5206,
6607,
284,
7486,
0,
15078,
262,
1077,
5206,
1420,
284,
58822,
314,
3270,
25,
609,
6984,
6607,
2605,
262,
11506,
27098,
3759,
9050,
11,
11091,
11,
55039,
5563,
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_function_name_from_verb_and_path() {
let operation = WebOperationGen(WebOperation {
path: "/horse".to_owned(),
verb: WebVerb::Get,
..Default::default()
});
assert_eq!(None, operation.rust_module_name());
assert_eq!("get_horse", ... | rust_cleaned_test_functions.jsonl/64734 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 165
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9174,
1269,
5673,
62,
22328,
8378,
2638,
368,
341,
286,
1077,
5666,
284,
4895,
8432,
9967,
67240,
8432,
341,
310,
1815,
25,
3521,
59675,
3263,
983,
51973,
3148,
310,
18607,
25,
4895,
66946,
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_parameter_to_self() {
test_rename(
r#"
struct Foo {
i: i32,
}
impl Foo {
fn f(foo<|>: &mut Foo) -> i32 {
foo.i
}
}
"#,
"self",
r#"
struct Foo {
i: i32,
}
impl Foo {
f... | rust_cleaned_test_functions.jsonl/58101 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 269
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
24899,
2346,
25637,
368,
341,
286,
1273,
79399,
1006,
310,
435,
2,
698,
262,
2036,
33428,
341,
286,
600,
25,
600,
18,
17,
345,
262,
555,
262,
11605,
33428,
341,
286,
5168,
282,
71880,
27,
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... | 1 |
#[test]
fn test_por_circuit_poseidon_top_8_8_2() {
// This is the shape we want for 64GiB secotrs.
test_por_circuit::<TestTree3<PoseidonHasher, U8, U8, U2>>(3, 1_907);
} | rust_cleaned_test_functions.jsonl/88200 | {
"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,
76628,
666,
37268,
33201,
90456,
10426,
62,
23,
62,
23,
62,
17,
368,
341,
286,
442,
1096,
374,
279,
6083,
582,
1366,
369,
220,
21,
19,
46841,
33,
5701,
354,
5428,
624,
286,
1273,
76628,
666,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_as_bytes() {
// no null
let v = [
224, 184, 168, 224, 185, 132, 224, 184, 151, 224, 184, 162, 228,
184, 173, 229, 141, 142, 86, 105, 225, 187, 135, 116, 32, 78, 97,
109
];
assert_eq!("".as_bytes(), &[]);
assert_eq!("abc"... | rust_cleaned_test_functions.jsonl/56825 | {
"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,
11898,
12524,
368,
341,
286,
442,
902,
845,
198,
286,
1077,
348,
284,
2278,
310,
220,
17,
17,
19,
11,
220,
16,
23,
19,
11,
220,
16,
21,
23,
11,
220,
17,
17,
19,
11,
220,
16,
23,
20,
11... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_delta_bit_packed_not_initialized_get() {
let mut decoder = DeltaBitPackDecoder::<Int32Type>::new();
let mut buffer = vec![];
decoder.get(&mut buffer).unwrap();
} | rust_cleaned_test_functions.jsonl/38517 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 104
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26710,
13996,
620,
11191,
7913,
62421,
3062,
368,
341,
1789,
286,
1077,
5206,
24551,
284,
24957,
8344,
30684,
20732,
27638,
1072,
18,
17,
929,
6831,
931,
543,
286,
1077,
5206,
4147,
284,
7486,
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 |
#[test]
fn test_line_doc_comment() {
with_default_session_globals(|| {
let stripped = beautify_doc_string(Symbol::intern(" test"));
assert_eq!(stripped, " test");
let stripped = beautify_doc_string(Symbol::intern("! test"));
assert_eq!(stripped, "! test");
let strippe... | rust_cleaned_test_functions.jsonl/120754 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 228
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6528,
18869,
17638,
368,
341,
262,
448,
9993,
12316,
58775,
79453,
341,
286,
1077,
36679,
284,
4912,
1437,
18869,
3904,
99095,
486,
55444,
445,
1273,
4010,
286,
2060,
10714,
10297,
29872,
6924,
11,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_empty_output() {
let mut processor = processor_stub();
processor.json = r#"[{"hello":"world"},{"hello":2}]"#.to_owned();
processor.program = ".[0]".to_owned();
processor.pretty_output = true;
let context = Context::new().unwrap();
... | rust_cleaned_test_functions.jsonl/90632 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 217
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
7645,
368,
341,
310,
1077,
5206,
17654,
284,
17654,
62781,
543,
310,
17654,
4323,
284,
435,
2,
36864,
4913,
14990,
3252,
14615,
36509,
14990,
788,
17,
92,
19177,
87846,
983,
51973,
543,
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_file_expand() {
let expanded = expand_builtin_macro(
r#"
#[rustc_builtin_macro]
macro_rules! file {() => {}}
file!()
"#,
);
assert_eq!(expanded, "\"\"");
} | rust_cleaned_test_functions.jsonl/124332 | {
"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,
2458,
67875,
368,
341,
286,
1077,
17183,
284,
9225,
73829,
58810,
1006,
310,
435,
2,
698,
310,
11506,
35788,
66,
73829,
58810,
921,
310,
18072,
21407,
0,
1034,
314,
368,
589,
4687,
532,
310,
103... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.