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_clear_request_count() {
let keypair = Keypair::new();
let mut drone = Drone::new(keypair, None, None);
drone.request_current = drone.request_current + 256;
assert_eq!(drone.request_current, 256);
drone.clear_request_count();
assert_eq!(drone.reques... | rust_cleaned_test_functions.jsonl/123511 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21811,
7893,
3180,
368,
341,
286,
1077,
1376,
12670,
284,
6569,
1082,
1310,
486,
931,
543,
286,
1077,
5206,
26713,
284,
73481,
486,
931,
4857,
12670,
11,
2240,
11,
2240,
317,
286,
26713,
8223,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_has_id() {
use html5ever::LocalName;
let html = "<p id='link_id_456'>hey there</p>";
let fragment = Html::parse_fragment(html);
let sel = Selector::parse("p").unwrap();
let element = fragment.select(&sel).next().unwrap();
assert_eq!(
... | rust_cleaned_test_functions.jsonl/37653 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 433
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
842,
368,
341,
286,
990,
5272,
20,
2054,
486,
7319,
675,
401,
286,
1077,
5272,
284,
4055,
79,
877,
1131,
2080,
842,
62,
19,
20,
21,
6270,
35561,
1052,
522,
79,
6734,
286,
1077,
12289,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_accountsdb_duplicate_fork_should_panic() {
let paths = get_tmp_accounts_path!();
let accounts = AccountsDB::new(0, &paths.paths);
cleanup_paths(&paths.paths);
accounts.add_fork(0, None);
} | rust_cleaned_test_functions.jsonl/77674 | {
"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,
55665,
1999,
70434,
761,
669,
43378,
620,
31270,
368,
341,
286,
1077,
12716,
284,
633,
16125,
55665,
2638,
0,
543,
286,
1077,
9618,
284,
40655,
3506,
486,
931,
7,
15,
11,
609,
21623,
65345,
317,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_into_type() {
assert_eq!(parquet::Type::Boolean, Type::Boolean.into());
assert_eq!(parquet::Type::Int32, Type::Int32.into());
assert_eq!(parquet::Type::Int64, Type::Int64.into());
assert_eq!(parquet::Type::Int96, Type::Int96.into());
assert_eq!(parquet::Type::Float, Type::Float.into())... | rust_cleaned_test_functions.jsonl/126061 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 218
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45514,
1819,
368,
341,
197,
6948,
10714,
10297,
1732,
23300,
486,
929,
486,
6890,
11,
3990,
486,
6890,
39860,
1423,
197,
6948,
10714,
10297,
1732,
23300,
486,
929,
486,
1072,
18,
17,
11,
3990,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_get_data() -> Result<(), Box<dyn std::error::Error>> {
fn t(
mut src: &[u8],
actual: &mut sam::record::Data,
expected: &sam::record::Data,
) -> io::Result<()> {
get_data(&mut src, actual)?;
assert_eq!(actual, expected);
... | rust_cleaned_test_functions.jsonl/53684 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 534
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
1769,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
286,
5168,
259,
1006,
310,
5206,
2286,
25,
44590,
84,
23,
1259,
310,
5042,
25,
609,
6984,
9962,
486,
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... | 2 |
#[test]
fn test_windowed_histogram_rollover() {
let (clock, ctl) = Clock::mock();
// time when we expect it to be.
let h =
AtomicWindowedHistogram::new(Duration::from_secs(5), Duration::from_millis(999), clock);
let snapshot = h.snapshot()... | rust_cleaned_test_functions.jsonl/3583 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1286
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
12571,
291,
68564,
62,
43684,
423,
368,
341,
286,
1077,
320,
20666,
11,
64935,
8,
284,
26142,
486,
16712,
1428,
16885,
286,
442,
882,
979,
582,
1720,
432,
311,
387,
624,
286,
1077,
305,
4035,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_slice() {
let mut v = vec![0, 1, 2, 3, 4, 5];
{
let mut buf = [9; 4];
let slice = Slice::new(&mut v, 2, Some(3));
let bytes = slice.read_at(2, &mut buf).unwrap();
assert_eq!(bytes, 1);
assert_eq!(buf, [4, 9, 9, 9]);
let m... | rust_cleaned_test_functions.jsonl/115221 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1471
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26488,
368,
341,
262,
1077,
5206,
348,
284,
7486,
20703,
15,
11,
220,
16,
11,
220,
17,
11,
220,
18,
11,
220,
19,
11,
220,
20,
935,
262,
341,
1789,
286,
1077,
5206,
6607,
284,
508,
24,
26,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decode_valid_jwt_rs256() {
let p1 = json!({
"key1" : "val1",
"key2" : "val2"
});
let header = json!({});
let jwt1 = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJrZXkxIjoidmFsMSIsImtleTIiOiJ2YWwyIn0.DFusERCFWCL3CkKBaoVKsi1Z3QO2NTTRDTGHPqm7ctzy... | rust_cleaned_test_functions.jsonl/51736 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 683
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15227,
8337,
95576,
47115,
17,
20,
21,
368,
341,
286,
1077,
281,
16,
284,
2951,
0,
2262,
310,
330,
792,
16,
1,
549,
330,
831,
16,
756,
310,
330,
792,
17,
1,
549,
330,
831,
17,
698,
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_adjust_val() {
assert_eq!(0.0, adjust_val(-10.0, 0.0, 100.0));
assert_eq!(10.0, adjust_val(10.0, 0.0, 100.0));
assert_eq!(100.0, adjust_val(500.0, 0.0, 100.0));
} | rust_cleaned_test_functions.jsonl/80582 | {
"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,
44153,
6189,
368,
341,
286,
2060,
10714,
10297,
15,
13,
15,
11,
7500,
6189,
4080,
16,
15,
13,
15,
11,
220,
15,
13,
15,
11,
220,
16,
15,
15,
13,
15,
1106,
286,
2060,
10714,
10297,
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_insert() {
let q = ArrayQueue::new(2);
q.push(1);
q.push(2);
q.push(3);
assert_eq!(q.len(), 2);
assert_eq!(q.pop().unwrap(), 1);
assert_eq!(q.pop().unwrap(), 2);
} | rust_cleaned_test_functions.jsonl/2120 | {
"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,
17678,
368,
341,
286,
1077,
2804,
284,
2910,
7554,
486,
931,
7,
17,
317,
286,
2804,
2552,
7,
16,
317,
286,
2804,
2552,
7,
17,
317,
286,
2804,
2552,
7,
18,
317,
286,
2060,
10714,
10297,
80,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_imports_directive_from_argument() {
const ROOT_SCHEMA: &str = r#"
type _Schema_ @import(types: ["T", "A", "C"])"#;
let document = graphql_parser::parse_schema(ROOT_SCHEMA).expect("Failed to parse root schema");
let schema = Schema::new(DeploymentHash::new("id").unwrap(), document);
... | rust_cleaned_test_functions.jsonl/10136 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 306
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18434,
82,
32871,
533,
5673,
9025,
368,
341,
262,
733,
35736,
46220,
25,
609,
495,
284,
435,
2,
698,
1313,
716,
8632,
62,
569,
474,
52613,
25,
4383,
51,
497,
330,
32,
497,
330,
34,
1341,
994... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_csp_get_message_2() {
let json = r#"{
"csp-report": {
"document-uri": "http://example.com/foo",
"effective-directive": "script-src",
"blocked-uri": "",
"violated-directive": "script-src 'unsafe-inline'"
... | rust_cleaned_test_functions.jsonl/4029 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 315
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
666,
2154,
3062,
6462,
62,
17,
368,
341,
286,
1077,
2951,
284,
435,
55543,
515,
310,
330,
66,
2154,
47411,
788,
341,
394,
330,
6062,
87232,
788,
330,
1254,
1110,
8687,
905,
60555,
756,
394,
33... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ui_z_system() {
let mut world = World::default();
let mut queue = CommandQueue::default();
let mut commands = Commands::new(&mut queue, &world);
commands.spawn_bundle(node_with_transform("0"));
commands
.spawn_bundle(node_with_transform("1"))
... | rust_cleaned_test_functions.jsonl/67780 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1780
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22412,
6415,
17687,
368,
341,
286,
1077,
5206,
1879,
284,
4337,
486,
2258,
543,
286,
1077,
5206,
7177,
284,
7348,
7554,
486,
2258,
543,
286,
1077,
5206,
11293,
284,
47183,
486,
931,
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_tick_keeps_counts() {
let mut script = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
script.push("resources/tests/scripts");
let script_dir = script.clone();
script.push("keep_count.lua");
let config = ProgrammableFilterConfig {
... | rust_cleaned_test_functions.jsonl/41374 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2409
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
43612,
45476,
7124,
25977,
368,
341,
310,
1077,
5206,
5316,
284,
7933,
15064,
486,
1499,
16978,
17223,
34,
7581,
46,
25143,
91120,
8291,
4010,
310,
5316,
2552,
445,
12745,
62468,
39372,
797,
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... | 5 |
#[test]
fn test_backup_mode_long_with_env_var_shortened() {
let _dummy = TEST_MUTEX.lock().unwrap();
env::set_var(ENV_VERSION_CONTROL, "si");
let matches = make_app().get_matches_from(vec!["app", "--backup"]);
let result = determine_backup_mode(&matches).unwrap();
asser... | rust_cleaned_test_functions.jsonl/98151 | {
"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,
44710,
7302,
17799,
6615,
15879,
4612,
16673,
6758,
368,
341,
286,
1077,
716,
31390,
284,
13602,
66994,
21003,
1005,
15454,
543,
286,
6105,
486,
746,
4612,
7,
30360,
10678,
23680,
11,
330,
6321,
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_derive_proof_at_index_trivial() {
let (tx_out_store, env) = init_tx_out_store();
let num_tx_outs: u32 = 6;
let tx_outs = get_tx_outs(num_tx_outs);
{
// Populate the tx_out_store.
let mut rw_transaction = env.begin_rw_txn().unwrap();
... | rust_cleaned_test_functions.jsonl/5266 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 615
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35345,
533,
86757,
3752,
3560,
3547,
26658,
368,
341,
286,
1077,
320,
3998,
6068,
14809,
11,
6105,
8,
284,
2930,
17805,
6068,
14809,
543,
286,
1077,
1629,
17805,
6068,
82,
25,
575,
18,
17,
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_simple_scan() -> Result<(), Box<dyn std::error::Error>> {
let table_name = "table--test_simple_scan";
let mut c = setup()?;
c.args(&[
"--region", "local", "table", "create", table_name, "--keys", "pk",
])
.output()?;
let mut c = setup()?;
c.args(&["--region",... | rust_cleaned_test_functions.jsonl/37974 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 295
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
28857,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
1077,
1965,
1269,
284,
330,
2005,
313,
1944,
30015,
28857,
3302,
262,
1077,
5206,
272,
284,
6505,
9413... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_switch_implies_cfg_test_unless_cfg_test() {
let matches =
&match getopts(["--test".to_string(), "--cfg=test".to_string()],
optgroups().as_slice()) {
Ok(m) => m,
Err(f) => {
fail!("test_switch_implies_cfg_t... | rust_cleaned_test_functions.jsonl/127231 | {
"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,
27652,
21007,
550,
18343,
4452,
4907,
1717,
18343,
4452,
368,
341,
286,
1077,
9071,
4035,
310,
609,
6347,
633,
10518,
19065,
313,
1944,
3263,
983,
3904,
1507,
14482,
14072,
53538,
3263,
983,
3904,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_valid_nested() {
let json = r#"{"answer":42,"other":21}"#;
let value = Annotated::from(Test {
answer: Annotated::from(42),
other: 21,
});
assert_eq_dbg!(value, serde_json::from_str(json).unwrap());
assert_eq_str!(json, &serde_json:... | rust_cleaned_test_functions.jsonl/126361 | {
"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,
8337,
66279,
368,
341,
286,
1077,
2951,
284,
435,
55543,
4913,
9217,
788,
19,
17,
1335,
1575,
788,
17,
16,
9863,
2,
280,
286,
1077,
897,
284,
1527,
87029,
486,
1499,
31159,
341,
310,
4226,
25,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_read_external_storage_into_file_timed_out() {
use futures_util::stream::{pending, TryStreamExt};
let mut input = pending::<io::Result<&[u8]>>().into_async_read();
let mut output = Vec::new();
let err = block_on_external_io(SSTImporter::read_external_storage_into_... | rust_cleaned_test_functions.jsonl/4961 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
6443,
47432,
23310,
45514,
2458,
29087,
291,
6068,
368,
341,
286,
990,
36823,
18974,
486,
4027,
22964,
28210,
11,
9735,
3027,
6756,
2315,
286,
1077,
5206,
1946,
284,
15280,
27638,
815,
486,
2077,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_and_deserialize_putinto() {
let orig = ProgramInstruction::PutIntoBucket {
data: &[7, 8, 9, 10, 11, 12],
offset: 6,
};
let bs = orig.serialize();
let new = parse_program_instruction(bs.as_ref()).unwrap();
assert_eq!(orig... | rust_cleaned_test_functions.jsonl/128156 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 168
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
8378,
15768,
9050,
15557,
18122,
368,
341,
286,
1077,
2713,
284,
6687,
16664,
486,
19103,
26591,
36018,
341,
310,
821,
25,
44590,
22,
11,
220,
23,
11,
220,
24,
11,
220,
16,
15,
11,
220,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_wait() {
// Grab FORK_MTX so wait doesn't reap a different test's child process
#[allow(unused_variables)]
let m = ::FORK_MTX.lock().expect("Mutex got poisoned by another test");
match fork().expect("Error: Fork Failed") {
Child => unsafe { _exit(0) },
Paren... | rust_cleaned_test_functions.jsonl/8983 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 215
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18760,
368,
341,
262,
442,
36194,
4613,
42,
1245,
22867,
773,
3783,
3171,
944,
56903,
264,
2155,
1273,
594,
1682,
1882,
198,
262,
11506,
7183,
18364,
2591,
28182,
5563,
262,
1077,
296,
284,
3504,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_dirs() {
let d = "subdir/";
let dirname = d.as_ref();
let env = PosixDiskEnv::new();
assert!(env.mkdir(dirname).is_ok());
assert!(env
.open_writable_file(
String::from_iter(vec![d.to_string(), "f1.txt".to_string()].into_iter())... | rust_cleaned_test_functions.jsonl/75783 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 263
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
44869,
368,
341,
286,
1077,
294,
284,
330,
1966,
3741,
37254,
286,
1077,
29908,
284,
294,
5357,
7793,
543,
286,
1077,
6105,
284,
18876,
941,
47583,
14359,
486,
931,
1428,
286,
2060,
10297,
3160,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_misaligned() {
let mut mem = Memory::new(1024);
match mem.read_half_word(3) {
Err(why) => assert_eq!(why, RiscvError::MemoryAlignmentError(3)),
_ => panic!(),
};
match mem.read_word(2) {
Err(why) => assert_eq!(why, RiscvError::... | rust_cleaned_test_functions.jsonl/92776 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 369
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
285,
47142,
368,
341,
286,
1077,
5206,
1833,
284,
13850,
486,
931,
7,
16,
15,
17,
19,
626,
286,
2432,
1833,
4125,
40626,
13533,
7,
18,
8,
341,
310,
15495,
7,
34634,
8,
589,
2060,
10714,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 5 |
#[test]
fn test_misleading_unicode_anagrams() {
// while the list of potential anagrams uses Latin A and B.
let inputs = ["ABΓ"];
let outputs: Vec<&str> = vec![];
assert_eq!(anagram::anagrams_for("ΑΒΓ", &inputs), outputs);
} | rust_cleaned_test_functions.jsonl/65512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 112
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
285,
20654,
54662,
12008,
68772,
368,
341,
1066,
262,
442,
1393,
279,
1140,
315,
4650,
458,
68772,
5711,
19458,
362,
323,
425,
624,
262,
1077,
11127,
284,
4383,
1867,
145281,
6332,
262,
1077,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ops_rate_limiter() {
let mem = GuestMemory::new(&[(GuestAddress(0), 0x10000)]).unwrap();
let (mut h, txq, rxq) = default_test_netepollhandler(&mem, TestMutators::default());
let daddr = 0x2000;
assert!(daddr as usize > txq.end().0);
// Test TX ops rate l... | rust_cleaned_test_functions.jsonl/84706 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2349
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21959,
9246,
907,
17700,
368,
341,
286,
1077,
1833,
284,
26215,
10642,
486,
931,
2099,
9697,
37804,
4286,
7,
15,
701,
220,
15,
87,
16,
15,
15,
15,
15,
7252,
568,
15454,
543,
286,
1077,
320,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_clone_underlying() {
smol::run(async {
let start = Instant::now();
let a = view(|| async { Instant::now() })
.frequency(Duration::from_millis(100))
.load()
.await;
std::thread::sleep(Duration::from_mill... | rust_cleaned_test_functions.jsonl/62859 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 274
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
54742,
58228,
6711,
368,
341,
286,
1525,
337,
486,
6108,
18285,
341,
310,
1077,
1191,
284,
18058,
486,
3328,
1428,
310,
1077,
264,
284,
1651,
79453,
3312,
314,
18058,
486,
3328,
368,
2751,
394,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_has_tags() {
let engine = setup();
macro_rules! check {
($tags:expr, $tag:expr, $result:expr) => {
let tag = Tag::new($tag);
let result = engine.check_tag(&tag, &$tags).unwrap();
assert_eq!(
result,
$result,
... | rust_cleaned_test_functions.jsonl/51593 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 530
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21778,
16333,
368,
341,
262,
1077,
4712,
284,
6505,
1428,
262,
18072,
21407,
0,
1779,
341,
286,
1711,
14082,
96011,
11,
400,
4578,
96011,
11,
400,
1382,
96011,
8,
589,
341,
310,
1077,
4772,
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_indent() {
let items = string_vec_to_status(&[
"a/b/file.txt",
]);
let list =
FileTreeItems::new(&items, &BTreeSet::new()).unwrap();
let mut res = list
.items
.iter()
.map(|i| (i.info.indent, i.info.pat... | rust_cleaned_test_functions.jsonl/56872 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 273
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
69045,
368,
341,
286,
1077,
3589,
284,
914,
13251,
2346,
4773,
2099,
9640,
310,
330,
64,
3470,
23903,
3909,
497,
715,
286,
22712,
286,
1077,
1140,
4035,
310,
2887,
6533,
4353,
486,
931,
2099,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_best_repair_shreds() {
let (blockstore, heaviest_subtree_fork_choice) = setup_forks();
let mut repairs = vec![];
let last_shred = blockstore.meta(0).unwrap().unwrap().received;
get_best_repair_shreds(
&heaviest_subtree_fork_choic... | rust_cleaned_test_functions.jsonl/80141 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1873
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
33101,
1288,
12670,
3712,
53369,
368,
341,
286,
1077,
320,
4574,
4314,
11,
566,
98362,
5228,
9344,
761,
669,
31936,
8,
284,
6505,
761,
73302,
1428,
16885,
286,
1077,
5206,
30186,
284,
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_to_snake() {
assert_eq!("foo_bar", &to_snake("FooBar"));
assert_eq!("foo_bar_baz", &to_snake("FooBarBAZ"));
assert_eq!("foo_bar_baz", &to_snake("FooBarBAZ"));
assert_eq!("xml_http_request", &to_snake("XMLHttpRequest"));
assert_eq!("r#while", &to_snake("Whi... | rust_cleaned_test_functions.jsonl/86616 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1007
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2346,
28022,
726,
368,
341,
286,
2060,
10714,
17223,
7975,
14388,
497,
609,
983,
28022,
726,
445,
40923,
3428,
4010,
286,
2060,
10714,
17223,
7975,
14388,
880,
1370,
497,
609,
983,
28022,
726,
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 |
#[test]
fn test_empty_record_string() {
let mut tables = make_empty_table_collection(1.0);
let s = String::from("");
let row_id = tables.add_provenance(&s).unwrap();
let _ = tables.provenances().row(row_id).unwrap();
tables.build_index().unwrap();
... | rust_cleaned_test_functions.jsonl/12737 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 257
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15124,
14192,
3904,
368,
341,
1789,
286,
1077,
5206,
12632,
284,
1281,
15124,
5237,
25019,
7,
16,
13,
15,
317,
286,
1077,
274,
284,
923,
486,
1499,
13056,
286,
1077,
2802,
842,
284,
12632,
1364,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_multicast() {
let ci = ContactInfo::new_multicast();
assert!(ci.gossip.ip().is_multicast());
assert!(ci.tvu.ip().is_multicast());
assert!(ci.tpu_forwards.ip().is_multicast());
assert!(ci.rpc.ip().is_multicast());
assert!(ci.rpc_pubsub.ip().is_multi... | rust_cleaned_test_functions.jsonl/84122 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 245
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
26290,
35446,
368,
341,
286,
1077,
11825,
284,
9180,
1731,
486,
931,
26290,
35446,
543,
286,
2060,
10297,
5855,
1302,
41473,
23171,
1005,
285,
26290,
35446,
1423,
286,
2060,
10297,
5855,
14485,
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_range() {
let r = Range { start: 2, end: 10 };
let mut count = 0;
for (i, ri) in r.enumerate() {
assert!(ri == i + 2);
assert!(ri >= 2 && ri < 10);
count += 1;
}
assert!(count == 8);
} | rust_cleaned_test_functions.jsonl/33483 | {
"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,
9698,
368,
341,
262,
1077,
435,
284,
16437,
314,
1191,
25,
220,
17,
11,
835,
25,
220,
16,
15,
2605,
262,
1077,
5206,
1760,
284,
220,
15,
280,
262,
369,
320,
72,
11,
24185,
8,
304,
435,
555... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_s3_object_uri() {
let uri = parse_uri("s3://foo/bar").unwrap();
assert_eq!(
uri.into_s3object().unwrap(),
s3::S3Object {
bucket: "foo",
key: "bar",
}
);
} | rust_cleaned_test_functions.jsonl/107422 | {
"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,
21039,
643,
18,
5314,
15572,
368,
341,
286,
1077,
13071,
284,
4715,
15572,
445,
82,
18,
1110,
7975,
49513,
1827,
15454,
543,
286,
2060,
10714,
33673,
310,
13071,
39860,
643,
18,
1700,
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... | 1 |
#[test]
fn test_websocket_version() {
use header::Headers;
let version = WebSocketVersion::WebSocket13;
let mut headers = Headers::new();
headers.set(version);
assert_eq!(&headers.to_string()[..], "Sec-WebSocket-Version: 13\r\n");
} | rust_cleaned_test_functions.jsonl/125761 | {
"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,
25960,
9556,
9438,
368,
341,
197,
41819,
4247,
486,
10574,
401,
197,
10217,
2319,
284,
47042,
5637,
486,
61238,
16,
18,
280,
197,
10217,
5206,
7102,
284,
21426,
486,
931,
543,
197,
67378,
980,
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_parse_command_tokens() {
assert_eq!(Shell::parse_command("foo").unwrap().0, "/api/foo");
assert_eq!(Shell::parse_command("foo `{\"a\": 1}`").unwrap().1, json!({"a": 1}));
} | rust_cleaned_test_functions.jsonl/76573 | {
"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,
21039,
10811,
28838,
368,
341,
286,
2060,
10714,
10297,
25287,
486,
6400,
10811,
445,
7975,
1827,
15454,
1005,
15,
11,
3521,
2068,
60555,
797,
286,
2060,
10714,
10297,
25287,
486,
6400,
10811,
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 |
#[test]
fn test_inline_function_alias2a() {
test(
"function f(x) {} var y; y = f; g(); y();y();",
"function f(x) {} var y; y = f; g(); f();f();",
);
} | rust_cleaned_test_functions.jsonl/27697 | {
"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,
41871,
9174,
35947,
17,
64,
368,
341,
262,
1273,
1006,
286,
330,
1688,
282,
2075,
8,
4687,
762,
379,
26,
379,
284,
282,
26,
342,
2129,
379,
2129,
88,
2129,
756,
286,
330,
1688,
282,
2075,
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 |
#[test]
fn test_negate() {
let value: Int256 = 1i32.into();
let new_value = -value;
assert_eq!(new_value, Int256::from(-1i32));
} | rust_cleaned_test_functions.jsonl/118552 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 70
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
28209,
349,
368,
341,
262,
1077,
897,
25,
1333,
17,
20,
21,
284,
220,
16,
72,
18,
17,
39860,
543,
262,
1077,
501,
3142,
284,
481,
957,
280,
262,
2060,
10714,
10297,
931,
3142,
11,
1333,
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 |
#[test]
fn test_pearson_corr() {
let a = Series::new("a", &[1.0f32, 2.0]);
let b = Series::new("b", &[1.0f32, 2.0]);
assert!((cov(&a.f32().unwrap(), &b.f32().unwrap()).unwrap() - 0.5).abs() < 0.001);
assert!((pearson_corr(&a.f32().unwrap(), &b.f32().unwrap()).unwrap() - 1.0).abs(... | rust_cleaned_test_functions.jsonl/35177 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
62,
8015,
930,
53866,
368,
341,
286,
1077,
264,
284,
11131,
486,
931,
445,
64,
497,
44590,
16,
13,
15,
69,
18,
17,
11,
220,
17,
13,
15,
2558,
286,
1077,
293,
284,
11131,
486,
931,
445,
65,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_decimal_schemas() {
let schema = Schema::parse_str(
r#"{
"type": "fixed",
"name": "dec",
"size": 8,
"logicalType": "decimal",
"precision": 12,
"scale": 5
}"#,
)... | rust_cleaned_test_functions.jsonl/2988 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1508
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74429,
643,
31126,
368,
341,
286,
1077,
10802,
284,
12539,
486,
6400,
2895,
1006,
310,
435,
55543,
515,
394,
330,
1313,
788,
330,
22021,
756,
394,
330,
606,
788,
330,
8169,
756,
394,
330,
2141,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_account_key() {
let (message, keys) = check_test_loaded_message();
assert_eq!(message.get_account_key(0), Some(&keys[0]));
assert_eq!(message.get_account_key(1), Some(&keys[1]));
assert_eq!(message.get_account_key(2), Some(&keys[2]));
assert_eq!(messa... | rust_cleaned_test_functions.jsonl/34143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 229
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3062,
13500,
3097,
368,
341,
286,
1077,
320,
1994,
11,
6894,
8,
284,
1779,
4452,
49205,
6462,
1428,
286,
2060,
10714,
10297,
1994,
670,
13500,
3097,
7,
15,
701,
4329,
2099,
10563,
58,
15,
14382,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_disk_image() {
let mut block = default_block();
let f = TempFile::new().unwrap();
let path = f.as_path();
let mdata = metadata(&path).unwrap();
let mut id = vec![0; VIRTIO_BLK_ID_BYTES as usize];
let str_id = format!("{}{}{}", mdata.st_dev()... | rust_cleaned_test_functions.jsonl/73925 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8882,
41687,
4954,
368,
341,
286,
1077,
5206,
2504,
284,
1638,
7113,
543,
286,
1077,
282,
284,
19944,
1703,
486,
931,
1005,
15454,
543,
286,
1077,
1815,
284,
282,
5357,
2638,
543,
286,
1077,
296... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_ngram_tokenizer() {
let tokenizer = NGramTokenizer::new("hello", 2, 3, Edge::Neither);
let tokens = tokenizer.collect::<Vec<Token>>();
assert_eq!(tokens, vec![
Token { term: Term::from_string("he"), position: 1 },
Token { term: Term::from_string("... | rust_cleaned_test_functions.jsonl/50142 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 304
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1089,
1520,
6458,
3135,
368,
341,
286,
1077,
45958,
284,
20018,
2396,
37434,
486,
931,
445,
14990,
497,
220,
17,
11,
220,
18,
11,
10349,
486,
62195,
317,
286,
1077,
11211,
284,
45958,
29124,
276... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_explode() {
let sn = parse_line("[[[[[9,8],1],2],3],4]");
explode(sn.clone());
assert_eq!("[[[[0,9],2],3],4]", format!("{:?}", sn.borrow()));
let sn = parse_line("[[6,[5,[4,[3,2]]]],1]");
explode(sn.clone());
assert_eq!("[[6,[5,[7,0]]],3]", format... | rust_cleaned_test_functions.jsonl/51418 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 193
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2702,
70744,
368,
341,
286,
1077,
4131,
284,
4715,
6528,
10937,
15505,
15505,
24,
11,
23,
1125,
16,
1125,
17,
1125,
18,
1125,
19,
37389,
286,
15758,
59865,
15997,
1423,
286,
2060,
10714,
0,
1093... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_canonicalize_idents_by_lowercasing_github_urls() {
let ident1 = ident(&url("https://github.com/PistonDevelopers/piston")).unwrap();
let ident2 = ident(&url("https://github.com/pistondevelopers/piston")).unwrap();
assert_eq!(ident1, ident2);
} | rust_cleaned_test_functions.jsonl/21283 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 125
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
27421,
22391,
551,
842,
805,
3710,
30425,
66,
4422,
1889,
3827,
32822,
368,
341,
286,
1077,
3524,
16,
284,
3524,
2099,
1085,
445,
2428,
1110,
5204,
905,
16341,
58819,
20444,
388,
4322,
58819,
1519... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bits() {
assert_eq!(BigUint::new(vec!(0,0,0,0)).bits(), 0);
let n: BigUint = FromPrimitive::from_usize(0).unwrap();
assert_eq!(n.bits(), 0);
let n: BigUint = FromPrimitive::from_usize(1).unwrap();
assert_eq!(n.bits(), 1);
let n: BigUint = FromPrimi... | rust_cleaned_test_functions.jsonl/90143 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 294
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
20034,
368,
341,
286,
2060,
10714,
10297,
15636,
21570,
486,
931,
25592,
10297,
15,
11,
15,
11,
15,
11,
15,
4579,
11516,
1507,
220,
15,
317,
286,
1077,
308,
25,
6164,
21570,
284,
5542,
33313,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seal_lifecycle_32kib_top_8_8_2() -> Result<()> {
seal_lifecycle::<SectorShape32KiB>(SECTOR_SIZE_32_KIB, &ARBITRARY_POREP_ID)
} | rust_cleaned_test_functions.jsonl/4367 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 81
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
3453,
278,
907,
19517,
62,
18,
17,
74,
579,
10426,
62,
23,
62,
23,
62,
17,
368,
1464,
5714,
71698,
341,
262,
25349,
907,
19517,
27638,
68188,
12301,
18,
17,
72572,
33,
2235,
925,
26275,
4098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_sign_verify() {
let gen = Generator::new();
let (privkey, pubkey) = gen.random_keypair().unwrap();
let message = Message::default();
let signature = privkey.sign_recoverable(&message).unwrap();
assert!(pubkey.verify(&message, &signature).is_ok());
} | rust_cleaned_test_functions.jsonl/100076 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 134
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11172,
35638,
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,
4856,
486,
225... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_setup_group_packages() {
let content = "
dev:
- package:
name: neovim
gui:
- package:
name: alacritty
";
let config = Config::new(&content).unwrap();
let pacman = FakePacman::new();
let ipa = Ipa::new(config, &pacman);
ipa.s... | rust_cleaned_test_functions.jsonl/16553 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 200
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21363,
6288,
41874,
368,
341,
286,
1077,
2213,
284,
6228,
3583,
510,
220,
481,
6328,
510,
414,
829,
25,
834,
859,
318,
271,
19109,
510,
220,
481,
6328,
510,
414,
829,
25,
452,
580,
1003,
1881,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_stack_size() {
use crate::valid::{Capabilities, ValidationFlags};
// create a module with at least one expression nested
let mut module = crate::Module::default();
let constant = module.constants.append(
crate::Constant {
name: None,
specialization... | rust_cleaned_test_functions.jsonl/22157 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1173
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
15528,
2368,
368,
341,
262,
990,
17717,
486,
1891,
22964,
55315,
11,
18954,
9195,
2440,
262,
442,
1855,
264,
4688,
448,
518,
3245,
825,
7493,
24034,
198,
262,
1077,
5206,
4688,
284,
17717,
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... | 5 |
#[test]
fn test_uswap() {
let mut a = arr2(&[[1, 2, 3], [4, 5, 6], [7, 8, 9]]);
let b = a.clone();
for i in 0..a.rows() {
for j in i + 1..a.cols() {
unsafe { a.uswap((i, j), (j, i)) };
}
}
assert_eq!(a, b.t());
} | rust_cleaned_test_functions.jsonl/103448 | {
"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,
11306,
21726,
368,
341,
262,
1077,
5206,
264,
284,
2890,
17,
2099,
15505,
16,
11,
220,
17,
11,
220,
18,
1125,
508,
19,
11,
220,
20,
11,
220,
21,
1125,
508,
22,
11,
220,
23,
11,
220,
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... | 3 |
#[test]
fn test_q2() -> io::Result<()> {
let test = [TEST_Q1, TEST_Q2].concat();
let orbits = parse_lines(test.split('\n').map(|s| Ok(s.to_owned())))?;
assert_eq!(q2(&orbits), 4);
Ok(())
} | rust_cleaned_test_functions.jsonl/23612 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 126
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
8976,
17,
368,
1464,
6399,
486,
2077,
71698,
341,
286,
1077,
1273,
284,
508,
10033,
13337,
16,
11,
13602,
13337,
17,
936,
20164,
543,
286,
1077,
85128,
284,
4715,
18323,
8623,
5289,
11024,
77,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_internal_constructor() {
let bucket = VectorTokenBucket::new(Duration::from_millis(1000), 100, *D00, 1.0, 1.0);
assert_eq!(100, bucket.burst_limit);
let bucket = VectorTokenBucket::new(Duration::from_millis(1000), 100, *D00, 1e-6, 1.0);
assert_eq!... | rust_cleaned_test_functions.jsonl/42325 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 266
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
23472,
66210,
368,
341,
310,
1077,
15621,
284,
4196,
3323,
36018,
486,
931,
64114,
486,
1499,
717,
56212,
7,
16,
15,
15,
15,
701,
220,
16,
15,
15,
11,
353,
35,
15,
15,
11,
220,
16,
13,
15,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_required_len_for_format() {
// issue #1292
assert_eq!(
required_len_for_format::<u8>(Format::BC1_RGB_UNORM_BLOCK, [2048, 2048, 1], 1),
2097152
);
// other test cases
assert_eq!(
required_len_for_format::<u8>(Format::R8G8... | rust_cleaned_test_functions.jsonl/58631 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 805
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
18743,
6043,
5478,
8955,
368,
341,
286,
442,
4265,
671,
16,
17,
24,
17,
198,
286,
2060,
10714,
33673,
310,
2567,
6043,
5478,
8955,
27638,
84,
23,
2235,
4061,
486,
4897,
16,
24815,
6735,
4365,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_breadcrumbs() {
let events = sentry::test::with_captured_events(|| {
sentry::add_breadcrumb(|| sentry::Breadcrumb {
ty: "log".into(),
message: Some("Old breadcrumb to be removed".into()),
..Default::default()
});
sentry::configure_s... | rust_cleaned_test_functions.jsonl/49568 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 957
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
24466,
368,
341,
262,
1077,
4357,
284,
3208,
884,
486,
1944,
486,
4197,
666,
80228,
19691,
79453,
341,
286,
3208,
884,
486,
718,
880,
17032,
79453,
3208,
884,
486,
75230,
341,
310,
13580,
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... | 6 |
#[test]
fn test_from_ndarray3() {
let hw = RefCell::new(CpuHardware::new());
let src = ndarray::Array3::<f32>::from_shape_vec((2, 2, 2), iota(8)).unwrap();
let dest = src.into_array(&hw);
assert_eq!(*dest.shape(), Shape::new([2, 2, 2]));
assert_eq!(dest.get_values_f32(), iota(8));
} | rust_cleaned_test_functions.jsonl/73989 | {
"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,
5673,
43544,
1653,
18,
368,
341,
262,
1077,
31256,
284,
8550,
3599,
486,
931,
3025,
5584,
66862,
486,
931,
1423,
262,
1077,
2286,
284,
66883,
486,
1857,
18,
27638,
69,
18,
17,
6831,
1499,
13597,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_object_check() {
let file = parse_string("object_test", "a = 1\nb = {c: 2, a}");
let got = check(walk::Node::File(&file));
let want = vec![Error {
location: SourceLocation {
file: Some(String::from("object_test")),
start: Position { line: 2, column: 5 ... | rust_cleaned_test_functions.jsonl/89890 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 290
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
5314,
7200,
368,
341,
262,
1077,
1034,
284,
4715,
3904,
445,
1700,
4452,
497,
330,
64,
284,
220,
16,
1699,
65,
284,
314,
66,
25,
220,
17,
11,
264,
20305,
262,
1077,
2684,
284,
1779,
3622,
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_simple_echo() {
BIN_UNDER_TEST
.command()
.args(&[OsStr::new("--log"), LOG_FILE_NAME.as_os_str()])
.args(&["-c", "echo foo"])
.unwrap()
.assert()
.stdout(predicates::str::diff("foo\n").from_utf8());
} | rust_cleaned_test_functions.jsonl/42026 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 148
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
30015,
68628,
368,
341,
262,
82609,
92614,
11641,
198,
286,
659,
5631,
741,
286,
659,
2116,
2099,
58,
28867,
2580,
486,
931,
21549,
839,
3975,
8081,
8087,
4708,
5357,
29387,
2895,
56024,
286,
659,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_mkdirat_with_o_path() {
use rustix::fs::{cwd, mkdirat, openat, statat, unlinkat, AtFlags, FileType, Mode, OFlags};
let tmp = tempfile::tempdir().unwrap();
let dir = openat(
&cwd(),
tmp.path(),
OFlags::RDONLY | OFlags::PATH,
Mode::empty(),
)
.u... | rust_cleaned_test_functions.jsonl/61404 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 264
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
12438,
266,
6615,
14179,
2638,
368,
341,
262,
990,
23071,
941,
486,
3848,
22964,
32165,
11,
30073,
266,
11,
1787,
266,
11,
2793,
266,
11,
47479,
266,
11,
2411,
9195,
11,
93238,
11,
14562,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_from_impl_generic_enum() {
check_assist(
generate_from_impl_for_enum,
r#"
//- minicore: from
enum Generic<T, U: Clone> { $0One(T), Two(U) }
"#,
r#"
enum Generic<T, U: Clone> { One(T), Two(U) }
impl<T, U: Clone> From<T> for Generic<T, U> {
fn f... | rust_cleaned_test_functions.jsonl/4576 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 219
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
5673,
21007,
41232,
31054,
368,
341,
286,
1779,
12083,
380,
1006,
310,
6923,
5673,
21007,
5478,
31054,
345,
310,
435,
2,
698,
61463,
1308,
292,
460,
25,
504,
198,
9018,
21281,
3125,
11,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_builtin() {
let (genesis_config, mint_keypair) = create_genesis_config(500);
let mut bank = Bank::new(&genesis_config);
fn mock_vote_program_id() -> Pubkey {
Pubkey::new(&[42u8; 32])
}
fn mock_vote_processor(
program_id: &Pubke... | rust_cleaned_test_functions.jsonl/2608 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 951
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2891,
73829,
368,
341,
286,
1077,
320,
77894,
5332,
11,
28337,
3097,
12670,
8,
284,
1855,
16322,
13774,
5332,
7,
20,
15,
15,
317,
286,
1077,
5206,
6073,
284,
8547,
486,
931,
2099,
77894,
5332,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bootnode_mode_inbound_eviction() {
let node1 = net_service_start("/test/1".to_string());
let node2 = net_service_start("/test/1".to_string());
let node3 = net_service_start("/test/1".to_string());
let node4 = net_service_start("/test/1".to_string());
let node5 = net_service_s... | rust_cleaned_test_functions.jsonl/71181 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 498
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
52062,
3509,
7302,
1243,
10891,
43713,
2479,
368,
341,
262,
1077,
2436,
16,
284,
4179,
12267,
4906,
4283,
1944,
14,
16,
3263,
983,
3904,
1423,
262,
1077,
2436,
17,
284,
4179,
12267,
4906,
4283,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_seek_last() {
let mut it = build_iterator_for_test();
it.seek(Seek::Last).unwrap();
assert!(it.is_valid());
assert_eq!(&full_key(b"k05", 5)[..], it.key());
assert_eq!(b"v05", it.value());
} | rust_cleaned_test_functions.jsonl/5445 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 133
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
74473,
12195,
368,
341,
286,
1077,
5206,
432,
284,
1936,
13491,
5478,
4452,
543,
286,
432,
38179,
7,
39350,
486,
5842,
568,
15454,
543,
286,
2060,
10297,
275,
2079,
8337,
1423,
286,
2060,
10714,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_serialize_failure() -> Result<(), Box<dyn std::error::Error>> {
#[derive(Serialize)]
struct MyUserData(i64);
impl UserData for MyUserData {}
let lua = Lua::new();
let ud = Value::UserData(lua.create_userdata(MyUserData(123))?);
match serde_json::to_value(&ud) {
... | rust_cleaned_test_functions.jsonl/50702 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 383
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
43618,
368,
1464,
5714,
68843,
8261,
92846,
1460,
486,
841,
486,
1454,
2452,
341,
262,
11506,
27098,
3759,
9050,
5563,
262,
2036,
3017,
39485,
1956,
21,
19,
626,
262,
11605,
71294,
369,
301... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 8 |
#[test]
fn test_default_path_home() {
let mut path = home_dir().expect("home dir must exist");
path.push(CLI_CONFIG_PATH);
path.push("config");
assert_eq!(ConfigFile::default_file_path(None).expect("file"), path);
} | rust_cleaned_test_functions.jsonl/4386 | {
"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,
9993,
2638,
21653,
368,
341,
286,
1077,
5206,
1815,
284,
2114,
4334,
1005,
17119,
445,
5117,
5419,
1969,
3000,
797,
286,
1815,
2552,
3025,
18537,
12568,
7944,
317,
286,
1815,
2552,
445,
1676,
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 |
#[test]
fn test_mixed_to_bytes() {
let mut f = compile_test_fn(
"@states 100
@function Void test(Int a, Cell b, Vec7 c, Range d, Rect3 e, CellFilter f) {
assert a == 10
assert b == #20
assert c == [-7, -6, -5, -4, -3, -2, -1]
assert d == (30..4... | rust_cleaned_test_functions.jsonl/115817 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 549
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
3286,
2346,
12524,
368,
341,
262,
1077,
5206,
282,
284,
19192,
4452,
15246,
1006,
286,
8428,
32069,
220,
16,
15,
15,
198,
286,
569,
1688,
19193,
1273,
24123,
264,
11,
13972,
293,
11,
11312,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_merging_iterator() {
let mut input = vec![];
for i in 1..100 {
input.push(i.to_string());
}
input.sort();
let tests = vec![1, 5, 10, 50];
for t in tests {
let merging_iter = new_test_merging_iter(input.clone(), t);
... | rust_cleaned_test_functions.jsonl/1875 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 583
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
717,
95296,
13491,
368,
341,
286,
1077,
5206,
1946,
284,
7486,
0,
15078,
286,
369,
600,
304,
220,
16,
496,
16,
15,
15,
341,
310,
1946,
2552,
1956,
2389,
3904,
1423,
286,
456,
286,
1946,
10614,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fetch_target_description_standard() {
block_on(test_fetch_target_description(
"standard/metadata".to_string(),
TargetDescription::from_slice(
"target with no custom metadata".as_bytes(),
&[HashAlgorithm::Sha256],
)
... | rust_cleaned_test_functions.jsonl/25471 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 181
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
11803,
11123,
11448,
48688,
368,
341,
286,
2504,
4470,
8623,
11803,
11123,
11448,
1006,
310,
330,
20270,
3183,
7603,
3263,
983,
3904,
3148,
310,
13483,
5009,
486,
1499,
26488,
1006,
394,
330,
5657,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_expand_uipac() {
let mut foo = expand_uipac("ACGT");
assert_eq!(foo.len(), 1);
assert_eq!(foo.pop().unwrap(), "ACGT");
foo = expand_uipac("");
assert_eq!(foo.len(), 0);
foo = expand_uipac("NN");
let bar = vec![
"AA", "AC", "AG... | rust_cleaned_test_functions.jsonl/35941 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 342
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
67875,
7300,
573,
580,
368,
341,
286,
1077,
5206,
15229,
284,
9225,
7300,
573,
580,
445,
1706,
25388,
797,
286,
2060,
10714,
10297,
7975,
19406,
1507,
220,
16,
317,
286,
2060,
10714,
10297,
7975,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_decode_u32_precomputation_for_G() {
let decode_u32_precomputation_for_G = decode_u32_precomputation(G);
if decode_u32_precomputation_for_G.0 != DECODE_PRECOMPUTATION_FOR_G.0 {
use std::{fs::File, io::Write, path::PathBuf};
let mut f = File::crea... | rust_cleaned_test_functions.jsonl/17059 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 333
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
88686,
15227,
7300,
18,
17,
10442,
874,
13320,
5478,
2646,
368,
341,
286,
1077,
16895,
7300,
18,
17,
10442,
874,
13320,
5478,
2646,
284,
16895,
7300,
18,
17,
10442,
874,
13320,
6699,
626,
286,
4... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_rpc() {
let mut runtime = consensus_runtime();
let num_nodes = 2;
let mut senders = Vec::new();
let mut receivers: Vec<NetworkReceivers> = Vec::new();
let mut playground = NetworkPlayground::new(runtime.handle().clone());
let mut nodes = Vec::new()... | rust_cleaned_test_functions.jsonl/56483 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1978
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
60799,
368,
341,
286,
1077,
5206,
15592,
284,
23869,
33232,
543,
286,
1077,
1629,
14896,
284,
220,
17,
280,
286,
1077,
5206,
3624,
388,
284,
11312,
486,
931,
543,
286,
1077,
5206,
39906,
25,
113... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_fastq_parallel() {
for cap in 3..400 {
let par_reader = Reader::with_capacity(FASTQ, cap);
let mut reader = Reader::new(FASTQ);
seq_io::parallel::parallel_fastq(par_reader, 1, 2,
|_, out| { *out = (); },
|rec, _| { // runs in main thread
... | rust_cleaned_test_functions.jsonl/40340 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35743,
80,
60625,
368,
1476,
262,
369,
2062,
304,
220,
18,
496,
19,
15,
15,
341,
286,
1077,
1346,
22306,
284,
25166,
486,
4197,
35603,
7,
59206,
48,
11,
2062,
317,
286,
1077,
5206,
6604,
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_AND() {
let code = vec![0xA9, 0x64, 0x29, 0xA0];
let mut nes = Cpu::new();
let mut memory = new_memory(code);
nes.next(&mut memory).unwrap();
nes.next(&mut memory).unwrap();
assert_eq!(0x20, nes.A);
assert_eq!(0, nes.Z);
assert_eq... | rust_cleaned_test_functions.jsonl/38691 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 190
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21767,
368,
341,
286,
1077,
2038,
284,
7486,
20703,
15,
14673,
24,
11,
220,
15,
87,
21,
19,
11,
220,
15,
87,
17,
24,
11,
220,
15,
14673,
15,
4821,
286,
1077,
5206,
308,
288,
284,
356,
5584... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_gzip_invalid_body() {
let server = server! {
request: b"\
GET /gzip HTTP/1.1\r\n\
user-agent: $USERAGENT\r\n\
accept: */*\r\n\
accept-encoding: gzip\r\n\
host: $HOST\r\n\
\r\n\
",
response: b"... | rust_cleaned_test_functions.jsonl/101447 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 420
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
9964,
31433,
14114,
368,
341,
262,
1077,
3538,
284,
3538,
0,
341,
286,
1681,
25,
293,
83383,
310,
7890,
608,
70996,
10130,
14,
16,
13,
16,
12016,
1699,
5661,
310,
1196,
41935,
25,
400,
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... | 1 |
#[test]
fn test_virtio_fs_dax_off_w_virtiofsd_rs_daemon() {
test_virtio_fs(
false,
None,
"never",
&prepare_virtiofsd_rs_daemon,
false,
None,
)
} | rust_cleaned_test_functions.jsonl/26135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 163
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
2273,
2106,
815,
34470,
814,
706,
13651,
1670,
2273,
2106,
815,
3848,
67,
47115,
47070,
7291,
368,
341,
286,
1273,
2273,
2106,
815,
34470,
1006,
310,
895,
345,
310,
2240,
345,
310,
330,
36493,
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_cred_def_id_parts_for_id_as_unqualified_without_tag() {
assert_eq!(
_cred_def_id_unqualified_without_tag(),
_cred_def_id_unqualified_without_tag().to_unqualified()
);
} | rust_cleaned_test_functions.jsonl/38080 | {
"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,
73475,
7844,
842,
33217,
5478,
842,
11898,
4907,
36335,
39904,
9372,
368,
341,
310,
2060,
10714,
33673,
394,
716,
10844,
7844,
842,
4907,
36335,
39904,
9372,
3148,
394,
716,
10844,
7844,
842,
4907,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] | 1 |
#[test]
fn test_health_check() {
let mut cluster = new_server_cluster(0, 1);
cluster.run();
let addr = cluster.sim.rl().get_addr(1);
let env = Arc::new(Environment::new(1));
let channel = ChannelBuilder::new(env).connect(&addr);
let client = HealthClient::new(channel);
let req = He... | rust_cleaned_test_functions.jsonl/61709 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 223
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
45727,
7200,
368,
341,
262,
1077,
5206,
10652,
284,
501,
12015,
28441,
7,
15,
11,
220,
16,
317,
262,
10652,
7634,
1428,
262,
1077,
10789,
284,
10652,
28616,
95196,
1005,
455,
7387,
7,
16,
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_parse_type_expression_duration() {
let mut p = Parser::new(r#"duration"#);
let parsed = p.parse_type_expression();
let loc = Locator::new(&p.source[..]);
assert_eq!(
parsed,
TypeExpression {
base: BaseNode {
location: loc.get(1, 1, 1, 9... | rust_cleaned_test_functions.jsonl/67821 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 540
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
21039,
1819,
28068,
25454,
368,
341,
262,
1077,
5206,
281,
284,
21102,
486,
931,
2601,
55543,
17021,
57676,
317,
262,
1077,
15676,
284,
281,
4632,
1819,
28068,
543,
262,
1077,
1329,
284,
98653,
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_surface_through_iterator() {
use chrono::{NaiveDate, NaiveDateTime};
use metfor::*;
use optional::some;
let test_data = get_valid_test_data();
let surface_section = SurfaceSection::init(test_data).unwrap();
assert_eq!(surface_section.into_iter()... | rust_cleaned_test_functions.jsonl/103922 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 2717
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31030,
87399,
13491,
368,
341,
286,
990,
80372,
22964,
16193,
533,
1916,
11,
12812,
533,
7689,
2440,
286,
990,
2270,
1958,
56162,
286,
990,
10101,
486,
14689,
401,
286,
1077,
1273,
1769,
284,
633,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_types() {
let mut vm = build_def_vm();
let mut reader_state = ReaderState::new();
let tokens = tokenize(
&mut vm,
&mut reader_state,
"(one 2 3.0 \"four\" #\\B #t nil 3.5 ())",
None,
);
assert!(tokens.len() ==... | rust_cleaned_test_functions.jsonl/101094 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1182
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
9763,
368,
341,
286,
1077,
5206,
10995,
284,
1936,
7844,
39008,
543,
286,
1077,
5206,
6604,
4387,
284,
25166,
1397,
486,
931,
543,
286,
1077,
11211,
284,
77651,
1006,
310,
609,
6984,
10995,
345,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_replay() {
const TOKEN_ID: u16 = 0;
const INITIAL_BALANCE: u64 = 10;
const TOKEN_AMOUNT: u64 = 7;
const FEE_AMOUNT: u64 = 3;
// with the same private key.
const ERR_MSG: &str = "op_valid is true/enforce equal to one";
let account_base = WitnessTestAcco... | rust_cleaned_test_functions.jsonl/56191 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 788
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
35403,
1288,
1363,
368,
341,
262,
733,
43574,
3450,
25,
575,
16,
21,
284,
220,
15,
280,
262,
733,
56854,
79952,
8440,
25,
575,
21,
19,
284,
220,
16,
15,
280,
262,
733,
43574,
59993,
25,
575,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_pubkey_string() {
let pubkey = Pubkey::new_rand();
let str_native = format!("{}", pubkey);
let str_c;
unsafe {
str_c = CString::from_raw(get_pubkey_string(&pubkey));
}
let str_c = str_c.into_string().unwrap();
assert_eq!(str... | rust_cleaned_test_functions.jsonl/121328 | {
"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,
3062,
34014,
792,
3904,
368,
341,
286,
1077,
95116,
284,
22611,
792,
486,
931,
33864,
543,
286,
1077,
607,
44494,
284,
3561,
79878,
95116,
317,
286,
1077,
607,
666,
280,
286,
19860,
341,
310,
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_inet6_aton() {
let test_cases = vec![
(Some(b"0.0.0.0".to_vec()), Some(hex("00000000"))),
(Some(b"10.0.5.9".to_vec()), Some(hex("0A000509"))),
(
Some(b"::1.2.3.4".to_vec()),
Some(hex("00000000000000000000000001020304")),... | rust_cleaned_test_functions.jsonl/59413 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 828
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1243,
295,
21,
3752,
263,
368,
341,
286,
1077,
1273,
41427,
284,
7486,
90515,
310,
320,
8373,
1883,
1,
15,
13,
15,
13,
15,
13,
15,
3263,
983,
13251,
11858,
4329,
44660,
445,
15,
15,
15,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 2 |
#[test]
fn test_split_off() {
let mut v1 = LinkedList::new();
v1.push_front(1);
v1.push_front(1);
v1.push_front(1);
v1.push_front(1);
// test all splits
for ix in 0..1 + v1.len() {
let mut a = v1.clone();
let b = a.split_off(ix);
... | rust_cleaned_test_functions.jsonl/21485 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 275
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
17052,
13651,
368,
341,
286,
1077,
5206,
348,
16,
284,
22917,
486,
931,
543,
286,
348,
16,
2552,
22926,
7,
16,
317,
286,
348,
16,
2552,
22926,
7,
16,
317,
286,
348,
16,
2552,
22926,
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... | 2 |
#[test]
fn test_timespec_hash() {
use std::hash::{Hash, Hasher};
let c = &Timespec::new(3, 2);
let d = &Timespec::new(2, 1);
let e = &Timespec::new(2, 1);
let mut hasher = ::std::hash::SipHasher::new();
let d_hash:u64 = {
d.hash(&mut hasher);
... | rust_cleaned_test_functions.jsonl/7346 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 398
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
22353,
992,
8950,
368,
341,
286,
990,
1460,
486,
8296,
22964,
6370,
11,
6531,
261,
2315,
286,
1077,
272,
284,
609,
18889,
992,
486,
931,
7,
18,
11,
220,
17,
317,
286,
1077,
294,
284,
609,
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_fixed_to_asn1_signature_roundtrip() {
let signature1 = Signature::from_bytes(&EXAMPLE_SIGNATURE).unwrap();
// Convert to ASN.1 DER and back
let asn1_signature = signature1.to_asn1();
let signature2 = Signature::from_asn1(asn1_signature.as_ref()).unwrap();
... | rust_cleaned_test_functions.jsonl/31927 | {
"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,
37839,
2346,
11898,
77,
16,
39859,
29896,
32981,
368,
341,
286,
1077,
11957,
16,
284,
32232,
486,
1499,
12524,
2099,
95875,
73752,
568,
15454,
1428,
286,
442,
7169,
311,
54855,
13,
16,
46777,
323,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_plain_decode_fixed_len_byte_array() {
let mut data = vec![FixedLenByteArray::default(); 3];
data[0].set_data(ByteBufferPtr::new(String::from("bird").into_bytes()));
data[1].set_data(ByteBufferPtr::new(String::from("come").into_bytes()));
data[2].set_data(ByteBuffe... | rust_cleaned_test_functions.jsonl/38512 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 325
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
41015,
15227,
37839,
6043,
19737,
3858,
368,
341,
286,
1077,
5206,
821,
284,
7486,
20703,
13520,
11271,
18394,
486,
2258,
2129,
220,
18,
935,
286,
821,
58,
15,
936,
746,
1769,
55823,
4095,
5348,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_binary_literal_to_bit_string() {
let cs: Vec<(Vec<u8>, bool, &str)> = vec![
(vec![], true, "b''"),
(vec![], false, "b''"),
(vec![0x0], true, "b'0'"),
(vec![0x0], false, "b'00000000'"),
(vec![0x0, 0x0], true, "b'0'"),
... | rust_cleaned_test_functions.jsonl/12349 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 610
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
31761,
34100,
2346,
13996,
3904,
368,
341,
286,
1077,
10532,
25,
11312,
28706,
10050,
34837,
23,
8066,
1807,
11,
609,
495,
16018,
284,
7486,
90515,
310,
320,
4083,
0,
12995,
830,
11,
330,
65,
46... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_protoentry_all_supported_three_values() {
let protocols: UnvalidatedProtoEntry = "LinkAuth=1 Microdesc=1-2 Relay=2".parse().unwrap();
let unsupported: Option<UnvalidatedProtoEntry> = protocols.all_supported();
assert_eq!(true, unsupported.is_none());
} | rust_cleaned_test_functions.jsonl/5153 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 119
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
37689,
4085,
5705,
57885,
50016,
9146,
368,
341,
286,
1077,
31785,
25,
1230,
59590,
31549,
5874,
284,
330,
3939,
5087,
28,
16,
18157,
8614,
28,
16,
12,
17,
46172,
28,
17,
3263,
6400,
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... | 1 |
#[test]
fn test_summation() {
let rng = &mut ark_std::test_rng();
let size = 1 << 4;
let domain = GeneralEvaluationDomain::<Fr>::new(1 << 4).unwrap();
let size_as_fe = domain.size_as_field_element();
let poly = DensePolynomial::rand(size, rng);
let mut sum: Fr = ... | rust_cleaned_test_functions.jsonl/89135 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 373
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
10160,
76,
367,
368,
341,
286,
1077,
28422,
284,
609,
6984,
55217,
15656,
486,
1944,
66849,
543,
286,
1077,
1379,
284,
220,
16,
1115,
220,
19,
280,
286,
1077,
7947,
284,
3251,
82363,
13636,
2763... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_safe_panic() {
struct S;
impl Drop for S {
fn drop(&mut self) {
safe_panic!("safe panic on drop");
}
}
let res = panic_hook::recover_safe(|| {
let _s = S;
panic!("first panic");
});
r... | rust_cleaned_test_functions.jsonl/19900 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 197
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
34067,
620,
31270,
368,
341,
286,
2036,
328,
280,
286,
11605,
15733,
369,
328,
341,
310,
5168,
5943,
2099,
6984,
656,
8,
341,
394,
6092,
620,
31270,
17223,
18675,
21975,
389,
5943,
797,
310,
456... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_contract_tz3() -> Result<(), failure::Error> {
let decoded = HashType::ContractTz3Hash.bytes_to_string(&hex::decode("193b2b3f6b8f8e1e6b39b4d442fc2b432f6427a8")?);
let expected = "tz3NdTPb3Ax2rVW2Kq9QEdzfYFkRwhrQRPhX";
assert_eq!(expected, decoded);
Ok(())
... | rust_cleaned_test_functions.jsonl/65925 | {
"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,
11224,
51499,
528,
89,
18,
368,
1464,
5714,
68843,
7901,
486,
1454,
29,
341,
286,
1077,
29213,
284,
6531,
929,
486,
14067,
51,
89,
18,
6370,
42697,
2346,
3904,
2099,
17308,
486,
18196,
445,
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... | 2 |
#[test]
fn test_flock_with_timeout() {
// re-lock it until closing the original file.
let tf1 = tempfile::NamedTempFile::new().unwrap();
let fd1 = tf1.as_raw_fd();
assert!(flock_with_timeout(fd1, 10));
// too.
let tf2 = File::open(tf1.path()).unwrap();
let fd2 = tf2.as_raw... | rust_cleaned_test_functions.jsonl/49670 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 254
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
761,
1023,
6615,
20537,
368,
341,
1066,
262,
442,
312,
41772,
432,
3080,
15316,
279,
4024,
1034,
624,
262,
1077,
6409,
16,
284,
54819,
486,
15810,
12151,
1703,
486,
931,
1005,
15454,
543,
262,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_bip39_random() {
let sizes: [usize; 5] = [16, 20, 24, 28, 32];
let mut rng = thread_rng();
let size = *rng.choose(&sizes).unwrap();
let mut entropy: Vec<u8> = Vec::with_capacity(size);
for _ in 0..size {
let val: u8 = rng.gen();
entropy.push(val);
}
assert_eq!(
entropy,... | rust_cleaned_test_functions.jsonl/9449 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 184
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
880,
573,
18,
24,
22644,
368,
341,
197,
10217,
12282,
25,
508,
51878,
26,
220,
20,
60,
284,
508,
16,
21,
11,
220,
17,
15,
11,
220,
17,
19,
11,
220,
17,
23,
11,
220,
18,
17,
4821,
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_gaussian_blur_stdev_3() {
compare_to_truth("zebra.png", "zebra_gaussian_3.png", |image: &GrayImage| {
gaussian_blur_f32(image, 3f32)
});
} | rust_cleaned_test_functions.jsonl/81474 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 90
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
1889,
46972,
13141,
324,
1261,
3583,
62,
18,
368,
341,
262,
9429,
2346,
49186,
445,
2986,
14383,
3508,
497,
330,
2986,
14383,
1889,
46972,
62,
18,
3508,
497,
760,
1805,
25,
609,
28174,
1906,
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 |
#[test]
fn test_a280() {
let model = load_tsp("./tests/data/a280.tsp", 20);
assert_eq!(0, model.n_depots());
assert_eq!(280, model.n_nodes());
} | rust_cleaned_test_functions.jsonl/116654 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 82
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
4306,
17,
23,
15,
368,
341,
262,
1077,
1614,
284,
2795,
528,
2154,
13988,
23841,
13167,
14186,
17,
23,
15,
734,
2154,
497,
220,
17,
15,
317,
262,
2060,
10714,
10297,
15,
11,
1614,
1253,
49258,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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_file_extension_from_marker_line() {
assert_eq!(
get_file_extension_from_marker_line(
"--- src/one.rs 2019-11-20 06:47:56.000000000 +0100"
),
Some("rs")
);
} | rust_cleaned_test_functions.jsonl/72329 | {
"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,
3062,
2458,
31035,
5673,
26267,
6528,
368,
341,
286,
2060,
10714,
33673,
310,
633,
2458,
31035,
5673,
26267,
6528,
1006,
394,
75894,
2286,
14,
603,
25638,
197,
17,
15,
16,
24,
12,
16,
16,
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... | 1 |
#[test]
fn test_solve_innner() {
let p = vec![
0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 3, 0, 0, 0, 0, 0, 1, 0, 9, 0, 0, 0, 0, 5, 0, 0, 0, 2, 0,
0, 3, 1, 0, 0, 0, 0, 1, 4, 0, 6, 7, 8, 0, 0, 0, 7, 8, 6, 5, 2, 9, 0, 3, 4, 5, 6, 7, 0,
9, 3, 0, 0, 1, 8, 9, 1, 4, 5, 6, 3, 7, 2, 0, 2,... | rust_cleaned_test_functions.jsonl/52969 | {
"file_path": "/home/dung/Code/Cross_test_gen (Copy)/clean_data_rust/data/rust_cleaned_test_functions.jsonl",
"token_count": 1421
} | [
262,
11506,
1944,
921,
262,
5168,
1273,
86246,
1243,
77,
1194,
368,
341,
286,
1077,
281,
284,
7486,
90515,
310,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
15,
11,
220,
21,
11,
220,
15,
11,
220,
15,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | 1 |
#[test]
fn test_key_info() {
let value = 0b1010_0000_0000_0000u16;
let key_info = KeyInformation(value);
assert_eq!(key_info.key_descriptor_version(), 0);
assert!(key_info.smk_message());
let cloned = key_info.clone();
assert_eq!(key_info, cloned);
} | rust_cleaned_test_functions.jsonl/49814 | {
"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,
3097,
3109,
368,
341,
286,
1077,
897,
284,
220,
15,
65,
16,
15,
16,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
15,
62,
15,
15,
15,
15,
84,
16,
21,
280,
286,
1077,
1376,
3109,
284,
5309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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.